@camstack/addon-admin-ui 1.1.12 → 1.1.13

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.
Files changed (76) hide show
  1. package/dist/assets/{AddLocationWizard-DlR9gTk2.js → AddLocationWizard-DBndqHKO.js} +1 -1
  2. package/dist/assets/{AddonCollectionPage-Datt1QjM.js → AddonCollectionPage-CKo55RRn.js} +1 -1
  3. package/dist/assets/{Addons-D45c0-Md.js → Addons-BUJ0V7Yt.js} +1 -1
  4. package/dist/assets/{AdminTabs-D7kzyXLz.js → AdminTabs-BPMYVM2G.js} +1 -1
  5. package/dist/assets/{BrokerForm-Dw9_9N5P.js → BrokerForm-C_s6Caib.js} +1 -1
  6. package/dist/assets/{BrokerStep-4yPt7WFf.js → BrokerStep-B2YhZv7L.js} +1 -1
  7. package/dist/assets/{Capabilities-CLy9ICEh.js → Capabilities-DjjycHuW.js} +1 -1
  8. package/dist/assets/{CapabilityBadges-BPfyv6vE.js → CapabilityBadges-CdKNcGMD.js} +1 -1
  9. package/dist/assets/{Cluster-MaIh586X.js → Cluster-BWrEhysT.js} +1 -1
  10. package/dist/assets/{Dashboard-BykmUF3R.js → Dashboard-CMpEw1rh.js} +1 -1
  11. package/dist/assets/{Data-DEJVq4Tn.js → Data-BO1yyoPX.js} +1 -1
  12. package/dist/assets/{DetectionIntelligence-BxkEbvUW.js → DetectionIntelligence-DA1d4spc.js} +1 -1
  13. package/dist/assets/{DeviceDetail-CiHpdVia.js → DeviceDetail-DVANR8ft.js} +1 -1
  14. package/dist/assets/{Devices-DKvJqGNq.js → Devices-DOR-tzF-.js} +1 -1
  15. package/dist/assets/{EmbedPlayerPage-PG84aI9p.js → EmbedPlayerPage-SkGKnIg3.js} +1 -1
  16. package/dist/assets/{FormBuilder-DxflfkYi.js → FormBuilder-WjB8nuyr.js} +1 -1
  17. package/dist/assets/{Identity-DUrN0E9w.js → Identity-Bu69KQrA.js} +1 -1
  18. package/dist/assets/IntegrationDetail-q6alBqAo.js +1 -0
  19. package/dist/assets/{Integrations-DFzJOv99.js → Integrations-CdLLo7Vv.js} +1 -1
  20. package/dist/assets/Integrations-CeN7kWnn.js +1 -0
  21. package/dist/assets/{Logs-B_i6zUCC.js → Logs-BX_X279X.js} +1 -1
  22. package/dist/assets/{MotionZonesSettings-CfD6FLpk.js → MotionZonesSettings--v7vxpCd.js} +1 -1
  23. package/dist/assets/{MyAccess-h2VOw8pX.js → MyAccess-pT7qa3-M.js} +1 -1
  24. package/dist/assets/{Network-DjbRbVT4.js → Network-Tdpm2CBV.js} +1 -1
  25. package/dist/assets/{NodeAddonsSettingsPanel-DwQvoGUf.js → NodeAddonsSettingsPanel-CFiCCSjK.js} +1 -1
  26. package/dist/assets/{Pipeline-USFm9EMm.js → Pipeline-BO1eSpL7.js} +1 -1
  27. package/dist/assets/{PrivacyMaskSettings-pQazgIRJ.js → PrivacyMaskSettings-DbdpuroG.js} +1 -1
  28. package/dist/assets/{ProviderIcon-C0HnZBxx.js → ProviderIcon-BF-PD1Xq.js} +1 -1
  29. package/dist/assets/{Settings-VLw2oCwY.js → Settings-DKoUCD5Y.js} +1 -1
  30. package/dist/assets/{Showroom-DwMkhg2M.js → Showroom-CSmCGkQ2.js} +1 -1
  31. package/dist/assets/_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-D3dp5QNo.js +1 -0
  32. package/dist/assets/{bell-kKIifPdi.js → bell-ob9GBZbS.js} +1 -1
  33. package/dist/assets/circle-check-big-BYtMNCg3.js +1 -0
  34. package/dist/assets/{copy-CYPlIId0.js → copy-D-WS61r1.js} +1 -1
  35. package/dist/assets/{dist-DMayYqlf.js → dist-0WLqhvJP.js} +1 -1
  36. package/dist/assets/{dist-Dq9dSqES.js → dist-kRgdZgSo.js} +1 -1
  37. package/dist/assets/{download-D3dyD303.js → download-CcFU5sAP.js} +1 -1
  38. package/dist/assets/{esm-D1aSlve1.js → esm-wjPuWFhP.js} +1 -1
  39. package/dist/assets/hostInit-CrPI9nag.js +1 -0
  40. package/dist/assets/{index-KGQreUXd.js → index-B6sQJKA8.js} +3 -3
  41. package/dist/assets/{key-round-D9IA_YAT.js → key-round-BpwijorF.js} +1 -1
  42. package/dist/assets/{mf-entry-bootstrap-0-39b8eb5c.js → mf-entry-bootstrap-0-3c79d598.js} +2 -2
  43. package/dist/assets/{pencil-kf9oWwQP.js → pencil-B4Dku_fm.js} +1 -1
  44. package/dist/assets/{player-overlays-DY_CVt4U.js → player-overlays-B-PiywnH.js} +1 -1
  45. package/dist/assets/plus-BOTgdM_d.js +1 -0
  46. package/dist/assets/{radio-C4fS-iZ9.js → radio-DtRSX4_X.js} +1 -1
  47. package/dist/assets/{refresh-cw-SRDkmGt6.js → refresh-cw-BG-SfjOY.js} +1 -1
  48. package/dist/assets/remoteEntry-C0UBnFMv.js +1 -0
  49. package/dist/assets/{rotate-ccw-ov-aP4t5.js → rotate-ccw-P5fRCW6S.js} +1 -1
  50. package/dist/assets/rotate-cw-WOivjPB8.js +1 -0
  51. package/dist/assets/search-yS_58H2s.js +1 -0
  52. package/dist/assets/{server-7BEVQ_1Q.js → server-CxCFbVn3.js} +1 -1
  53. package/dist/assets/{sparkles-BWCqk2kM.js → sparkles-vgWOpcbj.js} +1 -1
  54. package/dist/assets/square-CkaVcc-j.js +1 -0
  55. package/dist/assets/{square-check-big-Czqt9V_V.js → square-check-big-WL8fLwF1.js} +1 -1
  56. package/dist/assets/{src-DVSeapHz.js → src-CD0MjM_q.js} +4 -4
  57. package/dist/assets/{src-DL7iSgmy.js → src-D_ZqrskZ.js} +1 -1
  58. package/dist/assets/{upload-BusXXXDJ.js → upload-MJeR4R1z.js} +1 -1
  59. package/dist/assets/{useDevice-BxrbLlpH.js → useDevice-Dmr2uWct.js} +1 -1
  60. package/dist/assets/{useEventInvalidation-CDlHOYGm.js → useEventInvalidation-DhO0b4F6.js} +1 -1
  61. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BCE6ubhD.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-De6clRmf.js} +2 -2
  62. package/dist/assets/{wifi-BW-fVi7Z.js → wifi-D5gtMPtL.js} +1 -1
  63. package/dist/assets/{zap-BOID3t2y.js → zap-9s_kA72u.js} +1 -1
  64. package/dist/index.html +5 -5
  65. package/dist/server/addon.js +12 -1
  66. package/package.json +1 -1
  67. package/dist/assets/IntegrationDetail-Ht8B0DrX.js +0 -1
  68. package/dist/assets/Integrations-Cs6CJEVv.js +0 -1
  69. package/dist/assets/_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CqW10QJD.js +0 -1
  70. package/dist/assets/circle-check-big-CHV6BcRn.js +0 -1
  71. package/dist/assets/hostInit-C7S14vqi.js +0 -1
  72. package/dist/assets/plus-B-sSvurw.js +0 -1
  73. package/dist/assets/remoteEntry-CQBXY6RK.js +0 -1
  74. package/dist/assets/rotate-cw-FopI4hrl.js +0 -1
  75. package/dist/assets/search-CJ28-QpX.js +0 -1
  76. package/dist/assets/square-Bcw-OQRd.js +0 -1
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-NEUUz2mh.js","assets/rolldown-runtime-Cyuzqnbw.js"])))=>i.map(i=>d[i]);
2
- import{a as e,r as t}from"./rolldown-runtime-Cyuzqnbw.js";import{t as n}from"./vite-preload-helper-zJ_50EbN.js";import{A as r,C as i,D as a,E as o,O as s,S as c,T as l,_ as u,a as d,b as f,c as ee,d as p,f as te,g as m,h,i as ne,j as re,k as g,l as ie,m as ae,n as oe,o as se,p as _,r as ce,s as le,t as ue,u as v,v as de,w as y,x as fe,y as b}from"./schemas-CuE8EXQ7.js";var pe=v([`singleton`,`device`,`widget`]),me=y({capName:a(),kind:pe,deviceId:i().optional(),reachable:m(),latencyMs:i(),error:a().optional()}),he=y({addonId:a(),caps:h(me).readonly(),widgets:h(me).readonly()}),ge=y({nodeId:a(),addons:h(he).readonly()}),_e=y({ok:m(),degraded:m(),checkedAt:a(),nodes:h(ge).readonly(),summary:y({total:i(),reachable:i(),unreachable:i()})}),ve=y({id:a(),name:a(),category:a().optional(),description:a().optional(),icon:a().optional()}),ye=[`onnx`,`coreml`,`openvino`,`tflite`,`pt`],x=y({url:a(),sizeMB:i(),isDirectory:m().optional(),files:h(a()).readonly().optional(),runtimes:h(v([`node`,`python`])).readonly().optional()}),be=y({url:a(),filename:a(),sizeMB:i()}),xe=y({onnx:x.optional(),coreml:x.optional(),openvino:x.optional(),tflite:x.optional(),pt:x.optional()}),Se=y({id:a(),name:a(),description:a(),formats:xe,inputSize:y({width:i(),height:i()}),labels:h(ve).readonly(),inputLayout:v([`nchw`,`nhwc`]).optional(),inputNormalization:v([`zero-one`,`imagenet`,`none`]).optional(),preprocessMode:v([`letterbox`,`resize`]).optional(),faceAlignment:m().optional(),extraFiles:h(be).readonly().optional()}),Ce=b(`format`,[y({format:c(`openvino`),precisions:h(v([`fp16`,`int8`])).min(1).readonly()}),y({format:c(`coreml`)})]),we=y({id:a().regex(/^[a-zA-Z0-9._-]+$/),name:a(),labels:h(ve).readonly(),inputSize:y({width:i(),height:i()}),inputLayout:v([`nchw`,`nhwc`]).optional(),inputNormalization:v([`zero-one`,`imagenet`,`none`]).optional(),preprocessMode:v([`letterbox`,`resize`]).optional(),outputFormat:v([`yolo`,`ssd`,`embedding`,`classification`,`ocr`,`segmentation`]),faceAlignment:m().optional()}),Te=y({format:v(ye),precision:v([`fp16`,`int8`]).optional(),sizeMB:i(),validated:m(),files:h(a()).readonly()}),Ee=y({entry:Se,artifacts:h(Te).readonly()}),De=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)}}}},Oe=`hub-only`;function ke(e){return{placement:e.execution?.placement??`hub-only`,group:e.execution?.group}}function Ae(e){let t=ke(e).placement;return t===`any-node`||t===`agent-only`}function je(e){return ke(e).placement===`agent-only`}function Me(e){return ke(e).group}function Ne(e,t){return e.execution?.group??t}function Pe(e){return ke(e).placement}var S=function(e){return e.SystemBoot=`system.boot`,e.SystemAddonsReady=`system.addons-ready`,e.SystemRestarting=`system.restarting`,e.SystemRestartCompleted=`system.restart-completed`,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.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.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.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.PipelineCameraUpdated=`pipeline.camera-updated`,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.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.PipelineAnalyticsTrackStarted=`pipeline-analytics.track-started`,e.PipelineAnalyticsTrackEnded=`pipeline-analytics.track-ended`,e.PipelineAnalyticsDetectionEvent=`pipeline-analytics.detection-event`,e.PipelineAnalyticsFrameTracked=`pipeline-analytics.frame-tracked`,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}({}),Fe=[{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}],Ie=Object.fromEntries(Fe.map(e=>[e.id,e]));function Le(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 Re(e,t){return{...e.tabs?{tabs:[...e.tabs]}:{},sections:e.sections.map(e=>({...e,fields:e.fields.map(e=>ze(e,t))}))}}function ze(e,t){if(Le(e))return e;if(e.type===`group`){let n=e.fields.map(e=>ze(e,t));return{...e,fields:n}}if(e.type===`sub-tabs`){let n=e.tabs.map(e=>({...e,fields:e.fields.map(e=>ze(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?Be(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;if(e.type===`password`)return{...e,value:``};let o=e.type===`textarea`&&e.isJson&&typeof a==`object`&&a?JSON.stringify(a,null,2):a;return{...e,value:o}}function Be(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 Ve(e,t){return e.category===t}function He(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 Ue(e,t){let n=t.ts??Date.now();e.emit(He(`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 We(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()))}}}var Ge=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(S.AddonStarted);let n=Ke(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(S.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._ctx?.settings?.readAddonStore()??{};return Re(r,e?{...i,...e}:i)}async updateGlobalSettings(e,t){await this._ctx?.settings?.writeAddonStore(e),await this.resolveConfig(),await this.onConfigChanged(),this.emitLifecycle(S.AddonUpdated,{level:`global`}),this.maybeAutoRestart(e,this.globalSettingsSchema())}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?Re(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{Ue(t.eventBus,{capName:n,scope:{type:`node`,nodeId:r},state:e,generation:this._readinessGeneration,sourceNodeId:r})}catch{}}async resolveModelsDir(){let{join:t}=await n(async()=>{let{join:t}=await import(`./__vite-browser-external-NEUUz2mh.js`).then(t=>e(t.default));return{join:t}},__vite__mapDeps([0,1])),{promises:r}=await n(async()=>{let{promises:t}=await import(`./__vite-browser-external-NEUUz2mh.js`).then(t=>e(t.default));return{promises:t}},__vite__mapDeps([0,1])),i=t(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.defaults};for(let n of Object.keys(this.defaults)){let r=e[n];if(r!=null){let e=typeof this.defaults[n];typeof r===e&&(t[n]=r)}}this._config=t}state(e,t,n){return We({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 We({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 Ke(e){if(e!=null)return Array.isArray(e)?{providers:e}:e}function qe(e,t){return{id:e,getRoutes:()=>t,invoke:async e=>{let n=Je(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=Xe(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 Je(e,t,n){let r=t.toUpperCase();for(let t of e){if(t.method!==r)continue;let e=Ye(t.path,n);if(e!==null)return{route:t,params:e}}return null}function Ye(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 Xe(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 C={offsetHours:1,startMonth:3,startWeekIndex:5,startWeekday:`Sunday`,startHour:2,endMonth:10,endWeekIndex:5,endWeekday:`Sunday`,endHour:3},Ze={offsetHours:1,startMonth:3,startWeekIndex:2,startWeekday:`Sunday`,startHour:2,endMonth:11,endWeekIndex:1,endWeekday:`Sunday`,endHour:2},Qe=[{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:C},{id:`Europe/Rome`,label:`Europe/Rome (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:C},{id:`Europe/Paris`,label:`Europe/Paris (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:C},{id:`Europe/Berlin`,label:`Europe/Berlin (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:C},{id:`Europe/Madrid`,label:`Europe/Madrid (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:C},{id:`Europe/Amsterdam`,label:`Europe/Amsterdam (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:C},{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:Ze},{id:`America/Chicago`,label:`America/Chicago (UTC−6 / CDT)`,region:`Americas`,stdOffsetMinutes:-360,dst:Ze},{id:`America/Denver`,label:`America/Denver (UTC−7 / MDT)`,region:`Americas`,stdOffsetMinutes:-420,dst:Ze},{id:`America/Los_Angeles`,label:`America/Los Angeles (UTC−8 / PDT)`,region:`Americas`,stdOffsetMinutes:-480,dst:Ze},{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 $e(e){return Qe.find(t=>t.id===e)}var w=v([`high`,`mid`,`low`]),et=[`high`,`mid`,`low`],tt=v([`pull-rtsp`,`pull-rtmp`,`pull-http`,`pull-rfc4571`,`push-annexb`,`derived`]),T=y({width:i().int().positive(),height:i().int().positive()}),nt=y({camStreamId:a().min(1),deviceId:i().int().nonnegative(),kind:tt,url:a().optional(),codec:a().optional(),resolution:T.optional(),fps:i().positive().optional(),label:a().optional(),deviceFeatures:h(a()).optional(),autoEligible:m().optional(),metadata:o(a(),r()).optional()}),rt=v([`unassigned`,`idle`,`connecting`,`streaming`,`error`]),it=y({deviceId:i().int().nonnegative(),profile:w,brokerId:a(),sourceCamStreamId:a().nullable(),status:rt,resolution:T.optional(),codec:a().optional(),preBufferSec:i().nonnegative().optional(),errorMessage:a().optional()});function at(e,t){return`${e}/${t}`}function ot(e,t){return`${e}/${t}`}function st(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=w.safeParse(r);return i.success?{deviceId:Number(n),profile:i.data}:null}function ct(e,t){let n=[...e].filter(e=>t===void 0||e.deviceId===t).toSorted((e,t)=>et.indexOf(e.profile)-et.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 lt=y({id:a(),label:a(),protocol:v([`rtsp`,`rtmp`,`annexb`,`http-mjpeg`,`webrtc`,`custom`]),url:a().optional(),resolution:y({width:i(),height:i()}).readonly().optional(),fps:i().optional(),bitrate:i().optional(),codec:a().optional(),profileHint:w.optional()}),ut=y({type:a(),url:a(),videoCodec:a().optional(),audioCodec:a().optional(),metadata:o(a(),r()).readonly().optional()}),dt=y({type:v([`video`,`audio`]),data:p(Uint8Array),pts:i(),dts:i(),keyframe:m(),codec:a()}),ft=y({data:p(Uint8Array),width:i(),height:i(),format:v([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),timestamp:i()}),pt=y({shmId:a(),slot:i().int().nonnegative(),seq:i().int().nonnegative(),width:i().int().positive(),height:i().int().positive(),format:v([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),pts:i(),byteLength:i().int().nonnegative(),nodeId:a(),slotCount:i().int().positive()}),mt=v([`rgb`,`bgr`,`yuv420`,`gray`]),ht=y({brokerId:a(),format:mt,maxFps:i().positive().optional(),tag:a().optional()}),gt=y({subscriptionId:a(),maxFps:i().nonnegative()}),_t=y({data:p(Uint8Array),sampleRate:i().int().positive(),channels:i().int().positive(),timestamp:i()}),vt=y({brokerId:a(),tag:a().optional()}),yt=y({subscriptionId:a()}),bt=v([`idle`,`connecting`,`streaming`,`error`,`stopped`]),xt=y({status:bt,inputFps:i(),decodeFps:i(),encodedSubscribers:i(),decodedSubscribers:i(),uptimeMs:i(),bitrateKbps:i(),idrIntervalMs:i(),codec:a().optional(),totalBytes:i(),packetCount:i(),rtspClients:i(),pipeClients:i(),preBufferSec:i(),preBufferMs:i(),preBufferPackets:i(),decoderNodeId:a().nullable(),audio:y({codec:a(),sampleRate:i(),channels:i(),supported:m()}).nullable().optional()}),St=y({profile:w,brokerId:a(),url:a(),mutedUrl:a(),enabled:m(),codec:a().optional(),resolution:T.optional()}),Ct=i().int().min(0).max(6),wt=/^([01]\d|2[0-3]):[0-5]\d$/,Tt=b(`kind`,[y({kind:c(`always`)}),y({kind:c(`timeOfDay`),start:a().regex(wt),end:a().regex(wt),days:h(Ct).optional()})]),Et=v([`continuous`,`onMotion`,`onAudioThreshold`]),Dt=v([`off`,`events`,`continuous`]),Ot=y({motion:m().optional(),audioThresholdDbfs:i().optional()}),kt=v([`continuous`,`events`]),At=Ot,jt=y({days:h(Ct),start:a().regex(wt),end:a().regex(wt),mode:kt,triggers:At.optional(),preBufferSec:i().min(0).optional(),postBufferSec:i().min(0).optional()}),Mt=y({schedule:Tt,mode:Et,preBufferSec:i().min(0).default(0),postBufferSec:i().min(0).default(0),resetTimeoutOnNewEvent:m().default(!0),thresholdDbfs:i().optional()}),Nt=y({maxAgeDays:i().min(0).optional(),maxSizeGb:i().min(0).optional()}),E=y({enabled:m(),mode:Dt.optional(),profiles:h(w).optional(),segmentSeconds:i().int().positive().optional(),schedules:h(Tt).optional(),schedule:Tt.optional(),triggers:Ot.optional(),preBufferSec:i().min(0).optional(),postBufferSec:i().min(0).optional(),rules:h(Mt).optional(),bands:h(jt).optional(),retention:Nt.optional()}),Pt=[0,1,2,3,4,5,6],Ft=`00:00`,It=`23:59`;function Lt(e,t,n){let r=e.kind===`timeOfDay`&&e.days?e.days:[...Pt],i=e.kind===`timeOfDay`?e.start:Ft,a=e.kind===`timeOfDay`?e.end:It;return t===`continuous`?{days:r,start:i,end:a,mode:t}:{days:r,start:i,end:a,mode:t,...n.triggers?{triggers:n.triggers}:{},...n.preBufferSec===void 0?{}:{preBufferSec:n.preBufferSec},...n.postBufferSec===void 0?{}:{postBufferSec:n.postBufferSec}}}function Rt(e){if(e.bands)return e.bands;if(!e.enabled||e.mode===`off`)return[];let t=e.schedules??(e.schedule?[e.schedule]:[{kind:`always`}]),n=e.mode===`continuous`?`continuous`:`events`;return t.map(t=>Lt(t,n,e))}var zt=class extends Error{capName;scope;waitedMs;constructor(e,t,n){super(`Timed out waiting for ${e} (${D(t)}) to become ready after ${n}ms`),this.name=`ReadinessTimeoutError`,this.capName=e,this.scope=t,this.waitedMs=n}};function Bt(e,t){return`${e}|${D(t)}`}function D(e){switch(e.type){case`global`:return`global`;case`node`:return`node:${e.nodeId}`;case`device`:return`device:${e.deviceId}`}}function Vt(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 Ht=class{bus;sourceNodeId;logger;now;generation;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??Ut(),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(Bt(e,t))??null}getSnapshotForTransport(){return Array.from(this.snapshot.values())}hydrate(e){let t=this.now();for(let n of e){let e=Bt(n.capName,n.scope);if(this.snapshot.has(e))continue;let r={capName:n.capName,scope:n.scope,state:n.state,generation:n.generation,epoch:1,lastChange:t,sourceNodeId:n.sourceNodeId};this.snapshot.set(e,r),this.logger&&this.logger.debug(`readiness: ${n.capName} (${D(n.scope)}) → ${n.state} (hydrated, gen=${n.generation.slice(0,6)})`);let i={capName:n.capName,scope:n.scope,state:n.state,epoch:1,generation:n.generation,sourceNodeId:`hydrated`,ts:t,durationInPrevState:0};for(let e of this.subscriptions)if(e.capName===n.capName&&Vt(e.scope,n.scope))try{e.handler(i)}catch(e){this.logger?.warn(`readiness hydrate handler threw for ${n.capName}: ${e.message??String(e)}`)}}}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 zt(e,t,this.now()-i)))},r):null,u=setInterval(()=>{s||this.logger?.warn(`readiness: still awaiting ${e} (${D(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(He(`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=Bt(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.logger&&this.logger.debug(`readiness: ${e.capName} (${D(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&&Vt(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.logger&&this.logger.debug(`readiness: ${r.capName} (${D(r.scope)}) → down (synthesized from agent.offline ${e})`);for(let e of this.subscriptions)if(e.capName===r.capName&&Vt(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 Ut(){return typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2,14)}function Wt(e,t){for(let{capName:n,scope:r}of t)e.emitDown(n,r)}var Gt=`x-camstack-dataplane-secret`,Kt=a().regex(/^[a-z][a-zA-Z0-9-]*$/),O=y({id:a().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),type:a(),displayName:a().min(1),providerId:a().min(1),config:o(a(),r()),nodeId:a().optional(),isDefault:m().default(!1),isSystem:m().default(!1),createdAt:i(),updatedAt:i()}),k=g([Kt,a().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/)]),qt=y({id:a().regex(/^[a-z][a-zA-Z0-9-]*$/,{message:`id must start with a lowercase letter and contain only letters, digits, or hyphens`}),displayName:a().min(1,{message:`displayName must not be empty`}),description:a().optional(),cardinality:v([`single`,`multi`]),defaultsTo:a().optional()}),Jt={high:`High`,mid:`Mid`,low:`Low`};function Yt(e){return Jt[e]??e.charAt(0).toUpperCase()+e.slice(1)}function Xt(e){return(e.width??0)*(e.height??0)}function Zt(e){if(e.length===0)return[];let t=e.map((e,t)=>({s:e,i:t,px:Xt(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 Qt(e){let t=e.height??0,n=e.width??0;return t>=1080||n>=1920?`high`:t>=480||n>=640?`mid`:`low`}function $t(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 A(e){return typeof e==`string`}function en(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function tn(e){return A(e)&&e.trim()?{url:e}:en(e)&&A(e.url)&&e.url.trim()?{url:e.url,label:A(e.label)?e.label:void 0}:null}function nn(e){let t=A(e.snapshot_url)?e.snapshot_url:void 0;if(Array.isArray(e.streams)){let n=[];for(let t of e.streams){let e=tn(t);e&&n.push(e)}return{streams:n,snapshot_url:t}}let n=[],r=A(e.main_stream_url)?e.main_stream_url:void 0;r&&n.push({url:r,label:A(e.main_stream_name)?e.main_stream_name:void 0});let i=A(e.sub_stream_url)?e.sub_stream_url:void 0;i&&n.push({url:i,label:A(e.sub_stream_name)?e.sub_stream_name:void 0});let a=A(e.third_stream_url)?e.third_stream_url:void 0;return a&&n.push({url:a,label:A(e.third_stream_name)?e.third_stream_name:void 0}),{streams:n,snapshot_url:t}}function rn(e){if(e.length===0)return{};let t=Zt(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 an={streaming:!0,notifications:!0,objectDetection:!1,remoteAccess:!0,agentCluster:!1,smartHome:!0,recordings:!0,backup:!0,repl:!0},on=[`face`,`plate`],sn=[`face`,`plate`,`clip`,`custom`],cn=y({inputFps:i(),outputFps:i(),avgDecodeTimeMs:i(),droppedFrames:i()}),ln=y({codec:a(),maxFps:i().default(0),outputFormat:v([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]).default(`jpeg`),scale:i().default(1),width:i().optional(),height:i().optional(),deviceId:i().int().nonnegative().optional(),tag:a().optional(),frameSink:v([`callback`,`shm`]).default(`callback`)}),un=y({codec:v([`h264`,`h265`,`copy`]),profile:v([`baseline`,`main`,`high`]).optional(),width:i().int().positive().optional(),height:i().int().positive().optional(),fps:i().positive().optional(),bitrateKbps:i().int().positive().optional(),gopFrames:i().int().positive().optional(),bf:i().int().min(0).optional(),preset:v([`ultrafast`,`superfast`,`veryfast`,`faster`,`fast`,`medium`]).optional(),tune:v([`zerolatency`,`film`,`animation`]).optional()}),dn=g([c(`passthrough`),y({codec:v([`opus`,`aac`,`pcmu`,`pcma`,`copy`]),bitrateKbps:i().int().positive().optional(),sampleRateHz:i().int().positive().optional(),channels:g([c(1),c(2)]).optional()})]),fn=y({video:un,audio:dn,inputArgs:h(a()).optional(),outputArgs:h(a()).optional()});function pn(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`}}function mn(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=hn(e,s);if(t)return a(t)}}return a(o[0])}function hn(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 gn={cleanupIntervalMs:3600*1e3,detectionEventsDays:30,audioLevelsDays:7,snapshotsDays:14},_n=function(e){return e.Addon=`addon`,e.Core=`core`,e.Device=`device`,e.Provider=`provider`,e.System=`system`,e}({}),vn=`camstack/camstack-models`,yn=`https://huggingface.co/${vn}/resolve/main`,bn={"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":`24h`},xn=`__camstackNodePin`;function Sn(e){return{context:{[xn]:e}}}function Cn(e){if(typeof e!=`object`||!e)return;let t=Reflect.get(e,xn);return typeof t==`string`?t:void 0}function wn(e){return JSON.parse(e)}function Tn(e){return typeof e!=`object`||!e||Array.isArray(e)?null:{...e}}function En(e){return Array.isArray(e)?e:[]}function Dn(e,t=``){return typeof e==`string`?e:t}function On(e,t=0){return typeof e==`number`?e:t}function kn(e,t=!1){return typeof e==`boolean`?e:t}function An(e){try{return Tn(wn(e))}catch{return null}}function jn(e){try{let t=wn(e);return Array.isArray(t)?t:null}catch{return null}}function Mn(e,t){return`https://huggingface.co/${e}/resolve/main/${t}`}function Nn(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 Pn=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(),Fn(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 Fn(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}var In={cpu:`onnx`,coreml:`onnx`,cuda:`onnx`,tensorrt:`onnx`,"onnx-py":`onnx`,pytorch:`pt`,openvino:`openvino`},Ln={onnx:`onnx`,coreml:`coreml`,openvino:`openvino`,tflite:`tflite`,pytorch:`pt`},Rn={coreml:`coreml_inference.py`,pytorch:`pytorch_inference.py`,openvino:`openvino_inference.py`};function zn(e,t){return e===`node`?`onnx`:{coreml:`coreml`,openvino:`openvino`,pytorch:`pytorch`,"onnx-py":`onnx`,cpu:`onnx`}[t]??t}function Bn(e,t){return e===`node`?In[t]??`onnx`:{coreml:`coreml`,openvino:`openvino`,pytorch:`pt`,"onnx-py":`onnx`,cpu:`onnx`}[t]??`onnx`}function Vn(e,t){return!e||e===`auto`?`auto`:zn(e,t??`cpu`)}function Hn(e){return In[e]??`onnx`}function Un(e){return Ln[e]}function Wn(e){return Rn[e]}function Gn(e){return e===`coreml`||e===`pytorch`||e===`openvino`}function Kn(e){return e instanceof Error?e.message:typeof e==`string`?e:String(e)}async function qn(e,t){let n=performance.now();try{return{output:t===void 0?await e():await Yn(e(),t),durationMs:Jn(performance.now()-n),ok:!0}}catch(e){return{output:void 0,durationMs:Jn(performance.now()-n),ok:!1,error:Kn(e)}}}function Jn(e){return Math.round(e*100)/100}function Yn(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 Xn=[{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`}],Zn=[{id:`person`,name:`Person`},{id:`vehicle`,name:`Vehicle`},{id:`animal`,name:`Animal`}],Qn={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`},preserveOriginal:!1},$n=[{id:`speech`,name:`Speech`,icon:`🗣️`},{id:`scream`,name:`Scream / Shout`,icon:`😱`},{id:`crying`,name:`Crying / Baby`,icon:`😢`},{id:`laughter`,name:`Laughter`,icon:`😂`},{id:`music`,name:`Music`,icon:`🎵`},{id:`dog`,name:`Dog`,icon:`🐕`},{id:`cat`,name:`Cat`,icon:`🐈`},{id:`bird`,name:`Bird`,icon:`🐦`},{id:`animal`,name:`Animal (other)`,icon:`🐾`},{id:`alarm`,name:`Alarm / Siren`,icon:`🚨`},{id:`doorbell`,name:`Doorbell / Knock`,icon:`🔔`},{id:`glass_breaking`,name:`Glass Breaking`,icon:`💥`},{id:`gunshot`,name:`Gunshot / Explosion`,icon:`💣`},{id:`vehicle`,name:`Vehicle`,icon:`🚗`},{id:`siren`,name:`Emergency Siren`,icon:`🚑`},{id:`fire`,name:`Fire / Smoke`,icon:`🔥`},{id:`water`,name:`Water`,icon:`💧`},{id:`wind`,name:`Wind / Weather`,icon:`🌬️`},{id:`door`,name:`Door`,icon:`🚪`},{id:`footsteps`,name:`Footsteps`,icon:`👣`},{id:`crowd`,name:`Crowd / Chatter`,icon:`👥`},{id:`telephone`,name:`Telephone`,icon:`📞`},{id:`engine`,name:`Engine / Motor`,icon:`⚙️`},{id:`tools`,name:`Tools / Construction`,icon:`🔨`},{id:`silence`,name:`Silence`,icon:`🤫`}],er={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},tr={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},nr=new Map;for(let[e,t]of Object.entries(er.mapping))nr.set(e.toLowerCase(),t);for(let[e,t]of Object.entries(tr.mapping))nr.set(e.toLowerCase(),t);function rr(e){return nr.get(e.toLowerCase())??null}function ir(){return $n.map(e=>e.id)}var ar={camera:{type:`camera`,label:`Camera`,icon:`camera`}},j=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.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}({}),or=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}({}),sr=function(e){return e.ChargingDC=`charging-dc`,e.ChargingSolar=`charging-solar`,e.NotCharging=`not-charging`,e}({}),M=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}({}),N={Siren:M.Siren,Floodlight:M.Floodlight,Spotlight:M.Spotlight,PirSensor:M.PirSensor,Chime:M.Chime,Autotrack:M.Autotrack,Nightvision:M.Nightvision,PrivacyMask:M.PrivacyMask},cr={[N.Siren]:`Siren`,[N.Floodlight]:`Floodlight`,[N.Spotlight]:`Spotlight`,[N.PirSensor]:`PIR`,[N.Chime]:`Chime`,[N.Autotrack]:`Autotracking`,[N.Nightvision]:`Night Vision`,[N.PrivacyMask]:`Privacy Mask`};function lr(e,t,n){let r=`${e}:${t}`;return typeof n==`number`?`${r}:${n}`:r}function ur(e,t){return!e||e.length===0?!1:e.includes(t.when.hasFeature)}var dr={id:`battery`,label:`Battery-operated camera`,when:{hasFeature:or.BatteryOperated},defaults:{audioMode:`disabled`,detectionMode:`on-motion`},settings:{"snapshot.minRefreshIntervalSec":3600,"streamBroker.preBufferEnabled":!1}},fr=[dr];function pr(e){for(let t of fr)if(ur(e,t))return t;return null}var mr=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}))}},hr=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(gr(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 gr(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 _r=`lastFetchedAt`;function vr(e){let{runtimeState:t,cap:n,ownDeviceId:r,refresh:i,staleMs:a,empty:o}=e,s=async()=>{let e=t.getCapState(n.name),r=typeof e?.[_r]==`number`?e[_r]:0;(!e||Date.now()-r>a)&&await i()},c=()=>{let e=t.getCapState(n.name);if(!e)return o();let{[_r]:r,...i}=e;return i};return{ensureFresh:s,getStatus:async({deviceId:e})=>{if(e!==r)throw Error(`${n.name}: deviceId mismatch, expected ${r}, got ${e}`);return await s(),c()}}}var yr=y({online:m(),lastChangedAt:i()}),br={name:`device-status`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onStatusChanged:{data:y({deviceId:i(),status:yr})}},status:{schema:yr,kind:`push`},runtimeState:yr},xr=y({flags:o(a(),r()),deviceType:a().nullable(),model:a().nullable(),channelCount:i().nullable(),lastProbedAt:i(),lastFetchedAt:i()}),Sr={name:`feature-probe`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onProbeChanged:{data:y({deviceId:i(),status:xr})}},status:{schema:xr,kind:`push`},runtimeState:xr},Cr=y({co2Ppm:i().min(0).optional(),vocPpb:i().min(0).optional(),pm25:i().min(0).optional(),pm10:i().min(0).optional(),aqi:i().optional(),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),wr={name:`air-quality-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:Cr,kind:`push`},runtimeState:Cr};function Tr(e){return e.mount?e.mount:e.deviceNative===!0?{kind:`device-native`}:e.mode===`collection`?{kind:`collection`}:{kind:`singleton`}}var Er=y({id:a(),title:a(),description:a().optional(),style:v([`card`,`accordion`]).optional(),defaultCollapsed:m().optional(),columns:g([c(1),c(2),c(3),c(4)]).optional(),tab:a().optional(),location:v([`settings`,`top-tab`]).optional(),order:i().optional(),fields:h(ae())}),Dr=y({tabs:h(y({id:a(),label:a(),icon:a(),order:i().optional()})).optional(),sections:h(Er)}).nullable(),Or={getDeviceSettingsContribution:{input:y({deviceId:i()}),output:Dr,kind:`query`,auth:`protected`},getDeviceLiveContribution:{input:y({deviceId:i()}),output:Dr,kind:`query`,auth:`protected`},applyDeviceSettingsPatch:{input:y({deviceId:i(),patch:o(a(),r())}),output:y({success:c(!0)}),kind:`mutation`,auth:`admin`}},kr={getStatus:{input:y({deviceId:i()}),output:r().nullable(),kind:`query`,auth:`protected`}};function Ar(e){let t=e.methods;return e.exposesDeviceSettings&&(t={...Or,...t}),e.status&&(t={...kr,...t}),t}function P(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,...n?.access===void 0?{}:{access:n.access},timeoutMs:n?.timeoutMs}}function F(e){return{data:e}}function jr(e){return e?.deviceConfig!==void 0}var Mr=v([`disarmed`,`armed_home`,`armed_away`,`armed_night`,`armed_vacation`,`armed_custom_bypass`,`arming`,`disarming`,`pending`,`triggered`]),Nr=v([`home`,`away`,`night`,`vacation`,`custom_bypass`]),Pr=y({state:Mr,availableModes:h(Nr),requiresCode:m(),lastChangedAt:i()}),Fr={name:`alarm-panel`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.AlarmPanel],methods:{arm:P(y({deviceId:i().int().nonnegative(),mode:Nr,code:a().min(1).optional()}),_(),{kind:`mutation`,auth:`admin`}),disarm:P(y({deviceId:i().int().nonnegative(),code:a().min(1).optional()}),_(),{kind:`mutation`,auth:`admin`}),trigger:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Pr,kind:`push`},runtimeState:Pr},Ir=y({lux:i().min(0),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),Lr={name:`ambient-light-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:Ir,kind:`push`},runtimeState:Ir},Rr=y({className:a(),hits:i().int().nonnegative(),avgScore:i().min(0).max(1),peakScore:i().min(0).max(1)}),zr=y({ts:i().int(),windowSec:i().int().positive(),level:y({rms:i(),dbfs:i()}),peakDbfs:i(),avgDbfs:i(),current:y({className:a(),score:i().min(0).max(1),timestamp:i().int()}).nullable(),byClass:h(Rr).readonly()}),Br=y({ts:i().int(),dbfs:i().nullable(),peakDbfs:i(),avgDbfs:i(),topClass:a().nullable(),topScore:i().min(0).max(1).nullable()}),Vr=y({points:h(Br).readonly(),effectiveSampleEveryMs:i().int().positive(),windowMsActual:i().int().nonnegative()}),Hr={name:`audio-metrics`,scope:`device`,mode:`singleton`,deviceTypes:[j.Camera],methods:{getCurrentSnapshot:P(y({deviceId:i()}),zr.nullable()),getHistory:P(y({deviceId:i(),windowSec:i().int().positive().optional(),sampleEveryMs:i().int().positive().optional()}),Vr)},runtimeState:zr},Ur=y({enabled:m(),isRunning:m(),lastTriggeredAt:i(),lastError:a().nullable(),lastChangedAt:i()}),Wr={name:`automation-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Automation],methods:{enable:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),disable:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),trigger:P(y({deviceId:i().int().nonnegative(),skipCondition:m().optional()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Ur,kind:`push`},runtimeState:Ur},Gr=y({percentage:i().min(0).max(100),charging:v([`dc`,`solar`,`none`]),sleeping:m(),lastUpdated:i(),binary:m().optional()}),Kr={name:`battery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera,j.Sensor,j.Button,j.Switch],methods:{wakeForStream:P(y({deviceId:i(),timeoutMs:i().int().min(500).max(3e4).default(8e3)}),y({awoke:m(),durationMs:i()}),{kind:`mutation`})},events:{onStatusChanged:{data:y({deviceId:i(),status:Gr})}},status:{schema:Gr,kind:`push`},runtimeState:Gr},qr=y({on:m(),lastChangedAt:i()}),Jr={name:`binary`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:qr,kind:`push`},runtimeState:qr},Yr=y({percentage:i().min(0).max(100),lastChangedAt:i()}),Xr={name:`brightness`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Light],methods:{setBrightness:P(y({deviceId:i().int().nonnegative(),percentage:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`})},events:{onBrightnessChanged:{data:y({deviceId:i(),percentage:i().min(0).max(100),lastChangedAt:i()})}},status:{schema:Yr,kind:`command-driven`},runtimeState:Yr},Zr=v([`webrtc`,`hls`,`mjpeg`,`rtsp`]),Qr=y({streamId:a(),format:Zr,url:a().nullable(),active:m()}),$r={name:`streaming-engine`,scope:`system`,mode:`singleton`,internal:!0,methods:{registerStream:P(y({streamId:a(),sourceUrl:a(),codec:a().optional()}),_(),{kind:`mutation`}),unregisterStream:P(y({streamId:a()}),_(),{kind:`mutation`}),getStreamUrl:P(y({streamId:a(),format:Zr}),a().nullable()),listStreams:P(_(),h(Qr))},mount:{kind:`skip`}},ei=y({brokerId:a(),url:a(),mutedUrl:a(),enabled:m(),codec:a().optional(),resolution:y({width:i().int().positive(),height:i().int().positive()}).optional()}),ti=y({sessionId:a(),remoteAddr:a(),playing:m(),muted:m(),connectedAt:i(),lastRtpAt:i(),bytesSent:i()}),ni=y({tag:a(),subscribedAt:i(),maxFps:i(),framesDelivered:i(),framesDropped:i()}),ri=y({tag:a(),subscribedAt:i(),chunksDelivered:i()}),ii=v([`alexa`,`homekit`,`webrtc-browser`,`webrtc-mobile`,`webrtc-whep`,`rtsp-listen`,`derived-broker`,`recording`,`pipeline`,`snapshot`,`warmup`,`unknown`]),ai=y({kind:ii,label:a().optional(),media:v([`audio`,`video`,`both`]).optional(),targetCodec:a().optional(),transport:v([`passthrough`,`repacketize`,`transcode`]).optional(),remoteAddr:a().optional(),userAgent:a().optional(),userId:a().optional(),sessionId:a().optional(),extra:o(a(),a()).optional()}).readonly(),oi=y({id:a(),channel:v([`annexb`,`rtp`]),attribution:ai,subscribedAt:i(),packetsDelivered:i()}),si=y({rtsp:h(ti).readonly(),decoded:h(ni).readonly(),audio:h(ri).readonly(),encoded:h(oi).readonly(),pipeClients:i(),encodedSubscribers:i()}),ci=v([`reconnecting`,`sleeping`,`offline`,`disabled`,`waking`]),li=v([`h264`,`h265`,`copy`]),ui=v([`aac`,`opus`,`pcmu`,`copy`,`none`]),di=y({deviceId:i().int().nonnegative(),video:li,audio:ui.optional(),profile:w.optional(),targetResolution:y({width:i().int().positive(),height:i().int().positive()}).optional(),outputArgs:h(a()).optional(),audioEgress:m().optional(),hostname:a().optional(),tag:a().optional()}),fi=y({url:a(),videoCodec:v([`H264`,`H265`]),audioCodec:a(),resolution:y({width:i().int().positive(),height:i().int().positive()}),transcoded:m(),encoder:a(),pipelineKey:a()}),pi={name:`stream-broker`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{publishCameraStream:P(y({deviceId:i().int().nonnegative(),camStreamId:a().min(1),kind:tt,url:a().optional(),codec:a().optional(),resolution:T.optional(),fps:i().positive().optional(),label:a().optional(),deviceFeatures:h(a()).optional(),autoEligible:m().optional(),metadata:o(a(),r()).optional(),sourceCamStreamId:a().min(1).optional(),encodeProfile:fn.optional()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),retractCameraStream:P(y({deviceId:i().int().nonnegative(),camStreamId:a().min(1)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),assignProfile:P(y({deviceId:i().int().nonnegative(),profile:w,camStreamId:a().min(1)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),unassignProfile:P(y({deviceId:i().int().nonnegative(),profile:w}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),listAllCameraStreams:P(_(),h(nt).readonly()),listAllProfileSlots:P(_(),h(it).readonly()),getBrokerStats:P(y({brokerId:a()}),xt),probeStream:P(y({brokerId:a()}),y({probed:m(),summary:a()}),{kind:`mutation`,auth:`admin`}),listClients:P(y({brokerId:a()}),si),killClient:P(y({brokerId:a(),channel:v([`rtsp`,`decoded`,`audio`]),handle:a()}),y({killed:m()}),{kind:`mutation`,auth:`admin`}),restartProfile:P(y({deviceId:i().int().nonnegative(),profile:w}),y({success:m()}),{kind:`mutation`,auth:`admin`}),getStreamUrl:P(y({streamId:a(),format:Zr}),y({url:a()})),getStreamWithCodec:P(di,fi,{kind:`mutation`,auth:`admin`}),releaseStreamWithCodec:P(y({pipelineKey:a()}),y({released:m(),refcount:i().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),subscribeAudioChunks:P(vt,yt,{kind:`mutation`}),pullAudioChunks:P(y({subscriptionId:a(),maxCount:i().int().positive().default(8)}),h(_t).readonly()),unsubscribeAudioChunks:P(y({subscriptionId:a()}),y({released:m()}),{kind:`mutation`}),subscribeFrames:P(ht,gt,{kind:`mutation`}),pullFrameHandles:P(y({subscriptionId:a(),maxCount:i().int().positive().default(4)}),h(pt).readonly()),unsubscribeFrames:P(y({subscriptionId:a()}),y({released:m()}),{kind:`mutation`}),setPreBufferDuration:P(y({brokerId:a(),seconds:i().min(0).max(30)}),_(),{kind:`mutation`,auth:`admin`}),getPreBufferInfo:P(y({brokerId:a()}),y({configuredSec:i(),bufferedMs:i(),packetCount:i()})),getRtspPort:P(_(),i()),getAllRtspEntries:P(y({hostname:a().optional()}),h(ei).readonly()),getRtspEntry:P(y({brokerId:a(),hostname:a().optional()}),ei.nullable()),regenerateRtspToken:P(y({brokerId:a()}),a().nullable(),{kind:`mutation`,auth:`admin`}),setRtspEnabled:P(y({brokerId:a(),enabled:m()}),_(),{kind:`mutation`,auth:`admin`}),isRtspEnabled:P(y({brokerId:a()}),m())},events:{onCamStreamDemand:F(y({deviceId:i().int().nonnegative(),camStreamId:a(),profile:w})),onCamStreamIdle:F(y({deviceId:i().int().nonnegative(),camStreamId:a()})),onRequestStreamSourceRefresh:F(y({deviceId:i().int().nonnegative(),camStreamId:a(),brokerId:a()}))}},mi=v([`h264`,`h265`,`hevc`,`av1`,`mjpeg`,`vp8`,`vp9`]),hi=y({acceptCodecs:h(mi).readonly().optional(),minHeight:i().int().positive().optional(),minWidth:i().int().positive().optional(),excludeDerived:m().optional(),requireSiblingCodec:h(mi).readonly().optional()}).readonly(),gi=y({preferredProviders:h(a()).readonly().optional(),resolutionPreference:v([`highest`,`lowest`]).optional()}).readonly(),_i=y({camStreamId:a(),codec:a().optional(),resolution:T.optional(),reason:a()}),vi={name:`camera-streams`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[j.Camera],methods:{getCameraStreams:P(y({deviceId:i().int().nonnegative()}),h(nt).readonly()),getBrokerStreams:P(y({deviceId:i().int().nonnegative()}),h(it).readonly()),getRtspEntries:P(y({deviceId:i().int().nonnegative(),hostname:a().optional()}),h(ei).readonly()),getProfileRtspEntries:P(y({deviceId:i().int().nonnegative(),hostname:a().optional()}),h(St).readonly()),pickStream:P(y({deviceId:i().int().nonnegative(),requirements:hi,preferences:gi.optional()}),_i.nullable())},events:{onCamStreamsChanged:F(y({deviceId:i().int().nonnegative(),camStreams:h(nt).readonly()})),onProfileSlotsChanged:F(y({deviceId:i().int().nonnegative(),profileSlots:h(it).readonly()}))},runtimeState:y({online:m(),slotStatuses:y({high:rt.optional(),mid:rt.optional(),low:rt.optional()}),slotErrors:y({high:a().optional(),mid:a().optional(),low:a().optional()}),lastChangedAt:i()})},yi=y({detected:m(),lastChangedAt:i()}),bi={name:`carbon-monoxide`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:yi,kind:`push`},runtimeState:yi},xi=v([`off`,`heat`,`cool`,`auto`,`heat_cool`,`fan_only`,`dry`]),Si=y({mode:xi,availableModes:h(xi),fanMode:a(),availableFanModes:h(a()),preset:a(),availablePresets:h(a()),target:i().nullable(),targetHigh:i().nullable(),targetLow:i().nullable(),targetHumidity:i().min(0).max(100).nullable(),currentTemp:i().nullable(),currentHumidity:i().min(0).max(100).nullable(),swingVertical:m().nullable(),swingHorizontal:m().nullable(),lastFetchedAt:i()}),Ci={name:`climate-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Thermostat],methods:{setMode:P(y({deviceId:i().int().nonnegative(),mode:xi}),_(),{kind:`mutation`,auth:`admin`}),setFanMode:P(y({deviceId:i().int().nonnegative(),fanMode:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),setPreset:P(y({deviceId:i().int().nonnegative(),preset:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),setTarget:P(y({deviceId:i().int().nonnegative(),target:i()}),_(),{kind:`mutation`,auth:`admin`}),setTargetRange:P(y({deviceId:i().int().nonnegative(),targetLow:i(),targetHigh:i()}),_(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:P(y({deviceId:i().int().nonnegative(),targetHumidity:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setSwingVertical:P(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`}),setSwingHorizontal:P(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Si,kind:`push`},runtimeState:Si},wi=y({r:i().int().min(0).max(255),g:i().int().min(0).max(255),b:i().int().min(0).max(255)}),Ti=y({h:i().min(0).max(360),s:i().min(0).max(100),v:i().min(0).max(100)}),Ei=b(`mode`,[y({mode:c(`rgb`),rgb:wi}),y({mode:c(`hsv`),hsv:Ti}),y({mode:c(`mired`),mireds:i().int().min(50).max(1e3)})]),Di=y({mode:v([`rgb`,`hsv`,`mired`]),rgb:wi.optional(),hsv:Ti.optional(),mireds:i().int().optional(),lastChangedAt:i()}),Oi={name:`color`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Light],methods:{setColor:P(y({deviceId:i().int().nonnegative(),color:Ei}),_(),{kind:`mutation`,auth:`admin`})},events:{onColorChanged:{data:y({deviceId:i(),mode:v([`rgb`,`hsv`,`mired`]),rgb:wi.optional(),hsv:Ti.optional(),mireds:i().int().optional(),lastChangedAt:i()})}},status:{schema:Di,kind:`command-driven`},runtimeState:Di},ki=y({connected:m(),lastChangedAt:i()}),Ai={name:`connectivity`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:ki,kind:`push`},runtimeState:ki},ji=y({key:a().min(1),label:a().min(1),level:i().min(0).max(100).nullable(),status:v([`ok`,`replace`]).nullable(),lastResetAt:i().nullable(),resettable:m()}),Mi=y({items:h(ji),lastChangedAt:i()}),Ni={name:`consumables`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera,j.Hub,j.Light,j.Siren,j.Switch,j.Sensor,j.Thermostat,j.Button,j.EventEmitter,j.Update,j.Generic,j.Notifier,j.Script,j.Automation,j.Lock,j.Cover,j.Valve,j.Humidifier,j.WaterHeater,j.Fan,j.MediaPlayer,j.AlarmPanel,j.Control,j.Presence,j.Weather,j.Vacuum,j.LawnMower,j.Container,j.Image],deviceConfig:{ui:{kind:`widget`,widgetId:`host/consumables-panel`,tab:`consumables`,topTab:!0,label:`Consumables`,order:5}},methods:{reset:P(y({deviceId:i().int().nonnegative(),key:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Mi,kind:`push`},runtimeState:Mi.extend({lastFetchedAt:i()})},Pi=y({entryOpen:m(),lastChangedAt:i()}),Fi={name:`contact`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:Pi,kind:`push`},runtimeState:Pi},Ii=v([`numeric`,`select`,`text`,`datetime`]),Li=y({kind:Ii,value:g([i(),a()]),options:h(a()),lastChangedAt:i(),unit:a().optional(),min:i().optional(),max:i().optional(),step:i().optional(),precision:i().int().min(0).max(10).optional(),format:v([`date`,`time`,`datetime`]).optional()}),Ri=b(`kind`,[y({kind:c(`numeric`),value:i()}),y({kind:c(`select`),value:a().min(1)}),y({kind:c(`text`),value:a()}),y({kind:c(`datetime`),value:a().min(1)})]),zi={name:`control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Control],methods:{setValue:P(y({deviceId:i().int().nonnegative(),control:Ri}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Li,kind:`push`},runtimeState:Li},Bi=v([`open`,`opening`,`closing`,`closed`,`stopped`]),Vi=y({state:Bi,position:i().min(0).max(100).nullable(),tiltPosition:i().min(0).max(100).nullable(),lastChangedAt:i()}),Hi={name:`cover`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Cover],methods:{open:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),close:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),stop:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),setPosition:P(y({deviceId:i().int().nonnegative(),position:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setTiltPosition:P(y({deviceId:i().int().nonnegative(),tiltPosition:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Vi,kind:`push`},runtimeState:Vi},I=y({id:a(),system:a(),uniqueId:a().optional(),raw:o(a(),r()).optional()});function Ui(e){return{id:e.stableId,system:e.addonId}}function Wi(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 Gi(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 Ki=`sourceInfo`;function qi(e){if(!e)return null;let t=e[Ki];if(!t)return null;let n=I.safeParse(t);return n.success?n.data:null}var Ji=v([`online`,`sleeping`,`offline`,`unknown`]),L=fe(()=>y({childNativeId:a(),name:a(),type:v(j),status:Ji,metadata:y({model:a().optional(),serialNumber:a().optional(),uid:a().optional(),rtspChannel:i().int().nonnegative().optional(),isBattery:m().optional(),isDoorbell:m().optional(),isMultifocal:m().optional(),externalLocation:a().optional(),manufacturer:a().optional(),integration:a().optional()}).default({}),alreadyAdopted:m(),adoptedDeviceId:i().int().nonnegative().nullable(),capabilities:h(a()).readonly().optional(),features:h(a()).readonly().optional(),sourceInfo:I.optional(),children:h(L).readonly().optional()})),Yi=y({discovered:h(L),lastDiscoveryAt:i().int().nonnegative().nullable(),lastError:a().nullable()}),Xi={name:`device-discovery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Hub],status:{schema:Yi,kind:`poll`},runtimeState:Yi.extend({lastFetchedAt:i().int().nonnegative()}),methods:{listDiscovered:P(y({deviceId:i().int().nonnegative()}),h(L).readonly()),refreshDiscovery:P(y({deviceId:i().int().nonnegative()}),h(L).readonly(),{kind:`mutation`,auth:`admin`}),adoptDevice:P(y({deviceId:i().int().nonnegative(),childNativeId:a(),name:a().optional()}),y({deviceId:i().int().nonnegative(),stableId:a()}),{kind:`mutation`,auth:`admin`}),releaseDevice:P(y({deviceId:i().int().nonnegative(),childDeviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})}},Zi=y({lastPressedAt:i().nullable(),pressCountSinceStart:i()}),Qi=y({deviceId:i(),timestamp:i()}),$i={name:`doorbell`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Button],methods:{},events:{onPressed:{data:Qi}},status:{schema:Zi,kind:`push`},runtimeState:Zi},ea=v([`date`,`time`,`datetime`]),ta=y({value:a(),format:ea.optional(),lastFetchedAt:i()}),na={name:`enum-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:ta,kind:`push`},runtimeState:ta},ra=y({deviceId:i(),eventType:a(),data:o(a(),r()).nullable(),timestamp:i(),seq:i()}),ia=y({eventTypes:h(a()),lastEvent:ra.nullable(),eventCountSinceStart:i()}),aa={name:`event-emitter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.EventEmitter],methods:{},events:{onEvent:{data:ra}},status:{schema:ia,kind:`push`},runtimeState:ia},oa=v([`forward`,`reverse`]),sa=y({percentage:i().min(0).max(100).nullable(),percentageStep:i().positive().optional(),preset:a(),availablePresets:h(a()),direction:oa.nullable(),oscillating:m().nullable(),lastChangedAt:i()}),ca={name:`fan-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Fan],methods:{setPercentage:P(y({deviceId:i().int().nonnegative(),percentage:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setPreset:P(y({deviceId:i().int().nonnegative(),preset:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),setDirection:P(y({deviceId:i().int().nonnegative(),direction:oa}),_(),{kind:`mutation`,auth:`admin`}),setOscillating:P(y({deviceId:i().int().nonnegative(),oscillating:m()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:sa,kind:`push`},runtimeState:sa},la=y({flooded:m(),lastChangedAt:i()}),ua={name:`flood`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:la,kind:`push`},runtimeState:la},da=y({detected:m(),lastChangedAt:i()}),fa={name:`gas`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:da,kind:`push`},runtimeState:da},pa=y({on:m(),currentHumidity:i().min(0).max(100).nullable(),targetHumidity:i().min(0).max(100).nullable(),mode:a().nullable(),availableModes:h(a()),action:a().nullable(),minHumidity:i().nullable(),maxHumidity:i().nullable(),lastChangedAt:i()}),ma={name:`humidifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Humidifier],methods:{setOn:P(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:P(y({deviceId:i().int().nonnegative(),humidity:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setMode:P(y({deviceId:i().int().nonnegative(),mode:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:pa,kind:`push`},runtimeState:pa},ha=y({percent:i().min(0).max(100),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),ga={name:`humidity-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor,j.Thermostat],methods:{},status:{schema:ha,kind:`push`},runtimeState:ha},_a=y({url:a().nullable(),lastUpdated:i().nullable()}),va={name:`image`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Image],methods:{},status:{schema:_a,kind:`push`},runtimeState:_a},ya=v([`idle`,`mowing`,`paused`,`docked`,`error`]),ba=v([`info`,`warning`,`error`]),xa=y({activity:ya,batteryLevel:i().min(0).max(100).nullable(),progressPercent:i().min(0).max(100).nullable(),currentCode:i().nullable(),currentCodeLabel:a().nullable(),severity:ba,lastChangedAt:i()}),Sa={name:`lawn-mower-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.LawnMower],methods:{startMowing:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),pause:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),dock:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:xa,kind:`push`},runtimeState:xa},Ca=v([`locked`,`unlocked`,`locking`,`unlocking`,`jammed`]),wa=y({state:Ca,lastChangedAt:i()}),Ta={name:`lock-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Lock],methods:{lock:P(y({deviceId:i().int().nonnegative(),code:a().min(1).optional()}),_(),{kind:`mutation`,auth:`admin`}),unlock:P(y({deviceId:i().int().nonnegative(),code:a().min(1).optional()}),_(),{kind:`mutation`,auth:`admin`}),open:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:wa,kind:`push`},runtimeState:wa},Ea=v([`off`,`on`,`idle`,`playing`,`paused`,`buffering`,`standby`]),Da=v([`off`,`all`,`one`]),Oa=y({type:a(),title:a(),artist:a().optional(),album:a().optional(),imageUrl:a().optional()}),ka=y({state:Ea,volumeLevel:i().min(0).max(100).nullable(),isMuted:m().nullable(),source:a(),availableSources:h(a()),currentMedia:Oa.nullable(),positionMs:i().int().nonnegative().nullable(),durationMs:i().int().nonnegative().nullable(),shuffle:m().nullable(),repeat:Da.nullable(),lastChangedAt:i()}),Aa={name:`media-player`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.MediaPlayer],methods:{play:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),pause:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),stop:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),next:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),previous:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),seek:P(y({deviceId:i().int().nonnegative(),positionMs:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),setVolume:P(y({deviceId:i().int().nonnegative(),volumeLevel:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setMute:P(y({deviceId:i().int().nonnegative(),muted:m()}),_(),{kind:`mutation`,auth:`admin`}),setShuffle:P(y({deviceId:i().int().nonnegative(),shuffle:m()}),_(),{kind:`mutation`,auth:`admin`}),setRepeat:P(y({deviceId:i().int().nonnegative(),repeat:Da}),_(),{kind:`mutation`,auth:`admin`}),selectSource:P(y({deviceId:i().int().nonnegative(),source:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),playMedia:P(y({deviceId:i().int().nonnegative(),mediaId:a().min(1),mediaType:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:ka,kind:`push`},runtimeState:ka},ja=v([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),R=y({data:u(),format:ja,width:i(),height:i(),timestamp:i()}),z=y({x:i(),y:i(),w:i(),h:i()}),Ma=y({class:a(),originalClass:a(),score:i(),bbox:z}),Na=y({data:p(Uint8Array),sampleRate:i(),channels:i(),timestamp:i(),deviceId:i().optional()}),Pa=y({rms:i(),dbfs:i()}),Fa=y({className:a(),originalClass:a().optional(),score:i()}),Ia=y({bbox:z,pixelCount:i(),intensity:i()}),La=y({detected:m(),regionCount:i(),regions:h(Ia).readonly(),rawRegions:h(Ia).readonly(),frameWidth:i(),frameHeight:i(),analysisMs:i()}),Ra={name:`motion-detection`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,exposesDeviceSettings:!0,methods:{analyze:P(y({deviceId:i(),frame:R}),La,{kind:`mutation`}),removeCamera:P(y({deviceId:i()}),_(),{kind:`mutation`}),reset:P(_(),_(),{kind:`mutation`})},events:{onMotion:{data:y({deviceId:i(),detected:m(),regionCount:i()})}}},za=y({activeCameras:i(),throttledCameras:i(),avgInferenceTimeMs:i(),queueDepth:i()}),Ba=y({detectionMode:v([`disabled`,`always-on`,`on-motion`]),configuredFps:i(),actualFps:i(),queueDepth:i(),avgInferenceTimeMs:i(),droppedFrames:i(),phase:v([`idle`,`watching`,`active`])}),Va=Ba.extend({deviceId:i()}),Ha=v([`onnx`,`coreml`,`openvino`,`tflite`,`pt`]),Ua=v([`detector`,`cropper`,`classifier`,`refiner`,`audio-classifier`]),B=y({runtime:v([`node`,`python`]),backend:a(),format:Ha,device:a().optional()}),Wa=y({engine:B,devices:h(y({id:a(),label:a(),description:a().optional()})).readonly(),defaultDevice:a()}),Ga=fe(()=>y({addonId:a(),addonName:a(),slot:Ua,inputClasses:h(a()).readonly(),outputClasses:h(a()).readonly(),enabled:m(),modelId:a(),children:h(Ga).readonly(),engine:B.optional(),group:a().optional(),settings:o(a(),r()).optional()})),Ka=fe(()=>y({addonId:a(),enabled:m(),modelId:a(),children:h(Ka).readonly(),settings:o(a(),r()).optional()})),qa=y({id:a(),name:a(),createdAt:a(),updatedAt:a(),engine:B,steps:h(Ka).readonly()}),Ja=y({id:a(),name:a(),formats:o(a(),y({downloaded:m(),sizeMB:i()}))}),Ya=u(),Xa=y({id:a(),name:a(),slot:Ua,inputClasses:h(a()).readonly(),outputClasses:h(a()).readonly(),childSlots:h(Ua).readonly(),models:h(Ja).readonly(),defaultModelId:a(),defaultModelIdByFormat:o(a(),a()).optional(),enabledByDefault:m().optional(),defaultConfidence:i(),group:a().optional(),configSchema:h(Ya).readonly().optional()}),Za=y({id:Ua,label:a(),priority:i(),parentSlot:Ua.nullable(),addons:h(Xa).readonly()}),Qa=y({availableEngines:h(Wa).readonly(),selectedEngine:B,slots:h(Za).readonly()}),$a=y({detections:h(Ma).readonly(),inferenceMs:i(),modelId:a()}),eo=y({runtimeId:v([`onnx`,`openvino`,`coreml`]).nullable(),device:a().nullable(),state:v([`idle`,`installing`,`verifying`,`ready`,`failed`]),progress:i().optional(),error:a().optional(),nextRetryAt:i().optional()}),V=fe(()=>y({addonId:a(),modelId:a(),enabled:m().default(!0),children:h(V).optional(),settings:o(a(),r()).optional()})),to=y({filename:a(),stepIds:h(a()).readonly().optional()}),no=y({base64:a(),filename:a()}),ro=y({filename:a(),sizeKb:i()}),io=y({base64:a()}),ao=y({id:a(),name:a(),description:a(),available:m(),rawLabels:h(a()).readonly().optional()}),oo=y({activeBackend:a(),availableBackends:h(ao).readonly(),sampleRate:i(),chunkDurationMs:i()}),so=y({filePath:a(),sizeMB:i(),durationMs:i()}),co=y({success:m(),error:a().optional(),frame:u().optional()}),lo=u(),uo=u(),fo=u(),po=u(),mo=u(),ho=u(),go={name:`pipeline-executor`,scope:`system`,mode:`singleton`,methods:{getAvailableEngines:P(_(),h(B)),getSelectedEngine:P(_(),B),getDefaultSteps:P(B,h(Ga)),reprobeEngine:P(_(),B,{kind:`mutation`,auth:`admin`}),getEngineProvisioning:P(y({nodeId:a()}),eo),getVideoPipelineSteps:P(_(),o(a(),y({modelId:a(),settings:o(a(),r()).readonly()}))),setVideoPipelineSteps:P(y({steps:o(a(),y({modelId:a(),settings:o(a(),r()).readonly()}))}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),getSchema:P(_(),Qa),getGlobalSteps:P(_(),h(Ga).readonly().nullable()),getGlobalPipelineConfig:P(_(),lo),getOrchestratorConfigSchema:P(_(),uo),listTemplates:P(_(),h(qa).readonly()),saveTemplate:P(y({name:a(),steps:h(Ka).readonly(),engine:B}),qa,{kind:`mutation`}),updateTemplate:P(y({id:a(),name:a().optional(),steps:h(Ka).readonly().optional()}),qa,{kind:`mutation`}),deleteTemplate:P(y({id:a()}),_(),{kind:`mutation`}),getCapabilities:P(_(),po),getAddonModels:P(y({addonId:a()}),mo),downloadModel:P(y({addonId:a(),modelId:a(),format:Ha}),so,{kind:`mutation`}),deleteModel:P(y({addonId:a(),modelId:a(),format:Ha}),y({success:c(!0)}),{kind:`mutation`}),detect:P(y({addonId:a(),frame:R,config:o(a(),r()).optional()}),$a),runPipeline:P(y({engine:B.optional(),steps:h(V).min(1),frame:R.optional(),imageBase64:a().optional(),image:p(Uint8Array).optional(),referenceImage:a().optional(),deviceId:i().optional(),sessionId:a().optional()}),ho,{kind:`mutation`}),runPipelineBatch:P(y({engine:B.optional(),steps:h(V).min(1),frames:h(R).min(1).max(255),deviceId:i().optional(),sessionId:a().optional()}),y({results:h(ho).readonly()}),{kind:`mutation`}),cacheFrameInPool:P(y({data:p(Uint8Array),width:i().int().positive(),height:i().int().positive(),format:v([`rgb`,`bgr`,`gray`])}),y({frameId:i(),width:i(),height:i()}),{kind:`mutation`}),inferCached:P(y({stepId:a(),frameId:i().int()}),o(a(),r()),{kind:`mutation`}),uncacheFrame:P(y({frameId:i().int()}),_(),{kind:`mutation`}),getEffectiveTuning:P(_(),y({batchMode:a(),windowMs:i(),maxBatchSize:i(),concurrency:i()})),listLoadedEngines:P(_(),h(y({engineKey:a(),engine:B,modelsLoaded:h(a()).readonly(),inUseByCameras:h(i()).readonly(),kind:v([`runtime`,`warm-override`]),poolPid:i().nullable(),idleMs:i().nullable(),idleTtlMs:i().nullable()})).readonly()),spinEngine:P(y({engine:B}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),killEngine:P(y({engine:B,force:m().optional()}),y({success:m(),reason:a().optional()}),{kind:`mutation`,auth:`admin`}),listReferenceImages:P(_(),h(to).readonly()),getReferenceImage:P(y({filename:a()}),no.nullable()),getReferenceAudioFiles:P(_(),h(ro).readonly()),getReferenceAudio:P(y({filename:a()}),io.nullable()),getAudioCapabilities:P(_(),oo),runAudioTest:P(y({addonId:a(),modelId:a(),filename:a().optional(),settings:o(a(),r()).optional()}),co,{kind:`mutation`}),getDetectionConfigSchema:P(_(),fo)}},_o=v([`polygon`,`tripwire`]),vo=y({x:i(),y:i()}),H=y({id:a(),name:a(),kind:_o.default(`polygon`),polygon:h(vo).readonly(),color:a().default(`#3b82f6`)}),yo={name:`zones`,scope:`device`,mode:`singleton`,deviceTypes:[j.Camera],methods:{listZones:P(y({deviceId:i()}),h(H).readonly()),addZone:P(y({deviceId:i(),zone:H}),_(),{kind:`mutation`,auth:`admin`}),removeZone:P(y({deviceId:i(),zoneId:a()}),_(),{kind:`mutation`,auth:`admin`}),updateZone:P(y({deviceId:i(),zone:H}),_(),{kind:`mutation`,auth:`admin`})},runtimeState:y({zones:h(H).readonly()})},U={min:0,max:6e4,default:3e4,step:500},W={min:1,max:30,default:4,step:1},G={min:1,max:30,default:10,step:1},K={min:0,max:300,default:30,step:5},q={min:1,max:10,default:4,step:1},bo=v([`onboard`,`analyzer`]),xo=h(bo),So=y({deviceId:i(),detected:m(),source:bo.default(`analyzer`),regions:h(Ia).readonly().optional()}),Co=y({deviceId:i(),detectionMode:v([`disabled`,`always-on`,`on-motion`]).default(`on-motion`),audioMode:v([`disabled`,`always-on`,`on-motion`]).default(`always-on`),motionCooldownMs:i().min(U.min).default(U.default),motionFps:i().min(W.min).max(W.max).default(W.default),detectionFps:i().min(G.min).max(G.max).default(G.default),motionStreamId:a(),detectionStreamId:a(),motionSources:xo.default([`analyzer`]),pipelineEnabled:m().default(!0),engine:B.optional(),steps:h(V).readonly().optional(),audio:y({engine:B,modelId:a(),enabled:m()}).nullable().optional(),zones:h(H).readonly().default([]),onboardMotionDrivesAnalyzer:m().default(!0),occupancyRecheckSec:i().min(K.min).max(K.max).default(K.default),occupancyRecheckFrames:i().min(q.min).max(q.max).default(q.default)}),wo=[{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:W.min,max:W.max,step:W.step,default:W.default,showValue:!0,unit:`fps`,showWhen:{field:`motionSources`,includes:`analyzer`}},{key:`detectionFps`,type:`slider`,label:`Detection FPS`,min:G.min,max:G.max,step:G.step,default:G.default,showValue:!0,unit:`fps`},{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:U.min,max:U.max,step:U.step,default:U.default,showValue:!0,unit:`s`,displayScale:1e3},{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:`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. 0 = disabled.`,min:K.min,max:K.max,step:K.step,default:K.default,showValue:!0,unit:`s`},{key:`occupancyRecheckFrames`,type:`slider`,label:`Occupancy re-check frames`,description:`Number of frames sampled per occupancy re-check burst.`,min:q.min,max:q.max,step:q.step,default:q.default,showValue:!0}],To=y({nodeId:a(),attachedCameras:i(),activeCameras:i(),avgInferenceFps:i(),avgInferenceTimeMs:i(),queueDepthTotal:i(),hardware:y({hasGpu:m(),inferenceBackend:a().optional(),cpuCores:i().optional()})}),Eo=y({nodeId:a(),activeCameras:i(),throttledCameras:i(),avgInferenceTimeMs:i(),queueDepth:i()}),Do={name:`pipeline-runner`,scope:`system`,mode:`singleton`,methods:{attachCamera:P(Co,y({success:c(!0)}),{kind:`mutation`}),detachCamera:P(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`}),reportMotion:P(So,y({success:c(!0)}),{kind:`mutation`}),getLocalLoad:P(_(),To),getLocalMetrics:P(_(),Eo),getCameraMetrics:P(y({deviceId:i()}),Ba.nullable()),getAllCameraMetrics:P(_(),h(Va).readonly()),getLocalCameras:P(_(),h(i()).readonly())}},Oo=y({detected:m(),lastDetectedAt:i().nullable(),autoClearAfterMs:i().nullable()}),ko=y({deviceId:i(),detected:m(),timestamp:i(),source:bo,regions:h(Ia).readonly().optional()}),Ao={name:`motion`,scope:`device`,mode:`singleton`,deviceTypes:[j.Camera,j.Sensor],methods:{isDetected:P(y({deviceId:i()}),m())},events:{onMotionChanged:{data:ko}},status:{schema:Oo,kind:`push`},runtimeState:Oo},jo=y({enabled:m(),lastChangedAt:i()}),Mo=jo.extend({lastFetchedAt:i()}),No={name:`motion-trigger`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Light,j.Siren,j.Switch],methods:{setMotionTrigger:P(y({deviceId:i().int().nonnegative(),enabled:m()}),_(),{kind:`mutation`,auth:`admin`})},events:{onMotionTriggerChanged:{data:y({deviceId:i(),enabled:m(),lastChangedAt:i()})}},status:{schema:jo,kind:`command-driven`},runtimeState:Mo},Po=y({x:i(),y:i()}),Fo=y({kind:c(`rect`),x:i(),y:i(),width:i(),height:i()}),Io=y({kind:c(`polygon`),points:h(Po)}),Lo=y({kind:c(`grid`),gridWidth:i(),gridHeight:i(),cells:h(m())}),Ro=y({kind:c(`line`),points:h(Po)}),zo=b(`kind`,[Fo,Io,Lo,Ro]),Bo=v([`rect`,`polygon`,`grid`,`line`]),Vo=y({min:i(),max:i()}),Ho=y({width:i(),height:i()}),Uo=y({id:i(),enabled:m(),shape:Lo}),Wo=y({enabled:m(),sensitivity:i(),regions:h(Uo),lastFetchedAt:i()}),Go=y({maxRegions:i(),supportedShapes:h(Bo),grid:Ho,sensitivity:y({min:i(),max:i(),step:i()})}),Ko=y({enabled:m().optional(),sensitivity:i().optional(),regions:h(Uo).optional()}),qo={name:`motion-zones`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/motion-zones-grid`,tab:`motion`,label:`Motion Zones`}},methods:{getOptions:P(y({deviceId:i()}),Go),setZone:P(y({deviceId:i(),patch:Ko}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Wo,kind:`poll`},runtimeState:Wo},Jo=v([`person`,`vehicle`,`animal`,`face`,`package`,`other`]),Yo=y({class:Jo,timestamp:i(),confidence:i().min(0).max(1).optional()}),Xo=y({lastByClass:l(Jo,Yo.nullable()),supportedClasses:h(Jo).readonly(),enabled:m()}),Zo=Xo.extend({lastFetchedAt:i()}),Qo={name:`native-object-detection`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],methods:{setEnabled:P(y({deviceId:i(),enabled:m()}),_(),{kind:`mutation`,auth:`admin`})},events:{onDetected:{data:y({deviceId:i(),detection:Yo})}},status:{schema:Xo,kind:`push`},runtimeState:Zo},$o=v([`min`,`low`,`normal`,`high`]),es=y({id:a().min(1),title:a().min(1),uri:re().optional(),destructive:m().optional()}),ts=y({image:m(),priority:m(),data:m(),actions:m(),recipients:m()}),ns=y({lastSentAt:i(),lastError:a().nullable(),queueDepth:i().int().nonnegative(),supports:ts}),rs=y({deviceId:i().int().nonnegative(),title:a().optional(),body:a().min(1),image:a().optional(),priority:$o.optional(),channel:a().optional(),recipients:h(a()).optional(),actions:h(es).optional(),data:o(a(),r()).optional()}),is=y({notificationId:a(),acceptedAt:i()}),as={name:`notifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Notifier],methods:{send:P(rs,is,{kind:`mutation`,auth:`admin`}),cancel:P(y({deviceId:i().int().nonnegative(),notificationId:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},events:{onSent:{data:y({deviceId:i(),notificationId:a(),success:m(),error:a().nullable(),acceptedAt:i()})}},status:{schema:ns,kind:`command-driven`},runtimeState:ns},os=y({value:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional(),lastFetchedAt:i()}),ss={name:`numeric-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:os,kind:`push`},runtimeState:os},cs=y({watts:i().optional(),kwhTotal:i().optional(),volts:i().optional(),amps:i().optional(),va:i().optional(),powerFactor:i().min(0).max(1).optional(),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),ls={name:`power-meter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:cs,kind:`push`},runtimeState:cs},us=y({latitude:i().min(-90).max(90),longitude:i().min(-180).max(180),accuracyMeters:i().nonnegative()}),ds=y({state:a(),location:a().nullable(),gps:us.nullable(),batteryPercent:i().min(0).max(100).nullable(),lastChangedAt:i()}),fs={name:`presence`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Presence],methods:{},status:{schema:ds,kind:`push`},runtimeState:ds},ps=y({hpa:i(),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),ms={name:`pressure-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:ps,kind:`push`},runtimeState:ps},hs=b(`kind`,[Fo,Io]),gs=y({id:i(),enabled:m(),shape:hs}),_s=y({enabled:m(),regions:h(gs),lastFetchedAt:i()}),vs=y({maxRegions:i(),supportedShapes:h(Bo),polygonVertices:Vo.optional()}),ys=y({enabled:m().optional(),regions:h(gs).optional()}),bs={name:`privacy-mask`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/privacy-mask-grid`,tab:`image`,label:`Privacy Mask`}},methods:{getOptions:P(y({deviceId:i()}),vs),setMask:P(y({deviceId:i(),patch:ys}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:_s,kind:`poll`},runtimeState:_s},xs=y({targetType:a().describe(`Vendor target string (people/vehicle/pet); empty = camera default`),stopDelaySeconds:i().int().min(0).max(300),disappearDelaySeconds:i().int().min(0).max(300)}),Ss=y({value:a(),label:a()}),Cs=y({enabled:m(),lastChangedAt:i(),currentSettings:xs.nullable(),supportedTargetTypes:h(Ss)}),ws=Cs.extend({lastFetchedAt:i()}),Ts={name:`ptz-autotrack`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-autotrack`,tab:`ptz`,topTab:!0,label:`Auto-Tracking`,order:5}},methods:{getStatus:P(y({deviceId:i()}),Cs),setEnabled:P(y({deviceId:i(),enabled:m()}),_(),{kind:`mutation`}),getSettings:P(y({deviceId:i()}),xs.nullable()),setSettings:P(y({deviceId:i(),settings:xs.partial()}),_(),{kind:`mutation`})},events:{onStatusChanged:{data:y({deviceId:i(),status:Cs})}},status:{schema:Cs,kind:`command-driven`},runtimeState:ws},Es=y({isRunning:m(),lastRunAt:i(),lastRunSuccess:m().nullable(),lastError:a().nullable(),lastChangedAt:i()}),Ds={name:`script-runner`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Script],methods:{run:P(y({deviceId:i().int().nonnegative(),variables:o(a(),r()).optional()}),_(),{kind:`mutation`,auth:`admin`}),stop:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Es,kind:`push`},runtimeState:Es},Os=y({detected:m(),lastChangedAt:i()}),ks={name:`smoke`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:Os,kind:`push`},runtimeState:Os},As=v([`main`,`sub`,`ext`]),js=y({width:i(),height:i(),codec:v([`h264`,`h265`]),framerate:i(),bitrate:i(),bitrateMode:v([`vbr`,`cbr`]).optional(),encoderProfile:v([`high`,`main`,`baseline`]).optional(),gop:i().optional(),audio:m().optional()}),Ms=y({main:js.optional(),sub:js.optional(),ext:js.optional(),lastFetchedAt:i()}),Ns=y({resolutions:h(y({width:i(),height:i()})),codecs:h(v([`h264`,`h265`])),framerates:h(i()),bitrates:h(i()),bitrateRange:s([i(),i()]).optional(),supportsBitrateMode:m(),supportsEncoderProfile:m(),supportsGop:m(),gop:y({min:i(),max:i(),step:i()}).optional()}),Ps=y({main:Ns.optional(),sub:Ns.optional(),ext:Ns.optional()}),Fs=y({width:i().optional(),height:i().optional(),codec:v([`h264`,`h265`]).optional(),framerate:i().optional(),bitrate:i().optional(),bitrateMode:v([`vbr`,`cbr`]).optional(),encoderProfile:v([`high`,`main`,`baseline`]).optional(),gop:i().optional(),audio:m().optional()}),Is={name:`stream-params`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`stream-params`,tab:`streaming`}},methods:{getOptions:P(y({deviceId:i()}),Ps),setProfile:P(y({deviceId:i(),profile:As,patch:Fs}),_(),{kind:`mutation`,auth:`admin`}),getConfigSchema:P(y({deviceId:i()}),r().nullable())},status:{schema:Ms,kind:`poll`},runtimeState:Ms},Ls=y({on:m(),lastChangedAt:i()}),Rs={name:`switch`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Switch,j.Siren,j.Light],methods:{setState:P(y({deviceId:i(),on:m()}),_(),{kind:`mutation`,auth:`admin`})},events:{onStateChanged:{data:y({deviceId:i(),on:m(),lastChangedAt:i()})}},status:{schema:Ls,kind:`command-driven`},runtimeState:Ls,settings:{bindings:[{kind:`scalar`,statusPath:`on`,method:`setState`,valueArg:`on`,field:{label:`On`,kind:`boolean`}}]}},zs=y({tampered:m(),lastChangedAt:i()}),Bs={name:`tamper`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:zs,kind:`push`},runtimeState:zs},Vs=y({celsius:i(),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),Hs={name:`temperature-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor,j.Thermostat],methods:{},status:{schema:Vs,kind:`push`},runtimeState:Vs},Us=y({currentVersion:a().nullable(),availableVersion:a().nullable(),updatable:m(),state:a().nullable(),inProgress:m()}),Ws={name:`update`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Update],methods:{installUpdate:P(_(),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Us,kind:`poll`},runtimeState:Us},Gs=v([`idle`,`cleaning`,`paused`,`returning`,`docked`,`drying`,`error`]),Ks=y({level:i().min(0).max(100).nullable(),status:v([`ok`,`low`,`full`]).nullable()}),qs=y({state:Gs,batteryLevel:i().min(0).max(100).nullable(),fanSpeed:a().nullable(),availableFanSpeeds:h(a()),cleanWater:Ks.nullable(),dirtyWater:Ks.nullable(),detergent:Ks.nullable(),dustBin:Ks.nullable(),progressPercent:i().min(0).max(100).nullable(),errorCode:i().nullable(),errorLabel:a().nullable(),lastChangedAt:i()}),Js={name:`vacuum-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Vacuum],methods:{start:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),pause:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),stop:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),returnToBase:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),locate:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),setFanSpeed:P(y({deviceId:i().int().nonnegative(),speed:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:qs,kind:`push`},runtimeState:qs},Ys=v([`open`,`opening`,`closing`,`closed`,`stopped`]),Xs=y({state:Ys,position:i().min(0).max(100).nullable(),lastChangedAt:i()}),Zs={name:`valve`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Valve],methods:{open:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),close:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),stop:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),setPosition:P(y({deviceId:i().int().nonnegative(),position:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Xs,kind:`push`},runtimeState:Xs},Qs=y({detected:m(),lastChangedAt:i()}),$s={name:`vibration`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:Qs,kind:`push`},runtimeState:Qs},ec=y({currentTemp:i().nullable(),targetTemp:i().nullable(),operationMode:a().nullable(),availableModes:h(a()),away:m().nullable(),minTemp:i().nullable(),maxTemp:i().nullable(),lastChangedAt:i()}),tc={name:`water-heater`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.WaterHeater],methods:{setTargetTemp:P(y({deviceId:i().int().nonnegative(),temp:i().finite()}),_(),{kind:`mutation`,auth:`admin`}),setOperationMode:P(y({deviceId:i().int().nonnegative(),mode:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),setAway:P(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:ec,kind:`push`},runtimeState:ec},nc=y({condition:a().nullable(),temperature:i().nullable(),temperatureUnit:a().nullable(),humidity:i().min(0).max(100).nullable(),pressure:i().nullable(),pressureUnit:a().nullable(),windSpeed:i().nullable(),windSpeedUnit:a().nullable(),windBearing:i().nullable(),lastFetchedAt:i()}),rc={name:`weather`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Weather],methods:{},status:{schema:nc,kind:`push`},runtimeState:nc},ic=y({totalObjects:i().int().nonnegative(),byClass:o(a(),i().int().nonnegative())}),ac=ic.extend({zoneId:a(),zoneName:a(),trackIds:h(a()).readonly()}),oc=y({ts:i().int(),frameWidth:i().int().nonnegative(),frameHeight:i().int().nonnegative(),zones:h(ac).readonly(),frame:ic,unzoned:ic}),sc=v([`minute`,`5min`,`hour`]),cc=y({from:i().int(),to:i().int(),resolution:sc}),lc=y({ts:i().int(),count:i().int().nonnegative()}),uc={name:`zone-analytics`,scope:`device`,mode:`singleton`,deviceTypes:[j.Camera],methods:{getCurrentSnapshot:P(y({deviceId:i()}),oc.nullable()),getZoneHistory:P(y({deviceId:i(),zoneId:a(),className:a().optional()}).extend(cc.shape),h(lc).readonly()),getCameraHistory:P(y({deviceId:i(),className:a().optional()}).extend(cc.shape),h(lc).readonly()),getUnzonedHistory:P(y({deviceId:i(),className:a().optional()}).extend(cc.shape),h(lc).readonly())},runtimeState:oc},dc=v([`include`,`exclude`]),J=y({id:a(),name:a().optional(),zoneIds:h(a()).min(1).readonly(),mode:dc,classFilter:h(a()).readonly().optional(),overlapThreshold:i().min(0).max(1).optional(),bboxInclusionPct:i().min(0).max(100).optional(),preferMask:m().optional(),enabled:m().default(!0)}),fc=h(J).readonly(),pc=v([`motion`,`detection`]),mc={name:`zone-rules`,scope:`device`,mode:`singleton`,deviceTypes:[j.Camera],methods:{listRules:P(y({deviceId:i(),stage:pc}),h(J).readonly()),setRules:P(y({deviceId:i(),stage:pc,rules:h(J).readonly()}),_(),{kind:`mutation`,auth:`admin`})},runtimeState:y({motion:h(J).readonly(),detection:h(J).readonly()})},hc={airQualitySensor:wr,alarmPanel:Fr,ambientLightSensor:Lr,audioMetrics:Hr,automationControl:Wr,battery:Kr,binary:Jr,brightness:Xr,cameraStreams:vi,carbonMonoxide:bi,climateControl:Ci,color:Oi,connectivity:Ai,consumables:Ni,contact:Fi,control:zi,cover:Hi,deviceDiscovery:Xi,deviceStatus:br,doorbell:$i,enumSensor:na,eventEmitter:aa,fanControl:ca,featureProbe:Sr,flood:ua,gas:fa,humidifier:ma,humiditySensor:ga,image:va,lawnMowerControl:Sa,lockControl:Ta,mediaPlayer:Aa,motion:Ao,motionTrigger:No,motionZones:qo,nativeObjectDetection:Qo,notifier:as,numericSensor:ss,powerMeter:ls,presence:fs,pressureSensor:ms,privacyMask:bs,ptzAutotrack:Ts,scriptRunner:Ds,smoke:ks,streamParams:Is,switch:Rs,tamper:Bs,temperatureSensor:Hs,update:Ws,vacuumControl:Js,valve:Zs,vibration:$s,waterHeater:tc,weather:rc,zoneAnalytics:uc,zoneRules:mc,zones:yo},gc=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=hc[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=mr.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=hr.fromInitial(o,a),e.bindRuntimeState?.(this.runtimeState),e.registerNativeCap?.(br,{});let s={online:!0,lastChangedAt:Date.now()};this.runtimeState.setCapState(`device-status`,s),e.registerNativeCap?.(Sr,{}),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=qi(this.ctx.deviceMeta.metadata)??Ui({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=Wi(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:{[Ki]:t}})}catch{}this.ctx.eventBus.emit(He(`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}},_c=y({connected:m(),deviceCount:i(),error:a().optional()}),vc=y({externalId:a(),name:a(),type:a(),metadata:o(a(),r()).optional()}),yc=y({stableId:a(),type:v(j),suggestedName:a(),prefilledConfig:o(a(),r()),sourceInfo:I.optional()}),bc=y({id:i(),stableId:a(),addonId:a(),type:a(),name:a(),parentDeviceId:i().nullable(),online:m(),features:h(a()),config:o(a(),r()),sourceInfo:I.optional()}),xc=y({status:v([`ok`,`error`]),labels:h(a()).optional(),error:a().optional()}),Sc=r(),Cc={name:`device-provider`,scope:`system`,mode:`collection`,methods:{start:P(_(),_(),{kind:`mutation`}),stop:P(_(),_(),{kind:`mutation`}),getStatus:P(_(),_c),getDevices:P(_(),h(y({id:a(),name:a(),type:a()}))),supportsDiscovery:P(y({}),m()),discoverDevices:P(y({}),h(yc),{kind:`mutation`,auth:`admin`}),adoptDiscoveredDevice:P(y({candidate:yc}),bc,{kind:`mutation`,auth:`admin`}),supportsManualCreation:P(y({}),m()),getChildCreationSchema:P(y({type:v(j)}),Sc),createDevice:P(y({type:v(j),config:o(a(),r())}),bc,{kind:`mutation`,auth:`admin`}),testCreationField:P(y({type:v(j),key:a(),value:r(),formValues:o(a(),r()).optional()}),xc,{kind:`mutation`,auth:`admin`})}};function wc(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 Tc=class extends Ge{async onInitialize(){return this.ctx.logger.info(`${this.providerName} Provider initialized`),[{capability:Cc,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(){return[]}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;for(let n of e){if(n.parentDeviceId!==null)continue;let e=this.deviceClasses[n.type];if(!e){this.ctx.logger.warn(`No device class registered for restored type — skipping`,{tags:{stableId:n.stableId},meta:{type:n.type}});continue}try{await this.ctx.kernel.devices.create(n.stableId,e,{}),t.add(n.id)}catch(e){this.ctx.logger.warn(`Failed to restore device`,{tags:{stableId:n.stableId},meta:{type:n.type,error:e instanceof Error?e.message:String(e)}})}}let n=e.filter(e=>e.parentDeviceId!==null);for(let e of n){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 wc(e,this.addonId)}};function Ec(e){return e.def}function Dc(e){return e}function Oc(e,t=`Configuration`,n=`main`){return{sections:[{id:n,title:t,fields:e.map(e=>kc(e.key,e.schema,e.description))}]}}function kc(e,t,n){let r=Pc(t),i=Fc(t),a={key:e,label:n??Ic(e),description:n,default:i};return r instanceof ie?Ac(e,a):r instanceof se?jc(r,a):r instanceof oe?{...a,type:`boolean`}:r instanceof ne?Nc(r,a):r instanceof ue||r instanceof le?{...a,type:`textarea`,rows:6,isJson:!0}:{...a,type:`text`}}function Ac(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 jc(e,t){let n=Dc(e),r=n.minValue,i=n.maxValue,a=r!=null&&isFinite(r)?r:void 0,o=i!=null&&isFinite(i)?i:void 0,s=Mc(e);return{...t,type:`number`,...a===void 0?{}:{min:a},...o===void 0?{}:{max:o},...s===void 0?{}:{step:s}}}function Mc(e){let t=Ec(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 Nc(e,t){let n=e.options.map(e=>String(e));return{...t,type:`select`,options:n.map(e=>({label:Ic(e),value:e}))}}function Pc(e){return e instanceof ce||e instanceof ee||e instanceof d?Pc(Ec(e).innerType):e}function Fc(e){if(e instanceof ce)return Ec(e).defaultValue}function Ic(e){return e.replace(/([A-Z])/g,` $1`).replace(/[_-]/g,` `).replace(/^\w/,e=>e.toUpperCase()).trim()}function Lc(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Rc(e,t){let n=t.split(`.`),r=e;for(let e of n){if(!Lc(r))return;r=r[e]}return r}function zc(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=Lc(o)?o:{};return{...e,[i]:zc(s,a,n)}}function Bc(e,t){if(!t||t.kind===`identity`)return e;if(t.kind===`enum-map`){let n=String(e);return Object.prototype.hasOwnProperty.call(t.mapping,n)?t.mapping[n]:t.fallback??null}if(t.kind===`linear`){if(typeof e!=`number`||Number.isNaN(e))return null;let n=e*t.scale+t.offset;if(t.clamp){let e=t.clamp[0],r=t.clamp[1];n=Math.min(r,Math.max(e,n))}return n}return e}function Vc(e){let t=e;for(;t instanceof d||t instanceof ee||t instanceof ce;)t=t.unwrap();return t}function Hc(e){let t=Vc(e);return t instanceof ne?{kind:`enum`,enumValues:t.options}:t instanceof se?{kind:`number`}:t instanceof ie?{kind:`string`}:t instanceof oe?{kind:`boolean`}:null}function Uc(e,t=``){let n=Vc(e);if(!(n instanceof le))return[];let r=[],i=n.shape;for(let[e,n]of Object.entries(i)){let i=t?`${t}.${e}`:e,a=Vc(n);if(a instanceof le){r.push(...Uc(a,i));continue}let o=Hc(n);o&&r.push({path:i,kind:o.kind,...o.enumValues?{enumValues:o.enumValues}:{}})}return r}var Wc=`device.state-changed`;function Gc(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:Wc},{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 Kc(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 Y(e,t,n){let r=qc(e)?e:Gc(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 qc(e){return typeof e.read==`function`&&typeof e.watch==`function`}function Jc(e,t,n){let r=e,i=n?.stateSource??Gc(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:Y(i,t.deviceId,`air-quality-sensor`),alarmPanel:Y(i,t.deviceId,`alarm-panel`),ambientLightSensor:Y(i,t.deviceId,`ambient-light-sensor`),audioMetrics:Y(i,t.deviceId,`audio-metrics`),automationControl:Y(i,t.deviceId,`automation-control`),battery:Y(i,t.deviceId,`battery`),binary:Y(i,t.deviceId,`binary`),brightness:Y(i,t.deviceId,`brightness`),cameraStreams:Y(i,t.deviceId,`camera-streams`),carbonMonoxide:Y(i,t.deviceId,`carbon-monoxide`),climateControl:Y(i,t.deviceId,`climate-control`),color:Y(i,t.deviceId,`color`),connectivity:Y(i,t.deviceId,`connectivity`),consumables:Y(i,t.deviceId,`consumables`),contact:Y(i,t.deviceId,`contact`),control:Y(i,t.deviceId,`control`),cover:Y(i,t.deviceId,`cover`),deviceDiscovery:Y(i,t.deviceId,`device-discovery`),deviceStatus:Y(i,t.deviceId,`device-status`),doorbell:Y(i,t.deviceId,`doorbell`),enumSensor:Y(i,t.deviceId,`enum-sensor`),eventEmitter:Y(i,t.deviceId,`event-emitter`),fanControl:Y(i,t.deviceId,`fan-control`),featureProbe:Y(i,t.deviceId,`feature-probe`),flood:Y(i,t.deviceId,`flood`),gas:Y(i,t.deviceId,`gas`),humidifier:Y(i,t.deviceId,`humidifier`),humiditySensor:Y(i,t.deviceId,`humidity-sensor`),image:Y(i,t.deviceId,`image`),lawnMowerControl:Y(i,t.deviceId,`lawn-mower-control`),lockControl:Y(i,t.deviceId,`lock-control`),mediaPlayer:Y(i,t.deviceId,`media-player`),motion:Y(i,t.deviceId,`motion`),motionTrigger:Y(i,t.deviceId,`motion-trigger`),motionZones:Y(i,t.deviceId,`motion-zones`),nativeObjectDetection:Y(i,t.deviceId,`native-object-detection`),notifier:Y(i,t.deviceId,`notifier`),numericSensor:Y(i,t.deviceId,`numeric-sensor`),powerMeter:Y(i,t.deviceId,`power-meter`),presence:Y(i,t.deviceId,`presence`),pressureSensor:Y(i,t.deviceId,`pressure-sensor`),privacyMask:Y(i,t.deviceId,`privacy-mask`),ptzAutotrack:Y(i,t.deviceId,`ptz-autotrack`),scriptRunner:Y(i,t.deviceId,`script-runner`),smoke:Y(i,t.deviceId,`smoke`),streamParams:Y(i,t.deviceId,`stream-params`),switch:Y(i,t.deviceId,`switch`),tamper:Y(i,t.deviceId,`tamper`),temperatureSensor:Y(i,t.deviceId,`temperature-sensor`),update:Y(i,t.deviceId,`update`),vacuumControl:Y(i,t.deviceId,`vacuum-control`),valve:Y(i,t.deviceId,`valve`),vibration:Y(i,t.deviceId,`vibration`),waterHeater:Y(i,t.deviceId,`water-heater`),weather:Y(i,t.deviceId,`weather`),zoneAnalytics:Y(i,t.deviceId,`zone-analytics`),zoneRules:Y(i,t.deviceId,`zone-rules`),zones:Y(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)},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)},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)},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)},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)},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),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),getEventDensity:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventDensity`,`query`,e),pruneEventsBefore:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`pruneEventsBefore`,`mutation`,e),getEventMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventMedia`,`query`,e),getTrackMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getTrackMedia`,`query`,e),searchObjectEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`searchObjectEvents`,`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),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)},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),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),setDeviceLinks:e=>c(`deviceManager`,`setDeviceLinks`,`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),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)},deviceState:{getSnapshot:e=>c(`deviceState`,`getSnapshot`,`query`,e),getCapSlice:e=>c(`deviceState`,`getCapSlice`,`query`,e),setCapSlice:e=>c(`deviceState`,`setCapSlice`,`mutation`,e)},faceGallery:{getFaceByTrack:e=>c(`faceGallery`,`getFaceByTrack`,`query`,e)},networkQuality:{getDeviceStats:e=>c(`networkQuality`,`getDeviceStats`,`query`,e),reportClientStats:e=>c(`networkQuality`,`reportClientStats`,`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),getPipelineAssignment:e=>c(`pipelineOrchestrator`,`getPipelineAssignment`,`query`,e),getCameraMetrics:e=>c(`pipelineOrchestrator`,`getCameraMetrics`,`query`,e),assignDecoder:e=>c(`pipelineOrchestrator`,`assignDecoder`,`mutation`,e),unassignDecoder:e=>c(`pipelineOrchestrator`,`unassignDecoder`,`mutation`,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),getDecoderAssignment:e=>c(`pipelineOrchestrator`,`getDecoderAssignment`,`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),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)},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),setDeviceConfig:e=>c(`recording`,`setDeviceConfig`,`mutation`,e),rescanStorage:e=>c(`recording`,`rescanStorage`,`mutation`,e),pruneFootage:e=>c(`recording`,`pruneFootage`,`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)},snapshotProvider:{supportsDevice:e=>c(`snapshotProvider`,`supportsDevice`,`query`,e),getSnapshot:e=>c(`snapshotProvider`,`getSnapshot`,`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),restartProfile:e=>c(`streamBroker`,`restartProfile`,`mutation`,e),getDeviceSettingsContribution:e=>c(`streamBroker`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`streamBroker`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`streamBroker`,`applyDeviceSettingsPatch`,`mutation`,e)}}}function Yc(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=>Xc(t,e,n,l)),f=s.some(t=>Xc(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 Xc(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&&Zc(t,e.polygon))return!0}return!1}function Zc(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 Qc(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),updateFrameworkPackage:e=>n(`addons`,`updateFrameworkPackage`,`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)},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)},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),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),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),adoptionResync:e=>n(`deviceManager`,`adoptionResync`,`mutation`,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),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),listRecentFaces:e=>n(`faceGallery`,`listRecentFaces`,`query`,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)},localNetwork:{list:e=>n(`localNetwork`,`list`,`query`,e),getPreferred:e=>n(`localNetwork`,`getPreferred`,`query`,e),getConnectionEndpoints:e=>n(`localNetwork`,`getConnectionEndpoints`,`query`,e),getAllowedAddresses:e=>n(`localNetwork`,`getAllowedAddresses`,`query`,e),setAllowedAddresses:e=>n(`localNetwork`,`setAllowedAddresses`,`mutation`,e),resetAllowlistToBestMatch:e=>n(`localNetwork`,`resetAllowlistToBestMatch`,`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:{send:e=>n(`notificationOutput`,`send`,`mutation`,e),sendTest:e=>n(`notificationOutput`,`sendTest`,`mutation`,e)},pipelineExecutor:{getAvailableEngines:e=>n(`pipelineExecutor`,`getAvailableEngines`,`query`,e),getSelectedEngine:e=>n(`pipelineExecutor`,`getSelectedEngine`,`query`,e),getDefaultSteps:e=>n(`pipelineExecutor`,`getDefaultSteps`,`query`,e),reprobeEngine:e=>n(`pipelineExecutor`,`reprobeEngine`,`mutation`,e),getEngineProvisioning:e=>n(`pipelineExecutor`,`getEngineProvisioning`,`query`,e),getVideoPipelineSteps:e=>n(`pipelineExecutor`,`getVideoPipelineSteps`,`query`,e),setVideoPipelineSteps:e=>n(`pipelineExecutor`,`setVideoPipelineSteps`,`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),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),detect:e=>n(`pipelineExecutor`,`detect`,`query`,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:{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),getDecoderAssignments:e=>n(`pipelineOrchestrator`,`getDecoderAssignments`,`query`,e),getAudioNodeLoad:e=>n(`pipelineOrchestrator`,`getAudioNodeLoad`,`query`,e),getAgentSettings:e=>n(`pipelineOrchestrator`,`getAgentSettings`,`query`,e),listAgentSettings:e=>n(`pipelineOrchestrator`,`listAgentSettings`,`query`,e),setAgentAddonDefaults:e=>n(`pipelineOrchestrator`,`setAgentAddonDefaults`,`mutation`,e),removeAgentSettings:e=>n(`pipelineOrchestrator`,`removeAgentSettings`,`mutation`,e),setAgentMaxCameras:e=>n(`pipelineOrchestrator`,`setAgentMaxCameras`,`mutation`,e),getCameraStatuses:e=>n(`pipelineOrchestrator`,`getCameraStatuses`,`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)},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)},recording:{getStorageUsage:e=>n(`recording`,`getStorageUsage`,`query`,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),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)},streamBroker:{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),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)},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 $c=`device.state-changed`,el=`capability.binding-changed`,tl=`device.registered`,nl=`device.unregistered`,rl=`device.updated`,il=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=Kc(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?Jc(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&&!al(n,e.id)||e.stableId!==void 0&&(!i||!al(i.stableId,e.stableId))||e.addonId!==void 0&&(!i||!al(i.addonId,e.addonId))||e.type!==void 0&&(!i||!al(i.type,e.type)))continue;if(e.caps!==void 0){let t=ol(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=ol(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||!sl(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||!ol(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:$c},{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:el},{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:tl},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.refreshDeviceMetadata(t.deviceId,`added`)}})),this.bridges.push(e.subscribe({category:nl},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.applyDeviceRemoval(t.deviceId)}})),this.bridges.push(e.subscribe({category:rl},{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.getAllBindings.query({})).find(t=>t.deviceId===e);t?this.bindings.set(e,t):this.applyDeviceRemoval(e)}catch{}}async refreshDeviceMetadata(e,t){try{let n=(await this.api.deviceManager.listAll.query({})).find(t=>t.id===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 al(e,t){return Array.isArray(t)?t.includes(e):e===t}function ol(e){return Array.isArray(e)?e:[e]}function sl(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}var cl=y({id:a(),label:a(),icon:a(),path:a(),remoteName:a(),bundle:a()}),ll=y({addonId:a(),page:cl,bundleUrl:a()}),ul={name:`addon-pages`,scope:`system`,mode:`singleton`,methods:{listPages:P(_(),h(ll).readonly())}},dl=y({id:a(),label:a(),icon:a(),path:a(),remoteName:a(),bundle:a()}),fl={name:`addon-pages-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listPages:P(_(),h(dl).readonly())}},pl=y({method:v([`GET`,`POST`,`PUT`,`DELETE`,`PATCH`]),path:a(),access:v([`public`,`authenticated`,`admin`]).optional(),description:a().optional()}),ml=y({method:a(),path:a(),params:o(a(),a()),query:o(a(),a()),body:r(),headers:o(a(),a()),user:y({id:a(),username:a(),isAdmin:m()}).optional(),scopedToken:r().optional()}),hl=y({status:i().int(),headers:o(a(),a()),redirectUrl:a().nullable(),body:r().optional(),contentType:a().optional()}),gl={name:`addon-routes`,scope:`system`,mode:`collection`,internal:!0,methods:{getRoutes:P(_(),h(pl)),invoke:P(ml,hl,{kind:`mutation`})},mount:{kind:`skip`}},_l=y({id:a(),label:a(),icon:a(),order:i().optional()}),vl=y({id:a(),title:a(),description:a().optional(),style:v([`card`,`accordion`]).optional(),defaultCollapsed:m().optional(),columns:g([c(1),c(2),c(3),c(4)]).optional(),tab:a().optional(),location:v([`settings`,`top-tab`]).optional(),order:i().optional(),fields:h(ae())}),X=y({tabs:h(_l).optional(),sections:h(vl)}),yl=o(a(),r()),bl=y({success:c(!0)}),xl={name:`addon-settings`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{getGlobalSettings:P(y({addonId:a(),nodeId:a().optional(),overlay:o(a(),r()).optional(),cap:a().optional()}),X.nullable()),updateGlobalSettings:P(y({addonId:a(),nodeId:a().optional(),patch:yl}),bl,{kind:`mutation`,auth:`admin`}),getDeviceSettings:P(y({addonId:a(),deviceId:i(),nodeId:a().optional()}),X.nullable()),updateDeviceSettings:P(y({addonId:a(),deviceId:i(),nodeId:a().optional(),patch:yl}),bl,{kind:`mutation`,auth:`admin`})}},Sl=v([`device-tab`,`dashboard`,`integration-detail`]),Cl=v([`xs`,`sm`,`md`,`lg`,`xl`]),wl=y({remoteName:a(),exposedModule:a(),componentKey:a().optional()}),Tl=y({tab:a(),subTab:a().optional(),label:a(),order:i().optional(),kind:c(`remote`),remote:wl,stableId:a(),description:a().optional(),icon:a().optional(),bundle:a(),hosts:h(Sl).readonly(),requires:y({deviceContext:m().default(!1),integrationContext:m().default(!1)}),defaultSize:Cl.default(`md`),allowedSizes:h(Cl).readonly().default([`sm`,`md`,`lg`]),defaultColumns:i().int().min(1).max(12).default(6),defaultRows:i().int().min(1).max(12).default(1)}),El={name:`addon-widgets-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listWidgets:P(_(),h(Tl).readonly())}},Dl=Tl.extend({addonId:a(),bundleUrl:a()}),Ol={name:`addon-widgets`,scope:`system`,mode:`singleton`,methods:{listWidgets:P(_(),h(Dl).readonly())}},kl=y({staticDir:a()}),Al=y({version:a()}),jl={name:`admin-ui`,scope:`system`,mode:`singleton`,internal:!0,methods:{getStaticDir:P(_(),kl),getVersion:P(_(),Al)}},Ml=y({deviceIds:h(i()).readonly().optional(),classNames:h(a()).readonly().optional(),zoneIds:h(a()).readonly().optional(),minConfidence:i().optional(),source:v([`pipeline`,`onboard`,`any`]).optional(),schedule:y({days:h(i()).readonly(),startHour:i(),endHour:i()}).optional(),cooldownSeconds:i().optional(),minDwellSeconds:i().optional(),eventTypeTokens:h(a()).readonly().optional(),clipDescription:y({text:a().min(1),minSimilarity:i().min(0).max(1)}).optional()}),Nl=y({title:a(),body:a(),imageMode:v([`crop`,`annotated`,`full`,`none`])}),Pl=y({id:a(),name:a(),enabled:m(),eventTypes:h(a()).readonly(),conditions:Ml,outputs:h(a()).readonly(),template:Nl.optional(),priority:v([`low`,`normal`,`high`,`critical`])}),Fl=y({ruleId:a(),eventId:a(),timestamp:i(),wouldFire:m(),reason:a().optional()}),Il=y({id:a(),ruleId:a(),ruleName:a(),eventId:a(),timestamp:i(),outputs:h(a()).readonly(),success:m(),error:a().optional(),deviceId:i().optional()}),Ll=y({ruleId:a().optional(),deviceId:i().optional(),from:i().optional(),to:i().optional(),limit:i().optional()}),Rl={name:`advanced-notifier`,scope:`system`,mode:`singleton`,internal:!0,methods:{getRules:P(_(),y({rules:h(Pl).readonly()})),upsertRule:P(y({rule:Pl}),y({success:c(!0)}),{kind:`mutation`}),deleteRule:P(y({ruleId:a()}),y({success:c(!0)}),{kind:`mutation`}),testRule:P(y({ruleId:a(),lookbackMinutes:i()}),y({results:h(Fl).readonly()}),{kind:`mutation`}),getHistory:P(y({filter:Ll.optional()}),y({entries:h(Il).readonly()}))}},zl=v([`info`,`success`,`warning`,`error`]),Bl=v([`active`,`in-progress`,`completed`,`failed`,`dismissed`]),Vl=y({type:a(),id:a()}),Hl=y({id:a(),category:a(),severity:zl,title:a(),message:a(),status:Bl,progress:i().optional(),read:m(),createdAt:i(),updatedAt:i(),source:Vl.optional(),metadata:o(a(),r()).optional()}),Ul={name:`alerts`,scope:`system`,mode:`singleton`,methods:{emit:P(Hl,_(),{kind:`mutation`}),update:P(y({alertId:a(),patch:Hl.partial()}),_(),{kind:`mutation`}),list:P(y({unreadOnly:m().optional(),limit:i().optional()}).optional(),h(Hl).readonly()),getUnreadCount:P(_(),i()),markRead:P(y({alertId:a()}),_(),{kind:`mutation`}),markAllRead:P(_(),_(),{kind:`mutation`}),dismiss:P(y({alertId:a()}),_(),{kind:`mutation`})}},Wl={name:`audio-analysis`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[j.Camera],exposesDeviceSettings:!0,methods:{resolveDeviceSettings:P(y({deviceId:i()}),u())},events:{onAudioLevel:F(y({deviceId:i(),rms:i(),dbfs:i()}))}},Gl=y({level:Pa,classification:y({labels:h(Fa).readonly(),inferenceMs:i()}).optional(),timestamp:i()}),Kl=y({minConfidence:i().min(0).max(1).default(.3),allowedClasses:h(a()).default([])}),ql=y({labels:h(Fa).readonly(),rawLabels:h(Fa).readonly().optional(),inferenceMs:i()}),Jl=[{value:`auto`,label:`Auto (platform default)`},{value:`apple-soundanalysis`,label:`Apple SoundAnalysis (macOS 12+)`},{value:`yamnet-onnx`,label:`YAMNet ONNX (cross-platform)`}],Yl={audioBackend:`auto`,probedBestAudioBackend:``,selectedAudioModel:``},Xl={name:`audio-analyzer`,scope:`system`,mode:`singleton`,methods:{analyseChunk:P(y({chunk:Na,settings:Kl}),Gl.nullable(),{kind:`mutation`}),classify:P(Na,ql,{timeoutMs:3e4}),isReady:P(_(),m()),dispose:P(_(),_(),{kind:`mutation`}),reprobeAudioEngine:P(_(),y({backend:a()}),{kind:`mutation`,auth:`admin`})}},Zl=v([`f32le`,`s16le`]),Ql=y({codec:a(),canDecode:m(),canEncode:m(),label:a().optional()}),$l=y({codec:a(),sourceSampleRate:i().int().positive(),sourceChannels:i().int().positive(),extraData:p(Uint8Array).optional(),targetSampleRate:i().int().positive(),targetChannels:i().int().positive(),targetFormat:Zl.optional(),idleMs:i().int().positive().optional(),tag:a().optional()}),eu=y({codec:a(),sourceSampleRate:i().int().positive(),sourceChannels:i().int().positive(),sourceFormat:Zl.optional(),targetSampleRate:i().int().positive(),targetChannels:i().int().positive(),bitrateKbps:i().int().positive().optional(),idleMs:i().int().positive().optional(),tag:a().optional()}),tu=y({data:p(Uint8Array),sampleRate:i().int().positive(),channels:i().int().positive(),format:Zl,pts:i()}),nu=y({data:p(Uint8Array),codec:a(),pts:i(),frameComplete:m()}),ru=y({sessionId:a(),kind:v([`decode`,`encode`]),codec:a(),sourceSampleRate:i(),sourceChannels:i(),targetSampleRate:i(),targetChannels:i(),format:Zl,tag:a().optional(),createdAtMs:i(),lastActivityMs:i(),framesIn:i(),framesOut:i()}),iu={name:`audio-codec`,scope:`system`,mode:`singleton`,methods:{listSupportedCodecs:P(_(),h(Ql).readonly()),canHandle:P(y({codec:a(),kind:v([`decode`,`encode`])}),m()),createDecodeSession:P($l,y({sessionId:a(),nodeId:a()}),{kind:`mutation`}),createEncodeSession:P(eu,y({sessionId:a(),nodeId:a()}),{kind:`mutation`}),closeSession:P(y({sessionId:a(),nodeId:a().optional()}),_(),{kind:`mutation`}),pushEncodedFrame:P(y({sessionId:a(),nodeId:a().optional(),data:p(Uint8Array),pts:i().optional()}),_(),{kind:`mutation`}),pullPcm:P(y({sessionId:a(),nodeId:a().optional(),maxCount:i().int().positive().default(8)}),h(tu)),pushPcm:P(y({sessionId:a(),nodeId:a().optional(),data:p(Uint8Array),pts:i().optional()}),_(),{kind:`mutation`}),pullEncoded:P(y({sessionId:a(),nodeId:a().optional(),maxCount:i().int().positive().default(8)}),h(nu)),flushEncode:P(y({sessionId:a(),nodeId:a().optional()}),h(nu),{kind:`mutation`}),listActiveSessions:P(_(),h(ru).readonly())}},au=y({userId:a(),username:a(),email:a().optional(),displayName:a().optional(),isAdmin:m().default(!1)}),ou={name:`auth-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{validateCredentials:P(y({username:a(),password:a()}),au.nullable(),{kind:`mutation`}),getLoginUrl:P(y({state:a()}),a()),handleCallback:P(o(a(),a()),au,{kind:`mutation`}),validateToken:P(y({token:a()}),au.nullable())},mount:{kind:`skip`}},su=y({subId:a(),displayName:a(),description:a().optional(),kind:a(),triggerSupported:m(),restoreSupported:m()}).extend({id:a(),addonId:a(),enabled:m(),retentionCount:i(),label:a().optional(),lastSuccessAt:i().optional(),lastSuccessSizeBytes:i().optional(),cron:a().optional(),nextRunAt:i().optional(),lastRunAt:i().optional()}),cu=y({id:a(),filename:a(),createdAt:i(),sizeBytes:i(),label:a().optional(),locations:h(a()).readonly()}),lu=y({id:a(),destinationId:a().optional(),label:a().optional(),createdAt:i(),sizeBytes:i(),locations:h(a()).optional()}),uu=y({path:a(),kind:v([`file`,`dir`,`symlink`]),sizeBytes:i(),mtime:i()}),du=y({archiveVersion:c(1),createdAt:i(),dataDir:a(),locations:h(a()),entries:h(uu),totalBytes:i(),totalFiles:i()}),fu=y({name:a(),sizeBytes:i(),fileCount:i(),present:m()}),pu={name:`backup`,scope:`system`,mode:`singleton`,methods:{listDestinations:P(_(),h(su).readonly(),{auth:`admin`}),trigger:P(y({destinations:h(a()).optional(),locations:h(a()).optional(),label:a().optional()}).optional(),h(lu).readonly(),{kind:`mutation`,auth:`admin`}),list:P(_(),h(lu).readonly(),{auth:`admin`}),listLocations:P(_(),h(fu).readonly(),{auth:`admin`}),getEntries:P(y({destinationId:a(),backupId:a()}),du.nullable(),{auth:`admin`}),restore:P(y({destinationId:a(),backupId:a(),locations:h(a()).optional()}),_(),{kind:`mutation`,auth:`admin`}),delete:P(y({destinationId:a(),backupId:a()}),_(),{kind:`mutation`,auth:`admin`}),listArchives:P(y({destinationId:a()}),h(cu).readonly(),{auth:`admin`}),upsertDestinationPolicy:P(y({locationId:a(),enabled:m(),retentionCount:i().int().min(1).max(1e3),label:a().optional(),cron:a().optional()}),_(),{kind:`mutation`,auth:`admin`}),previewSchedule:P(y({cron:a(),count:i().int().min(1).max(20).optional()}),y({ok:m(),error:a().optional(),nextRuns:h(i()).readonly()}))}},mu=v([`connected`,`disconnected`,`connecting`,`auth-failed`,`unreachable`,`error`]),hu=y({id:a(),addonId:a(),name:a(),kind:a(),status:mu,info:o(a(),r()),lastCheckedAt:i().nullable(),error:a().nullable()}),gu=y({brokerCount:i().int().nonnegative(),connectedCount:i().int().nonnegative()}),_u=y({addonId:a(),kinds:h(y({kind:a(),label:a()}))}),vu=y({kind:a().optional()}),yu=y({id:a()}),bu=y({kind:a().min(1),name:a().min(1),settings:o(a(),r())}),xu=y({id:a()}),Su=y({id:a()}),Cu=b(`ok`,[y({ok:c(!0),latencyMs:i().nonnegative()}),y({ok:c(!1),error:a()})]),wu=o(a(),r()),Tu=y({kind:a()}),Eu=y({kind:a(),settings:wu}),Du=b(`ok`,[y({ok:c(!0),latencyMs:i().nonnegative().optional()}).strict(),y({ok:c(!1),error:a()})]),Ou=r().nullable(),ku=y({brokerId:a(),target:o(a(),r()),payload:r().optional()}),Au=y({brokerId:a(),filter:o(a(),r())}),ju=y({subscriptionId:a()}),Mu=y({brokerId:a(),subscriptionId:a()}),Nu=y({brokerId:a(),key:a()}),Pu={name:`broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:gu,kind:`poll`},methods:{list:P(vu,h(hu)),get:P(yu,hu.nullable()),listProviders:P(_(),h(_u),{auth:`admin`}),add:P(bu,xu,{kind:`mutation`,auth:`admin`}),remove:P(Su,_(),{kind:`mutation`,auth:`admin`}),testConnection:P(yu,Cu,{kind:`mutation`,auth:`admin`}),getSettings:P(yu,wu.nullable(),{auth:`admin`}),setSettings:P(y({id:a(),settings:wu}),_(),{kind:`mutation`,auth:`admin`}),getBrokerConfig:P(yu,wu.nullable(),{auth:`admin`}),getSettingsSchema:P(Tu,Ou,{auth:`admin`}),testSettings:P(Eu,Du,{kind:`mutation`,auth:`admin`}),publish:P(ku,r(),{kind:`mutation`,auth:`admin`}),subscribe:P(Au,ju,{kind:`mutation`,auth:`admin`}),unsubscribe:P(Mu,_(),{kind:`mutation`,auth:`admin`}),getState:P(Nu,r().nullable()),getStatus:P(_(),gu)}},Fu={name:`camera-pipeline-config`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[j.Camera],exposesDeviceSettings:!0,methods:{}};function Iu(e){return e}function Lu(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,scope:n?.scope??{kind:`system`}}}function Ru(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 zu=y({stepId:a(),entry:Se}),Bu={name:`custom-model-registry`,scope:`system`,mode:`collection`,internal:!0,methods:{listModels:P(_(),h(zu).readonly())}},Vu=[{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)`}],Hu={hwaccel:`auto`,probedBestHwaccel:``},Uu=y({sessionId:a(),slotCount:i().int(),slotByteLength:i().int(),segmentBytes:i().int(),budgetMb:i().int(),framesWritten:i().int(),getFrameHits:i().int(),getFrameMisses:i().int()}),Wu={name:`decoder`,scope:`system`,mode:`singleton`,methods:{supportsCodec:P(y({codec:a()}),m()),getInfo:P(_(),y({id:a(),name:a(),isPullMode:m().optional(),priority:i().optional()})),createSession:P(ln,y({sessionId:a(),nodeId:a()})),destroySession:P(y({sessionId:a()}),_()),pushPacket:P(y({sessionId:a(),packet:dt}),_()),openStream:P(y({sessionId:a(),url:a()}),_()),pullFrames:P(y({sessionId:a(),maxCount:i().default(1)}),h(ft)),pullHandles:P(y({sessionId:a(),maxCount:i().default(1)}),h(pt)),getFrame:P(y({handle:pt}),ft.nullable()),getShmStats:P(y({sessionId:a()}),Uu.nullable()),updateConfig:P(y({sessionId:a(),config:ln.partial()}),_()),getStats:P(y({sessionId:a()}),cn),listActiveSessions:P(_(),h(y({sessionId:a(),codec:a(),outputFormat:a(),createdAtMs:i()})).readonly()),reprobeHwaccel:P(_(),y({backend:a()}),{kind:`mutation`,auth:`admin`})}},Gu={name:`detection-pipeline`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[j.Camera],exposesDeviceSettings:!0,methods:{}},Ku=y({id:a(),label:a(),isDefault:m().optional()}),qu=y({search:a().optional(),area:a().optional(),manufacturer:a().optional(),adoptedOnly:m().optional(),unadoptedOnly:m().optional()}),Ju=y({integrationId:a(),page:i().int().positive().default(1),pageSize:i().int().positive().max(2e4).default(50),filter:a().optional(),filterText:qu.optional()}),Yu=y({candidates:h(L).readonly(),totalCount:i().int().nonnegative(),page:i().int().positive(),pageSize:i().int().positive()}),Xu=y({integrationId:a(),childNativeId:a()}),Zu=y({lastDiscoveryAt:i().int().nonnegative().nullable(),candidateCount:i().int().nonnegative(),adoptedCount:i().int().nonnegative(),lastError:a().nullable()}),Qu=y({name:a().min(1).optional(),hiddenChildIds:h(a()).optional()}),$u=y({integrationId:a(),childNativeIds:h(a()).min(1),filter:a().optional(),importLocations:m().optional(),perCandidate:o(a(),Qu).optional()}),ed=y({adopted:h(y({childNativeId:a(),parentDeviceId:i().int().nonnegative(),accessoryDeviceIds:h(i().int().nonnegative()).readonly()})).readonly()}),td=y({integrationId:a(),camDeviceId:i().int().nonnegative()}),nd=y({camDeviceId:i().int().nonnegative(),resetToSource:m().optional()}),rd=y({changed:m(),rebuiltChildren:i().int().nonnegative(),removedChildren:i().int().nonnegative().optional()}),id={name:`device-adoption`,scope:`system`,mode:`singleton`,status:{schema:Zu,kind:`poll`},methods:{listCandidateFilters:P(y({integrationId:a()}),y({filters:h(Ku)}),{auth:`admin`}),listCandidates:P(Ju,Yu,{auth:`admin`}),getCandidate:P(Xu,L.nullable(),{auth:`admin`}),refresh:P(y({integrationId:a()}),Zu,{kind:`mutation`,auth:`admin`}),adopt:P($u,ed,{kind:`mutation`,auth:`admin`}),release:P(td,_(),{kind:`mutation`,auth:`admin`}),resync:P(nd,rd,{kind:`mutation`,auth:`admin`})}},ad=v([`unlinked`,`linked`,`error`]),od=y({label:a(),value:a(),secret:m().optional()}),sd=y({qr:a().optional(),fields:h(od).readonly().optional(),note:a().optional()}),cd=y({linkState:ad,exposedDeviceCount:i(),error:a().optional(),setup:sd.optional()}),ld=a(),ud=y({deviceId:a(),exposedAs:a().optional(),capabilities:h(a()).optional()}),dd=y({deviceId:a(),capabilities:h(a()).optional()}),fd=y({deviceId:a()}),pd={name:`device-export`,scope:`system`,mode:`collection`,providerKind:`device-export`,status:{schema:cd,kind:`poll`},exposesDeviceSettings:!0,methods:{getStatus:P(_(),cd),listSupportedDeviceKinds:P(_(),h(ld)),listExposedDevices:P(_(),h(ud)),exposeDevice:P(dd,_(),{kind:`mutation`}),unexposeDevice:P(fd,_(),{kind:`mutation`})}},md=y({childKey:a(),section:a(),order:i().optional(),collapsed:m().optional()}),hd=y({id:a(),source:y({sourceKey:a(),cap:a(),fieldPath:a()}),target:y({cap:a(),fieldPath:a(),itemKey:a().optional()}),transform:b(`kind`,[y({kind:c(`identity`)}),y({kind:c(`enum-map`),mapping:o(a(),g([a(),i(),m()])),fallback:g([a(),i(),m()]).optional()}),y({kind:c(`linear`),scale:i(),offset:i(),clamp:s([i(),i()]).readonly().optional()})]).optional()}),gd=y({id:i(),stableId:a(),addonId:a(),type:v(j),name:a(),location:a().nullable(),disabled:m(),parentDeviceId:i().nullable(),role:a().nullable().optional(),online:m(),probed:m().optional(),features:h(a()),isCamera:m(),config:o(a(),r()),metadata:o(a(),r()).nullable().optional(),sourceInfo:I.optional(),integrationId:a().optional(),linkDeviceId:i().nullable().optional(),primaryChildEntityId:a().nullable().optional(),childLayout:h(md).readonly().optional(),deviceLinks:h(hd).readonly().optional()}),_d=y({key:a(),value:r(),description:a().optional()}),vd=y({id:i(),stableId:a(),type:a(),name:a(),location:a().nullable(),disabled:m(),parentDeviceId:i().nullable(),role:a().nullable().optional()}),yd=y({id:i(),stableId:a(),addonId:a(),type:a(),name:a(),userNamed:m().optional(),location:a().nullable(),disabled:m(),parentDeviceId:i().nullable(),metadata:o(a(),r()).nullable().optional(),sourceInfo:I.optional(),integrationId:a().optional(),linkDeviceId:i().nullable().optional(),primaryChildEntityId:a().nullable().optional(),childLayout:h(md).readonly().optional(),deviceLinks:h(hd).readonly().optional(),role:a().nullable().optional()}),bd=r().nullable(),xd=y({streamId:a(),width:i().optional(),height:i().optional(),codec:a().optional(),fps:i().optional(),bitrateKbps:i().optional()}),Sd=y({addonId:a(),stableId:a(),id:i(),type:a(),name:a(),location:a().nullable().optional(),disabled:m().optional(),parentDeviceId:i().nullable(),role:a().nullable().optional(),features:h(a()).optional(),config:o(a(),r())}),Cd=y({deviceId:i()}),wd=y({deviceId:i(),data:o(a(),r())}),Td={name:`device-manager`,scope:`system`,mode:`singleton`,methods:{allocateDeviceId:P(y({addonId:a(),stableId:a()}),y({id:i()}),{kind:`mutation`}),registerDevice:P(Sd,_(),{kind:`mutation`}),removeDevice:P(Cd,_(),{kind:`mutation`}),persistConfig:P(wd,_(),{kind:`mutation`}),loadConfig:P(y({deviceId:i()}),o(a(),r())),loadRuntimeState:P(y({deviceId:i()}),o(a(),r())),loadMeta:P(y({deviceId:i()}),yd.nullable()),setName:P(y({deviceId:i(),name:a()}),_(),{kind:`mutation`,auth:`admin`}),setLocation:P(y({deviceId:i(),location:a().nullable()}),_(),{kind:`mutation`,auth:`admin`}),setType:P(y({deviceId:i(),type:v(j)}),_(),{kind:`mutation`,auth:`admin`}),setIntegrationId:P(y({deviceId:i(),integrationId:a()}),_(),{kind:`mutation`,auth:`admin`}),setLinkDeviceId:P(y({deviceId:i(),linkDeviceId:i().nullable()}),_(),{kind:`mutation`,auth:`admin`}),setPrimaryChildEntityId:P(y({deviceId:i(),primaryChildEntityId:a().nullable()}),_(),{kind:`mutation`,auth:`admin`}),setChildLayout:P(y({deviceId:i(),childLayout:h(md).readonly()}),_(),{kind:`mutation`,auth:`admin`}),setDeviceLinks:P(y({deviceId:i(),deviceLinks:h(hd).readonly()}),_(),{kind:`mutation`,auth:`admin`}),getWireableFields:P(y({deviceId:i()}),y({caps:h(y({cap:a(),fields:h(y({path:a(),kind:v([`string`,`number`,`boolean`,`enum`]),enumValues:h(a()).optional()})).readonly()})).readonly()}),{kind:`query`}),setRole:P(y({deviceId:i(),role:a().nullable()}),_(),{kind:`mutation`,auth:`admin`}),applyInitialMeta:P(y({deviceId:i(),name:a().optional(),location:a().nullable().optional(),type:v(j).optional(),integrationId:a().optional(),linkDeviceId:i().nullable().optional(),role:a().nullable().optional()}),_(),{kind:`mutation`,auth:`admin`}),setMetadata:P(y({deviceId:i(),patch:o(a(),r())}),_(),{kind:`mutation`,auth:`admin`}),listLocations:P(_(),h(a())),addLocation:P(y({name:a()}),_(),{kind:`mutation`,auth:`admin`}),removeLocation:P(y({name:a(),cascade:m().optional()}),_(),{kind:`mutation`,auth:`admin`}),setDisabled:P(y({deviceId:i(),disabled:m()}),_(),{kind:`mutation`,auth:`admin`}),listPersistedByAddon:P(y({addonId:a()}),h(vd)),listAll:P(y({addonId:a().optional()}),h(gd)),getDevice:P(y({deviceId:i()}),gd.nullable()),getChildren:P(y({parentDeviceId:i()}),h(gd)),getStreamSources:P(y({deviceId:i()}),h(lt)),getConfigSchema:P(y({deviceId:i()}),h(_d)),getSettingsSchema:P(y({deviceId:i()}),bd),updateConfig:P(y({deviceId:i(),values:o(a(),r())}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),enable:P(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),disable:P(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),remove:P(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),removeByIntegration:P(y({integrationId:a()}),y({removed:i()}),{kind:`mutation`,auth:`admin`}),getStreamProfileMap:P(y({deviceId:i()}),o(a(),a().nullable())),setStreamProfileMap:P(y({deviceId:i(),profileMap:o(a(),a().nullable())}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),probeStreams:P(y({deviceId:i()}),h(xd),{kind:`mutation`,auth:`admin`}),getBindings:P(y({deviceId:i()}),y({deviceId:i(),entries:h(y({capName:a(),kind:v([`native`,`wrapped`]),providerAddonId:a(),providerNodeId:a(),nativeAddonId:a()}))})),getAllBindings:P(y({}),h(y({deviceId:i(),entries:h(y({capName:a(),kind:v([`native`,`wrapped`]),providerAddonId:a(),providerNodeId:a(),nativeAddonId:a()}))}))),setWrapperActive:P(y({deviceId:i(),capName:a(),wrapperAddonId:a(),active:m()}),_(),{kind:`mutation`,auth:`admin`}),listWrappersForCap:P(y({capName:a()}),h(a())),listBindableCapsForDeviceType:P(y({deviceType:a()}),h(y({capName:a(),wrappers:h(a())}))),getDeviceSettingsAggregate:P(y({deviceId:i()}),X.nullable()),getDeviceLiveInfoAggregate:P(y({deviceId:i()}),X.nullable()),getDeviceAggregate:P(y({deviceId:i()}),y({settings:X.nullable(),live:X.nullable()})),runDeviceAction:P(y({deviceId:i().int().nonnegative(),action:a().min(1),input:r()}),r(),{kind:`mutation`}),updateDeviceField:P(y({deviceId:i(),writerCapName:a(),writerAddonId:a(),key:a(),value:r()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),updateDeviceFieldsBatch:P(y({deviceId:i(),changes:h(y({writerCapName:a(),writerAddonId:a(),key:a(),value:r()}))}),y({success:c(!0),failures:h(y({writerCapName:a(),writerAddonId:a(),error:a()}))}),{kind:`mutation`,auth:`admin`}),discoverDevices:P(y({addonId:a()}),h(yc),{kind:`mutation`,auth:`admin`}),adoptDevice:P(y({addonId:a(),candidate:yc,integrationId:a().optional()}),bc,{kind:`mutation`,auth:`admin`}),getCreationSchema:P(y({addonId:a(),type:v(j)}),r().nullable()),createDevice:P(y({addonId:a(),type:v(j),config:o(a(),r()),integrationId:a().optional()}),bc,{kind:`mutation`,auth:`admin`}),testCreationField:P(y({addonId:a(),type:v(j),key:a(),value:r(),formValues:o(a(),r()).optional()}),xc,{kind:`mutation`,auth:`admin`}),adoptionListCandidates:P(Ju.extend({addonId:a()}),Yu,{auth:`admin`}),adoptionRefresh:P(y({addonId:a(),integrationId:a()}),Zu,{kind:`mutation`,auth:`admin`}),adoptionAdopt:P($u.extend({addonId:a()}),ed,{kind:`mutation`,auth:`admin`}),adoptionRelease:P(td.extend({addonId:a()}),_(),{kind:`mutation`,auth:`admin`}),adoptionResync:P(nd,rd,{kind:`mutation`,auth:`admin`}),testField:P(y({deviceId:i(),key:a(),value:r()}),xc,{kind:`mutation`,auth:`admin`}),getDeviceStatusAggregate:P(y({deviceId:i(),caps:h(a()).readonly().optional()}),o(a(),r().nullable()))}},Ed={name:`device-state`,scope:`system`,mode:`singleton`,methods:{getSnapshot:P(y({deviceId:i()}),o(a(),o(a(),r()))),getCapSlice:P(y({deviceId:i(),capName:a()}),o(a(),r()).nullable()),getAllSnapshots:P(y({}),o(a(),o(a(),o(a(),r())))),setCapSlice:P(y({deviceId:i(),capName:a(),slice:o(a(),r())}),_(),{kind:`mutation`})},events:{onChanged:F(y({deviceId:i(),capName:a(),slice:o(a(),r())}))}},Dd=y({embedding:h(i()),inferenceMs:i()}),Od=y({modelId:a(),embeddingDim:i(),ready:m()}),kd={name:`embedding-encoder`,scope:`system`,mode:`collection`,internal:!0,methods:{encode:P(y({crop:p(Uint8Array),width:i(),height:i()}),Dd),encodeText:P(y({text:a()}),Dd),getInfo:P(_(),Od)}},Ad=y({name:a(),path:a()}),jd=y({path:a(),entries:h(Ad).readonly(),freeBytes:i(),totalBytes:i()}),Md={name:`filesystem-browse`,scope:`system`,mode:`singleton`,internal:!0,methods:{listAllowedRoots:P(_(),h(a()).readonly(),{auth:`admin`}),browse:P(y({path:a()}),jd,{auth:`admin`}),createDir:P(y({path:a()}),y({path:a()}),{kind:`mutation`,auth:`admin`})}},Nd=v([`debug`,`info`,`warn`,`error`]),Pd=y({timestamp:de(),level:Nd,scope:h(a()),message:a(),meta:o(a(),r()).optional(),tags:o(a(),a()).optional()}),Fd={name:`log-destination`,scope:`system`,mode:`collection`,internal:!0,methods:{write:P(Pd,_(),{kind:`mutation`}),query:P(y({scope:h(a()).optional(),level:Nd.optional(),since:de().optional(),until:de().optional(),limit:i().optional(),tags:o(a(),a()).optional()}),h(Pd).readonly())},mount:{kind:`skip`}},Id=y({total:i(),user:i(),system:i(),irq:i(),nice:i(),loadAvg:s([i(),i(),i()]),cores:i()}),Ld=y({percent:i(),totalBytes:i(),usedBytes:i(),availableBytes:i(),swapUsedBytes:i(),swapTotalBytes:i()}),Rd=y({readBytes:i(),writeBytes:i(),readOps:i(),writeOps:i(),timestampMs:i()}),zd=y({rxBytes:i(),txBytes:i(),rxPackets:i(),txPackets:i(),rxErrors:i(),txErrors:i(),timestampMs:i()}),Bd=y({utilization:i(),model:a(),memoryUsedBytes:i(),memoryTotalBytes:i(),temperature:i().nullable()}),Vd=y({openFds:i(),threadCount:i(),activeHandles:i(),activeRequests:i()}),Hd=y({avg10:i(),avg60:i(),avg300:i()}),Ud=y({some:Hd,full:Hd.nullable()}),Wd=y({cpu:Id,memory:Ld,gpu:Bd.nullable(),network:zd,disk:Rd,pressure:y({cpu:Ud.nullable(),memory:Ud.nullable(),io:Ud.nullable()}),process:Vd,cpuTemperature:i().nullable(),timestampMs:i()}),Gd=y({path:a(),totalBytes:i(),usedBytes:i(),availableBytes:i(),percent:i()}),Kd=y({pid:i(),cpu:i(),memory:i(),privateBytes:i().optional(),sharedBytes:i().optional()}),qd=y({addonId:a(),nodeId:a(),role:v([`hub`,`worker`]),pid:i(),state:v([`starting`,`running`,`stopping`,`stopped`,`crashed`]),uptimeSec:i()}),Jd=y({pid:i(),ppid:i(),pgid:i(),classification:v([`root`,`managed`,`system`,`ghost`]),addonId:a().nullable(),nodeId:a().nullable(),command:a(),cpuPercent:i(),memoryRssBytes:i(),uptimeSec:i(),orphaned:m()}),Yd=y({pid:i(),force:m().optional()}),Xd=y({success:m(),reason:a().optional(),signal:v([`SIGTERM`,`SIGKILL`]).optional()}),Zd=y({addonId:a()}),Qd=y({success:m(),path:a().optional(),pid:i().optional(),reason:a().optional()}),$d=y({cpuPercent:i(),memoryPercent:i(),memoryUsedMB:i(),memoryTotalMB:i(),diskPercent:i().optional(),temperature:i().optional(),gpuPercent:i().optional(),gpuMemoryPercent:i().optional()}),ef={name:`metrics-provider`,scope:`system`,mode:`singleton`,methods:{collectSnapshot:P(_(),Wd),getCached:P(_(),Wd.nullable()),getCurrent:P(_(),$d),getDiskSpace:P(y({dirPath:a()}),Gd),getGpuInfo:P(_(),Bd.nullable()),getCpuTemperature:P(_(),i().nullable()),getProcessStats:P(y({pids:h(i())}),h(Kd)),listAddonInstances:P(_(),h(qd).readonly()),getAddonStats:P(y({addonId:a()}),Kd.nullable()),listNodeProcesses:P(_(),h(Jd).readonly()),killProcess:P(Yd,Xd,{kind:`mutation`,auth:`admin`}),dumpHeapSnapshot:P(Zd,Qd,{kind:`mutation`,auth:`admin`})}},tf=y({sourceUrl:a(),metadata:we,targets:h(Ce).min(1).readonly(),calibrationRef:a().optional(),sessionId:a().optional()}),nf={name:`model-convert`,scope:`system`,mode:`singleton`,internal:!0,methods:{convert:P(tf,Ee,{kind:`mutation`,auth:`admin`,timeoutMs:6e5})}},rf=y({nodeId:a(),modelId:a(),format:v(ye),entry:Se}),af=y({ok:m(),sha256:a(),bytes:i(),path:a()}),of={name:`model-distributor`,scope:`system`,mode:`singleton`,internal:!0,methods:{distributeModel:P(rf,af,{kind:`mutation`,auth:`admin`})}},sf=v([`external`,`embedded`]),cf=v([`connected`,`disconnected`,`auth-failed`,`unreachable`,`tls-error`]),lf=y({id:a(),name:a(),url:a(),kind:sf,status:cf,latencyMs:i().nullable(),error:a().optional(),connectedClients:i().int().nonnegative().optional(),lastCheckedAt:i().optional()}),uf=y({url:a(),username:a().optional(),password:a().optional(),clientIdPrefix:a().optional()}),df=y({name:a().min(1),url:a().regex(/^(mqtt|mqtts|ws|wss):\/\//,`URL must start with mqtt(s):// or ws(s)://`),username:a().optional(),password:a().optional(),clientIdPrefix:a().optional()}),ff=y({id:a()}),pf=y({id:a()}),mf=b(`ok`,[y({ok:c(!0),latencyMs:i()}),y({ok:c(!1),error:a()})]),hf=y({port:i().int().min(1).max(65535).default(1883),allowAnonymous:m().default(!1),username:a().optional(),password:a().optional()}),gf=y({id:a(),url:a()}),_f=y({brokerCount:i(),embeddedRunning:m()}),vf={name:`mqtt-broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:_f,kind:`poll`},methods:{listBrokers:P(_(),h(lf)),getBrokerConfig:P(pf,uf),addBroker:P(df,ff,{kind:`mutation`}),removeBroker:P(pf,_(),{kind:`mutation`}),testConnection:P(pf,mf,{kind:`mutation`}),startEmbeddedBroker:P(hf,gf,{kind:`mutation`}),stopEmbeddedBroker:P(pf,_(),{kind:`mutation`}),getStatus:P(_(),_f)}},yf=y({url:a(),hostname:a(),port:i(),protocol:v([`http`,`https`])}),bf=y({connected:m(),endpoint:yf.nullable(),error:a().optional()}),xf=yf.extend({id:a(),label:a(),mode:a().optional(),sourcePort:i().optional()}),Sf={name:`network-access`,scope:`system`,mode:`collection`,providerKind:`ingress`,methods:{start:P(_(),yf,{kind:`mutation`}),stop:P(_(),_(),{kind:`mutation`}),getEndpoint:P(_(),yf.nullable()),getStatus:P(_(),bf),listEndpoints:P(_(),h(xf).readonly())}},Cf=y({title:a(),body:a(),imageUrl:a().optional(),deviceId:i().optional(),eventId:a().optional(),priority:v([`low`,`normal`,`high`,`critical`]).default(`normal`),metadata:o(a(),r()).optional()}),wf={name:`notification-output`,scope:`system`,mode:`collection`,methods:{send:P(Cf,_(),{kind:`mutation`}),sendTest:P(_(),y({success:m(),error:a().optional()}),{kind:`mutation`})}},Tf=v([`view`,`create`,`delete`]),Ef=g([c(`*`),h(a())]),Df=o(a(),g([c(`*`),h(a())])),Of=v([`device`,`system`]),Z=b(`type`,[y({type:c(`category`),target:Of,access:h(Tf).min(1)}),y({type:c(`capability`),target:a(),access:h(Tf).min(1)}),y({type:c(`addon`),target:a(),access:h(Tf).min(1)}),y({type:c(`device`),targets:h(a()).min(1),access:h(Tf).min(1)})]),kf=y({id:a(),username:a(),passwordHash:a(),isAdmin:m().default(!1),allowedProviders:Ef,allowedDevices:Df,scopes:h(Z).default([]),createdAt:i(),updatedAt:i()}),Af=y({id:a(),label:a(),isAdmin:m().default(!1),allowedProviders:Ef,allowedDevices:Df,tokenHash:a(),tokenPrefix:a(),createdAt:i(),lastUsedAt:i().optional()}),jf=y({id:a(),userId:a(),name:a(),tokenHash:a(),tokenPrefix:a(),scopes:h(Z),expiresAt:i().nullish(),lastUsedAt:i().nullish(),createdAt:i()}),Mf=y({integrationId:a(),displayName:a(),requestedScopes:h(Z),allowedRedirectPrefixes:h(a()).min(1),hubUrl:a().optional()}),Nf={name:`oauth-integration`,scope:`system`,mode:`collection`,internal:!0,methods:{getDescriptor:P(_(),Mf)}},Pf=v([`new`,`entered`,`left`,`moving`,`idle`]),Ff=v([`motion`,`object`,`audio`]),If=y({x:i(),y:i(),timestamp:i(),bbox:z}),Lf=y({timestamp:i(),position:If,mediaKey:a()}),Rf=y({trackId:a(),deviceId:i(),className:a(),label:a().optional(),firstSeen:i(),lastSeen:i(),positions:h(If).readonly(),snapshots:h(Lf).readonly(),zonesVisited:h(a()).readonly(),totalDistance:i(),state:Pf,active:m()}),zf={id:a(),deviceId:i(),timestamp:i()},Bf=y({...zf,kind:c(`motion`),regionCount:i(),regions:h(y({bbox:z,pixelCount:i(),intensity:i()})).readonly().optional(),frameWidth:i().optional(),frameHeight:i().optional(),mediaUrl:a().optional()}),Vf=v([`pipeline`,`onboard`]),Hf=y({...zf,kind:c(`object`),source:Vf.optional(),frameId:a().optional(),trackId:a().optional(),className:a(),label:a().optional(),confidence:i().optional(),bbox:z.optional(),zones:h(a()).readonly().optional(),state:Pf.optional(),frameWidth:i().optional(),frameHeight:i().optional(),mediaKey:a().optional(),mediaUrl:a().optional()}),Uf=y({...zf,kind:c(`audio`),rms:i(),dbfs:i(),classification:y({className:a(),originalClass:a().optional(),score:i()}).optional(),mediaUrl:a().optional()}),Wf=v([`crop`,`thumbnail`,`snapshot`,`firstFrame`,`lastFrame`,`fullFrame`,`fullFrameBoxed`,`faceCrop`,`plateCrop`]),Gf=y({key:a(),kind:Wf,base64:a(),sizeBytes:i(),timestamp:i()}),Kf=y({deviceId:i(),since:i().optional(),until:i().optional(),limit:i().int().min(1).max(5e3).default(1e3),projection:v([`full`,`slim`]).optional()}),qf=Kf.extend({classFilter:a().optional()}),Jf=y({trackId:a(),className:a(),confidence:i(),bbox:z,zones:h(a()).readonly(),state:Pf}),Yf=Hf.extend({score:i()}),Xf=y({text:a(),deviceId:i().optional(),since:i().optional(),until:i().optional(),classFilter:a().optional(),limit:i().default(50),minScore:i().min(0).max(1).default(.2)}),Zf={name:`pipeline-analytics`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[j.Camera],exposesDeviceSettings:!0,methods:{getActiveTracks:P(y({deviceId:i()}),h(Rf).readonly()),getTrack:P(y({deviceId:i(),trackId:a()}),Rf.nullable()),listTracks:P(y({deviceId:i(),since:i().optional(),until:i().optional(),limit:i().optional()}),h(Rf).readonly()),clearTracks:P(y({deviceId:i()}),_(),{kind:`mutation`,auth:`admin`}),getMotionEvents:P(Kf,h(Bf).readonly()),getObjectEvents:P(qf,h(Hf).readonly()),getAudioEvents:P(Kf,h(Uf).readonly()),getEventDensity:P(y({deviceId:i(),since:i(),until:i(),bucketMs:i().int().positive()}),h(y({bucketStart:i(),motion:i().int(),object:i().int(),audio:i().int()})).readonly()),pruneEventsBefore:P(y({deviceId:i(),cutoffMs:i()}),y({motion:i().int(),object:i().int(),audio:i().int()}),{kind:`mutation`,auth:`admin`}),getEventMedia:P(y({eventId:a(),kind:Wf.optional()}),h(Gf).readonly()),getTrackMedia:P(y({trackId:a()}),h(Gf).readonly()),searchObjectEvents:P(Xf,h(Yf).readonly())},events:{onFrameTracked:{data:y({deviceId:i(),timestamp:i(),frameWidth:i(),frameHeight:i(),detections:h(Jf).readonly()})},onTrackStarted:{data:y({deviceId:i(),trackId:a(),className:a()})},onTrackEnded:{data:y({deviceId:i(),trackId:a(),className:a(),durationMs:i()})},onDetectionEvent:{data:y({deviceId:i(),kind:Ff,eventId:a(),timestamp:i()})}}},Qf=y({engine:B,steps:h(V).readonly(),audio:y({engine:B,modelId:a(),enabled:m(),settings:o(a(),r()).readonly().optional()}).nullable().optional()}),$f=y({id:a(),name:a(),description:a().optional(),config:Qf,createdAt:a(),updatedAt:a()}),ep=y({enabled:m(),modelId:a(),settings:o(a(),r()).readonly()}),tp=y({addonDefaults:o(a(),ep).readonly(),maxCameras:i().int().nonnegative().nullable().default(null)}),np=y({steps:h(V).readonly(),audio:y({modelId:a(),enabled:m()}).nullable()}),rp=y({enabled:m().optional(),modelId:a().optional(),settings:o(a(),r()).readonly().optional()}),ip=y({pinnedAgentNodeId:a().optional(),stepToggles:o(a(),m()).optional(),stepOverridesByAgent:o(a(),o(a(),rp)).optional(),pipelineByAgent:o(a(),np).optional()}),ap=y({deviceId:i(),agentNodeId:a(),pinned:m(),reason:v([`manual`,`capacity`,`hardware-affinity`,`failover`,`rebalance`]),assignedAt:i()}),op=y({deviceId:i(),decoderNodeId:a(),pinned:m(),reason:v([`manual`,`co-located`,`capacity`,`hardware-affinity`])}),sp=y({nodeId:a(),online:m(),load:To,score:i()}),cp=y({totalAgents:i(),onlineAgents:i(),totalCameras:i(),attachedCameras:i(),activeCameras:i(),avgInferenceTimeMs:i(),queueDepth:i()}),lp=o(a(),a()),up=y({camStreamId:a(),codec:a(),width:i(),height:i(),fps:i(),kind:a()}),dp=y({streams:h(up).readonly()}),fp=y({detectionNodeId:a().nullable(),decoderNodeId:a().nullable(),audioNodeId:a().nullable(),pinned:y({detection:m(),decoder:m(),audio:m()}),reasons:y({detection:a().optional(),decoder:a().optional(),audio:a().optional()})}),pp=y({profile:a(),status:a(),codec:a(),width:i(),height:i(),subscribers:i(),inFps:i(),outFps:i()}),mp=y({profiles:h(pp).readonly(),webrtcSessions:i(),rtspRestream:m()}),hp=y({framesWritten:i(),getFrameHits:i(),getFrameMisses:i(),budgetMb:i()}),gp=y({nodeId:a(),formats:h(a()).readonly(),sessionCount:i(),shm:hp}),_p=y({enabled:m(),fps:i()}),vp=v([`idle`,`installing`,`verifying`,`ready`,`failed`]),yp=y({state:vp,error:a().optional()}),bp=v([`idle`,`watching`,`active`]),xp=y({nodeId:a(),engine:y({backend:a(),device:a()}),phase:bp,configuredFps:i(),actualFps:i(),queueDepth:i(),avgInferenceMs:i(),provisioning:yp}),Sp=y({nodeId:a(),enabled:m()}),Cp=v([`off`,`continuous`,`events`]),wp=y({mode:Cp,active:m(),storageBytes:i()}),Tp=y({deviceId:i(),assignment:fp,source:dp,broker:mp.nullable(),decoder:gp.nullable(),motion:_p.nullable(),detection:xp.nullable(),audio:Sp.nullable(),recording:wp.nullable(),fetchedAt:i()}),Ep={name:`pipeline-orchestrator`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{assignPipeline:P(y({deviceId:i(),agentNodeId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),unassignPipeline:P(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),rebalance:P(_(),y({migrated:i()}),{kind:`mutation`,auth:`admin`}),getPipelineAssignments:P(_(),h(ap).readonly()),getPipelineAssignment:P(y({deviceId:i()}),ap.nullable()),getAgentLoad:P(_(),h(sp).readonly()),getGlobalMetrics:P(_(),cp),getCameraMetrics:P(y({deviceId:i()}),Ba.nullable()),getCapabilityBindings:P(y({nodeId:a()}),lp),setCapabilityBinding:P(y({nodeId:a(),capName:a(),addonId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),assignDecoder:P(y({deviceId:i(),nodeId:a()}),_(),{kind:`mutation`,auth:`admin`}),unassignDecoder:P(y({deviceId:i()}),_(),{kind:`mutation`,auth:`admin`}),getDecoderAssignments:P(_(),h(op).readonly()),assignAudio:P(y({deviceId:i(),nodeId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),unassignAudio:P(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),getAudioAssignment:P(y({deviceId:i()}),y({nodeId:a(),pinned:m(),assignedAt:i()}).nullable()),getAudioNodeLoad:P(_(),h(y({nodeId:a(),deviceCount:i()}))),getAudioAssignments:P(_(),h(y({deviceId:i(),nodeId:a(),pinned:m(),assignedAt:i()}))),getDecoderAssignment:P(y({deviceId:i(),pipelineNodeId:a().optional()}),op),getAgentSettings:P(y({agentNodeId:a()}),tp.nullable()),listAgentSettings:P(_(),h(y({nodeId:a(),settings:tp})).readonly()),setAgentAddonDefaults:P(y({agentNodeId:a(),defaults:o(a(),ep)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),removeAgentSettings:P(y({agentNodeId:a()}),y({success:m(),removed:m()}),{kind:`mutation`,auth:`admin`}),setAgentMaxCameras:P(y({agentNodeId:a(),maxCameras:i().int().nonnegative().nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),getCameraSettings:P(y({deviceId:i()}),ip.nullable()),setCameraStepToggle:P(y({deviceId:i(),addonId:a(),enabled:m().nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),getCameraStepOverrides:P(y({deviceId:i()}),o(a(),o(a(),rp)).nullable()),setCameraStepOverride:P(y({deviceId:i(),agentNodeId:a(),addonId:a(),patch:rp.nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),setCameraPipelineForAgent:P(y({deviceId:i(),agentNodeId:a(),pipeline:np.nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),resolvePipeline:P(y({deviceId:i(),agentNodeId:a().optional()}),Qf),getCameraStatus:P(y({deviceId:i()}),Tp),getCameraStatuses:P(y({deviceIds:h(i()).optional()}),h(Tp).readonly()),listTemplates:P(_(),h($f).readonly()),saveTemplate:P(y({name:a(),description:a().optional(),config:Qf}),$f,{kind:`mutation`,auth:`admin`}),updateTemplate:P(y({id:a(),name:a().optional(),description:a().optional(),config:Qf.optional()}),$f,{kind:`mutation`,auth:`admin`}),deleteTemplate:P(y({id:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`})}},Dp=y({streamId:a(),label:a().optional(),codec:a(),type:v([`video`,`audio`]),sourceUrl:a()}),Op=y({streamId:a(),format:a(),value:a()}),kp={name:`restreamer`,scope:`system`,mode:`collection`,internal:!0,methods:{registerDevice:P(y({deviceId:i(),streams:h(Dp).readonly()}),_(),{kind:`mutation`}),unregisterDevice:P(y({deviceId:i()}),_(),{kind:`mutation`}),getExposedResources:P(y({deviceId:i()}),h(Op).readonly())},mount:{kind:`skip`}},Ap=y({where:o(a(),r()).optional(),whereIn:o(a(),h(r())).optional(),whereBetween:o(a(),s([r(),r()])).optional(),orderBy:y({field:a(),direction:v([`asc`,`desc`])}).optional(),limit:i().optional(),offset:i().optional()}),jp=y({id:a(),data:o(a(),r())}),Mp=y({name:a(),type:v([`TEXT`,`INTEGER`,`REAL`,`JSON`,`BOOLEAN`]),primaryKey:m().optional(),notNull:m().optional(),unique:m().optional()}),Np=y({name:a(),columns:h(a()).readonly(),unique:m().optional()}),Pp={name:`settings-store`,scope:`system`,mode:`singleton`,methods:{get:P(y({namespace:a().optional(),collection:a(),key:a()}),r()),set:P(y({namespace:a().optional(),collection:a(),key:a(),value:r()}),_(),{kind:`mutation`}),query:P(y({namespace:a().optional(),collection:a(),filter:Ap.optional()}),h(jp).readonly()),insert:P(y({namespace:a().optional(),collection:a(),record:jp}),_(),{kind:`mutation`}),update:P(y({namespace:a().optional(),collection:a(),id:a(),data:o(a(),r())}),_(),{kind:`mutation`}),delete:P(y({namespace:a().optional(),collection:a(),key:a()}),_(),{kind:`mutation`}),count:P(y({namespace:a().optional(),collection:a(),filter:Ap.optional()}),i()),histogram:P(y({namespace:a().optional(),collection:a(),field:a(),bucketSize:i().int().positive(),origin:i().int(),filter:Ap.optional()}),h(y({bucket:i().int(),count:i().int()})).readonly()),isEmpty:P(y({namespace:a().optional(),collection:a()}),m()),declareCollection:P(y({namespace:a().optional(),collection:a(),columns:h(Mp).readonly(),indexes:h(Np).readonly().optional()}),_(),{kind:`mutation`})}},Q=f(),Fp=y({to:g([Q,h(Q).min(1)]),cc:h(Q).optional(),bcc:h(Q).optional(),from:a().optional(),replyTo:a().optional(),subject:a(),text:a(),html:a().optional()}),Ip=y({messageId:a(),accepted:h(Q).default([]),rejected:h(Q).default([])}),Lp=y({ready:m(),host:a(),error:a().optional(),lastVerifiedAt:i().optional()}),Rp={name:`smtp-provider`,scope:`system`,mode:`collection`,internal:!0,providerKind:`email`,methods:{sendEmail:P(Fp,Ip,{kind:`mutation`,auth:`admin`,access:`create`}),verify:P(_(),Lp,{kind:`mutation`,auth:`admin`,access:`view`}),getStatus:P(_(),Lp,{auth:`admin`})}},zp=y({base64:a(),contentType:a()}),Bp=y({lastCapturedAt:i().nullable(),cacheAgeMs:i().nullable(),lastBytes:i().nullable(),lastStreamId:a().nullable()}),Vp={name:`snapshot`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[j.Camera],exposesDeviceSettings:!0,methods:{getSnapshot:P(y({deviceId:i(),streamId:a().optional(),force:m().optional()}),zp.nullable()),invalidateCache:P(y({deviceId:i()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Bp,kind:`poll`}},Hp={name:`snapshot-provider`,scope:`system`,mode:`collection`,methods:{supportsDevice:P(y({deviceId:i()}),m()),getSnapshot:P(y({deviceId:i(),streamId:a().optional()}),zp.nullable())},mount:{kind:`custom`}},Up=y({userId:a(),username:a(),isAdmin:m(),provider:a(),email:a().optional(),displayName:a().optional(),hubUrl:a().optional(),scopes:h(Z).optional(),redirectUri:a().optional(),integrationId:a().optional(),jti:a().optional(),sessionId:a().optional()}),Wp={name:`sso-bridge`,scope:`system`,mode:`singleton`,internal:!0,methods:{signBridgeToken:P(y({claims:Up,ttlSec:i().int().positive().optional()}),y({token:a()})),verifyBridgeToken:P(y({token:a()}),Up.nullable())}},Gp=b(`shouldSaveDiskSpace`,[y({providerId:a().min(1),displayName:a().min(1),configSchema:r(),nodeLocal:m(),shouldSaveDiskSpace:c(!0),minFreePercent:i().min(0).max(100)}),y({providerId:a().min(1),displayName:a().min(1),configSchema:r(),nodeLocal:m(),shouldSaveDiskSpace:c(!1),minFreePercent:c(null)})]),Kp={name:`storage`,scope:`system`,mode:`singleton`,methods:{resolve:P(y({location:k,relativePath:a()}),a()),write:P(y({location:k,relativePath:a(),data:p(Uint8Array)}),_(),{kind:`mutation`}),read:P(y({location:k,relativePath:a()}),p(Uint8Array)),exists:P(y({location:k,relativePath:a()}),m()),list:P(y({location:k,prefix:a().optional()}),h(a()).readonly()),delete:P(y({location:k,relativePath:a()}),_(),{kind:`mutation`}),getAvailableSpace:P(y({location:k}),i().nullable()),beginUpload:P(y({location:k,relativePath:a(),sizeBytes:i().optional()}),y({uploadId:a()}),{kind:`mutation`}),writeChunk:P(y({uploadId:a(),offset:i(),data:p(Uint8Array)}),_(),{kind:`mutation`}),finalizeUpload:P(y({uploadId:a()}),_(),{kind:`mutation`}),abortUpload:P(y({uploadId:a()}),_(),{kind:`mutation`}),beginDownload:P(y({location:k,relativePath:a()}),y({downloadId:a(),sizeBytes:i()}),{kind:`mutation`}),readChunk:P(y({downloadId:a(),offset:i(),length:i()}),p(Uint8Array)),endDownload:P(y({downloadId:a()}),_(),{kind:`mutation`}),listLocations:P(y({type:Kt.optional()}),h(O).readonly()),getDefaultLocation:P(y({type:Kt}),O.nullable()),listLocationDeclarations:P(_(),h(qt).readonly()),upsertLocation:P(O.omit({createdAt:!0,updatedAt:!0}),O,{kind:`mutation`,auth:`admin`}),deleteLocation:P(y({id:a()}),_(),{kind:`mutation`,auth:`admin`}),testLocation:P(y({id:a()}),y({ok:m(),error:a().optional()}),{auth:`admin`}),listProviders:P(_(),h(Gp).readonly()),testConfig:P(y({providerId:a(),config:o(a(),r())}),y({ok:m(),error:a().optional()}),{auth:`admin`})}},qp=y({bytes:i().int().nonnegative()}),Jp=y({reclaimedBytes:i().int().nonnegative(),exhausted:m()}),Yp={name:`storage-evictable`,scope:`system`,mode:`collection`,internal:!0,methods:{getEvictableUsage:P(y({locationId:a()}),qp),evict:P(y({locationId:a(),targetBytes:i().int().positive()}),Jp,{kind:`mutation`})}},Xp=b(`shouldSaveDiskSpace`,[y({providerId:a().min(1),displayName:a().min(1),configSchema:r(),nodeLocal:m(),shouldSaveDiskSpace:c(!0),minFreePercent:i().min(0).max(100)}),y({providerId:a().min(1),displayName:a().min(1),configSchema:r(),nodeLocal:m(),shouldSaveDiskSpace:c(!1),minFreePercent:c(null)})]),Zp=y({ok:m(),error:a().optional()}),Qp=y({location:O,relativePath:a(),sizeBytes:i().optional()}),$p=y({uploadId:a()}),em=y({uploadId:a(),offset:i(),data:p(Uint8Array)}),tm=y({uploadId:a()}),nm=y({uploadId:a()}),rm=y({location:O,relativePath:a()}),im=y({downloadId:a(),sizeBytes:i()}),am=y({downloadId:a(),offset:i(),length:i()}),om=y({downloadId:a()}),sm={name:`storage-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getProviderInfo:P(_(),Xp),testLocation:P(y({config:o(a(),r())}),Zp,{auth:`admin`}),resolve:P(y({location:O,relativePath:a()}),a()),write:P(y({location:O,relativePath:a(),data:p(Uint8Array)}),_(),{kind:`mutation`}),read:P(y({location:O,relativePath:a()}),p(Uint8Array)),exists:P(y({location:O,relativePath:a()}),m()),list:P(y({location:O,prefix:a().optional()}),h(a()).readonly()),delete:P(y({location:O,relativePath:a()}),_(),{kind:`mutation`}),getAvailableSpace:P(y({location:O}),i().nullable()),beginUpload:P(Qp,$p,{kind:`mutation`}),writeChunk:P(em,_(),{kind:`mutation`}),finalizeUpload:P(tm,_(),{kind:`mutation`}),abortUpload:P(nm,_(),{kind:`mutation`}),beginDownload:P(rm,im,{kind:`mutation`}),readChunk:P(am,p(Uint8Array)),endDownload:P(om,_(),{kind:`mutation`})}},cm=y({urls:g([a(),h(a())]),username:a().optional(),credential:a().optional()}),lm={name:`turn-provider`,scope:`system`,mode:`collection`,methods:{getTurnServers:P(_(),h(cm).readonly())}},um=y({credentialId:a(),label:a(),createdAt:i(),lastUsedAt:i().nullable(),transports:h(a()).default([])}),dm={name:`user-passkeys`,scope:`system`,mode:`collection`,internal:!0,methods:{beginRegistration:P(y({userId:a(),username:a()}),y({optionsJSON:o(a(),r())}),{kind:`mutation`,auth:`admin`,access:`create`}),finishRegistration:P(y({userId:a(),response:o(a(),r()),label:a()}),y({success:c(!0),credentialId:a()}),{kind:`mutation`,auth:`admin`,access:`create`}),beginAuthentication:P(y({userId:a().optional()}),y({optionsJSON:o(a(),r())}),{kind:`mutation`,access:`view`}),finishAuthentication:P(y({userId:a(),response:o(a(),r())}),y({verified:m()}),{kind:`mutation`,access:`view`}),listPasskeys:P(y({userId:a()}),h(um),{auth:`admin`}),removePasskey:P(y({userId:a(),credentialId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`})}},fm=y({id:a(),source:a(),kind:v([`motion`,`object`,`audio`,`native`]),timeRange:y({startMs:i(),endMs:i()}),thumbnail:a().optional()}),pm=y({playbackUrl:a(),playbackEndpoints:h(a()).optional(),token:a().optional()}),mm={name:`videoclips`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,methods:{listClips:P(y({deviceId:i(),since:i(),until:i(),limit:i().int().positive().optional()}),h(fm).readonly(),{kind:`query`,auth:`admin`}),getClipPlayback:P(y({deviceId:i(),clipId:a()}),pm,{kind:`query`,auth:`admin`})}},hm=y({viewportWidth:i().int().positive().optional(),viewportHeight:i().int().positive().optional(),devicePixelRatio:i().positive().optional(),downlinkMbps:i().nonnegative().optional(),prefersTier:a().optional()}).partial(),gm={name:`webrtc`,scope:`system`,mode:`collection`,internal:!0,methods:{handleOffer:P(y({streamId:a(),sdpOffer:a()}),a(),{kind:`mutation`}),supportsStream:P(y({streamId:a()}),m()),registerStream:P(y({streamId:a(),codec:a()}),_(),{kind:`mutation`}),unregisterStream:P(y({streamId:a()}),_(),{kind:`mutation`}),createSession:P(y({streamId:a(),hints:hm.optional()}),y({sessionId:a(),sdpOffer:a()}),{kind:`mutation`}),handleAnswer:P(y({sessionId:a(),sdpAnswer:a()}),_(),{kind:`mutation`}),closeSession:P(y({sessionId:a()}),_(),{kind:`mutation`}),hasAdaptiveBitrate:P(y({streamId:a()}),m())},mount:{kind:`skip`}},_m=b(`kind`,[y({kind:c(`adaptive`)}),y({kind:c(`profile`),profile:w}),y({kind:c(`cam-stream`),camStreamId:a().min(1)})]),vm=y({id:a(),label:a(),target:_m,codec:a().nullable(),resolution:y({width:i(),height:i()}).nullable(),status:v([`idle`,`connecting`,`streaming`,`error`,`stopped`]).nullable(),inputFps:i().nullable(),decodeFps:i().nullable(),bitrateKbps:i().nullable()}),ym={name:`webrtc-session`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,preferredProvider:`stream-broker`,deviceTypes:[j.Camera],methods:{listStreams:P(y({deviceId:i().int().nonnegative()}),h(vm)),createSession:P(y({deviceId:i().int().nonnegative(),target:_m,hints:hm.optional(),relayOnly:m().optional(),consumerAttribution:ai.optional()}),y({sessionId:a(),sdpOffer:a()}),{kind:`mutation`}),handleOffer:P(y({deviceId:i().int().nonnegative(),target:_m.optional(),sdpOffer:a(),sessionId:a().optional(),relayOnly:m().optional(),nonTrickle:m().optional(),disableTurn:m().optional(),disableIpv6:m().optional(),consumerAttribution:ai.optional()}),y({sessionId:a(),sdpAnswer:a()}),{kind:`mutation`}),handleAnswer:P(y({deviceId:i().int().nonnegative(),sessionId:a(),sdpAnswer:a()}),_(),{kind:`mutation`}),addIceCandidate:P(y({deviceId:i().int().nonnegative(),sessionId:a(),candidate:a(),sdpMid:a().nullable().optional(),sdpMLineIndex:i().int().nullable().optional()}),_(),{kind:`mutation`}),getIceCandidates:P(y({deviceId:i().int().nonnegative(),sessionId:a()}),y({candidates:h(y({candidate:a(),sdpMid:a().nullable(),sdpMLineIndex:i().int().nullable()})),done:m()}),{kind:`query`}),closeSession:P(y({deviceId:i().int().nonnegative(),sessionId:a()}),_(),{kind:`mutation`}),hasAdaptiveBitrate:P(y({deviceId:i().int().nonnegative(),profile:w}),m()),getSessionState:P(y({deviceId:i().int().nonnegative(),sessionId:a()}),y({pendingRenegotiation:y({target:_m,epoch:i()}).nullable()}))},mount:{kind:`custom`}},bm=y({childDeviceIds:h(i()).readonly(),hiddenChildIds:h(i()).readonly()}),xm={name:`accessories`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera,j.Hub,j.Switch,j.Light,j.Sensor,j.Thermostat,j.Cover,j.Lock,j.Fan,j.MediaPlayer,j.AlarmPanel,j.Generic],methods:{setChildHidden:P(y({deviceId:i().int().nonnegative(),childDeviceId:i().int().nonnegative(),hidden:m()}),_(),{kind:`mutation`,auth:`admin`})},events:{onAccessoriesChanged:{data:y({deviceId:i(),childDeviceIds:h(i()).readonly(),hiddenChildIds:h(i()).readonly()})},onChildVisibilityChanged:{data:y({deviceId:i(),childDeviceId:i(),hidden:m()})}},status:{schema:bm,kind:`command-driven`}},Sm=v([`install`,`update`,`uninstall`,`restart`]),Cm=v([`queued`,`fetching`,`staged`,`validating`,`applying`,`restarting`,`applied`,`done`,`failed`,`skipped`]),wm=v([`framework`,`addon`]),Tm=y({tsMs:i(),nodeId:a(),packageName:a(),phase:Cm,message:a()}),Em=y({taskId:a(),nodeId:a(),packageName:a(),fromVersion:a().nullable(),toVersion:a(),target:wm,phase:Cm,stagedPath:a().nullable(),attempts:i(),steps:h(Tm),error:a().nullable(),startedAtMs:i().nullable(),finishedAtMs:i().nullable()}),Dm=v([`running`,`completed`,`failed`,`partially-failed`,`cancelled`]),Om=v([`single`,`bulk`,`cluster`]),km=y({jobId:a(),kind:Sm,createdAtMs:i(),createdBy:a(),scope:Om,tasks:h(Em),state:Dm,schemaVersion:c(1)}),Am=v([`debug`,`info`,`warn`,`error`]),jm=v([`off`,`latest`,`beta`]),Mm=v([`off`,`latest`,`beta`,`inherit`]),Nm=y({id:a(),name:a().optional(),version:a().optional(),description:a().optional(),icon:a().optional(),color:a().optional(),capabilities:h(r()).readonly().optional(),packageName:a(),packageVersion:a(),packageDisplayName:a().optional(),bundle:y({displayName:a(),description:a().optional(),icon:a().optional()}).optional(),protected:m().optional(),removable:m().optional()}),Pm=y({pid:i().optional(),mode:a(),state:a()}),Fm=y({phase:v([`pending`,`healthy`,`failed`]),retryCount:i(),firstFailureAt:i().nullable(),lastAttemptAt:i().nullable(),lastError:y({message:a(),stack:a().optional()}).nullable(),nextRetryAt:i().nullable(),alertEmitted:m(),retrying:m(),inGracePeriod:m()}),Im=y({manifest:Nm,declaration:r().optional(),source:a(),installSource:a().optional(),process:Pm.optional(),hasBackup:m().optional(),health:Fm.nullable().optional()}),Lm=y({name:a(),version:a(),dir:a(),installSource:a().optional()}),Rm=y({name:a(),currentVersion:a(),latestVersion:a(),category:v([`addon`,`core`]),requiresRestart:m(),isSystem:m()}),zm=y({version:a(),publishedAt:a(),deprecated:a().optional(),distTags:h(a()).readonly()}),Bm=y({name:a(),version:a(),description:a(),keywords:h(a()).readonly(),publishedAt:a(),author:a(),installed:m(),installedVersion:a().optional()}),Vm=y({channel:jm,intervalSeconds:i()}),Hm=Mm,Um=r(),Wm=r(),Gm=r(),Km=y({packageName:a(),fromVersion:a(),toVersion:a(),restartingAt:i()}),qm=v([`queued`,`updating`,`done`,`done-pending-restart`,`failed`]),Jm=y({name:a(),isSystem:m(),fromVersion:a(),toVersion:a(),status:qm,error:a().optional(),startedAtMs:i().optional(),completedAtMs:i().optional()}),Ym=v([`regular`,`system`,`restarting`,`finalizing`]);y({id:a(),nodeId:a(),startedAtMs:i(),completedAtMs:i().optional(),total:i(),completed:i(),failed:i(),current:a().nullable(),phase:Ym,cancelled:m(),items:h(Jm).readonly()});var Xm=y({packageName:a(),currentVersion:a(),latestVersion:a().nullable(),hasUpdate:m(),description:a().optional()}),Zm=y({timestamp:a(),level:a(),message:a(),scope:a().optional()}),Qm=r(),$m=y({addonId:a().min(1),action:a().min(1),input:r()}),eh={name:`addons`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{list:P(_(),h(Im).readonly()),getLogs:P(y({addonId:a(),limit:i().min(1).max(500).default(100),level:Am.optional()}),h(Qm)),listPackages:P(_(),h(Lm).readonly()),installPackage:P(y({packageName:a(),version:a().optional()}),Wm,{kind:`mutation`,auth:`admin`}),installFromWorkspace:P(y({packageName:a()}),Wm,{kind:`mutation`,auth:`admin`}),isWorkspaceAvailable:P(_(),m()),listWorkspacePackages:P(_(),h(r()).readonly()),uninstallPackage:P(y({packageName:a()}),r(),{kind:`mutation`,auth:`admin`}),reloadPackages:P(_(),Gm,{kind:`mutation`,auth:`admin`}),searchAvailable:P(y({query:a().optional()}),h(Bm)),listUpdates:P(y({nodeId:a().optional()}),h(Rm).readonly(),{auth:`admin`}),updatePackage:P(y({name:a().min(1),version:a().optional(),nodeId:a().optional()}),r(),{kind:`mutation`,auth:`admin`}),rollbackPackage:P(y({name:a().min(1)}),y({rolledBackTo:a().nullable()}),{kind:`mutation`,auth:`admin`}),forceRefresh:P(y({nodeId:a().optional()}),r(),{kind:`mutation`,auth:`admin`}),restartServer:P(y({confirm:c(!0)}),r(),{kind:`mutation`,auth:`admin`}),getLastRestart:P(_(),y({kind:v([`framework-update`,`manual`,`system`,`framework-bulk-update`]),packageName:a().optional(),fromVersion:a().optional(),toVersion:a().optional(),requestedBy:a().optional(),requestedAt:i()}).nullable(),{auth:`admin`}),listFrameworkPackages:P(_(),h(Xm).readonly(),{auth:`admin`}),listCapabilityProviders:P(y({capName:a().min(1)}),h(y({addonId:a(),mode:v([`singleton`,`collection`]),isActive:m()})).readonly()),setCapabilityProviderEnabled:P(y({capName:a().min(1),addonId:a().min(1),enabled:m()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),updateFrameworkPackage:P(y({packageName:a().min(1),version:a().optional(),deferRestart:m().optional()}),Km,{kind:`mutation`,auth:`admin`}),getVersions:P(y({name:a()}),h(zm).readonly()),restartAddon:P(y({addonId:a()}),Um,{kind:`mutation`,auth:`admin`}),retryLoad:P(y({packageName:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),getAutoUpdateSettings:P(_(),Vm,{auth:`admin`}),setAutoUpdateSettings:P(y({channel:jm,intervalSeconds:i().min(300).max(86400).optional()}),r(),{kind:`mutation`,auth:`admin`}),getAddonAutoUpdate:P(y({addonId:a()}),Hm,{auth:`admin`}),setAddonAutoUpdate:P(y({addonId:a(),channel:Mm}),r(),{kind:`mutation`,auth:`admin`}),applyAutoUpdateToAll:P(y({channel:jm}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),custom:P($m,r(),{kind:`mutation`}),startJob:P(y({kind:v([`install`,`update`,`uninstall`,`restart`]),targets:h(y({name:a().min(1),version:a().min(1)})).min(1),nodeIds:h(a()).optional()}),y({jobId:a()}),{kind:`mutation`,auth:`admin`}),getJob:P(y({jobId:a()}),km.nullable(),{auth:`admin`}),listJobs:P(y({activeOnly:m().optional()}),h(km),{auth:`admin`}),cancelJob:P(y({jobId:a()}),y({cancelled:m()}),{kind:`mutation`,auth:`admin`}),onAddonLogs:P(y({addonId:a(),level:Am.optional()}),Zm,{kind:`subscription`})},mount:{kind:`service-backed`}},th={name:`button`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Button],methods:{press:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})}},nh=y({host:a(),port:i().int().positive().optional(),onvifPort:i().int().positive().optional(),rtspPort:i().int().positive().optional(),https:m().optional(),username:a().optional(),password:a().optional(),onvifProfile:a().optional()}),rh=y({host:a(),port:i().int().positive().nullable(),onvifPort:i().int().positive().nullable(),rtspPort:i().int().positive().nullable(),https:m().nullable(),hasUsername:m(),hasPassword:m(),onvifProfile:a().nullable()}),ih={name:`camera-credentials`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],methods:{getCredentials:P(y({deviceId:i()}),nh.nullable(),{kind:`query`,auth:`admin`})},status:{schema:rh,kind:`command-driven`}},ah=y({id:a(),label:a(),protocol:v([`rtsp`,`rtmp`,`annexb`,`http-mjpeg`,`webrtc`,`custom`]),url:a().optional(),resolution:y({width:i(),height:i()}).optional(),fps:i().optional(),bitrate:i().optional(),codec:a().optional(),profileHint:w.optional(),sdp:a().optional()}),oh=y({key:a(),value:r()}),sh=y({source:a(),data:o(a(),r())}),ch={name:`device-ops`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{getStreamSources:P(y({deviceId:i()}),h(ah)),getConfigEntries:P(y({deviceId:i()}),h(oh)),setConfig:P(y({deviceId:i(),values:o(a(),r())}),_(),{kind:`mutation`}),runAction:P(y({deviceId:i(),action:a().min(1),input:r()}),r(),{kind:`mutation`}),removeDevice:P(y({deviceId:i()}),_(),{kind:`mutation`}),getSettingsSchema:P(y({deviceId:i()}),r().nullable()),getRawState:P(y({deviceId:i()}),sh.nullable(),{auth:`protected`})}},lh=y({id:a(),type:a(),timestamp:i(),label:a().optional(),thumbnailUrl:a().optional(),clipUrl:a().optional(),metadata:o(a(),r()).optional()}),uh={name:`events`,scope:`device`,mode:`singleton`,deviceTypes:[j.Camera],methods:{getEvents:P(y({deviceId:i(),from:i().optional(),to:i().optional(),limit:i().optional()}),h(lh)),getEventThumbnail:P(y({deviceId:i(),eventId:a()}),y({base64:a(),contentType:a()}).nullable()),getEventClipUrl:P(y({deviceId:i(),eventId:a()}),a().nullable())}},dh=y({id:a(),name:a(),sampleCount:i().int().nonnegative(),coverMediaKey:a().optional(),coverBase64:a().optional()}),fh=y({id:a(),source:v([`detected`,`photo`]),addedAt:i().int(),deviceId:i().int().optional(),base64:a().optional()}),ph=y({faceId:a(),deviceId:i().int(),trackId:a(),timestamp:i().int(),recognizedIdentityId:a().optional(),identityName:a().optional(),assigned:m(),base64:a().optional()}),mh=v([`unassigned`,`recognized`,`all`]),hh=y({key:a(),kind:a(),base64:a(),sizeBytes:i(),timestamp:i()}),gh={name:`face-gallery`,scope:`system`,mode:`singleton`,methods:{listIdentities:P(_(),h(dh).readonly()),createIdentity:P(y({name:a().min(1)}),dh,{kind:`mutation`,auth:`admin`}),renameIdentity:P(y({id:a(),name:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),deleteIdentity:P(y({id:a()}),_(),{kind:`mutation`,auth:`admin`}),listIdentitySamples:P(y({identityId:a()}),h(fh).readonly()),removeSample:P(y({identityId:a(),sampleId:a()}),_(),{kind:`mutation`,auth:`admin`}),listRecentFaces:P(y({limit:i().int().positive().optional(),filter:mh.optional()}).optional(),h(ph).readonly()),getFaceByTrack:P(y({deviceId:i().int(),trackId:a()}),ph.nullable()),getFaceMedia:P(y({faceId:a()}),h(hh).readonly()),assignFace:P(y({faceId:a(),identityId:a()}),_(),{kind:`mutation`,auth:`admin`}),unassignFace:P(y({faceId:a()}),_(),{kind:`mutation`,auth:`admin`}),deleteFace:P(y({faceId:a()}),_(),{kind:`mutation`,auth:`admin`}),assignFaces:P(y({faceIds:h(a()).min(1),identityId:a()}),y({assigned:i().int(),failed:h(a()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignFaces:P(y({faceIds:h(a()).min(1)}),y({unassigned:i().int(),failed:h(a()).readonly()}),{kind:`mutation`,auth:`admin`}),suggestFaceClusters:P(y({threshold:i().min(0).max(1).optional(),minClusterSize:i().int().min(2).optional(),limit:i().int().positive().optional()}).optional(),h(y({faceIds:h(a()).readonly(),representativeFaceId:a(),size:i().int(),cohesion:i()})).readonly())}},_h=y({id:a(),addonId:a(),name:a(),enabled:m(),info:o(a(),r()).readonly(),createdAt:i(),updatedAt:i(),processState:a()}),vh=y({id:a(),addonId:a(),name:a(),enabled:m(),info:o(a(),r()).readonly(),createdAt:i(),updatedAt:i()}),yh=y({addonId:a(),name:a(),description:a(),iconUrl:a().nullable(),color:a(),instanceMode:a(),discoveryMode:a(),kind:v([`device-adoption`,`device-provider`]),brokerKind:a().nullable(),supportsLocationImport:m(),existingInstances:h(y({id:a(),name:a()})),canAdd:m()}),bh=y({success:m(),error:a().optional()}),xh=y({addonId:a(),name:a(),enabled:m().optional(),info:o(a(),r()).optional(),settings:o(a(),r()).optional(),skipRestart:m().optional()}),Sh=y({id:a(),name:a().optional(),enabled:m().optional(),info:o(a(),r()).optional()}),Ch=y({success:m(),deletedId:a()}),wh={name:`integrations`,scope:`system`,mode:`singleton`,methods:{list:P(_(),h(_h)),get:P(y({id:a()}),_h),getByAddonId:P(y({addonId:a()}),vh.nullable()),create:P(xh,vh,{kind:`mutation`,auth:`admin`}),update:P(Sh,vh,{kind:`mutation`,auth:`admin`}),delete:P(y({id:a()}),Ch,{kind:`mutation`,auth:`admin`}),getSettings:P(y({id:a()}),o(a(),r()),{auth:`admin`}),setSettings:P(y({id:a(),settings:o(a(),r())}),y({success:m()}),{kind:`mutation`,auth:`admin`}),getAvailableTypes:P(_(),h(yh),{auth:`admin`}),testConnection:P(y({addonId:a(),settings:o(a(),r())}),bh,{kind:`mutation`,auth:`admin`})},mount:{kind:`service-backed`}},Th=y({codecs:h(a()),sampleRate:i(),duplex:v([`half`,`full`]),maxBacklogMs:i()}),Eh=y({talking:m(),lastSessionAt:i().nullable(),ability:Th.nullable()}),Dh=v([`opus`,`s16le`,`g711ulaw`,`g711alaw`]),Oh={name:`intercom`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],methods:{startSession:P(y({deviceId:i()}),y({sessionId:a(),sdpOffer:a()}),{kind:`mutation`,auth:`admin`}),handleAnswer:P(y({deviceId:i(),sessionId:a(),sdpAnswer:a()}),_(),{kind:`mutation`,auth:`admin`}),stopSession:P(y({deviceId:i(),sessionId:a()}),_(),{kind:`mutation`,auth:`admin`}),startTalkSession:P(y({deviceId:i()}),y({sessionId:a()}),{kind:`mutation`,auth:`admin`}),pushTalkAudio:P(y({deviceId:i(),audioBase64:a(),codec:Dh.optional(),sampleRate:i().int().positive().optional(),channels:i().int().positive().optional(),sequenceNumber:i().int()}),y({accepted:m()}),{kind:`mutation`,auth:`admin`}),endTalkSession:P(y({deviceId:i()}),_(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:y({deviceId:i(),status:Eh})}},status:{schema:Eh,kind:`command-driven`}},kh=v([`lan`,`wifi`,`docker`,`vpn`,`loopback`,`other`]),Ah=y({name:a(),family:v([`IPv4`,`IPv6`]),address:a(),cidr:a(),netmask:a(),internal:m(),mac:a(),kind:kh,preferred:m(),plausible:m(),plausibleReason:a()}),jh=y({interfaces:h(Ah).readonly(),probedAt:i()}),Mh=Ah.nullable(),Nh=y({endpoints:h(y({label:a(),baseUrl:a(),kind:v([`lan-ipv4`,`lan-ipv6`,`public`,`loopback`]),interfaceKind:v([`lan`,`wifi`,`docker`,`vpn`,`other`,`loopback`,`public`]),plausible:m(),plausibleReason:a(),priority:i()})).readonly()}),Ph=y({addresses:h(a()).readonly()}),Fh={name:`local-network`,scope:`system`,mode:`singleton`,methods:{list:P(_(),jh),getPreferred:P(_(),Mh),getConnectionEndpoints:P(y({port:i().int().min(1).max(65535),includeLoopback:m().optional(),ipv4Only:m().optional(),scheme:v([`http`,`https`]).optional()}),Nh),getAllowedAddresses:P(_(),Ph),setAllowedAddresses:P(Ph,y({success:c(!0)}),{kind:`mutation`}),resetAllowlistToBestMatch:P(_(),Ph,{kind:`mutation`})},mount:{kind:`hub-only`}},Ih=y({id:a(),label:a(),scope:v([`mesh`,`public`]),url:a(),hostname:a(),port:i(),protocol:v([`http`,`https`])}),Lh=y({id:a(),hostname:a(),magicDns:a(),addresses:h(a()).readonly(),os:a().optional(),online:m(),lastSeenMs:i(),isSelf:m(),connection:v([`direct`,`relay`,`idle`]),relay:a().nullable(),lastHandshakeMs:i(),rxBytes:i(),txBytes:i(),tags:h(a()).readonly(),exitNodeOption:m(),advertisedRoutes:h(a()).readonly(),userLogin:a().nullable(),keyExpiry:i().nullable()}),Rh=y({joined:m(),meshIp:a(),magicDnsHostname:a(),peerCount:i(),endpoints:h(Ih).readonly(),error:a().optional(),tenantName:a(),magicDnsSuffix:a(),userLogin:a().nullable(),controlPlaneUrl:a(),keyExpiry:i().nullable(),daemonSocket:a().optional(),daemonCliPath:a().optional()}),zh={name:`mesh-network`,scope:`system`,mode:`collection`,providerKind:`mesh`,methods:{getStatus:P(_(),Rh),join:P(y({authKey:a().min(8),hostname:a().optional()}),y({joined:c(!0)}),{kind:`mutation`}),startLogin:P(y({hostname:a().optional()}),y({loginUrl:a()}),{kind:`mutation`}),leave:P(_(),y({left:c(!0)}),{kind:`mutation`}),logout:P(_(),y({loggedOut:c(!0)}),{kind:`mutation`}),listPeers:P(_(),y({peers:h(Lh).readonly()})),testConnection:P(y({authKey:a().optional()}),y({ok:m(),tenant:a().optional(),daemonVersion:a().optional(),error:a().optional()}),{kind:`mutation`})}},Bh=y({nominalBitrateKbps:i(),observedBitrateKbps:i(),peakBitrateKbps:i(),packetLossPercent:i(),lastUpdated:i()}),Vh=y({rttMs:i(),jitterMs:i(),estimatedBandwidthKbps:i(),packetLossPercent:i().min(0).max(100),lastUpdated:i()}),Hh=y({deviceId:i(),streams:o(a(),Bh),client:Vh.optional()}),Uh={name:`network-quality`,scope:`system`,mode:`singleton`,methods:{getDeviceStats:P(y({deviceId:i()}),Hh.nullable()),getAllStats:P(_(),h(Hh).readonly()),reportClientStats:P(y({deviceId:i(),rttMs:i().min(0).max(6e4),jitterMs:i().min(0).max(1e4),estimatedBandwidthKbps:i().min(0).max(1e6),packetLossPercent:i().min(0).max(100)}),_(),{kind:`mutation`})},mount:{kind:`service-backed`}},Wh=y({addonId:a(),capabilities:h(a()).readonly(),status:a()}),Gh=y({pid:i(),name:a(),state:a(),cpuPercent:i(),memoryRss:i(),uptimeSeconds:i(),services:h(Wh).readonly(),groupId:a().optional()}),Kh=y({id:a(),status:a(),cpuPercent:i(),memoryRss:i()}),qh=y({category:a(),total:i(),healthy:i(),addons:h(Kh).readonly()}),Jh=y({id:a(),name:a(),hostname:a(),platform:a(),arch:a(),cpuModel:a().nullable(),cpuCores:i(),memoryMB:i(),engines:h(a()).readonly(),isHub:m(),isOnline:m(),cpuPercent:i(),memoryPercent:i(),uptime:i(),lastSeen:a(),localIps:h(a()).readonly(),addons:h(y({id:a(),capabilities:h(a()).readonly(),status:a()})).readonly(),processes:h(Gh).readonly(),categories:h(qh).readonly()}),Yh=y({callerAddonId:a(),providerAddonId:a(),capName:a(),callsPerMin:i(),lastCallAtMs:i()}),Xh=y({nodeId:a(),name:a(),version:a(),status:a(),synced:m()}),Zh=y({hubVersion:a(),nodes:h(Xh)}),Qh=y({nodeId:a(),addonId:a()}),$h=y({id:a(),status:a(),version:a().optional(),packageName:a().optional()}),$=y({success:m()}),eg=y({success:m(),reason:a().optional()}),tg=y({restarted:h(a()).readonly(),failed:h(a()).readonly()}),ng=y({nodeId:a(),name:a()}),rg={name:`nodes`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{topology:P(_(),h(Jh).readonly(),{auth:`admin`}),deployAddon:P(Qh,$,{kind:`mutation`,auth:`admin`}),undeployAddon:P(Qh,$,{kind:`mutation`,auth:`admin`}),restartAddon:P(Qh,$,{kind:`mutation`,auth:`admin`}),restartProcess:P(y({nodeId:a(),processName:a()}),eg,{kind:`mutation`,auth:`admin`}),restartNode:P(y({nodeId:a()}),tg,{kind:`mutation`,auth:`admin`}),shutdownNode:P(y({nodeId:a()}),$,{kind:`mutation`,auth:`admin`}),renameNode:P(y({nodeId:a(),name:a().min(1).max(64)}),ng,{kind:`mutation`,auth:`admin`}),clusterAddonStatus:P(_(),o(a(),Zh),{auth:`admin`}),getCapUsageGraph:P(y({windowSeconds:i().int().positive().max(300).default(60)}),h(Yh).readonly(),{auth:`admin`}),getNodeAddons:P(y({nodeId:a()}),h($h).readonly(),{auth:`admin`}),setProcessLogLevel:P(y({nodeId:a(),level:a()}),$,{kind:`mutation`,auth:`admin`}),executeQuery:P(y({nodeId:a(),addonId:a(),queryName:a(),params:o(a(),r()).optional()}),r(),{kind:`mutation`,auth:`admin`})},mount:{kind:`service-backed`}},ig=v([`text`,`timestamp`,`watermark`]),ag=v([`top-left`,`top-center`,`top-right`,`bottom-left`,`bottom-center`,`bottom-right`,`custom`]),og=y({id:a(),kind:ig,enabled:m(),text:a().optional(),position:ag.optional(),availablePositions:h(ag).readonly(),readOnly:m().optional()}),sg=y({overlays:h(og).readonly()}),cg=y({enabled:m().optional(),text:a().optional(),position:ag.optional()}).partial(),lg={name:`osd`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],methods:{setOverlay:P(y({deviceId:i(),overlayId:a(),patch:cg}),_(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:y({deviceId:i(),status:sg})}},status:{schema:sg,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}}}]}},ug=y({plateId:a(),deviceId:i().int(),trackId:a(),timestamp:i().int(),text:a(),score:i(),corrected:m(),base64:a().optional()}),dg=y({key:a(),kind:a(),base64:a(),sizeBytes:i(),timestamp:i()}),fg=y({plateIds:h(a()).readonly(),representativePlateId:a(),representativeText:a(),size:i().int(),cohesion:i()}),pg={name:`plate-gallery`,scope:`system`,mode:`singleton`,methods:{listPlates:P(y({deviceId:i().int().optional(),limit:i().int().positive().optional()}).optional(),h(ug).readonly()),getPlateByTrack:P(y({deviceId:i().int(),trackId:a()}),ug.nullable()),getPlateMedia:P(y({plateId:a()}),h(dg).readonly()),searchPlates:P(y({text:a().min(1),maxDistance:i().int().min(0).optional(),limit:i().int().positive().optional()}),h(ug).readonly()),suggestPlateClusters:P(y({maxDistance:i().int().min(0).optional(),minClusterSize:i().int().min(2).optional(),limit:i().int().positive().optional()}).optional(),h(fg).readonly()),correctPlateText:P(y({plateId:a(),text:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),deletePlate:P(y({plateId:a()}),_(),{kind:`mutation`,auth:`admin`})}},mg=v(ye),hg=v([`videotoolbox`,`cuda`,`nvdec`,`vaapi`,`qsv`,`d3d11va`,`dxva2`,`amf`,`vdpau`,`drm`,`coreml`,`tensorrt`,`openvino`,`directml`,`webgpu`,`none`]).nullable().optional(),gg=y({preferred:h(a()).readonly()}),_g=v([`h264_videotoolbox`,`hevc_videotoolbox`,`h264_vaapi`,`hevc_vaapi`,`h264_nvenc`,`hevc_nvenc`,`h264_qsv`,`hevc_qsv`,`h264_amf`,`hevc_amf`,`libx264`,`libx265`]),vg=y({encoders:h(y({encoder:_g,codec:v([`H264`,`H265`]),family:v([`videotoolbox`,`vaapi`,`nvenc`,`qsv`,`amf`,`software`]),available:m(),reason:a().optional()})).readonly(),defaultH264:_g,defaultH265:_g,probedAt:i()}),yg=y({methods:h(a()).readonly(),probedAt:i()}),bg=v([`darwin`,`linux`,`win32`]),xg=v([`arm64`,`x64`]),Sg=y({type:v([`nvidia`,`amd`,`intel`,`apple`]),name:a(),memoryMB:i().optional()}),Cg=y({type:v([`apple-ane`,`intel-npu`])}),wg=y({platform:bg,arch:xg,cpuModel:a(),cpuCores:i(),totalRAM_MB:i(),availableRAM_MB:i(),gpu:Sg.nullable(),npu:Cg.nullable()}),Tg=y({runtime:v([`node`,`python`]),backend:a(),format:v([`onnx`,`coreml`,`openvino`]),score:i(),reason:a(),available:m()}),Eg=y({hardware:wg,scores:h(Tg).readonly(),bestScore:Tg,pythonPath:a().nullable()}),Dg=y({modelId:a(),name:a(),minRAM_MB:i(),accuracyScore:i(),formats:h(a()).readonly()}),Og=y({modelId:a(),runtime:v([`node`,`python`]),backend:a(),format:mg,reason:a()}),kg={name:`platform-probe`,scope:`system`,mode:`singleton`,methods:{getCapabilities:P(_(),Eg),getHardware:P(_(),wg),resolveInferenceConfig:P(y({requirements:h(Dg).readonly()}),Og),resolveHwAccel:P(y({prefer:hg,nodeId:a().optional()}),gg),getHardwareEncoders:P(_(),vg),refreshHardwareEncoders:P(_(),vg,{kind:`mutation`,auth:`admin`}),getHardwareDecodeAccels:P(_(),yg),refreshHardwareDecodeAccels:P(_(),yg,{kind:`mutation`,auth:`admin`})}},Ag=y({id:a(),name:a()}),jg=y({pan:i(),tilt:i(),zoom:i()}),Mg=y({pan:i().optional(),tilt:i().optional(),zoom:i().optional(),speed:i().optional()}),Ng=jg.extend({autofocus:m()}),Pg=y({hasPan:m(),hasTilt:m(),hasZoom:m(),supportsPresets:m(),maxPresets:i().optional(),hasAutofocus:m()}),Fg={name:`ptz`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-panel`,tab:`ptz`,topTab:!0,label:`PTZ`,order:0}},methods:{move:P(Mg.extend({deviceId:i()}),_(),{kind:`mutation`}),continuousMove:P(Mg.extend({deviceId:i()}),_(),{kind:`mutation`}),stop:P(y({deviceId:i()}),_(),{kind:`mutation`}),getPresets:P(y({deviceId:i()}),h(Ag)),goToPreset:P(y({deviceId:i(),presetId:a()}),_(),{kind:`mutation`}),savePreset:P(y({deviceId:i(),presetId:a(),name:a()}),_(),{kind:`mutation`,auth:`admin`}),deletePreset:P(y({deviceId:i(),presetId:a()}),_(),{kind:`mutation`,auth:`admin`}),getOptions:P(y({deviceId:i()}),Pg),goHome:P(y({deviceId:i()}),_(),{kind:`mutation`}),getPosition:P(y({deviceId:i()}),jg),setAutofocus:P(y({deviceId:i(),enabled:m()}),_(),{kind:`mutation`})},status:{schema:Ng,kind:`command-driven`}},Ig={name:`reboot`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera,j.Sensor,j.Switch],methods:{reboot:P(y({deviceId:i().int().nonnegative()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`})}},Lg=y({deviceId:i(),enabled:m(),activeMode:v([`off`,`continuous`,`events`]),nodeId:a(),storageBytes:i()}),Rg=y({profile:a(),startMs:i(),endMs:i()}),zg=y({deviceId:i(),ranges:h(Rg)}),Bg=y({deviceId:i(),days:h(i())}),Vg=y({deviceId:i(),localMasterPath:a().nullable(),playbackUrl:a().nullable(),playbackEndpoints:h(a())}),Hg=y({deviceId:i(),usedBytes:i()}),Ug=y({locationId:a().nullable(),usedBytes:i(),availableBytes:i().nullable(),totalBytes:i().nullable()}),Wg=y({nodeId:a(),totalUsedBytes:i(),devices:h(Hg),locations:h(Ug)}),Gg=b(`kind`,[y({kind:c(`segment`),startMs:i(),durMs:i(),bytes:i()}),y({kind:c(`gap`),nearestEdgeMs:i().nullable()})]),Kg=y({data:p(Uint8Array)}),qg={name:`recording`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,status:{schema:Lg,kind:`command-driven`},methods:{getAvailability:P(y({deviceId:i(),fromMs:i(),toMs:i()}),zg,{kind:`query`,auth:`admin`}),getDaysWithRecordings:P(y({deviceId:i(),fromMs:i(),toMs:i(),tzOffsetMinutes:i()}),Bg,{kind:`query`,auth:`admin`}),getPlaybackManifest:P(y({deviceId:i(),fromMs:i(),toMs:i()}),Vg,{kind:`query`,auth:`admin`}),getStorageUsage:P(y({}),Wg,{kind:`query`,auth:`admin`}),getDeviceConfig:P(y({deviceId:i()}),E,{kind:`query`,auth:`admin`}),locateSegment:P(y({deviceId:i(),profile:a(),epochMs:i()}),Gg,{kind:`query`,auth:`admin`}),readSegmentBytes:P(y({deviceId:i(),profile:a(),startMs:i()}),Kg,{kind:`query`,auth:`admin`}),setDeviceConfig:P(y({deviceId:i(),config:E}),E,{kind:`mutation`,auth:`admin`}),rescanStorage:P(y({deviceId:i()}),Lg,{kind:`mutation`,auth:`admin`}),pruneFootage:P(y({deviceId:i()}),y({floorMs:i().nullable(),deletedBuckets:i().int(),reclaimedBytes:i().int()}),{kind:`mutation`,auth:`admin`})}},Jg=y({camStreamId:a().min(1),kind:tt,url:a().optional(),codec:a().optional(),resolution:T.optional(),fps:i().positive().optional(),label:a().optional(),deviceFeatures:h(a()).optional(),autoEligible:m().optional(),metadata:o(a(),r()).optional()}),Yg={name:`stream-catalog`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],methods:{getCatalog:P(y({deviceId:i().int().nonnegative()}),h(Jg).readonly())}},Xg=[{profile:`main`,prefix:`streamMain`,label:`Main stream`},{profile:`sub`,prefix:`streamSub`,label:`Sub stream`},{profile:`ext`,prefix:`streamExt`,label:`Third stream`}];function Zg(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 Qg(e,t){let n=[];for(let r of Xg){let i=e[r.profile];if(!i)continue;let a=Zg(r,i,t?.[r.profile]);a&&n.push(a)}return n.length===0?null:{sections:n}}function $g(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 e_=y({streaming:m(),notifications:m(),objectDetection:m(),remoteAccess:m(),agentCluster:m(),smartHome:m(),recordings:m(),backup:m(),repl:m()}),t_=y({status:c(`ok`),uptime:i()}),n_=y({name:a(),address:a(),family:a(),internal:m()}),r_={name:`system`,scope:`system`,mode:`singleton`,methods:{info:P(_(),e_),health:P(_(),t_),featureFlags:P(_(),e_),networkAddresses:P(_(),h(n_).readonly()),getRetentionConfig:P(_(),r().nullable(),{auth:`admin`}),setRetentionConfig:P(o(a(),r()),te(),{kind:`mutation`,auth:`admin`}),forceRetentionCleanup:P(_(),_(),{kind:`mutation`,auth:`admin`})},mount:{kind:`service-backed`}},i_=y({title:a(),message:a(),severity:v([`info`,`warning`,`critical`]),duration:i().optional(),action:y({label:a(),url:a()}).optional()}),a_={name:`toast`,scope:`system`,mode:`singleton`,methods:{onToast:P(_(),i_,{kind:`subscription`})},mount:{kind:`service-backed`}},o_=y({id:a(),username:a(),isAdmin:m().default(!1),allowedProviders:g([h(a()),c(`*`)]),allowedDevices:o(a(),g([h(a()),c(`*`)])),scopes:h(Z).default([]),totpEnabled:m().default(!1),createdAt:i(),updatedAt:i()}),s_=y({username:a(),password:a().min(6),isAdmin:m().default(!1),allowedProviders:g([h(a()),c(`*`)]).optional(),allowedDevices:o(a(),g([h(a()),c(`*`)])).optional(),scopes:h(Z).optional()}),c_=y({id:a(),isAdmin:m().optional(),allowedProviders:g([h(a()),c(`*`)]).optional(),allowedDevices:o(a(),g([h(a()),c(`*`)])).optional(),scopes:h(Z).optional()}),l_=y({id:a(),label:a(),isAdmin:m().default(!1),allowedProviders:g([h(a()),c(`*`)]).optional(),allowedDevices:o(a(),g([h(a()),c(`*`)])).optional(),tokenPrefix:a(),createdAt:i(),lastUsedAt:i().optional()}),u_=y({label:a(),isAdmin:m().default(!1),allowedProviders:g([h(a()),c(`*`)]).optional(),allowedDevices:o(a(),g([h(a()),c(`*`)])).optional()}),d_=y({token:a(),record:l_}),f_=y({id:a(),userId:a(),name:a(),tokenPrefix:a(),scopes:h(Z),expiresAt:i().nullish(),lastUsedAt:i().nullish(),createdAt:i()}),p_=y({userId:a(),name:a(),scopes:h(Z),expiresAt:i().optional()}),m_=y({token:a(),record:f_}),h_=y({id:a(),userId:a(),username:a(),integrationId:a(),scopes:h(Z),createdAt:i(),lastUsedAt:i(),revokedAt:i().nullable()}),g_=y({secret:a(),otpauthUrl:a()}),__=y({enabled:m(),confirmedAt:i().nullable()}),v_={name:`user-management`,scope:`system`,mode:`singleton`,methods:{listUsers:P(_(),h(o_),{auth:`admin`}),createUser:P(s_,o_,{kind:`mutation`,auth:`admin`,access:`create`}),updateUser:P(c_,y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),deleteUser:P(y({id:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),resetPassword:P(y({id:a(),newPassword:a().min(6)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),setUserScopes:P(y({userId:a(),scopes:h(Z)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),validateCredentials:P(y({username:a(),password:a()}),o_.extend({passwordHash:a()}).nullable(),{kind:`mutation`,access:`view`}),listApiKeys:P(_(),h(l_),{auth:`admin`}),createApiKey:P(u_,d_,{kind:`mutation`,auth:`admin`,access:`create`}),revokeApiKey:P(y({id:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateApiKey:P(y({token:a()}),l_.nullable(),{kind:`mutation`,access:`view`}),createScopedToken:P(p_,m_,{kind:`mutation`,auth:`admin`,access:`create`}),revokeScopedToken:P(y({id:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateScopedToken:P(y({token:a()}),f_.nullable(),{access:`view`}),listScopedTokens:P(y({userId:a()}),h(f_),{auth:`admin`}),setupTotp:P(y({userId:a()}),g_,{kind:`mutation`,auth:`admin`,access:`create`}),confirmTotp:P(y({userId:a(),code:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),disableTotp:P(y({userId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getTotpStatus:P(y({userId:a()}),__,{auth:`admin`}),verifyTotp:P(y({userId:a(),code:a()}),y({valid:m()}),{kind:`mutation`,access:`view`}),oauthIssueCode:P(y({integrationId:a(),userId:a(),username:a(),scopes:h(Z),redirectUri:a(),hubUrl:a()}),y({code:a()}),{kind:`mutation`,access:`create`}),oauthExchangeCode:P(y({code:a(),redirectUri:a()}),y({accessToken:a(),refreshToken:a(),expiresIn:i()}).nullable(),{kind:`mutation`,access:`view`}),oauthRefresh:P(y({refreshToken:a()}),y({accessToken:a(),refreshToken:a(),expiresIn:i()}).nullable(),{kind:`mutation`,access:`view`}),oauthVerifyAccessToken:P(y({token:a()}),y({userId:a(),username:a(),scopes:h(Z)}).nullable(),{access:`view`}),listOauthSessions:P(_(),h(h_),{auth:`admin`}),revokeOauthSession:P(y({id:a()}),y({success:m()}),{kind:`mutation`,auth:`admin`,access:`delete`})}},y_=[`decoder`,`motion-detection`,`pipeline-executor`,`audio-analyzer`,`pipeline-analytics`,`notification-output`],b_=[...y_,`pipeline-orchestrator`,`pipeline-runner`],x_={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`,advancedNotifier:`advanced-notifier`,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`,connectivity:`connectivity`,consumables:`consumables`,contact:`contact`,control:`control`,cover:`cover`,customModelRegistry:`custom-model-registry`,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`,integrations:`integrations`,intercom:`intercom`,lawnMowerControl:`lawn-mower-control`,localNetwork:`local-network`,lockControl:`lock-control`,logDestination:`log-destination`,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`,notifier:`notifier`,numericSensor:`numeric-sensor`,oauthIntegration:`oauth-integration`,osd:`osd`,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`,restreamer:`restreamer`,scriptRunner:`script-runner`,settingsStore:`settings-store`,smoke:`smoke`,smtpProvider:`smtp-provider`,snapshot:`snapshot`,snapshotProvider:`snapshot-provider`,ssoBridge:`sso-bridge`,storage:`storage`,storageEvictable:`storage-evictable`,storageProvider:`storage-provider`,streamBroker:`stream-broker`,streamCatalog:`stream-catalog`,streamParams:`stream-params`,streamingEngine:`streaming-engine`,switch:`switch`,system:`system`,tamper:`tamper`,temperatureSensor:`temperature-sensor`,toast:`toast`,turnProvider:`turn-provider`,update:`update`,userManagement:`user-management`,userPasskeys:`user-passkeys`,vacuumControl:`vacuum-control`,valve:`valve`,vibration:`vibration`,videoclips:`videoclips`,waterHeater:`water-heater`,weather:`weather`,webrtc:`webrtc`,webrtcSession:`webrtc-session`,zoneAnalytics:`zone-analytics`,zoneRules:`zone-rules`,zones:`zones`},S_=[{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:`advancedNotifier`,name:`advanced-notifier`},{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:`connectivity`,name:`connectivity`},{key:`consumables`,name:`consumables`},{key:`contact`,name:`contact`},{key:`control`,name:`control`},{key:`cover`,name:`cover`},{key:`customModelRegistry`,name:`custom-model-registry`},{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:`integrations`,name:`integrations`},{key:`intercom`,name:`intercom`},{key:`lawnMowerControl`,name:`lawn-mower-control`},{key:`localNetwork`,name:`local-network`},{key:`lockControl`,name:`lock-control`},{key:`logDestination`,name:`log-destination`},{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:`notifier`,name:`notifier`},{key:`numericSensor`,name:`numeric-sensor`},{key:`oauthIntegration`,name:`oauth-integration`},{key:`osd`,name:`osd`},{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:`restreamer`,name:`restreamer`},{key:`scriptRunner`,name:`script-runner`},{key:`settingsStore`,name:`settings-store`},{key:`smoke`,name:`smoke`},{key:`smtpProvider`,name:`smtp-provider`},{key:`snapshot`,name:`snapshot`},{key:`snapshotProvider`,name:`snapshot-provider`},{key:`ssoBridge`,name:`sso-bridge`},{key:`storage`,name:`storage`},{key:`storageEvictable`,name:`storage-evictable`},{key:`storageProvider`,name:`storage-provider`},{key:`streamBroker`,name:`stream-broker`},{key:`streamCatalog`,name:`stream-catalog`},{key:`streamParams`,name:`stream-params`},{key:`streamingEngine`,name:`streaming-engine`},{key:`switch`,name:`switch`},{key:`system`,name:`system`},{key:`tamper`,name:`tamper`},{key:`temperatureSensor`,name:`temperature-sensor`},{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:`vibration`,name:`vibration`},{key:`videoclips`,name:`videoclips`},{key:`waterHeater`,name:`water-heater`},{key:`weather`,name:`weather`},{key:`webrtc`,name:`webrtc`},{key:`webrtcSession`,name:`webrtc-session`},{key:`zoneAnalytics`,name:`zone-analytics`},{key:`zoneRules`,name:`zone-rules`},{key:`zones`,name:`zones`}],C_=[xm,ul,fl,gl,xl,Ol,El,eh,jl,Rl,wr,Fr,Ul,Lr,Wl,Xl,iu,Hr,ou,Wr,pu,Kr,Jr,Xr,Pu,th,ih,Fu,vi,bi,Ci,Oi,Ai,Ni,Fi,zi,Hi,Bu,Wu,Gu,id,Xi,pd,Td,ch,Cc,Ed,br,$i,kd,na,aa,uh,gh,ca,Sr,Md,ua,fa,ma,ga,va,wh,Oh,Sa,Fh,Ta,Fd,Aa,zh,ef,nf,of,Ao,Ra,No,qo,vf,Qo,Sf,Uh,rg,wf,as,ss,Nf,lg,Zf,go,Ep,Do,pg,kg,ls,fs,ms,bs,Fg,Ts,Ig,qg,kp,Ds,Pp,ks,Rp,Vp,Hp,Wp,Kp,Yp,sm,pi,Yg,Is,$r,Rs,r_,Bs,Hs,a_,lm,Ws,v_,dm,Js,Zs,$s,mm,tc,rc,gm,ym,uc,mc,yo],w_=`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.device-adoption.device-discovery.device-export.device-status.doorbell.enum-sensor.event-emitter.fan-control.feature-probe.flood.gas.humidifier.humidity-sensor.image.intercom.lawn-mower-control.lock-control.media-player.motion.motion-trigger.motion-zones.mqtt-broker.native-object-detection.notifier.numeric-sensor.osd.power-meter.presence.pressure-sensor.privacy-mask.ptz.ptz-autotrack.recording.script-runner.smoke.snapshot.stream-params.switch.tamper.temperature-sensor.update.vacuum-control.valve.vibration.water-heater.weather`.split(`.`),T_=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.updateFrameworkPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"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`},"advancedNotifier.deleteRule":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`delete`},"advancedNotifier.getHistory":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`view`},"advancedNotifier.getRules":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`view`},"advancedNotifier.testRule":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`create`},"advancedNotifier.upsertRule":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`create`},"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.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.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`},"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`},"consumables.reset":{capName:`consumables`,capScope:`device`,addonId:null,access:`delete`},"control.setValue":{capName:`control`,capScope:`device`,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`},"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.adoptionListCandidates":{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.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.discoverDevices":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"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.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.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.setDeviceLinks":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setDisabled":{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.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.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`},"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`},"localNetwork.getAllowedAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getConnectionEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getPreferred":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.list":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.resetAllowlistToBestMatch":{capName:`local-network`,capScope:`system`,addonId:null,access:`delete`},"localNetwork.setAllowedAddresses":{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`},"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.send":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.sendTest":{capName:`notification-output`,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`},"pipelineAnalytics.clearTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"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.getMotionEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getObjectEvents":{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.listTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.pruneEventsBefore":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.searchObjectEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineExecutor.cacheFrameInPool":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.deleteModel":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.deleteTemplate":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.detect":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"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.reprobeEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"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`},"pipelineOrchestrator.assignAudio":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.assignDecoder":{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.getCapabilityBindings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getDecoderAssignment":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getDecoderAssignments":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getGlobalMetrics":{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.listAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.listTemplates":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.rebalance":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.removeAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`},"pipelineOrchestrator.resolvePipeline":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.saveTemplate":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentAddonDefaults":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentMaxCameras":{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.setCapabilityBinding":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.unassignAudio":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.unassignDecoder":{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.reportMotion":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"plateGallery.correctPlateText":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.deletePlate":{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.searchPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.suggestPlateClusters":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"platformProbe.getCapabilities":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.getHardware":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.getHardwareDecodeAccels":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.getHardwareEncoders":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.refreshHardwareDecodeAccels":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`create`},"platformProbe.refreshHardwareEncoders":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`create`},"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.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.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.getStorageUsage":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.locateSegment":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.pruneFootage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.readSegmentBytes":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.rescanStorage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.setDeviceConfig":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"restreamer.getExposedResources":{capName:`restreamer`,capScope:`system`,addonId:null,access:`view`},"restreamer.registerDevice":{capName:`restreamer`,capScope:`system`,addonId:null,access:`create`},"restreamer.unregisterDevice":{capName:`restreamer`,capScope:`system`,addonId:null,access:`delete`},"scriptRunner.run":{capName:`script-runner`,capScope:`device`,addonId:null,access:`create`},"scriptRunner.stop":{capName:`script-runner`,capScope:`device`,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.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`},"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.getSnapshot":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.invalidateCache":{capName:`snapshot`,capScope:`device`,addonId:null,access:`create`},"snapshotProvider.getSnapshot":{capName:`snapshot-provider`,capScope:`system`,addonId:null,access:`view`},"snapshotProvider.supportsDevice":{capName:`snapshot-provider`,capScope:`system`,addonId:null,access:`view`},"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`},"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.assignProfile":{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.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.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.releaseStreamWithCodec":{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.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`},"streamingEngine.getStreamUrl":{capName:`streaming-engine`,capScope:`system`,addonId:null,access:`view`},"streamingEngine.listStreams":{capName:`streaming-engine`,capScope:`system`,addonId:null,access:`view`},"streamingEngine.registerStream":{capName:`streaming-engine`,capScope:`system`,addonId:null,access:`create`},"streamingEngine.unregisterStream":{capName:`streaming-engine`,capScope:`system`,addonId:null,access:`delete`},"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.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.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`},"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.beginRegistration":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`},"userPasskeys.finishAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.finishRegistration":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`},"userPasskeys.listPasskeys":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.removePasskey":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`delete`},"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`},"videoclips.getClipPlayback":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`},"videoclips.listClips":{capName:`videoclips`,capScope:`device`,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`},"webrtc.closeSession":{capName:`webrtc`,capScope:`system`,addonId:null,access:`create`},"webrtc.createSession":{capName:`webrtc`,capScope:`system`,addonId:null,access:`create`},"webrtc.handleAnswer":{capName:`webrtc`,capScope:`system`,addonId:null,access:`create`},"webrtc.handleOffer":{capName:`webrtc`,capScope:`system`,addonId:null,access:`create`},"webrtc.hasAdaptiveBitrate":{capName:`webrtc`,capScope:`system`,addonId:null,access:`view`},"webrtc.registerStream":{capName:`webrtc`,capScope:`system`,addonId:null,access:`create`},"webrtc.supportsStream":{capName:`webrtc`,capScope:`system`,addonId:null,access:`view`},"webrtc.unregisterStream":{capName:`webrtc`,capScope:`system`,addonId:null,access:`delete`},"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`}}),E_=`accessories.addon-pages.addon-pages-source.addon-routes.addon-settings.addon-widgets.addon-widgets-source.addons.admin-ui.advanced-notifier.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.consumables.control.cover.custom-model-registry.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.integrations.intercom.lawn-mower-control.local-network.lock-control.log-destination.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.notifier.oauth-integration.osd.pipeline-analytics.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.privacy-mask.ptz.ptz-autotrack.reboot.recording.restreamer.script-runner.settings-store.smtp-provider.snapshot.snapshot-provider.sso-bridge.storage.storage-evictable.storage-provider.stream-broker.stream-catalog.stream-params.streaming-engine.switch.system.toast.turn-provider.update.user-management.user-passkeys.vacuum-control.valve.videoclips.water-heater.webrtc.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`),D_=`accessories.alarm-panel.audio-analysis.audio-metrics.automation-control.battery.brightness.button.camera-credentials.camera-streams.climate-control.color.consumables.control.cover.device-discovery.device-ops.events.fan-control.humidifier.intercom.lawn-mower-control.lock-control.media-player.motion.motion-detection.motion-trigger.motion-zones.native-object-detection.notifier.osd.pipeline-analytics.privacy-mask.ptz.ptz-autotrack.reboot.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.advanced-notifier.alerts.audio-analyzer.audio-codec.auth-provider.backup.broker.custom-model-registry.decoder.device-adoption.device-export.device-manager.device-provider.device-state.embedding-encoder.face-gallery.filesystem-browse.integrations.local-network.log-destination.mesh-network.metrics-provider.model-convert.model-distributor.mqtt-broker.network-access.network-quality.nodes.notification-output.oauth-integration.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.recording.restreamer.settings-store.smtp-provider.snapshot-provider.sso-bridge.storage.storage-evictable.storage-provider.stream-broker.streaming-engine.system.toast.turn-provider.user-management.user-passkeys.webrtc`.split(`.`),k_=[{id:`camera-viewer`,label:`Camera viewer`,description:"Read-only over every device — live streams, recordings, motion events, battery state. Combine with `allowedDevices` 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:`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`]}]}],A_=Object.freeze({broker:`broker`,"device-export":`device-export`,"mesh-network":`mesh`,"mqtt-broker":`broker`,"network-access":`ingress`,"smtp-provider":`email`}),j_=[`broker`,`device-export`,`mesh-network`,`mqtt-broker`,`network-access`,`smtp-provider`];function M_(e){let t=[];for(let[n,r]of Object.entries(A_))r===e&&t.push(n);return t}var N_=y({name:a(),stagedPath:a(),backupPath:a(),toVersion:a(),fromVersion:a().nullable()}),P_=y({jobId:a(),taskId:a(),packages:h(N_),requestedAtMs:i(),schemaVersion:c(1)}),F_=y({jobId:a(),taskId:a(),backups:h(y({name:a(),backupPath:a(),livePath:a()})),appliedAtMs:i(),bootAttempts:i(),schemaVersion:c(1)});function I_(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 L_(e,t){let n=e.trim().toLowerCase(),r=t.trim().toLowerCase();return n===r?1:n.length===0||r.length===0?0:1-I_(n,r)/Math.max(n.length,r.length)}function R_(e,t,n=.8){let r=null,i=0;for(let a of t){let t=L_(e,a);t>=n&&t>i&&(r=a,i=t)}return r}var z_=[/^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 B_(e){return z_.some(t=>t.test(e))}function V_(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()))B_(e)&&(t.searchParams.set(e,`***`),n=!0);return n?t.toString():e}catch{return e}}var H_=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}};function U_(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 W_(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}))}function G_(e){return new Promise(t=>setTimeout(t,Math.max(0,e)))}function K_(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})})}function q_(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 J_={value:`auto`,label:`Auto`},Y_={value:`cpu`,label:`CPU`},X_=[{id:`onnx`,supports:()=>!0,devices:e=>{if(!e)return[Y_];let t=[Y_];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[J_];let t=[J_,Y_];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`},Y_),n},defaultDevice:`all`}];function Z_(e){let t=X_.find(t=>t.id===e);if(!t)throw Error(`Unknown runtime: ${e}`);return t}function Q_(e){return X_.filter(t=>t.supports(e)).map(e=>e.id)}function $_(e,t){return Z_(e).devices(t)}function ev(e){return Z_(e).defaultDevice}function tv(e){return Un(e)}function nv(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})}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 rv=t({ACCESSORY_LABEL:()=>cr,ALL_CAPABILITY_DEFINITIONS:()=>C_,APPLE_SA_TO_MACRO:()=>tr,AUDIO_BACKEND_CHOICES:()=>Jl,AUDIO_MACRO_LABELS:()=>$n,AccessoriesStatusSchema:()=>bm,AccessoryKind:()=>N,AddBrokerInputSchema:()=>df,AddonAutoUpdateSchema:()=>Hm,AddonListItemSchema:()=>Im,AddonPageDeclarationSchema:()=>dl,AddonPageInfoSchema:()=>ll,AdoptionAdoptInputSchema:()=>$u,AdoptionAdoptResultSchema:()=>ed,AdoptionFilterSchema:()=>Ku,AdoptionGetCandidateInputSchema:()=>Xu,AdoptionListCandidatesInputSchema:()=>Ju,AdoptionListCandidatesOutputSchema:()=>Yu,AdoptionReleaseInputSchema:()=>td,AdoptionStatusSchema:()=>Zu,AgentLoadSummarySchema:()=>sp,AirQualitySensorStatusSchema:()=>Cr,AlarmArmModeSchema:()=>Nr,AlarmPanelStatusSchema:()=>Pr,AlarmStateSchema:()=>Mr,AlertSchema:()=>Hl,AlertSeveritySchema:()=>zl,AlertSourceSchema:()=>Vl,AlertStatusSchema:()=>Bl,AmbientLightSensorStatusSchema:()=>Ir,ApiKeyRecordSchema:()=>Af,ApiKeySummarySchema:()=>l_,ArchiveEntrySchema:()=>uu,ArchiveManifestSchema:()=>du,AudioAnalysisResultSchema:()=>Gl,AudioAnalysisSettingsSchema:()=>Kl,AudioChunkInputSchema:()=>Na,AudioClassSummarySchema:()=>Rr,AudioClassificationLabelSchema:()=>Fa,AudioClassificationResultSchema:()=>ql,AudioCodecInfoSchema:()=>Ql,AudioDecodeSessionConfigSchema:()=>$l,AudioEncodeSchema:()=>dn,AudioEncodeSessionConfigSchema:()=>eu,AudioEncodedChunkSchema:()=>nu,AudioEventSchema:()=>Uf,AudioLevelSchema:()=>Pa,AudioMetricsHistoryPointSchema:()=>Br,AudioMetricsHistorySchema:()=>Vr,AudioMetricsSnapshotSchema:()=>zr,AudioPcmChunkSchema:()=>tu,AuthResultSchema:()=>au,AutoUpdateSettingsSchema:()=>Vm,AutomationControlStatusSchema:()=>Ur,AvailableIntegrationTypeSchema:()=>yh,BACKEND_TO_FORMAT:()=>In,BATTERY_DEVICE_PROFILE:()=>dr,BackupDestinationInfoSchema:()=>su,BackupEntrySchema:()=>lu,BaseAddon:()=>Ge,BaseDevice:()=>gc,BaseDeviceProvider:()=>Tc,BatteryStatusSchema:()=>Gr,BinaryStatusSchema:()=>qr,BoundingBoxSchema:()=>z,BrightnessStatusSchema:()=>Yr,BrokerAddInputSchema:()=>bu,BrokerAudioClientSchema:()=>ri,BrokerClientsSchema:()=>si,BrokerConnectionDetailsSchema:()=>uf,BrokerConsumerAttributionSchema:()=>ai,BrokerConsumerKindSchema:()=>ii,BrokerDecodedClientSchema:()=>ni,BrokerEncodedClientSchema:()=>oi,BrokerGetStateInputSchema:()=>Nu,BrokerInfoSchema:()=>lf,BrokerProviderInfoSchema:()=>_u,BrokerPublishInputSchema:()=>ku,BrokerRegistryStatusSchema:()=>gu,BrokerRtspClientSchema:()=>ti,BrokerStatsSchema:()=>xt,BrokerStatusEnum:()=>mu,BrokerStatusSchema:()=>bt,BrokerSubscribeInputSchema:()=>Au,BrokerSubscribeResultSchema:()=>ju,BrokerTestConnectionResultSchema:()=>Cu,BrokerUnsubscribeInputSchema:()=>Mu,CAM_PROFILE_ORDER:()=>et,CAPABILITY_NAMES:()=>x_,CAPABILITY_ROUTER_KEYS:()=>S_,CAP_NAMES_WITH_STATUS:()=>w_,CAP_NODE_PIN_CONTEXT_KEY:()=>xn,CAP_PROVIDER_KIND_MAP:()=>A_,COCO_80_LABELS:()=>Xn,COCO_TO_MACRO:()=>Qn,CamProfileSchema:()=>w,CamStreamDescriptorSchema:()=>Jg,CamStreamKindSchema:()=>tt,CamStreamResolutionSchema:()=>T,CameraAssignmentStatusSchema:()=>fp,CameraAudioStatusSchema:()=>Sp,CameraBrokerProfileSchema:()=>pp,CameraBrokerStatusSchema:()=>mp,CameraCredentialsSchema:()=>nh,CameraCredentialsStatusSchema:()=>rh,CameraDecoderShmSchema:()=>hp,CameraDecoderStatusSchema:()=>gp,CameraDetectionPhaseSchema:()=>bp,CameraDetectionProvisioningSchema:()=>yp,CameraDetectionProvisioningStateSchema:()=>vp,CameraDetectionStatusSchema:()=>xp,CameraMetricsSchema:()=>Ba,CameraMetricsWithDeviceIdSchema:()=>Va,CameraMotionStatusSchema:()=>_p,CameraRecordingModeSchema:()=>Cp,CameraRecordingStatusSchema:()=>wp,CameraSourceStatusSchema:()=>dp,CameraSourceStreamSchema:()=>up,CameraStatusSchema:()=>Tp,CameraStreamSchema:()=>nt,CandidateQueryFilterSchema:()=>qu,CapScopeSchema:()=>Of,CapabilityBindingsSchema:()=>lp,CarbonMonoxideStatusSchema:()=>yi,ChargingStatus:()=>sr,ClientNetworkStatsSchema:()=>Vh,ClimateControlStatusSchema:()=>Si,ClipPlaybackSchema:()=>pm,ClipSchema:()=>fm,ClusterAddonNodeDeploymentSchema:()=>Xh,ClusterAddonStatusEntrySchema:()=>Zh,CollectionColumnSchema:()=>Mp,CollectionIndexSchema:()=>Np,ColorStatusSchema:()=>Di,ConfigEntrySchema:()=>_d,ConfigSectionWithValuesSchema:()=>vl,ConfigTabDeclarationSchema:()=>_l,ConnectivityStatusSchema:()=>ki,ConsumableItemSchema:()=>ji,ConsumablesStatusSchema:()=>Mi,ContactStatusSchema:()=>Pi,ControlKindSchema:()=>Ii,ControlStatusSchema:()=>Li,ConvertArtifactSchema:()=>Te,ConvertResultSchema:()=>Ee,ConvertTargetSchema:()=>Ce,CoverStateSchema:()=>Bi,CoverStatusSchema:()=>Vi,CreateApiKeyInputSchema:()=>u_,CreateApiKeyResultSchema:()=>d_,CreateIntegrationInputSchema:()=>xh,CreateScopedTokenInputSchema:()=>p_,CreateScopedTokenResultSchema:()=>m_,CreateUserInputSchema:()=>s_,CustomActionInputSchema:()=>$m,CustomModelDescriptorSchema:()=>zu,DATAPLANE_SECRET_HEADER:()=>Gt,DEFAULT_ADDON_PLACEMENT:()=>Oe,DEFAULT_AUDIO_ANALYZER_CONFIG:()=>Yl,DEFAULT_DECODER_HWACCEL_CONFIG:()=>Hu,DEFAULT_FEATURES:()=>an,DEFAULT_RETENTION:()=>gn,DEVICE_CAP_NAMES:()=>D_,DEVICE_PROFILES:()=>fr,DEVICE_SETTINGS_CONTRIBUTION_METHODS:()=>Or,DEVICE_STATUS_METHOD:()=>kr,DEVICE_TYPE_INFO:()=>ar,DecodedAudioChunkSchema:()=>_t,DecodedFrameSchema:()=>ft,DecoderAssignmentSchema:()=>op,DecoderSessionConfigSchema:()=>ln,DecoderStatsSchema:()=>cn,DeleteIntegrationResultSchema:()=>Ch,DetectionSourceSchema:()=>Vf,DetectorOutputSchema:()=>$a,DeviceCodeSeveritySchema:()=>ba,DeviceConfig:()=>mr,DeviceDiscoveryStatusSchema:()=>Yi,DeviceExportExposeInputSchema:()=>dd,DeviceExportStatusSchema:()=>cd,DeviceExportUnexposeInputSchema:()=>fd,DeviceFeature:()=>or,DeviceInfoSchema:()=>gd,DeviceNetworkStatsSchema:()=>Hh,DeviceRole:()=>M,DeviceRuntimeState:()=>hr,DeviceStatusSchema:()=>yr,DeviceType:()=>j,DiscoveredChildDeviceSchema:()=>L,DiscoveredChildStatusSchema:()=>Ji,DiscoveredDeviceSchema:()=>vc,DisposerChain:()=>De,DoorbellPressEventSchema:()=>Qi,DoorbellStatusSchema:()=>Zi,ElementConfigStore:()=>Pn,EmbeddingInfoSchema:()=>Od,EmbeddingResultSchema:()=>Dd,EncodeProfileSchema:()=>fn,EncodedPacketSchema:()=>dt,EnrichedWidgetMetadataSchema:()=>Dl,EnumSensorDateTimeFormatSchema:()=>ea,EnumSensorStatusSchema:()=>ta,EventCategory:()=>S,EventEmitterStatusSchema:()=>ia,EventFireSchema:()=>ra,EventItemSchema:()=>lh,EventKindSchema:()=>Ff,EventSourceType:()=>_n,ExportSetupFieldSchema:()=>od,ExportSetupSchema:()=>sd,ExposedDeviceSchema:()=>ud,ExposedResourceSchema:()=>Op,FanControlStatusSchema:()=>sa,FanDirectionSchema:()=>oa,FeatureManifestSchema:()=>e_,FeatureProbeStatusSchema:()=>xr,FloodStatusSchema:()=>la,FrameHandleFormatSchema:()=>mt,FrameHandleSchema:()=>pt,FrameInputSchema:()=>R,GasStatusSchema:()=>da,GetStreamWithCodecInputSchema:()=>di,GlobalMetricsSchema:()=>cp,HF_BASE_URL:()=>yn,HF_REPO:()=>vn,HWACCEL_OPTIONS:()=>Vu,HealthStatusSchema:()=>t_,HistoryPointSchema:()=>lc,HistoryResolutionEnum:()=>sc,HumidifierStatusSchema:()=>pa,HumiditySensorStatusSchema:()=>ha,HvacModeSchema:()=>xi,ImageStatusSchema:()=>_a,InstalledPackageSchema:()=>Lm,IntegrationLiteSchema:()=>vh,IntegrationWithStateSchema:()=>_h,IntercomAbilitySchema:()=>Th,IntercomStatusSchema:()=>Eh,KNOWN_CAP_NAMES:()=>E_,LabelDefinitionSchema:()=>ve,LawnMowerActivitySchema:()=>ya,LawnMowerControlStatusSchema:()=>xa,LocateSegmentResultSchema:()=>Gg,LocationStatSchema:()=>fu,LockControlStatusSchema:()=>wa,LockStateSchema:()=>Ca,LogEntrySchema:()=>Pd,LogLevelSchema:()=>Nd,LogStreamEntrySchema:()=>Zm,MACRO_LABELS:()=>Zn,METHOD_ACCESS_MAP:()=>T_,MODEL_FORMATS:()=>ye,MaskGridDimsSchema:()=>Ho,MaskGridShapeSchema:()=>Lo,MaskLineShapeSchema:()=>Ro,MaskPointSchema:()=>Po,MaskPolygonShapeSchema:()=>Io,MaskPolygonVerticesSchema:()=>Vo,MaskRectShapeSchema:()=>Fo,MaskShapeKindSchema:()=>Bo,MaskShapeSchema:()=>zo,MediaFileSchema:()=>Gf,MediaPlayerRepeatSchema:()=>Da,MediaPlayerStateSchema:()=>Ea,MediaPlayerStatusSchema:()=>ka,MeshPeerSchema:()=>Lh,MeshStatusSchema:()=>Rh,MethodAccessSchema:()=>Tf,ModelCatalogEntrySchema:()=>Se,ModelConvertInputSchema:()=>tf,ModelConvertMetadataSchema:()=>we,ModelDistributeInputSchema:()=>rf,ModelDistributeResultSchema:()=>af,ModelExtraFileSchema:()=>be,ModelFormatEntrySchema:()=>x,ModelFormatsSchema:()=>xe,MotionAnalysisResultSchema:()=>La,MotionEventSchema:()=>Bf,MotionOnMotionChangedDataSchema:()=>ko,MotionRegionSchema:()=>Ia,MotionSourceEnum:()=>bo,MotionSourcesSchema:()=>xo,MotionStatusSchema:()=>Oo,MotionTriggerRuntimeStateSchema:()=>Mo,MotionTriggerStatusSchema:()=>jo,MotionZoneOptionsSchema:()=>Go,MotionZonePatchSchema:()=>Ko,MotionZoneRegionSchema:()=>Uo,MotionZoneStatusSchema:()=>Wo,MqttBrokerStatusSchema:()=>_f,NativeDetectionSchema:()=>Yo,NativeObjectClassEnum:()=>Jo,NativeObjectDetectionRuntimeStateSchema:()=>Zo,NativeObjectDetectionStatusSchema:()=>Xo,NetworkAccessStatusSchema:()=>bf,NetworkAddressSchema:()=>n_,NetworkEndpointSchema:()=>yf,NotificationHistoryEntrySchema:()=>Il,NotificationRuleSchema:()=>Pl,NotificationSchema:()=>Cf,NotifierStatusSchema:()=>ns,NumericSensorStatusSchema:()=>os,OauthIntegrationDescriptorSchema:()=>Mf,ObjectEventSchema:()=>Hf,OrchestratorMetricsSchema:()=>za,OsdOverlayKindEnum:()=>ig,OsdOverlayPatchSchema:()=>cg,OsdOverlaySchema:()=>og,OsdPositionEnum:()=>ag,OsdStatusSchema:()=>sg,PIPELINE_FLOW_CAPABILITY_NAMES:()=>y_,PIPELINE_OWNER_CAPABILITY_NAMES:()=>b_,PROVIDER_KIND_CAP_NAMES:()=>j_,PYTHON_SCRIPT:()=>Rn,PackageUpdateSchema:()=>Rm,PackageVersionInfoSchema:()=>zm,PasskeySummarySchema:()=>um,PcmSampleFormatSchema:()=>Zl,PerScopeBreakdownSchema:()=>ic,PickStreamPreferencesSchema:()=>gi,PickStreamRequirementsSchema:()=>hi,PickedCamStreamSchema:()=>_i,PipelineAssignmentSchema:()=>ap,PipelineDefaultStepSchema:()=>Ga,PipelineEngineChoiceSchema:()=>B,PipelineRunResultBridge:()=>ho,PipelineStepInputSchema:()=>V,PlaceholderReasonSchema:()=>ci,PolygonPointSchema:()=>vo,PowerMeterStatusSchema:()=>cs,PresenceStatusSchema:()=>ds,PressureSensorStatusSchema:()=>ps,PrivacyMaskOptionsSchema:()=>vs,PrivacyMaskPatchSchema:()=>ys,PrivacyMaskRegionSchema:()=>gs,PrivacyMaskShapeSchema:()=>hs,PrivacyMaskStatusSchema:()=>_s,ProfileRtspEntrySchema:()=>St,ProfileSlotSchema:()=>it,ProfileSlotStatusSchema:()=>rt,ProviderStatusSchema:()=>_c,PtzAutotrackRuntimeStateSchema:()=>ws,PtzAutotrackSettingsSchema:()=>xs,PtzAutotrackStatusSchema:()=>Cs,PtzAutotrackTargetOptionSchema:()=>Ss,PtzMoveCommandSchema:()=>Mg,PtzPositionSchema:()=>jg,PtzPresetSchema:()=>Ag,PtzStatusSchema:()=>Ng,QueryFilterSchema:()=>Ap,RECOGNITION_TYPES:()=>sn,RUNTIME_DEFAULTS:()=>bn,RUNTIME_TO_FORMAT:()=>Ln,RawStateResultSchema:()=>sh,ReadSegmentBytesResultSchema:()=>Kg,ReadinessRegistry:()=>Ht,ReadinessTimeoutError:()=>zt,RecordingAvailabilitySchema:()=>zg,RecordingBandModeSchema:()=>kt,RecordingBandSchema:()=>jt,RecordingBandTriggersSchema:()=>At,RecordingConfigSchema:()=>E,RecordingDaysSchema:()=>Bg,RecordingDeviceUsageSchema:()=>Hg,RecordingLocationUsageSchema:()=>Ug,RecordingManifestSchema:()=>Vg,RecordingModeSchema:()=>Et,RecordingRangeSchema:()=>Rg,RecordingRetentionSchema:()=>Nt,RecordingRuleSchema:()=>Mt,RecordingScheduleSchema:()=>Tt,RecordingStatusSchema:()=>Lg,RecordingStorageModeSchema:()=>Dt,RecordingStorageUsageSchema:()=>Wg,RecordingTriggersSchema:()=>Ot,RecordingWeekdaySchema:()=>Ct,RegisteredStreamSchema:()=>Dp,ReportMotionInputSchema:()=>So,RingBuffer:()=>H_,RtpSourceSchema:()=>fi,RtspRestreamEntrySchema:()=>ei,RunnerCameraConfigSchema:()=>Co,RunnerCameraDeviceUIFields:()=>wo,RunnerLocalLoadSchema:()=>To,RunnerLocalMetricsSchema:()=>Eo,SCOPE_PRESETS:()=>k_,SOURCE_INFO_METADATA_KEY:()=>Ki,STREAM_PROFILE_META:()=>Xg,STREAM_QUALITY_LABELS:()=>Jt,SUB_DETECTION_TYPES:()=>on,SYSTEM_CAP_NAMES:()=>O_,ScopedTokenSchema:()=>jf,ScopedTokenSummarySchema:()=>f_,ScoredObjectEventSchema:()=>Yf,ScriptRunnerStatusSchema:()=>Es,SearchResultSchema:()=>Bm,SendEmailInputSchema:()=>Fp,SendEmailResultSchema:()=>Ip,SettingsPatchSchema:()=>yl,SettingsRecordSchema:()=>jp,SettingsSchemaWithValuesSchema:()=>X,SettingsUpdateResultSchema:()=>bl,ShmRingStatsSchema:()=>Uu,SmokeStatusSchema:()=>Os,SmtpStatusSchema:()=>Lp,SnapshotImageSchema:()=>zp,SourceInfoSchema:()=>I,SpatialDetectionSchema:()=>Ma,SsoBridgeClaimsSchema:()=>Up,StartEmbeddedInputSchema:()=>hf,StorageAbortUploadInputSchema:()=>nm,StorageBeginDownloadInputSchema:()=>rm,StorageBeginDownloadResultSchema:()=>im,StorageBeginUploadInputSchema:()=>Qp,StorageBeginUploadResultSchema:()=>$p,StorageEndDownloadInputSchema:()=>om,StorageFinalizeUploadInputSchema:()=>tm,StorageLocationDeclarationSchema:()=>qt,StorageLocationRefSchema:()=>k,StorageLocationSchema:()=>O,StorageLocationTypeSchema:()=>Kt,StorageProviderInfoSchema:()=>Xp,StorageReadChunkInputSchema:()=>am,StorageTestLocationResultSchema:()=>Zp,StorageWriteChunkInputSchema:()=>em,StreamCodecSchema:()=>mi,StreamFormatSchema:()=>Zr,StreamInfoSchema:()=>Qr,StreamNetworkStatsSchema:()=>Bh,StreamParamsOptionsSchema:()=>Ps,StreamParamsStatusSchema:()=>Ms,StreamProfileConfigSchema:()=>js,StreamProfileOptionsSchema:()=>Ns,StreamProfilePatchSchema:()=>Fs,StreamProfileSchema:()=>As,StreamSourceEntrySchema:()=>lt,StreamSourceSchema:()=>ut,SubscribeAudioChunksInputSchema:()=>vt,SubscribeAudioChunksResultSchema:()=>yt,SubscribeFramesInputSchema:()=>ht,SubscribeFramesResultSchema:()=>gt,SwitchStatusSchema:()=>Ls,SystemMetricsSchema:()=>$d,SystemMirror:()=>il,TIMEZONES:()=>Qe,TamperStatusSchema:()=>zs,TankStatusSchema:()=>Ks,TemperatureSensorStatusSchema:()=>Vs,TestConnectionResultSchema:()=>bh,ToastSchema:()=>i_,TokenScopeSchema:()=>Z,TopologyNodeSchema:()=>Jh,TopologyProcessSchema:()=>Gh,TopologyServiceSchema:()=>Wh,TrackSchema:()=>Rf,TrackStateSchema:()=>Pf,TrackedDetectionSchema:()=>Jf,TurnServerSchema:()=>cm,UnifiedBrokerInfoSchema:()=>hu,UpdateIntegrationInputSchema:()=>Sh,UpdateStatusSchema:()=>Us,UpdateUserInputSchema:()=>c_,UserRecordSchema:()=>kf,UserSummarySchema:()=>o_,VacuumControlStatusSchema:()=>qs,VacuumStateSchema:()=>Gs,ValveStateSchema:()=>Ys,ValveStatusSchema:()=>Xs,VibrationStatusSchema:()=>Qs,VideoEncodeSchema:()=>un,WELL_KNOWN_TABS:()=>Fe,WELL_KNOWN_TAB_MAP:()=>Ie,WaterHeaterStatusSchema:()=>ec,WeatherStatusSchema:()=>nc,WebrtcStreamChoiceSchema:()=>vm,WebrtcStreamTargetSchema:()=>_m,WidgetHostEnum:()=>Sl,WidgetMetadataSchema:()=>Tl,WidgetRemoteSchema:()=>wl,WidgetSizeEnum:()=>Cl,YAMNET_TO_MACRO:()=>er,ZoneKindEnum:()=>_o,ZoneRuleModeEnum:()=>dc,ZoneRuleSchema:()=>J,ZoneRuleStageEnum:()=>pc,ZoneRulesArraySchema:()=>fc,ZoneSchema:()=>H,ZoneScopeBreakdownSchema:()=>ac,accessoriesCapability:()=>xm,accessoryStableId:()=>lr,addonPagesCapability:()=>ul,addonPagesSourceCapability:()=>fl,addonRoutesCapability:()=>gl,addonSettingsCapability:()=>xl,addonWidgetsCapability:()=>Ol,addonWidgetsSourceCapability:()=>El,addonsCapability:()=>eh,adminUiCapability:()=>jl,advancedNotifierCapability:()=>Rl,airQualitySensorCapability:()=>wr,alarmPanelCapability:()=>Fr,alertsCapability:()=>Ul,ambientLightSensorCapability:()=>Lr,applyTransform:()=>Bc,asBoolean:()=>kn,asJsonArray:()=>En,asJsonObject:()=>Tn,asNumber:()=>On,asString:()=>Dn,audioAnalysisCapability:()=>Wl,audioAnalyzerCapability:()=>Xl,audioCodecCapability:()=>iu,audioMetricsCapability:()=>Hr,authProviderCapability:()=>ou,autoAssignProfiles:()=>rn,automationControlCapability:()=>Wr,backupCapability:()=>pu,batteryCapability:()=>Kr,bestLocationMatch:()=>R_,binaryCapability:()=>Jr,bindAddonActions:()=>q_,brightnessCapability:()=>Xr,brokerCapability:()=>Pu,buildAddonRouteProvider:()=>qe,buildStreamParamsConfigSchema:()=>Qg,buttonCapability:()=>th,cameraCredentialsCapability:()=>ih,cameraPipelineConfigCapability:()=>Fu,cameraStreamsCapability:()=>vi,carbonMonoxideCapability:()=>bi,cellsToRects:()=>W_,classifyStream:()=>Qt,classifyStreams:()=>Zt,climateControlCapability:()=>Ci,colorCapability:()=>Oi,connectivityCapability:()=>Ai,consumablesCapability:()=>Ni,contactCapability:()=>Fi,controlCapability:()=>zi,cosineSimilarity:()=>Nn,coverCapability:()=>Hi,createDeviceProxy:()=>Jc,createDurableState:()=>We,createEvent:()=>He,createLazyTrpcSource:()=>Gc,createMirrorSource:()=>Kc,createRuntimeStateBridge:()=>vr,createSliceHandle:()=>Y,createSystemProxy:()=>Qc,customAction:()=>Lu,customModelRegistryCapability:()=>Bu,decoderCapability:()=>Wu,defaultDeviceFor:()=>ev,defineCustomActions:()=>Iu,detectionPipelineCapability:()=>Gu,deviceAdoptionCapability:()=>id,deviceCustomAction:()=>Ru,deviceDiscoveryCapability:()=>Xi,deviceExportCapability:()=>pd,deviceManagerCapability:()=>Td,deviceMatchesProfile:()=>ur,deviceOpsCapability:()=>ch,deviceProviderCapability:()=>Cc,deviceStateCapability:()=>Ed,deviceStatusCapability:()=>br,doorbellCapability:()=>$i,embeddingEncoderCapability:()=>kd,emitDownForOwnedCaps:()=>Wt,emitReadiness:()=>Ue,encodeProfileFromStreamShape:()=>pn,enumSensorCapability:()=>na,enumerateSchemaFields:()=>Uc,errMsg:()=>Kn,evaluateZoneRules:()=>Yc,event:()=>F,eventEmitterCapability:()=>aa,eventsCapability:()=>uh,expandCapMethods:()=>Ar,extractSourceInfoFromMetadata:()=>qi,faceGalleryCapability:()=>gh,fanControlCapability:()=>ca,featureProbeCapability:()=>Sr,filesystemBrowseCapability:()=>Md,findTimezone:()=>$e,floodCapability:()=>ua,formatForBackend:()=>Hn,formatForRuntime:()=>Un,frameworkSwapConfirmSchema:()=>F_,frameworkSwapPackageSchema:()=>N_,gasCapability:()=>fa,getAudioMacroClassIds:()=>ir,getByPath:()=>Rc,getCapsByProviderKind:()=>M_,hfModelUrl:()=>Mn,humidifierCapability:()=>ma,humiditySensorCapability:()=>ga,hydrateSchema:()=>Re,imageCapability:()=>va,integrationsCapability:()=>wh,intercomCapability:()=>Oh,isAgentOnlyPlacement:()=>je,isDeployableToAgent:()=>Ae,isDeviceConfigCap:()=>jr,isEvent:()=>Ve,jobKindSchema:()=>Sm,lawnMowerControlCapability:()=>Sa,lifecycleJobSchema:()=>km,lifecycleJobScopeSchema:()=>Om,lifecycleJobStateSchema:()=>Dm,lifecycleTaskSchema:()=>Em,localNetworkCapability:()=>Fh,locationSimilarity:()=>L_,lockControlCapability:()=>Ta,logDestinationCapability:()=>Fd,makeProfileBrokerId:()=>at,makeSourceBrokerId:()=>ot,mapAudioLabelToMacro:()=>rr,maskUrlCredentials:()=>V_,mediaPlayerCapability:()=>Aa,mergeSourceInfo:()=>Wi,meshNetworkCapability:()=>zh,method:()=>P,metricsProviderCapability:()=>ef,migrateConfigToBands:()=>Rt,modelConvertCapability:()=>nf,modelDistributorCapability:()=>of,modelFormatForRuntime:()=>tv,motionCapability:()=>Ao,motionDetectionCapability:()=>Ra,motionTriggerCapability:()=>No,motionZonesCapability:()=>qo,mqttBrokerCapability:()=>vf,nativeObjectDetectionCapability:()=>Qo,networkAccessCapability:()=>Sf,networkQualityCapability:()=>Uh,nodePin:()=>Sn,nodesCapability:()=>rg,normalizeAddonInitResult:()=>Ke,normalizeUnit:()=>Gi,notificationOutputCapability:()=>wf,notifierCapability:()=>as,numericSensorCapability:()=>ss,oauthIntegrationCapability:()=>Nf,osdCapability:()=>lg,parseCameraStreamConfig:()=>nn,parseJsonArray:()=>jn,parseJsonObject:()=>An,parseJsonUnknown:()=>wn,parseProfileBrokerId:()=>st,parseStreamParamsFormPatch:()=>$g,pendingFrameworkSwapSchema:()=>P_,pickPreferredRtspEntry:()=>mn,pipelineAnalyticsCapability:()=>Zf,pipelineExecutorCapability:()=>go,pipelineOrchestratorCapability:()=>Ep,pipelineRunnerCapability:()=>Do,plateGalleryCapability:()=>pg,platformProbeCapability:()=>kg,powerMeterCapability:()=>ls,presenceCapability:()=>fs,pressureSensorCapability:()=>ms,privacyMaskCapability:()=>bs,ptzAutotrackCapability:()=>Ts,ptzCapability:()=>Fg,pythonScriptForBackend:()=>Wn,readNodePin:()=>Cn,readinessKey:()=>Bt,rebootCapability:()=>Ig,recordingCapability:()=>qg,rectsToCells:()=>U_,requiresPython:()=>Gn,resolveAddonExecution:()=>ke,resolveAddonGroup:()=>Me,resolveAddonPlacement:()=>Pe,resolveAddonRuntime:()=>Vn,resolveCapMount:()=>Tr,resolveDetectionRuntime:()=>zn,resolveDeviceProfile:()=>pr,resolveModelFormat:()=>Bn,resolveRunnerId:()=>Ne,restreamerCapability:()=>kp,runInferenceStep:()=>qn,runtimeDevices:()=>$_,scopeKey:()=>D,scoreRuntimes:()=>nv,scriptRunnerCapability:()=>Ds,selectAssignedProfileSlots:()=>ct,setByPath:()=>zc,settingsStoreCapability:()=>Pp,sleep:()=>G_,sleepCancellable:()=>K_,smokeCapability:()=>ks,smtpProviderCapability:()=>Rp,snapshotCapability:()=>Vp,snapshotProviderCapability:()=>Hp,ssoBridgeCapability:()=>Wp,storageCapability:()=>Kp,storageEvictableCapability:()=>Yp,storageProviderCapability:()=>sm,streamBrokerCapability:()=>pi,streamCatalogCapability:()=>Yg,streamParamsCapability:()=>Is,streamPixels:()=>Xt,streamQualityLabel:()=>Yt,streamingEngineCapability:()=>$r,supportedRuntimes:()=>Q_,switchCapability:()=>Rs,synthesizeSourceInfo:()=>Ui,systemCapability:()=>r_,tamperCapability:()=>Bs,taskLogEntrySchema:()=>Tm,taskPhaseSchema:()=>Cm,taskTargetSchema:()=>wm,temperatureSensorCapability:()=>Hs,toDeviceSummary:()=>wc,toStreamSourceEntry:()=>$t,toastCapability:()=>a_,turnProviderCapability:()=>lm,updateCapability:()=>Ws,userManagementCapability:()=>v_,userPasskeysCapability:()=>dm,vacuumControlCapability:()=>Js,valveCapability:()=>Zs,vibrationCapability:()=>$s,videoclipsCapability:()=>mm,waterHeaterCapability:()=>tc,weatherCapability:()=>rc,webrtcCapability:()=>gm,webrtcClientHintsSchema:()=>hm,webrtcSessionCapability:()=>ym,wiringAddonHealthSchema:()=>he,wiringHealthSnapshotSchema:()=>_e,wiringNodeHealthSchema:()=>ge,wiringProbeKindSchema:()=>pe,wiringProbeResultSchema:()=>me,zodEntriesToConfigUI:()=>Oc,zoneAnalyticsCapability:()=>uc,zoneRulesCapability:()=>mc,zonesCapability:()=>yo});export{ot as C,S as D,Ie as E,ye as O,w as S,$e as T,I as _,Lg as a,j as b,cd as c,il as d,Qc as f,Rc as g,Y as h,C_ as i,ud as l,Gc as m,A_ as n,Rh as o,Jc as p,E_ as r,bf as s,rv as t,gu as u,or as v,Qe as w,E as x,M as y};
2
+ import{a as e,r as t}from"./rolldown-runtime-Cyuzqnbw.js";import{t as n}from"./vite-preload-helper-zJ_50EbN.js";import{A as r,C as i,D as a,E as o,O as s,S as c,T as l,_ as u,a as d,b as f,c as ee,d as p,f as te,g as m,h,i as ne,j as re,k as g,l as ie,m as ae,n as oe,o as se,p as _,r as ce,s as le,t as ue,u as v,v as de,w as y,x as fe,y as b}from"./schemas-CuE8EXQ7.js";var pe=v([`singleton`,`device`,`widget`]),me=y({capName:a(),kind:pe,deviceId:i().optional(),reachable:m(),latencyMs:i(),error:a().optional()}),he=y({addonId:a(),caps:h(me).readonly(),widgets:h(me).readonly()}),ge=y({nodeId:a(),addons:h(he).readonly()}),_e=y({ok:m(),degraded:m(),checkedAt:a(),nodes:h(ge).readonly(),summary:y({total:i(),reachable:i(),unreachable:i()})}),ve=y({id:a(),name:a(),category:a().optional(),description:a().optional(),icon:a().optional()}),ye=[`onnx`,`coreml`,`openvino`,`tflite`,`pt`],x=y({url:a(),sizeMB:i(),isDirectory:m().optional(),files:h(a()).readonly().optional(),runtimes:h(v([`node`,`python`])).readonly().optional()}),be=y({url:a(),filename:a(),sizeMB:i()}),xe=y({onnx:x.optional(),coreml:x.optional(),openvino:x.optional(),tflite:x.optional(),pt:x.optional()}),Se=y({id:a(),name:a(),description:a(),formats:xe,inputSize:y({width:i(),height:i()}),labels:h(ve).readonly(),inputLayout:v([`nchw`,`nhwc`]).optional(),inputNormalization:v([`zero-one`,`imagenet`,`none`]).optional(),preprocessMode:v([`letterbox`,`resize`]).optional(),faceAlignment:m().optional(),extraFiles:h(be).readonly().optional()}),Ce=b(`format`,[y({format:c(`openvino`),precisions:h(v([`fp16`,`int8`])).min(1).readonly()}),y({format:c(`coreml`)})]),we=y({id:a().regex(/^[a-zA-Z0-9._-]+$/),name:a(),labels:h(ve).readonly(),inputSize:y({width:i(),height:i()}),inputLayout:v([`nchw`,`nhwc`]).optional(),inputNormalization:v([`zero-one`,`imagenet`,`none`]).optional(),preprocessMode:v([`letterbox`,`resize`]).optional(),outputFormat:v([`yolo`,`ssd`,`embedding`,`classification`,`ocr`,`segmentation`]),faceAlignment:m().optional()}),Te=y({format:v(ye),precision:v([`fp16`,`int8`]).optional(),sizeMB:i(),validated:m(),files:h(a()).readonly()}),Ee=y({entry:Se,artifacts:h(Te).readonly()}),De=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)}}}},Oe=`hub-only`;function ke(e){return{placement:e.execution?.placement??`hub-only`,group:e.execution?.group}}function Ae(e){let t=ke(e).placement;return t===`any-node`||t===`agent-only`}function je(e){return ke(e).placement===`agent-only`}function Me(e){return ke(e).group}function Ne(e,t){return e.execution?.group??t}function Pe(e){return ke(e).placement}var S=function(e){return e.SystemBoot=`system.boot`,e.SystemAddonsReady=`system.addons-ready`,e.SystemRestarting=`system.restarting`,e.SystemRestartCompleted=`system.restart-completed`,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.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.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.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.PipelineCameraUpdated=`pipeline.camera-updated`,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.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.PipelineAnalyticsTrackStarted=`pipeline-analytics.track-started`,e.PipelineAnalyticsTrackEnded=`pipeline-analytics.track-ended`,e.PipelineAnalyticsDetectionEvent=`pipeline-analytics.detection-event`,e.PipelineAnalyticsFrameTracked=`pipeline-analytics.frame-tracked`,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}({}),Fe=[{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}],Ie=Object.fromEntries(Fe.map(e=>[e.id,e]));function Le(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 Re(e,t){return{...e.tabs?{tabs:[...e.tabs]}:{},sections:e.sections.map(e=>({...e,fields:e.fields.map(e=>ze(e,t))}))}}function ze(e,t){if(Le(e))return e;if(e.type===`group`){let n=e.fields.map(e=>ze(e,t));return{...e,fields:n}}if(e.type===`sub-tabs`){let n=e.tabs.map(e=>({...e,fields:e.fields.map(e=>ze(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?Be(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;if(e.type===`password`)return{...e,value:``};let o=e.type===`textarea`&&e.isJson&&typeof a==`object`&&a?JSON.stringify(a,null,2):a;return{...e,value:o}}function Be(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 Ve(e,t){return e.category===t}function He(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 Ue(e,t){let n=t.ts??Date.now();e.emit(He(`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 We(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()))}}}var Ge=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(S.AddonStarted);let n=Ke(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(S.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._ctx?.settings?.readAddonStore()??{};return Re(r,e?{...i,...e}:i)}async updateGlobalSettings(e,t){await this._ctx?.settings?.writeAddonStore(e),await this.resolveConfig(),await this.onConfigChanged(),this.emitLifecycle(S.AddonUpdated,{level:`global`}),this.maybeAutoRestart(e,this.globalSettingsSchema())}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?Re(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{Ue(t.eventBus,{capName:n,scope:{type:`node`,nodeId:r},state:e,generation:this._readinessGeneration,sourceNodeId:r})}catch{}}async resolveModelsDir(){let{join:t}=await n(async()=>{let{join:t}=await import(`./__vite-browser-external-NEUUz2mh.js`).then(t=>e(t.default));return{join:t}},__vite__mapDeps([0,1])),{promises:r}=await n(async()=>{let{promises:t}=await import(`./__vite-browser-external-NEUUz2mh.js`).then(t=>e(t.default));return{promises:t}},__vite__mapDeps([0,1])),i=t(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.defaults};for(let n of Object.keys(this.defaults)){let r=e[n];if(r!=null){let e=typeof this.defaults[n];typeof r===e&&(t[n]=r)}}this._config=t}state(e,t,n){return We({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 We({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 Ke(e){if(e!=null)return Array.isArray(e)?{providers:e}:e}function qe(e,t){return{id:e,getRoutes:()=>t,invoke:async e=>{let n=Je(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=Xe(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 Je(e,t,n){let r=t.toUpperCase();for(let t of e){if(t.method!==r)continue;let e=Ye(t.path,n);if(e!==null)return{route:t,params:e}}return null}function Ye(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 Xe(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 C={offsetHours:1,startMonth:3,startWeekIndex:5,startWeekday:`Sunday`,startHour:2,endMonth:10,endWeekIndex:5,endWeekday:`Sunday`,endHour:3},Ze={offsetHours:1,startMonth:3,startWeekIndex:2,startWeekday:`Sunday`,startHour:2,endMonth:11,endWeekIndex:1,endWeekday:`Sunday`,endHour:2},Qe=[{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:C},{id:`Europe/Rome`,label:`Europe/Rome (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:C},{id:`Europe/Paris`,label:`Europe/Paris (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:C},{id:`Europe/Berlin`,label:`Europe/Berlin (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:C},{id:`Europe/Madrid`,label:`Europe/Madrid (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:C},{id:`Europe/Amsterdam`,label:`Europe/Amsterdam (UTC+1 / CEST)`,region:`Europe`,stdOffsetMinutes:60,dst:C},{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:Ze},{id:`America/Chicago`,label:`America/Chicago (UTC−6 / CDT)`,region:`Americas`,stdOffsetMinutes:-360,dst:Ze},{id:`America/Denver`,label:`America/Denver (UTC−7 / MDT)`,region:`Americas`,stdOffsetMinutes:-420,dst:Ze},{id:`America/Los_Angeles`,label:`America/Los Angeles (UTC−8 / PDT)`,region:`Americas`,stdOffsetMinutes:-480,dst:Ze},{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 $e(e){return Qe.find(t=>t.id===e)}var w=v([`high`,`mid`,`low`]),et=[`high`,`mid`,`low`],tt=v([`pull-rtsp`,`pull-rtmp`,`pull-http`,`pull-rfc4571`,`push-annexb`,`derived`]),T=y({width:i().int().positive(),height:i().int().positive()}),nt=y({camStreamId:a().min(1),deviceId:i().int().nonnegative(),kind:tt,url:a().optional(),codec:a().optional(),resolution:T.optional(),fps:i().positive().optional(),label:a().optional(),deviceFeatures:h(a()).optional(),autoEligible:m().optional(),metadata:o(a(),r()).optional()}),rt=v([`unassigned`,`idle`,`connecting`,`streaming`,`error`]),it=y({deviceId:i().int().nonnegative(),profile:w,brokerId:a(),sourceCamStreamId:a().nullable(),status:rt,resolution:T.optional(),codec:a().optional(),preBufferSec:i().nonnegative().optional(),errorMessage:a().optional()});function at(e,t){return`${e}/${t}`}function ot(e,t){return`${e}/${t}`}function st(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=w.safeParse(r);return i.success?{deviceId:Number(n),profile:i.data}:null}function ct(e,t){let n=[...e].filter(e=>t===void 0||e.deviceId===t).toSorted((e,t)=>et.indexOf(e.profile)-et.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 lt=y({id:a(),label:a(),protocol:v([`rtsp`,`rtmp`,`annexb`,`http-mjpeg`,`webrtc`,`custom`]),url:a().optional(),resolution:y({width:i(),height:i()}).readonly().optional(),fps:i().optional(),bitrate:i().optional(),codec:a().optional(),profileHint:w.optional()}),ut=y({type:a(),url:a(),videoCodec:a().optional(),audioCodec:a().optional(),metadata:o(a(),r()).readonly().optional()}),dt=y({type:v([`video`,`audio`]),data:p(Uint8Array),pts:i(),dts:i(),keyframe:m(),codec:a()}),ft=y({data:p(Uint8Array),width:i(),height:i(),format:v([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),timestamp:i()}),pt=y({shmId:a(),slot:i().int().nonnegative(),seq:i().int().nonnegative(),width:i().int().positive(),height:i().int().positive(),format:v([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),pts:i(),byteLength:i().int().nonnegative(),nodeId:a(),slotCount:i().int().positive()}),mt=v([`rgb`,`bgr`,`yuv420`,`gray`]),ht=y({brokerId:a(),format:mt,maxFps:i().positive().optional(),tag:a().optional()}),gt=y({subscriptionId:a(),maxFps:i().nonnegative()}),_t=y({data:p(Uint8Array),sampleRate:i().int().positive(),channels:i().int().positive(),timestamp:i()}),vt=y({brokerId:a(),tag:a().optional()}),yt=y({subscriptionId:a()}),bt=v([`idle`,`connecting`,`streaming`,`error`,`stopped`]),xt=y({status:bt,inputFps:i(),decodeFps:i(),encodedSubscribers:i(),decodedSubscribers:i(),uptimeMs:i(),bitrateKbps:i(),idrIntervalMs:i(),codec:a().optional(),totalBytes:i(),packetCount:i(),rtspClients:i(),pipeClients:i(),preBufferSec:i(),preBufferMs:i(),preBufferPackets:i(),decoderNodeId:a().nullable(),audio:y({codec:a(),sampleRate:i(),channels:i(),supported:m()}).nullable().optional()}),St=y({profile:w,brokerId:a(),url:a(),mutedUrl:a(),enabled:m(),codec:a().optional(),resolution:T.optional()}),Ct=i().int().min(0).max(6),wt=/^([01]\d|2[0-3]):[0-5]\d$/,Tt=b(`kind`,[y({kind:c(`always`)}),y({kind:c(`timeOfDay`),start:a().regex(wt),end:a().regex(wt),days:h(Ct).optional()})]),Et=v([`continuous`,`onMotion`,`onAudioThreshold`]),Dt=v([`off`,`events`,`continuous`]),Ot=y({motion:m().optional(),audioThresholdDbfs:i().optional()}),kt=v([`continuous`,`events`]),At=Ot,jt=y({days:h(Ct),start:a().regex(wt),end:a().regex(wt),mode:kt,triggers:At.optional(),preBufferSec:i().min(0).optional(),postBufferSec:i().min(0).optional()}),Mt=y({schedule:Tt,mode:Et,preBufferSec:i().min(0).default(0),postBufferSec:i().min(0).default(0),resetTimeoutOnNewEvent:m().default(!0),thresholdDbfs:i().optional()}),Nt=y({maxAgeDays:i().min(0).optional(),maxSizeGb:i().min(0).optional()}),E=y({enabled:m(),mode:Dt.optional(),profiles:h(w).optional(),segmentSeconds:i().int().positive().optional(),schedules:h(Tt).optional(),schedule:Tt.optional(),triggers:Ot.optional(),preBufferSec:i().min(0).optional(),postBufferSec:i().min(0).optional(),rules:h(Mt).optional(),bands:h(jt).optional(),retention:Nt.optional()}),Pt=[0,1,2,3,4,5,6],Ft=`00:00`,It=`23:59`;function Lt(e,t,n){let r=e.kind===`timeOfDay`&&e.days?e.days:[...Pt],i=e.kind===`timeOfDay`?e.start:Ft,a=e.kind===`timeOfDay`?e.end:It;return t===`continuous`?{days:r,start:i,end:a,mode:t}:{days:r,start:i,end:a,mode:t,...n.triggers?{triggers:n.triggers}:{},...n.preBufferSec===void 0?{}:{preBufferSec:n.preBufferSec},...n.postBufferSec===void 0?{}:{postBufferSec:n.postBufferSec}}}function Rt(e){if(e.bands)return e.bands;if(!e.enabled||e.mode===`off`)return[];let t=e.schedules??(e.schedule?[e.schedule]:[{kind:`always`}]),n=e.mode===`continuous`?`continuous`:`events`;return t.map(t=>Lt(t,n,e))}var zt=class extends Error{capName;scope;waitedMs;constructor(e,t,n){super(`Timed out waiting for ${e} (${D(t)}) to become ready after ${n}ms`),this.name=`ReadinessTimeoutError`,this.capName=e,this.scope=t,this.waitedMs=n}};function Bt(e,t){return`${e}|${D(t)}`}function D(e){switch(e.type){case`global`:return`global`;case`node`:return`node:${e.nodeId}`;case`device`:return`device:${e.deviceId}`}}function Vt(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 Ht=class{bus;sourceNodeId;logger;now;generation;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??Ut(),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(Bt(e,t))??null}getSnapshotForTransport(){return Array.from(this.snapshot.values())}hydrate(e){let t=this.now();for(let n of e){let e=Bt(n.capName,n.scope);if(this.snapshot.has(e))continue;let r={capName:n.capName,scope:n.scope,state:n.state,generation:n.generation,epoch:1,lastChange:t,sourceNodeId:n.sourceNodeId};this.snapshot.set(e,r),this.logger&&this.logger.debug(`readiness: ${n.capName} (${D(n.scope)}) → ${n.state} (hydrated, gen=${n.generation.slice(0,6)})`);let i={capName:n.capName,scope:n.scope,state:n.state,epoch:1,generation:n.generation,sourceNodeId:`hydrated`,ts:t,durationInPrevState:0};for(let e of this.subscriptions)if(e.capName===n.capName&&Vt(e.scope,n.scope))try{e.handler(i)}catch(e){this.logger?.warn(`readiness hydrate handler threw for ${n.capName}: ${e.message??String(e)}`)}}}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 zt(e,t,this.now()-i)))},r):null,u=setInterval(()=>{s||this.logger?.warn(`readiness: still awaiting ${e} (${D(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(He(`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=Bt(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.logger&&this.logger.debug(`readiness: ${e.capName} (${D(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&&Vt(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.logger&&this.logger.debug(`readiness: ${r.capName} (${D(r.scope)}) → down (synthesized from agent.offline ${e})`);for(let e of this.subscriptions)if(e.capName===r.capName&&Vt(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 Ut(){return typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2,14)}function Wt(e,t){for(let{capName:n,scope:r}of t)e.emitDown(n,r)}var Gt=`x-camstack-dataplane-secret`,Kt=a().regex(/^[a-z][a-zA-Z0-9-]*$/),O=y({id:a().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),type:a(),displayName:a().min(1),providerId:a().min(1),config:o(a(),r()),nodeId:a().optional(),isDefault:m().default(!1),isSystem:m().default(!1),createdAt:i(),updatedAt:i()}),k=g([Kt,a().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/)]),qt=y({id:a().regex(/^[a-z][a-zA-Z0-9-]*$/,{message:`id must start with a lowercase letter and contain only letters, digits, or hyphens`}),displayName:a().min(1,{message:`displayName must not be empty`}),description:a().optional(),cardinality:v([`single`,`multi`]),defaultsTo:a().optional()}),Jt={high:`High`,mid:`Mid`,low:`Low`};function Yt(e){return Jt[e]??e.charAt(0).toUpperCase()+e.slice(1)}function Xt(e){return(e.width??0)*(e.height??0)}function Zt(e){if(e.length===0)return[];let t=e.map((e,t)=>({s:e,i:t,px:Xt(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 Qt(e){let t=e.height??0,n=e.width??0;return t>=1080||n>=1920?`high`:t>=480||n>=640?`mid`:`low`}function $t(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 A(e){return typeof e==`string`}function en(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function tn(e){return A(e)&&e.trim()?{url:e}:en(e)&&A(e.url)&&e.url.trim()?{url:e.url,label:A(e.label)?e.label:void 0}:null}function nn(e){let t=A(e.snapshot_url)?e.snapshot_url:void 0;if(Array.isArray(e.streams)){let n=[];for(let t of e.streams){let e=tn(t);e&&n.push(e)}return{streams:n,snapshot_url:t}}let n=[],r=A(e.main_stream_url)?e.main_stream_url:void 0;r&&n.push({url:r,label:A(e.main_stream_name)?e.main_stream_name:void 0});let i=A(e.sub_stream_url)?e.sub_stream_url:void 0;i&&n.push({url:i,label:A(e.sub_stream_name)?e.sub_stream_name:void 0});let a=A(e.third_stream_url)?e.third_stream_url:void 0;return a&&n.push({url:a,label:A(e.third_stream_name)?e.third_stream_name:void 0}),{streams:n,snapshot_url:t}}function rn(e){if(e.length===0)return{};let t=Zt(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 an={streaming:!0,notifications:!0,objectDetection:!1,remoteAccess:!0,agentCluster:!1,smartHome:!0,recordings:!0,backup:!0,repl:!0},on=[`face`,`plate`],sn=[`face`,`plate`,`clip`,`custom`],cn=y({inputFps:i(),outputFps:i(),avgDecodeTimeMs:i(),droppedFrames:i()}),ln=y({codec:a(),maxFps:i().default(0),outputFormat:v([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]).default(`jpeg`),scale:i().default(1),width:i().optional(),height:i().optional(),deviceId:i().int().nonnegative().optional(),tag:a().optional(),frameSink:v([`callback`,`shm`]).default(`callback`)}),un=y({codec:v([`h264`,`h265`,`copy`]),profile:v([`baseline`,`main`,`high`]).optional(),width:i().int().positive().optional(),height:i().int().positive().optional(),fps:i().positive().optional(),bitrateKbps:i().int().positive().optional(),gopFrames:i().int().positive().optional(),bf:i().int().min(0).optional(),preset:v([`ultrafast`,`superfast`,`veryfast`,`faster`,`fast`,`medium`]).optional(),tune:v([`zerolatency`,`film`,`animation`]).optional()}),dn=g([c(`passthrough`),y({codec:v([`opus`,`aac`,`pcmu`,`pcma`,`copy`]),bitrateKbps:i().int().positive().optional(),sampleRateHz:i().int().positive().optional(),channels:g([c(1),c(2)]).optional()})]),fn=y({video:un,audio:dn,inputArgs:h(a()).optional(),outputArgs:h(a()).optional()});function pn(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`}}function mn(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=hn(e,s);if(t)return a(t)}}return a(o[0])}function hn(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 gn={cleanupIntervalMs:3600*1e3,detectionEventsDays:30,audioLevelsDays:7,snapshotsDays:14},_n=function(e){return e.Addon=`addon`,e.Core=`core`,e.Device=`device`,e.Provider=`provider`,e.System=`system`,e}({}),vn=`camstack/camstack-models`,yn=`https://huggingface.co/${vn}/resolve/main`,bn={"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":`24h`},xn=`__camstackNodePin`;function Sn(e){return{context:{[xn]:e}}}function Cn(e){if(typeof e!=`object`||!e)return;let t=Reflect.get(e,xn);return typeof t==`string`?t:void 0}function wn(e){return JSON.parse(e)}function Tn(e){return typeof e!=`object`||!e||Array.isArray(e)?null:{...e}}function En(e){return Array.isArray(e)?e:[]}function Dn(e,t=``){return typeof e==`string`?e:t}function On(e,t=0){return typeof e==`number`?e:t}function kn(e,t=!1){return typeof e==`boolean`?e:t}function An(e){try{return Tn(wn(e))}catch{return null}}function jn(e){try{let t=wn(e);return Array.isArray(t)?t:null}catch{return null}}function Mn(e,t){return`https://huggingface.co/${e}/resolve/main/${t}`}function Nn(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 Pn=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(),Fn(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 Fn(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}var In={cpu:`onnx`,coreml:`onnx`,cuda:`onnx`,tensorrt:`onnx`,"onnx-py":`onnx`,pytorch:`pt`,openvino:`openvino`},Ln={onnx:`onnx`,coreml:`coreml`,openvino:`openvino`,tflite:`tflite`,pytorch:`pt`},Rn={coreml:`coreml_inference.py`,pytorch:`pytorch_inference.py`,openvino:`openvino_inference.py`};function zn(e,t){return e===`node`?`onnx`:{coreml:`coreml`,openvino:`openvino`,pytorch:`pytorch`,"onnx-py":`onnx`,cpu:`onnx`}[t]??t}function Bn(e,t){return e===`node`?In[t]??`onnx`:{coreml:`coreml`,openvino:`openvino`,pytorch:`pt`,"onnx-py":`onnx`,cpu:`onnx`}[t]??`onnx`}function Vn(e,t){return!e||e===`auto`?`auto`:zn(e,t??`cpu`)}function Hn(e){return In[e]??`onnx`}function Un(e){return Ln[e]}function Wn(e){return Rn[e]}function Gn(e){return e===`coreml`||e===`pytorch`||e===`openvino`}function Kn(e){return e instanceof Error?e.message:typeof e==`string`?e:String(e)}async function qn(e,t){let n=performance.now();try{return{output:t===void 0?await e():await Yn(e(),t),durationMs:Jn(performance.now()-n),ok:!0}}catch(e){return{output:void 0,durationMs:Jn(performance.now()-n),ok:!1,error:Kn(e)}}}function Jn(e){return Math.round(e*100)/100}function Yn(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 Xn=[{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`}],Zn=[{id:`person`,name:`Person`},{id:`vehicle`,name:`Vehicle`},{id:`animal`,name:`Animal`}],Qn={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`},preserveOriginal:!1},$n=[{id:`speech`,name:`Speech`,icon:`🗣️`},{id:`scream`,name:`Scream / Shout`,icon:`😱`},{id:`crying`,name:`Crying / Baby`,icon:`😢`},{id:`laughter`,name:`Laughter`,icon:`😂`},{id:`music`,name:`Music`,icon:`🎵`},{id:`dog`,name:`Dog`,icon:`🐕`},{id:`cat`,name:`Cat`,icon:`🐈`},{id:`bird`,name:`Bird`,icon:`🐦`},{id:`animal`,name:`Animal (other)`,icon:`🐾`},{id:`alarm`,name:`Alarm / Siren`,icon:`🚨`},{id:`doorbell`,name:`Doorbell / Knock`,icon:`🔔`},{id:`glass_breaking`,name:`Glass Breaking`,icon:`💥`},{id:`gunshot`,name:`Gunshot / Explosion`,icon:`💣`},{id:`vehicle`,name:`Vehicle`,icon:`🚗`},{id:`siren`,name:`Emergency Siren`,icon:`🚑`},{id:`fire`,name:`Fire / Smoke`,icon:`🔥`},{id:`water`,name:`Water`,icon:`💧`},{id:`wind`,name:`Wind / Weather`,icon:`🌬️`},{id:`door`,name:`Door`,icon:`🚪`},{id:`footsteps`,name:`Footsteps`,icon:`👣`},{id:`crowd`,name:`Crowd / Chatter`,icon:`👥`},{id:`telephone`,name:`Telephone`,icon:`📞`},{id:`engine`,name:`Engine / Motor`,icon:`⚙️`},{id:`tools`,name:`Tools / Construction`,icon:`🔨`},{id:`silence`,name:`Silence`,icon:`🤫`}],er={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},tr={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},nr=new Map;for(let[e,t]of Object.entries(er.mapping))nr.set(e.toLowerCase(),t);for(let[e,t]of Object.entries(tr.mapping))nr.set(e.toLowerCase(),t);function rr(e){return nr.get(e.toLowerCase())??null}function ir(){return $n.map(e=>e.id)}var ar={camera:{type:`camera`,label:`Camera`,icon:`camera`}},j=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.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}({}),or=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}({}),sr=function(e){return e.ChargingDC=`charging-dc`,e.ChargingSolar=`charging-solar`,e.NotCharging=`not-charging`,e}({}),M=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}({}),N={Siren:M.Siren,Floodlight:M.Floodlight,Spotlight:M.Spotlight,PirSensor:M.PirSensor,Chime:M.Chime,Autotrack:M.Autotrack,Nightvision:M.Nightvision,PrivacyMask:M.PrivacyMask},cr={[N.Siren]:`Siren`,[N.Floodlight]:`Floodlight`,[N.Spotlight]:`Spotlight`,[N.PirSensor]:`PIR`,[N.Chime]:`Chime`,[N.Autotrack]:`Autotracking`,[N.Nightvision]:`Night Vision`,[N.PrivacyMask]:`Privacy Mask`};function lr(e,t,n){let r=`${e}:${t}`;return typeof n==`number`?`${r}:${n}`:r}function ur(e,t){return!e||e.length===0?!1:e.includes(t.when.hasFeature)}var dr={id:`battery`,label:`Battery-operated camera`,when:{hasFeature:or.BatteryOperated},defaults:{audioMode:`disabled`,detectionMode:`on-motion`},settings:{"snapshot.minRefreshIntervalSec":3600,"streamBroker.preBufferEnabled":!1}},fr=[dr];function pr(e){for(let t of fr)if(ur(e,t))return t;return null}var mr=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}))}},hr=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(gr(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 gr(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 _r=`lastFetchedAt`;function vr(e){let{runtimeState:t,cap:n,ownDeviceId:r,refresh:i,staleMs:a,empty:o}=e,s=async()=>{let e=t.getCapState(n.name),r=typeof e?.[_r]==`number`?e[_r]:0;(!e||Date.now()-r>a)&&await i()},c=()=>{let e=t.getCapState(n.name);if(!e)return o();let{[_r]:r,...i}=e;return i};return{ensureFresh:s,getStatus:async({deviceId:e})=>{if(e!==r)throw Error(`${n.name}: deviceId mismatch, expected ${r}, got ${e}`);return await s(),c()}}}var yr=y({online:m(),lastChangedAt:i()}),br={name:`device-status`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onStatusChanged:{data:y({deviceId:i(),status:yr})}},status:{schema:yr,kind:`push`},runtimeState:yr},xr=y({flags:o(a(),r()),deviceType:a().nullable(),model:a().nullable(),channelCount:i().nullable(),lastProbedAt:i(),lastFetchedAt:i()}),Sr={name:`feature-probe`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{},events:{onProbeChanged:{data:y({deviceId:i(),status:xr})}},status:{schema:xr,kind:`push`},runtimeState:xr},Cr=y({co2Ppm:i().min(0).optional(),vocPpb:i().min(0).optional(),pm25:i().min(0).optional(),pm10:i().min(0).optional(),aqi:i().optional(),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),wr={name:`air-quality-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:Cr,kind:`push`},runtimeState:Cr};function Tr(e){return e.mount?e.mount:e.deviceNative===!0?{kind:`device-native`}:e.mode===`collection`?{kind:`collection`}:{kind:`singleton`}}var Er=y({id:a(),title:a(),description:a().optional(),style:v([`card`,`accordion`]).optional(),defaultCollapsed:m().optional(),columns:g([c(1),c(2),c(3),c(4)]).optional(),tab:a().optional(),location:v([`settings`,`top-tab`]).optional(),order:i().optional(),fields:h(ae())}),Dr=y({tabs:h(y({id:a(),label:a(),icon:a(),order:i().optional()})).optional(),sections:h(Er)}).nullable(),Or={getDeviceSettingsContribution:{input:y({deviceId:i()}),output:Dr,kind:`query`,auth:`protected`},getDeviceLiveContribution:{input:y({deviceId:i()}),output:Dr,kind:`query`,auth:`protected`},applyDeviceSettingsPatch:{input:y({deviceId:i(),patch:o(a(),r())}),output:y({success:c(!0)}),kind:`mutation`,auth:`admin`}},kr={getStatus:{input:y({deviceId:i()}),output:r().nullable(),kind:`query`,auth:`protected`}};function Ar(e){let t=e.methods;return e.exposesDeviceSettings&&(t={...Or,...t}),e.status&&(t={...kr,...t}),t}function P(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,...n?.access===void 0?{}:{access:n.access},timeoutMs:n?.timeoutMs}}function F(e){return{data:e}}function jr(e){return e?.deviceConfig!==void 0}var Mr=v([`disarmed`,`armed_home`,`armed_away`,`armed_night`,`armed_vacation`,`armed_custom_bypass`,`arming`,`disarming`,`pending`,`triggered`]),Nr=v([`home`,`away`,`night`,`vacation`,`custom_bypass`]),Pr=y({state:Mr,availableModes:h(Nr),requiresCode:m(),lastChangedAt:i()}),Fr={name:`alarm-panel`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.AlarmPanel],methods:{arm:P(y({deviceId:i().int().nonnegative(),mode:Nr,code:a().min(1).optional()}),_(),{kind:`mutation`,auth:`admin`}),disarm:P(y({deviceId:i().int().nonnegative(),code:a().min(1).optional()}),_(),{kind:`mutation`,auth:`admin`}),trigger:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Pr,kind:`push`},runtimeState:Pr},Ir=y({lux:i().min(0),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),Lr={name:`ambient-light-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:Ir,kind:`push`},runtimeState:Ir},Rr=y({className:a(),hits:i().int().nonnegative(),avgScore:i().min(0).max(1),peakScore:i().min(0).max(1)}),zr=y({ts:i().int(),windowSec:i().int().positive(),level:y({rms:i(),dbfs:i()}),peakDbfs:i(),avgDbfs:i(),current:y({className:a(),score:i().min(0).max(1),timestamp:i().int()}).nullable(),byClass:h(Rr).readonly()}),Br=y({ts:i().int(),dbfs:i().nullable(),peakDbfs:i(),avgDbfs:i(),topClass:a().nullable(),topScore:i().min(0).max(1).nullable()}),Vr=y({points:h(Br).readonly(),effectiveSampleEveryMs:i().int().positive(),windowMsActual:i().int().nonnegative()}),Hr={name:`audio-metrics`,scope:`device`,mode:`singleton`,deviceTypes:[j.Camera],methods:{getCurrentSnapshot:P(y({deviceId:i()}),zr.nullable()),getHistory:P(y({deviceId:i(),windowSec:i().int().positive().optional(),sampleEveryMs:i().int().positive().optional()}),Vr)},runtimeState:zr},Ur=y({enabled:m(),isRunning:m(),lastTriggeredAt:i(),lastError:a().nullable(),lastChangedAt:i()}),Wr={name:`automation-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Automation],methods:{enable:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),disable:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),trigger:P(y({deviceId:i().int().nonnegative(),skipCondition:m().optional()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Ur,kind:`push`},runtimeState:Ur},Gr=y({percentage:i().min(0).max(100),charging:v([`dc`,`solar`,`none`]),sleeping:m(),lastUpdated:i(),binary:m().optional()}),Kr={name:`battery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera,j.Sensor,j.Button,j.Switch],methods:{wakeForStream:P(y({deviceId:i(),timeoutMs:i().int().min(500).max(3e4).default(8e3)}),y({awoke:m(),durationMs:i()}),{kind:`mutation`})},events:{onStatusChanged:{data:y({deviceId:i(),status:Gr})}},status:{schema:Gr,kind:`push`},runtimeState:Gr},qr=y({on:m(),lastChangedAt:i()}),Jr={name:`binary`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:qr,kind:`push`},runtimeState:qr},Yr=y({percentage:i().min(0).max(100),lastChangedAt:i()}),Xr={name:`brightness`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Light],methods:{setBrightness:P(y({deviceId:i().int().nonnegative(),percentage:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`})},events:{onBrightnessChanged:{data:y({deviceId:i(),percentage:i().min(0).max(100),lastChangedAt:i()})}},status:{schema:Yr,kind:`command-driven`},runtimeState:Yr},Zr=v([`webrtc`,`hls`,`mjpeg`,`rtsp`]),Qr=y({streamId:a(),format:Zr,url:a().nullable(),active:m()}),$r={name:`streaming-engine`,scope:`system`,mode:`singleton`,internal:!0,methods:{registerStream:P(y({streamId:a(),sourceUrl:a(),codec:a().optional()}),_(),{kind:`mutation`}),unregisterStream:P(y({streamId:a()}),_(),{kind:`mutation`}),getStreamUrl:P(y({streamId:a(),format:Zr}),a().nullable()),listStreams:P(_(),h(Qr))},mount:{kind:`skip`}},ei=y({brokerId:a(),url:a(),mutedUrl:a(),enabled:m(),codec:a().optional(),resolution:y({width:i().int().positive(),height:i().int().positive()}).optional()}),ti=y({sessionId:a(),remoteAddr:a(),playing:m(),muted:m(),connectedAt:i(),lastRtpAt:i(),bytesSent:i()}),ni=y({tag:a(),subscribedAt:i(),maxFps:i(),framesDelivered:i(),framesDropped:i()}),ri=y({tag:a(),subscribedAt:i(),chunksDelivered:i()}),ii=v([`alexa`,`homekit`,`webrtc-browser`,`webrtc-mobile`,`webrtc-whep`,`rtsp-listen`,`derived-broker`,`recording`,`pipeline`,`snapshot`,`warmup`,`unknown`]),ai=y({kind:ii,label:a().optional(),media:v([`audio`,`video`,`both`]).optional(),targetCodec:a().optional(),transport:v([`passthrough`,`repacketize`,`transcode`]).optional(),remoteAddr:a().optional(),userAgent:a().optional(),userId:a().optional(),sessionId:a().optional(),extra:o(a(),a()).optional()}).readonly(),oi=y({id:a(),channel:v([`annexb`,`rtp`]),attribution:ai,subscribedAt:i(),packetsDelivered:i()}),si=y({rtsp:h(ti).readonly(),decoded:h(ni).readonly(),audio:h(ri).readonly(),encoded:h(oi).readonly(),pipeClients:i(),encodedSubscribers:i()}),ci=v([`reconnecting`,`sleeping`,`offline`,`disabled`,`waking`]),li=v([`h264`,`h265`,`copy`]),ui=v([`aac`,`opus`,`pcmu`,`copy`,`none`]),di=y({deviceId:i().int().nonnegative(),video:li,audio:ui.optional(),profile:w.optional(),targetResolution:y({width:i().int().positive(),height:i().int().positive()}).optional(),outputArgs:h(a()).optional(),audioEgress:m().optional(),hostname:a().optional(),tag:a().optional()}),fi=y({url:a(),videoCodec:v([`H264`,`H265`]),audioCodec:a(),resolution:y({width:i().int().positive(),height:i().int().positive()}),transcoded:m(),encoder:a(),pipelineKey:a()}),pi={name:`stream-broker`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{publishCameraStream:P(y({deviceId:i().int().nonnegative(),camStreamId:a().min(1),kind:tt,url:a().optional(),codec:a().optional(),resolution:T.optional(),fps:i().positive().optional(),label:a().optional(),deviceFeatures:h(a()).optional(),autoEligible:m().optional(),metadata:o(a(),r()).optional(),sourceCamStreamId:a().min(1).optional(),encodeProfile:fn.optional()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),retractCameraStream:P(y({deviceId:i().int().nonnegative(),camStreamId:a().min(1)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),assignProfile:P(y({deviceId:i().int().nonnegative(),profile:w,camStreamId:a().min(1)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),unassignProfile:P(y({deviceId:i().int().nonnegative(),profile:w}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),listAllCameraStreams:P(_(),h(nt).readonly()),listAllProfileSlots:P(_(),h(it).readonly()),getBrokerStats:P(y({brokerId:a()}),xt),probeStream:P(y({brokerId:a()}),y({probed:m(),summary:a()}),{kind:`mutation`,auth:`admin`}),listClients:P(y({brokerId:a()}),si),killClient:P(y({brokerId:a(),channel:v([`rtsp`,`decoded`,`audio`]),handle:a()}),y({killed:m()}),{kind:`mutation`,auth:`admin`}),restartProfile:P(y({deviceId:i().int().nonnegative(),profile:w}),y({success:m()}),{kind:`mutation`,auth:`admin`}),getStreamUrl:P(y({streamId:a(),format:Zr}),y({url:a()})),getStreamWithCodec:P(di,fi,{kind:`mutation`,auth:`admin`}),releaseStreamWithCodec:P(y({pipelineKey:a()}),y({released:m(),refcount:i().int().nonnegative()}),{kind:`mutation`,auth:`admin`}),subscribeAudioChunks:P(vt,yt,{kind:`mutation`}),pullAudioChunks:P(y({subscriptionId:a(),maxCount:i().int().positive().default(8)}),h(_t).readonly()),unsubscribeAudioChunks:P(y({subscriptionId:a()}),y({released:m()}),{kind:`mutation`}),subscribeFrames:P(ht,gt,{kind:`mutation`}),pullFrameHandles:P(y({subscriptionId:a(),maxCount:i().int().positive().default(4)}),h(pt).readonly()),unsubscribeFrames:P(y({subscriptionId:a()}),y({released:m()}),{kind:`mutation`}),setPreBufferDuration:P(y({brokerId:a(),seconds:i().min(0).max(30)}),_(),{kind:`mutation`,auth:`admin`}),getPreBufferInfo:P(y({brokerId:a()}),y({configuredSec:i(),bufferedMs:i(),packetCount:i()})),getRtspPort:P(_(),i()),getAllRtspEntries:P(y({hostname:a().optional()}),h(ei).readonly()),getRtspEntry:P(y({brokerId:a(),hostname:a().optional()}),ei.nullable()),regenerateRtspToken:P(y({brokerId:a()}),a().nullable(),{kind:`mutation`,auth:`admin`}),setRtspEnabled:P(y({brokerId:a(),enabled:m()}),_(),{kind:`mutation`,auth:`admin`}),isRtspEnabled:P(y({brokerId:a()}),m())},events:{onCamStreamDemand:F(y({deviceId:i().int().nonnegative(),camStreamId:a(),profile:w})),onCamStreamIdle:F(y({deviceId:i().int().nonnegative(),camStreamId:a()})),onRequestStreamSourceRefresh:F(y({deviceId:i().int().nonnegative(),camStreamId:a(),brokerId:a()}))}},mi=v([`h264`,`h265`,`hevc`,`av1`,`mjpeg`,`vp8`,`vp9`]),hi=y({acceptCodecs:h(mi).readonly().optional(),minHeight:i().int().positive().optional(),minWidth:i().int().positive().optional(),excludeDerived:m().optional(),requireSiblingCodec:h(mi).readonly().optional()}).readonly(),gi=y({preferredProviders:h(a()).readonly().optional(),resolutionPreference:v([`highest`,`lowest`]).optional()}).readonly(),_i=y({camStreamId:a(),codec:a().optional(),resolution:T.optional(),reason:a()}),vi={name:`camera-streams`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[j.Camera],methods:{getCameraStreams:P(y({deviceId:i().int().nonnegative()}),h(nt).readonly()),getBrokerStreams:P(y({deviceId:i().int().nonnegative()}),h(it).readonly()),getRtspEntries:P(y({deviceId:i().int().nonnegative(),hostname:a().optional()}),h(ei).readonly()),getProfileRtspEntries:P(y({deviceId:i().int().nonnegative(),hostname:a().optional()}),h(St).readonly()),pickStream:P(y({deviceId:i().int().nonnegative(),requirements:hi,preferences:gi.optional()}),_i.nullable())},events:{onCamStreamsChanged:F(y({deviceId:i().int().nonnegative(),camStreams:h(nt).readonly()})),onProfileSlotsChanged:F(y({deviceId:i().int().nonnegative(),profileSlots:h(it).readonly()}))},runtimeState:y({online:m(),slotStatuses:y({high:rt.optional(),mid:rt.optional(),low:rt.optional()}),slotErrors:y({high:a().optional(),mid:a().optional(),low:a().optional()}),lastChangedAt:i()})},yi=y({detected:m(),lastChangedAt:i()}),bi={name:`carbon-monoxide`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:yi,kind:`push`},runtimeState:yi},xi=v([`off`,`heat`,`cool`,`auto`,`heat_cool`,`fan_only`,`dry`]),Si=y({mode:xi,availableModes:h(xi),fanMode:a(),availableFanModes:h(a()),preset:a(),availablePresets:h(a()),target:i().nullable(),targetHigh:i().nullable(),targetLow:i().nullable(),targetHumidity:i().min(0).max(100).nullable(),currentTemp:i().nullable(),currentHumidity:i().min(0).max(100).nullable(),swingVertical:m().nullable(),swingHorizontal:m().nullable(),lastFetchedAt:i()}),Ci={name:`climate-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Thermostat],methods:{setMode:P(y({deviceId:i().int().nonnegative(),mode:xi}),_(),{kind:`mutation`,auth:`admin`}),setFanMode:P(y({deviceId:i().int().nonnegative(),fanMode:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),setPreset:P(y({deviceId:i().int().nonnegative(),preset:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),setTarget:P(y({deviceId:i().int().nonnegative(),target:i()}),_(),{kind:`mutation`,auth:`admin`}),setTargetRange:P(y({deviceId:i().int().nonnegative(),targetLow:i(),targetHigh:i()}),_(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:P(y({deviceId:i().int().nonnegative(),targetHumidity:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setSwingVertical:P(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`}),setSwingHorizontal:P(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Si,kind:`push`},runtimeState:Si},wi=y({r:i().int().min(0).max(255),g:i().int().min(0).max(255),b:i().int().min(0).max(255)}),Ti=y({h:i().min(0).max(360),s:i().min(0).max(100),v:i().min(0).max(100)}),Ei=b(`mode`,[y({mode:c(`rgb`),rgb:wi}),y({mode:c(`hsv`),hsv:Ti}),y({mode:c(`mired`),mireds:i().int().min(50).max(1e3)})]),Di=y({mode:v([`rgb`,`hsv`,`mired`]),rgb:wi.optional(),hsv:Ti.optional(),mireds:i().int().optional(),lastChangedAt:i()}),Oi={name:`color`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Light],methods:{setColor:P(y({deviceId:i().int().nonnegative(),color:Ei}),_(),{kind:`mutation`,auth:`admin`})},events:{onColorChanged:{data:y({deviceId:i(),mode:v([`rgb`,`hsv`,`mired`]),rgb:wi.optional(),hsv:Ti.optional(),mireds:i().int().optional(),lastChangedAt:i()})}},status:{schema:Di,kind:`command-driven`},runtimeState:Di},ki=y({connected:m(),lastChangedAt:i()}),Ai={name:`connectivity`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:ki,kind:`push`},runtimeState:ki},ji=y({key:a().min(1),label:a().min(1),level:i().min(0).max(100).nullable(),status:v([`ok`,`replace`]).nullable(),lastResetAt:i().nullable(),resettable:m()}),Mi=y({items:h(ji),lastChangedAt:i()}),Ni={name:`consumables`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera,j.Hub,j.Light,j.Siren,j.Switch,j.Sensor,j.Thermostat,j.Button,j.EventEmitter,j.Update,j.Generic,j.Notifier,j.Script,j.Automation,j.Lock,j.Cover,j.Valve,j.Humidifier,j.WaterHeater,j.Fan,j.MediaPlayer,j.AlarmPanel,j.Control,j.Presence,j.Weather,j.Vacuum,j.LawnMower,j.Container,j.Image],deviceConfig:{ui:{kind:`widget`,widgetId:`host/consumables-panel`,tab:`consumables`,topTab:!0,label:`Consumables`,order:5}},methods:{reset:P(y({deviceId:i().int().nonnegative(),key:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Mi,kind:`push`},runtimeState:Mi.extend({lastFetchedAt:i()})},Pi=y({entryOpen:m(),lastChangedAt:i()}),Fi={name:`contact`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:Pi,kind:`push`},runtimeState:Pi},Ii=v([`numeric`,`select`,`text`,`datetime`]),Li=y({kind:Ii,value:g([i(),a()]),options:h(a()),lastChangedAt:i(),unit:a().optional(),min:i().optional(),max:i().optional(),step:i().optional(),precision:i().int().min(0).max(10).optional(),format:v([`date`,`time`,`datetime`]).optional()}),Ri=b(`kind`,[y({kind:c(`numeric`),value:i()}),y({kind:c(`select`),value:a().min(1)}),y({kind:c(`text`),value:a()}),y({kind:c(`datetime`),value:a().min(1)})]),zi={name:`control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Control],methods:{setValue:P(y({deviceId:i().int().nonnegative(),control:Ri}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Li,kind:`push`},runtimeState:Li},Bi=v([`open`,`opening`,`closing`,`closed`,`stopped`]),Vi=y({state:Bi,position:i().min(0).max(100).nullable(),tiltPosition:i().min(0).max(100).nullable(),lastChangedAt:i()}),Hi={name:`cover`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Cover],methods:{open:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),close:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),stop:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),setPosition:P(y({deviceId:i().int().nonnegative(),position:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setTiltPosition:P(y({deviceId:i().int().nonnegative(),tiltPosition:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Vi,kind:`push`},runtimeState:Vi},I=y({id:a(),system:a(),uniqueId:a().optional(),raw:o(a(),r()).optional()});function Ui(e){return{id:e.stableId,system:e.addonId}}function Wi(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 Gi(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 Ki=`sourceInfo`;function qi(e){if(!e)return null;let t=e[Ki];if(!t)return null;let n=I.safeParse(t);return n.success?n.data:null}var Ji=v([`online`,`sleeping`,`offline`,`unknown`]),L=fe(()=>y({childNativeId:a(),name:a(),type:v(j),status:Ji,metadata:y({model:a().optional(),serialNumber:a().optional(),uid:a().optional(),rtspChannel:i().int().nonnegative().optional(),isBattery:m().optional(),isDoorbell:m().optional(),isMultifocal:m().optional(),externalLocation:a().optional(),manufacturer:a().optional(),integration:a().optional()}).default({}),alreadyAdopted:m(),adoptedDeviceId:i().int().nonnegative().nullable(),capabilities:h(a()).readonly().optional(),features:h(a()).readonly().optional(),sourceInfo:I.optional(),children:h(L).readonly().optional()})),Yi=y({discovered:h(L),lastDiscoveryAt:i().int().nonnegative().nullable(),lastError:a().nullable()}),Xi={name:`device-discovery`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Hub],status:{schema:Yi,kind:`poll`},runtimeState:Yi.extend({lastFetchedAt:i().int().nonnegative()}),methods:{listDiscovered:P(y({deviceId:i().int().nonnegative()}),h(L).readonly()),refreshDiscovery:P(y({deviceId:i().int().nonnegative()}),h(L).readonly(),{kind:`mutation`,auth:`admin`}),adoptDevice:P(y({deviceId:i().int().nonnegative(),childNativeId:a(),name:a().optional()}),y({deviceId:i().int().nonnegative(),stableId:a()}),{kind:`mutation`,auth:`admin`}),releaseDevice:P(y({deviceId:i().int().nonnegative(),childDeviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})}},Zi=y({lastPressedAt:i().nullable(),pressCountSinceStart:i()}),Qi=y({deviceId:i(),timestamp:i()}),$i={name:`doorbell`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Button],methods:{},events:{onPressed:{data:Qi}},status:{schema:Zi,kind:`push`},runtimeState:Zi},ea=v([`date`,`time`,`datetime`]),ta=y({value:a(),format:ea.optional(),lastFetchedAt:i()}),na={name:`enum-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:ta,kind:`push`},runtimeState:ta},ra=y({deviceId:i(),eventType:a(),data:o(a(),r()).nullable(),timestamp:i(),seq:i()}),ia=y({eventTypes:h(a()),lastEvent:ra.nullable(),eventCountSinceStart:i()}),aa={name:`event-emitter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.EventEmitter],methods:{},events:{onEvent:{data:ra}},status:{schema:ia,kind:`push`},runtimeState:ia},oa=v([`forward`,`reverse`]),sa=y({percentage:i().min(0).max(100).nullable(),percentageStep:i().positive().optional(),preset:a(),availablePresets:h(a()),direction:oa.nullable(),oscillating:m().nullable(),lastChangedAt:i()}),ca={name:`fan-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Fan],methods:{setPercentage:P(y({deviceId:i().int().nonnegative(),percentage:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setPreset:P(y({deviceId:i().int().nonnegative(),preset:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),setDirection:P(y({deviceId:i().int().nonnegative(),direction:oa}),_(),{kind:`mutation`,auth:`admin`}),setOscillating:P(y({deviceId:i().int().nonnegative(),oscillating:m()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:sa,kind:`push`},runtimeState:sa},la=y({flooded:m(),lastChangedAt:i()}),ua={name:`flood`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:la,kind:`push`},runtimeState:la},da=y({detected:m(),lastChangedAt:i()}),fa={name:`gas`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:da,kind:`push`},runtimeState:da},pa=y({on:m(),currentHumidity:i().min(0).max(100).nullable(),targetHumidity:i().min(0).max(100).nullable(),mode:a().nullable(),availableModes:h(a()),action:a().nullable(),minHumidity:i().nullable(),maxHumidity:i().nullable(),lastChangedAt:i()}),ma={name:`humidifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Humidifier],methods:{setOn:P(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`}),setTargetHumidity:P(y({deviceId:i().int().nonnegative(),humidity:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setMode:P(y({deviceId:i().int().nonnegative(),mode:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:pa,kind:`push`},runtimeState:pa},ha=y({percent:i().min(0).max(100),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),ga={name:`humidity-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor,j.Thermostat],methods:{},status:{schema:ha,kind:`push`},runtimeState:ha},_a=y({url:a().nullable(),lastUpdated:i().nullable()}),va={name:`image`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Image],methods:{},status:{schema:_a,kind:`push`},runtimeState:_a},ya=v([`idle`,`mowing`,`paused`,`docked`,`error`]),ba=v([`info`,`warning`,`error`]),xa=y({activity:ya,batteryLevel:i().min(0).max(100).nullable(),progressPercent:i().min(0).max(100).nullable(),currentCode:i().nullable(),currentCodeLabel:a().nullable(),severity:ba,lastChangedAt:i()}),Sa={name:`lawn-mower-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.LawnMower],methods:{startMowing:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),pause:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),dock:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:xa,kind:`push`},runtimeState:xa},Ca=v([`locked`,`unlocked`,`locking`,`unlocking`,`jammed`]),wa=y({state:Ca,lastChangedAt:i()}),Ta={name:`lock-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Lock],methods:{lock:P(y({deviceId:i().int().nonnegative(),code:a().min(1).optional()}),_(),{kind:`mutation`,auth:`admin`}),unlock:P(y({deviceId:i().int().nonnegative(),code:a().min(1).optional()}),_(),{kind:`mutation`,auth:`admin`}),open:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:wa,kind:`push`},runtimeState:wa},Ea=v([`off`,`on`,`idle`,`playing`,`paused`,`buffering`,`standby`]),Da=v([`off`,`all`,`one`]),Oa=y({type:a(),title:a(),artist:a().optional(),album:a().optional(),imageUrl:a().optional()}),ka=y({state:Ea,volumeLevel:i().min(0).max(100).nullable(),isMuted:m().nullable(),source:a(),availableSources:h(a()),currentMedia:Oa.nullable(),positionMs:i().int().nonnegative().nullable(),durationMs:i().int().nonnegative().nullable(),shuffle:m().nullable(),repeat:Da.nullable(),lastChangedAt:i()}),Aa={name:`media-player`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.MediaPlayer],methods:{play:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),pause:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),stop:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),next:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),previous:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),seek:P(y({deviceId:i().int().nonnegative(),positionMs:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),setVolume:P(y({deviceId:i().int().nonnegative(),volumeLevel:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`}),setMute:P(y({deviceId:i().int().nonnegative(),muted:m()}),_(),{kind:`mutation`,auth:`admin`}),setShuffle:P(y({deviceId:i().int().nonnegative(),shuffle:m()}),_(),{kind:`mutation`,auth:`admin`}),setRepeat:P(y({deviceId:i().int().nonnegative(),repeat:Da}),_(),{kind:`mutation`,auth:`admin`}),selectSource:P(y({deviceId:i().int().nonnegative(),source:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),playMedia:P(y({deviceId:i().int().nonnegative(),mediaId:a().min(1),mediaType:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:ka,kind:`push`},runtimeState:ka},ja=v([`jpeg`,`rgb`,`bgr`,`yuv420`,`gray`]),R=y({data:u(),format:ja,width:i(),height:i(),timestamp:i()}),z=y({x:i(),y:i(),w:i(),h:i()}),Ma=y({class:a(),originalClass:a(),score:i(),bbox:z}),Na=y({data:p(Uint8Array),sampleRate:i(),channels:i(),timestamp:i(),deviceId:i().optional()}),Pa=y({rms:i(),dbfs:i()}),Fa=y({className:a(),originalClass:a().optional(),score:i()}),Ia=y({bbox:z,pixelCount:i(),intensity:i()}),La=y({detected:m(),regionCount:i(),regions:h(Ia).readonly(),rawRegions:h(Ia).readonly(),frameWidth:i(),frameHeight:i(),analysisMs:i()}),Ra={name:`motion-detection`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,exposesDeviceSettings:!0,methods:{analyze:P(y({deviceId:i(),frame:R}),La,{kind:`mutation`}),removeCamera:P(y({deviceId:i()}),_(),{kind:`mutation`}),reset:P(_(),_(),{kind:`mutation`})},events:{onMotion:{data:y({deviceId:i(),detected:m(),regionCount:i()})}}},za=y({activeCameras:i(),throttledCameras:i(),avgInferenceTimeMs:i(),queueDepth:i()}),Ba=y({detectionMode:v([`disabled`,`always-on`,`on-motion`]),configuredFps:i(),actualFps:i(),queueDepth:i(),avgInferenceTimeMs:i(),droppedFrames:i(),phase:v([`idle`,`watching`,`active`])}),Va=Ba.extend({deviceId:i()}),Ha=v([`onnx`,`coreml`,`openvino`,`tflite`,`pt`]),Ua=v([`detector`,`cropper`,`classifier`,`refiner`,`audio-classifier`]),B=y({runtime:v([`node`,`python`]),backend:a(),format:Ha,device:a().optional()}),Wa=y({engine:B,devices:h(y({id:a(),label:a(),description:a().optional()})).readonly(),defaultDevice:a()}),Ga=fe(()=>y({addonId:a(),addonName:a(),slot:Ua,inputClasses:h(a()).readonly(),outputClasses:h(a()).readonly(),enabled:m(),modelId:a(),children:h(Ga).readonly(),engine:B.optional(),group:a().optional(),settings:o(a(),r()).optional()})),Ka=fe(()=>y({addonId:a(),enabled:m(),modelId:a(),children:h(Ka).readonly(),settings:o(a(),r()).optional()})),qa=y({id:a(),name:a(),createdAt:a(),updatedAt:a(),engine:B,steps:h(Ka).readonly()}),Ja=y({id:a(),name:a(),formats:o(a(),y({downloaded:m(),sizeMB:i()}))}),Ya=u(),Xa=y({id:a(),name:a(),slot:Ua,inputClasses:h(a()).readonly(),outputClasses:h(a()).readonly(),childSlots:h(Ua).readonly(),models:h(Ja).readonly(),defaultModelId:a(),defaultModelIdByFormat:o(a(),a()).optional(),enabledByDefault:m().optional(),defaultConfidence:i(),group:a().optional(),configSchema:h(Ya).readonly().optional()}),Za=y({id:Ua,label:a(),priority:i(),parentSlot:Ua.nullable(),addons:h(Xa).readonly()}),Qa=y({availableEngines:h(Wa).readonly(),selectedEngine:B,slots:h(Za).readonly()}),$a=y({detections:h(Ma).readonly(),inferenceMs:i(),modelId:a()}),eo=y({runtimeId:v([`onnx`,`openvino`,`coreml`]).nullable(),device:a().nullable(),state:v([`idle`,`installing`,`verifying`,`ready`,`failed`]),progress:i().optional(),error:a().optional(),nextRetryAt:i().optional()}),V=fe(()=>y({addonId:a(),modelId:a(),enabled:m().default(!0),children:h(V).optional(),settings:o(a(),r()).optional()})),to=y({filename:a(),stepIds:h(a()).readonly().optional()}),no=y({base64:a(),filename:a()}),ro=y({filename:a(),sizeKb:i()}),io=y({base64:a()}),ao=y({id:a(),name:a(),description:a(),available:m(),rawLabels:h(a()).readonly().optional()}),oo=y({activeBackend:a(),availableBackends:h(ao).readonly(),sampleRate:i(),chunkDurationMs:i()}),so=y({filePath:a(),sizeMB:i(),durationMs:i()}),co=y({success:m(),error:a().optional(),frame:u().optional()}),lo=u(),uo=u(),fo=u(),po=u(),mo=u(),ho=u(),go={name:`pipeline-executor`,scope:`system`,mode:`singleton`,methods:{getAvailableEngines:P(_(),h(B)),getSelectedEngine:P(_(),B),getDefaultSteps:P(B,h(Ga)),reprobeEngine:P(_(),B,{kind:`mutation`,auth:`admin`}),getEngineProvisioning:P(y({nodeId:a()}),eo),getVideoPipelineSteps:P(_(),o(a(),y({modelId:a(),settings:o(a(),r()).readonly()}))),setVideoPipelineSteps:P(y({steps:o(a(),y({modelId:a(),settings:o(a(),r()).readonly()}))}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),getSchema:P(_(),Qa),getGlobalSteps:P(_(),h(Ga).readonly().nullable()),getGlobalPipelineConfig:P(_(),lo),getOrchestratorConfigSchema:P(_(),uo),listTemplates:P(_(),h(qa).readonly()),saveTemplate:P(y({name:a(),steps:h(Ka).readonly(),engine:B}),qa,{kind:`mutation`}),updateTemplate:P(y({id:a(),name:a().optional(),steps:h(Ka).readonly().optional()}),qa,{kind:`mutation`}),deleteTemplate:P(y({id:a()}),_(),{kind:`mutation`}),getCapabilities:P(_(),po),getAddonModels:P(y({addonId:a()}),mo),downloadModel:P(y({addonId:a(),modelId:a(),format:Ha}),so,{kind:`mutation`}),deleteModel:P(y({addonId:a(),modelId:a(),format:Ha}),y({success:c(!0)}),{kind:`mutation`}),detect:P(y({addonId:a(),frame:R,config:o(a(),r()).optional()}),$a),runPipeline:P(y({engine:B.optional(),steps:h(V).min(1),frame:R.optional(),imageBase64:a().optional(),image:p(Uint8Array).optional(),referenceImage:a().optional(),deviceId:i().optional(),sessionId:a().optional()}),ho,{kind:`mutation`}),runPipelineBatch:P(y({engine:B.optional(),steps:h(V).min(1),frames:h(R).min(1).max(255),deviceId:i().optional(),sessionId:a().optional()}),y({results:h(ho).readonly()}),{kind:`mutation`}),cacheFrameInPool:P(y({data:p(Uint8Array),width:i().int().positive(),height:i().int().positive(),format:v([`rgb`,`bgr`,`gray`])}),y({frameId:i(),width:i(),height:i()}),{kind:`mutation`}),inferCached:P(y({stepId:a(),frameId:i().int()}),o(a(),r()),{kind:`mutation`}),uncacheFrame:P(y({frameId:i().int()}),_(),{kind:`mutation`}),getEffectiveTuning:P(_(),y({batchMode:a(),windowMs:i(),maxBatchSize:i(),concurrency:i()})),listLoadedEngines:P(_(),h(y({engineKey:a(),engine:B,modelsLoaded:h(a()).readonly(),inUseByCameras:h(i()).readonly(),kind:v([`runtime`,`warm-override`]),poolPid:i().nullable(),idleMs:i().nullable(),idleTtlMs:i().nullable()})).readonly()),spinEngine:P(y({engine:B}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),killEngine:P(y({engine:B,force:m().optional()}),y({success:m(),reason:a().optional()}),{kind:`mutation`,auth:`admin`}),listReferenceImages:P(_(),h(to).readonly()),getReferenceImage:P(y({filename:a()}),no.nullable()),getReferenceAudioFiles:P(_(),h(ro).readonly()),getReferenceAudio:P(y({filename:a()}),io.nullable()),getAudioCapabilities:P(_(),oo),runAudioTest:P(y({addonId:a(),modelId:a(),filename:a().optional(),settings:o(a(),r()).optional()}),co,{kind:`mutation`}),getDetectionConfigSchema:P(_(),fo)}},_o=v([`polygon`,`tripwire`]),vo=y({x:i(),y:i()}),H=y({id:a(),name:a(),kind:_o.default(`polygon`),polygon:h(vo).readonly(),color:a().default(`#3b82f6`)}),yo={name:`zones`,scope:`device`,mode:`singleton`,deviceTypes:[j.Camera],methods:{listZones:P(y({deviceId:i()}),h(H).readonly()),addZone:P(y({deviceId:i(),zone:H}),_(),{kind:`mutation`,auth:`admin`}),removeZone:P(y({deviceId:i(),zoneId:a()}),_(),{kind:`mutation`,auth:`admin`}),updateZone:P(y({deviceId:i(),zone:H}),_(),{kind:`mutation`,auth:`admin`})},runtimeState:y({zones:h(H).readonly()})},U={min:0,max:6e4,default:3e4,step:500},W={min:1,max:30,default:4,step:1},G={min:1,max:30,default:10,step:1},K={min:0,max:300,default:30,step:5},q={min:1,max:10,default:4,step:1},bo=v([`onboard`,`analyzer`]),xo=h(bo),So=y({deviceId:i(),detected:m(),source:bo.default(`analyzer`),regions:h(Ia).readonly().optional()}),Co=y({deviceId:i(),detectionMode:v([`disabled`,`always-on`,`on-motion`]).default(`on-motion`),audioMode:v([`disabled`,`always-on`,`on-motion`]).default(`always-on`),motionCooldownMs:i().min(U.min).default(U.default),motionFps:i().min(W.min).max(W.max).default(W.default),detectionFps:i().min(G.min).max(G.max).default(G.default),motionStreamId:a(),detectionStreamId:a(),motionSources:xo.default([`analyzer`]),pipelineEnabled:m().default(!0),engine:B.optional(),steps:h(V).readonly().optional(),audio:y({engine:B,modelId:a(),enabled:m()}).nullable().optional(),zones:h(H).readonly().default([]),onboardMotionDrivesAnalyzer:m().default(!0),occupancyRecheckSec:i().min(K.min).max(K.max).default(K.default),occupancyRecheckFrames:i().min(q.min).max(q.max).default(q.default)}),wo=[{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:W.min,max:W.max,step:W.step,default:W.default,showValue:!0,unit:`fps`,showWhen:{field:`motionSources`,includes:`analyzer`}},{key:`detectionFps`,type:`slider`,label:`Detection FPS`,min:G.min,max:G.max,step:G.step,default:G.default,showValue:!0,unit:`fps`},{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:U.min,max:U.max,step:U.step,default:U.default,showValue:!0,unit:`s`,displayScale:1e3},{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:`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. 0 = disabled.`,min:K.min,max:K.max,step:K.step,default:K.default,showValue:!0,unit:`s`},{key:`occupancyRecheckFrames`,type:`slider`,label:`Occupancy re-check frames`,description:`Number of frames sampled per occupancy re-check burst.`,min:q.min,max:q.max,step:q.step,default:q.default,showValue:!0}],To=y({nodeId:a(),attachedCameras:i(),activeCameras:i(),avgInferenceFps:i(),avgInferenceTimeMs:i(),queueDepthTotal:i(),hardware:y({hasGpu:m(),inferenceBackend:a().optional(),cpuCores:i().optional()})}),Eo=y({nodeId:a(),activeCameras:i(),throttledCameras:i(),avgInferenceTimeMs:i(),queueDepth:i()}),Do={name:`pipeline-runner`,scope:`system`,mode:`singleton`,methods:{attachCamera:P(Co,y({success:c(!0)}),{kind:`mutation`}),detachCamera:P(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`}),reportMotion:P(So,y({success:c(!0)}),{kind:`mutation`}),getLocalLoad:P(_(),To),getLocalMetrics:P(_(),Eo),getCameraMetrics:P(y({deviceId:i()}),Ba.nullable()),getAllCameraMetrics:P(_(),h(Va).readonly()),getLocalCameras:P(_(),h(i()).readonly())}},Oo=y({detected:m(),lastDetectedAt:i().nullable(),autoClearAfterMs:i().nullable()}),ko=y({deviceId:i(),detected:m(),timestamp:i(),source:bo,regions:h(Ia).readonly().optional()}),Ao={name:`motion`,scope:`device`,mode:`singleton`,deviceTypes:[j.Camera,j.Sensor],methods:{isDetected:P(y({deviceId:i()}),m())},events:{onMotionChanged:{data:ko}},status:{schema:Oo,kind:`push`},runtimeState:Oo},jo=y({enabled:m(),lastChangedAt:i()}),Mo=jo.extend({lastFetchedAt:i()}),No={name:`motion-trigger`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Light,j.Siren,j.Switch],methods:{setMotionTrigger:P(y({deviceId:i().int().nonnegative(),enabled:m()}),_(),{kind:`mutation`,auth:`admin`})},events:{onMotionTriggerChanged:{data:y({deviceId:i(),enabled:m(),lastChangedAt:i()})}},status:{schema:jo,kind:`command-driven`},runtimeState:Mo},Po=y({x:i(),y:i()}),Fo=y({kind:c(`rect`),x:i(),y:i(),width:i(),height:i()}),Io=y({kind:c(`polygon`),points:h(Po)}),Lo=y({kind:c(`grid`),gridWidth:i(),gridHeight:i(),cells:h(m())}),Ro=y({kind:c(`line`),points:h(Po)}),zo=b(`kind`,[Fo,Io,Lo,Ro]),Bo=v([`rect`,`polygon`,`grid`,`line`]),Vo=y({min:i(),max:i()}),Ho=y({width:i(),height:i()}),Uo=y({id:i(),enabled:m(),shape:Lo}),Wo=y({enabled:m(),sensitivity:i(),regions:h(Uo),lastFetchedAt:i()}),Go=y({maxRegions:i(),supportedShapes:h(Bo),grid:Ho,sensitivity:y({min:i(),max:i(),step:i()})}),Ko=y({enabled:m().optional(),sensitivity:i().optional(),regions:h(Uo).optional()}),qo={name:`motion-zones`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/motion-zones-grid`,tab:`motion`,label:`Motion Zones`}},methods:{getOptions:P(y({deviceId:i()}),Go),setZone:P(y({deviceId:i(),patch:Ko}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Wo,kind:`poll`},runtimeState:Wo},Jo=v([`person`,`vehicle`,`animal`,`face`,`package`,`other`]),Yo=y({class:Jo,timestamp:i(),confidence:i().min(0).max(1).optional()}),Xo=y({lastByClass:l(Jo,Yo.nullable()),supportedClasses:h(Jo).readonly(),enabled:m()}),Zo=Xo.extend({lastFetchedAt:i()}),Qo={name:`native-object-detection`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],methods:{setEnabled:P(y({deviceId:i(),enabled:m()}),_(),{kind:`mutation`,auth:`admin`})},events:{onDetected:{data:y({deviceId:i(),detection:Yo})}},status:{schema:Xo,kind:`push`},runtimeState:Zo},$o=v([`min`,`low`,`normal`,`high`]),es=y({id:a().min(1),title:a().min(1),uri:re().optional(),destructive:m().optional()}),ts=y({image:m(),priority:m(),data:m(),actions:m(),recipients:m()}),ns=y({lastSentAt:i(),lastError:a().nullable(),queueDepth:i().int().nonnegative(),supports:ts}),rs=y({deviceId:i().int().nonnegative(),title:a().optional(),body:a().min(1),image:a().optional(),priority:$o.optional(),channel:a().optional(),recipients:h(a()).optional(),actions:h(es).optional(),data:o(a(),r()).optional()}),is=y({notificationId:a(),acceptedAt:i()}),as={name:`notifier`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Notifier],methods:{send:P(rs,is,{kind:`mutation`,auth:`admin`}),cancel:P(y({deviceId:i().int().nonnegative(),notificationId:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},events:{onSent:{data:y({deviceId:i(),notificationId:a(),success:m(),error:a().nullable(),acceptedAt:i()})}},status:{schema:ns,kind:`command-driven`},runtimeState:ns},os=y({value:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional(),lastFetchedAt:i()}),ss={name:`numeric-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:os,kind:`push`},runtimeState:os},cs=y({watts:i().optional(),kwhTotal:i().optional(),volts:i().optional(),amps:i().optional(),va:i().optional(),powerFactor:i().min(0).max(1).optional(),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),ls={name:`power-meter`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:cs,kind:`push`},runtimeState:cs},us=y({latitude:i().min(-90).max(90),longitude:i().min(-180).max(180),accuracyMeters:i().nonnegative()}),ds=y({state:a(),location:a().nullable(),gps:us.nullable(),batteryPercent:i().min(0).max(100).nullable(),lastChangedAt:i()}),fs={name:`presence`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Presence],methods:{},status:{schema:ds,kind:`push`},runtimeState:ds},ps=y({hpa:i(),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),ms={name:`pressure-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:ps,kind:`push`},runtimeState:ps},hs=b(`kind`,[Fo,Io]),gs=y({id:i(),enabled:m(),shape:hs}),_s=y({enabled:m(),regions:h(gs),lastFetchedAt:i()}),vs=y({maxRegions:i(),supportedShapes:h(Bo),polygonVertices:Vo.optional()}),ys=y({enabled:m().optional(),regions:h(gs).optional()}),bs={name:`privacy-mask`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/privacy-mask-grid`,tab:`image`,label:`Privacy Mask`}},methods:{getOptions:P(y({deviceId:i()}),vs),setMask:P(y({deviceId:i(),patch:ys}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:_s,kind:`poll`},runtimeState:_s},xs=y({targetType:a().describe(`Vendor target string (people/vehicle/pet); empty = camera default`),stopDelaySeconds:i().int().min(0).max(300),disappearDelaySeconds:i().int().min(0).max(300)}),Ss=y({value:a(),label:a()}),Cs=y({enabled:m(),lastChangedAt:i(),currentSettings:xs.nullable(),supportedTargetTypes:h(Ss)}),ws=Cs.extend({lastFetchedAt:i()}),Ts={name:`ptz-autotrack`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-autotrack`,tab:`ptz`,topTab:!0,label:`Auto-Tracking`,order:5}},methods:{getStatus:P(y({deviceId:i()}),Cs),setEnabled:P(y({deviceId:i(),enabled:m()}),_(),{kind:`mutation`}),getSettings:P(y({deviceId:i()}),xs.nullable()),setSettings:P(y({deviceId:i(),settings:xs.partial()}),_(),{kind:`mutation`})},events:{onStatusChanged:{data:y({deviceId:i(),status:Cs})}},status:{schema:Cs,kind:`command-driven`},runtimeState:ws},Es=y({isRunning:m(),lastRunAt:i(),lastRunSuccess:m().nullable(),lastError:a().nullable(),lastChangedAt:i()}),Ds={name:`script-runner`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Script],methods:{run:P(y({deviceId:i().int().nonnegative(),variables:o(a(),r()).optional()}),_(),{kind:`mutation`,auth:`admin`}),stop:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Es,kind:`push`},runtimeState:Es},Os=y({detected:m(),lastChangedAt:i()}),ks={name:`smoke`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:Os,kind:`push`},runtimeState:Os},As=v([`main`,`sub`,`ext`]),js=y({width:i(),height:i(),codec:v([`h264`,`h265`]),framerate:i(),bitrate:i(),bitrateMode:v([`vbr`,`cbr`]).optional(),encoderProfile:v([`high`,`main`,`baseline`]).optional(),gop:i().optional(),audio:m().optional()}),Ms=y({main:js.optional(),sub:js.optional(),ext:js.optional(),lastFetchedAt:i()}),Ns=y({resolutions:h(y({width:i(),height:i()})),codecs:h(v([`h264`,`h265`])),framerates:h(i()),bitrates:h(i()),bitrateRange:s([i(),i()]).optional(),supportsBitrateMode:m(),supportsEncoderProfile:m(),supportsGop:m(),gop:y({min:i(),max:i(),step:i()}).optional()}),Ps=y({main:Ns.optional(),sub:Ns.optional(),ext:Ns.optional()}),Fs=y({width:i().optional(),height:i().optional(),codec:v([`h264`,`h265`]).optional(),framerate:i().optional(),bitrate:i().optional(),bitrateMode:v([`vbr`,`cbr`]).optional(),encoderProfile:v([`high`,`main`,`baseline`]).optional(),gop:i().optional(),audio:m().optional()}),Is={name:`stream-params`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],deviceConfig:{ui:{kind:`derived-form`,builderId:`stream-params`,tab:`streaming`}},methods:{getOptions:P(y({deviceId:i()}),Ps),setProfile:P(y({deviceId:i(),profile:As,patch:Fs}),_(),{kind:`mutation`,auth:`admin`}),getConfigSchema:P(y({deviceId:i()}),r().nullable())},status:{schema:Ms,kind:`poll`},runtimeState:Ms},Ls=y({on:m(),lastChangedAt:i()}),Rs={name:`switch`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Switch,j.Siren,j.Light],methods:{setState:P(y({deviceId:i(),on:m()}),_(),{kind:`mutation`,auth:`admin`})},events:{onStateChanged:{data:y({deviceId:i(),on:m(),lastChangedAt:i()})}},status:{schema:Ls,kind:`command-driven`},runtimeState:Ls,settings:{bindings:[{kind:`scalar`,statusPath:`on`,method:`setState`,valueArg:`on`,field:{label:`On`,kind:`boolean`}}]}},zs=y({tampered:m(),lastChangedAt:i()}),Bs={name:`tamper`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:zs,kind:`push`},runtimeState:zs},Vs=y({celsius:i(),lastFetchedAt:i(),unit:a().optional(),precision:i().int().min(0).max(10).optional()}),Hs={name:`temperature-sensor`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor,j.Thermostat],methods:{},status:{schema:Vs,kind:`push`},runtimeState:Vs},Us=y({currentVersion:a().nullable(),availableVersion:a().nullable(),updatable:m(),state:a().nullable(),inProgress:m()}),Ws={name:`update`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Update],methods:{installUpdate:P(_(),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Us,kind:`poll`},runtimeState:Us},Gs=v([`idle`,`cleaning`,`paused`,`returning`,`docked`,`drying`,`error`]),Ks=y({level:i().min(0).max(100).nullable(),status:v([`ok`,`low`,`full`]).nullable()}),qs=y({state:Gs,batteryLevel:i().min(0).max(100).nullable(),fanSpeed:a().nullable(),availableFanSpeeds:h(a()),cleanWater:Ks.nullable(),dirtyWater:Ks.nullable(),detergent:Ks.nullable(),dustBin:Ks.nullable(),progressPercent:i().min(0).max(100).nullable(),errorCode:i().nullable(),errorLabel:a().nullable(),lastChangedAt:i()}),Js={name:`vacuum-control`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Vacuum],methods:{start:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),pause:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),stop:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),returnToBase:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),locate:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),setFanSpeed:P(y({deviceId:i().int().nonnegative(),speed:a().min(1)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:qs,kind:`push`},runtimeState:qs},Ys=v([`open`,`opening`,`closing`,`closed`,`stopped`]),Xs=y({state:Ys,position:i().min(0).max(100).nullable(),lastChangedAt:i()}),Zs={name:`valve`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Valve],methods:{open:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),close:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),stop:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`}),setPosition:P(y({deviceId:i().int().nonnegative(),position:i().min(0).max(100)}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Xs,kind:`push`},runtimeState:Xs},Qs=y({detected:m(),lastChangedAt:i()}),$s={name:`vibration`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Sensor],methods:{},status:{schema:Qs,kind:`push`},runtimeState:Qs},ec=y({currentTemp:i().nullable(),targetTemp:i().nullable(),operationMode:a().nullable(),availableModes:h(a()),away:m().nullable(),minTemp:i().nullable(),maxTemp:i().nullable(),lastChangedAt:i()}),tc={name:`water-heater`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.WaterHeater],methods:{setTargetTemp:P(y({deviceId:i().int().nonnegative(),temp:i().finite()}),_(),{kind:`mutation`,auth:`admin`}),setOperationMode:P(y({deviceId:i().int().nonnegative(),mode:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),setAway:P(y({deviceId:i().int().nonnegative(),on:m()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:ec,kind:`push`},runtimeState:ec},nc=y({condition:a().nullable(),temperature:i().nullable(),temperatureUnit:a().nullable(),humidity:i().min(0).max(100).nullable(),pressure:i().nullable(),pressureUnit:a().nullable(),windSpeed:i().nullable(),windSpeedUnit:a().nullable(),windBearing:i().nullable(),lastFetchedAt:i()}),rc={name:`weather`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Weather],methods:{},status:{schema:nc,kind:`push`},runtimeState:nc},ic=y({totalObjects:i().int().nonnegative(),byClass:o(a(),i().int().nonnegative())}),ac=ic.extend({zoneId:a(),zoneName:a(),trackIds:h(a()).readonly()}),oc=y({ts:i().int(),frameWidth:i().int().nonnegative(),frameHeight:i().int().nonnegative(),zones:h(ac).readonly(),frame:ic,unzoned:ic}),sc=v([`minute`,`5min`,`hour`]),cc=y({from:i().int(),to:i().int(),resolution:sc}),lc=y({ts:i().int(),count:i().int().nonnegative()}),uc={name:`zone-analytics`,scope:`device`,mode:`singleton`,deviceTypes:[j.Camera],methods:{getCurrentSnapshot:P(y({deviceId:i()}),oc.nullable()),getZoneHistory:P(y({deviceId:i(),zoneId:a(),className:a().optional()}).extend(cc.shape),h(lc).readonly()),getCameraHistory:P(y({deviceId:i(),className:a().optional()}).extend(cc.shape),h(lc).readonly()),getUnzonedHistory:P(y({deviceId:i(),className:a().optional()}).extend(cc.shape),h(lc).readonly())},runtimeState:oc},dc=v([`include`,`exclude`]),J=y({id:a(),name:a().optional(),zoneIds:h(a()).min(1).readonly(),mode:dc,classFilter:h(a()).readonly().optional(),overlapThreshold:i().min(0).max(1).optional(),bboxInclusionPct:i().min(0).max(100).optional(),preferMask:m().optional(),enabled:m().default(!0)}),fc=h(J).readonly(),pc=v([`motion`,`detection`]),mc={name:`zone-rules`,scope:`device`,mode:`singleton`,deviceTypes:[j.Camera],methods:{listRules:P(y({deviceId:i(),stage:pc}),h(J).readonly()),setRules:P(y({deviceId:i(),stage:pc,rules:h(J).readonly()}),_(),{kind:`mutation`,auth:`admin`})},runtimeState:y({motion:h(J).readonly(),detection:h(J).readonly()})},hc={airQualitySensor:wr,alarmPanel:Fr,ambientLightSensor:Lr,audioMetrics:Hr,automationControl:Wr,battery:Kr,binary:Jr,brightness:Xr,cameraStreams:vi,carbonMonoxide:bi,climateControl:Ci,color:Oi,connectivity:Ai,consumables:Ni,contact:Fi,control:zi,cover:Hi,deviceDiscovery:Xi,deviceStatus:br,doorbell:$i,enumSensor:na,eventEmitter:aa,fanControl:ca,featureProbe:Sr,flood:ua,gas:fa,humidifier:ma,humiditySensor:ga,image:va,lawnMowerControl:Sa,lockControl:Ta,mediaPlayer:Aa,motion:Ao,motionTrigger:No,motionZones:qo,nativeObjectDetection:Qo,notifier:as,numericSensor:ss,powerMeter:ls,presence:fs,pressureSensor:ms,privacyMask:bs,ptzAutotrack:Ts,scriptRunner:Ds,smoke:ks,streamParams:Is,switch:Rs,tamper:Bs,temperatureSensor:Hs,update:Ws,vacuumControl:Js,valve:Zs,vibration:$s,waterHeater:tc,weather:rc,zoneAnalytics:uc,zoneRules:mc,zones:yo},gc=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=hc[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=mr.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=hr.fromInitial(o,a),e.bindRuntimeState?.(this.runtimeState),e.registerNativeCap?.(br,{});let s={online:!0,lastChangedAt:Date.now()};this.runtimeState.setCapState(`device-status`,s),e.registerNativeCap?.(Sr,{}),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=qi(this.ctx.deviceMeta.metadata)??Ui({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=Wi(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:{[Ki]:t}})}catch{}this.ctx.eventBus.emit(He(`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}},_c=y({connected:m(),deviceCount:i(),error:a().optional()}),vc=y({externalId:a(),name:a(),type:a(),metadata:o(a(),r()).optional()}),yc=y({stableId:a(),type:v(j),suggestedName:a(),prefilledConfig:o(a(),r()),sourceInfo:I.optional()}),bc=y({id:i(),stableId:a(),addonId:a(),type:a(),name:a(),parentDeviceId:i().nullable(),online:m(),features:h(a()),config:o(a(),r()),sourceInfo:I.optional()}),xc=y({status:v([`ok`,`error`]),labels:h(a()).optional(),error:a().optional()}),Sc=r(),Cc={name:`device-provider`,scope:`system`,mode:`collection`,methods:{start:P(_(),_(),{kind:`mutation`}),stop:P(_(),_(),{kind:`mutation`}),getStatus:P(_(),_c),getDevices:P(_(),h(y({id:a(),name:a(),type:a()}))),supportsDiscovery:P(y({}),m()),discoverDevices:P(y({}),h(yc),{kind:`mutation`,auth:`admin`}),adoptDiscoveredDevice:P(y({candidate:yc}),bc,{kind:`mutation`,auth:`admin`}),supportsManualCreation:P(y({}),m()),getChildCreationSchema:P(y({type:v(j)}),Sc),createDevice:P(y({type:v(j),config:o(a(),r())}),bc,{kind:`mutation`,auth:`admin`}),testCreationField:P(y({type:v(j),key:a(),value:r(),formValues:o(a(),r()).optional()}),xc,{kind:`mutation`,auth:`admin`})}};function wc(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 Tc=class extends Ge{async onInitialize(){return this.ctx.logger.info(`${this.providerName} Provider initialized`),[{capability:Cc,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(){return[]}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;for(let n of e){if(n.parentDeviceId!==null)continue;let e=this.deviceClasses[n.type];if(!e){this.ctx.logger.warn(`No device class registered for restored type — skipping`,{tags:{stableId:n.stableId},meta:{type:n.type}});continue}try{await this.ctx.kernel.devices.create(n.stableId,e,{}),t.add(n.id)}catch(e){this.ctx.logger.warn(`Failed to restore device`,{tags:{stableId:n.stableId},meta:{type:n.type,error:e instanceof Error?e.message:String(e)}})}}let n=e.filter(e=>e.parentDeviceId!==null);for(let e of n){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 wc(e,this.addonId)}};function Ec(e){return e.def}function Dc(e){return e}function Oc(e,t=`Configuration`,n=`main`){return{sections:[{id:n,title:t,fields:e.map(e=>kc(e.key,e.schema,e.description))}]}}function kc(e,t,n){let r=Pc(t),i=Fc(t),a={key:e,label:n??Ic(e),description:n,default:i};return r instanceof ie?Ac(e,a):r instanceof se?jc(r,a):r instanceof oe?{...a,type:`boolean`}:r instanceof ne?Nc(r,a):r instanceof ue||r instanceof le?{...a,type:`textarea`,rows:6,isJson:!0}:{...a,type:`text`}}function Ac(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 jc(e,t){let n=Dc(e),r=n.minValue,i=n.maxValue,a=r!=null&&isFinite(r)?r:void 0,o=i!=null&&isFinite(i)?i:void 0,s=Mc(e);return{...t,type:`number`,...a===void 0?{}:{min:a},...o===void 0?{}:{max:o},...s===void 0?{}:{step:s}}}function Mc(e){let t=Ec(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 Nc(e,t){let n=e.options.map(e=>String(e));return{...t,type:`select`,options:n.map(e=>({label:Ic(e),value:e}))}}function Pc(e){return e instanceof ce||e instanceof ee||e instanceof d?Pc(Ec(e).innerType):e}function Fc(e){if(e instanceof ce)return Ec(e).defaultValue}function Ic(e){return e.replace(/([A-Z])/g,` $1`).replace(/[_-]/g,` `).replace(/^\w/,e=>e.toUpperCase()).trim()}function Lc(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Rc(e,t){let n=t.split(`.`),r=e;for(let e of n){if(!Lc(r))return;r=r[e]}return r}function zc(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=Lc(o)?o:{};return{...e,[i]:zc(s,a,n)}}function Bc(e,t){if(!t||t.kind===`identity`)return e;if(t.kind===`enum-map`){let n=String(e);return Object.prototype.hasOwnProperty.call(t.mapping,n)?t.mapping[n]:t.fallback??null}if(t.kind===`linear`){if(typeof e!=`number`||Number.isNaN(e))return null;let n=e*t.scale+t.offset;if(t.clamp){let e=t.clamp[0],r=t.clamp[1];n=Math.min(r,Math.max(e,n))}return n}return e}function Vc(e){let t=e;for(;t instanceof d||t instanceof ee||t instanceof ce;)t=t.unwrap();return t}function Hc(e){let t=Vc(e);return t instanceof ne?{kind:`enum`,enumValues:t.options}:t instanceof se?{kind:`number`}:t instanceof ie?{kind:`string`}:t instanceof oe?{kind:`boolean`}:null}function Uc(e,t=``){let n=Vc(e);if(!(n instanceof le))return[];let r=[],i=n.shape;for(let[e,n]of Object.entries(i)){let i=t?`${t}.${e}`:e,a=Vc(n);if(a instanceof le){r.push(...Uc(a,i));continue}let o=Hc(n);o&&r.push({path:i,kind:o.kind,...o.enumValues?{enumValues:o.enumValues}:{}})}return r}var Wc=`device.state-changed`;function Gc(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:Wc},{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 Kc(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 Y(e,t,n){let r=qc(e)?e:Gc(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 qc(e){return typeof e.read==`function`&&typeof e.watch==`function`}function Jc(e,t,n){let r=e,i=n?.stateSource??Gc(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:Y(i,t.deviceId,`air-quality-sensor`),alarmPanel:Y(i,t.deviceId,`alarm-panel`),ambientLightSensor:Y(i,t.deviceId,`ambient-light-sensor`),audioMetrics:Y(i,t.deviceId,`audio-metrics`),automationControl:Y(i,t.deviceId,`automation-control`),battery:Y(i,t.deviceId,`battery`),binary:Y(i,t.deviceId,`binary`),brightness:Y(i,t.deviceId,`brightness`),cameraStreams:Y(i,t.deviceId,`camera-streams`),carbonMonoxide:Y(i,t.deviceId,`carbon-monoxide`),climateControl:Y(i,t.deviceId,`climate-control`),color:Y(i,t.deviceId,`color`),connectivity:Y(i,t.deviceId,`connectivity`),consumables:Y(i,t.deviceId,`consumables`),contact:Y(i,t.deviceId,`contact`),control:Y(i,t.deviceId,`control`),cover:Y(i,t.deviceId,`cover`),deviceDiscovery:Y(i,t.deviceId,`device-discovery`),deviceStatus:Y(i,t.deviceId,`device-status`),doorbell:Y(i,t.deviceId,`doorbell`),enumSensor:Y(i,t.deviceId,`enum-sensor`),eventEmitter:Y(i,t.deviceId,`event-emitter`),fanControl:Y(i,t.deviceId,`fan-control`),featureProbe:Y(i,t.deviceId,`feature-probe`),flood:Y(i,t.deviceId,`flood`),gas:Y(i,t.deviceId,`gas`),humidifier:Y(i,t.deviceId,`humidifier`),humiditySensor:Y(i,t.deviceId,`humidity-sensor`),image:Y(i,t.deviceId,`image`),lawnMowerControl:Y(i,t.deviceId,`lawn-mower-control`),lockControl:Y(i,t.deviceId,`lock-control`),mediaPlayer:Y(i,t.deviceId,`media-player`),motion:Y(i,t.deviceId,`motion`),motionTrigger:Y(i,t.deviceId,`motion-trigger`),motionZones:Y(i,t.deviceId,`motion-zones`),nativeObjectDetection:Y(i,t.deviceId,`native-object-detection`),notifier:Y(i,t.deviceId,`notifier`),numericSensor:Y(i,t.deviceId,`numeric-sensor`),powerMeter:Y(i,t.deviceId,`power-meter`),presence:Y(i,t.deviceId,`presence`),pressureSensor:Y(i,t.deviceId,`pressure-sensor`),privacyMask:Y(i,t.deviceId,`privacy-mask`),ptzAutotrack:Y(i,t.deviceId,`ptz-autotrack`),scriptRunner:Y(i,t.deviceId,`script-runner`),smoke:Y(i,t.deviceId,`smoke`),streamParams:Y(i,t.deviceId,`stream-params`),switch:Y(i,t.deviceId,`switch`),tamper:Y(i,t.deviceId,`tamper`),temperatureSensor:Y(i,t.deviceId,`temperature-sensor`),update:Y(i,t.deviceId,`update`),vacuumControl:Y(i,t.deviceId,`vacuum-control`),valve:Y(i,t.deviceId,`valve`),vibration:Y(i,t.deviceId,`vibration`),waterHeater:Y(i,t.deviceId,`water-heater`),weather:Y(i,t.deviceId,`weather`),zoneAnalytics:Y(i,t.deviceId,`zone-analytics`),zoneRules:Y(i,t.deviceId,`zone-rules`),zones:Y(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)},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)},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)},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)},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)},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),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),getEventDensity:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventDensity`,`query`,e),pruneEventsBefore:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`pruneEventsBefore`,`mutation`,e),getEventMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getEventMedia`,`query`,e),getTrackMedia:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`getTrackMedia`,`query`,e),searchObjectEvents:e=>s(`pipeline-analytics`,`pipelineAnalytics`,`searchObjectEvents`,`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),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)},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),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),setDeviceLinks:e=>c(`deviceManager`,`setDeviceLinks`,`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),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)},deviceState:{getSnapshot:e=>c(`deviceState`,`getSnapshot`,`query`,e),getCapSlice:e=>c(`deviceState`,`getCapSlice`,`query`,e),setCapSlice:e=>c(`deviceState`,`setCapSlice`,`mutation`,e)},faceGallery:{getFaceByTrack:e=>c(`faceGallery`,`getFaceByTrack`,`query`,e)},networkQuality:{getDeviceStats:e=>c(`networkQuality`,`getDeviceStats`,`query`,e),reportClientStats:e=>c(`networkQuality`,`reportClientStats`,`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),getPipelineAssignment:e=>c(`pipelineOrchestrator`,`getPipelineAssignment`,`query`,e),getCameraMetrics:e=>c(`pipelineOrchestrator`,`getCameraMetrics`,`query`,e),assignDecoder:e=>c(`pipelineOrchestrator`,`assignDecoder`,`mutation`,e),unassignDecoder:e=>c(`pipelineOrchestrator`,`unassignDecoder`,`mutation`,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),getDecoderAssignment:e=>c(`pipelineOrchestrator`,`getDecoderAssignment`,`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),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)},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),setDeviceConfig:e=>c(`recording`,`setDeviceConfig`,`mutation`,e),rescanStorage:e=>c(`recording`,`rescanStorage`,`mutation`,e),pruneFootage:e=>c(`recording`,`pruneFootage`,`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)},snapshotProvider:{supportsDevice:e=>c(`snapshotProvider`,`supportsDevice`,`query`,e),getSnapshot:e=>c(`snapshotProvider`,`getSnapshot`,`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),restartProfile:e=>c(`streamBroker`,`restartProfile`,`mutation`,e),getDeviceSettingsContribution:e=>c(`streamBroker`,`getDeviceSettingsContribution`,`query`,e),getDeviceLiveContribution:e=>c(`streamBroker`,`getDeviceLiveContribution`,`query`,e),applyDeviceSettingsPatch:e=>c(`streamBroker`,`applyDeviceSettingsPatch`,`mutation`,e)}}}function Yc(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=>Xc(t,e,n,l)),f=s.some(t=>Xc(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 Xc(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&&Zc(t,e.polygon))return!0}return!1}function Zc(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 Qc(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),updateFrameworkPackage:e=>n(`addons`,`updateFrameworkPackage`,`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)},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)},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),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),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),adoptionResync:e=>n(`deviceManager`,`adoptionResync`,`mutation`,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),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),listRecentFaces:e=>n(`faceGallery`,`listRecentFaces`,`query`,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)},localNetwork:{list:e=>n(`localNetwork`,`list`,`query`,e),getPreferred:e=>n(`localNetwork`,`getPreferred`,`query`,e),getConnectionEndpoints:e=>n(`localNetwork`,`getConnectionEndpoints`,`query`,e),getAllowedAddresses:e=>n(`localNetwork`,`getAllowedAddresses`,`query`,e),setAllowedAddresses:e=>n(`localNetwork`,`setAllowedAddresses`,`mutation`,e),resetAllowlistToBestMatch:e=>n(`localNetwork`,`resetAllowlistToBestMatch`,`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:{send:e=>n(`notificationOutput`,`send`,`mutation`,e),sendTest:e=>n(`notificationOutput`,`sendTest`,`mutation`,e)},pipelineExecutor:{getAvailableEngines:e=>n(`pipelineExecutor`,`getAvailableEngines`,`query`,e),getSelectedEngine:e=>n(`pipelineExecutor`,`getSelectedEngine`,`query`,e),getDefaultSteps:e=>n(`pipelineExecutor`,`getDefaultSteps`,`query`,e),reprobeEngine:e=>n(`pipelineExecutor`,`reprobeEngine`,`mutation`,e),getEngineProvisioning:e=>n(`pipelineExecutor`,`getEngineProvisioning`,`query`,e),getVideoPipelineSteps:e=>n(`pipelineExecutor`,`getVideoPipelineSteps`,`query`,e),setVideoPipelineSteps:e=>n(`pipelineExecutor`,`setVideoPipelineSteps`,`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),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),detect:e=>n(`pipelineExecutor`,`detect`,`query`,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:{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),getDecoderAssignments:e=>n(`pipelineOrchestrator`,`getDecoderAssignments`,`query`,e),getAudioNodeLoad:e=>n(`pipelineOrchestrator`,`getAudioNodeLoad`,`query`,e),getAgentSettings:e=>n(`pipelineOrchestrator`,`getAgentSettings`,`query`,e),listAgentSettings:e=>n(`pipelineOrchestrator`,`listAgentSettings`,`query`,e),setAgentAddonDefaults:e=>n(`pipelineOrchestrator`,`setAgentAddonDefaults`,`mutation`,e),removeAgentSettings:e=>n(`pipelineOrchestrator`,`removeAgentSettings`,`mutation`,e),setAgentMaxCameras:e=>n(`pipelineOrchestrator`,`setAgentMaxCameras`,`mutation`,e),getCameraStatuses:e=>n(`pipelineOrchestrator`,`getCameraStatuses`,`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)},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)},recording:{getStorageUsage:e=>n(`recording`,`getStorageUsage`,`query`,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),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)},streamBroker:{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),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)},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 $c=`device.state-changed`,el=`capability.binding-changed`,tl=`device.registered`,nl=`device.unregistered`,rl=`device.updated`,il=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=Kc(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?Jc(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&&!al(n,e.id)||e.stableId!==void 0&&(!i||!al(i.stableId,e.stableId))||e.addonId!==void 0&&(!i||!al(i.addonId,e.addonId))||e.type!==void 0&&(!i||!al(i.type,e.type)))continue;if(e.caps!==void 0){let t=ol(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=ol(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||!sl(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||!ol(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:$c},{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:el},{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:tl},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.refreshDeviceMetadata(t.deviceId,`added`)}})),this.bridges.push(e.subscribe({category:nl},{onData:e=>{let t=e.data;typeof t?.deviceId==`number`&&this.applyDeviceRemoval(t.deviceId)}})),this.bridges.push(e.subscribe({category:rl},{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.getAllBindings.query({})).find(t=>t.deviceId===e);t?this.bindings.set(e,t):this.applyDeviceRemoval(e)}catch{}}async refreshDeviceMetadata(e,t){try{let n=(await this.api.deviceManager.listAll.query({})).find(t=>t.id===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 al(e,t){return Array.isArray(t)?t.includes(e):e===t}function ol(e){return Array.isArray(e)?e:[e]}function sl(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}var cl=y({id:a(),label:a(),icon:a(),path:a(),remoteName:a(),bundle:a()}),ll=y({addonId:a(),page:cl,bundleUrl:a()}),ul={name:`addon-pages`,scope:`system`,mode:`singleton`,methods:{listPages:P(_(),h(ll).readonly())}},dl=y({id:a(),label:a(),icon:a(),path:a(),remoteName:a(),bundle:a()}),fl={name:`addon-pages-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listPages:P(_(),h(dl).readonly())}},pl=y({method:v([`GET`,`POST`,`PUT`,`DELETE`,`PATCH`]),path:a(),access:v([`public`,`authenticated`,`admin`]).optional(),description:a().optional()}),ml=y({method:a(),path:a(),params:o(a(),a()),query:o(a(),a()),body:r(),headers:o(a(),a()),user:y({id:a(),username:a(),isAdmin:m()}).optional(),scopedToken:r().optional()}),hl=y({status:i().int(),headers:o(a(),a()),redirectUrl:a().nullable(),body:r().optional(),contentType:a().optional()}),gl={name:`addon-routes`,scope:`system`,mode:`collection`,internal:!0,methods:{getRoutes:P(_(),h(pl)),invoke:P(ml,hl,{kind:`mutation`})},mount:{kind:`skip`}},_l=y({id:a(),label:a(),icon:a(),order:i().optional()}),vl=y({id:a(),title:a(),description:a().optional(),style:v([`card`,`accordion`]).optional(),defaultCollapsed:m().optional(),columns:g([c(1),c(2),c(3),c(4)]).optional(),tab:a().optional(),location:v([`settings`,`top-tab`]).optional(),order:i().optional(),fields:h(ae())}),X=y({tabs:h(_l).optional(),sections:h(vl)}),yl=o(a(),r()),bl=y({success:c(!0)}),xl={name:`addon-settings`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{getGlobalSettings:P(y({addonId:a(),nodeId:a().optional(),overlay:o(a(),r()).optional(),cap:a().optional()}),X.nullable()),updateGlobalSettings:P(y({addonId:a(),nodeId:a().optional(),patch:yl}),bl,{kind:`mutation`,auth:`admin`}),getDeviceSettings:P(y({addonId:a(),deviceId:i(),nodeId:a().optional()}),X.nullable()),updateDeviceSettings:P(y({addonId:a(),deviceId:i(),nodeId:a().optional(),patch:yl}),bl,{kind:`mutation`,auth:`admin`})}},Sl=v([`device-tab`,`dashboard`,`integration-detail`]),Cl=v([`xs`,`sm`,`md`,`lg`,`xl`]),wl=y({remoteName:a(),exposedModule:a(),componentKey:a().optional()}),Tl=y({tab:a(),subTab:a().optional(),label:a(),order:i().optional(),kind:c(`remote`),remote:wl,stableId:a(),description:a().optional(),icon:a().optional(),bundle:a(),hosts:h(Sl).readonly(),requires:y({deviceContext:m().default(!1),integrationContext:m().default(!1)}),defaultSize:Cl.default(`md`),allowedSizes:h(Cl).readonly().default([`sm`,`md`,`lg`]),defaultColumns:i().int().min(1).max(12).default(6),defaultRows:i().int().min(1).max(12).default(1)}),El={name:`addon-widgets-source`,scope:`system`,mode:`collection`,internal:!0,methods:{listWidgets:P(_(),h(Tl).readonly())}},Dl=Tl.extend({addonId:a(),bundleUrl:a()}),Ol={name:`addon-widgets`,scope:`system`,mode:`singleton`,methods:{listWidgets:P(_(),h(Dl).readonly())}},kl=y({staticDir:a()}),Al=y({version:a()}),jl={name:`admin-ui`,scope:`system`,mode:`singleton`,internal:!0,methods:{getStaticDir:P(_(),kl),getVersion:P(_(),Al)}},Ml=y({deviceIds:h(i()).readonly().optional(),classNames:h(a()).readonly().optional(),zoneIds:h(a()).readonly().optional(),minConfidence:i().optional(),source:v([`pipeline`,`onboard`,`any`]).optional(),schedule:y({days:h(i()).readonly(),startHour:i(),endHour:i()}).optional(),cooldownSeconds:i().optional(),minDwellSeconds:i().optional(),eventTypeTokens:h(a()).readonly().optional(),clipDescription:y({text:a().min(1),minSimilarity:i().min(0).max(1)}).optional()}),Nl=y({title:a(),body:a(),imageMode:v([`crop`,`annotated`,`full`,`none`])}),Pl=y({id:a(),name:a(),enabled:m(),eventTypes:h(a()).readonly(),conditions:Ml,outputs:h(a()).readonly(),template:Nl.optional(),priority:v([`low`,`normal`,`high`,`critical`])}),Fl=y({ruleId:a(),eventId:a(),timestamp:i(),wouldFire:m(),reason:a().optional()}),Il=y({id:a(),ruleId:a(),ruleName:a(),eventId:a(),timestamp:i(),outputs:h(a()).readonly(),success:m(),error:a().optional(),deviceId:i().optional()}),Ll=y({ruleId:a().optional(),deviceId:i().optional(),from:i().optional(),to:i().optional(),limit:i().optional()}),Rl={name:`advanced-notifier`,scope:`system`,mode:`singleton`,internal:!0,methods:{getRules:P(_(),y({rules:h(Pl).readonly()})),upsertRule:P(y({rule:Pl}),y({success:c(!0)}),{kind:`mutation`}),deleteRule:P(y({ruleId:a()}),y({success:c(!0)}),{kind:`mutation`}),testRule:P(y({ruleId:a(),lookbackMinutes:i()}),y({results:h(Fl).readonly()}),{kind:`mutation`}),getHistory:P(y({filter:Ll.optional()}),y({entries:h(Il).readonly()}))}},zl=v([`info`,`success`,`warning`,`error`]),Bl=v([`active`,`in-progress`,`completed`,`failed`,`dismissed`]),Vl=y({type:a(),id:a()}),Hl=y({id:a(),category:a(),severity:zl,title:a(),message:a(),status:Bl,progress:i().optional(),read:m(),createdAt:i(),updatedAt:i(),source:Vl.optional(),metadata:o(a(),r()).optional()}),Ul={name:`alerts`,scope:`system`,mode:`singleton`,methods:{emit:P(Hl,_(),{kind:`mutation`}),update:P(y({alertId:a(),patch:Hl.partial()}),_(),{kind:`mutation`}),list:P(y({unreadOnly:m().optional(),limit:i().optional()}).optional(),h(Hl).readonly()),getUnreadCount:P(_(),i()),markRead:P(y({alertId:a()}),_(),{kind:`mutation`}),markAllRead:P(_(),_(),{kind:`mutation`}),dismiss:P(y({alertId:a()}),_(),{kind:`mutation`})}},Wl={name:`audio-analysis`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[j.Camera],exposesDeviceSettings:!0,methods:{resolveDeviceSettings:P(y({deviceId:i()}),u())},events:{onAudioLevel:F(y({deviceId:i(),rms:i(),dbfs:i()}))}},Gl=y({level:Pa,classification:y({labels:h(Fa).readonly(),inferenceMs:i()}).optional(),timestamp:i()}),Kl=y({minConfidence:i().min(0).max(1).default(.3),allowedClasses:h(a()).default([])}),ql=y({labels:h(Fa).readonly(),rawLabels:h(Fa).readonly().optional(),inferenceMs:i()}),Jl=[{value:`auto`,label:`Auto (platform default)`},{value:`apple-soundanalysis`,label:`Apple SoundAnalysis (macOS 12+)`},{value:`yamnet-onnx`,label:`YAMNet ONNX (cross-platform)`}],Yl={audioBackend:`auto`,probedBestAudioBackend:``,selectedAudioModel:``},Xl={name:`audio-analyzer`,scope:`system`,mode:`singleton`,methods:{analyseChunk:P(y({chunk:Na,settings:Kl}),Gl.nullable(),{kind:`mutation`}),classify:P(Na,ql,{timeoutMs:3e4}),isReady:P(_(),m()),dispose:P(_(),_(),{kind:`mutation`}),reprobeAudioEngine:P(_(),y({backend:a()}),{kind:`mutation`,auth:`admin`})}},Zl=v([`f32le`,`s16le`]),Ql=y({codec:a(),canDecode:m(),canEncode:m(),label:a().optional()}),$l=y({codec:a(),sourceSampleRate:i().int().positive(),sourceChannels:i().int().positive(),extraData:p(Uint8Array).optional(),targetSampleRate:i().int().positive(),targetChannels:i().int().positive(),targetFormat:Zl.optional(),idleMs:i().int().positive().optional(),tag:a().optional()}),eu=y({codec:a(),sourceSampleRate:i().int().positive(),sourceChannels:i().int().positive(),sourceFormat:Zl.optional(),targetSampleRate:i().int().positive(),targetChannels:i().int().positive(),bitrateKbps:i().int().positive().optional(),idleMs:i().int().positive().optional(),tag:a().optional()}),tu=y({data:p(Uint8Array),sampleRate:i().int().positive(),channels:i().int().positive(),format:Zl,pts:i()}),nu=y({data:p(Uint8Array),codec:a(),pts:i(),frameComplete:m()}),ru=y({sessionId:a(),kind:v([`decode`,`encode`]),codec:a(),sourceSampleRate:i(),sourceChannels:i(),targetSampleRate:i(),targetChannels:i(),format:Zl,tag:a().optional(),createdAtMs:i(),lastActivityMs:i(),framesIn:i(),framesOut:i()}),iu={name:`audio-codec`,scope:`system`,mode:`singleton`,methods:{listSupportedCodecs:P(_(),h(Ql).readonly()),canHandle:P(y({codec:a(),kind:v([`decode`,`encode`])}),m()),createDecodeSession:P($l,y({sessionId:a(),nodeId:a()}),{kind:`mutation`}),createEncodeSession:P(eu,y({sessionId:a(),nodeId:a()}),{kind:`mutation`}),closeSession:P(y({sessionId:a(),nodeId:a().optional()}),_(),{kind:`mutation`}),pushEncodedFrame:P(y({sessionId:a(),nodeId:a().optional(),data:p(Uint8Array),pts:i().optional()}),_(),{kind:`mutation`}),pullPcm:P(y({sessionId:a(),nodeId:a().optional(),maxCount:i().int().positive().default(8)}),h(tu)),pushPcm:P(y({sessionId:a(),nodeId:a().optional(),data:p(Uint8Array),pts:i().optional()}),_(),{kind:`mutation`}),pullEncoded:P(y({sessionId:a(),nodeId:a().optional(),maxCount:i().int().positive().default(8)}),h(nu)),flushEncode:P(y({sessionId:a(),nodeId:a().optional()}),h(nu),{kind:`mutation`}),listActiveSessions:P(_(),h(ru).readonly())}},au=y({userId:a(),username:a(),email:a().optional(),displayName:a().optional(),isAdmin:m().default(!1)}),ou={name:`auth-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{validateCredentials:P(y({username:a(),password:a()}),au.nullable(),{kind:`mutation`}),getLoginUrl:P(y({state:a()}),a()),handleCallback:P(o(a(),a()),au,{kind:`mutation`}),validateToken:P(y({token:a()}),au.nullable())},mount:{kind:`skip`}},su=y({subId:a(),displayName:a(),description:a().optional(),kind:a(),triggerSupported:m(),restoreSupported:m()}).extend({id:a(),addonId:a(),enabled:m(),retentionCount:i(),label:a().optional(),lastSuccessAt:i().optional(),lastSuccessSizeBytes:i().optional(),cron:a().optional(),nextRunAt:i().optional(),lastRunAt:i().optional()}),cu=y({id:a(),filename:a(),createdAt:i(),sizeBytes:i(),label:a().optional(),locations:h(a()).readonly()}),lu=y({id:a(),destinationId:a().optional(),label:a().optional(),createdAt:i(),sizeBytes:i(),locations:h(a()).optional()}),uu=y({path:a(),kind:v([`file`,`dir`,`symlink`]),sizeBytes:i(),mtime:i()}),du=y({archiveVersion:c(1),createdAt:i(),dataDir:a(),locations:h(a()),entries:h(uu),totalBytes:i(),totalFiles:i()}),fu=y({name:a(),sizeBytes:i(),fileCount:i(),present:m()}),pu={name:`backup`,scope:`system`,mode:`singleton`,methods:{listDestinations:P(_(),h(su).readonly(),{auth:`admin`}),trigger:P(y({destinations:h(a()).optional(),locations:h(a()).optional(),label:a().optional()}).optional(),h(lu).readonly(),{kind:`mutation`,auth:`admin`}),list:P(_(),h(lu).readonly(),{auth:`admin`}),listLocations:P(_(),h(fu).readonly(),{auth:`admin`}),getEntries:P(y({destinationId:a(),backupId:a()}),du.nullable(),{auth:`admin`}),restore:P(y({destinationId:a(),backupId:a(),locations:h(a()).optional()}),_(),{kind:`mutation`,auth:`admin`}),delete:P(y({destinationId:a(),backupId:a()}),_(),{kind:`mutation`,auth:`admin`}),listArchives:P(y({destinationId:a()}),h(cu).readonly(),{auth:`admin`}),upsertDestinationPolicy:P(y({locationId:a(),enabled:m(),retentionCount:i().int().min(1).max(1e3),label:a().optional(),cron:a().optional()}),_(),{kind:`mutation`,auth:`admin`}),previewSchedule:P(y({cron:a(),count:i().int().min(1).max(20).optional()}),y({ok:m(),error:a().optional(),nextRuns:h(i()).readonly()}))}},mu=v([`connected`,`disconnected`,`connecting`,`auth-failed`,`unreachable`,`error`]),hu=y({id:a(),addonId:a(),name:a(),kind:a(),status:mu,info:o(a(),r()),lastCheckedAt:i().nullable(),error:a().nullable()}),gu=y({brokerCount:i().int().nonnegative(),connectedCount:i().int().nonnegative()}),_u=y({addonId:a(),kinds:h(y({kind:a(),label:a()}))}),vu=y({kind:a().optional()}),yu=y({id:a()}),bu=y({kind:a().min(1),name:a().min(1),settings:o(a(),r())}),xu=y({id:a()}),Su=y({id:a()}),Cu=b(`ok`,[y({ok:c(!0),latencyMs:i().nonnegative()}),y({ok:c(!1),error:a()})]),wu=o(a(),r()),Tu=y({kind:a()}),Eu=y({kind:a(),settings:wu}),Du=b(`ok`,[y({ok:c(!0),latencyMs:i().nonnegative().optional()}).strict(),y({ok:c(!1),error:a()})]),Ou=r().nullable(),ku=y({brokerId:a(),target:o(a(),r()),payload:r().optional()}),Au=y({brokerId:a(),filter:o(a(),r())}),ju=y({subscriptionId:a()}),Mu=y({brokerId:a(),subscriptionId:a()}),Nu=y({brokerId:a(),key:a()}),Pu={name:`broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:gu,kind:`poll`},methods:{list:P(vu,h(hu)),get:P(yu,hu.nullable()),listProviders:P(_(),h(_u),{auth:`admin`}),add:P(bu,xu,{kind:`mutation`,auth:`admin`}),remove:P(Su,_(),{kind:`mutation`,auth:`admin`}),testConnection:P(yu,Cu,{kind:`mutation`,auth:`admin`}),getSettings:P(yu,wu.nullable(),{auth:`admin`}),setSettings:P(y({id:a(),settings:wu}),_(),{kind:`mutation`,auth:`admin`}),getBrokerConfig:P(yu,wu.nullable(),{auth:`admin`}),getSettingsSchema:P(Tu,Ou,{auth:`admin`}),testSettings:P(Eu,Du,{kind:`mutation`,auth:`admin`}),publish:P(ku,r(),{kind:`mutation`,auth:`admin`}),subscribe:P(Au,ju,{kind:`mutation`,auth:`admin`}),unsubscribe:P(Mu,_(),{kind:`mutation`,auth:`admin`}),getState:P(Nu,r().nullable()),getStatus:P(_(),gu)}},Fu={name:`camera-pipeline-config`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[j.Camera],exposesDeviceSettings:!0,methods:{}};function Iu(e){return e}function Lu(e,t,n){return{input:e,output:t,kind:n?.kind??`query`,auth:n?.auth??`protected`,scope:n?.scope??{kind:`system`}}}function Ru(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 zu=y({stepId:a(),entry:Se}),Bu={name:`custom-model-registry`,scope:`system`,mode:`collection`,internal:!0,methods:{listModels:P(_(),h(zu).readonly())}},Vu=[{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)`}],Hu={hwaccel:`auto`,probedBestHwaccel:``},Uu=y({sessionId:a(),slotCount:i().int(),slotByteLength:i().int(),segmentBytes:i().int(),budgetMb:i().int(),framesWritten:i().int(),getFrameHits:i().int(),getFrameMisses:i().int()}),Wu={name:`decoder`,scope:`system`,mode:`singleton`,methods:{supportsCodec:P(y({codec:a()}),m()),getInfo:P(_(),y({id:a(),name:a(),isPullMode:m().optional(),priority:i().optional()})),createSession:P(ln,y({sessionId:a(),nodeId:a()})),destroySession:P(y({sessionId:a()}),_()),pushPacket:P(y({sessionId:a(),packet:dt}),_()),openStream:P(y({sessionId:a(),url:a()}),_()),pullFrames:P(y({sessionId:a(),maxCount:i().default(1)}),h(ft)),pullHandles:P(y({sessionId:a(),maxCount:i().default(1)}),h(pt)),getFrame:P(y({handle:pt}),ft.nullable()),getShmStats:P(y({sessionId:a()}),Uu.nullable()),updateConfig:P(y({sessionId:a(),config:ln.partial()}),_()),getStats:P(y({sessionId:a()}),cn),listActiveSessions:P(_(),h(y({sessionId:a(),codec:a(),outputFormat:a(),createdAtMs:i()})).readonly()),reprobeHwaccel:P(_(),y({backend:a()}),{kind:`mutation`,auth:`admin`})}},Gu={name:`detection-pipeline`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[j.Camera],exposesDeviceSettings:!0,methods:{}},Ku=y({id:a(),label:a(),isDefault:m().optional()}),qu=y({search:a().optional(),area:a().optional(),manufacturer:a().optional(),adoptedOnly:m().optional(),unadoptedOnly:m().optional()}),Ju=y({integrationId:a(),page:i().int().positive().default(1),pageSize:i().int().positive().max(2e4).default(50),filter:a().optional(),filterText:qu.optional()}),Yu=y({candidates:h(L).readonly(),totalCount:i().int().nonnegative(),page:i().int().positive(),pageSize:i().int().positive()}),Xu=y({integrationId:a(),childNativeId:a()}),Zu=y({lastDiscoveryAt:i().int().nonnegative().nullable(),candidateCount:i().int().nonnegative(),adoptedCount:i().int().nonnegative(),lastError:a().nullable()}),Qu=y({name:a().min(1).optional(),hiddenChildIds:h(a()).optional()}),$u=y({integrationId:a(),childNativeIds:h(a()).min(1),filter:a().optional(),importLocations:m().optional(),perCandidate:o(a(),Qu).optional()}),ed=y({adopted:h(y({childNativeId:a(),parentDeviceId:i().int().nonnegative(),accessoryDeviceIds:h(i().int().nonnegative()).readonly()})).readonly()}),td=y({integrationId:a(),camDeviceId:i().int().nonnegative()}),nd=y({camDeviceId:i().int().nonnegative(),resetToSource:m().optional()}),rd=y({changed:m(),rebuiltChildren:i().int().nonnegative(),removedChildren:i().int().nonnegative().optional()}),id={name:`device-adoption`,scope:`system`,mode:`singleton`,status:{schema:Zu,kind:`poll`},methods:{listCandidateFilters:P(y({integrationId:a()}),y({filters:h(Ku)}),{auth:`admin`}),listCandidates:P(Ju,Yu,{auth:`admin`}),getCandidate:P(Xu,L.nullable(),{auth:`admin`}),refresh:P(y({integrationId:a()}),Zu,{kind:`mutation`,auth:`admin`}),adopt:P($u,ed,{kind:`mutation`,auth:`admin`}),release:P(td,_(),{kind:`mutation`,auth:`admin`}),resync:P(nd,rd,{kind:`mutation`,auth:`admin`})}},ad=v([`unlinked`,`linked`,`error`]),od=y({label:a(),value:a(),secret:m().optional()}),sd=y({qr:a().optional(),fields:h(od).readonly().optional(),note:a().optional()}),cd=y({linkState:ad,exposedDeviceCount:i(),error:a().optional(),setup:sd.optional()}),ld=a(),ud=y({deviceId:a(),exposedAs:a().optional(),capabilities:h(a()).optional()}),dd=y({deviceId:a(),capabilities:h(a()).optional()}),fd=y({deviceId:a()}),pd={name:`device-export`,scope:`system`,mode:`collection`,providerKind:`device-export`,status:{schema:cd,kind:`poll`},exposesDeviceSettings:!0,methods:{getStatus:P(_(),cd),listSupportedDeviceKinds:P(_(),h(ld)),listExposedDevices:P(_(),h(ud)),exposeDevice:P(dd,_(),{kind:`mutation`}),unexposeDevice:P(fd,_(),{kind:`mutation`})}},md=y({childKey:a(),section:a(),order:i().optional(),collapsed:m().optional()}),hd=y({id:a(),source:y({sourceKey:a(),cap:a(),fieldPath:a()}),target:y({cap:a(),fieldPath:a(),itemKey:a().optional()}),transform:b(`kind`,[y({kind:c(`identity`)}),y({kind:c(`enum-map`),mapping:o(a(),g([a(),i(),m()])),fallback:g([a(),i(),m()]).optional()}),y({kind:c(`linear`),scale:i(),offset:i(),clamp:s([i(),i()]).readonly().optional()})]).optional()}),gd=y({id:i(),stableId:a(),addonId:a(),type:v(j),name:a(),location:a().nullable(),disabled:m(),parentDeviceId:i().nullable(),role:a().nullable().optional(),online:m(),probed:m().optional(),features:h(a()),isCamera:m(),config:o(a(),r()),metadata:o(a(),r()).nullable().optional(),sourceInfo:I.optional(),integrationId:a().optional(),linkDeviceId:i().nullable().optional(),primaryChildEntityId:a().nullable().optional(),childLayout:h(md).readonly().optional(),deviceLinks:h(hd).readonly().optional()}),_d=y({key:a(),value:r(),description:a().optional()}),vd=y({id:i(),stableId:a(),type:a(),name:a(),location:a().nullable(),disabled:m(),parentDeviceId:i().nullable(),role:a().nullable().optional()}),yd=y({id:i(),stableId:a(),addonId:a(),type:a(),name:a(),userNamed:m().optional(),location:a().nullable(),disabled:m(),parentDeviceId:i().nullable(),metadata:o(a(),r()).nullable().optional(),sourceInfo:I.optional(),integrationId:a().optional(),linkDeviceId:i().nullable().optional(),primaryChildEntityId:a().nullable().optional(),childLayout:h(md).readonly().optional(),deviceLinks:h(hd).readonly().optional(),role:a().nullable().optional()}),bd=r().nullable(),xd=y({streamId:a(),width:i().optional(),height:i().optional(),codec:a().optional(),fps:i().optional(),bitrateKbps:i().optional()}),Sd=y({addonId:a(),stableId:a(),id:i(),type:a(),name:a(),location:a().nullable().optional(),disabled:m().optional(),parentDeviceId:i().nullable(),role:a().nullable().optional(),features:h(a()).optional(),config:o(a(),r())}),Cd=y({deviceId:i()}),wd=y({deviceId:i(),data:o(a(),r())}),Td={name:`device-manager`,scope:`system`,mode:`singleton`,methods:{allocateDeviceId:P(y({addonId:a(),stableId:a()}),y({id:i()}),{kind:`mutation`}),registerDevice:P(Sd,_(),{kind:`mutation`}),removeDevice:P(Cd,_(),{kind:`mutation`}),persistConfig:P(wd,_(),{kind:`mutation`}),loadConfig:P(y({deviceId:i()}),o(a(),r())),loadRuntimeState:P(y({deviceId:i()}),o(a(),r())),loadMeta:P(y({deviceId:i()}),yd.nullable()),setName:P(y({deviceId:i(),name:a()}),_(),{kind:`mutation`,auth:`admin`}),setLocation:P(y({deviceId:i(),location:a().nullable()}),_(),{kind:`mutation`,auth:`admin`}),setType:P(y({deviceId:i(),type:v(j)}),_(),{kind:`mutation`,auth:`admin`}),setIntegrationId:P(y({deviceId:i(),integrationId:a()}),_(),{kind:`mutation`,auth:`admin`}),setLinkDeviceId:P(y({deviceId:i(),linkDeviceId:i().nullable()}),_(),{kind:`mutation`,auth:`admin`}),setPrimaryChildEntityId:P(y({deviceId:i(),primaryChildEntityId:a().nullable()}),_(),{kind:`mutation`,auth:`admin`}),setChildLayout:P(y({deviceId:i(),childLayout:h(md).readonly()}),_(),{kind:`mutation`,auth:`admin`}),setDeviceLinks:P(y({deviceId:i(),deviceLinks:h(hd).readonly()}),_(),{kind:`mutation`,auth:`admin`}),getWireableFields:P(y({deviceId:i()}),y({caps:h(y({cap:a(),fields:h(y({path:a(),kind:v([`string`,`number`,`boolean`,`enum`]),enumValues:h(a()).optional()})).readonly()})).readonly()}),{kind:`query`}),setRole:P(y({deviceId:i(),role:a().nullable()}),_(),{kind:`mutation`,auth:`admin`}),applyInitialMeta:P(y({deviceId:i(),name:a().optional(),location:a().nullable().optional(),type:v(j).optional(),integrationId:a().optional(),linkDeviceId:i().nullable().optional(),role:a().nullable().optional()}),_(),{kind:`mutation`,auth:`admin`}),setMetadata:P(y({deviceId:i(),patch:o(a(),r())}),_(),{kind:`mutation`,auth:`admin`}),listLocations:P(_(),h(a())),addLocation:P(y({name:a()}),_(),{kind:`mutation`,auth:`admin`}),removeLocation:P(y({name:a(),cascade:m().optional()}),_(),{kind:`mutation`,auth:`admin`}),setDisabled:P(y({deviceId:i(),disabled:m()}),_(),{kind:`mutation`,auth:`admin`}),listPersistedByAddon:P(y({addonId:a()}),h(vd)),listAll:P(y({addonId:a().optional()}),h(gd)),getDevice:P(y({deviceId:i()}),gd.nullable()),getChildren:P(y({parentDeviceId:i()}),h(gd)),getStreamSources:P(y({deviceId:i()}),h(lt)),getConfigSchema:P(y({deviceId:i()}),h(_d)),getSettingsSchema:P(y({deviceId:i()}),bd),updateConfig:P(y({deviceId:i(),values:o(a(),r())}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),enable:P(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),disable:P(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),remove:P(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),removeByIntegration:P(y({integrationId:a()}),y({removed:i()}),{kind:`mutation`,auth:`admin`}),getStreamProfileMap:P(y({deviceId:i()}),o(a(),a().nullable())),setStreamProfileMap:P(y({deviceId:i(),profileMap:o(a(),a().nullable())}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),probeStreams:P(y({deviceId:i()}),h(xd),{kind:`mutation`,auth:`admin`}),getBindings:P(y({deviceId:i()}),y({deviceId:i(),entries:h(y({capName:a(),kind:v([`native`,`wrapped`]),providerAddonId:a(),providerNodeId:a(),nativeAddonId:a()}))})),getAllBindings:P(y({}),h(y({deviceId:i(),entries:h(y({capName:a(),kind:v([`native`,`wrapped`]),providerAddonId:a(),providerNodeId:a(),nativeAddonId:a()}))}))),setWrapperActive:P(y({deviceId:i(),capName:a(),wrapperAddonId:a(),active:m()}),_(),{kind:`mutation`,auth:`admin`}),listWrappersForCap:P(y({capName:a()}),h(a())),listBindableCapsForDeviceType:P(y({deviceType:a()}),h(y({capName:a(),wrappers:h(a())}))),getDeviceSettingsAggregate:P(y({deviceId:i()}),X.nullable()),getDeviceLiveInfoAggregate:P(y({deviceId:i()}),X.nullable()),getDeviceAggregate:P(y({deviceId:i()}),y({settings:X.nullable(),live:X.nullable()})),runDeviceAction:P(y({deviceId:i().int().nonnegative(),action:a().min(1),input:r()}),r(),{kind:`mutation`}),updateDeviceField:P(y({deviceId:i(),writerCapName:a(),writerAddonId:a(),key:a(),value:r()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),updateDeviceFieldsBatch:P(y({deviceId:i(),changes:h(y({writerCapName:a(),writerAddonId:a(),key:a(),value:r()}))}),y({success:c(!0),failures:h(y({writerCapName:a(),writerAddonId:a(),error:a()}))}),{kind:`mutation`,auth:`admin`}),discoverDevices:P(y({addonId:a()}),h(yc),{kind:`mutation`,auth:`admin`}),adoptDevice:P(y({addonId:a(),candidate:yc,integrationId:a().optional()}),bc,{kind:`mutation`,auth:`admin`}),getCreationSchema:P(y({addonId:a(),type:v(j)}),r().nullable()),createDevice:P(y({addonId:a(),type:v(j),config:o(a(),r()),integrationId:a().optional()}),bc,{kind:`mutation`,auth:`admin`}),testCreationField:P(y({addonId:a(),type:v(j),key:a(),value:r(),formValues:o(a(),r()).optional()}),xc,{kind:`mutation`,auth:`admin`}),adoptionListCandidates:P(Ju.extend({addonId:a()}),Yu,{auth:`admin`}),adoptionRefresh:P(y({addonId:a(),integrationId:a()}),Zu,{kind:`mutation`,auth:`admin`}),adoptionAdopt:P($u.extend({addonId:a()}),ed,{kind:`mutation`,auth:`admin`}),adoptionRelease:P(td.extend({addonId:a()}),_(),{kind:`mutation`,auth:`admin`}),adoptionResync:P(nd,rd,{kind:`mutation`,auth:`admin`}),testField:P(y({deviceId:i(),key:a(),value:r()}),xc,{kind:`mutation`,auth:`admin`}),getDeviceStatusAggregate:P(y({deviceId:i(),caps:h(a()).readonly().optional()}),o(a(),r().nullable()))}},Ed={name:`device-state`,scope:`system`,mode:`singleton`,methods:{getSnapshot:P(y({deviceId:i()}),o(a(),o(a(),r()))),getCapSlice:P(y({deviceId:i(),capName:a()}),o(a(),r()).nullable()),getAllSnapshots:P(y({}),o(a(),o(a(),o(a(),r())))),setCapSlice:P(y({deviceId:i(),capName:a(),slice:o(a(),r())}),_(),{kind:`mutation`})},events:{onChanged:F(y({deviceId:i(),capName:a(),slice:o(a(),r())}))}},Dd=y({embedding:h(i()),inferenceMs:i()}),Od=y({modelId:a(),embeddingDim:i(),ready:m()}),kd={name:`embedding-encoder`,scope:`system`,mode:`collection`,internal:!0,methods:{encode:P(y({crop:p(Uint8Array),width:i(),height:i()}),Dd),encodeText:P(y({text:a()}),Dd),getInfo:P(_(),Od)}},Ad=y({name:a(),path:a()}),jd=y({path:a(),entries:h(Ad).readonly(),freeBytes:i(),totalBytes:i()}),Md={name:`filesystem-browse`,scope:`system`,mode:`singleton`,internal:!0,methods:{listAllowedRoots:P(_(),h(a()).readonly(),{auth:`admin`}),browse:P(y({path:a()}),jd,{auth:`admin`}),createDir:P(y({path:a()}),y({path:a()}),{kind:`mutation`,auth:`admin`})}},Nd=v([`debug`,`info`,`warn`,`error`]),Pd=y({timestamp:de(),level:Nd,scope:h(a()),message:a(),meta:o(a(),r()).optional(),tags:o(a(),a()).optional()}),Fd={name:`log-destination`,scope:`system`,mode:`collection`,internal:!0,methods:{write:P(Pd,_(),{kind:`mutation`}),query:P(y({scope:h(a()).optional(),level:Nd.optional(),since:de().optional(),until:de().optional(),limit:i().optional(),tags:o(a(),a()).optional()}),h(Pd).readonly())},mount:{kind:`skip`}},Id=y({total:i(),user:i(),system:i(),irq:i(),nice:i(),loadAvg:s([i(),i(),i()]),cores:i()}),Ld=y({percent:i(),totalBytes:i(),usedBytes:i(),availableBytes:i(),swapUsedBytes:i(),swapTotalBytes:i()}),Rd=y({readBytes:i(),writeBytes:i(),readOps:i(),writeOps:i(),timestampMs:i()}),zd=y({rxBytes:i(),txBytes:i(),rxPackets:i(),txPackets:i(),rxErrors:i(),txErrors:i(),timestampMs:i()}),Bd=y({utilization:i(),model:a(),memoryUsedBytes:i(),memoryTotalBytes:i(),temperature:i().nullable()}),Vd=y({openFds:i(),threadCount:i(),activeHandles:i(),activeRequests:i()}),Hd=y({avg10:i(),avg60:i(),avg300:i()}),Ud=y({some:Hd,full:Hd.nullable()}),Wd=y({cpu:Id,memory:Ld,gpu:Bd.nullable(),network:zd,disk:Rd,pressure:y({cpu:Ud.nullable(),memory:Ud.nullable(),io:Ud.nullable()}),process:Vd,cpuTemperature:i().nullable(),timestampMs:i()}),Gd=y({path:a(),totalBytes:i(),usedBytes:i(),availableBytes:i(),percent:i()}),Kd=y({pid:i(),cpu:i(),memory:i(),privateBytes:i().optional(),sharedBytes:i().optional()}),qd=y({addonId:a(),nodeId:a(),role:v([`hub`,`worker`]),pid:i(),state:v([`starting`,`running`,`stopping`,`stopped`,`crashed`]),uptimeSec:i()}),Jd=y({pid:i(),ppid:i(),pgid:i(),classification:v([`root`,`managed`,`system`,`ghost`]),addonId:a().nullable(),nodeId:a().nullable(),command:a(),cpuPercent:i(),memoryRssBytes:i(),uptimeSec:i(),orphaned:m()}),Yd=y({pid:i(),force:m().optional()}),Xd=y({success:m(),reason:a().optional(),signal:v([`SIGTERM`,`SIGKILL`]).optional()}),Zd=y({addonId:a()}),Qd=y({success:m(),path:a().optional(),pid:i().optional(),reason:a().optional()}),$d=y({cpuPercent:i(),memoryPercent:i(),memoryUsedMB:i(),memoryTotalMB:i(),diskPercent:i().optional(),temperature:i().optional(),gpuPercent:i().optional(),gpuMemoryPercent:i().optional()}),ef={name:`metrics-provider`,scope:`system`,mode:`singleton`,methods:{collectSnapshot:P(_(),Wd),getCached:P(_(),Wd.nullable()),getCurrent:P(_(),$d),getDiskSpace:P(y({dirPath:a()}),Gd),getGpuInfo:P(_(),Bd.nullable()),getCpuTemperature:P(_(),i().nullable()),getProcessStats:P(y({pids:h(i())}),h(Kd)),listAddonInstances:P(_(),h(qd).readonly()),getAddonStats:P(y({addonId:a()}),Kd.nullable()),listNodeProcesses:P(_(),h(Jd).readonly()),killProcess:P(Yd,Xd,{kind:`mutation`,auth:`admin`}),dumpHeapSnapshot:P(Zd,Qd,{kind:`mutation`,auth:`admin`})}},tf=y({sourceUrl:a(),metadata:we,targets:h(Ce).min(1).readonly(),calibrationRef:a().optional(),sessionId:a().optional()}),nf={name:`model-convert`,scope:`system`,mode:`singleton`,internal:!0,methods:{convert:P(tf,Ee,{kind:`mutation`,auth:`admin`,timeoutMs:6e5})}},rf=y({nodeId:a(),modelId:a(),format:v(ye),entry:Se}),af=y({ok:m(),sha256:a(),bytes:i(),path:a()}),of={name:`model-distributor`,scope:`system`,mode:`singleton`,internal:!0,methods:{distributeModel:P(rf,af,{kind:`mutation`,auth:`admin`})}},sf=v([`external`,`embedded`]),cf=v([`connected`,`disconnected`,`auth-failed`,`unreachable`,`tls-error`]),lf=y({id:a(),name:a(),url:a(),kind:sf,status:cf,latencyMs:i().nullable(),error:a().optional(),connectedClients:i().int().nonnegative().optional(),lastCheckedAt:i().optional()}),uf=y({url:a(),username:a().optional(),password:a().optional(),clientIdPrefix:a().optional()}),df=y({name:a().min(1),url:a().regex(/^(mqtt|mqtts|ws|wss):\/\//,`URL must start with mqtt(s):// or ws(s)://`),username:a().optional(),password:a().optional(),clientIdPrefix:a().optional()}),ff=y({id:a()}),pf=y({id:a()}),mf=b(`ok`,[y({ok:c(!0),latencyMs:i()}),y({ok:c(!1),error:a()})]),hf=y({port:i().int().min(1).max(65535).default(1883),allowAnonymous:m().default(!1),username:a().optional(),password:a().optional()}),gf=y({id:a(),url:a()}),_f=y({brokerCount:i(),embeddedRunning:m()}),vf={name:`mqtt-broker`,scope:`system`,mode:`collection`,providerKind:`broker`,status:{schema:_f,kind:`poll`},methods:{listBrokers:P(_(),h(lf)),getBrokerConfig:P(pf,uf),addBroker:P(df,ff,{kind:`mutation`}),removeBroker:P(pf,_(),{kind:`mutation`}),testConnection:P(pf,mf,{kind:`mutation`}),startEmbeddedBroker:P(hf,gf,{kind:`mutation`}),stopEmbeddedBroker:P(pf,_(),{kind:`mutation`}),getStatus:P(_(),_f)}},yf=y({url:a(),hostname:a(),port:i(),protocol:v([`http`,`https`])}),bf=y({connected:m(),endpoint:yf.nullable(),error:a().optional()}),xf=yf.extend({id:a(),label:a(),mode:a().optional(),sourcePort:i().optional()}),Sf={name:`network-access`,scope:`system`,mode:`collection`,providerKind:`ingress`,methods:{start:P(_(),yf,{kind:`mutation`}),stop:P(_(),_(),{kind:`mutation`}),getEndpoint:P(_(),yf.nullable()),getStatus:P(_(),bf),listEndpoints:P(_(),h(xf).readonly())}},Cf=y({title:a(),body:a(),imageUrl:a().optional(),deviceId:i().optional(),eventId:a().optional(),priority:v([`low`,`normal`,`high`,`critical`]).default(`normal`),metadata:o(a(),r()).optional()}),wf={name:`notification-output`,scope:`system`,mode:`collection`,methods:{send:P(Cf,_(),{kind:`mutation`}),sendTest:P(_(),y({success:m(),error:a().optional()}),{kind:`mutation`})}},Tf=v([`view`,`create`,`delete`]),Ef=g([c(`*`),h(a())]),Df=o(a(),g([c(`*`),h(a())])),Of=v([`device`,`system`]),Z=b(`type`,[y({type:c(`category`),target:Of,access:h(Tf).min(1)}),y({type:c(`capability`),target:a(),access:h(Tf).min(1)}),y({type:c(`addon`),target:a(),access:h(Tf).min(1)}),y({type:c(`device`),targets:h(a()).min(1),access:h(Tf).min(1)})]),kf=y({id:a(),username:a(),passwordHash:a(),isAdmin:m().default(!1),allowedProviders:Ef,allowedDevices:Df,scopes:h(Z).default([]),createdAt:i(),updatedAt:i()}),Af=y({id:a(),label:a(),isAdmin:m().default(!1),allowedProviders:Ef,allowedDevices:Df,tokenHash:a(),tokenPrefix:a(),createdAt:i(),lastUsedAt:i().optional()}),jf=y({id:a(),userId:a(),name:a(),tokenHash:a(),tokenPrefix:a(),scopes:h(Z),expiresAt:i().nullish(),lastUsedAt:i().nullish(),createdAt:i()}),Mf=y({integrationId:a(),displayName:a(),requestedScopes:h(Z),allowedRedirectPrefixes:h(a()).min(1),hubUrl:a().optional()}),Nf={name:`oauth-integration`,scope:`system`,mode:`collection`,internal:!0,methods:{getDescriptor:P(_(),Mf)}},Pf=v([`new`,`entered`,`left`,`moving`,`idle`]),Ff=v([`motion`,`object`,`audio`]),If=y({x:i(),y:i(),timestamp:i(),bbox:z}),Lf=y({timestamp:i(),position:If,mediaKey:a()}),Rf=y({trackId:a(),deviceId:i(),className:a(),label:a().optional(),firstSeen:i(),lastSeen:i(),positions:h(If).readonly(),snapshots:h(Lf).readonly(),zonesVisited:h(a()).readonly(),totalDistance:i(),state:Pf,active:m()}),zf={id:a(),deviceId:i(),timestamp:i()},Bf=y({...zf,kind:c(`motion`),regionCount:i(),regions:h(y({bbox:z,pixelCount:i(),intensity:i()})).readonly().optional(),frameWidth:i().optional(),frameHeight:i().optional(),mediaUrl:a().optional()}),Vf=v([`pipeline`,`onboard`]),Hf=y({...zf,kind:c(`object`),source:Vf.optional(),frameId:a().optional(),trackId:a().optional(),className:a(),label:a().optional(),confidence:i().optional(),bbox:z.optional(),zones:h(a()).readonly().optional(),state:Pf.optional(),frameWidth:i().optional(),frameHeight:i().optional(),mediaKey:a().optional(),mediaUrl:a().optional()}),Uf=y({...zf,kind:c(`audio`),rms:i(),dbfs:i(),classification:y({className:a(),originalClass:a().optional(),score:i()}).optional(),mediaUrl:a().optional()}),Wf=v([`crop`,`thumbnail`,`snapshot`,`firstFrame`,`lastFrame`,`fullFrame`,`fullFrameBoxed`,`faceCrop`,`plateCrop`]),Gf=y({key:a(),kind:Wf,base64:a(),sizeBytes:i(),timestamp:i()}),Kf=y({deviceId:i(),since:i().optional(),until:i().optional(),limit:i().int().min(1).max(5e3).default(1e3),projection:v([`full`,`slim`]).optional()}),qf=Kf.extend({classFilter:a().optional()}),Jf=y({trackId:a(),className:a(),confidence:i(),bbox:z,zones:h(a()).readonly(),state:Pf}),Yf=Hf.extend({score:i()}),Xf=y({text:a(),deviceId:i().optional(),since:i().optional(),until:i().optional(),classFilter:a().optional(),limit:i().default(50),minScore:i().min(0).max(1).default(.2)}),Zf={name:`pipeline-analytics`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[j.Camera],exposesDeviceSettings:!0,methods:{getActiveTracks:P(y({deviceId:i()}),h(Rf).readonly()),getTrack:P(y({deviceId:i(),trackId:a()}),Rf.nullable()),listTracks:P(y({deviceId:i(),since:i().optional(),until:i().optional(),limit:i().optional()}),h(Rf).readonly()),clearTracks:P(y({deviceId:i()}),_(),{kind:`mutation`,auth:`admin`}),getMotionEvents:P(Kf,h(Bf).readonly()),getObjectEvents:P(qf,h(Hf).readonly()),getAudioEvents:P(Kf,h(Uf).readonly()),getEventDensity:P(y({deviceId:i(),since:i(),until:i(),bucketMs:i().int().positive()}),h(y({bucketStart:i(),motion:i().int(),object:i().int(),audio:i().int()})).readonly()),pruneEventsBefore:P(y({deviceId:i(),cutoffMs:i()}),y({motion:i().int(),object:i().int(),audio:i().int()}),{kind:`mutation`,auth:`admin`}),getEventMedia:P(y({eventId:a(),kind:Wf.optional()}),h(Gf).readonly()),getTrackMedia:P(y({trackId:a()}),h(Gf).readonly()),searchObjectEvents:P(Xf,h(Yf).readonly())},events:{onFrameTracked:{data:y({deviceId:i(),timestamp:i(),frameWidth:i(),frameHeight:i(),detections:h(Jf).readonly()})},onTrackStarted:{data:y({deviceId:i(),trackId:a(),className:a()})},onTrackEnded:{data:y({deviceId:i(),trackId:a(),className:a(),durationMs:i()})},onDetectionEvent:{data:y({deviceId:i(),kind:Ff,eventId:a(),timestamp:i()})}}},Qf=y({engine:B,steps:h(V).readonly(),audio:y({engine:B,modelId:a(),enabled:m(),settings:o(a(),r()).readonly().optional()}).nullable().optional()}),$f=y({id:a(),name:a(),description:a().optional(),config:Qf,createdAt:a(),updatedAt:a()}),ep=y({enabled:m(),modelId:a(),settings:o(a(),r()).readonly()}),tp=y({addonDefaults:o(a(),ep).readonly(),maxCameras:i().int().nonnegative().nullable().default(null)}),np=y({steps:h(V).readonly(),audio:y({modelId:a(),enabled:m()}).nullable()}),rp=y({enabled:m().optional(),modelId:a().optional(),settings:o(a(),r()).readonly().optional()}),ip=y({pinnedAgentNodeId:a().optional(),stepToggles:o(a(),m()).optional(),stepOverridesByAgent:o(a(),o(a(),rp)).optional(),pipelineByAgent:o(a(),np).optional()}),ap=y({deviceId:i(),agentNodeId:a(),pinned:m(),reason:v([`manual`,`capacity`,`hardware-affinity`,`failover`,`rebalance`]),assignedAt:i()}),op=y({deviceId:i(),decoderNodeId:a(),pinned:m(),reason:v([`manual`,`co-located`,`capacity`,`hardware-affinity`])}),sp=y({nodeId:a(),online:m(),load:To,score:i()}),cp=y({totalAgents:i(),onlineAgents:i(),totalCameras:i(),attachedCameras:i(),activeCameras:i(),avgInferenceTimeMs:i(),queueDepth:i()}),lp=o(a(),a()),up=y({camStreamId:a(),codec:a(),width:i(),height:i(),fps:i(),kind:a()}),dp=y({streams:h(up).readonly()}),fp=y({detectionNodeId:a().nullable(),decoderNodeId:a().nullable(),audioNodeId:a().nullable(),pinned:y({detection:m(),decoder:m(),audio:m()}),reasons:y({detection:a().optional(),decoder:a().optional(),audio:a().optional()})}),pp=y({profile:a(),status:a(),codec:a(),width:i(),height:i(),subscribers:i(),inFps:i(),outFps:i()}),mp=y({profiles:h(pp).readonly(),webrtcSessions:i(),rtspRestream:m()}),hp=y({framesWritten:i(),getFrameHits:i(),getFrameMisses:i(),budgetMb:i()}),gp=y({nodeId:a(),formats:h(a()).readonly(),sessionCount:i(),shm:hp}),_p=y({enabled:m(),fps:i()}),vp=v([`idle`,`installing`,`verifying`,`ready`,`failed`]),yp=y({state:vp,error:a().optional()}),bp=v([`idle`,`watching`,`active`]),xp=y({nodeId:a(),engine:y({backend:a(),device:a()}),phase:bp,configuredFps:i(),actualFps:i(),queueDepth:i(),avgInferenceMs:i(),provisioning:yp}),Sp=y({nodeId:a(),enabled:m()}),Cp=v([`off`,`continuous`,`events`]),wp=y({mode:Cp,active:m(),storageBytes:i()}),Tp=y({deviceId:i(),assignment:fp,source:dp,broker:mp.nullable(),decoder:gp.nullable(),motion:_p.nullable(),detection:xp.nullable(),audio:Sp.nullable(),recording:wp.nullable(),fetchedAt:i()}),Ep={name:`pipeline-orchestrator`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,methods:{assignPipeline:P(y({deviceId:i(),agentNodeId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),unassignPipeline:P(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),rebalance:P(_(),y({migrated:i()}),{kind:`mutation`,auth:`admin`}),getPipelineAssignments:P(_(),h(ap).readonly()),getPipelineAssignment:P(y({deviceId:i()}),ap.nullable()),getAgentLoad:P(_(),h(sp).readonly()),getGlobalMetrics:P(_(),cp),getCameraMetrics:P(y({deviceId:i()}),Ba.nullable()),getCapabilityBindings:P(y({nodeId:a()}),lp),setCapabilityBinding:P(y({nodeId:a(),capName:a(),addonId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),assignDecoder:P(y({deviceId:i(),nodeId:a()}),_(),{kind:`mutation`,auth:`admin`}),unassignDecoder:P(y({deviceId:i()}),_(),{kind:`mutation`,auth:`admin`}),getDecoderAssignments:P(_(),h(op).readonly()),assignAudio:P(y({deviceId:i(),nodeId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),unassignAudio:P(y({deviceId:i()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),getAudioAssignment:P(y({deviceId:i()}),y({nodeId:a(),pinned:m(),assignedAt:i()}).nullable()),getAudioNodeLoad:P(_(),h(y({nodeId:a(),deviceCount:i()}))),getAudioAssignments:P(_(),h(y({deviceId:i(),nodeId:a(),pinned:m(),assignedAt:i()}))),getDecoderAssignment:P(y({deviceId:i(),pipelineNodeId:a().optional()}),op),getAgentSettings:P(y({agentNodeId:a()}),tp.nullable()),listAgentSettings:P(_(),h(y({nodeId:a(),settings:tp})).readonly()),setAgentAddonDefaults:P(y({agentNodeId:a(),defaults:o(a(),ep)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),removeAgentSettings:P(y({agentNodeId:a()}),y({success:m(),removed:m()}),{kind:`mutation`,auth:`admin`}),setAgentMaxCameras:P(y({agentNodeId:a(),maxCameras:i().int().nonnegative().nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),getCameraSettings:P(y({deviceId:i()}),ip.nullable()),setCameraStepToggle:P(y({deviceId:i(),addonId:a(),enabled:m().nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),getCameraStepOverrides:P(y({deviceId:i()}),o(a(),o(a(),rp)).nullable()),setCameraStepOverride:P(y({deviceId:i(),agentNodeId:a(),addonId:a(),patch:rp.nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),setCameraPipelineForAgent:P(y({deviceId:i(),agentNodeId:a(),pipeline:np.nullable()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),resolvePipeline:P(y({deviceId:i(),agentNodeId:a().optional()}),Qf),getCameraStatus:P(y({deviceId:i()}),Tp),getCameraStatuses:P(y({deviceIds:h(i()).optional()}),h(Tp).readonly()),listTemplates:P(_(),h($f).readonly()),saveTemplate:P(y({name:a(),description:a().optional(),config:Qf}),$f,{kind:`mutation`,auth:`admin`}),updateTemplate:P(y({id:a(),name:a().optional(),description:a().optional(),config:Qf.optional()}),$f,{kind:`mutation`,auth:`admin`}),deleteTemplate:P(y({id:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`})}},Dp=y({streamId:a(),label:a().optional(),codec:a(),type:v([`video`,`audio`]),sourceUrl:a()}),Op=y({streamId:a(),format:a(),value:a()}),kp={name:`restreamer`,scope:`system`,mode:`collection`,internal:!0,methods:{registerDevice:P(y({deviceId:i(),streams:h(Dp).readonly()}),_(),{kind:`mutation`}),unregisterDevice:P(y({deviceId:i()}),_(),{kind:`mutation`}),getExposedResources:P(y({deviceId:i()}),h(Op).readonly())},mount:{kind:`skip`}},Ap=y({where:o(a(),r()).optional(),whereIn:o(a(),h(r())).optional(),whereBetween:o(a(),s([r(),r()])).optional(),orderBy:y({field:a(),direction:v([`asc`,`desc`])}).optional(),limit:i().optional(),offset:i().optional()}),jp=y({id:a(),data:o(a(),r())}),Mp=y({name:a(),type:v([`TEXT`,`INTEGER`,`REAL`,`JSON`,`BOOLEAN`]),primaryKey:m().optional(),notNull:m().optional(),unique:m().optional()}),Np=y({name:a(),columns:h(a()).readonly(),unique:m().optional()}),Pp={name:`settings-store`,scope:`system`,mode:`singleton`,methods:{get:P(y({namespace:a().optional(),collection:a(),key:a()}),r()),set:P(y({namespace:a().optional(),collection:a(),key:a(),value:r()}),_(),{kind:`mutation`}),query:P(y({namespace:a().optional(),collection:a(),filter:Ap.optional()}),h(jp).readonly()),insert:P(y({namespace:a().optional(),collection:a(),record:jp}),_(),{kind:`mutation`}),update:P(y({namespace:a().optional(),collection:a(),id:a(),data:o(a(),r())}),_(),{kind:`mutation`}),delete:P(y({namespace:a().optional(),collection:a(),key:a()}),_(),{kind:`mutation`}),count:P(y({namespace:a().optional(),collection:a(),filter:Ap.optional()}),i()),histogram:P(y({namespace:a().optional(),collection:a(),field:a(),bucketSize:i().int().positive(),origin:i().int(),filter:Ap.optional()}),h(y({bucket:i().int(),count:i().int()})).readonly()),isEmpty:P(y({namespace:a().optional(),collection:a()}),m()),declareCollection:P(y({namespace:a().optional(),collection:a(),columns:h(Mp).readonly(),indexes:h(Np).readonly().optional()}),_(),{kind:`mutation`})}},Q=f(),Fp=y({to:g([Q,h(Q).min(1)]),cc:h(Q).optional(),bcc:h(Q).optional(),from:a().optional(),replyTo:a().optional(),subject:a(),text:a(),html:a().optional()}),Ip=y({messageId:a(),accepted:h(Q).default([]),rejected:h(Q).default([])}),Lp=y({ready:m(),host:a(),error:a().optional(),lastVerifiedAt:i().optional()}),Rp={name:`smtp-provider`,scope:`system`,mode:`collection`,internal:!0,providerKind:`email`,methods:{sendEmail:P(Fp,Ip,{kind:`mutation`,auth:`admin`,access:`create`}),verify:P(_(),Lp,{kind:`mutation`,auth:`admin`,access:`view`}),getStatus:P(_(),Lp,{auth:`admin`})}},zp=y({base64:a(),contentType:a()}),Bp=y({lastCapturedAt:i().nullable(),cacheAgeMs:i().nullable(),lastBytes:i().nullable(),lastStreamId:a().nullable()}),Vp={name:`snapshot`,scope:`device`,deviceNative:!0,mode:`singleton`,kind:`wrapper`,defaultActive:!0,deviceTypes:[j.Camera],exposesDeviceSettings:!0,methods:{getSnapshot:P(y({deviceId:i(),streamId:a().optional(),force:m().optional()}),zp.nullable()),invalidateCache:P(y({deviceId:i()}),_(),{kind:`mutation`,auth:`admin`})},status:{schema:Bp,kind:`poll`}},Hp={name:`snapshot-provider`,scope:`system`,mode:`collection`,methods:{supportsDevice:P(y({deviceId:i()}),m()),getSnapshot:P(y({deviceId:i(),streamId:a().optional()}),zp.nullable())},mount:{kind:`custom`}},Up=y({userId:a(),username:a(),isAdmin:m(),provider:a(),email:a().optional(),displayName:a().optional(),hubUrl:a().optional(),scopes:h(Z).optional(),redirectUri:a().optional(),integrationId:a().optional(),jti:a().optional(),sessionId:a().optional()}),Wp={name:`sso-bridge`,scope:`system`,mode:`singleton`,internal:!0,methods:{signBridgeToken:P(y({claims:Up,ttlSec:i().int().positive().optional()}),y({token:a()})),verifyBridgeToken:P(y({token:a()}),Up.nullable())}},Gp=b(`shouldSaveDiskSpace`,[y({providerId:a().min(1),displayName:a().min(1),configSchema:r(),nodeLocal:m(),shouldSaveDiskSpace:c(!0),minFreePercent:i().min(0).max(100)}),y({providerId:a().min(1),displayName:a().min(1),configSchema:r(),nodeLocal:m(),shouldSaveDiskSpace:c(!1),minFreePercent:c(null)})]),Kp={name:`storage`,scope:`system`,mode:`singleton`,methods:{resolve:P(y({location:k,relativePath:a()}),a()),write:P(y({location:k,relativePath:a(),data:p(Uint8Array)}),_(),{kind:`mutation`}),read:P(y({location:k,relativePath:a()}),p(Uint8Array)),exists:P(y({location:k,relativePath:a()}),m()),list:P(y({location:k,prefix:a().optional()}),h(a()).readonly()),delete:P(y({location:k,relativePath:a()}),_(),{kind:`mutation`}),getAvailableSpace:P(y({location:k}),i().nullable()),beginUpload:P(y({location:k,relativePath:a(),sizeBytes:i().optional()}),y({uploadId:a()}),{kind:`mutation`}),writeChunk:P(y({uploadId:a(),offset:i(),data:p(Uint8Array)}),_(),{kind:`mutation`}),finalizeUpload:P(y({uploadId:a()}),_(),{kind:`mutation`}),abortUpload:P(y({uploadId:a()}),_(),{kind:`mutation`}),beginDownload:P(y({location:k,relativePath:a()}),y({downloadId:a(),sizeBytes:i()}),{kind:`mutation`}),readChunk:P(y({downloadId:a(),offset:i(),length:i()}),p(Uint8Array)),endDownload:P(y({downloadId:a()}),_(),{kind:`mutation`}),listLocations:P(y({type:Kt.optional()}),h(O).readonly()),getDefaultLocation:P(y({type:Kt}),O.nullable()),listLocationDeclarations:P(_(),h(qt).readonly()),upsertLocation:P(O.omit({createdAt:!0,updatedAt:!0}),O,{kind:`mutation`,auth:`admin`}),deleteLocation:P(y({id:a()}),_(),{kind:`mutation`,auth:`admin`}),testLocation:P(y({id:a()}),y({ok:m(),error:a().optional()}),{auth:`admin`}),listProviders:P(_(),h(Gp).readonly()),testConfig:P(y({providerId:a(),config:o(a(),r())}),y({ok:m(),error:a().optional()}),{auth:`admin`})}},qp=y({bytes:i().int().nonnegative()}),Jp=y({reclaimedBytes:i().int().nonnegative(),exhausted:m()}),Yp={name:`storage-evictable`,scope:`system`,mode:`collection`,internal:!0,methods:{getEvictableUsage:P(y({locationId:a()}),qp),evict:P(y({locationId:a(),targetBytes:i().int().positive()}),Jp,{kind:`mutation`})}},Xp=b(`shouldSaveDiskSpace`,[y({providerId:a().min(1),displayName:a().min(1),configSchema:r(),nodeLocal:m(),shouldSaveDiskSpace:c(!0),minFreePercent:i().min(0).max(100)}),y({providerId:a().min(1),displayName:a().min(1),configSchema:r(),nodeLocal:m(),shouldSaveDiskSpace:c(!1),minFreePercent:c(null)})]),Zp=y({ok:m(),error:a().optional()}),Qp=y({location:O,relativePath:a(),sizeBytes:i().optional()}),$p=y({uploadId:a()}),em=y({uploadId:a(),offset:i(),data:p(Uint8Array)}),tm=y({uploadId:a()}),nm=y({uploadId:a()}),rm=y({location:O,relativePath:a()}),im=y({downloadId:a(),sizeBytes:i()}),am=y({downloadId:a(),offset:i(),length:i()}),om=y({downloadId:a()}),sm={name:`storage-provider`,scope:`system`,mode:`collection`,internal:!0,methods:{getProviderInfo:P(_(),Xp),testLocation:P(y({config:o(a(),r())}),Zp,{auth:`admin`}),resolve:P(y({location:O,relativePath:a()}),a()),write:P(y({location:O,relativePath:a(),data:p(Uint8Array)}),_(),{kind:`mutation`}),read:P(y({location:O,relativePath:a()}),p(Uint8Array)),exists:P(y({location:O,relativePath:a()}),m()),list:P(y({location:O,prefix:a().optional()}),h(a()).readonly()),delete:P(y({location:O,relativePath:a()}),_(),{kind:`mutation`}),getAvailableSpace:P(y({location:O}),i().nullable()),beginUpload:P(Qp,$p,{kind:`mutation`}),writeChunk:P(em,_(),{kind:`mutation`}),finalizeUpload:P(tm,_(),{kind:`mutation`}),abortUpload:P(nm,_(),{kind:`mutation`}),beginDownload:P(rm,im,{kind:`mutation`}),readChunk:P(am,p(Uint8Array)),endDownload:P(om,_(),{kind:`mutation`})}},cm=y({urls:g([a(),h(a())]),username:a().optional(),credential:a().optional()}),lm={name:`turn-provider`,scope:`system`,mode:`collection`,methods:{getTurnServers:P(_(),h(cm).readonly())}},um=y({credentialId:a(),label:a(),createdAt:i(),lastUsedAt:i().nullable(),transports:h(a()).default([])}),dm={name:`user-passkeys`,scope:`system`,mode:`collection`,internal:!0,methods:{beginRegistration:P(y({userId:a(),username:a()}),y({optionsJSON:o(a(),r())}),{kind:`mutation`,auth:`admin`,access:`create`}),finishRegistration:P(y({userId:a(),response:o(a(),r()),label:a()}),y({success:c(!0),credentialId:a()}),{kind:`mutation`,auth:`admin`,access:`create`}),beginAuthentication:P(y({userId:a().optional()}),y({optionsJSON:o(a(),r())}),{kind:`mutation`,access:`view`}),finishAuthentication:P(y({userId:a(),response:o(a(),r())}),y({verified:m()}),{kind:`mutation`,access:`view`}),listPasskeys:P(y({userId:a()}),h(um),{auth:`admin`}),removePasskey:P(y({userId:a(),credentialId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`})}},fm=y({id:a(),source:a(),kind:v([`motion`,`object`,`audio`,`native`]),timeRange:y({startMs:i(),endMs:i()}),thumbnail:a().optional()}),pm=y({playbackUrl:a(),playbackEndpoints:h(a()).optional(),token:a().optional()}),mm={name:`videoclips`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,methods:{listClips:P(y({deviceId:i(),since:i(),until:i(),limit:i().int().positive().optional()}),h(fm).readonly(),{kind:`query`,auth:`admin`}),getClipPlayback:P(y({deviceId:i(),clipId:a()}),pm,{kind:`query`,auth:`admin`})}},hm=y({viewportWidth:i().int().positive().optional(),viewportHeight:i().int().positive().optional(),devicePixelRatio:i().positive().optional(),downlinkMbps:i().nonnegative().optional(),prefersTier:a().optional()}).partial(),gm={name:`webrtc`,scope:`system`,mode:`collection`,internal:!0,methods:{handleOffer:P(y({streamId:a(),sdpOffer:a()}),a(),{kind:`mutation`}),supportsStream:P(y({streamId:a()}),m()),registerStream:P(y({streamId:a(),codec:a()}),_(),{kind:`mutation`}),unregisterStream:P(y({streamId:a()}),_(),{kind:`mutation`}),createSession:P(y({streamId:a(),hints:hm.optional()}),y({sessionId:a(),sdpOffer:a()}),{kind:`mutation`}),handleAnswer:P(y({sessionId:a(),sdpAnswer:a()}),_(),{kind:`mutation`}),closeSession:P(y({sessionId:a()}),_(),{kind:`mutation`}),hasAdaptiveBitrate:P(y({streamId:a()}),m())},mount:{kind:`skip`}},_m=b(`kind`,[y({kind:c(`adaptive`)}),y({kind:c(`profile`),profile:w}),y({kind:c(`cam-stream`),camStreamId:a().min(1)})]),vm=y({id:a(),label:a(),target:_m,codec:a().nullable(),resolution:y({width:i(),height:i()}).nullable(),status:v([`idle`,`connecting`,`streaming`,`error`,`stopped`]).nullable(),inputFps:i().nullable(),decodeFps:i().nullable(),bitrateKbps:i().nullable()}),ym={name:`webrtc-session`,scope:`device`,mode:`singleton`,kind:`wrapper`,defaultActive:!0,preferredProvider:`stream-broker`,deviceTypes:[j.Camera],methods:{listStreams:P(y({deviceId:i().int().nonnegative()}),h(vm)),createSession:P(y({deviceId:i().int().nonnegative(),target:_m,hints:hm.optional(),relayOnly:m().optional(),consumerAttribution:ai.optional()}),y({sessionId:a(),sdpOffer:a()}),{kind:`mutation`}),handleOffer:P(y({deviceId:i().int().nonnegative(),target:_m.optional(),sdpOffer:a(),sessionId:a().optional(),relayOnly:m().optional(),nonTrickle:m().optional(),disableTurn:m().optional(),disableIpv6:m().optional(),consumerAttribution:ai.optional()}),y({sessionId:a(),sdpAnswer:a()}),{kind:`mutation`}),handleAnswer:P(y({deviceId:i().int().nonnegative(),sessionId:a(),sdpAnswer:a()}),_(),{kind:`mutation`}),addIceCandidate:P(y({deviceId:i().int().nonnegative(),sessionId:a(),candidate:a(),sdpMid:a().nullable().optional(),sdpMLineIndex:i().int().nullable().optional()}),_(),{kind:`mutation`}),getIceCandidates:P(y({deviceId:i().int().nonnegative(),sessionId:a()}),y({candidates:h(y({candidate:a(),sdpMid:a().nullable(),sdpMLineIndex:i().int().nullable()})),done:m()}),{kind:`query`}),closeSession:P(y({deviceId:i().int().nonnegative(),sessionId:a()}),_(),{kind:`mutation`}),hasAdaptiveBitrate:P(y({deviceId:i().int().nonnegative(),profile:w}),m()),getSessionState:P(y({deviceId:i().int().nonnegative(),sessionId:a()}),y({pendingRenegotiation:y({target:_m,epoch:i()}).nullable()}))},mount:{kind:`custom`}},bm=y({childDeviceIds:h(i()).readonly(),hiddenChildIds:h(i()).readonly()}),xm={name:`accessories`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera,j.Hub,j.Switch,j.Light,j.Sensor,j.Thermostat,j.Cover,j.Lock,j.Fan,j.MediaPlayer,j.AlarmPanel,j.Generic],methods:{setChildHidden:P(y({deviceId:i().int().nonnegative(),childDeviceId:i().int().nonnegative(),hidden:m()}),_(),{kind:`mutation`,auth:`admin`})},events:{onAccessoriesChanged:{data:y({deviceId:i(),childDeviceIds:h(i()).readonly(),hiddenChildIds:h(i()).readonly()})},onChildVisibilityChanged:{data:y({deviceId:i(),childDeviceId:i(),hidden:m()})}},status:{schema:bm,kind:`command-driven`}},Sm=v([`install`,`update`,`uninstall`,`restart`]),Cm=v([`queued`,`fetching`,`staged`,`validating`,`applying`,`restarting`,`applied`,`done`,`failed`,`skipped`]),wm=v([`framework`,`addon`]),Tm=y({tsMs:i(),nodeId:a(),packageName:a(),phase:Cm,message:a()}),Em=y({taskId:a(),nodeId:a(),packageName:a(),fromVersion:a().nullable(),toVersion:a(),target:wm,phase:Cm,stagedPath:a().nullable(),attempts:i(),steps:h(Tm),error:a().nullable(),startedAtMs:i().nullable(),finishedAtMs:i().nullable()}),Dm=v([`running`,`completed`,`failed`,`partially-failed`,`cancelled`]),Om=v([`single`,`bulk`,`cluster`]),km=y({jobId:a(),kind:Sm,createdAtMs:i(),createdBy:a(),scope:Om,tasks:h(Em),state:Dm,schemaVersion:c(1)}),Am=v([`debug`,`info`,`warn`,`error`]),jm=v([`off`,`latest`,`beta`]),Mm=v([`off`,`latest`,`beta`,`inherit`]),Nm=y({id:a(),name:a().optional(),version:a().optional(),description:a().optional(),icon:a().optional(),color:a().optional(),capabilities:h(r()).readonly().optional(),packageName:a(),packageVersion:a(),packageDisplayName:a().optional(),bundle:y({displayName:a(),description:a().optional(),icon:a().optional()}).optional(),protected:m().optional(),removable:m().optional()}),Pm=y({pid:i().optional(),mode:a(),state:a()}),Fm=y({phase:v([`pending`,`healthy`,`failed`]),retryCount:i(),firstFailureAt:i().nullable(),lastAttemptAt:i().nullable(),lastError:y({message:a(),stack:a().optional()}).nullable(),nextRetryAt:i().nullable(),alertEmitted:m(),retrying:m(),inGracePeriod:m()}),Im=y({manifest:Nm,declaration:r().optional(),source:a(),installSource:a().optional(),process:Pm.optional(),hasBackup:m().optional(),health:Fm.nullable().optional()}),Lm=y({name:a(),version:a(),dir:a(),installSource:a().optional()}),Rm=y({name:a(),currentVersion:a(),latestVersion:a(),category:v([`addon`,`core`]),requiresRestart:m(),isSystem:m()}),zm=y({version:a(),publishedAt:a(),deprecated:a().optional(),distTags:h(a()).readonly()}),Bm=y({name:a(),version:a(),description:a(),keywords:h(a()).readonly(),publishedAt:a(),author:a(),installed:m(),installedVersion:a().optional()}),Vm=y({channel:jm,intervalSeconds:i()}),Hm=Mm,Um=r(),Wm=r(),Gm=r(),Km=y({packageName:a(),fromVersion:a(),toVersion:a(),restartingAt:i()}),qm=v([`queued`,`updating`,`done`,`done-pending-restart`,`failed`]),Jm=y({name:a(),isSystem:m(),fromVersion:a(),toVersion:a(),status:qm,error:a().optional(),startedAtMs:i().optional(),completedAtMs:i().optional()}),Ym=v([`regular`,`system`,`restarting`,`finalizing`]);y({id:a(),nodeId:a(),startedAtMs:i(),completedAtMs:i().optional(),total:i(),completed:i(),failed:i(),current:a().nullable(),phase:Ym,cancelled:m(),items:h(Jm).readonly()});var Xm=y({packageName:a(),currentVersion:a(),latestVersion:a().nullable(),hasUpdate:m(),description:a().optional()}),Zm=y({timestamp:a(),level:a(),message:a(),scope:a().optional()}),Qm=r(),$m=y({addonId:a().min(1),action:a().min(1),input:r()}),eh={name:`addons`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{list:P(_(),h(Im).readonly()),getLogs:P(y({addonId:a(),limit:i().min(1).max(500).default(100),level:Am.optional()}),h(Qm)),listPackages:P(_(),h(Lm).readonly()),installPackage:P(y({packageName:a(),version:a().optional()}),Wm,{kind:`mutation`,auth:`admin`}),installFromWorkspace:P(y({packageName:a()}),Wm,{kind:`mutation`,auth:`admin`}),isWorkspaceAvailable:P(_(),m()),listWorkspacePackages:P(_(),h(r()).readonly()),uninstallPackage:P(y({packageName:a()}),r(),{kind:`mutation`,auth:`admin`}),reloadPackages:P(_(),Gm,{kind:`mutation`,auth:`admin`}),searchAvailable:P(y({query:a().optional()}),h(Bm)),listUpdates:P(y({nodeId:a().optional()}),h(Rm).readonly(),{auth:`admin`}),updatePackage:P(y({name:a().min(1),version:a().optional(),nodeId:a().optional()}),r(),{kind:`mutation`,auth:`admin`}),rollbackPackage:P(y({name:a().min(1)}),y({rolledBackTo:a().nullable()}),{kind:`mutation`,auth:`admin`}),forceRefresh:P(y({nodeId:a().optional()}),r(),{kind:`mutation`,auth:`admin`}),restartServer:P(y({confirm:c(!0)}),r(),{kind:`mutation`,auth:`admin`}),getLastRestart:P(_(),y({kind:v([`framework-update`,`manual`,`system`,`framework-bulk-update`]),packageName:a().optional(),fromVersion:a().optional(),toVersion:a().optional(),requestedBy:a().optional(),requestedAt:i()}).nullable(),{auth:`admin`}),listFrameworkPackages:P(_(),h(Xm).readonly(),{auth:`admin`}),listCapabilityProviders:P(y({capName:a().min(1)}),h(y({addonId:a(),mode:v([`singleton`,`collection`]),isActive:m()})).readonly()),setCapabilityProviderEnabled:P(y({capName:a().min(1),addonId:a().min(1),enabled:m()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),updateFrameworkPackage:P(y({packageName:a().min(1),version:a().optional(),deferRestart:m().optional()}),Km,{kind:`mutation`,auth:`admin`}),getVersions:P(y({name:a()}),h(zm).readonly()),restartAddon:P(y({addonId:a()}),Um,{kind:`mutation`,auth:`admin`}),retryLoad:P(y({packageName:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),getAutoUpdateSettings:P(_(),Vm,{auth:`admin`}),setAutoUpdateSettings:P(y({channel:jm,intervalSeconds:i().min(300).max(86400).optional()}),r(),{kind:`mutation`,auth:`admin`}),getAddonAutoUpdate:P(y({addonId:a()}),Hm,{auth:`admin`}),setAddonAutoUpdate:P(y({addonId:a(),channel:Mm}),r(),{kind:`mutation`,auth:`admin`}),applyAutoUpdateToAll:P(y({channel:jm}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`}),custom:P($m,r(),{kind:`mutation`}),startJob:P(y({kind:v([`install`,`update`,`uninstall`,`restart`]),targets:h(y({name:a().min(1),version:a().min(1)})).min(1),nodeIds:h(a()).optional()}),y({jobId:a()}),{kind:`mutation`,auth:`admin`}),getJob:P(y({jobId:a()}),km.nullable(),{auth:`admin`}),listJobs:P(y({activeOnly:m().optional()}),h(km),{auth:`admin`}),cancelJob:P(y({jobId:a()}),y({cancelled:m()}),{kind:`mutation`,auth:`admin`}),onAddonLogs:P(y({addonId:a(),level:Am.optional()}),Zm,{kind:`subscription`})},mount:{kind:`service-backed`}},th={name:`button`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Button],methods:{press:P(y({deviceId:i().int().nonnegative()}),_(),{kind:`mutation`,auth:`admin`})}},nh=y({host:a(),port:i().int().positive().optional(),onvifPort:i().int().positive().optional(),rtspPort:i().int().positive().optional(),https:m().optional(),username:a().optional(),password:a().optional(),onvifProfile:a().optional()}),rh=y({host:a(),port:i().int().positive().nullable(),onvifPort:i().int().positive().nullable(),rtspPort:i().int().positive().nullable(),https:m().nullable(),hasUsername:m(),hasPassword:m(),onvifProfile:a().nullable()}),ih={name:`camera-credentials`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],methods:{getCredentials:P(y({deviceId:i()}),nh.nullable(),{kind:`query`,auth:`admin`})},status:{schema:rh,kind:`command-driven`}},ah=y({id:a(),label:a(),protocol:v([`rtsp`,`rtmp`,`annexb`,`http-mjpeg`,`webrtc`,`custom`]),url:a().optional(),resolution:y({width:i(),height:i()}).optional(),fps:i().optional(),bitrate:i().optional(),codec:a().optional(),profileHint:w.optional(),sdp:a().optional()}),oh=y({key:a(),value:r()}),sh=y({source:a(),data:o(a(),r())}),ch={name:`device-ops`,scope:`device`,deviceNative:!0,mode:`singleton`,methods:{getStreamSources:P(y({deviceId:i()}),h(ah)),getConfigEntries:P(y({deviceId:i()}),h(oh)),setConfig:P(y({deviceId:i(),values:o(a(),r())}),_(),{kind:`mutation`}),runAction:P(y({deviceId:i(),action:a().min(1),input:r()}),r(),{kind:`mutation`}),removeDevice:P(y({deviceId:i()}),_(),{kind:`mutation`}),getSettingsSchema:P(y({deviceId:i()}),r().nullable()),getRawState:P(y({deviceId:i()}),sh.nullable(),{auth:`protected`})}},lh=y({id:a(),type:a(),timestamp:i(),label:a().optional(),thumbnailUrl:a().optional(),clipUrl:a().optional(),metadata:o(a(),r()).optional()}),uh={name:`events`,scope:`device`,mode:`singleton`,deviceTypes:[j.Camera],methods:{getEvents:P(y({deviceId:i(),from:i().optional(),to:i().optional(),limit:i().optional()}),h(lh)),getEventThumbnail:P(y({deviceId:i(),eventId:a()}),y({base64:a(),contentType:a()}).nullable()),getEventClipUrl:P(y({deviceId:i(),eventId:a()}),a().nullable())}},dh=y({id:a(),name:a(),sampleCount:i().int().nonnegative(),coverMediaKey:a().optional(),coverBase64:a().optional()}),fh=y({id:a(),source:v([`detected`,`photo`]),addedAt:i().int(),deviceId:i().int().optional(),base64:a().optional()}),ph=y({faceId:a(),deviceId:i().int(),trackId:a(),timestamp:i().int(),recognizedIdentityId:a().optional(),identityName:a().optional(),assigned:m(),base64:a().optional()}),mh=v([`unassigned`,`recognized`,`all`]),hh=y({key:a(),kind:a(),base64:a(),sizeBytes:i(),timestamp:i()}),gh={name:`face-gallery`,scope:`system`,mode:`singleton`,methods:{listIdentities:P(_(),h(dh).readonly()),createIdentity:P(y({name:a().min(1)}),dh,{kind:`mutation`,auth:`admin`}),renameIdentity:P(y({id:a(),name:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),deleteIdentity:P(y({id:a()}),_(),{kind:`mutation`,auth:`admin`}),listIdentitySamples:P(y({identityId:a()}),h(fh).readonly()),removeSample:P(y({identityId:a(),sampleId:a()}),_(),{kind:`mutation`,auth:`admin`}),listRecentFaces:P(y({limit:i().int().positive().optional(),filter:mh.optional()}).optional(),h(ph).readonly()),getFaceByTrack:P(y({deviceId:i().int(),trackId:a()}),ph.nullable()),getFaceMedia:P(y({faceId:a()}),h(hh).readonly()),assignFace:P(y({faceId:a(),identityId:a()}),_(),{kind:`mutation`,auth:`admin`}),unassignFace:P(y({faceId:a()}),_(),{kind:`mutation`,auth:`admin`}),deleteFace:P(y({faceId:a()}),_(),{kind:`mutation`,auth:`admin`}),assignFaces:P(y({faceIds:h(a()).min(1),identityId:a()}),y({assigned:i().int(),failed:h(a()).readonly()}),{kind:`mutation`,auth:`admin`}),unassignFaces:P(y({faceIds:h(a()).min(1)}),y({unassigned:i().int(),failed:h(a()).readonly()}),{kind:`mutation`,auth:`admin`}),suggestFaceClusters:P(y({threshold:i().min(0).max(1).optional(),minClusterSize:i().int().min(2).optional(),limit:i().int().positive().optional()}).optional(),h(y({faceIds:h(a()).readonly(),representativeFaceId:a(),size:i().int(),cohesion:i()})).readonly())}},_h=y({id:a(),addonId:a(),name:a(),enabled:m(),info:o(a(),r()).readonly(),createdAt:i(),updatedAt:i(),processState:a()}),vh=y({id:a(),addonId:a(),name:a(),enabled:m(),info:o(a(),r()).readonly(),createdAt:i(),updatedAt:i()}),yh=y({addonId:a(),name:a(),description:a(),iconUrl:a().nullable(),color:a(),instanceMode:a(),mode:v([`standalone`,`account`,`broker`]),discoveryMode:a(),kind:v([`device-adoption`,`device-provider`]),brokerKind:a().nullable(),supportsLocationImport:m(),existingInstances:h(y({id:a(),name:a()})),canAdd:m()}),bh=y({success:m(),error:a().optional()}),xh=y({addonId:a(),name:a(),enabled:m().optional(),info:o(a(),r()).optional(),settings:o(a(),r()).optional(),skipRestart:m().optional()}),Sh=y({id:a(),name:a().optional(),enabled:m().optional(),info:o(a(),r()).optional()}),Ch=y({success:m(),deletedId:a()}),wh={name:`integrations`,scope:`system`,mode:`singleton`,methods:{list:P(_(),h(_h)),get:P(y({id:a()}),_h),getByAddonId:P(y({addonId:a()}),vh.nullable()),create:P(xh,vh,{kind:`mutation`,auth:`admin`}),update:P(Sh,vh,{kind:`mutation`,auth:`admin`}),delete:P(y({id:a()}),Ch,{kind:`mutation`,auth:`admin`}),getSettings:P(y({id:a()}),o(a(),r()),{auth:`admin`}),setSettings:P(y({id:a(),settings:o(a(),r())}),y({success:m()}),{kind:`mutation`,auth:`admin`}),getAvailableTypes:P(_(),h(yh),{auth:`admin`}),testConnection:P(y({addonId:a(),settings:o(a(),r())}),bh,{kind:`mutation`,auth:`admin`})},mount:{kind:`service-backed`}},Th=y({codecs:h(a()),sampleRate:i(),duplex:v([`half`,`full`]),maxBacklogMs:i()}),Eh=y({talking:m(),lastSessionAt:i().nullable(),ability:Th.nullable()}),Dh=v([`opus`,`s16le`,`g711ulaw`,`g711alaw`]),Oh={name:`intercom`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],methods:{startSession:P(y({deviceId:i()}),y({sessionId:a(),sdpOffer:a()}),{kind:`mutation`,auth:`admin`}),handleAnswer:P(y({deviceId:i(),sessionId:a(),sdpAnswer:a()}),_(),{kind:`mutation`,auth:`admin`}),stopSession:P(y({deviceId:i(),sessionId:a()}),_(),{kind:`mutation`,auth:`admin`}),startTalkSession:P(y({deviceId:i()}),y({sessionId:a()}),{kind:`mutation`,auth:`admin`}),pushTalkAudio:P(y({deviceId:i(),audioBase64:a(),codec:Dh.optional(),sampleRate:i().int().positive().optional(),channels:i().int().positive().optional(),sequenceNumber:i().int()}),y({accepted:m()}),{kind:`mutation`,auth:`admin`}),endTalkSession:P(y({deviceId:i()}),_(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:y({deviceId:i(),status:Eh})}},status:{schema:Eh,kind:`command-driven`}},kh=v([`lan`,`wifi`,`docker`,`vpn`,`loopback`,`other`]),Ah=y({name:a(),family:v([`IPv4`,`IPv6`]),address:a(),cidr:a(),netmask:a(),internal:m(),mac:a(),kind:kh,preferred:m(),plausible:m(),plausibleReason:a()}),jh=y({interfaces:h(Ah).readonly(),probedAt:i()}),Mh=Ah.nullable(),Nh=y({endpoints:h(y({label:a(),baseUrl:a(),kind:v([`lan-ipv4`,`lan-ipv6`,`public`,`loopback`]),interfaceKind:v([`lan`,`wifi`,`docker`,`vpn`,`other`,`loopback`,`public`]),plausible:m(),plausibleReason:a(),priority:i()})).readonly()}),Ph=y({addresses:h(a()).readonly()}),Fh={name:`local-network`,scope:`system`,mode:`singleton`,methods:{list:P(_(),jh),getPreferred:P(_(),Mh),getConnectionEndpoints:P(y({port:i().int().min(1).max(65535),includeLoopback:m().optional(),ipv4Only:m().optional(),scheme:v([`http`,`https`]).optional()}),Nh),getAllowedAddresses:P(_(),Ph),setAllowedAddresses:P(Ph,y({success:c(!0)}),{kind:`mutation`}),resetAllowlistToBestMatch:P(_(),Ph,{kind:`mutation`})},mount:{kind:`hub-only`}},Ih=y({id:a(),label:a(),scope:v([`mesh`,`public`]),url:a(),hostname:a(),port:i(),protocol:v([`http`,`https`])}),Lh=y({id:a(),hostname:a(),magicDns:a(),addresses:h(a()).readonly(),os:a().optional(),online:m(),lastSeenMs:i(),isSelf:m(),connection:v([`direct`,`relay`,`idle`]),relay:a().nullable(),lastHandshakeMs:i(),rxBytes:i(),txBytes:i(),tags:h(a()).readonly(),exitNodeOption:m(),advertisedRoutes:h(a()).readonly(),userLogin:a().nullable(),keyExpiry:i().nullable()}),Rh=y({joined:m(),meshIp:a(),magicDnsHostname:a(),peerCount:i(),endpoints:h(Ih).readonly(),error:a().optional(),tenantName:a(),magicDnsSuffix:a(),userLogin:a().nullable(),controlPlaneUrl:a(),keyExpiry:i().nullable(),daemonSocket:a().optional(),daemonCliPath:a().optional()}),zh={name:`mesh-network`,scope:`system`,mode:`collection`,providerKind:`mesh`,methods:{getStatus:P(_(),Rh),join:P(y({authKey:a().min(8),hostname:a().optional()}),y({joined:c(!0)}),{kind:`mutation`}),startLogin:P(y({hostname:a().optional()}),y({loginUrl:a()}),{kind:`mutation`}),leave:P(_(),y({left:c(!0)}),{kind:`mutation`}),logout:P(_(),y({loggedOut:c(!0)}),{kind:`mutation`}),listPeers:P(_(),y({peers:h(Lh).readonly()})),testConnection:P(y({authKey:a().optional()}),y({ok:m(),tenant:a().optional(),daemonVersion:a().optional(),error:a().optional()}),{kind:`mutation`})}},Bh=y({nominalBitrateKbps:i(),observedBitrateKbps:i(),peakBitrateKbps:i(),packetLossPercent:i(),lastUpdated:i()}),Vh=y({rttMs:i(),jitterMs:i(),estimatedBandwidthKbps:i(),packetLossPercent:i().min(0).max(100),lastUpdated:i()}),Hh=y({deviceId:i(),streams:o(a(),Bh),client:Vh.optional()}),Uh={name:`network-quality`,scope:`system`,mode:`singleton`,methods:{getDeviceStats:P(y({deviceId:i()}),Hh.nullable()),getAllStats:P(_(),h(Hh).readonly()),reportClientStats:P(y({deviceId:i(),rttMs:i().min(0).max(6e4),jitterMs:i().min(0).max(1e4),estimatedBandwidthKbps:i().min(0).max(1e6),packetLossPercent:i().min(0).max(100)}),_(),{kind:`mutation`})},mount:{kind:`service-backed`}},Wh=y({addonId:a(),capabilities:h(a()).readonly(),status:a()}),Gh=y({pid:i(),name:a(),state:a(),cpuPercent:i(),memoryRss:i(),uptimeSeconds:i(),services:h(Wh).readonly(),groupId:a().optional()}),Kh=y({id:a(),status:a(),cpuPercent:i(),memoryRss:i()}),qh=y({category:a(),total:i(),healthy:i(),addons:h(Kh).readonly()}),Jh=y({id:a(),name:a(),hostname:a(),platform:a(),arch:a(),cpuModel:a().nullable(),cpuCores:i(),memoryMB:i(),engines:h(a()).readonly(),isHub:m(),isOnline:m(),cpuPercent:i(),memoryPercent:i(),uptime:i(),lastSeen:a(),localIps:h(a()).readonly(),addons:h(y({id:a(),capabilities:h(a()).readonly(),status:a()})).readonly(),processes:h(Gh).readonly(),categories:h(qh).readonly()}),Yh=y({callerAddonId:a(),providerAddonId:a(),capName:a(),callsPerMin:i(),lastCallAtMs:i()}),Xh=y({nodeId:a(),name:a(),version:a(),status:a(),synced:m()}),Zh=y({hubVersion:a(),nodes:h(Xh)}),Qh=y({nodeId:a(),addonId:a()}),$h=y({id:a(),status:a(),version:a().optional(),packageName:a().optional()}),$=y({success:m()}),eg=y({success:m(),reason:a().optional()}),tg=y({restarted:h(a()).readonly(),failed:h(a()).readonly()}),ng=y({nodeId:a(),name:a()}),rg={name:`nodes`,scope:`system`,mode:`singleton`,nodeIdMode:`data`,methods:{topology:P(_(),h(Jh).readonly(),{auth:`admin`}),deployAddon:P(Qh,$,{kind:`mutation`,auth:`admin`}),undeployAddon:P(Qh,$,{kind:`mutation`,auth:`admin`}),restartAddon:P(Qh,$,{kind:`mutation`,auth:`admin`}),restartProcess:P(y({nodeId:a(),processName:a()}),eg,{kind:`mutation`,auth:`admin`}),restartNode:P(y({nodeId:a()}),tg,{kind:`mutation`,auth:`admin`}),shutdownNode:P(y({nodeId:a()}),$,{kind:`mutation`,auth:`admin`}),renameNode:P(y({nodeId:a(),name:a().min(1).max(64)}),ng,{kind:`mutation`,auth:`admin`}),clusterAddonStatus:P(_(),o(a(),Zh),{auth:`admin`}),getCapUsageGraph:P(y({windowSeconds:i().int().positive().max(300).default(60)}),h(Yh).readonly(),{auth:`admin`}),getNodeAddons:P(y({nodeId:a()}),h($h).readonly(),{auth:`admin`}),setProcessLogLevel:P(y({nodeId:a(),level:a()}),$,{kind:`mutation`,auth:`admin`}),executeQuery:P(y({nodeId:a(),addonId:a(),queryName:a(),params:o(a(),r()).optional()}),r(),{kind:`mutation`,auth:`admin`})},mount:{kind:`service-backed`}},ig=v([`text`,`timestamp`,`watermark`]),ag=v([`top-left`,`top-center`,`top-right`,`bottom-left`,`bottom-center`,`bottom-right`,`custom`]),og=y({id:a(),kind:ig,enabled:m(),text:a().optional(),position:ag.optional(),availablePositions:h(ag).readonly(),readOnly:m().optional()}),sg=y({overlays:h(og).readonly()}),cg=y({enabled:m().optional(),text:a().optional(),position:ag.optional()}).partial(),lg={name:`osd`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],methods:{setOverlay:P(y({deviceId:i(),overlayId:a(),patch:cg}),_(),{kind:`mutation`,auth:`admin`})},events:{onStatusChanged:{data:y({deviceId:i(),status:sg})}},status:{schema:sg,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}}}]}},ug=y({plateId:a(),deviceId:i().int(),trackId:a(),timestamp:i().int(),text:a(),score:i(),corrected:m(),base64:a().optional()}),dg=y({key:a(),kind:a(),base64:a(),sizeBytes:i(),timestamp:i()}),fg=y({plateIds:h(a()).readonly(),representativePlateId:a(),representativeText:a(),size:i().int(),cohesion:i()}),pg={name:`plate-gallery`,scope:`system`,mode:`singleton`,methods:{listPlates:P(y({deviceId:i().int().optional(),limit:i().int().positive().optional()}).optional(),h(ug).readonly()),getPlateByTrack:P(y({deviceId:i().int(),trackId:a()}),ug.nullable()),getPlateMedia:P(y({plateId:a()}),h(dg).readonly()),searchPlates:P(y({text:a().min(1),maxDistance:i().int().min(0).optional(),limit:i().int().positive().optional()}),h(ug).readonly()),suggestPlateClusters:P(y({maxDistance:i().int().min(0).optional(),minClusterSize:i().int().min(2).optional(),limit:i().int().positive().optional()}).optional(),h(fg).readonly()),correctPlateText:P(y({plateId:a(),text:a().min(1)}),_(),{kind:`mutation`,auth:`admin`}),deletePlate:P(y({plateId:a()}),_(),{kind:`mutation`,auth:`admin`})}},mg=v(ye),hg=v([`videotoolbox`,`cuda`,`nvdec`,`vaapi`,`qsv`,`d3d11va`,`dxva2`,`amf`,`vdpau`,`drm`,`coreml`,`tensorrt`,`openvino`,`directml`,`webgpu`,`none`]).nullable().optional(),gg=y({preferred:h(a()).readonly()}),_g=v([`h264_videotoolbox`,`hevc_videotoolbox`,`h264_vaapi`,`hevc_vaapi`,`h264_nvenc`,`hevc_nvenc`,`h264_qsv`,`hevc_qsv`,`h264_amf`,`hevc_amf`,`libx264`,`libx265`]),vg=y({encoders:h(y({encoder:_g,codec:v([`H264`,`H265`]),family:v([`videotoolbox`,`vaapi`,`nvenc`,`qsv`,`amf`,`software`]),available:m(),reason:a().optional()})).readonly(),defaultH264:_g,defaultH265:_g,probedAt:i()}),yg=y({methods:h(a()).readonly(),probedAt:i()}),bg=v([`darwin`,`linux`,`win32`]),xg=v([`arm64`,`x64`]),Sg=y({type:v([`nvidia`,`amd`,`intel`,`apple`]),name:a(),memoryMB:i().optional()}),Cg=y({type:v([`apple-ane`,`intel-npu`])}),wg=y({platform:bg,arch:xg,cpuModel:a(),cpuCores:i(),totalRAM_MB:i(),availableRAM_MB:i(),gpu:Sg.nullable(),npu:Cg.nullable()}),Tg=y({runtime:v([`node`,`python`]),backend:a(),format:v([`onnx`,`coreml`,`openvino`]),score:i(),reason:a(),available:m()}),Eg=y({hardware:wg,scores:h(Tg).readonly(),bestScore:Tg,pythonPath:a().nullable()}),Dg=y({modelId:a(),name:a(),minRAM_MB:i(),accuracyScore:i(),formats:h(a()).readonly()}),Og=y({modelId:a(),runtime:v([`node`,`python`]),backend:a(),format:mg,reason:a()}),kg={name:`platform-probe`,scope:`system`,mode:`singleton`,methods:{getCapabilities:P(_(),Eg),getHardware:P(_(),wg),resolveInferenceConfig:P(y({requirements:h(Dg).readonly()}),Og),resolveHwAccel:P(y({prefer:hg,nodeId:a().optional()}),gg),getHardwareEncoders:P(_(),vg),refreshHardwareEncoders:P(_(),vg,{kind:`mutation`,auth:`admin`}),getHardwareDecodeAccels:P(_(),yg),refreshHardwareDecodeAccels:P(_(),yg,{kind:`mutation`,auth:`admin`})}},Ag=y({id:a(),name:a()}),jg=y({pan:i(),tilt:i(),zoom:i()}),Mg=y({pan:i().optional(),tilt:i().optional(),zoom:i().optional(),speed:i().optional()}),Ng=jg.extend({autofocus:m()}),Pg=y({hasPan:m(),hasTilt:m(),hasZoom:m(),supportsPresets:m(),maxPresets:i().optional(),hasAutofocus:m()}),Fg={name:`ptz`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],deviceConfig:{ui:{kind:`widget`,widgetId:`host/ptz-panel`,tab:`ptz`,topTab:!0,label:`PTZ`,order:0}},methods:{move:P(Mg.extend({deviceId:i()}),_(),{kind:`mutation`}),continuousMove:P(Mg.extend({deviceId:i()}),_(),{kind:`mutation`}),stop:P(y({deviceId:i()}),_(),{kind:`mutation`}),getPresets:P(y({deviceId:i()}),h(Ag)),goToPreset:P(y({deviceId:i(),presetId:a()}),_(),{kind:`mutation`}),savePreset:P(y({deviceId:i(),presetId:a(),name:a()}),_(),{kind:`mutation`,auth:`admin`}),deletePreset:P(y({deviceId:i(),presetId:a()}),_(),{kind:`mutation`,auth:`admin`}),getOptions:P(y({deviceId:i()}),Pg),goHome:P(y({deviceId:i()}),_(),{kind:`mutation`}),getPosition:P(y({deviceId:i()}),jg),setAutofocus:P(y({deviceId:i(),enabled:m()}),_(),{kind:`mutation`})},status:{schema:Ng,kind:`command-driven`}},Ig={name:`reboot`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera,j.Sensor,j.Switch],methods:{reboot:P(y({deviceId:i().int().nonnegative()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`})}},Lg=y({deviceId:i(),enabled:m(),activeMode:v([`off`,`continuous`,`events`]),nodeId:a(),storageBytes:i()}),Rg=y({profile:a(),startMs:i(),endMs:i()}),zg=y({deviceId:i(),ranges:h(Rg)}),Bg=y({deviceId:i(),days:h(i())}),Vg=y({deviceId:i(),localMasterPath:a().nullable(),playbackUrl:a().nullable(),playbackEndpoints:h(a())}),Hg=y({deviceId:i(),usedBytes:i()}),Ug=y({locationId:a().nullable(),usedBytes:i(),availableBytes:i().nullable(),totalBytes:i().nullable()}),Wg=y({nodeId:a(),totalUsedBytes:i(),devices:h(Hg),locations:h(Ug)}),Gg=b(`kind`,[y({kind:c(`segment`),startMs:i(),durMs:i(),bytes:i()}),y({kind:c(`gap`),nearestEdgeMs:i().nullable()})]),Kg=y({data:p(Uint8Array)}),qg={name:`recording`,scope:`system`,mode:`singleton`,exposesDeviceSettings:!0,status:{schema:Lg,kind:`command-driven`},methods:{getAvailability:P(y({deviceId:i(),fromMs:i(),toMs:i()}),zg,{kind:`query`,auth:`admin`}),getDaysWithRecordings:P(y({deviceId:i(),fromMs:i(),toMs:i(),tzOffsetMinutes:i()}),Bg,{kind:`query`,auth:`admin`}),getPlaybackManifest:P(y({deviceId:i(),fromMs:i(),toMs:i()}),Vg,{kind:`query`,auth:`admin`}),getStorageUsage:P(y({}),Wg,{kind:`query`,auth:`admin`}),getDeviceConfig:P(y({deviceId:i()}),E,{kind:`query`,auth:`admin`}),locateSegment:P(y({deviceId:i(),profile:a(),epochMs:i()}),Gg,{kind:`query`,auth:`admin`}),readSegmentBytes:P(y({deviceId:i(),profile:a(),startMs:i()}),Kg,{kind:`query`,auth:`admin`}),setDeviceConfig:P(y({deviceId:i(),config:E}),E,{kind:`mutation`,auth:`admin`}),rescanStorage:P(y({deviceId:i()}),Lg,{kind:`mutation`,auth:`admin`}),pruneFootage:P(y({deviceId:i()}),y({floorMs:i().nullable(),deletedBuckets:i().int(),reclaimedBytes:i().int()}),{kind:`mutation`,auth:`admin`})}},Jg=y({camStreamId:a().min(1),kind:tt,url:a().optional(),codec:a().optional(),resolution:T.optional(),fps:i().positive().optional(),label:a().optional(),deviceFeatures:h(a()).optional(),autoEligible:m().optional(),metadata:o(a(),r()).optional()}),Yg={name:`stream-catalog`,scope:`device`,deviceNative:!0,mode:`singleton`,deviceTypes:[j.Camera],methods:{getCatalog:P(y({deviceId:i().int().nonnegative()}),h(Jg).readonly())}},Xg=[{profile:`main`,prefix:`streamMain`,label:`Main stream`},{profile:`sub`,prefix:`streamSub`,label:`Sub stream`},{profile:`ext`,prefix:`streamExt`,label:`Third stream`}];function Zg(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 Qg(e,t){let n=[];for(let r of Xg){let i=e[r.profile];if(!i)continue;let a=Zg(r,i,t?.[r.profile]);a&&n.push(a)}return n.length===0?null:{sections:n}}function $g(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 e_=y({streaming:m(),notifications:m(),objectDetection:m(),remoteAccess:m(),agentCluster:m(),smartHome:m(),recordings:m(),backup:m(),repl:m()}),t_=y({status:c(`ok`),uptime:i()}),n_=y({name:a(),address:a(),family:a(),internal:m()}),r_={name:`system`,scope:`system`,mode:`singleton`,methods:{info:P(_(),e_),health:P(_(),t_),featureFlags:P(_(),e_),networkAddresses:P(_(),h(n_).readonly()),getRetentionConfig:P(_(),r().nullable(),{auth:`admin`}),setRetentionConfig:P(o(a(),r()),te(),{kind:`mutation`,auth:`admin`}),forceRetentionCleanup:P(_(),_(),{kind:`mutation`,auth:`admin`})},mount:{kind:`service-backed`}},i_=y({title:a(),message:a(),severity:v([`info`,`warning`,`critical`]),duration:i().optional(),action:y({label:a(),url:a()}).optional()}),a_={name:`toast`,scope:`system`,mode:`singleton`,methods:{onToast:P(_(),i_,{kind:`subscription`})},mount:{kind:`service-backed`}},o_=y({id:a(),username:a(),isAdmin:m().default(!1),allowedProviders:g([h(a()),c(`*`)]),allowedDevices:o(a(),g([h(a()),c(`*`)])),scopes:h(Z).default([]),totpEnabled:m().default(!1),createdAt:i(),updatedAt:i()}),s_=y({username:a(),password:a().min(6),isAdmin:m().default(!1),allowedProviders:g([h(a()),c(`*`)]).optional(),allowedDevices:o(a(),g([h(a()),c(`*`)])).optional(),scopes:h(Z).optional()}),c_=y({id:a(),isAdmin:m().optional(),allowedProviders:g([h(a()),c(`*`)]).optional(),allowedDevices:o(a(),g([h(a()),c(`*`)])).optional(),scopes:h(Z).optional()}),l_=y({id:a(),label:a(),isAdmin:m().default(!1),allowedProviders:g([h(a()),c(`*`)]).optional(),allowedDevices:o(a(),g([h(a()),c(`*`)])).optional(),tokenPrefix:a(),createdAt:i(),lastUsedAt:i().optional()}),u_=y({label:a(),isAdmin:m().default(!1),allowedProviders:g([h(a()),c(`*`)]).optional(),allowedDevices:o(a(),g([h(a()),c(`*`)])).optional()}),d_=y({token:a(),record:l_}),f_=y({id:a(),userId:a(),name:a(),tokenPrefix:a(),scopes:h(Z),expiresAt:i().nullish(),lastUsedAt:i().nullish(),createdAt:i()}),p_=y({userId:a(),name:a(),scopes:h(Z),expiresAt:i().optional()}),m_=y({token:a(),record:f_}),h_=y({id:a(),userId:a(),username:a(),integrationId:a(),scopes:h(Z),createdAt:i(),lastUsedAt:i(),revokedAt:i().nullable()}),g_=y({secret:a(),otpauthUrl:a()}),__=y({enabled:m(),confirmedAt:i().nullable()}),v_={name:`user-management`,scope:`system`,mode:`singleton`,methods:{listUsers:P(_(),h(o_),{auth:`admin`}),createUser:P(s_,o_,{kind:`mutation`,auth:`admin`,access:`create`}),updateUser:P(c_,y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),deleteUser:P(y({id:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),resetPassword:P(y({id:a(),newPassword:a().min(6)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),setUserScopes:P(y({userId:a(),scopes:h(Z)}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),validateCredentials:P(y({username:a(),password:a()}),o_.extend({passwordHash:a()}).nullable(),{kind:`mutation`,access:`view`}),listApiKeys:P(_(),h(l_),{auth:`admin`}),createApiKey:P(u_,d_,{kind:`mutation`,auth:`admin`,access:`create`}),revokeApiKey:P(y({id:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateApiKey:P(y({token:a()}),l_.nullable(),{kind:`mutation`,access:`view`}),createScopedToken:P(p_,m_,{kind:`mutation`,auth:`admin`,access:`create`}),revokeScopedToken:P(y({id:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),validateScopedToken:P(y({token:a()}),f_.nullable(),{access:`view`}),listScopedTokens:P(y({userId:a()}),h(f_),{auth:`admin`}),setupTotp:P(y({userId:a()}),g_,{kind:`mutation`,auth:`admin`,access:`create`}),confirmTotp:P(y({userId:a(),code:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`create`}),disableTotp:P(y({userId:a()}),y({success:c(!0)}),{kind:`mutation`,auth:`admin`,access:`delete`}),getTotpStatus:P(y({userId:a()}),__,{auth:`admin`}),verifyTotp:P(y({userId:a(),code:a()}),y({valid:m()}),{kind:`mutation`,access:`view`}),oauthIssueCode:P(y({integrationId:a(),userId:a(),username:a(),scopes:h(Z),redirectUri:a(),hubUrl:a()}),y({code:a()}),{kind:`mutation`,access:`create`}),oauthExchangeCode:P(y({code:a(),redirectUri:a()}),y({accessToken:a(),refreshToken:a(),expiresIn:i()}).nullable(),{kind:`mutation`,access:`view`}),oauthRefresh:P(y({refreshToken:a()}),y({accessToken:a(),refreshToken:a(),expiresIn:i()}).nullable(),{kind:`mutation`,access:`view`}),oauthVerifyAccessToken:P(y({token:a()}),y({userId:a(),username:a(),scopes:h(Z)}).nullable(),{access:`view`}),listOauthSessions:P(_(),h(h_),{auth:`admin`}),revokeOauthSession:P(y({id:a()}),y({success:m()}),{kind:`mutation`,auth:`admin`,access:`delete`})}},y_=[`decoder`,`motion-detection`,`pipeline-executor`,`audio-analyzer`,`pipeline-analytics`,`notification-output`],b_=[...y_,`pipeline-orchestrator`,`pipeline-runner`],x_={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`,advancedNotifier:`advanced-notifier`,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`,connectivity:`connectivity`,consumables:`consumables`,contact:`contact`,control:`control`,cover:`cover`,customModelRegistry:`custom-model-registry`,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`,integrations:`integrations`,intercom:`intercom`,lawnMowerControl:`lawn-mower-control`,localNetwork:`local-network`,lockControl:`lock-control`,logDestination:`log-destination`,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`,notifier:`notifier`,numericSensor:`numeric-sensor`,oauthIntegration:`oauth-integration`,osd:`osd`,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`,restreamer:`restreamer`,scriptRunner:`script-runner`,settingsStore:`settings-store`,smoke:`smoke`,smtpProvider:`smtp-provider`,snapshot:`snapshot`,snapshotProvider:`snapshot-provider`,ssoBridge:`sso-bridge`,storage:`storage`,storageEvictable:`storage-evictable`,storageProvider:`storage-provider`,streamBroker:`stream-broker`,streamCatalog:`stream-catalog`,streamParams:`stream-params`,streamingEngine:`streaming-engine`,switch:`switch`,system:`system`,tamper:`tamper`,temperatureSensor:`temperature-sensor`,toast:`toast`,turnProvider:`turn-provider`,update:`update`,userManagement:`user-management`,userPasskeys:`user-passkeys`,vacuumControl:`vacuum-control`,valve:`valve`,vibration:`vibration`,videoclips:`videoclips`,waterHeater:`water-heater`,weather:`weather`,webrtc:`webrtc`,webrtcSession:`webrtc-session`,zoneAnalytics:`zone-analytics`,zoneRules:`zone-rules`,zones:`zones`},S_=[{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:`advancedNotifier`,name:`advanced-notifier`},{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:`connectivity`,name:`connectivity`},{key:`consumables`,name:`consumables`},{key:`contact`,name:`contact`},{key:`control`,name:`control`},{key:`cover`,name:`cover`},{key:`customModelRegistry`,name:`custom-model-registry`},{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:`integrations`,name:`integrations`},{key:`intercom`,name:`intercom`},{key:`lawnMowerControl`,name:`lawn-mower-control`},{key:`localNetwork`,name:`local-network`},{key:`lockControl`,name:`lock-control`},{key:`logDestination`,name:`log-destination`},{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:`notifier`,name:`notifier`},{key:`numericSensor`,name:`numeric-sensor`},{key:`oauthIntegration`,name:`oauth-integration`},{key:`osd`,name:`osd`},{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:`restreamer`,name:`restreamer`},{key:`scriptRunner`,name:`script-runner`},{key:`settingsStore`,name:`settings-store`},{key:`smoke`,name:`smoke`},{key:`smtpProvider`,name:`smtp-provider`},{key:`snapshot`,name:`snapshot`},{key:`snapshotProvider`,name:`snapshot-provider`},{key:`ssoBridge`,name:`sso-bridge`},{key:`storage`,name:`storage`},{key:`storageEvictable`,name:`storage-evictable`},{key:`storageProvider`,name:`storage-provider`},{key:`streamBroker`,name:`stream-broker`},{key:`streamCatalog`,name:`stream-catalog`},{key:`streamParams`,name:`stream-params`},{key:`streamingEngine`,name:`streaming-engine`},{key:`switch`,name:`switch`},{key:`system`,name:`system`},{key:`tamper`,name:`tamper`},{key:`temperatureSensor`,name:`temperature-sensor`},{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:`vibration`,name:`vibration`},{key:`videoclips`,name:`videoclips`},{key:`waterHeater`,name:`water-heater`},{key:`weather`,name:`weather`},{key:`webrtc`,name:`webrtc`},{key:`webrtcSession`,name:`webrtc-session`},{key:`zoneAnalytics`,name:`zone-analytics`},{key:`zoneRules`,name:`zone-rules`},{key:`zones`,name:`zones`}],C_=[xm,ul,fl,gl,xl,Ol,El,eh,jl,Rl,wr,Fr,Ul,Lr,Wl,Xl,iu,Hr,ou,Wr,pu,Kr,Jr,Xr,Pu,th,ih,Fu,vi,bi,Ci,Oi,Ai,Ni,Fi,zi,Hi,Bu,Wu,Gu,id,Xi,pd,Td,ch,Cc,Ed,br,$i,kd,na,aa,uh,gh,ca,Sr,Md,ua,fa,ma,ga,va,wh,Oh,Sa,Fh,Ta,Fd,Aa,zh,ef,nf,of,Ao,Ra,No,qo,vf,Qo,Sf,Uh,rg,wf,as,ss,Nf,lg,Zf,go,Ep,Do,pg,kg,ls,fs,ms,bs,Fg,Ts,Ig,qg,kp,Ds,Pp,ks,Rp,Vp,Hp,Wp,Kp,Yp,sm,pi,Yg,Is,$r,Rs,r_,Bs,Hs,a_,lm,Ws,v_,dm,Js,Zs,$s,mm,tc,rc,gm,ym,uc,mc,yo],w_=`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.device-adoption.device-discovery.device-export.device-status.doorbell.enum-sensor.event-emitter.fan-control.feature-probe.flood.gas.humidifier.humidity-sensor.image.intercom.lawn-mower-control.lock-control.media-player.motion.motion-trigger.motion-zones.mqtt-broker.native-object-detection.notifier.numeric-sensor.osd.power-meter.presence.pressure-sensor.privacy-mask.ptz.ptz-autotrack.recording.script-runner.smoke.snapshot.stream-params.switch.tamper.temperature-sensor.update.vacuum-control.valve.vibration.water-heater.weather`.split(`.`),T_=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.updateFrameworkPackage":{capName:`addons`,capScope:`system`,addonId:null,access:`create`},"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`},"advancedNotifier.deleteRule":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`delete`},"advancedNotifier.getHistory":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`view`},"advancedNotifier.getRules":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`view`},"advancedNotifier.testRule":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`create`},"advancedNotifier.upsertRule":{capName:`advanced-notifier`,capScope:`system`,addonId:null,access:`create`},"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.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.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`},"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`},"consumables.reset":{capName:`consumables`,capScope:`device`,addonId:null,access:`delete`},"control.setValue":{capName:`control`,capScope:`device`,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`},"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.adoptionListCandidates":{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.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.discoverDevices":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"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.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.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.setDeviceLinks":{capName:`device-manager`,capScope:`system`,addonId:null,access:`create`},"deviceManager.setDisabled":{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.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.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`},"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`},"localNetwork.getAllowedAddresses":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getConnectionEndpoints":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.getPreferred":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.list":{capName:`local-network`,capScope:`system`,addonId:null,access:`view`},"localNetwork.resetAllowlistToBestMatch":{capName:`local-network`,capScope:`system`,addonId:null,access:`delete`},"localNetwork.setAllowedAddresses":{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`},"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.send":{capName:`notification-output`,capScope:`system`,addonId:null,access:`create`},"notificationOutput.sendTest":{capName:`notification-output`,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`},"pipelineAnalytics.clearTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`delete`},"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.getMotionEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.getObjectEvents":{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.listTracks":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineAnalytics.pruneEventsBefore":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`create`},"pipelineAnalytics.searchObjectEvents":{capName:`pipeline-analytics`,capScope:`device`,addonId:null,access:`view`},"pipelineExecutor.cacheFrameInPool":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"pipelineExecutor.deleteModel":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.deleteTemplate":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`delete`},"pipelineExecutor.detect":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`view`},"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.reprobeEngine":{capName:`pipeline-executor`,capScope:`system`,addonId:null,access:`create`},"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`},"pipelineOrchestrator.assignAudio":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.assignDecoder":{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.getCapabilityBindings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getDecoderAssignment":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getDecoderAssignments":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.getGlobalMetrics":{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.listAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.listTemplates":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.rebalance":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.removeAgentSettings":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`delete`},"pipelineOrchestrator.resolvePipeline":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`view`},"pipelineOrchestrator.saveTemplate":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentAddonDefaults":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.setAgentMaxCameras":{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.setCapabilityBinding":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.unassignAudio":{capName:`pipeline-orchestrator`,capScope:`system`,addonId:null,access:`create`},"pipelineOrchestrator.unassignDecoder":{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.reportMotion":{capName:`pipeline-runner`,capScope:`system`,addonId:null,access:`create`},"plateGallery.correctPlateText":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`create`},"plateGallery.deletePlate":{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.searchPlates":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"plateGallery.suggestPlateClusters":{capName:`plate-gallery`,capScope:`system`,addonId:null,access:`view`},"platformProbe.getCapabilities":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.getHardware":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.getHardwareDecodeAccels":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.getHardwareEncoders":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`view`},"platformProbe.refreshHardwareDecodeAccels":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`create`},"platformProbe.refreshHardwareEncoders":{capName:`platform-probe`,capScope:`system`,addonId:null,access:`create`},"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.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.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.getStorageUsage":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.locateSegment":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.pruneFootage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.readSegmentBytes":{capName:`recording`,capScope:`system`,addonId:null,access:`view`},"recording.rescanStorage":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"recording.setDeviceConfig":{capName:`recording`,capScope:`system`,addonId:null,access:`create`},"restreamer.getExposedResources":{capName:`restreamer`,capScope:`system`,addonId:null,access:`view`},"restreamer.registerDevice":{capName:`restreamer`,capScope:`system`,addonId:null,access:`create`},"restreamer.unregisterDevice":{capName:`restreamer`,capScope:`system`,addonId:null,access:`delete`},"scriptRunner.run":{capName:`script-runner`,capScope:`device`,addonId:null,access:`create`},"scriptRunner.stop":{capName:`script-runner`,capScope:`device`,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.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`},"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.getSnapshot":{capName:`snapshot`,capScope:`device`,addonId:null,access:`view`},"snapshot.invalidateCache":{capName:`snapshot`,capScope:`device`,addonId:null,access:`create`},"snapshotProvider.getSnapshot":{capName:`snapshot-provider`,capScope:`system`,addonId:null,access:`view`},"snapshotProvider.supportsDevice":{capName:`snapshot-provider`,capScope:`system`,addonId:null,access:`view`},"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`},"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.assignProfile":{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.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.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.releaseStreamWithCodec":{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.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`},"streamingEngine.getStreamUrl":{capName:`streaming-engine`,capScope:`system`,addonId:null,access:`view`},"streamingEngine.listStreams":{capName:`streaming-engine`,capScope:`system`,addonId:null,access:`view`},"streamingEngine.registerStream":{capName:`streaming-engine`,capScope:`system`,addonId:null,access:`create`},"streamingEngine.unregisterStream":{capName:`streaming-engine`,capScope:`system`,addonId:null,access:`delete`},"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.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.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`},"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.beginRegistration":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`},"userPasskeys.finishAuthentication":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.finishRegistration":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`create`},"userPasskeys.listPasskeys":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`view`},"userPasskeys.removePasskey":{capName:`user-passkeys`,capScope:`system`,addonId:null,access:`delete`},"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`},"videoclips.getClipPlayback":{capName:`videoclips`,capScope:`device`,addonId:null,access:`view`},"videoclips.listClips":{capName:`videoclips`,capScope:`device`,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`},"webrtc.closeSession":{capName:`webrtc`,capScope:`system`,addonId:null,access:`create`},"webrtc.createSession":{capName:`webrtc`,capScope:`system`,addonId:null,access:`create`},"webrtc.handleAnswer":{capName:`webrtc`,capScope:`system`,addonId:null,access:`create`},"webrtc.handleOffer":{capName:`webrtc`,capScope:`system`,addonId:null,access:`create`},"webrtc.hasAdaptiveBitrate":{capName:`webrtc`,capScope:`system`,addonId:null,access:`view`},"webrtc.registerStream":{capName:`webrtc`,capScope:`system`,addonId:null,access:`create`},"webrtc.supportsStream":{capName:`webrtc`,capScope:`system`,addonId:null,access:`view`},"webrtc.unregisterStream":{capName:`webrtc`,capScope:`system`,addonId:null,access:`delete`},"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`}}),E_=`accessories.addon-pages.addon-pages-source.addon-routes.addon-settings.addon-widgets.addon-widgets-source.addons.admin-ui.advanced-notifier.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.consumables.control.cover.custom-model-registry.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.integrations.intercom.lawn-mower-control.local-network.lock-control.log-destination.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.notifier.oauth-integration.osd.pipeline-analytics.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.privacy-mask.ptz.ptz-autotrack.reboot.recording.restreamer.script-runner.settings-store.smtp-provider.snapshot.snapshot-provider.sso-bridge.storage.storage-evictable.storage-provider.stream-broker.stream-catalog.stream-params.streaming-engine.switch.system.toast.turn-provider.update.user-management.user-passkeys.vacuum-control.valve.videoclips.water-heater.webrtc.webrtc-session.zone-analytics.zone-rules.zones`.split(`.`),D_=`accessories.alarm-panel.audio-analysis.audio-metrics.automation-control.battery.brightness.button.camera-credentials.camera-streams.climate-control.color.consumables.control.cover.device-discovery.device-ops.events.fan-control.humidifier.intercom.lawn-mower-control.lock-control.media-player.motion.motion-detection.motion-trigger.motion-zones.native-object-detection.notifier.osd.pipeline-analytics.privacy-mask.ptz.ptz-autotrack.reboot.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.advanced-notifier.alerts.audio-analyzer.audio-codec.auth-provider.backup.broker.custom-model-registry.decoder.device-adoption.device-export.device-manager.device-provider.device-state.embedding-encoder.face-gallery.filesystem-browse.integrations.local-network.log-destination.mesh-network.metrics-provider.model-convert.model-distributor.mqtt-broker.network-access.network-quality.nodes.notification-output.oauth-integration.pipeline-executor.pipeline-orchestrator.pipeline-runner.plate-gallery.platform-probe.recording.restreamer.settings-store.smtp-provider.snapshot-provider.sso-bridge.storage.storage-evictable.storage-provider.stream-broker.streaming-engine.system.toast.turn-provider.user-management.user-passkeys.webrtc`.split(`.`),k_=[{id:`camera-viewer`,label:`Camera viewer`,description:"Read-only over every device — live streams, recordings, motion events, battery state. Combine with `allowedDevices` 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:`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`]}]}],A_=Object.freeze({broker:`broker`,"device-export":`device-export`,"mesh-network":`mesh`,"mqtt-broker":`broker`,"network-access":`ingress`,"smtp-provider":`email`}),j_=[`broker`,`device-export`,`mesh-network`,`mqtt-broker`,`network-access`,`smtp-provider`];function M_(e){let t=[];for(let[n,r]of Object.entries(A_))r===e&&t.push(n);return t}var N_=y({name:a(),stagedPath:a(),backupPath:a(),toVersion:a(),fromVersion:a().nullable()}),P_=y({jobId:a(),taskId:a(),packages:h(N_),requestedAtMs:i(),schemaVersion:c(1)}),F_=y({jobId:a(),taskId:a(),backups:h(y({name:a(),backupPath:a(),livePath:a()})),appliedAtMs:i(),bootAttempts:i(),schemaVersion:c(1)});function I_(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 L_(e,t){let n=e.trim().toLowerCase(),r=t.trim().toLowerCase();return n===r?1:n.length===0||r.length===0?0:1-I_(n,r)/Math.max(n.length,r.length)}function R_(e,t,n=.8){let r=null,i=0;for(let a of t){let t=L_(e,a);t>=n&&t>i&&(r=a,i=t)}return r}var z_=[/^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 B_(e){return z_.some(t=>t.test(e))}function V_(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()))B_(e)&&(t.searchParams.set(e,`***`),n=!0);return n?t.toString():e}catch{return e}}var H_=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}};function U_(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 W_(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}))}function G_(e){return new Promise(t=>setTimeout(t,Math.max(0,e)))}function K_(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})})}function q_(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 J_={value:`auto`,label:`Auto`},Y_={value:`cpu`,label:`CPU`},X_=[{id:`onnx`,supports:()=>!0,devices:e=>{if(!e)return[Y_];let t=[Y_];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[J_];let t=[J_,Y_];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`},Y_),n},defaultDevice:`all`}];function Z_(e){let t=X_.find(t=>t.id===e);if(!t)throw Error(`Unknown runtime: ${e}`);return t}function Q_(e){return X_.filter(t=>t.supports(e)).map(e=>e.id)}function $_(e,t){return Z_(e).devices(t)}function ev(e){return Z_(e).defaultDevice}function tv(e){return Un(e)}function nv(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})}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 rv=t({ACCESSORY_LABEL:()=>cr,ALL_CAPABILITY_DEFINITIONS:()=>C_,APPLE_SA_TO_MACRO:()=>tr,AUDIO_BACKEND_CHOICES:()=>Jl,AUDIO_MACRO_LABELS:()=>$n,AccessoriesStatusSchema:()=>bm,AccessoryKind:()=>N,AddBrokerInputSchema:()=>df,AddonAutoUpdateSchema:()=>Hm,AddonListItemSchema:()=>Im,AddonPageDeclarationSchema:()=>dl,AddonPageInfoSchema:()=>ll,AdoptionAdoptInputSchema:()=>$u,AdoptionAdoptResultSchema:()=>ed,AdoptionFilterSchema:()=>Ku,AdoptionGetCandidateInputSchema:()=>Xu,AdoptionListCandidatesInputSchema:()=>Ju,AdoptionListCandidatesOutputSchema:()=>Yu,AdoptionReleaseInputSchema:()=>td,AdoptionStatusSchema:()=>Zu,AgentLoadSummarySchema:()=>sp,AirQualitySensorStatusSchema:()=>Cr,AlarmArmModeSchema:()=>Nr,AlarmPanelStatusSchema:()=>Pr,AlarmStateSchema:()=>Mr,AlertSchema:()=>Hl,AlertSeveritySchema:()=>zl,AlertSourceSchema:()=>Vl,AlertStatusSchema:()=>Bl,AmbientLightSensorStatusSchema:()=>Ir,ApiKeyRecordSchema:()=>Af,ApiKeySummarySchema:()=>l_,ArchiveEntrySchema:()=>uu,ArchiveManifestSchema:()=>du,AudioAnalysisResultSchema:()=>Gl,AudioAnalysisSettingsSchema:()=>Kl,AudioChunkInputSchema:()=>Na,AudioClassSummarySchema:()=>Rr,AudioClassificationLabelSchema:()=>Fa,AudioClassificationResultSchema:()=>ql,AudioCodecInfoSchema:()=>Ql,AudioDecodeSessionConfigSchema:()=>$l,AudioEncodeSchema:()=>dn,AudioEncodeSessionConfigSchema:()=>eu,AudioEncodedChunkSchema:()=>nu,AudioEventSchema:()=>Uf,AudioLevelSchema:()=>Pa,AudioMetricsHistoryPointSchema:()=>Br,AudioMetricsHistorySchema:()=>Vr,AudioMetricsSnapshotSchema:()=>zr,AudioPcmChunkSchema:()=>tu,AuthResultSchema:()=>au,AutoUpdateSettingsSchema:()=>Vm,AutomationControlStatusSchema:()=>Ur,AvailableIntegrationTypeSchema:()=>yh,BACKEND_TO_FORMAT:()=>In,BATTERY_DEVICE_PROFILE:()=>dr,BackupDestinationInfoSchema:()=>su,BackupEntrySchema:()=>lu,BaseAddon:()=>Ge,BaseDevice:()=>gc,BaseDeviceProvider:()=>Tc,BatteryStatusSchema:()=>Gr,BinaryStatusSchema:()=>qr,BoundingBoxSchema:()=>z,BrightnessStatusSchema:()=>Yr,BrokerAddInputSchema:()=>bu,BrokerAudioClientSchema:()=>ri,BrokerClientsSchema:()=>si,BrokerConnectionDetailsSchema:()=>uf,BrokerConsumerAttributionSchema:()=>ai,BrokerConsumerKindSchema:()=>ii,BrokerDecodedClientSchema:()=>ni,BrokerEncodedClientSchema:()=>oi,BrokerGetStateInputSchema:()=>Nu,BrokerInfoSchema:()=>lf,BrokerProviderInfoSchema:()=>_u,BrokerPublishInputSchema:()=>ku,BrokerRegistryStatusSchema:()=>gu,BrokerRtspClientSchema:()=>ti,BrokerStatsSchema:()=>xt,BrokerStatusEnum:()=>mu,BrokerStatusSchema:()=>bt,BrokerSubscribeInputSchema:()=>Au,BrokerSubscribeResultSchema:()=>ju,BrokerTestConnectionResultSchema:()=>Cu,BrokerUnsubscribeInputSchema:()=>Mu,CAM_PROFILE_ORDER:()=>et,CAPABILITY_NAMES:()=>x_,CAPABILITY_ROUTER_KEYS:()=>S_,CAP_NAMES_WITH_STATUS:()=>w_,CAP_NODE_PIN_CONTEXT_KEY:()=>xn,CAP_PROVIDER_KIND_MAP:()=>A_,COCO_80_LABELS:()=>Xn,COCO_TO_MACRO:()=>Qn,CamProfileSchema:()=>w,CamStreamDescriptorSchema:()=>Jg,CamStreamKindSchema:()=>tt,CamStreamResolutionSchema:()=>T,CameraAssignmentStatusSchema:()=>fp,CameraAudioStatusSchema:()=>Sp,CameraBrokerProfileSchema:()=>pp,CameraBrokerStatusSchema:()=>mp,CameraCredentialsSchema:()=>nh,CameraCredentialsStatusSchema:()=>rh,CameraDecoderShmSchema:()=>hp,CameraDecoderStatusSchema:()=>gp,CameraDetectionPhaseSchema:()=>bp,CameraDetectionProvisioningSchema:()=>yp,CameraDetectionProvisioningStateSchema:()=>vp,CameraDetectionStatusSchema:()=>xp,CameraMetricsSchema:()=>Ba,CameraMetricsWithDeviceIdSchema:()=>Va,CameraMotionStatusSchema:()=>_p,CameraRecordingModeSchema:()=>Cp,CameraRecordingStatusSchema:()=>wp,CameraSourceStatusSchema:()=>dp,CameraSourceStreamSchema:()=>up,CameraStatusSchema:()=>Tp,CameraStreamSchema:()=>nt,CandidateQueryFilterSchema:()=>qu,CapScopeSchema:()=>Of,CapabilityBindingsSchema:()=>lp,CarbonMonoxideStatusSchema:()=>yi,ChargingStatus:()=>sr,ClientNetworkStatsSchema:()=>Vh,ClimateControlStatusSchema:()=>Si,ClipPlaybackSchema:()=>pm,ClipSchema:()=>fm,ClusterAddonNodeDeploymentSchema:()=>Xh,ClusterAddonStatusEntrySchema:()=>Zh,CollectionColumnSchema:()=>Mp,CollectionIndexSchema:()=>Np,ColorStatusSchema:()=>Di,ConfigEntrySchema:()=>_d,ConfigSectionWithValuesSchema:()=>vl,ConfigTabDeclarationSchema:()=>_l,ConnectivityStatusSchema:()=>ki,ConsumableItemSchema:()=>ji,ConsumablesStatusSchema:()=>Mi,ContactStatusSchema:()=>Pi,ControlKindSchema:()=>Ii,ControlStatusSchema:()=>Li,ConvertArtifactSchema:()=>Te,ConvertResultSchema:()=>Ee,ConvertTargetSchema:()=>Ce,CoverStateSchema:()=>Bi,CoverStatusSchema:()=>Vi,CreateApiKeyInputSchema:()=>u_,CreateApiKeyResultSchema:()=>d_,CreateIntegrationInputSchema:()=>xh,CreateScopedTokenInputSchema:()=>p_,CreateScopedTokenResultSchema:()=>m_,CreateUserInputSchema:()=>s_,CustomActionInputSchema:()=>$m,CustomModelDescriptorSchema:()=>zu,DATAPLANE_SECRET_HEADER:()=>Gt,DEFAULT_ADDON_PLACEMENT:()=>Oe,DEFAULT_AUDIO_ANALYZER_CONFIG:()=>Yl,DEFAULT_DECODER_HWACCEL_CONFIG:()=>Hu,DEFAULT_FEATURES:()=>an,DEFAULT_RETENTION:()=>gn,DEVICE_CAP_NAMES:()=>D_,DEVICE_PROFILES:()=>fr,DEVICE_SETTINGS_CONTRIBUTION_METHODS:()=>Or,DEVICE_STATUS_METHOD:()=>kr,DEVICE_TYPE_INFO:()=>ar,DecodedAudioChunkSchema:()=>_t,DecodedFrameSchema:()=>ft,DecoderAssignmentSchema:()=>op,DecoderSessionConfigSchema:()=>ln,DecoderStatsSchema:()=>cn,DeleteIntegrationResultSchema:()=>Ch,DetectionSourceSchema:()=>Vf,DetectorOutputSchema:()=>$a,DeviceCodeSeveritySchema:()=>ba,DeviceConfig:()=>mr,DeviceDiscoveryStatusSchema:()=>Yi,DeviceExportExposeInputSchema:()=>dd,DeviceExportStatusSchema:()=>cd,DeviceExportUnexposeInputSchema:()=>fd,DeviceFeature:()=>or,DeviceInfoSchema:()=>gd,DeviceNetworkStatsSchema:()=>Hh,DeviceRole:()=>M,DeviceRuntimeState:()=>hr,DeviceStatusSchema:()=>yr,DeviceType:()=>j,DiscoveredChildDeviceSchema:()=>L,DiscoveredChildStatusSchema:()=>Ji,DiscoveredDeviceSchema:()=>vc,DisposerChain:()=>De,DoorbellPressEventSchema:()=>Qi,DoorbellStatusSchema:()=>Zi,ElementConfigStore:()=>Pn,EmbeddingInfoSchema:()=>Od,EmbeddingResultSchema:()=>Dd,EncodeProfileSchema:()=>fn,EncodedPacketSchema:()=>dt,EnrichedWidgetMetadataSchema:()=>Dl,EnumSensorDateTimeFormatSchema:()=>ea,EnumSensorStatusSchema:()=>ta,EventCategory:()=>S,EventEmitterStatusSchema:()=>ia,EventFireSchema:()=>ra,EventItemSchema:()=>lh,EventKindSchema:()=>Ff,EventSourceType:()=>_n,ExportSetupFieldSchema:()=>od,ExportSetupSchema:()=>sd,ExposedDeviceSchema:()=>ud,ExposedResourceSchema:()=>Op,FanControlStatusSchema:()=>sa,FanDirectionSchema:()=>oa,FeatureManifestSchema:()=>e_,FeatureProbeStatusSchema:()=>xr,FloodStatusSchema:()=>la,FrameHandleFormatSchema:()=>mt,FrameHandleSchema:()=>pt,FrameInputSchema:()=>R,GasStatusSchema:()=>da,GetStreamWithCodecInputSchema:()=>di,GlobalMetricsSchema:()=>cp,HF_BASE_URL:()=>yn,HF_REPO:()=>vn,HWACCEL_OPTIONS:()=>Vu,HealthStatusSchema:()=>t_,HistoryPointSchema:()=>lc,HistoryResolutionEnum:()=>sc,HumidifierStatusSchema:()=>pa,HumiditySensorStatusSchema:()=>ha,HvacModeSchema:()=>xi,ImageStatusSchema:()=>_a,InstalledPackageSchema:()=>Lm,IntegrationLiteSchema:()=>vh,IntegrationWithStateSchema:()=>_h,IntercomAbilitySchema:()=>Th,IntercomStatusSchema:()=>Eh,KNOWN_CAP_NAMES:()=>E_,LabelDefinitionSchema:()=>ve,LawnMowerActivitySchema:()=>ya,LawnMowerControlStatusSchema:()=>xa,LocateSegmentResultSchema:()=>Gg,LocationStatSchema:()=>fu,LockControlStatusSchema:()=>wa,LockStateSchema:()=>Ca,LogEntrySchema:()=>Pd,LogLevelSchema:()=>Nd,LogStreamEntrySchema:()=>Zm,MACRO_LABELS:()=>Zn,METHOD_ACCESS_MAP:()=>T_,MODEL_FORMATS:()=>ye,MaskGridDimsSchema:()=>Ho,MaskGridShapeSchema:()=>Lo,MaskLineShapeSchema:()=>Ro,MaskPointSchema:()=>Po,MaskPolygonShapeSchema:()=>Io,MaskPolygonVerticesSchema:()=>Vo,MaskRectShapeSchema:()=>Fo,MaskShapeKindSchema:()=>Bo,MaskShapeSchema:()=>zo,MediaFileSchema:()=>Gf,MediaPlayerRepeatSchema:()=>Da,MediaPlayerStateSchema:()=>Ea,MediaPlayerStatusSchema:()=>ka,MeshPeerSchema:()=>Lh,MeshStatusSchema:()=>Rh,MethodAccessSchema:()=>Tf,ModelCatalogEntrySchema:()=>Se,ModelConvertInputSchema:()=>tf,ModelConvertMetadataSchema:()=>we,ModelDistributeInputSchema:()=>rf,ModelDistributeResultSchema:()=>af,ModelExtraFileSchema:()=>be,ModelFormatEntrySchema:()=>x,ModelFormatsSchema:()=>xe,MotionAnalysisResultSchema:()=>La,MotionEventSchema:()=>Bf,MotionOnMotionChangedDataSchema:()=>ko,MotionRegionSchema:()=>Ia,MotionSourceEnum:()=>bo,MotionSourcesSchema:()=>xo,MotionStatusSchema:()=>Oo,MotionTriggerRuntimeStateSchema:()=>Mo,MotionTriggerStatusSchema:()=>jo,MotionZoneOptionsSchema:()=>Go,MotionZonePatchSchema:()=>Ko,MotionZoneRegionSchema:()=>Uo,MotionZoneStatusSchema:()=>Wo,MqttBrokerStatusSchema:()=>_f,NativeDetectionSchema:()=>Yo,NativeObjectClassEnum:()=>Jo,NativeObjectDetectionRuntimeStateSchema:()=>Zo,NativeObjectDetectionStatusSchema:()=>Xo,NetworkAccessStatusSchema:()=>bf,NetworkAddressSchema:()=>n_,NetworkEndpointSchema:()=>yf,NotificationHistoryEntrySchema:()=>Il,NotificationRuleSchema:()=>Pl,NotificationSchema:()=>Cf,NotifierStatusSchema:()=>ns,NumericSensorStatusSchema:()=>os,OauthIntegrationDescriptorSchema:()=>Mf,ObjectEventSchema:()=>Hf,OrchestratorMetricsSchema:()=>za,OsdOverlayKindEnum:()=>ig,OsdOverlayPatchSchema:()=>cg,OsdOverlaySchema:()=>og,OsdPositionEnum:()=>ag,OsdStatusSchema:()=>sg,PIPELINE_FLOW_CAPABILITY_NAMES:()=>y_,PIPELINE_OWNER_CAPABILITY_NAMES:()=>b_,PROVIDER_KIND_CAP_NAMES:()=>j_,PYTHON_SCRIPT:()=>Rn,PackageUpdateSchema:()=>Rm,PackageVersionInfoSchema:()=>zm,PasskeySummarySchema:()=>um,PcmSampleFormatSchema:()=>Zl,PerScopeBreakdownSchema:()=>ic,PickStreamPreferencesSchema:()=>gi,PickStreamRequirementsSchema:()=>hi,PickedCamStreamSchema:()=>_i,PipelineAssignmentSchema:()=>ap,PipelineDefaultStepSchema:()=>Ga,PipelineEngineChoiceSchema:()=>B,PipelineRunResultBridge:()=>ho,PipelineStepInputSchema:()=>V,PlaceholderReasonSchema:()=>ci,PolygonPointSchema:()=>vo,PowerMeterStatusSchema:()=>cs,PresenceStatusSchema:()=>ds,PressureSensorStatusSchema:()=>ps,PrivacyMaskOptionsSchema:()=>vs,PrivacyMaskPatchSchema:()=>ys,PrivacyMaskRegionSchema:()=>gs,PrivacyMaskShapeSchema:()=>hs,PrivacyMaskStatusSchema:()=>_s,ProfileRtspEntrySchema:()=>St,ProfileSlotSchema:()=>it,ProfileSlotStatusSchema:()=>rt,ProviderStatusSchema:()=>_c,PtzAutotrackRuntimeStateSchema:()=>ws,PtzAutotrackSettingsSchema:()=>xs,PtzAutotrackStatusSchema:()=>Cs,PtzAutotrackTargetOptionSchema:()=>Ss,PtzMoveCommandSchema:()=>Mg,PtzPositionSchema:()=>jg,PtzPresetSchema:()=>Ag,PtzStatusSchema:()=>Ng,QueryFilterSchema:()=>Ap,RECOGNITION_TYPES:()=>sn,RUNTIME_DEFAULTS:()=>bn,RUNTIME_TO_FORMAT:()=>Ln,RawStateResultSchema:()=>sh,ReadSegmentBytesResultSchema:()=>Kg,ReadinessRegistry:()=>Ht,ReadinessTimeoutError:()=>zt,RecordingAvailabilitySchema:()=>zg,RecordingBandModeSchema:()=>kt,RecordingBandSchema:()=>jt,RecordingBandTriggersSchema:()=>At,RecordingConfigSchema:()=>E,RecordingDaysSchema:()=>Bg,RecordingDeviceUsageSchema:()=>Hg,RecordingLocationUsageSchema:()=>Ug,RecordingManifestSchema:()=>Vg,RecordingModeSchema:()=>Et,RecordingRangeSchema:()=>Rg,RecordingRetentionSchema:()=>Nt,RecordingRuleSchema:()=>Mt,RecordingScheduleSchema:()=>Tt,RecordingStatusSchema:()=>Lg,RecordingStorageModeSchema:()=>Dt,RecordingStorageUsageSchema:()=>Wg,RecordingTriggersSchema:()=>Ot,RecordingWeekdaySchema:()=>Ct,RegisteredStreamSchema:()=>Dp,ReportMotionInputSchema:()=>So,RingBuffer:()=>H_,RtpSourceSchema:()=>fi,RtspRestreamEntrySchema:()=>ei,RunnerCameraConfigSchema:()=>Co,RunnerCameraDeviceUIFields:()=>wo,RunnerLocalLoadSchema:()=>To,RunnerLocalMetricsSchema:()=>Eo,SCOPE_PRESETS:()=>k_,SOURCE_INFO_METADATA_KEY:()=>Ki,STREAM_PROFILE_META:()=>Xg,STREAM_QUALITY_LABELS:()=>Jt,SUB_DETECTION_TYPES:()=>on,SYSTEM_CAP_NAMES:()=>O_,ScopedTokenSchema:()=>jf,ScopedTokenSummarySchema:()=>f_,ScoredObjectEventSchema:()=>Yf,ScriptRunnerStatusSchema:()=>Es,SearchResultSchema:()=>Bm,SendEmailInputSchema:()=>Fp,SendEmailResultSchema:()=>Ip,SettingsPatchSchema:()=>yl,SettingsRecordSchema:()=>jp,SettingsSchemaWithValuesSchema:()=>X,SettingsUpdateResultSchema:()=>bl,ShmRingStatsSchema:()=>Uu,SmokeStatusSchema:()=>Os,SmtpStatusSchema:()=>Lp,SnapshotImageSchema:()=>zp,SourceInfoSchema:()=>I,SpatialDetectionSchema:()=>Ma,SsoBridgeClaimsSchema:()=>Up,StartEmbeddedInputSchema:()=>hf,StorageAbortUploadInputSchema:()=>nm,StorageBeginDownloadInputSchema:()=>rm,StorageBeginDownloadResultSchema:()=>im,StorageBeginUploadInputSchema:()=>Qp,StorageBeginUploadResultSchema:()=>$p,StorageEndDownloadInputSchema:()=>om,StorageFinalizeUploadInputSchema:()=>tm,StorageLocationDeclarationSchema:()=>qt,StorageLocationRefSchema:()=>k,StorageLocationSchema:()=>O,StorageLocationTypeSchema:()=>Kt,StorageProviderInfoSchema:()=>Xp,StorageReadChunkInputSchema:()=>am,StorageTestLocationResultSchema:()=>Zp,StorageWriteChunkInputSchema:()=>em,StreamCodecSchema:()=>mi,StreamFormatSchema:()=>Zr,StreamInfoSchema:()=>Qr,StreamNetworkStatsSchema:()=>Bh,StreamParamsOptionsSchema:()=>Ps,StreamParamsStatusSchema:()=>Ms,StreamProfileConfigSchema:()=>js,StreamProfileOptionsSchema:()=>Ns,StreamProfilePatchSchema:()=>Fs,StreamProfileSchema:()=>As,StreamSourceEntrySchema:()=>lt,StreamSourceSchema:()=>ut,SubscribeAudioChunksInputSchema:()=>vt,SubscribeAudioChunksResultSchema:()=>yt,SubscribeFramesInputSchema:()=>ht,SubscribeFramesResultSchema:()=>gt,SwitchStatusSchema:()=>Ls,SystemMetricsSchema:()=>$d,SystemMirror:()=>il,TIMEZONES:()=>Qe,TamperStatusSchema:()=>zs,TankStatusSchema:()=>Ks,TemperatureSensorStatusSchema:()=>Vs,TestConnectionResultSchema:()=>bh,ToastSchema:()=>i_,TokenScopeSchema:()=>Z,TopologyNodeSchema:()=>Jh,TopologyProcessSchema:()=>Gh,TopologyServiceSchema:()=>Wh,TrackSchema:()=>Rf,TrackStateSchema:()=>Pf,TrackedDetectionSchema:()=>Jf,TurnServerSchema:()=>cm,UnifiedBrokerInfoSchema:()=>hu,UpdateIntegrationInputSchema:()=>Sh,UpdateStatusSchema:()=>Us,UpdateUserInputSchema:()=>c_,UserRecordSchema:()=>kf,UserSummarySchema:()=>o_,VacuumControlStatusSchema:()=>qs,VacuumStateSchema:()=>Gs,ValveStateSchema:()=>Ys,ValveStatusSchema:()=>Xs,VibrationStatusSchema:()=>Qs,VideoEncodeSchema:()=>un,WELL_KNOWN_TABS:()=>Fe,WELL_KNOWN_TAB_MAP:()=>Ie,WaterHeaterStatusSchema:()=>ec,WeatherStatusSchema:()=>nc,WebrtcStreamChoiceSchema:()=>vm,WebrtcStreamTargetSchema:()=>_m,WidgetHostEnum:()=>Sl,WidgetMetadataSchema:()=>Tl,WidgetRemoteSchema:()=>wl,WidgetSizeEnum:()=>Cl,YAMNET_TO_MACRO:()=>er,ZoneKindEnum:()=>_o,ZoneRuleModeEnum:()=>dc,ZoneRuleSchema:()=>J,ZoneRuleStageEnum:()=>pc,ZoneRulesArraySchema:()=>fc,ZoneSchema:()=>H,ZoneScopeBreakdownSchema:()=>ac,accessoriesCapability:()=>xm,accessoryStableId:()=>lr,addonPagesCapability:()=>ul,addonPagesSourceCapability:()=>fl,addonRoutesCapability:()=>gl,addonSettingsCapability:()=>xl,addonWidgetsCapability:()=>Ol,addonWidgetsSourceCapability:()=>El,addonsCapability:()=>eh,adminUiCapability:()=>jl,advancedNotifierCapability:()=>Rl,airQualitySensorCapability:()=>wr,alarmPanelCapability:()=>Fr,alertsCapability:()=>Ul,ambientLightSensorCapability:()=>Lr,applyTransform:()=>Bc,asBoolean:()=>kn,asJsonArray:()=>En,asJsonObject:()=>Tn,asNumber:()=>On,asString:()=>Dn,audioAnalysisCapability:()=>Wl,audioAnalyzerCapability:()=>Xl,audioCodecCapability:()=>iu,audioMetricsCapability:()=>Hr,authProviderCapability:()=>ou,autoAssignProfiles:()=>rn,automationControlCapability:()=>Wr,backupCapability:()=>pu,batteryCapability:()=>Kr,bestLocationMatch:()=>R_,binaryCapability:()=>Jr,bindAddonActions:()=>q_,brightnessCapability:()=>Xr,brokerCapability:()=>Pu,buildAddonRouteProvider:()=>qe,buildStreamParamsConfigSchema:()=>Qg,buttonCapability:()=>th,cameraCredentialsCapability:()=>ih,cameraPipelineConfigCapability:()=>Fu,cameraStreamsCapability:()=>vi,carbonMonoxideCapability:()=>bi,cellsToRects:()=>W_,classifyStream:()=>Qt,classifyStreams:()=>Zt,climateControlCapability:()=>Ci,colorCapability:()=>Oi,connectivityCapability:()=>Ai,consumablesCapability:()=>Ni,contactCapability:()=>Fi,controlCapability:()=>zi,cosineSimilarity:()=>Nn,coverCapability:()=>Hi,createDeviceProxy:()=>Jc,createDurableState:()=>We,createEvent:()=>He,createLazyTrpcSource:()=>Gc,createMirrorSource:()=>Kc,createRuntimeStateBridge:()=>vr,createSliceHandle:()=>Y,createSystemProxy:()=>Qc,customAction:()=>Lu,customModelRegistryCapability:()=>Bu,decoderCapability:()=>Wu,defaultDeviceFor:()=>ev,defineCustomActions:()=>Iu,detectionPipelineCapability:()=>Gu,deviceAdoptionCapability:()=>id,deviceCustomAction:()=>Ru,deviceDiscoveryCapability:()=>Xi,deviceExportCapability:()=>pd,deviceManagerCapability:()=>Td,deviceMatchesProfile:()=>ur,deviceOpsCapability:()=>ch,deviceProviderCapability:()=>Cc,deviceStateCapability:()=>Ed,deviceStatusCapability:()=>br,doorbellCapability:()=>$i,embeddingEncoderCapability:()=>kd,emitDownForOwnedCaps:()=>Wt,emitReadiness:()=>Ue,encodeProfileFromStreamShape:()=>pn,enumSensorCapability:()=>na,enumerateSchemaFields:()=>Uc,errMsg:()=>Kn,evaluateZoneRules:()=>Yc,event:()=>F,eventEmitterCapability:()=>aa,eventsCapability:()=>uh,expandCapMethods:()=>Ar,extractSourceInfoFromMetadata:()=>qi,faceGalleryCapability:()=>gh,fanControlCapability:()=>ca,featureProbeCapability:()=>Sr,filesystemBrowseCapability:()=>Md,findTimezone:()=>$e,floodCapability:()=>ua,formatForBackend:()=>Hn,formatForRuntime:()=>Un,frameworkSwapConfirmSchema:()=>F_,frameworkSwapPackageSchema:()=>N_,gasCapability:()=>fa,getAudioMacroClassIds:()=>ir,getByPath:()=>Rc,getCapsByProviderKind:()=>M_,hfModelUrl:()=>Mn,humidifierCapability:()=>ma,humiditySensorCapability:()=>ga,hydrateSchema:()=>Re,imageCapability:()=>va,integrationsCapability:()=>wh,intercomCapability:()=>Oh,isAgentOnlyPlacement:()=>je,isDeployableToAgent:()=>Ae,isDeviceConfigCap:()=>jr,isEvent:()=>Ve,jobKindSchema:()=>Sm,lawnMowerControlCapability:()=>Sa,lifecycleJobSchema:()=>km,lifecycleJobScopeSchema:()=>Om,lifecycleJobStateSchema:()=>Dm,lifecycleTaskSchema:()=>Em,localNetworkCapability:()=>Fh,locationSimilarity:()=>L_,lockControlCapability:()=>Ta,logDestinationCapability:()=>Fd,makeProfileBrokerId:()=>at,makeSourceBrokerId:()=>ot,mapAudioLabelToMacro:()=>rr,maskUrlCredentials:()=>V_,mediaPlayerCapability:()=>Aa,mergeSourceInfo:()=>Wi,meshNetworkCapability:()=>zh,method:()=>P,metricsProviderCapability:()=>ef,migrateConfigToBands:()=>Rt,modelConvertCapability:()=>nf,modelDistributorCapability:()=>of,modelFormatForRuntime:()=>tv,motionCapability:()=>Ao,motionDetectionCapability:()=>Ra,motionTriggerCapability:()=>No,motionZonesCapability:()=>qo,mqttBrokerCapability:()=>vf,nativeObjectDetectionCapability:()=>Qo,networkAccessCapability:()=>Sf,networkQualityCapability:()=>Uh,nodePin:()=>Sn,nodesCapability:()=>rg,normalizeAddonInitResult:()=>Ke,normalizeUnit:()=>Gi,notificationOutputCapability:()=>wf,notifierCapability:()=>as,numericSensorCapability:()=>ss,oauthIntegrationCapability:()=>Nf,osdCapability:()=>lg,parseCameraStreamConfig:()=>nn,parseJsonArray:()=>jn,parseJsonObject:()=>An,parseJsonUnknown:()=>wn,parseProfileBrokerId:()=>st,parseStreamParamsFormPatch:()=>$g,pendingFrameworkSwapSchema:()=>P_,pickPreferredRtspEntry:()=>mn,pipelineAnalyticsCapability:()=>Zf,pipelineExecutorCapability:()=>go,pipelineOrchestratorCapability:()=>Ep,pipelineRunnerCapability:()=>Do,plateGalleryCapability:()=>pg,platformProbeCapability:()=>kg,powerMeterCapability:()=>ls,presenceCapability:()=>fs,pressureSensorCapability:()=>ms,privacyMaskCapability:()=>bs,ptzAutotrackCapability:()=>Ts,ptzCapability:()=>Fg,pythonScriptForBackend:()=>Wn,readNodePin:()=>Cn,readinessKey:()=>Bt,rebootCapability:()=>Ig,recordingCapability:()=>qg,rectsToCells:()=>U_,requiresPython:()=>Gn,resolveAddonExecution:()=>ke,resolveAddonGroup:()=>Me,resolveAddonPlacement:()=>Pe,resolveAddonRuntime:()=>Vn,resolveCapMount:()=>Tr,resolveDetectionRuntime:()=>zn,resolveDeviceProfile:()=>pr,resolveModelFormat:()=>Bn,resolveRunnerId:()=>Ne,restreamerCapability:()=>kp,runInferenceStep:()=>qn,runtimeDevices:()=>$_,scopeKey:()=>D,scoreRuntimes:()=>nv,scriptRunnerCapability:()=>Ds,selectAssignedProfileSlots:()=>ct,setByPath:()=>zc,settingsStoreCapability:()=>Pp,sleep:()=>G_,sleepCancellable:()=>K_,smokeCapability:()=>ks,smtpProviderCapability:()=>Rp,snapshotCapability:()=>Vp,snapshotProviderCapability:()=>Hp,ssoBridgeCapability:()=>Wp,storageCapability:()=>Kp,storageEvictableCapability:()=>Yp,storageProviderCapability:()=>sm,streamBrokerCapability:()=>pi,streamCatalogCapability:()=>Yg,streamParamsCapability:()=>Is,streamPixels:()=>Xt,streamQualityLabel:()=>Yt,streamingEngineCapability:()=>$r,supportedRuntimes:()=>Q_,switchCapability:()=>Rs,synthesizeSourceInfo:()=>Ui,systemCapability:()=>r_,tamperCapability:()=>Bs,taskLogEntrySchema:()=>Tm,taskPhaseSchema:()=>Cm,taskTargetSchema:()=>wm,temperatureSensorCapability:()=>Hs,toDeviceSummary:()=>wc,toStreamSourceEntry:()=>$t,toastCapability:()=>a_,turnProviderCapability:()=>lm,updateCapability:()=>Ws,userManagementCapability:()=>v_,userPasskeysCapability:()=>dm,vacuumControlCapability:()=>Js,valveCapability:()=>Zs,vibrationCapability:()=>$s,videoclipsCapability:()=>mm,waterHeaterCapability:()=>tc,weatherCapability:()=>rc,webrtcCapability:()=>gm,webrtcClientHintsSchema:()=>hm,webrtcSessionCapability:()=>ym,wiringAddonHealthSchema:()=>he,wiringHealthSnapshotSchema:()=>_e,wiringNodeHealthSchema:()=>ge,wiringProbeKindSchema:()=>pe,wiringProbeResultSchema:()=>me,zodEntriesToConfigUI:()=>Oc,zoneAnalyticsCapability:()=>uc,zoneRulesCapability:()=>mc,zonesCapability:()=>yo});export{ot as C,S as D,Ie as E,ye as O,w as S,$e as T,I as _,Lg as a,j as b,cd as c,il as d,Qc as f,Rc as g,Y as h,C_ as i,ud as l,Gc as m,A_ as n,Rh as o,Jc as p,E_ as r,bf as s,rv as t,gu as u,or as v,Qe as w,E as x,M as y};