@camera.ui/server 0.0.114 → 0.0.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/interface/assets/{404-CZtDF9in.js → 404-Boj4Vl-R.js} +1 -1
- package/dist/interface/assets/{About-BzuuHdW1.js → About-C555n8hm.js} +1 -1
- package/dist/interface/assets/{Adminpanel-uj7eTmlN.js → Adminpanel-CzhTcMyI.js} +1 -1
- package/dist/interface/assets/Automation-c-WoDz5p.js +2 -0
- package/dist/interface/assets/{AutomationImport-CR4Vsxkb.js → AutomationImport-TTsCdeBi.js} +2 -2
- package/dist/interface/assets/{AutomationStore-BcMX7WbG.js → AutomationStore-Dfv66tKr.js} +2 -2
- package/dist/interface/assets/{AutomationStoreDetail-D6Ugj8ba.js → AutomationStoreDetail-D6Kxd8qb.js} +2 -2
- package/dist/interface/assets/{Automations-DBACrYHy.js → Automations-B-Vx8ES0.js} +2 -2
- package/dist/interface/assets/{Camera-Cf4QZbsx.js → Camera-D9lOlctO.js} +2 -2
- package/dist/interface/assets/{CameraConsole-uD4aWou8.js → CameraConsole-D7INO7No.js} +1 -1
- package/dist/interface/assets/{Cameras-DbBU5mou.js → Cameras-CoS5FGgt.js} +2 -2
- package/dist/interface/assets/{Camview-CoHrXLHW.js → Camview-D9dWFP3P.js} +1 -1
- package/dist/interface/assets/{Config-B9jI0lTQ.js → Config-Bt-dYeu3.js} +1 -1
- package/dist/interface/assets/{ConfigActionCameraControl-D4hJLWmj.js → ConfigActionCameraControl-BG6SX9R7.js} +1 -1
- package/dist/interface/assets/{ConfigActionDelay-DOUAx4lh.js → ConfigActionDelay-aDgo-kGM.js} +1 -1
- package/dist/interface/assets/{ConfigActionHttp-BGz4r_Nr.js → ConfigActionHttp-CO5QD14x.js} +1 -1
- package/dist/interface/assets/{ConfigActionImageInput-BhO3ekJT.js → ConfigActionImageInput-DapP_uBr.js} +1 -1
- package/dist/interface/assets/{ConfigActionNotification-B5cCmBXr.js → ConfigActionNotification-BTO9Mcqc.js} +1 -1
- package/dist/interface/assets/{ConfigActionOutput-P0WY0DlF.js → ConfigActionOutput-CXJ03zBN.js} +1 -1
- package/dist/interface/assets/{ConfigActionPlugin-B7YAbFlf.js → ConfigActionPlugin-BddeoS5Q.js} +1 -1
- package/dist/interface/assets/{ConfigActionSensor-D_Dt1qtt.js → ConfigActionSensor-Bs4CS6z9.js} +1 -1
- package/dist/interface/assets/{ConfigActionSnapshot-ClyCQuB3.js → ConfigActionSnapshot-Ba5eeeDx.js} +1 -1
- package/dist/interface/assets/{ConfigActionVariable-B2BoiQPb.js → ConfigActionVariable-CtDsvCYd.js} +1 -1
- package/dist/interface/assets/{ConfigConditionIfElse-Bhd2FYyz.js → ConfigConditionIfElse-4vRtS2gU.js} +1 -1
- package/dist/interface/assets/{ConfigConditionSensorState-x0M0kHwL.js → ConfigConditionSensorState-DXsn0AoB.js} +1 -1
- package/dist/interface/assets/{ConfigConditionSwitch-CC0w-Hvy.js → ConfigConditionSwitch-BAAlXCNL.js} +1 -1
- package/dist/interface/assets/{ConfigConditionTime-lhWiIy2x.js → ConfigConditionTime-CbGe7r2f.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerDetection-DWjlecON.js → ConfigTriggerDetection-CUvVQzWC.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerGeofence-CTqptMUN.js → ConfigTriggerGeofence-C8JI5HfV.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerManual-ChsUsNCK.js → ConfigTriggerManual-CHe56Uwq.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSchedule-CE47WiIV.js → ConfigTriggerSchedule-CfYWEMEa.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSensor-DuCtavZo.js → ConfigTriggerSensor-CxfydqlA.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSystem-D1oGAhLn.js → ConfigTriggerSystem-CKY5ikOU.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerWebhook-D3cHvW8H.js → ConfigTriggerWebhook-B38CUm9k.js} +1 -1
- package/dist/interface/assets/Console-iQYK1wv3.js +1 -0
- package/dist/interface/assets/{CuiActionButton-Bl7gqhIV.js → CuiActionButton-_24B3o_r.js} +1 -1
- package/dist/interface/assets/{CuiAvatar-of_eVQsv.js → CuiAvatar-Dq7tZWI5.js} +1 -1
- package/dist/interface/assets/{CuiBBoxPlayground-CIU5kteO.js → CuiBBoxPlayground-wkKhVNXF.js} +1 -1
- package/dist/interface/assets/CuiBottomSheet-BCwkNHr0.js +1 -0
- package/dist/interface/assets/{CuiBottomSheet-B7aQ7GCw.js → CuiBottomSheet-CmcHyY52.js} +1 -1
- package/dist/interface/assets/CuiCameraCard-Cjltc6jX.js +1 -0
- package/dist/interface/assets/{CuiCameraPipCard-KUBxGPoU.js → CuiCameraPipCard-Fqb-8bT0.js} +1 -1
- package/dist/interface/assets/CuiCameraRecordings-8rROz71S.js +1 -0
- package/dist/interface/assets/{CuiCameraShares-BCMYN11A.js → CuiCameraShares-CVqgvvb9.js} +1 -1
- package/dist/interface/assets/{CuiCameraSnapshot-DTtvEMy1.js → CuiCameraSnapshot-CDqd-Ncv.js} +1 -1
- package/dist/interface/assets/{CuiCameraTable-B7g53tPM.js → CuiCameraTable-CZI750xd.js} +1 -1
- package/dist/interface/assets/CuiDataTable-N4GSbqxH.js +1 -0
- package/dist/interface/assets/CuiDataTable-W68cyoLf.css +1 -0
- package/dist/interface/assets/{CuiFloatingButton-B5YMdr0X.js → CuiFloatingButton-PyVdoOUT.js} +1 -1
- package/dist/interface/assets/{CuiImage-B97QDAl7.js → CuiImage-kthY6BIz.js} +1 -1
- package/dist/interface/assets/{CuiMenu-Ds6GufVn.js → CuiMenu-9X-MfyCk.js} +1 -1
- package/dist/interface/assets/{CuiPluginCard-D1SylQbM.js → CuiPluginCard-CN3TW6AC.js} +2 -2
- package/dist/interface/assets/CuiPluginCategoryChip-CwNmRXlc.js +1 -0
- package/dist/interface/assets/{CuiPluginOAuthButton-X8ZGFPwW.js → CuiPluginOAuthButton-BBHNQ3Jp.js} +2 -2
- package/dist/interface/assets/{CuiPluginTrustBadge-YhfqGTyR.js → CuiPluginTrustBadge-DX-P6_uN.js} +1 -1
- package/dist/interface/assets/{CuiQRCode-D_31ri5b.js → CuiQRCode-C6O_MBni.js} +1 -1
- package/dist/interface/assets/{CuiRecordingsGrid-CzMzhUXb.js → CuiRecordingsGrid-CwKCU5_u.js} +1 -1
- package/dist/interface/assets/{CuiSchema-CfqOJmDH.js → CuiSchema-VI2Luf-k.js} +1 -1
- package/dist/interface/assets/{CuiTopNavbarItem-Q7M4nMw5.js → CuiTopNavbarItem-Ds70WyHx.js} +1 -1
- package/dist/interface/assets/{CuiTopbarSlot-ac4GLLbf.js → CuiTopbarSlot-B9Et-Pj7.js} +1 -1
- package/dist/interface/assets/{Faces-IVmqcGuF.js → Faces-lzakFq5o.js} +1 -1
- package/dist/interface/assets/{FirstSteps-Boec1bzd.js → FirstSteps-Bqmgm_iz.js} +1 -1
- package/dist/interface/assets/{Instances-kmkRiBrV.js → Instances-qk8oD08W.js} +1 -1
- package/dist/interface/assets/{Logs-DzR8mmLu.js → Logs-72k5RAn7.js} +1 -1
- package/dist/interface/assets/{Menu-Ct3W72Nu.js → Menu-1_PvQcZH.js} +1 -1
- package/dist/interface/assets/{OAuthDeviceFlow-Cp9uZWm1.js → OAuthDeviceFlow-DuZPGhPb.js} +1 -1
- package/dist/interface/assets/Plugin-CoIr19GV.js +1 -0
- package/dist/interface/assets/Plugin-DHhrlRqP.css +1 -0
- package/dist/interface/assets/{PluginConsole-BdbmROpF.js → PluginConsole-CnqDVu4K.js} +1 -1
- package/dist/interface/assets/PluginDetail-BSao1Bk3.js +2 -0
- package/dist/interface/assets/PluginDetail-L1Vtmr5x.css +1 -0
- package/dist/interface/assets/{PluginSchema-CWcq67pj.js → PluginSchema-BNB_PpKf.js} +1 -1
- package/dist/interface/assets/PluginSearch-Cq0r9Usy.js +2 -0
- package/dist/interface/assets/{PluginSearch-XjGr5qdW.css → PluginSearch-NuKgD1r3.css} +1 -1
- package/dist/interface/assets/PluginSearch-ZRpBJ3RH.js +1 -0
- package/dist/interface/assets/{Plugins-DMLQY_6J.js → Plugins-Bm0cyXcG.js} +1 -1
- package/dist/interface/assets/Recordings-BArCkOPF.js +1 -0
- package/dist/interface/assets/{Settings-BZDfWnB8.js → Settings-CcwljkEU.js} +1 -1
- package/dist/interface/assets/SettingsAccount-UGedhV9S.js +1 -0
- package/dist/interface/assets/{SettingsAccount-DKHO4mDj.js → SettingsAccount-g0Xg9CEA.js} +1 -1
- package/dist/interface/assets/{SettingsAppearance-V5aeQ9c8.js → SettingsAppearance-D7vpw4Pf.js} +1 -1
- package/dist/interface/assets/SettingsAppearance-dUmIIO1_.js +1 -0
- package/dist/interface/assets/SettingsBackup-DDMNMyGv.js +1 -0
- package/dist/interface/assets/{SettingsNotifications-BZ1IXj0a.js → SettingsNotifications-DHXDTw47.js} +1 -1
- package/dist/interface/assets/{SettingsRecordings-BsJ9z-RE.js → SettingsRecordings-B8pVTT97.js} +1 -1
- package/dist/interface/assets/{SettingsRemote-Bf8bqXYs.js → SettingsRemote-Cm72h9O2.js} +1 -1
- package/dist/interface/assets/{SettingsSystem-obAYrm8J.js → SettingsSystem-IU5zzJ8r.js} +2 -2
- package/dist/interface/assets/{SettingsUsers-Ciu1ry18.js → SettingsUsers-Wgu60ci9.js} +1 -1
- package/dist/interface/assets/{Terminal-CD9he5xW.js → Terminal-D1CRBDlt.js} +1 -1
- package/dist/interface/assets/{VariableInput-CFs-kzqd.js → VariableInput-D5330Mfo.js} +1 -1
- package/dist/interface/assets/{VariableSuggestions-PEzupqiE.js → VariableSuggestions-BYRGZZhC.js} +1 -1
- package/dist/interface/assets/VersionsHandler-hDdaLt6c.js +7 -0
- package/dist/interface/assets/Workers-De7GyYLY.js +2 -0
- package/dist/interface/assets/{Workers-DCx1wSq5.css → Workers-E6LM_yAl.css} +1 -1
- package/dist/interface/assets/api-CEmKJS_k.js +2 -0
- package/dist/interface/assets/{api-CbBOEbKQ.js → api-CniTJ7zF.js} +1 -1
- package/dist/interface/assets/api-D7tGlI-z.css +2 -0
- package/dist/interface/assets/{auth-cdPNNpNC.js → auth-XrGrvKJw.js} +1 -1
- package/dist/interface/assets/{automations-E7vwN3kw.js → automations-BTNkOZVN.js} +1 -1
- package/dist/interface/assets/{automations-C309DNNg.js → automations-DBL-AVqV.js} +1 -1
- package/dist/interface/assets/backup-DCACCZlp.js +1 -0
- package/dist/interface/assets/{cameras-CvJDLEZ3.js → cameras-BU1ZCguU.js} +1 -1
- package/dist/interface/assets/{cameras.schema-Clwro_L9.js → cameras.schema-xccbs98C.js} +1 -1
- package/dist/interface/assets/cloudHandoff-l8EehWAq.js +1 -0
- package/dist/interface/assets/{lightbulb-outline-B0CFho4y.js → cog-outline-DUNHSyxs.js} +1 -1
- package/dist/interface/assets/{deviceId-OXLTtG-_.js → deviceId-BDIV3wVa.js} +1 -1
- package/dist/interface/assets/download-D5N3Bjsy.js +1 -0
- package/dist/interface/assets/{hasPermission-P1TgpAur.js → hasPermission-Dt66r7m6.js} +1 -1
- package/dist/interface/assets/{instances-DwnEOXk1.js → instances-Cm2uvc3I.js} +1 -1
- package/dist/interface/assets/lightbulb-outline-CSHur8g1.js +1 -0
- package/dist/interface/assets/{locale-BWvy9Nlz.js → locale-DHFGj38b.js} +1 -1
- package/dist/interface/assets/main-BpXAVhDw.js +3 -0
- package/dist/interface/assets/{main-DudyqPaR.css → main-DYLy_5Pn.css} +1 -1
- package/dist/interface/assets/nodeDefinitions-BvHN6Rgq.js +1 -0
- package/dist/interface/assets/{notifications-DHmx6O_s.js → notifications-CcPAq-AU.js} +1 -1
- package/dist/interface/assets/{plugins-NVAodP6s.js → plugins-Byvz--5u.js} +1 -1
- package/dist/interface/assets/round-restart-alt-BhSxsPhN.css +1 -0
- package/dist/interface/assets/{round-restart-alt-c8MQjhLh.js → round-restart-alt-wY5ZWF_I.js} +1 -1
- package/dist/interface/assets/router-BI5yR4wx.js +2 -0
- package/dist/interface/assets/{router-BUTKN1yM.css → router-qrIK2v9X.css} +1 -1
- package/dist/interface/assets/{routerState-dQtObsFs.js → routerState-1OSE3RrK.js} +1 -1
- package/dist/interface/assets/{server-CRxodRik.js → server-BZ6moxcL.js} +1 -1
- package/dist/interface/assets/{shares-4w6GDwjp.js → shares-Dnb9ln4i.js} +1 -1
- package/dist/interface/assets/{theme-DhaXe7yA.js → theme-CMPHpEel.js} +1 -1
- package/dist/interface/assets/{types-6RvFwckU.js → types-CxqXp8-9.js} +1 -1
- package/dist/interface/assets/types-Dhfpp18Q.js +1 -0
- package/dist/interface/assets/{ui-DrzKhUXW.js → ui-DoqHmuEp.js} +1 -1
- package/dist/interface/assets/{useBiometricCredentials-BGRyKe48.js → useBiometricCredentials-D0zMU6nI.js} +1 -1
- package/dist/interface/assets/{useCameraOptions-CO1HD_gL.js → useCameraOptions-ICvT3348.js} +1 -1
- package/dist/interface/assets/{useCuiCameraDrawer-DnN9lwiy.js → useCuiCameraDrawer-Cz6XoSl4.js} +1 -1
- package/dist/interface/assets/{useCuiDialog-DHktK-mZ.js → useCuiDialog-D3TnoSLA.js} +1 -1
- package/dist/interface/assets/{useFileDownload-Cp1oH80I.js → useFileDownload-s0dzBJ-h.js} +1 -1
- package/dist/interface/assets/{useLogsSocket-OnTDnkPr.js → useLogsSocket-GhBHm7PL.js} +1 -1
- package/dist/interface/assets/{useSharedComposables-gpJ--qZh.js → useSharedComposables-BwzJuqID.js} +1 -1
- package/dist/interface/assets/{useStreamStatus-N--czepD.js → useStreamStatus-DffcpWzm.js} +1 -1
- package/dist/interface/assets/{useUserOptions-CPkl1O0A.js → useUserOptions-Cvb_O9Oh.js} +1 -1
- package/dist/interface/assets/{users.schema-BIL9DqRo.js → users.schema-Csh8aGMQ.js} +1 -1
- package/dist/interface/assets/{vendor-cameraui-DgSMexWY.js → vendor-cameraui-DQVBM-Sz.js} +38 -38
- package/dist/interface/assets/{vendor-core-BKHiXSX7.js → vendor-core-C5n49w0D.js} +1 -1
- package/dist/interface/assets/{vendor-primevue-7iEzPOvf.js → vendor-primevue-CCUVk9_F.js} +1 -1
- package/dist/interface/assets/{view-grid-B0KB2pRf.js → view-grid-CK2x8Wqf.js} +1 -1
- package/dist/interface/index.html +46 -45
- package/dist/interface/sw.js +1 -1
- package/dist/server/package.json +3 -3
- package/dist/server/requirements.txt +1 -1
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/frames.py +3 -1
- package/dist/server/src/api/controllers/backup.controller.d.ts +7 -1
- package/dist/server/src/api/controllers/backup.controller.js +65 -1
- package/dist/server/src/api/controllers/backup.controller.js.map +1 -1
- package/dist/server/src/api/database/types.d.ts +18 -0
- package/dist/server/src/api/routes/backup.routes.js +54 -1
- package/dist/server/src/api/routes/backup.routes.js.map +1 -1
- package/dist/server/src/api/schemas/backup.schema.d.ts +28 -25
- package/dist/server/src/api/schemas/backup.schema.js +23 -60
- package/dist/server/src/api/schemas/backup.schema.js.map +1 -1
- package/dist/server/src/api/schemas/cameras.schema.d.ts +8 -0
- package/dist/server/src/api/schemas/cameras.schema.js +2 -0
- package/dist/server/src/api/schemas/cameras.schema.js.map +1 -1
- package/dist/server/src/api/services/backup.service.d.ts +1 -1
- package/dist/server/src/api/services/backup.service.js +2 -1
- package/dist/server/src/api/services/backup.service.js.map +1 -1
- package/dist/server/src/api/services/backupScheduler.service.d.ts +31 -0
- package/dist/server/src/api/services/backupScheduler.service.js +203 -0
- package/dist/server/src/api/services/backupScheduler.service.js.map +1 -0
- package/dist/server/src/api/types/index.d.ts +7 -1
- package/dist/server/src/api/websocket/nsp/notifications.js +3 -3
- package/dist/server/src/api/websocket/nsp/notifications.js.map +1 -1
- package/dist/server/src/camera/decoder/detection-coordinator.d.ts +13 -1
- package/dist/server/src/camera/decoder/detection-coordinator.js +242 -242
- package/dist/server/src/camera/decoder/detection-coordinator.js.map +1 -1
- package/dist/server/src/camera/decoder/event-manager.js +41 -18
- package/dist/server/src/camera/decoder/event-manager.js.map +1 -1
- package/dist/server/src/camera/decoder/frame-scaler.d.ts +1 -0
- package/dist/server/src/camera/decoder/frame-scaler.js +2 -2
- package/dist/server/src/camera/decoder/frame-scaler.js.map +1 -1
- package/dist/server/src/camera/decoder/frame-source.js +2 -1
- package/dist/server/src/camera/decoder/frame-source.js.map +1 -1
- package/dist/server/src/camera/decoder/snapshot-source.d.ts +49 -0
- package/dist/server/src/camera/decoder/snapshot-source.js +279 -0
- package/dist/server/src/camera/decoder/snapshot-source.js.map +1 -0
- package/dist/server/src/camera/decoder/worker.d.ts +1 -0
- package/dist/server/src/camera/decoder/worker.js +24 -2
- package/dist/server/src/camera/decoder/worker.js.map +1 -1
- package/dist/server/src/main.d.ts +1 -0
- package/dist/server/src/main.js +5 -0
- package/dist/server/src/main.js.map +1 -1
- package/dist/server/src/manager/downloadManager.js +2 -2
- package/dist/server/src/manager/downloadManager.js.map +1 -1
- package/dist/server/src/plugins/runtime/python/child.py +11 -0
- package/dist/server/src/plugins/runtime/python/namespaces.py +4 -0
- package/dist/server/src/plugins/runtime/python/proxy/download_manager.py +12 -2
- package/dist/server/src/plugins/runtime/python/proxy/file_serve.py +49 -0
- package/dist/server/src/plugins/worker.js +9 -3
- package/dist/server/src/plugins/worker.js.map +1 -1
- package/dist/server/src/rpc/server.js +2 -0
- package/dist/server/src/rpc/server.js.map +1 -1
- package/dist/server/src/workers/agent.js +4 -4
- package/dist/server/src/workers/agent.js.map +1 -1
- package/dist/server/src/workers/capabilities/plugin-host.js +2 -2
- package/dist/server/src/workers/capabilities/plugin-host.js.map +1 -1
- package/package.json +3 -3
- package/dist/interface/assets/Automation-D0ps_z9e.js +0 -2
- package/dist/interface/assets/Console-DrDqDUtO.js +0 -1
- package/dist/interface/assets/CuiBottomSheet-DKUg_g5x.js +0 -1
- package/dist/interface/assets/CuiCameraCard-IyJNZMGs.js +0 -1
- package/dist/interface/assets/CuiCameraRecordings-iWAFGo8e.js +0 -1
- package/dist/interface/assets/CuiDataTable-DWuXg9Zg.css +0 -1
- package/dist/interface/assets/CuiDataTable-saRt0sBc.js +0 -1
- package/dist/interface/assets/CuiPluginCategoryChip-rfdhCEi-.js +0 -1
- package/dist/interface/assets/Plugin-CeLrucXT.js +0 -1
- package/dist/interface/assets/Plugin-Yv0ZmTNZ.css +0 -1
- package/dist/interface/assets/PluginDetail-DKywYzmS.js +0 -2
- package/dist/interface/assets/PluginDetail-DbYxVe3g.css +0 -1
- package/dist/interface/assets/PluginSearch-BC1L0-VN.js +0 -1
- package/dist/interface/assets/PluginSearch-DCuLwE3v.js +0 -2
- package/dist/interface/assets/Recordings--XaVJZJi.js +0 -1
- package/dist/interface/assets/SettingsAccount-DFMOh1ci.js +0 -1
- package/dist/interface/assets/SettingsAppearance-DzG2tlwK.js +0 -1
- package/dist/interface/assets/SettingsBackup-CfOHDar8.js +0 -1
- package/dist/interface/assets/VersionsHandler-Dpo-L314.js +0 -7
- package/dist/interface/assets/Workers-DiIBLgfr.js +0 -2
- package/dist/interface/assets/api-aSYFKxo6.js +0 -2
- package/dist/interface/assets/api-vCJ1T8Ow.css +0 -2
- package/dist/interface/assets/backup-Co1bwdSv.js +0 -1
- package/dist/interface/assets/cloudHandoff-Bym-XqR1.js +0 -1
- package/dist/interface/assets/main-DiF8p_7h.js +0 -3
- package/dist/interface/assets/nodeDefinitions-Dvawtk76.js +0 -1
- package/dist/interface/assets/round-restart-alt-fCNtJi_k.css +0 -1
- package/dist/interface/assets/router-6GfEM8TO.js +0 -2
- package/dist/interface/assets/types-BXo-JDGR.js +0 -1
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cloudHandoff-Bym-XqR1.js","assets/api-aSYFKxo6.js","assets/rolldown-runtime-DAXXjFlN.js","assets/vendor-cameraui-DgSMexWY.js","assets/vendor-DoIl6acN.js","assets/vendor-core-BKHiXSX7.js","assets/api-vCJ1T8Ow.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{An as t,Bi as n,Ct as r,Dn as i,Dt as a,Et as o,Gt as s,Hn as c,In as l,Ji as u,Ki as d,Kn as f,Kt as p,Mn as m,Mt as h,Ni as g,On as _,Ot as v,Pi as y,Q as b,Si as ee,Sn as x,St as S,Tt as C,Vn as te,X as w,Yi as T,Z as ne,_a as re,_n as E,_t as ie,ba as ae,bn as oe,bt as se,cn as D,dn as O,dt as ce,en as k,fi as le,fn as ue,ft as de,gn as fe,gt as pe,hi as me,hn as he,ht as A,in as ge,jt as j,k as _e,kn as ve,kt as ye,ln as be,mn as xe,mt as Se,nn as Ce,pn as we,pt as Te,qi as Ee,rn as De,tn as Oe,tt as ke,un as Ae,ut as je,vi as Me,vn as Ne,vt as Pe,wn as Fe,wt as Ie,xa as Le,xn as Re,xt as ze,ya as Be,yt as Ve,zi as He}from"./vendor-cameraui-DgSMexWY.js";import{A as Ue,D as We,I as Ge,L as Ke,O as qe,T as Je,a as Ye,b as Xe,d as Ze,i as Qe,l as $e,m as et,n as tt,r as nt,t as rt,u as it,w as at,x as ot,z as st}from"./api-aSYFKxo6.js";import{$ as ct,$n as M,$t as N,An as lt,Cr as P,En as ut,Er as F,Gn as dt,J as ft,L as I,Ln as pt,Nn as mt,On as ht,Pn as gt,Q as _t,R as L,Rn as vt,Sr as R,Tr as z,Un as yt,Vn as B,Wt as bt,Yn as xt,Zn as St,_r as Ct,an as wt,ar as Tt,b as Et,br as Dt,cn as Ot,dn as V,fn as H,fr as kt,jn as At,kn as jt,lr as Mt,mn as U,mr as W,nr as G,on as K,pn as q,q as Nt,rn as Pt,rr as Ft,tn as It,un as J,ur as Y,vn as X,x as Lt,xn as Z,yn as Q,z as Rt,zn as $}from"./vendor-DoIl6acN.js";import{c as zt,f as Bt,l as Vt,n as Ht,t as Ut,u as Wt}from"./vendor-core-BKHiXSX7.js";import{F as Gt,I as Kt,R as qt,_ as Jt,a as Yt,b as Xt,c as Zt,d as Qt,f as $t,g as en,h as tn,i as nn,l as rn,m as an,o as on,p as sn,r as cn,s as ln,t as un,u as dn,v as fn,y as pn}from"./CuiCameraCard-IyJNZMGs.js";import{t as mn}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as hn,o as gn,r as _n,s as vn,t as yn}from"./useSharedComposables-gpJ--qZh.js";import{n as bn}from"./ui-DrzKhUXW.js";import{a as xn,i as Sn,n as Cn,o as wn,r as Tn,t as En}from"./router-6GfEM8TO.js";import{t as Dn}from"./cloud-outline-BPAJ6_kc.js";import{t as On}from"./close-DuwOOM-P.js";import{t as kn}from"./useElectron-mh8HQUAI.js";import{t as An}from"./chevron-down-KZwkCQ3v.js";import{B as jn,D as Mn,E as Nn,G as Pn,H as Fn,J as In,K as Ln,L as Rn,O as zn,R as Bn,S as Vn,U as Hn,V as Un,W as Wn,_ as Gn,a as Kn,f as qn,g as Jn,j as Yn,k as Xn,m as Zn,n as Qn,p as $n,r as er,t as tr,u as nr,v as rr,x as ir,y as ar,z as or}from"./vendor-primevue-7iEzPOvf.js";import{t as sr}from"./power-BcSFRPtI.js";import{t as cr}from"./CuiAvatar-of_eVQsv.js";import{t as lr}from"./api-CbBOEbKQ.js";import{t as ur}from"./instances-DwnEOXk1.js";import{t as dr}from"./cctv-BsGdaLfw.js";import{t as fr}from"./cog-Ce2a8uiA.js";import{t as pr}from"./lightbulb-outline-B0CFho4y.js";import{t as mr}from"./face-recognition-D5evlO1d.js";import{t as hr}from"./puzzle-filled-C1z2qa5-.js";import{t as gr}from"./CuiCameraSnapshot-DTtvEMy1.js";import{t as _r}from"./hasPermission-P1TgpAur.js";import{n as vr,t as yr}from"./CuiMenu-Ds6GufVn.js";import{t as br}from"./shield-check-ChlSHOnR.js";import{t as xr}from"./motion-sensor-DD8SfD-m.js";import{t as Sr}from"./vendor-draggabilly-Dl6FWJwx.js";import{a as Cr,t as wr}from"./cameras-CvJDLEZ3.js";import{t as Tr}from"./CuiActionButton-Bl7gqhIV.js";import{t as Er}from"./copy-16-filled-CZzRMAt_.js";import{n as Dr,t as Or}from"./useCuiCameraDrawer-DnN9lwiy.js";import{t as kr}from"./useCuiDialog-DHktK-mZ.js";import{n as Ar}from"./CuiTopbarSlot-ac4GLLbf.js";import{A as jr,M as Mr,P as Nr,j as Pr,k as Fr}from"./types-BXo-JDGR.js";import{t as Ir}from"./theme-DhaXe7yA.js";import{t as Lr}from"./check-BMoCATAa.js";import{t as Rr}from"./trash2-CaXm_MmJ.js";import{t as zr}from"./notifications-DHmx6O_s.js";import{n as Br,t as Vr}from"./microphone-CAVr4YFv.js";import{a as Hr,i as Ur,r as Wr,t as Gr}from"./CuiSchema-CfqOJmDH.js";import{t as Kr}from"./plugins-NVAodP6s.js";import{t as qr}from"./PluginSchema-CWcq67pj.js";import{t as Jr}from"./information-outline-ChTb2u7w.js";import{t as Yr}from"./plus-Dqgz6pez.js";import{a as Xr,i as Zr,n as Qr,t as $r}from"./cameras.schema-Clwro_L9.js";import{t as ei}from"./cctv-CBtg_v6o.js";import{t as ti}from"./delete-5a2q7_46.js";import{t as ni}from"./useStreamStatus-N--czepD.js";import{t as ri}from"./bell-ring-CenQn4Yt.js";import{t as ii}from"./home-Dey3bw1P.js";import{t as ai}from"./CuiDataTable-saRt0sBc.js";import{t as oi}from"./locale-BWvy9Nlz.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),re(localStorage),Le(),typeof window<`u`&&window.addEventListener(`pagehide`,Be);var si={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ci(e,t){return $(),U(`svg`,si,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12 3c-1.97 0-3.85.47-5.56 1.41c-.24.13-.54.04-.68-.2a.506.506 0 0 1 .2-.68C7.82 2.5 9.86 2 12 2s4 .47 6.04 1.5c.25.15.34.45.21.69a.48.48 0 0 1-.44.28M3.5 9.72c-.1 0-.2-.03-.29-.09a.517.517 0 0 1-.12-.7c.99-1.4 2.25-2.5 3.75-3.27C10 4.04 14 4.03 17.15 5.65c1.5.77 2.76 1.85 3.75 3.25c.16.22.1.54-.12.7c-.23.16-.54.11-.7-.1a9.26 9.26 0 0 0-3.39-2.96c-2.87-1.47-6.54-1.47-9.4.01c-1.36.7-2.5 1.7-3.4 2.95c-.08.15-.23.22-.39.22m6.25 12.07c-.13 0-.25-.05-.35-.15c-.87-.87-1.34-1.43-2.01-2.64c-.69-1.23-1.05-2.73-1.05-4.34c0-2.97 2.54-5.39 5.66-5.39s5.66 2.42 5.66 5.39a.5.5 0 0 1-.5.5a.5.5 0 0 1-.5-.5c0-2.42-2.09-4.39-4.66-4.39s-4.66 1.97-4.66 4.39c0 1.44.32 2.77.93 3.84c.64 1.16 1.08 1.65 1.85 2.43c.19.2.19.51 0 .71c-.12.1-.24.15-.37.15m7.17-1.85c-1.19 0-2.24-.3-3.1-.89c-1.49-1.01-2.38-2.65-2.38-4.39a.5.5 0 0 1 .5-.5a.5.5 0 0 1 .5.5c0 1.41.72 2.74 1.94 3.56c.71.48 1.54.71 2.54.71c.24 0 .64-.03 1.04-.1c.27-.05.54.13.58.41c.05.26-.13.53-.41.58c-.57.11-1.07.12-1.21.12M14.91 22h-.13c-1.59-.46-2.63-1.05-3.72-2.12a7.28 7.28 0 0 1-2.17-5.22c0-1.62 1.38-2.94 3.08-2.94s3.08 1.32 3.08 2.94c0 1.07.95 1.94 2.08 1.94c1.15 0 2.08-.87 2.08-1.94c0-3.77-3.25-6.83-7.25-6.83c-2.84 0-5.46 1.58-6.61 4.03c-.39.81-.59 1.76-.59 2.8c0 .78.07 2.01.67 3.61c.1.26-.03.55-.29.64a.504.504 0 0 1-.64-.29c-.5-1.31-.73-2.62-.73-3.96c0-1.2.23-2.29.68-3.24c1.33-2.79 4.28-4.6 7.51-4.6c4.54 0 8.25 3.51 8.25 7.83c0 1.62-1.38 2.94-3.08 2.94s-3.08-1.32-3.08-2.94c0-1.07-.93-1.94-2.08-1.94s-2.08.87-2.08 1.94c0 1.71.66 3.31 1.87 4.51c.95.94 1.86 1.46 3.27 1.84c.27.08.42.36.35.62c-.05.23-.26.38-.47.38`},null,-1)]])}var li=Y({name:`mdi-fingerprint`,render:ci}),ui=`cameraui:unlocked`;function di(){try{sessionStorage.setItem(ui,`1`)}catch{}}var fi=W(!1),pi=W(!1);function mi(){return{isLocked:fi,isAvailable:pi,unlock:hi,init:gi}}async function hi(){return fi.value=!1,di(),!0}async function gi(){}var _i={key:0,class:`app-lock-overlay`},vi={class:`flex flex-col items-center gap-6 p-8`},yi={class:`text-center`},bi={class:`text-lg font-semibold`},xi={class:`text-sm text-muted mt-2`},Si=mn(Z({__name:`CuiAppLockOverlay`,setup(e){let{isLocked:t,unlock:n}=mi(),r=W(!1);async function i(){r.value=!0;try{await n()}finally{r.value=!1}}return M(t,async e=>{e&&(await At(),await i())},{immediate:!0}),(e,n)=>{let a=qt,o=li,s=c;return R(t)?($(),U(`div`,_i,[V(`div`,vi,[Q(a,{class:`w-16 h-16 text-muted`}),V(`div`,yi,[V(`h2`,bi,F(e.$t(`views.app_lock.title`)),1),V(`p`,xi,F(e.$t(`views.app_lock.subtitle`)),1)]),Q(s,{label:e.$t(`views.app_lock.unlock`),loading:R(r),fluid:``,class:`cui-button-medium`,onClick:i},{icon:G(()=>[Q(o,{class:`mr-2`})]),_:1},8,[`label`,`loading`])])])):q(``,!0)}}}),[[`__scopeId`,`data-v-baef4383`]]),Ci={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function wi(e,t){return $(),U(`svg`,Ci,[...t[0]||=[V(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M6 20h12M12 4v12m0 0l3.5-3.5M12 16l-3.5-3.5`},null,-1)]])}var Ti=Y({name:`iconoir-download`,render:wi}),Ei={class:`cui-update-indicator__content`},Di={class:`cui-update-indicator__text`},Oi=mn(Z({__name:`CuiUpdateIndicator`,setup(e){let{t}=le(),{bottombarHeight:n}=hn(),{updateAvailable:r,isApplying:i,applyUpdate:a}=wn(),{isLoggedIn:o}=Bt(et()),s=qe(),l=J(()=>o.value&&r.value&&s.bannerMode.value===null),u=J(()=>`calc(${n.value}px + 1rem + env(safe-area-inset-bottom, 0px))`);function d(){a()}return(e,n)=>{let r=te,a=Ti,o=c;return $(),H(N,{name:`fade`},{default:G(()=>[R(l)?($(),U(`div`,{key:0,class:`cui-update-indicator shadow-xl`,style:z({bottom:R(u)})},[V(`div`,Ei,[R(i)?($(),H(r,{key:0,class:`cui-update-indicator__spinner`,"stroke-width":`5`})):($(),H(a,{key:1,class:`cui-update-indicator__icon`})),V(`span`,Di,F(R(i)?R(t)(`components.toast.update_applying`):R(t)(`components.toast.update_available_title`)),1),R(i)?q(``,!0):($(),H(o,{key:2,size:`small`,class:`cui-update-indicator__button`,label:R(t)(`components.toast.update_now`),onClick:d},null,8,[`label`]))])],4)):q(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-8ce1000d`]]),ki={class:`cui-connection-indicator__content`},Ai={class:`cui-connection-indicator__text`},ji=mn(Z({__name:`CuiConnectionIndicator`,setup(e){let{t}=le(),{bottombarHeight:n}=hn(),{bannerMode:r,inTrouble:i}=qe(),a=Qe(),{isLoggedIn:o}=Bt(et()),s=J(()=>`calc(${n.value}px + 1rem + env(safe-area-inset-bottom, 0px))`),l=J(()=>o.value&&r.value!==null),u=J(()=>r.value===`connecting`?t(`connection.connecting_remote`):t(`connection.reconnecting`)),d=J(()=>i.value&&a===`cloud`);async function f(){let{bounceToCloudFrontend:e}=await bt(async()=>{let{bounceToCloudFrontend:e}=await import(`./cloudHandoff-Bym-XqR1.js`);return{bounceToCloudFrontend:e}},__vite__mapDeps([0,1,2,3,4,5,6]));await e()}return(e,n)=>{let r=te,i=Dn,a=c;return $(),H(N,{name:`fade`},{default:G(()=>[R(l)?($(),U(`div`,{key:0,class:`cui-connection-indicator shadow-xl`,style:z({bottom:R(s)})},[V(`div`,ki,[Q(r,{class:`!w-5 !h-5 shrink-0`,"stroke-width":`5`}),V(`span`,Ai,F(R(u)),1),R(d)?($(),H(a,{key:0,size:`small`,rounded:``,class:`cui-connection-indicator__button`,"aria-label":R(t)(`connection.pick_server`),onClick:f},{default:G(()=>[Q(i,{class:`w-4 h-4`})]),_:1},8,[`aria-label`])):q(``,!0)])],4)):q(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-89935ae5`]]),Mi={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ni(e,t){return $(),U(`svg`,Mi,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M5.41 7.41L10 12l-4.59 4.59L4 15.17L7.17 12L4 8.83zm13.18 9.18L14 12l4.59-4.58L20 8.83L16.83 12L20 15.17z`},null,-1)]])}var Pi=Y({name:`mdi-unfold-less-vertical`,render:Ni}),Fi={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ii(e,t){return $(),U(`svg`,Fi,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M12 18.17L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15M12 5.83L15.17 9l1.41-1.41L12 3L7.41 7.59L8.83 9z`},null,-1)]])}var Li=Y({name:`mdi-unfold-more-horizontal`,render:Ii}),Ri={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function zi(e,t){return $(),U(`svg`,Ri,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M19 13H5v-2h14z`},null,-1)]])}var Bi=Y({name:`mdi-minus`,render:zi}),Vi={class:`fixed flex flex-row items-center z-[99999] top-0 left-[7px] gap-2 p-2 pl-[0.4rem]! non-draggable-region`},Hi=mn(Z({__name:`CuiWindowButtons`,setup(e){let{electron:t}=kn(),n=W(!1),r=W(!1);function i(){r.value||t?.send(`change-window`,`minify`)}function a(){t?.send(`change-window`,`close`)}function o(){t?.send(`change-window`,`expand`)}function s(e,t){r.value=t}return pt(()=>{t?.on(`fullscreen`,s)}),gt(()=>{t?.removeListener(`fullscreen`,s)}),(e,t)=>{let s=On,c=Bi,l=Li,u=Pi;return Ft(($(),U(`div`,Vi,[V(`div`,{class:`close-button`,onClick:a},[Q(s,{color:`#7f050a`,width:`100%`,height:`100%`,class:P([`transition-opacity opacity-0`,{"opacity-100":R(n)}])},null,8,[`class`])]),V(`div`,{class:P({"disabled-button":R(r),"minify-button":!R(r)}),onClick:i},[R(r)?q(``,!0):($(),H(c,{key:0,color:`#995712`,width:`100%`,height:`100%`,class:P([`transition-opacity opacity-0`,{"opacity-100":R(n)}])},null,8,[`class`]))],2),V(`div`,{class:`expand-button`,style:z(`${R(r)?`transform: rotate(45deg)`:`transform: rotate(-45deg)`}`),onClick:o},[R(r)?($(),H(u,{key:1,color:`#0d650d`,width:`100%`,height:`100%`,class:P([`transition-opacity opacity-0`,{"opacity-100":R(n)}])},null,8,[`class`])):($(),H(l,{key:0,color:`#0d650d`,width:`100%`,height:`100%`,class:P([`transition-opacity opacity-0`,{"opacity-100":R(n)}])},null,8,[`class`]))],4)])),[[R(Ut),e=>n.value=e]])}}}),[[`__scopeId`,`data-v-d1e31a06`]]),Ui={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Wi(e,t){return $(),U(`svg`,Ui,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z`},null,-1)]])}var Gi=Y({name:`mdi-chevron-up`,render:Wi}),Ki={key:0,class:`shrink-0 relative left-[-9px]`},qi={key:1,class:`shrink-0`},Ji={key:2,class:`shrink-0`},Yi={key:0,class:`overflow-hidden flex-1 ml-10`},Xi={class:`flex flex-row items-center justify-between`},Zi={class:`text-start flex-1`},Qi={key:0,class:`text-xs text-muted`},$i=mn(Z({__name:`CuiNavItem`,props:{label:{},to:{},expanded:{type:Boolean},description:{},icon:{},iconSize:{default:24},iconClass:{},labelClass:{},activeIcon:{},avatar:{},avatarSize:{default:24},showLogout:{type:Boolean},darkMode:{type:Boolean},buttonProps:{},showTooltip:{type:Boolean},fallbackActivePath:{},activeColor:{},activeIconColor:{},bottomBar:{type:Boolean}},setup(e){let t=e,n=zt(),r=et(),{icon:i,iconSize:a,iconClass:o,activeIcon:s,avatarSize:l,avatar:u,labelClass:d,label:f,description:p,expanded:m,to:h,showLogout:g,darkMode:_,buttonProps:v,showTooltip:y,fallbackActivePath:b,activeColor:ee,activeIconColor:x,bottomBar:S}=Dt(t),C=J(()=>n.path===h.value||h.value!==`/`&&(n.path.startsWith(h.value+`/`)||n.path.startsWith((b.value??h.value)+`/`)));function te(){r.logout()}return(e,t)=>{let n=cr,r=sr,b=c,w=yt(`RouterLink`),T=In;return $(),H(w,{to:R(h)},{default:G(({isActive:e})=>[Ft(($(),H(b,lt({text:``,severity:`secondary`,class:[`cui-button navitem-button w-full h-full flex items-center relative`,{"dark-mode":R(_),"!text-white navitem-active":(e||R(C))&&!R(u),"hover:!text-color active:!text-color focus:!text-color":!e&&!R(C),"navitem-inactive":!e&&!R(C)}],style:R(ee)&&(e||R(C))?{"--navitem-active-color":R(ee)}:void 0,fluid:``},R(v)),{default:G(()=>[V(`div`,{class:P([`flex items-center justify-center h-full`,{"absolute left-[14px]":!R(S)}])},[R(u)?($(),U(`div`,Ki,[Q(n,{src:R(u),size:R(l),style:z({width:`${R(l)}px`,height:`${R(l)}px`})},null,8,[`src`,`size`,`style`])])):R(i)&&!e&&!R(C)||!R(s)?($(),U(`div`,qi,[Q(R(i),{class:P(R(o)),style:z({width:`${R(a)}px`,height:`${R(a)}px`,color:(e||R(C))&&R(x)?R(x):void 0})},null,8,[`class`,`style`])])):R(s)&&(e||R(C))?($(),U(`div`,Ji,[Q(R(s),{style:z({width:`${R(a)}px`,height:`${R(a)}px`,color:R(x)})},null,8,[`style`])])):q(``,!0)],2),Q(N,{name:`fade`},{default:G(()=>[R(m)?($(),U(`div`,Yi,[V(`div`,Xi,[V(`div`,Zi,[V(`div`,{class:P([`text-sm max-w-100 truncate font-semibold`,[R(d),{"text-color font-bold":R(u)}]])},F(R(f)),3),R(p)?($(),U(`div`,Qi,F(R(p)),1)):q(``,!0)]),R(g)?($(),H(b,{key:0,text:``,rounded:``,class:`dark-mode cui-icon-md`,onClick:wt(te,[`stop`,`prevent`])},{icon:G(()=>[Q(r,{width:`100%`,height:`100%`})]),_:1})):q(``,!0)])])):q(``,!0)]),_:1})]),_:2},1040,[`class`,`style`])),[[T,{value:R(y)&&!R(m)?R(f):``,pt:{root:{class:`dark-mode`}}}]])]),_:1},8,[`to`])}}}),[[`__scopeId`,`data-v-9e0c467b`]]),{isElectronApp:ea}=kn(),ta=ea?25:0,na={CLOSED:0,MINIFIED:60,EXPANDED:288},ra=kt({serverUpdateAvailable:!1,pluginUpdateAvailable:!1,serverUpdate:null,pluginUpdates:[]}),ia=null,aa=null;async function oa(){if(aa?.ready.value)try{let e=await aa.request(`get-updates`);ra.pluginUpdates=e.plugins,ra.pluginUpdateAvailable=e.plugins.length>0,ra.serverUpdate=e.server,ra.serverUpdateAvailable=e.server.updateAvailable||e.server.betaUpdateAvailable||!1}catch{}}function sa(){return aa||(ia=Tt(!0),ia.run(()=>{let e=Xe(`/server`);aa=e,e.on(`plugin-updates`,e=>{ra.pluginUpdates=e,ra.pluginUpdateAvailable=e.length>0}),e.on(`server-updates`,e=>{ra.serverUpdate=e,ra.serverUpdateAvailable=e.updateAvailable||e.betaUpdateAvailable||!1}),e.onReady(()=>{oa()})}),aa)}function ca(){function e(){sa()}function t(){}return{isConnected:J(()=>aa?.connected.value??!1),serverUpdateAvailable:J(()=>ra.serverUpdateAvailable),pluginUpdateAvailable:J(()=>ra.pluginUpdateAvailable),serverUpdate:J(()=>ra.serverUpdate),pluginUpdates:J(()=>ra.pluginUpdates),connect:e,disconnect:t,fetchUpdates:oa}}var la={class:`h-full flex flex-col overflow-y-scroll`},ua={class:`w-full flex items-center shrink-0 h-[60px]`},da={class:`overflow-hidden w-full pr-4`},fa={key:0,class:`ml-2 w-full flex flex-row items-center`},pa={class:`flex flex-col flex-1 my-4 px-1`},ma={class:`flex flex-col space-y-1`},ha={class:`flex flex-col space-y-1`},ga={class:`w-full h-[50px]`},_a={class:`flex items-center justify-center h-full absolute left-[14px]`},va={key:0,class:`flex flex-col space-y-1 overflow-hidden`},ya={class:`w-full h-[50px] relative`},ba=mn(Z({__name:`CuiNavbar`,setup(e,{expose:t}){let n=Vt(),{bus:r}=gn(),{mdBreakpoint:i,xlBreakpoint:a}=yn(),{navbarState:o}=hn(),{isElectronApp:s,electron:l}=kn(),{user:u}=Bt(et()),{uiSettings:d}=Bt(bn()),p=ca(),{data:m}=new lr().apiInfoQuery(),h=St(`navbarRef`),g=W(`closed`),_=W(!1),v=W(!1),b=W(!1),ee=J(()=>m.value?.electron??!1),x=J(()=>s&&ee.value),S=J(()=>d.value.interface.selectedSettingsView),C=e=>ee.value&&!!e.meta?.disabledInElectron,te=J(()=>Cn.filter(e=>e.meta?.navbar?.position===`top`&&e.meta&&_r(e)&&!C(e))),w=J(()=>Cn.filter(e=>e.meta?.navbar?.position===`bottom`&&_r(e)&&!C(e))),T=J(()=>w.value.filter(e=>!e.meta?.navbar?.group)),ne=J(()=>w.value.filter(e=>e.meta?.navbar?.group===`more`)),re=J(()=>ne.value.some(e=>n.currentRoute.value.path===e.path||n.currentRoute.value.path.startsWith(e.path+`/`))),E=J(()=>d.value.interface.navbarStayCollapsed&&g.value!==`opened`?`closed`:a.value?`opened`:g.value),ie=J(()=>E.value===`closed`?i.value?na.CLOSED:na.MINIFIED:na.EXPANDED);function ae(){b.value=!b.value,b.value?setTimeout(()=>{let e=h.value?.firstElementChild;e&&e.scrollTo({top:e.scrollHeight,behavior:`smooth`})},250):setTimeout(()=>O(),250)}function oe(){r.emit({navbarState:`closed`})}function se(e,t){x.value&&t.channel===`update-check`&&t.status===`available`&&(_.value=!0)}async function D(){if(x.value){l.removeListener(`app-status`,se),l.on(`app-status`,se),l.send(`check-for-updates`);try{_.value=(await l.invoke(`get-update-available`)).isUpdateAvailable}catch{}}}function O(){At(()=>{let e=h.value?.querySelector(`.navitem-active`);e&&e.scrollIntoView({block:`center`,behavior:`smooth`})})}let ce=Ee(O,100);return me(h,e=>{if(E.value!==`opened`)return;let t=e.target,n=t.closest(`#menu-icon`),r=t.closest(`#submenu-icon`),i=t.closest(`#navbar-icon`);!n&&!r&&!i&&oe()}),y(h,()=>{ce()}),M(re,e=>{e&&(b.value=!0)},{immediate:!0}),M(p.serverUpdateAvailable,e=>{x.value||(_.value=e)},{immediate:!0}),M(x,e=>{e&&D()},{immediate:!0}),M(p.pluginUpdateAvailable,e=>{v.value=e}),M(o,e=>{e&&e!==g.value&&(g.value=e===`minified`||e===`closed`?`closed`:`opened`)}),M(n.currentRoute,(e,t)=>{e.path!==t.path&&oe()}),M(u,()=>{u.value?.role===`admin`||u.value?.role===`master`?p.connect():p.disconnect()},{deep:!0,immediate:!0}),pt(()=>{O()}),vt(()=>{l?.removeListener(`app-status`,se)}),t({navbarState:E}),(e,t)=>{let n=yt(`RouterLink`),r=f,a=$i,o=An,s=Gi,l=c;return $(),U(`nav`,{ref_key:`navbarRef`,ref:h,class:P([`navbar-background fixed transition-[width,left] duration-200 overflow-x-hidden overflow-y-scroll shadow shadow-black/20 overflow-hidden border-[1px] border-base-color rounded-[15px] [clip-path:inset(0_round_15px)] before:content-[''] before:absolute before:top-0 before:left-0 before:right-0 before:h-[20px] before:blur-2xl before:opacity-70 before:bg-primary-500 before:-z-1`,{"shadow-xl":R(i)&&R(ie)===R(na).EXPANDED}]),style:z({top:`calc(max(8px, env(safe-area-inset-top, 0px)) + ${R(ta)}px)`,left:R(ie)===R(na).CLOSED?`-2px`:`max(8px, env(safe-area-inset-left, 0px))`,width:`${R(ie)}px`,height:`calc(100dvh - max(8px, env(safe-area-inset-top, 0px)) - max(8px, env(safe-area-inset-bottom, 0px)) - ${R(ta)}px)`,viewTransitionName:`cui-navbar`})},[V(`div`,la,[V(`div`,ua,[Q(n,{to:`/home`,class:`pl-[13px]`},{default:G(()=>[Q(R(ft),{src:R($e)(`logo_animated.svg`),width:`32px`,height:`32px`,title:`camera.ui`,"aria-label":`camera.ui`,class:`hover:scale-105 active:scale-105 focus:scale-105 transition-all non-draggable-region`},null,8,[`src`])]),_:1}),V(`div`,da,[Q(N,{name:`fade`},{default:G(()=>[R(ie)===R(na).EXPANDED?($(),U(`div`,fa,[Q(n,{to:`/home`,class:`text-white font-bold text-lg text-shadow`},{default:G(()=>[...t[0]||=[X(`camera.ui`,-1)]]),_:1})])):q(``,!0)]),_:1})])]),V(`div`,pa,[V(`div`,ma,[($(!0),U(K,null,B(R(te),t=>($(),U(`div`,{key:t.name,class:`w-full h-[50px] relative`},[R(v)&&t.name===`Plugins`?($(),H(r,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):q(``,!0),Q(a,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:R(ie)===R(na).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:P([`w-[50px] h-[50px]`,{"w-full":R(ie)===R(na).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`label`,`expanded`,`class`])]))),128))]),t[2]||=V(`div`,{class:`flex-1 mt-10`},null,-1),V(`div`,ha,[R(ne).length?($(),U(K,{key:0},[V(`div`,ga,[Q(l,{text:``,severity:`secondary`,class:P([`cui-button navitem-button w-full h-full flex items-center justify-center dark-mode`,{"!text-white navitem-active":R(b)||R(re),"hover:!text-color active:!text-color focus:!text-color navitem-inactive":!R(b)&&!R(re)}]),style:{color:`#a4a4a4`},onClick:ae},{default:G(()=>[V(`div`,_a,[R(b)?($(),H(o,{key:0,class:`w-[22px] h-[22px]`})):($(),H(s,{key:1,class:`w-[22px] h-[22px]`}))])]),_:1},8,[`class`])]),Q(N,{name:`navbar-group`},{default:G(()=>[R(b)?($(),U(`div`,va,[($(!0),U(K,null,B(R(ne),t=>($(),U(`div`,{key:t.name,class:`w-full h-[50px] relative`},[Q(a,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:R(ie)===R(na).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:P([`w-[50px] h-[50px]`,{"w-full":R(ie)===R(na).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`label`,`expanded`,`class`])]))),128))])):q(``,!0)]),_:1})],64)):q(``,!0),($(!0),U(K,null,B(R(T),t=>($(),U(`div`,{key:t.name,class:`w-full h-[50px] relative`},[R(_)&&t.name===`Settings`?($(),H(r,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):q(``,!0),Q(a,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path===`/settings`?`/settings/${R(S)}`:t.path,"fallback-active-path":t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:R(ie)===R(na).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:P([`w-[50px] h-[50px]`,{"w-full":R(ie)===R(na).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`fallback-active-path`,`label`,`expanded`,`class`])]))),128)),t[1]||=V(`div`,{class:`mb-4 mt-2`,style:{borderTop:`1px solid #313131`}},null,-1),V(`div`,ya,[Q(a,{avatar:`avatar`,label:R(u)?.username??`unknown`,description:R(u)?.role??`unknown`,expanded:R(ie)===R(na).EXPANDED,"show-logout":``,to:`/settings/account`,"dark-mode":``,"avatar-size":38,class:P([`w-[50px] h-[50px]`,{"w-full":R(ie)===R(na).EXPANDED}])},null,8,[`label`,`description`,`expanded`,`class`])])])])])],6)}}}),[[`__scopeId`,`data-v-6870cf26`]]),xa={class:`px-2 h-full flex items-center justify-around`,style:{paddingBottom:`calc(max(8px, env(safe-area-inset-bottom, 0px)))`}},Sa=mn(Z({__name:`CuiBottombar`,setup(e,{expose:t}){let{bottombarHeight:n}=hn(),r=St(`bottombarRef`),i=J(()=>Cn.filter(e=>e.meta?.bottombar&&e.meta.auth&&_r(e)));return t({bottombarRef:r}),(e,t)=>{let a=$i;return $(),U(`nav`,{ref_key:`bottombarRef`,ref:r,class:`cui-bottombar bottombar-background fixed bottom-0 left-0 right-0 border-t-[1px] border-color bottombar-background`,style:z({height:`calc(${R(n)}px + env(safe-area-inset-bottom, 0px))`,viewTransitionName:`cui-bottombar`})},[V(`div`,xa,[($(!0),U(K,null,B(R(i),e=>($(),H(a,{key:e.name,icon:e.meta.bottombar.icon.default,"active-icon":e.meta.bottombar.icon.active,"active-icon-color":`var(--p-primary-color)`,to:e.path,label:``,expanded:!1,"icon-class":`text-color`,class:`w-[50px] h-[50px] transition-all duration-300`,"bottom-bar":``},null,8,[`icon`,`active-icon`,`to`]))),128))])],4)}}}),[[`__scopeId`,`data-v-b0d768aa`]]),Ca={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function wa(e,t){return $(),U(`svg`,Ca,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M8.463 15.538Q7 14.075 7 12t1.463-3.537T12 7t3.538 1.463T17 12t-1.463 3.538T12 17t-3.537-1.463M2 13q-.425 0-.712-.288T1 12t.288-.712T2 11h2q.425 0 .713.288T5 12t-.288.713T4 13zm18 0q-.425 0-.712-.288T19 12t.288-.712T20 11h2q.425 0 .713.288T23 12t-.288.713T22 13zm-8.712-8.287Q11 4.425 11 4V2q0-.425.288-.712T12 1t.713.288T13 2v2q0 .425-.288.713T12 5t-.712-.288m0 18Q11 22.426 11 22v-2q0-.425.288-.712T12 19t.713.288T13 20v2q0 .425-.288.713T12 23t-.712-.288M5.65 7.05L4.575 6q-.3-.275-.288-.7t.288-.725q.3-.3.725-.3t.7.3L7.05 5.65q.275.3.275.7t-.275.7t-.687.288t-.713-.288M18 19.425l-1.05-1.075q-.275-.3-.275-.712t.275-.688q.275-.3.688-.287t.712.287L19.425 18q.3.275.288.7t-.288.725q-.3.3-.725.3t-.7-.3M16.95 7.05q-.3-.275-.288-.687t.288-.713L18 4.575q.275-.3.7-.288t.725.288q.3.3.3.725t-.3.7L18.35 7.05q-.3.275-.7.275t-.7-.275M4.575 19.425q-.3-.3-.3-.725t.3-.7l1.075-1.05q.3-.275.712-.275t.688.275q.3.275.288.688t-.288.712L6 19.425q-.275.3-.7.288t-.725-.288`},null,-1)]])}var Ta=Y({name:`material-symbols-light-mode-rounded`,render:wa}),Ea={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Da(e,t){return $(),U(`svg`,Ea,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M12 21q-3.75 0-6.375-2.625T3 12t2.625-6.375T12 3q.35 0 .688.025t.662.075q-1.025.725-1.638 1.888T11.1 7.5q0 2.25 1.575 3.825T16.5 12.9q1.375 0 2.525-.613T20.9 10.65q.05.325.075.662T21 12q0 3.75-2.625 6.375T12 21`},null,-1)]])}var Oa=Y({name:`material-symbols-dark-mode`,render:Da}),ka={viewBox:`0 0 48 48`,width:`1.2em`,height:`1.2em`},Aa=[`id`],ja=[`mask`];function Ma(e,t){return $(),U(`svg`,ka,[V(`defs`,null,[V(`mask`,{id:e.idMap.SVGh8KaKdEb},[...t[0]||=[V(`g`,{fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`4`},[V(`path`,{fill:`#fff`,stroke:`#fff`,d:`m24.003 4l5.27 5.27h9.457v9.456l5.27 5.27l-5.27 5.278v9.456h-9.456L24.004 44l-5.278-5.27H9.27v-9.456L4 23.997l5.27-5.27V9.27h9.456z`}),V(`path`,{fill:`#000`,stroke:`#000`,d:`M27 17c0 8-5 9-10 9c0 4 6.5 8 12 4s2-13-2-13`})],-1)]],8,Aa)]),V(`path`,{fill:`currentColor`,d:`M0 0h48v48H0z`,mask:`url(#`+e.idMap.SVGh8KaKdEb+`)`},null,8,ja)])}var Na=Y({name:`icon-park-solid-dark-mode`,render:Ma,setup(){return{idMap:{SVGh8KaKdEb:`uicons-`+Math.random().toString(36).substr(2,10)}}}}),Pa=Z({__name:`CuiThemeSwitch`,setup(e){let t=Ir(),{theme:n,autoMode:r}=Bt(t);function i(){t.toggleTheme()}return(e,t)=>{let a=Na,o=Oa,s=Ta,l=c;return $(),H(l,{severity:`secondary`,text:``,class:`cui-button p-2 text-color`,onClick:i},{default:G(()=>[R(r)?($(),H(a,{key:0,class:`w-6 h-6`})):R(n)===`dark`?($(),H(o,{key:1,class:`w-6 h-6`})):R(n)===`light`?($(),H(s,{key:2,class:`w-6 h-6`})):q(``,!0)]),_:1})}}}),Fa={class:`relative flex overflow-hidden items-center justify-center w-5 h-5`},Ia={class:`flex flex-col justify-between w-4 h-3 transform transition-all duration-100 origin-center overflow-hidden`},La=Z({__name:`CuiNavbarToggle`,setup(e){let{bus:t}=gn(),{navbarState:n}=hn(),{xlBreakpoint:r}=yn(),{uiSettings:i}=Bt(bn()),a=W(`closed`),o=J(()=>a.value===`opened`);function s(){t.emit({navbarState:a.value===`opened`?`closed`:`opened`})}return M(n,e=>{e&&e!==a.value&&(a.value=e===`minified`||e===`closed`?`closed`:`opened`)}),(e,t)=>{let n=c;return!R(r)||R(i).interface.navbarStayCollapsed?($(),H(n,{key:0,id:`menu-icon`,class:`cui-button relative group p-2 transition-colors duration-100`,severity:`secondary`,text:``,onClick:s},{default:G(()=>[V(`div`,Fa,[V(`div`,Ia,[V(`div`,{class:P([`h-0.5 w-2 transform transition-all duration-100 origin-center`,{"w-4 rotate-45 translate-y-[5px]":R(o)}]),style:{backgroundColor:`var(--text-color)`}},null,2),V(`div`,{class:P([`h-0.5 w-4 rounded transform transition-all duration-100`,{"opacity-0":R(o)}]),style:{backgroundColor:`var(--text-color)`}},null,2),V(`div`,{class:P([`h-0.5 w-3 transform transition-all duration-100 origin-center`,{"w-4 -rotate-45 -translate-y-[5px]":R(o)}]),style:{backgroundColor:`var(--text-color)`}},null,2)])])]),_:1})):q(``,!0)}}}),Ra={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function za(e,t){return $(),U(`svg`,Ra,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M.41 13.41L6 19l1.41-1.42L1.83 12m20.41-6.42L11.66 16.17L7.5 12l-1.43 1.41L11.66 19l12-12M18 7l-1.41-1.42l-6.35 6.35l1.42 1.41z`},null,-1)]])}var Ba=Y({name:`mdi-check-all`,render:za}),Va={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ha(e,t){return $(),U(`svg`,Va,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M22.11 21.46L2.39 1.73L1.11 3l4.72 4.72A7 7 0 0 0 5 11v6l-2 2v1h15.11l2.73 2.73zM7 18v-7c0-.61.11-1.21.34-1.77L16.11 18zm3 3h4a2 2 0 0 1-2 2a2 2 0 0 1-2-2M8.29 5.09c.53-.34 1.11-.59 1.71-.8V4a2 2 0 0 1 2-2a2 2 0 0 1 2 2v.29c2.97.88 5 3.61 5 6.71v4.8l-2-2V11a5 5 0 0 0-5-5c-.78 0-1.55.2-2.24.56z`},null,-1)]])}var Ua=Y({name:`mdi-bell-off-outline`,render:Ha}),Wa={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ga(e,t){return $(),U(`svg`,Wa,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M8.352 20.242A4.63 4.63 0 0 0 12 22a4.63 4.63 0 0 0 3.648-1.758a27.2 27.2 0 0 1-7.296 0M18.75 9v.704c0 .845.24 1.671.692 2.374l1.108 1.723c1.011 1.574.239 3.713-1.52 4.21a25.8 25.8 0 0 1-14.06 0c-1.759-.497-2.531-2.636-1.52-4.21l1.108-1.723a4.4 4.4 0 0 0 .693-2.374V9c0-3.866 3.022-7 6.749-7s6.75 3.134 6.75 7`},null,-1)]])}var Ka=Y({name:`solar-bell-bold`,render:Ga}),qa=100,Ja=kt({notifications:[]}),Ya=null,Xa=null;function Za(){return Xa||(Ya=Tt(!0),Ya.run(()=>{let e=Xe(`/notifications`);Xa=e,e.on(`notification`,e=>{if(e.tag){let t=Ja.notifications.findIndex(t=>t.tag===e.tag);t!==-1&&Ja.notifications.splice(t,1)}Ja.notifications.unshift(e),Ja.notifications.length>qa&&(Ja.notifications.length=qa),Qa(e)}),e.on(`history`,e=>{Ja.notifications=e}),e.onReady(()=>{eo()}),M(()=>Ja.notifications.filter(e=>e.seenAt==null).length,e=>{$a(e)},{immediate:!0})}),Xa)}function Qa(e){let{isElectronApp:t,electron:n}=kn();!t||!n||n.send(`show-notification`,{id:e.id,title:e.title,subtitle:e.subtitle,body:e.body,deepLink:e.deepLink,tag:e.tag,severity:e.severity})}async function $a(e){let{isElectronApp:t,electron:n}=kn();t&&n&&n.send(`set-badge-count`,e)}async function eo(){if(Xa?.ready.value)try{Ja.notifications=await Xa.request(`get-notifications`)}catch{}}function to(){function e(){Za()}function t(){}function n(e){let t=Ja.notifications.findIndex(t=>t.id===e.id);t!==-1&&Ja.notifications.splice(t,1),e.tag&&Xa?.emit(`remove-notification`,e.tag)}function r(){Ja.notifications.splice(0,Ja.notifications.length),Xa?.emit(`clear-notifications`)}function i(){let e=Date.now();for(let t of Ja.notifications)t.seenAt??=e;Xa?.emit(`mark-all-seen`)}function a(e){let t=Ja.notifications.find(t=>t.id===e.id);t&&t.seenAt==null&&(t.seenAt=Date.now()),Xa?.emit(`mark-seen`,e.id)}function o(e){Ja.notifications.find(t=>t.id===e.id)||Ja.notifications.unshift(e)}return{isConnected:J(()=>Xa?.connected.value??!1),notifications:J(()=>Ja.notifications),notificationCount:J(()=>Ja.notifications.length),unreadCount:J(()=>Ja.notifications.filter(e=>e.seenAt==null).length),connect:e,disconnect:t,fetchNotifications:eo,removeNotification:n,clearNotifications:r,markAllSeen:i,markSeen:a,addLocalNotification:o}}function no(){Ya?.stop(),Ya=null,Xa=null,Ja.notifications=[]}var ro={key:0,class:`flex items-center justify-center py-8`},io={key:1,class:`flex flex-col items-center text-center gap-3 py-6 px-2`},ao={class:`text-sm font-semibold text-color`},oo={class:`text-xs text-muted mt-1`},so={class:`flex justify-between items-center mb-4 h-9`},co={class:`flex items-center gap-2`},lo={class:`text-base font-semibold`},uo={class:`flex items-center gap-1`},fo={class:`overflow-y-auto`,style:{maxHeight:`234px`}},po={class:`flex gap-3`},mo={class:`flex-1 min-w-0`},ho={class:`flex justify-between items-center gap-2`},go={class:`flex items-center gap-1.5 shrink-0`},_o={key:0,class:`w-2 h-2 rounded-full bg-primary-500`},vo={class:`text-xs text-muted`},yo={class:`text-xs text-muted mt-1 text-left line-clamp-2 overflow-hidden`},bo={key:0,class:`text-center py-8 text-muted text-sm`},xo=Z({__name:`CuiNotificationMenu`,setup(e){let t=Vt(),n=kr(),{t:r}=le(),{isTouch:i}=_n(),{isElectronApp:a,electron:o}=kn(),s=new zr,l=to(),{data:u,isLoading:d}=s.getSettingsQuery(),p=St(`notificationsMenuRef`),m=W({}),h=J(()=>l.notifications.value),v=J(()=>l.unreadCount.value),y=J(()=>u.value?.enabled??!1),ee=J(()=>!d.value||u.value!==void 0);function x(e,[t]){if(!t.isIntersecting){m.value[e]?.resetFn(),m.value[e]?.stopFn(),delete m.value[e];return}if(m.value[e])return;let n=t.target;if(!n.parentElement)return;let r=me(n,()=>{m.value[e]&&m.value[e].resetFn()}),a,{direction:o,stop:s}=(i.value?He:g)(n,{threshold:10,disableTextSelect:!0,onSwipe(){for(let t in m.value)t!==e&&m.value[t]?.resetFn();o.value===`left`?m.value[e]={left:`-75px`,opacity:1,deleteOpacity:1,isSwiping:!0,resetFn(){this.left=`0`,this.opacity=1,this.deleteOpacity=0},stopFn:()=>{delete m.value[e],s(),r(),clearTimeout(a)}}:m.value[e]?.resetFn()},onSwipeEnd(){clearTimeout(a),a=setTimeout(()=>{m.value[e]&&(m.value[e].isSwiping=!1)},10)}})}function S(e){p.value?.toggle(e)}function C(){l.markAllSeen()}function w(e){l.markSeen(e)}function T(){p.value?.hide(),t.push({path:`/settings/notifications`})}function ne(e){let t=Date.now()-e,n=Math.floor(t/(1e3*60)),i=Math.floor(t/(1e3*60*60)),a=Math.floor(t/(1e3*60*60*24));return n<60?`${n}${r(`components.notification_menu.short_minutes`)}`:i<24?`${i}${r(`components.notification_menu.short_hours`)}`:a<7?`${a}${r(`components.notification_menu.short_days`)}`:a<30?`${Math.floor(a/7)}${r(`components.notification_menu.short_weeks`)}`:a<365?`${Math.floor(a/30)}${r(`components.notification_menu.short_months`)}`:`${Math.floor(a/365)}${r(`components.notification_menu.short_years`)}`}function re(e){let n=e.deepLink;p.value?.hide(),E(e),n&&t.push(n)}function E(e){e&&(m.value[e.id]?.stopFn(),l.removeNotification(e))}function ie(){for(let e in m.value)m.value[e]?.stopFn();l.clearNotifications()}function ae(e){switch(e){case _.Info:return`rgb(33, 150, 243)`;case _.Warn:return`rgb(251, 140, 0)`;case _.Error:case _.Critical:return`rgb(176, 0, 32)`;default:return`rgb(69, 69, 69)`}}function oe(e){if(m.value[e.id]?.isSwiping)return;let t=[e.subtitle,e.body].filter(Boolean).join(`
|
|
3
|
-
`);n.openTextDialog({data:{title:e.title,contentText:t,confirmText:e?.deepLink?r(`components.form.button.go_to_message`):r(`components.form.button.mark_as_read`)},onConfirm:()=>re(e),onCancel:()=>E(e)})}function se(){for(let e in m.value)m.value[e]?.resetFn(),m.value[e]?.stopFn()}function D(){return{id:`electron-update`,title:`Update`,body:`New camera.ui app update available`,severity:_.Info,deepLink:`/settings/system`,tag:`electron-update`,createdAt:Date.now(),seenAt:null,source:{kind:`system`,id:`system.electron.update_available`}}}function O(e,t){a&&t.channel===`update-check`&&t.status===`available`&&l.addLocalNotification(D())}async function ce(){if(a){o.removeListener(`app-status`,O),o.on(`app-status`,O),o.send(`check-for-updates`);try{(await o.invoke(`get-update-available`)).isUpdateAvailable&&l.addLocalNotification(D())}catch{}}}return M(y,e=>{e?l.connect():no()},{immediate:!0}),pt(()=>{a&&ce()}),vt(()=>{o?.removeListener(`app-status`,O)}),(e,t)=>{let n=Ka,r=f,i=c,a=te,o=Ua,s=Ba,l=Rr,u=Lr,d=Hn,g=b,_=In;return $(),U(`div`,null,[Q(i,{severity:`secondary`,text:``,class:`cui-button p-2 text-color`,onClick:S},{icon:G(()=>[Q(n,{class:`w-6 h-6`}),R(y)&&R(v)?($(),H(r,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] right-[10px] top-[7px]`})):q(``,!0)]),_:1}),Q(g,{ref_key:`notificationsMenuRef`,ref:p,"append-to":`self`,class:`w-[20rem] shadow-lg cui-rounded-corner notification-menu isolate overscroll-contain non-draggable-region`,onHide:se},{default:G(()=>[R(ee)?R(y)?($(),U(K,{key:2},[V(`div`,so,[V(`div`,co,[V(`h3`,lo,F(e.$t(`components.notification_menu.notifications`)),1),Q(r,{class:`rounded-full text-xs p-1`,value:R(h).length>99?`99+`:String(R(h).length)},null,8,[`value`])]),V(`div`,uo,[R(v)?Ft(($(),H(i,{key:0,severity:`secondary`,text:``,rounded:``,class:`p-2 cui-icon-md`,onClick:C},{icon:G(()=>[Q(s,{width:`100%`,height:`100%`})]),_:1})),[[_,{value:e.$t(`components.notification_menu.mark_all_read`)},void 0,{left:!0}]]):q(``,!0),R(h).length?Ft(($(),H(i,{key:1,severity:`danger`,text:``,rounded:``,class:`p-2 cui-icon-md`,onClick:ie},{icon:G(()=>[Q(l,{width:`100%`,height:`100%`})]),_:1})),[[_,{value:e.$t(`components.notification_menu.clear_notifications`)},void 0,{left:!0}]]):q(``,!0)])]),V(`div`,fo,[($(!0),U(K,null,B(R(h),t=>($(),U(`div`,{key:t.id,class:`relative overflow-hidden`},[Ft(($(),U(`div`,{class:`relative transition-all duration-200`,style:z({left:R(m)[t.id]?.left||`0`,opacity:R(m)[t.id]?.opacity||1})},[Q(i,{severity:`secondary`,text:``,class:`cui-button p-2 block w-full`,onClick:e=>oe(t)},{default:G(()=>[V(`div`,po,[V(`div`,{class:`w-2 h-2 rounded-full mt-2`,style:z({backgroundColor:ae(t.severity)})},null,4),V(`div`,mo,[V(`div`,ho,[V(`h4`,{class:P([`text-sm truncate max-w-[200px]`,t.seenAt==null?`font-semibold text-color`:`font-medium text-muted`])},F(t.title),3),V(`div`,go,[t.seenAt==null?($(),U(`span`,_o)):q(``,!0),V(`span`,vo,F(ne(t.createdAt)),1)])]),V(`p`,yo,F(t.subtitle||t.body),1)])])]),_:2},1032,[`onClick`])],4)),[[R(Ht),e=>x(t.id,e)]]),V(`div`,{class:`absolute right-0 top-0 h-full flex items-center gap-1 pr-4`,style:z({opacity:R(m)[t.id]?.deleteOpacity||0,pointerEvents:(R(m)[t.id]?.deleteOpacity||0)>0?`auto`:`none`})},[t.seenAt==null?Ft(($(),H(i,{key:0,severity:`secondary`,class:`cui-icon-sm`,text:``,rounded:``,onClick:e=>w(t)},{icon:G(()=>[Q(u,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[_,{value:e.$t(`components.notification_menu.mark_read`)},void 0,{left:!0}]]):q(``,!0),Ft(($(),H(i,{severity:`danger`,class:`cui-icon-sm`,text:``,rounded:``,onClick:e=>E(t)},{icon:G(()=>[Q(l,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[_,{value:e.$t(`components.notification_menu.delete`)},void 0,{left:!0}]])],4),R(h).indexOf(t)===R(h).length-1?q(``,!0):($(),H(d,{key:0,class:`my-0 py-1`}))]))),128))]),R(h).length===0?($(),U(`div`,bo,F(e.$t(`components.notification_menu.no_notifications`)),1)):q(``,!0)],64)):($(),U(`div`,io,[Q(o,{class:`w-8 h-8 text-muted`}),V(`div`,null,[V(`h3`,ao,F(e.$t(`components.notification_menu.disabled`)),1),V(`p`,oo,F(e.$t(`components.notification_menu.disabled_hint`)),1)]),Q(i,{class:`cui-button-small`,label:e.$t(`components.notification_menu.open_settings`),onClick:T},null,8,[`label`])])):($(),U(`div`,ro,[Q(a,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})]))]),_:1},512)])}}}),So={key:0},Co={class:`text-sm font-medium truncate max-w-40 pointer-events-none`},wo=Z({__name:`CuiInstanceSwitcher`,setup(e){let{t}=le(),{smBreakpoint:n}=yn(),r=ur(),i={style:`background: color-mix(in srgb,var(--p-red-500),transparent 84%); color: var(--p-red-400);`},a=St(`menuRef`),o=kt({}),s=null,l=J(()=>{let e=r.activeInstance,n=!r.isHomeActive||r.redirectInfo,a={label:e.name,position:`header`,active:!0},s=r.favoriteInstances.filter(e=>e.id!==r.activeId).map(e=>{let t=o[e.id],n=e.hasCredentials&&t===`checking`,a=e.hasCredentials&&t===`offline`,s,c;return a&&(s=`Offline`,c=i),{label:e.name,badge:s,badgeProps:c,loading:n,disabled:n||a,onClick:()=>r.switchInstance(e.id)}}),c=n?[{label:t(`components.instance_switcher.go_back`),icon:Tn,position:`footer`,onClick:()=>{let e=r.redirectInfo;e?window.location.href=e.sourceUrl:r.switchInstance(null)}}]:[],l={label:t(`components.instance_switcher.manage`),icon:fr,position:`footer`,to:`/instances`};return[a,...s,...c,l]});function u(){s?.abort(),s=new AbortController;let{signal:e}=s,t=r.favoriteInstances.filter(e=>e.id!==r.activeId&&e.hasCredentials);for(let e of t)o[e.id]=`checking`;for(let n of t)r.probeInstance(n.id,e).then(t=>{e.aborted||(o[n.id]=t?`online`:`offline`)}).catch(()=>{e.aborted||(o[n.id]=`offline`)})}return(e,t)=>{let i=Sn,o=c,s=An,d=Gi,f=yr;return R(r).isMultiInstance?($(),U(`div`,So,[R(n)?($(),H(o,{key:0,severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:R(a)?.toggleMenu},{icon:G(()=>[Q(i,{class:`w-6 h-6`})]),_:1},8,[`onClick`])):($(),H(o,{key:1,severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:R(a)?.toggleMenu},{default:G(()=>[Q(i,{class:`w-5 h-5 shrink-0 pointer-events-none`}),V(`span`,Co,F(R(r).activeInstance?.name??`Local`),1),R(a)?.isOpen?R(a)?.isOpen?($(),H(d,{key:1,class:`w-4 h-4 opacity-60 shrink-0 pointer-events-none`})):q(``,!0):($(),H(s,{key:0,class:`w-4 h-4 opacity-60 shrink-0 pointer-events-none`}))]),_:1},8,[`onClick`])),Q(f,{ref_key:`menuRef`,ref:a,items:R(l),popover:{appendTo:`body`,pt:{root:{class:`w-[18rem]`},content:{class:`p-0! rounded-xl! overflow-hidden!`}}},onShow:u,dividers:`sections`},null,8,[`items`])])):q(``,!0)}}}),To={key:0,class:`flex flex-row items-center flex-1 p-2 gap-1`},Eo={class:`flex-1 flex items-center justify-start min-w-0`},Do={key:0,class:`cui-topbar-default font-semibold text-xl truncate`},Oo={class:`flex-1 flex items-center justify-end min-w-0`},ko={class:`cui-topbar-default`},Ao=mn(Z({__name:`CuiTopbar`,props:{offsetLeft:{},animate:{type:Boolean},background:{}},setup(e){let t=e,n=Vt(),{smBreakpoint:r}=yn(),{hasSlot:i,scrollToTop:a}=Ar(),{minifiedTopbar:o}=vn(),{topbarHeight:s}=hn(),{isElectronApp:c}=kn(),{isMultiInstance:l}=Bt(ur()),{offsetLeft:u,animate:d}=Dt(t);return(e,t)=>{let f=wo,p=xo,m=La,h=Pa;return $(),U(`header`,{class:P([`cui-topbar fixed flex flex-row items-center top-0 left-0 right-0 pt-safe pr-safe draggable-region`,{"!border-none":R(r)}]),style:z({height:`calc(${R(s)}px + env(safe-area-inset-top, 0px) + ${R(c)?`30px`:`0px`})`,viewTransitionName:`cui-topbar`,background:R(r)?`var(--ground-background)`:void 0,paddingTop:R(c)?`calc(30px + env(safe-area-inset-top, 0px))`:void 0})},[R(r)&&!R(o)?($(),U(`div`,To,[V(`div`,Eo,[!R(i)(`left`)&&(`hasPermission`in e?e.hasPermission:R(_r))(void 0,`admin`)&&R(n).currentRoute.value.name===`Home`&&R(l)?($(),H(f,{key:0,class:`cui-topbar-default non-draggable-region`})):q(``,!0),t[1]||=V(`div`,{id:`cui-topbar-left`,class:`cui-topbar-slot non-draggable-region`},null,-1)]),V(`div`,{class:`shrink-0 flex items-center justify-center min-w-0 cursor-pointer`,onClick:t[0]||=(...e)=>R(a)&&R(a)(...e)},[t[2]||=V(`div`,{id:`cui-topbar-center`,class:`cui-topbar-slot truncate non-draggable-region`},null,-1),R(i)(`center`)?q(``,!0):($(),U(`span`,Do,F(e.$t(`views.${String(e.$route.name).toLowerCase()}.title`)),1))]),V(`div`,Oo,[t[3]||=V(`div`,{id:`cui-topbar-right`,class:`cui-topbar-slot non-draggable-region`},null,-1),V(`div`,ko,[Q(p,{class:`non-draggable-region`})])])])):R(o)?q(``,!0):($(),U(`div`,{key:1,class:`flex flex-row items-center flex-1 p-2`,style:z({"margin-left":`calc(${R(u)}px + max(8px, env(safe-area-inset-left, 0px)))`,transition:R(d)?`margin-left 200ms`:void 0})},[Q(m,{class:`non-draggable-region`}),(`hasPermission`in e?e.hasPermission:R(_r))(void 0,`admin`)&&R(l)?($(),H(f,{key:0,class:`non-draggable-region`})):q(``,!0),Q(h,{class:`ml-auto non-draggable-region`}),Q(p,{class:`non-draggable-region`})],4))],6)}}}),[[`__scopeId`,`data-v-20013c43`]]),jo={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Mo(e,t){return $(),U(`svg`,jo,[...t[0]||=[V(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M10 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4m-8-2l8-8m0 0v5m0-5h-5`},null,-1)]])}var No=Y({name:`majesticons-open`,render:Mo}),Po={class:`flex flex-col gap-2 w-full`},Fo={for:`sensorDisplayName`,class:`cui-label`},Io=Z({__name:`RenameSensor`,props:{currentDisplayName:{}},setup(e,{expose:t}){let n=W(e.currentDisplayName);return t({onConfirm:async()=>n.value.trim()||null}),(e,t)=>{let r=ke;return $(),U(`div`,Po,[V(`label`,Fo,F(e.$t(`components.camera_options.sensor_display_name`)),1),Q(r,{id:`sensorDisplayName`,modelValue:R(n),"onUpdate:modelValue":t[0]||=e=>Mt(n)?n.value=e:null,class:`w-full`,autofocus:``},null,8,[`modelValue`])])}}}),Lo={class:`p-4 flex flex-col gap-2`},Ro={class:`cui-label`},zo={key:0,class:`flex flex-col gap-2`},Bo={class:`cui-label`},Vo={class:`text-sm text-muted text-center min-h-[30px]`},Ho={class:`cui-label`},Uo={class:`cui-label`},Wo={key:0,class:`w-full flex items-center justify-center my-5`},Go={key:1,class:`text-sm text-muted text-center`},Ko={key:1,class:`flex flex-col gap-2`},qo={class:`cui-label`},Jo={class:`text-sm text-muted text-center min-h-[30px]`},Yo={class:`cui-label`},Xo={class:`cui-label`},Zo={key:0,class:`w-full flex items-center justify-center my-5`},Qo={key:1,class:`text-sm text-muted text-center`},$o={key:2,class:`flex flex-col gap-2`},es={class:`cui-label`},ts={class:`text-sm text-muted text-center min-h-[30px]`},ns={class:`cui-label`},rs={class:`cui-label`},is={class:`cui-label`},as={key:0,class:`w-full flex items-center justify-center my-5`},os={key:1,class:`text-sm text-muted text-center`},ss={class:`cui-label`},cs={key:2,class:`text-sm text-muted text-center min-h-[30px]`},ls={class:`cui-label`},us={key:0,class:`w-full flex items-center justify-center my-5`},ds={key:1,class:`text-sm text-muted text-center`},fs={key:3,class:`flex flex-col gap-2`},ps={class:`cui-label`},ms={class:`text-sm text-muted text-center min-h-[30px]`},hs={class:`cui-label`},gs={class:`cui-label`},_s={class:`cui-label`},vs={key:0,class:`w-full flex items-center justify-center my-5`},ys={key:1,class:`text-sm text-muted text-center`},bs={class:`cui-label`},xs={key:2,class:`text-sm text-muted text-center min-h-[30px]`},Ss={class:`cui-label`},Cs={key:0,class:`w-full flex items-center justify-center my-5`},ws={key:1,class:`text-sm text-muted text-center`},Ts={key:4,class:`flex flex-col gap-2`},Es={class:`cui-label`},Ds={class:`text-sm text-muted text-center min-h-[30px]`},Os={class:`cui-label`},ks={class:`cui-label`},As={class:`cui-label`},js={key:0,class:`w-full flex items-center justify-center my-5`},Ms={key:1,class:`text-sm text-muted text-center`},Ns={class:`cui-label`},Ps={key:2,class:`text-sm text-muted text-center min-h-[30px]`},Fs={class:`cui-label`},Is={key:0,class:`w-full flex items-center justify-center my-5`},Ls={key:1,class:`text-sm text-muted text-center`},Rs={key:5,class:`flex flex-col gap-2`},zs={class:`cui-label`},Bs={key:0,class:`w-full flex items-center justify-center`},Vs={key:1,class:`text-sm text-muted text-center`},Hs={key:1,class:`w-full h-full`},Us={class:`cui-list-item`},Ws=Z({__name:`Plugins`,props:{camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},emits:[`close`],setup(e){let n=Mr(),r=Pr(),i=Fr(),a=new wr,o=new Kr,l=e,u=Je(),d=kr(),{t:f}=le(),{camera:g,cameraDevice:_,loading:v}=Dt(l),{data:y}=o.getPluginsQuery({page:1,pageSize:-1}),{data:b,isBusy:ee,suspense:x}=a.getCameraExtensionsQuery(g.value.name),{data:S,isBusy:C}=o.getPluginsExtensionsQuery({page:1,pageSize:-1}),{mutateAsync:w,isPending:T}=a.enableCameraExtensionQuery(),{mutateAsync:ne,isPending:re}=a.disableCameraExtensionQuery(),{mutateAsync:E,isPending:ie}=a.activateCameraExtensionQuery(),{mutateAsync:ae,isPending:oe}=a.deactivateCameraExtensionQuery(),{sensors:se}=p(_),D=St(`schemaRef`),O=W(`hub`),ce=W([`hub`,`detection`,`core`,`accessories`,`more`]),k=W(``),ue=W(),de=W(),fe=W(),pe=W(),me=W(),he=W(),A=W(),ge=W(),j=W(),_e=W(),ye=J(()=>{if(!A.value)return``;let e=Ee.value.find(e=>e.id===A.value);return e?.pluginId&&ft(e.pluginId)||``}),be=J(()=>A.value&&Ee.value.find(e=>e.id===A.value)?.pluginId||``),xe=J(()=>b.value?.filter(e=>i.some(t=>e.contract.provides.includes(t)))||[]),Se=J(()=>{let e=new Set;for(let t of xe.value)for(let n of i)t.contract.provides.includes(n)&&e.add(n);return Array.from(e).sort((e,t)=>{let n=f(`components.camera_options.sensor_type_${e}`),r=f(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),Ce=J(()=>{let e=he.value;return e?pt(b.value?.filter(t=>t.contract.provides.includes(e))||[]):[]}),we=J(()=>he.value?Nr(he.value):!1),Te=J(()=>{if(!he.value)return[];let e=jr(he.value),t=g.value.assignments[e],n=[];Array.isArray(t)?n=t.map(e=>e.name):t&&typeof t==`object`&&`name`in t&&(n=[t.name]);let r=Ce.value.map(e=>e.pluginName);return n.sort((e,t)=>r.indexOf(e)-r.indexOf(t))}),Ee=J(()=>se.value.filter(e=>e.type===he.value).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))),De=h(_,k),Oe=De.config,ke=De.isLoading,Ae=s(_,A,be),je=Ae.config,Me=Ae.isLoading,Ne=J(()=>ee.value||C.value||T.value||re.value||ie.value||oe.value),Pe=J(()=>Ne.value||v.value||De.isLoading.value||Ae.isLoading.value||Qe.isLoading.value||tt.isLoading.value||it.isLoading.value||st.isLoading.value||lt.isLoading.value),Fe=J(()=>(S.value?.result.filter(e=>ve(e.contract)&&e.pluginName===g.value.pluginInfo?.name)||[])[0]),Ie=J(()=>pt(b.value?.filter(e=>m(e.contract))||[])),Le=J(()=>Fe.value&&I(Fe.value.pluginName)?[Fe.value]:[]),Re=J(()=>b.value?.filter(e=>n.some(t=>e.contract.provides.includes(t)))||[]),ze=J(()=>{let e=new Set;for(let t of Re.value)for(let r of n)t.contract.provides.includes(r)&&e.add(r);return Array.from(e).sort((e,t)=>{let n=f(`components.camera_options.sensor_type_${e}`),r=f(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),Be=J(()=>{let e=de.value;return e?pt(b.value?.filter(t=>t.contract.provides.includes(e))||[]):[]}),Ve=J(()=>se.value.filter(e=>e.type===de.value).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))),He=J(()=>{if(!ge.value)return``;let e=Ve.value.find(e=>e.id===ge.value);return e?.pluginId&&ft(e.pluginId)||``}),Ue=J(()=>ge.value&&Ve.value.find(e=>e.id===ge.value)?.pluginId||``),We=J(()=>b.value?.filter(e=>r.some(t=>e.contract.provides.includes(t)))||[]),Ge=J(()=>{let e=new Set;for(let t of We.value)for(let n of r)t.contract.provides.includes(n)&&e.add(n);return Array.from(e).sort((e,t)=>{let n=f(`components.camera_options.sensor_type_${e}`),r=f(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),Ke=J(()=>{let e=pe.value;return e?pt(b.value?.filter(t=>t.contract.provides.includes(e))||[]):[]}),qe=J(()=>se.value.filter(e=>e.type===pe.value).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))),Ye=J(()=>{if(!j.value)return``;let e=qe.value.find(e=>e.id===j.value);return e?.pluginId&&ft(e.pluginId)||``}),Xe=J(()=>j.value&&qe.value.find(e=>e.id===j.value)?.pluginId||``),Qe=h(_,J(()=>fe.value??``)),$e=Qe.config,et=Qe.isLoading,tt=s(_,ge,Ue),nt=tt.config,rt=tt.isLoading,it=h(_,J(()=>me.value??``)),at=it.config,ot=it.isLoading,st=s(_,j,Xe),ct=st.config,N=st.isLoading,lt=h(_,J(()=>_e.value??``)),P=lt.config,ut=lt.isLoading,dt=J(()=>{let e=y.value?.result||[];return(S.value?.result||[]).filter(n=>{let r=e.find(e=>e.pluginName===n.pluginName),i=n.contract.provides.length>0,a=n.contract.consumes.length>0;return g.value.pluginInfo?.name===n.pluginName||ve(n.contract)&&!t(n.contract)?!1:r&&(i||a||m(n.contract))})});function ft(e){return g.value.plugins.find(t=>t.id===e)?.name}function I(e){let t=typeof e==`string`?e:e?.name;if(t&&y.value&&y.value.result.some(e=>e.pluginName===t&&!e.disabled))return t}function pt(e){return e.sort((e,t)=>!I(e.pluginName)&&I(t.pluginName)?1:I(e.pluginName)&&!I(t.pluginName)?-1:e.displayName.localeCompare(t.displayName))}function ht(e){let t=jr(e),n=g.value.assignments[t];return Array.isArray(n)?void 0:n}function gt(e){let t=jr(e),n=g.value.assignments[t];return Array.isArray(n)?void 0:n}async function _t(e){if(e!==void 0)k.value=e;else switch(O.value){case`cameraController`:k.value=I(Fe.value?.pluginName)||``;break;case`hub`:k.value=I(Ie.value[0]?.pluginName)||``;break;case`detection`:{let e=I(de.value?ht(de.value):void 0);k.value=e||``,fe.value=e||void 0;break}case`core`:{let e=I(pe.value?gt(pe.value):void 0);k.value=e||``,me.value=e||void 0;break}case`accessories`:k.value=``;break;default:k.value=``;break}k.value&&O.value!==`accessories`&&I(k.value)&&await De.getConfig()}function L(){switch(O.value){case`cameraController`:Le.value.length&&!k.value&&(k.value=Le.value[0].pluginName);break;case`hub`:Ie.value.length&&(ue.value=Ie.value.find(e=>I(e.pluginName))?.pluginName);break;case`detection`:{ze.value.length&&(!de.value||!ze.value.includes(de.value))&&(de.value=ze.value[0]);let e=de.value?ht(de.value):void 0;e&&I(e.name)?fe.value=e.name:fe.value=void 0,At(()=>{Ve.value.length&&!ge.value&&(ge.value=Ve.value[0].id)});break}case`core`:{Ge.value.length&&(!pe.value||!Ge.value.includes(pe.value))&&(pe.value=Ge.value[0]);let e=pe.value?gt(pe.value):void 0;e&&I(e.name)?me.value=e.name:me.value=void 0,At(()=>{qe.value.length&&!j.value&&(j.value=qe.value[0].id)});break}case`accessories`:Se.value.length&&(!he.value||!Se.value.includes(he.value))&&(he.value=Se.value[0]),At(()=>{Te.value.length&&!_e.value&&(_e.value=Te.value[0])}),At(()=>{Ee.value.length&&!A.value&&(A.value=Ee.value[0].id)});break}}async function vt(e){b.value&&(b.value.some(t=>t.pluginName===e.pluginName)?(await ae({cameraname:g.value.name,pluginname:e.pluginName}),D.value?.reset()):await E({cameraname:g.value.name,pluginname:e.pluginName}))}async function z(e){if(!he.value)return;let t=Te.value;if(we.value){let n=e,r=t[0];if(n===r)return;r&&(await ne({cameraname:g.value.name,pluginname:r,type:he.value}),A.value=void 0),n?(await w({cameraname:g.value.name,pluginname:n,type:he.value}),_e.value=n):_e.value=void 0;return}let n=e||[],r=n.filter(e=>!t.includes(e)),i=t.filter(e=>!n.includes(e));for(let e of r)await w({cameraname:g.value.name,pluginname:e,type:he.value});for(let e of i){if(await ne({cameraname:g.value.name,pluginname:e,type:he.value}),A.value){let t=Ee.value.find(e=>e.id===A.value);t&&ft(t.pluginId||``)===e&&(A.value=void 0)}_e.value===e&&(_e.value=void 0)}r.length&&!_e.value?_e.value=r[0]:n.length&&!_e.value&&(_e.value=n[0])}async function yt(e,t){try{await De.setValue(e.key,void 0),u.add({severity:`success`,detail:f(`components.toast.config_updated`),life:3e3})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function bt(e,t){try{let n=await De.submitValue(e.key,e.payload);if(n?.toast){let e=Ze(n.toast.type);u.add({severity:e,detail:n.toast.message,life:3e3})}n?.schema&&n.schema.length&&d.openComponentDialog(qr,{data:{title:f(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:n.schema,config:e.payload},pluginName:t,cameraName:g.value.name,buttonKey:e.key}}})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function xt(e,t){try{await De.setConfig(t),u.add({severity:`success`,detail:f(`components.toast.config_updated`),life:3e3})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Ct(e){if(!(!Ue.value||!ge.value))try{await tt.setValue(e.key,void 0),u.add({severity:`success`,detail:f(`components.toast.config_updated`),life:3e3})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Tt(e){if(!(!Ue.value||!ge.value))try{let t=await tt.submitValue(e.key,e.payload);if(t?.toast){let e=Ze(t.toast.type);u.add({severity:e,detail:t.toast.message,life:3e3})}}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Et(e){if(!(!Ue.value||!ge.value))try{await tt.setConfig(e),u.add({severity:`success`,detail:f(`components.toast.config_updated`),life:3e3})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Ot(e){if(!(!Xe.value||!j.value))try{await st.setValue(e.key,void 0),u.add({severity:`success`,detail:f(`components.toast.config_updated`),life:3e3})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function kt(e){if(!(!Xe.value||!j.value))try{let t=await st.submitValue(e.key,e.payload);if(t?.toast){let e=Ze(t.toast.type);u.add({severity:e,detail:t.toast.message,life:3e3})}}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function jt(e){if(!(!Xe.value||!j.value))try{await st.setConfig(e),u.add({severity:`success`,detail:f(`components.toast.config_updated`),life:3e3})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Nt(e){if(!(!be.value||!A.value))try{await Ae.setValue(e.key,void 0),u.add({severity:`success`,detail:f(`components.toast.config_updated`),life:3e3})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Pt(e){if(!(!be.value||!A.value))try{let t=await Ae.submitValue(e.key,e.payload);if(t?.toast){let e=Ze(t.toast.type);u.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&d.openComponentDialog(qr,{data:{title:f(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:ye.value,cameraName:g.value.name,buttonKey:e.key,sensorId:A.value,pluginId:be.value}}})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function It(e){if(!(!be.value||!A.value))try{await Ae.setConfig(e),u.add({severity:`success`,detail:f(`components.toast.config_updated`),life:3e3})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Y(e){fe.value&&await Qe.setValue(e.key,void 0)}async function Lt(e){if(fe.value)try{let t=await Qe.submitValue(e.key,e.payload);if(t?.toast){let e=Ze(t.toast.type);u.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&d.openComponentDialog(qr,{data:{title:f(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:fe.value,cameraName:g.value.name,buttonKey:e.key}}})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Z(e){fe.value&&await Qe.setConfig(e)}async function Rt(e){me.value&&await it.setValue(e.key,void 0)}async function zt(e){if(me.value)try{let t=await it.submitValue(e.key,e.payload);if(t?.toast){let e=Ze(t.toast.type);u.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&d.openComponentDialog(qr,{data:{title:f(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:me.value,cameraName:g.value.name,buttonKey:e.key}}})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Bt(e){me.value&&await it.setConfig(e)}async function Vt(e){_e.value&&await lt.setValue(e.key,void 0)}async function Ht(e){if(_e.value)try{let t=await lt.submitValue(e.key,e.payload);if(t?.toast){let e=Ze(t.toast.type);u.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&d.openComponentDialog(qr,{data:{title:f(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:_e.value,cameraName:g.value.name,buttonKey:e.key}}})}catch(e){u.add({severity:`error`,detail:e,life:3e3})}}async function Ut(e){_e.value&&await lt.setConfig(e)}function Wt(e){e&&d.openComponentDialog(Io,{data:{title:f(`components.camera_options.sensor_display_name`),confirmText:f(`components.form.button.save`),contentProps:{currentDisplayName:e.displayName.value}},onConfirm:async t=>{t&&t!==e.displayName.value&&await e.setDisplayName(t)}})}return M(O,()=>{At(()=>{L(),_t()})},{immediate:!0}),M([Ie,y],async([e,t])=>{if(O.value===`hub`&&e.length&&t?.result&&!ue.value){let t=e.find(e=>I(e.pluginName));t&&(ue.value=t.pluginName,k.value=t.pluginName,await De.getConfig())}},{immediate:!0}),M([Le,()=>O.value],async([e,t])=>{t===`cameraController`&&e.length&&!k.value&&(k.value=e[0].pluginName,await De.getConfig())},{immediate:!0}),M(()=>k.value,async(e,t)=>{O.value===`cameraController`&&e&&e!==t&&await De.getConfig()}),M(ue,async(e,t)=>{e&&e!==t&&I(e)&&(k.value=e,await De.getConfig())}),M(de,()=>{if(ge.value=void 0,de.value){let e=ht(de.value);e&&I(e.name)?fe.value=e.name:fe.value=void 0}else fe.value=void 0;_t(),At(()=>{Ve.value.length&&(ge.value=Ve.value[0].id)})}),M(fe,async(e,t)=>{if(e!==t&&de.value){let n=ht(de.value);!e&&t?(await ne({cameraname:g.value.name,pluginname:t,type:de.value}),D.value?.reset(),ge.value=void 0):e&&(n?.name!==e&&await w({cameraname:g.value.name,pluginname:e,type:de.value}),await Qe.getConfig()),At(()=>_t(e)),At(()=>{Ve.value.length&&(ge.value=Ve.value[0].id)})}}),M(pe,()=>{if(j.value=void 0,pe.value){let e=gt(pe.value);e&&I(e.name)?me.value=e.name:me.value=void 0}else me.value=void 0;_t(),At(()=>{qe.value.length&&(j.value=qe.value[0].id)})}),M(me,async(e,t)=>{if(e!==t&&pe.value){let n=gt(pe.value);!e&&t?(await ne({cameraname:g.value.name,pluginname:t,type:pe.value}),D.value?.reset(),j.value=void 0):e&&(n?.name!==e&&await w({cameraname:g.value.name,pluginname:e,type:pe.value}),await it.getConfig()),At(()=>_t(e)),At(()=>{qe.value.length&&(j.value=qe.value[0].id)})}}),M([ge,Ue],async([e,t])=>{e&&t&&await tt.getConfig()}),M([j,Xe],async([e,t])=>{e&&t&&await st.getConfig()}),M(he,()=>{A.value=void 0,Te.value.length?_e.value=Te.value[0]:_e.value=void 0,Ee.value.length&&(A.value=Ee.value[0].id)}),M(_e,async e=>{e&&await lt.getConfig()}),M(A,async e=>{e&&be.value&&await Ae.getConfig()}),M(Le,e=>{let t=ce.value.indexOf(`cameraController`)!==-1;e.length&&!t?(ce.value.unshift(`cameraController`),(!O.value||O.value===`hub`)&&(O.value=`cameraController`,e.length&&!k.value&&(k.value=e[0].pluginName))):!e.length&&t&&(ce.value=ce.value.filter(e=>e!==`cameraController`),O.value===`cameraController`&&(O.value=`hub`))},{immediate:!0}),mt(async()=>{await x(),L(),_t()}),(e,t)=>{let n=Ur,r=Hr,i=Hn,a=te,o=Br,s=c,l=Ln,u=vr,d=No,f=In;return $(),U(`div`,Lo,[V(`span`,Ro,F(e.$t(`components.camera_options.categories`)),1),Q(r,{modelValue:R(O),"onUpdate:modelValue":[t[0]||=e=>Mt(O)?O.value=e:null,t[1]||=e=>_t()],disabled:R(Ne),mandatory:``},{default:G(()=>[($(!0),U(K,null,B(R(ce),t=>($(),H(n,{key:t,size:`small`,disabled:R(Pe),value:t},{default:G(()=>[X(F(e.$t(`components.camera_options.chip_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),Q(i,{class:`m-0 py-3`}),R(O)===`cameraController`?($(),U(`div`,zo,[R(Le).length?($(),U(K,{key:1},[V(`span`,Ho,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(r,{modelValue:R(k),"onUpdate:modelValue":t[2]||=e=>Mt(k)?k.value=e:null,disabled:R(Ne),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Le),e=>($(),H(n,{key:e.pluginName,size:`small`,disabled:!I(e.pluginName)||R(Pe),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),Q(i,{class:`m-0 py-3`}),V(`span`,Uo,F(e.$t(`components.camera_options.plugin_settings`)),1),!R(k)||!R(Oe)?.schema?.length?($(),U(`div`,Wo,[R(ke)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,Go,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(Gr,{ref_key:`schemaRef`,ref:D,key:R(k),"schema-form":{schema:R(Oe).schema,config:R(Oe).config},loading:R(Pe),onOnFormSubmit:t[3]||=e=>xt(R(k),e),onOnSubmit:t[4]||=e=>bt(e,R(k)),onOnAction:t[5]||=e=>yt(e,R(k))},null,8,[`schema-form`,`loading`]))],64)):($(),U(K,{key:0},[V(`span`,Bo,F(e.$t(`components.camera_options.chip_plugins`)),1),V(`span`,Vo,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(O)===`hub`?($(),U(`div`,Ko,[R(Ie).length?($(),U(K,{key:1},[V(`span`,Yo,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(r,{modelValue:R(ue),"onUpdate:modelValue":t[6]||=e=>Mt(ue)?ue.value=e:null,disabled:R(Ne),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Ie),e=>($(),H(n,{key:e.pluginName,size:`small`,disabled:!I(e.pluginName)||R(Pe),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),Q(i,{class:`m-0 py-3`}),V(`span`,Xo,F(e.$t(`components.camera_options.plugin_settings`)),1),!R(k)||!R(Oe)?.schema?.length?($(),U(`div`,Zo,[R(ke)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,Qo,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(Gr,{ref_key:`schemaRef`,ref:D,key:R(k),"schema-form":{schema:R(Oe).schema,config:R(Oe).config},loading:R(Pe),onOnFormSubmit:t[7]||=e=>xt(R(k),e),onOnSubmit:t[8]||=e=>bt(e,R(k)),onOnAction:t[9]||=e=>yt(e,R(k))},null,8,[`schema-form`,`loading`]))],64)):($(),U(K,{key:0},[V(`span`,qo,F(e.$t(`components.camera_options.chip_plugins`)),1),V(`span`,Jo,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(O)===`detection`?($(),U(`div`,$o,[R(ze).length?($(),U(K,{key:1},[V(`span`,ns,F(e.$t(`components.camera_options.sensor_types`)),1),Q(r,{modelValue:R(de),"onUpdate:modelValue":t[10]||=e=>Mt(de)?de.value=e:null,disabled:R(Ne),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(ze),t=>($(),H(n,{key:t,size:`small`,disabled:R(Pe),value:t},{default:G(()=>[X(F(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(Be).length?($(),U(K,{key:0},[Q(i,{class:`m-0 py-3`}),V(`span`,rs,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(r,{modelValue:R(fe),"onUpdate:modelValue":t[11]||=e=>Mt(fe)?fe.value=e:null,disabled:R(Ne),class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Be),e=>($(),H(n,{key:e.pluginName,size:`small`,filter:``,disabled:!I(e.pluginName)||R(Pe),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(fe)&&R(fe)!==R(g).pluginInfo?.name?($(),U(K,{key:0},[Q(i,{class:`m-0 py-3`}),V(`span`,is,F(e.$t(`components.camera_options.plugin_settings`)),1),R($e)?.schema?.length?($(),H(Gr,{key:`detection-plugin-${R(fe)}`,"schema-form":{schema:R($e).schema,config:R($e).config},loading:R(Pe),onOnFormSubmit:t[12]||=e=>Z(e),onOnSubmit:t[13]||=e=>Lt(e),onOnAction:t[14]||=e=>Y(e)},null,8,[`schema-form`,`loading`])):($(),U(`div`,as,[R(et)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,os,F(e.$t(`components.camera_options.no_config`)),1))]))],64)):q(``,!0),Q(i,{class:`m-0 py-3`}),V(`span`,ss,F(e.$t(`components.camera_options.sensors`)),1),R(Ve).length?($(),H(r,{key:1,modelValue:R(ge),"onUpdate:modelValue":t[15]||=e=>Mt(ge)?ge.value=e:null,disabled:R(Ne),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Ve),e=>($(),H(n,{key:e.id,size:`small`,disabled:R(Pe),value:e.id},{append:G(()=>[Q(s,{text:R(A)!==e.id,rounded:``,severity:R(A)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:wt(t=>Wt(e),[`stop`])},{icon:G(()=>[Q(o,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:G(()=>[X(F(e.displayName.value)+` `,1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`])):($(),U(`span`,cs,F(e.$t(`components.camera_options.no_sensors`)),1)),R(ge)?($(),U(K,{key:3},[Q(i,{class:`m-0 py-3`}),V(`span`,ls,F(e.$t(`components.camera_options.sensor_settings`)),1),!R(He)||!R(nt)?.schema?.length?($(),U(`div`,us,[R(rt)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,ds,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(Gr,{key:`sensor-${R(ge)}`,"schema-form":{schema:R(nt).schema,config:R(nt).config},loading:R(Pe),onOnFormSubmit:t[16]||=e=>Et(e),onOnSubmit:t[17]||=e=>Tt(e),onOnAction:t[18]||=e=>Ct(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):q(``,!0)],64)):($(),U(K,{key:0},[V(`span`,es,F(e.$t(`components.camera_options.sensor_types`)),1),V(`span`,ts,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(O)===`core`?($(),U(`div`,fs,[R(Ge).length?($(),U(K,{key:1},[V(`span`,hs,F(e.$t(`components.camera_options.sensor_types`)),1),Q(r,{modelValue:R(pe),"onUpdate:modelValue":t[19]||=e=>Mt(pe)?pe.value=e:null,disabled:R(Ne),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Ge),t=>($(),H(n,{key:t,size:`small`,disabled:R(Pe),value:t},{default:G(()=>[X(F(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(Ke).length?($(),U(K,{key:0},[Q(i,{class:`m-0 py-3`}),V(`span`,gs,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(r,{modelValue:R(me),"onUpdate:modelValue":t[20]||=e=>Mt(me)?me.value=e:null,disabled:R(Ne),class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Ke),e=>($(),H(n,{key:e.pluginName,size:`small`,filter:``,disabled:!I(e.pluginName)||R(Pe),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(me)&&R(me)!==R(g).pluginInfo?.name?($(),U(K,{key:0},[Q(i,{class:`m-0 py-3`}),V(`span`,_s,F(e.$t(`components.camera_options.plugin_settings`)),1),R(at)?.schema?.length?($(),H(Gr,{key:`core-plugin-${R(me)}`,"schema-form":{schema:R(at).schema,config:R(at).config},loading:R(Pe),onOnFormSubmit:t[21]||=e=>Bt(e),onOnSubmit:t[22]||=e=>zt(e),onOnAction:t[23]||=e=>Rt(e)},null,8,[`schema-form`,`loading`])):($(),U(`div`,vs,[R(ot)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,ys,F(e.$t(`components.camera_options.no_config`)),1))]))],64)):q(``,!0),Q(i,{class:`m-0 py-3`}),V(`span`,bs,F(e.$t(`components.camera_options.sensors`)),1),R(qe).length?($(),H(r,{key:1,modelValue:R(j),"onUpdate:modelValue":t[24]||=e=>Mt(j)?j.value=e:null,disabled:R(Ne),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(qe),e=>($(),H(n,{key:e.id,size:`small`,disabled:R(Pe),value:e.id},{append:G(()=>[Q(s,{text:R(A)!==e.id,rounded:``,severity:R(A)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:wt(t=>Wt(e),[`stop`])},{icon:G(()=>[Q(o,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:G(()=>[X(F(e.displayName.value)+` `,1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`])):($(),U(`span`,xs,F(e.$t(`components.camera_options.no_sensors`)),1)),R(j)?($(),U(K,{key:3},[Q(i,{class:`m-0 py-3`}),V(`span`,Ss,F(e.$t(`components.camera_options.sensor_settings`)),1),!R(Ye)||!R(ct)?.schema?.length?($(),U(`div`,Cs,[R(N)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,ws,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(Gr,{key:`sensor-${R(j)}`,"schema-form":{schema:R(ct).schema,config:R(ct).config},loading:R(Pe),onOnFormSubmit:t[25]||=e=>jt(e),onOnSubmit:t[26]||=e=>kt(e),onOnAction:t[27]||=e=>Ot(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):q(``,!0)],64)):($(),U(K,{key:0},[V(`span`,ps,F(e.$t(`components.camera_options.sensor_types`)),1),V(`span`,ms,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(O)===`accessories`?($(),U(`div`,Ts,[R(Se).length?($(),U(K,{key:1},[V(`span`,Os,F(e.$t(`components.camera_options.sensor_types`)),1),Q(r,{modelValue:R(he),"onUpdate:modelValue":t[28]||=e=>Mt(he)?he.value=e:null,disabled:R(Ne),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Se),t=>($(),H(n,{key:t,size:`small`,disabled:R(Pe),value:t},{default:G(()=>[X(F(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(Ce).length?($(),U(K,{key:0},[Q(i,{class:`m-0 py-3`}),V(`span`,ks,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(r,{"model-value":R(we)?R(Te)[0]:R(Te),disabled:R(Ne),multiple:!R(we),class:`min-h-[30px]`,"onUpdate:modelValue":z},{default:G(()=>[($(!0),U(K,null,B(R(Ce),e=>($(),H(n,{key:e.pluginName,size:`small`,filter:``,disabled:!I(e.pluginName)||R(Pe),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`model-value`,`disabled`,`multiple`]),R(_e)&&R(_e)!==R(g).pluginInfo?.name?($(),U(K,{key:0},[Q(i,{class:`m-0 py-3`}),V(`span`,As,F(e.$t(`components.camera_options.plugin_settings`)),1),R(P)?.schema?.length?($(),H(Gr,{key:`accessory-plugin-${R(_e)}`,"schema-form":{schema:R(P).schema,config:R(P).config},loading:R(Pe),onOnFormSubmit:t[29]||=e=>Ut(e),onOnSubmit:t[30]||=e=>Ht(e),onOnAction:t[31]||=e=>Vt(e)},null,8,[`schema-form`,`loading`])):($(),U(`div`,js,[R(ut)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,Ms,F(e.$t(`components.camera_options.no_config`)),1))]))],64)):q(``,!0)],64)):q(``,!0),Q(i,{class:`m-0 py-3`}),V(`span`,Ns,F(e.$t(`components.camera_options.sensors`)),1),R(Ee).length?($(),H(r,{key:1,modelValue:R(A),"onUpdate:modelValue":t[32]||=e=>Mt(A)?A.value=e:null,disabled:R(Ne),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Ee),e=>($(),H(n,{key:e.id,size:`small`,disabled:R(Pe),value:e.id},{append:G(()=>[Q(s,{text:R(A)!==e.id,rounded:``,severity:R(A)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:wt(t=>Wt(e),[`stop`])},{icon:G(()=>[Q(o,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:G(()=>[X(F(e.displayName.value)+` `,1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`])):($(),U(`span`,Ps,F(e.$t(`components.camera_options.no_sensors`)),1)),R(A)?($(),U(K,{key:3},[Q(i,{class:`m-0 py-3`}),V(`span`,Fs,F(e.$t(`components.camera_options.sensor_settings`)),1),!R(ye)||!R(je)?.schema?.length?($(),U(`div`,Is,[R(Me)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,Ls,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(Gr,{key:`sensor-${R(A)}`,"schema-form":{schema:R(je).schema,config:R(je).config},loading:R(Pe),onOnFormSubmit:t[33]||=e=>It(e),onOnSubmit:t[34]||=e=>Pt(e),onOnAction:t[35]||=e=>Nt(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):($(),U(K,{key:0},[V(`span`,Es,F(e.$t(`components.camera_options.sensor_types`)),1),V(`span`,Ds,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(O)===`more`?($(),U(`div`,Rs,[V(`span`,zs,F(e.$t(`components.camera_options.manage_plugins`)),1),R(C)||!R(dt).length?($(),U(`div`,Bs,[R(C)?($(),H(a,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,Vs,F(e.$t(`components.camera_options.no_plugins_found`)),1))])):($(),U(`div`,Hs,[($(!0),U(K,null,B(R(dt),t=>Ft(($(),U(`div`,{key:t.pluginName,class:`cui-list-item`},[Q(u,{disabled:R(Ne)||!I(t.pluginName),class:`h-14`,onClick:n=>e.$router.push(`/plugins/${t.pluginName}`)},{append:G(()=>[Q(l,{"model-value":R(b)?.some(e=>e.pluginName===t.pluginName),disabled:R(Ne)||!I(t.pluginName),"onUpdate:modelValue":e=>vt(t)},null,8,[`model-value`,`disabled`,`onUpdate:modelValue`])]),default:G(()=>[V(`span`,null,F(t.displayName),1)]),_:2},1032,[`disabled`,`onClick`])])),[[f,{value:I(t.pluginName)===void 0?e.$t(`components.form.tooltip.disabled`):``},void 0,{top:!0}]])),128))])),V(`div`,Us,[Q(u,{class:`h-14`,onClick:t[36]||=t=>e.$router.push(`/plugins`)},{append:G(()=>[Q(s,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-md`},{icon:G(()=>[Q(d,{width:`100%`,height:`100%`})]),_:1})]),default:G(()=>[V(`span`,null,F(e.$t(`components.camera_options.more_plugins`)),1)]),_:1})])])):q(``,!0)])}}}),Gs={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ks(e,t){return $(),U(`svg`,Gs,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m0 16H5V5h14zm-2-2H7V7h10z`},null,-1)]])}var qs=Y({name:`mdi-checkbox-intermediate`,render:Ks}),Js={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ys(e,t){return $(),U(`svg`,Js,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M3.14 1A2.14 2.14 0 0 0 1 3.14V5h2V3h2V1zM7 1v2h3V1zm5 0v2h2v2h2V3.14C16 1.96 15.04 1 13.86 1zM1 7v3h2V7zm8 0c-1.11 0-2 .89-2 2v7h6.86A2.14 2.14 0 0 0 16 13.86V7zm9 0v2h2v2h2V9c0-1.11-.89-2-2-2zM9 9h5v5H9zm-8 3v1.86C1 15.04 1.96 16 3.14 16H5v-2H3v-2zm19 1v3h2v-3zM7 18v2c0 1.11.89 2 2 2h2v-2H9v-2zm13 0v2h-2v2h2c1.11 0 2-.89 2-2v-2zm-7 2v2h3v-2z`},null,-1)]])}var Xs=Y({name:`mdi-vector-intersection`,render:Ys}),Zs={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Qs(e,t){return $(),U(`svg`,Zs,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M4 6v13h16V6zm14 11H6V8h12z`},null,-1)]])}var $s=Y({name:`mdi-rectangle-outline`,render:Qs}),ec={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function tc(e,t){return $(),U(`svg`,ec,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M4 6v13h16V6z`},null,-1)]])}var nc=Y({name:`mdi-rectangle`,render:tc}),rc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ic(e,t){return $(),U(`svg`,rc,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M20.84 22.73L18.11 20H17c-1.1 0-2-.9-2-2v-1.11l-2.34-2.34l-.85.49c-.95.55-2.18.22-2.73-.73l-1.5-2.6c-.4-.71-.33-1.53.1-2.14L1.11 3l1.28-1.27l19.72 19.73zM18.5 13c0-.57-.2-1.1-.53-1.5l1.97-1.15c1.01-.59 1.36-1.88.77-2.89l-1.38-2.4a2.125 2.125 0 0 0-2.89-.78l-5.67 3.29l7.09 7.09c.4-.44.64-1.02.64-1.66M2 12.62l3.5 6.06l2.53-3.18l-2-3.47z`},null,-1)]])}var ac=Y({name:`mdi-cctv-off`,render:ic}),oc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function sc(e,t){return $(),U(`svg`,oc,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M12 2c5.5 0 10 4.5 10 10s-4.5 10-10 10S2 17.5 2 12S6.5 2 12 2m0 2c-1.9 0-3.6.6-4.9 1.7l11.2 11.2c1-1.4 1.7-3.1 1.7-4.9c0-4.4-3.6-8-8-8m4.9 14.3L5.7 7.1C4.6 8.4 4 10.1 4 12c0 4.4 3.6 8 8 8c1.9 0 3.6-.6 4.9-1.7`},null,-1)]])}var cc=Y({name:`mdi-cancel`,render:sc}),lc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function uc(e,t){return $(),U(`svg`,lc,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88c3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8`},null,-1)]])}var dc=Y({name:`mdi-undo`,render:uc}),fc=e(Sr(),1),pc=[`audio`],mc=[`audio`,`motion`],hc={ref:`container`,class:`w-full h-full relative min-w-0`},gc={class:`flex flex-col justify-center items-center`},_c={class:`relative w-full`},vc={class:`relative w-full flex flex-col items-center justify-center`},yc={class:`absolute top-0 left-0 right-0 bottom-0`},bc={class:`sandbox w-full h-full`},xc={class:`handles`},Sc=[`data-id`,`data-point`,`data-point-index`,`data-zone-index`,`onDblclick`],Cc={class:`clipboard`},wc={width:`100%`,height:`100%`,class:`polygon-container`},Tc=[`d`,`onClick`,`onDblclick`,`onMousedown`,`onTouchstart`],Ec=[`id`],Dc=[`fill`],Oc=[`id`],kc=[`fill`],Ac=[`x1`,`y1`,`x2`,`y2`,`stroke`],jc=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-opacity`,`marker-end`,`marker-start`,`onClick`],Mc=[`x`,`y`,`fill`],Nc=[`x`,`y`],Pc=[`x`,`y`,`fill`],Fc=[`x`,`y`],Ic=[`cx`,`cy`,`fill`,`stroke`,`onMousedown`,`onTouchstart`],Lc=[`cx`,`cy`,`fill`,`stroke`,`onMousedown`,`onTouchstart`],Rc={class:`w-full h-full flex flex-col items-center justify-center min-w-0`,style:{width:`calc(100% - 20px)`,"margin-top":`10px`,"margin-bottom":`10px`}},zc={class:`flex flex-col field-gap w-full`},Bc=[`for`],Vc={key:0,class:`cui-input-error`},Hc={class:`flex flex-col field-gap w-full`},Uc=[`for`],Wc={class:`flex flex-col field-gap w-full`},Gc=[`for`],Kc={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner mt-auto`},qc={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner`},Jc={class:`flex flex-col field-gap w-full`},Yc=[`for`],Xc={key:0,class:`cui-input-error`},Zc={class:`flex flex-col field-gap w-full`},Qc=[`for`],$c={class:`flex flex-col field-gap w-full`},el=[`for`],tl={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner mt-auto`},nl={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner`},rl=mn(Z({__name:`ZoneEditor`,props:{cameraName:{},zones:{},lines:{}},setup(e,{expose:t}){let n=new wr,r=e,i=Je(),{t:a}=le(),o=ut(`dialogRefProps`),{mutateAsync:s,isPending:l}=n.patchZonesQuery(),{mutateAsync:u,isPending:d}=n.patchLinesQuery(),{cameraName:f,zones:p}=Dt(r),m=St(`cameraCardRef`),h=St(`container`),g=St(`draggablesRef`),_=St(`outsideRef`),v=St(`playgroundContainerRef`),y=W(`zones`),b=Ct([]),x=W([]),S=W([]),C=W(!1),te=W([]),w=W(void 0),T=W(-1),re=W(-1),E=W(-1),ie={x:0,y:0},ae=!1,se=null,D=ee(h),O=ee(v),ce=Qr.element.shape.name,k=$r.element.shape.name,ue=J(()=>{if(T.value<0)return``;let e=x.value[T.value];if(!e||e.isPrivacyMask)return``;let t=ce.safeParse(e.name);return t.success?``:t.error.issues[0]?.message??``}),de=J(()=>{if(E.value<0)return``;let e=S.value[E.value];if(!e)return``;let t=k.safeParse(e.name);return t.success?``:t.error.issues[0]?.message??``}),fe=J(()=>Math.max(0,O.width.value-20)),pe=J(()=>Math.max(0,O.height.value-20)),he=J(()=>[{label:a(`components.zone_editor.tab_zones`),value:`zones`},{label:a(`components.zone_editor.tab_lines`),value:`lines`}]),A=J(()=>{let e=oe.filter(e=>!pc.includes(e));return e.length===0?[]:[{label:a(`components.zone_editor.base_labels`),items:e.map(e=>({label:e,value:e}))}]}),ge=J(()=>{let e=oe.filter(e=>!mc.includes(e));return e.length===0?[]:[{label:a(`components.zone_editor.base_labels`),items:e.map(e=>({label:e,value:e}))}]}),j=J(()=>!!(o.loading?.value||l.value||d.value)),_e=J(()=>{let e=[];return C.value&&e.push(`customizing`),x.value?.length||e.push(`start`),e.join(` `)});function ve(){if(x.value){if(x.value.length===0){te.value=[];return}te.value=x.value.flatMap((e,t)=>e.points.map((e,n)=>({_id:`z${t}-p${n}`,zoneIndex:t,pointIndex:n,point:[e[0],e[1]]})))}}function ye(e){if(`touches`in e){let t=e.touches[0];return{x:t.clientX,y:t.clientY}}return{x:e.clientX,y:e.clientY}}function be(e,t){if(e.stopPropagation(),!v.value)return;je(C.value),ae=!0,T.value=t;let n=v.value.getBoundingClientRect(),{x:r,y:i}=ye(e),a=fe.value,o=pe.value;ie.x=(r-n.left-10)/a*100,ie.y=(i-n.top-10)/o*100}function xe(e){if(!ae||!v.value||T.value===-1||!x.value.length)return;let t=v.value.getBoundingClientRect(),{x:n,y:r}=ye(e),i=fe.value,a=pe.value,o=(n-t.left-10)/i*100,s=(r-t.top-10)/a*100,c=o-ie.x,l=s-ie.y,u=x.value[T.value].points,d=!1;for(let e=0;e<u.length;e++){let t=u[e][0]+c,n=u[e][1]+l;if(t<0||t>100||n<0||n>100){d=!0;break}}if(!d)for(let e=0;e<u.length;e++){u[e][0]+=c,u[e][1]+=l,u[e][0]=Math.max(0,Math.min(100,u[e][0])),u[e][1]=Math.max(0,Math.min(100,u[e][1]));let t=u[e][0]/100*i,n=u[e][1]/100*a;b.value.find(t=>t.id===`z${T.value}-p${e}`)?.setPosition(t,n)}ie.x=o,ie.y=s}function Se(){setTimeout(()=>{ae=!1},100)}function Ce(){!x.value.length||T.value===-1||(x.value[T.value].isPrivacyMask=!x.value[T.value].isPrivacyMask)}function we(){x.value[T.value]&&(x.value[T.value].filter=x.value[T.value].filter===`include`?`exclude`:`include`)}function Te(){x.value[T.value]&&(x.value[T.value].type=x.value[T.value].type===`intersect`?`contain`:`intersect`)}function Ee(e){if(!C.value||ae)return;let t=w.value===void 0?x.value.length:w.value,n=Math.min(Math.max(Math.round((e.offsetX-10)/fe.value*100),0),100),r=Math.min(Math.max(Math.round((e.offsetY-10)/pe.value*100),0),100);if(w.value===void 0){let e=`zone-${Date.now()}`;x.value.push({name:e,points:[],filter:`include`,type:`contain`,labels:[`motion`,`person`,`vehicle`,`animal`],isPrivacyMask:!1,color:Ie()}),w.value=x.value.length-1}x.value[t].points.push([n,r]),ve(),At(()=>{let e=x.value[t].points.length-1;De({_id:`z${t}-p${e}`,zoneIndex:t,pointIndex:e,point:[n,r]})})}function De(e){if(e.zoneIndex===void 0||e.pointIndex===void 0)return;let t=g.value?.filter(t=>t.dataset.pointIndex===e.pointIndex.toString()&&t.dataset.zoneIndex===e.zoneIndex.toString());!t||t.length===0||He(t[0],e.point)}function Oe(e){if(!x.value.length)return;let t=Math.round(e.point[0]/fe.value*100),n=Math.round(e.point[1]/pe.value*100);x.value[e.zoneIndex].points[e.pointIndex]=[t,n]}function Ae(){C.value=!0,w.value=void 0}function je(e){if(w.value===void 0){C.value=!1;return}C.value=e||!1;let t=w.value;!x.value[t]||!x.value[t].points||(x.value[t].points.length<3?(x.value.splice(t,1),ve()):(g.value?.forEach(e=>We(e)),T.value=t),w.value=void 0)}function Me(){C.value=!0,w.value=T.value}function Ne(){T.value===-1||!x.value.length||(x.value.splice(T.value,1),T.value=Math.max(-1,T.value-1),ve(),At(()=>{ze()}))}function Pe(){if(x.value?.length){if(C.value&&w.value!==void 0){let e=x.value[w.value];e.points.length&&(e.points.pop(),e.points.length===0&&(x.value.splice(w.value,1),w.value=void 0),ve());return}x.value.length>0&&(x.value.pop(),ve(),At(()=>{ze()}))}}function Fe(){ae=!1,C.value=!1,w.value=void 0,x.value&&(x.value.length=0,te.value=[],At(()=>{Be()}))}function Ie(){return`#`+[Math.floor(Math.random()*256),Math.floor(Math.random()*256),Math.floor(Math.random()*256)].map(e=>e.toString(16).padStart(2,`0`)).join(``)}function Le(e){if(!e||!e.length)return``;let t=e.map(e=>{let t=Math.round(e[0]/100*fe.value),n=Math.round(e[1]/100*pe.value);return`${t+10},${n+10}`});if(t.length===0)return``;let n=`M ${t[0]}`;for(let e=1;e<t.length;e++)n+=` L ${t[e]}`;return n+=` Z`,n}function Re(e){C.value||(T.value=e)}function ze(){Be(),g.value?.forEach(e=>{if(!e.dataset.zoneIndex||!e.dataset.pointIndex)return;let t=parseInt(e.dataset.zoneIndex),n=parseInt(e.dataset.pointIndex);if(!x.value[t]||!x.value[t].points[n])return;let r=x.value[t].points[n];r&&(He(e,r),We(e))})}function Be(){b.value.forEach(e=>e.destroy()),b.value=[]}function Ve(e){!x.value.length||!x.value[e.zoneIndex]||x.value[e.zoneIndex].points.length<4||(x.value[e.zoneIndex].points.splice(e.pointIndex,1),ve(),At(()=>{ze()}))}function He(e,t){Object.assign(e.style,Ue(t))}function Ue(e){return{left:Math.round(e[0]/100*fe.value)+`px`,top:Math.round(e[1]/100*pe.value)+`px`}}function We(e){e.classList.add(`draggable`);let t=new fc.default(e,{containment:!0,grid:[0,0]}).on(`pointerDown`,()=>{document.querySelectorAll(`[data-point="${e.dataset.zoneIndex}-${e.dataset.pointIndex}"]`)[0]?.classList.add(`changing`)}).on(`dragMove`,()=>{if(!e.dataset.zoneIndex||!e.dataset.pointIndex||!e.dataset.id)return;let n=t.position.x,r=t.position.y;Oe({_id:e.dataset.id,point:[n,r],pointIndex:parseInt(e.dataset.pointIndex),zoneIndex:parseInt(e.dataset.zoneIndex)})}).on(`pointerUp`,()=>{document.querySelectorAll(`.point`).forEach(e=>e.classList.remove(`changing`))});t.id=e.dataset.id,b.value.push(t)}function Ge(e,t,n){e.preventDefault(),E.value=t,se={lineIndex:t,pointIndex:n};let r=e=>{if(!se||!v.value)return;let t=v.value.getBoundingClientRect(),{x:n,y:r}=ye(e),i=Math.min(Math.max((n-t.left-10)/fe.value*100,0),100),a=Math.min(Math.max((r-t.top-10)/pe.value*100,0),100);S.value[se.lineIndex].points[se.pointIndex]=[Math.round(i),Math.round(a)]},i=()=>{se=null,document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i),document.removeEventListener(`touchmove`,r),document.removeEventListener(`touchend`,i)};document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i),document.addEventListener(`touchmove`,r),document.addEventListener(`touchend`,i)}function Ke(){S.value.push({name:`line-${Date.now()}`,points:[[40,30],[60,70]],direction:`both`,labels:[`person`,`vehicle`,`animal`,`package`],color:Ie()}),E.value=S.value.length-1}function qe(){E.value<0||!S.value.length||(S.value.splice(E.value,1),E.value=Math.max(-1,E.value-1))}function Xe(){if(E.value<0)return;let e=S.value[E.value];if(!e)return;let t=[`both`,`a-to-b`,`b-to-a`];e.direction=t[(t.indexOf(e.direction)+1)%t.length]}function Ze(e){let t=fe.value,n=pe.value,r=e.points[0][0]/100*t+10,i=e.points[0][1]/100*n+10,a=e.points[1][0]/100*t+10,o=e.points[1][1]/100*n+10,s=(r+a)/2,c=(i+o)/2,l=a-r,u=o-i,d=Math.sqrt(l*l+u*u)||1,f=-u,p=l,m=s-f/2,h=c-p/2,g=s+f/2,_=c+p/2,v=f/d,y=p/d,b=10+t,ee=10+n,x=(e,t)=>({x:Math.max(19,Math.min(b-9,e)),y:Math.max(19,Math.min(ee-9,t))}),S=x(m-v*21,h-y*21),C=x(g+v*21,_+y*21);return{h1x:r,h1y:i,h2x:a,h2y:o,ax:S.x+v*15,ay:S.y+y*15,bx:C.x-v*15,by:C.y-y*15,labelAx:S.x,labelAy:S.y,labelBx:C.x,labelBy:C.y}}async function Qe(){try{let e=[];e.push(s({cameraname:f.value,zoneData:x.value})),e.push(u({cameraname:f.value,lineData:S.value})),await Promise.all(e)}catch(e){return i.add({severity:`error`,detail:e,life:3e3}),null}}return me(_,e=>{let t=e.target,n=t.closest(`.polygon`),r=t.closest(`.edit-button`),i=t.closest(`.remove-button`),a=t.closest(`.handle`),o=t.closest(`.zone-buttons`),s=t.closest(`.p-multiselect-list`),c=t.closest(`.p-colorpicker-panel`);!n&&!r&&!i&&!a&&!C.value&&!o&&!s&&!c&&(T.value=-1)}),M(re,()=>{re.value=-1}),M(T,(e,t)=>{if(e===-1&&x.value?.length&&x.value[t]){T.value=t;return}e===-1&&x.value?.length&&(re.value=0)}),M(p,()=>{x.value=Ye(p.value),ve()},{deep:!0,immediate:!0}),M(()=>r.lines,()=>{S.value=Ye(r.lines)},{deep:!0,immediate:!0}),M(y,e=>{e===`zones`?x.value.length&&(T.value<0||T.value>=x.value.length)&&(T.value=0):S.value.length&&(E.value<0||E.value>=S.value.length)&&(E.value=0)},{immediate:!0}),M([O.width,O.height],()=>{ze()}),pt(async()=>{setTimeout(()=>{ze()})}),t({isLoading:j,onConfirm:Qe}),(e,t)=>{let n=un,r=ne,i=ke,a=Bn,o=nr,s=Vn,l=Rn,u=Yr,d=c,p=ti,h=Lr,b=Br,ee=dc,re=cc,ie=ac,ae=ei,oe=nc,se=$s,O=Xs,ce=qs,k=In;return $(),U(`div`,hc,[V(`div`,gc,[V(`div`,_c,[V(`div`,{ref_key:`outsideRef`,ref:_},null,512),V(`div`,{class:P([`w-full flex justify-center gap-3`,{"flex-row items-stretch":R(D).width.value>740,"flex-col":R(D).width.value<=740}])},[V(`div`,vc,[V(`div`,yc,[V(`div`,{ref_key:`playgroundContainerRef`,ref:v,class:`playground-container flex w-full h-full min-w-0`},[V(`section`,{class:P([`playground w-full h-full`,R(_e)]),onClick:Ee},[V(`div`,bc,[V(`div`,xc,[($(!0),U(K,null,B(R(te),e=>Ft(($(),U(`div`,{key:e._id,ref_for:!0,ref_key:`draggablesRef`,ref:g,class:`handle`,"data-id":e._id,"data-point":`${e.zoneIndex}-${e.pointIndex}`,"data-point-index":e.pointIndex,"data-zone-index":e.zoneIndex,onDblclick:wt(t=>Ve(e),[`prevent`])},[...t[8]||=[V(`div`,{class:`delete-point`},null,-1)]],40,Sc)),[[Pt,R(y)===`zones`]])),128)),V(`div`,Cc,[($(),U(`svg`,wc,[R(y)===`zones`?($(!0),U(K,{key:0},B(R(x),(e,t)=>($(),U(`path`,{key:`zone-${t}`,d:Le(e.points),class:P([`cursor-pointer`,{dash:e.type===`intersect`&&!e.isPrivacyMask,selected:R(T)===t}]),style:z({fill:e.isPrivacyMask?`rgba(16, 16, 16, 0.9)`:e.filter===`exclude`?`transparent`:`${e.color}4D`,stroke:e.isPrivacyMask?`#333333`:e.color,"stroke-width":`2`}),onClick:e=>Re(t),onDblclick:()=>e.isPrivacyMask=!e.isPrivacyMask,onMousedown:e=>be(e,t),onMousemove:xe,onMouseup:Se,onTouchstart:e=>be(e,t),onTouchmove:xe,onTouchend:Se},null,46,Tc))),128)):q(``,!0),R(y)===`lines`?($(),U(K,{key:1},[V(`defs`,null,[($(!0),U(K,null,B(R(S),(e,t)=>($(),U(`marker`,{id:`editor-arrow-ab-${t}`,key:`marker-ab-${t}`,markerWidth:`6`,markerHeight:`5`,refX:`5`,refY:`2.5`,orient:`auto`,markerUnits:`strokeWidth`},[V(`path`,{d:`M0,0 L6,2.5 L0,5 Z`,fill:e.color},null,8,Dc)],8,Ec))),128)),($(!0),U(K,null,B(R(S),(e,t)=>($(),U(`marker`,{id:`editor-arrow-ba-${t}`,key:`marker-ba-${t}`,markerWidth:`6`,markerHeight:`5`,refX:`1`,refY:`2.5`,orient:`auto`,markerUnits:`strokeWidth`},[V(`path`,{d:`M6,0 L0,2.5 L6,5 Z`,fill:e.color},null,8,kc)],8,Oc))),128))]),($(!0),U(K,null,B(R(S),(e,t)=>($(),U(K,{key:`line-${t}`},[V(`line`,{x1:Ze(e).h1x,y1:Ze(e).h1y,x2:Ze(e).h2x,y2:Ze(e).h2y,stroke:e.color,"stroke-width":`2`,"stroke-dasharray":`6,4`,opacity:`0.6`},null,8,Ac),V(`line`,{x1:Ze(e).ax,y1:Ze(e).ay,x2:Ze(e).bx,y2:Ze(e).by,stroke:e.color,"stroke-width":`3`,class:`cursor-pointer`,"stroke-opacity":R(E)===t?1:.7,"marker-end":e.direction===`b-to-a`?void 0:`url(#editor-arrow-ab-${t})`,"marker-start":e.direction===`a-to-b`?void 0:`url(#editor-arrow-ba-${t})`,onClick:e=>E.value=t},null,8,jc),V(`rect`,{x:Ze(e).labelAx-9,y:Ze(e).labelAy-9,width:`18`,height:`18`,rx:`4`,fill:e.color},null,8,Mc),V(`text`,{x:Ze(e).labelAx,y:Ze(e).labelAy,fill:`#fff`,"font-size":`11`,"font-weight":`bold`,"text-anchor":`middle`,"dominant-baseline":`central`},` A `,8,Nc),V(`rect`,{x:Ze(e).labelBx-9,y:Ze(e).labelBy-9,width:`18`,height:`18`,rx:`4`,fill:e.color},null,8,Pc),V(`text`,{x:Ze(e).labelBx,y:Ze(e).labelBy,fill:`#fff`,"font-size":`11`,"font-weight":`bold`,"text-anchor":`middle`,"dominant-baseline":`central`},` B `,8,Fc),V(`circle`,{cx:Ze(e).h1x,cy:Ze(e).h1y,r:`8`,fill:e.color,stroke:R(E)===t?`#fff`:e.color,"stroke-width":`2`,class:`cursor-grab`,onMousedown:wt(e=>Ge(e,t,0),[`stop`]),onTouchstart:wt(e=>Ge(e,t,0),[`stop`])},null,40,Ic),V(`circle`,{cx:Ze(e).h2x,cy:Ze(e).h2y,r:`8`,fill:e.color,stroke:R(E)===t?`#fff`:e.color,"stroke-width":`2`,class:`cursor-grab`,onMousedown:wt(e=>Ge(e,t,1),[`stop`]),onTouchstart:wt(e=>Ge(e,t,1),[`stop`])},null,40,Lc)],64))),128))],64)):q(``,!0)]))])]),t[9]||=V(`div`,{class:`shadowboard on`},null,-1)])],2)],512)]),V(`div`,Rc,[Q(n,{ref_key:`cameraCardRef`,ref:m,"camera-info":R(f),"source-role":`low-resolution`,"streaming-mode":`webrtc`,toolbar:!1,control:!1,subcontrol:!1,"flat-card":``,class:`w-full h-full border-[1px] border-color-inner`,"card-background-color":`#000`},null,8,[`camera-info`])])]),V(`div`,{class:P([`w-full flex flex-col gap-6 zone-buttons items-center self-stretch`,{"!gap-3":R(D).width.value>740}]),style:z({"max-width":R(D).width.value>740?`300px`:void 0})},[Q(r,{modelValue:R(y),"onUpdate:modelValue":t[0]||=e=>Mt(y)?y.value=e:null,options:R(he),"option-label":`label`,"option-value":`value`,class:`w-full`,pt:{root:{class:`flex w-full`},pcToggleButton:{root:{class:`flex-1 !text-sm`}}}},null,8,[`modelValue`,`options`]),R(y)===`lines`?($(),U(K,{key:0},[V(`div`,zc,[V(`label`,{for:`line[${R(E)}].name`,class:`cui-label`},F(e.$t(`components.form.label.name`)),9,Bc),Q(a,null,{default:G(()=>[Q(i,{"model-value":R(S)[R(E)]?.name,invalid:!!R(de),loading:R(j),disabled:R(E)<0,type:`text`,onValueChange:t[1]||=e=>{R(S)[R(E)]&&(R(S)[R(E)].name=e??``)}},null,8,[`model-value`,`invalid`,`loading`,`disabled`])]),_:1}),Q(N,{name:`fade`},{default:G(()=>[R(de)?($(),U(`span`,Vc,F(R(de)),1)):q(``,!0)]),_:1})]),V(`div`,Hc,[V(`label`,{for:`line[${R(E)}].labels`,class:`cui-label`},F(e.$t(`components.form.label.labels`)),9,Uc),Q(a,null,{default:G(()=>[Q(o,{"model-value":R(S)[R(E)]?.labels,options:R(ge),loading:R(j),"max-selected-labels":2,"show-toggle-all":!1,"option-label":`label`,"option-value":`value`,"option-group-label":`label`,"option-group-children":`items`,"show-clear":``,type:`text`,onValueChange:t[2]||=e=>{R(S)[R(E)]&&(R(S)[R(E)].labels=e)}},null,8,[`model-value`,`options`,`loading`])]),_:1})]),V(`div`,Wc,[V(`label`,{for:`line[${R(E)}].color`,class:`cui-label`},F(e.$t(`components.form.label.color`)),9,Gc),Q(a,null,{default:G(()=>[Q(i,{"model-value":R(S)[R(E)]?.color,loading:R(j),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),Q(l,null,{default:G(()=>[($(),H(s,{key:R(E),"model-value":R(S)[R(E)]?.color,format:`hex`,onValueChange:t[3]||=e=>e&&R(S)[R(E)]?R(S)[R(E)].color=`#${e}`:null},null,8,[`model-value`]))]),_:1})]),_:1})]),V(`div`,Kc,[Ft(($(),H(d,{loading:R(j),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ke},{icon:G(()=>[Q(u,{width:`20px`,height:`20px`})]),_:1},8,[`loading`])),[[k,{value:e.$t(`components.form.tooltip.new`)},void 0,{top:!0}]]),Ft(($(),H(d,{loading:R(j),disabled:!R(S).length||R(E)<0,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:qe},{icon:G(()=>[Q(p,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[k,{value:e.$t(`components.form.tooltip.delete`)},void 0,{top:!0}]])]),V(`div`,qc,[Ft(($(),H(d,{loading:R(j),disabled:R(E)<0,severity:`secondary`,class:`!rounded-none !h-full w-[80px] text-sm`,onClick:Xe},{default:G(()=>[X(F(R(S)[R(E)]?.direction===`both`?`A ↔ B`:R(S)[R(E)]?.direction===`a-to-b`?`A → B`:`B → A`),1)]),_:1},8,[`loading`,`disabled`])),[[k,{value:R(S)[R(E)]?.direction===`both`?`A ↔ B`:R(S)[R(E)]?.direction===`a-to-b`?`A → B`:`B → A`},void 0,{top:!0}]])])],64)):q(``,!0),R(y)===`zones`?($(),U(K,{key:1},[V(`div`,Jc,[V(`label`,{for:`zone[${R(T)}].name`,class:`cui-label`},F(e.$t(`components.form.label.name`)),9,Yc),Q(a,null,{default:G(()=>[Q(i,{"model-value":R(x)[R(T)]?.name,invalid:!!R(ue),loading:R(j),disabled:R(T)<0||R(x)[R(T)]?.isPrivacyMask,type:`text`,onValueChange:t[4]||=e=>{R(x)[R(T)]&&(R(x)[R(T)].name=e??``)}},null,8,[`model-value`,`invalid`,`loading`,`disabled`])]),_:1}),Q(N,{name:`fade`},{default:G(()=>[R(ue)?($(),U(`span`,Xc,F(R(ue)),1)):q(``,!0)]),_:1})]),V(`div`,Zc,[V(`label`,{for:`zone[${R(T)}].labels`,class:`cui-label`},F(e.$t(`components.form.label.labels`)),9,Qc),Q(a,null,{default:G(()=>[Q(o,{"model-value":R(x)[R(T)]?.labels,options:R(A),disabled:R(x)[R(T)]?.isPrivacyMask,loading:R(j),"max-selected-labels":2,"show-toggle-all":!1,"option-label":`label`,"option-value":`value`,"option-group-label":`label`,"option-group-children":`items`,"show-clear":``,type:`text`,onValueChange:t[5]||=e=>R(x)[R(T)].labels=e},null,8,[`model-value`,`options`,`disabled`,`loading`])]),_:1})]),V(`div`,$c,[V(`label`,{for:`zone[${R(T)}].color`,class:`cui-label`},F(e.$t(`components.form.label.color`)),9,el),Q(a,null,{default:G(()=>[Q(i,{"model-value":R(x)[R(T)]?.color,disabled:R(x)[R(T)]?.isPrivacyMask,loading:R(j),readonly:``,type:`text`},null,8,[`model-value`,`disabled`,`loading`]),Q(l,null,{default:G(()=>[($(),H(s,{key:R(T),"model-value":R(x)[R(T)]?.color,format:`hex`,disabled:R(x)[R(T)]?.isPrivacyMask,onValueChange:t[6]||=e=>e?R(x)[R(T)].color=`#${e}`:null},null,8,[`model-value`,`disabled`]))]),_:1})]),_:1})]),V(`div`,tl,[R(C)?Ft(($(),H(d,{key:1,disabled:R(w)!==void 0&&R(x)[R(w)]?.points?.length<3,loading:R(j),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:t[7]||=e=>je(!1)},{icon:G(()=>[Q(h,{width:`20px`,height:`20px`})]),_:1},8,[`disabled`,`loading`])),[[k,{value:e.$t(`components.form.tooltip.finish`)},void 0,{top:!0}]]):Ft(($(),H(d,{key:0,loading:R(j),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ae},{icon:G(()=>[Q(u,{width:`20px`,height:`20px`})]),_:1},8,[`loading`])),[[k,{value:e.$t(`components.form.tooltip.new`)},void 0,{top:!0}]]),Ft(($(),H(d,{loading:R(j),disabled:!R(x).length||R(T)<0||R(C),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Me},{icon:G(()=>[Q(b,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[k,{value:e.$t(`components.form.tooltip.edit`)},void 0,{top:!0}]]),Ft(($(),H(d,{loading:R(j),disabled:!R(x).length||R(T)<0,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ne},{icon:G(()=>[Q(p,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[k,{value:e.$t(`components.form.tooltip.delete`)},void 0,{top:!0}]]),Ft(($(),H(d,{loading:R(j),disabled:!R(x).length,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Pe},{icon:G(()=>[Q(ee,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[k,{value:e.$t(`components.form.tooltip.undo`)},void 0,{top:!0}]]),Ft(($(),H(d,{loading:R(j),disabled:!R(x).length,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Fe},{icon:G(()=>[Q(re,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[k,{value:e.$t(`components.form.tooltip.clear`)},void 0,{top:!0}]])]),V(`div`,nl,[Ft(($(),H(d,{loading:R(j),disabled:!(R(x).length&&R(T)>=0&&R(x)[R(T)]),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ce},{icon:G(()=>[R(x)[R(T)]?.isPrivacyMask?($(),H(ie,{key:0,width:`20px`,height:`20px`})):($(),H(ae,{key:1,width:`20px`,height:`20px`}))]),_:1},8,[`loading`,`disabled`])),[[k,{value:R(x)[R(T)]?.isPrivacyMask?e.$t(`components.form.tooltip.privacy_mask`):e.$t(`components.form.tooltip.public_mask`)},void 0,{top:!0}]]),Ft(($(),H(d,{loading:R(j),disabled:R(x)[R(T)]?.isPrivacyMask,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:we},{icon:G(()=>[R(x)[R(T)]?.filter===`include`?($(),H(oe,{key:0,width:`20px`,height:`20px`})):($(),H(se,{key:1,width:`20px`,height:`20px`}))]),_:1},8,[`loading`,`disabled`])),[[k,{value:R(x)[R(T)]?.filter===`include`?e.$t(`components.form.tooltip.include`):e.$t(`components.form.tooltip.exclude`)},void 0,{top:!0}]]),Ft(($(),H(d,{loading:R(j),disabled:R(x)[R(T)]?.isPrivacyMask,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Te},{icon:G(()=>[R(x)[R(T)]?.type===`intersect`?($(),H(O,{key:0,width:`20px`,height:`20px`})):($(),H(ce,{key:1,width:`20px`,height:`20px`}))]),_:1},8,[`loading`,`disabled`])),[[k,{value:R(x)[R(T)]?.type===`intersect`?e.$t(`components.form.tooltip.intersect`):e.$t(`components.form.tooltip.contain`)},void 0,{top:!0}]])])],64)):q(``,!0)],6)],2)])])],512)}}}),[[`__scopeId`,`data-v-e02167ca`]]),il={class:`text-color font-normal`},al={class:`flex flex-col gap-6`},ol={for:`name`,class:`cui-label`},sl={for:`room`,class:`cui-label`},cl={class:`flex gap-2`},ll={for:`type`,class:`cui-label`},ul={class:`w-full flex flex-col gap-2`},dl={class:`flex items-center gap-4`},fl={class:`flex flex-col field-switch-gap`},pl={for:`disabled`,class:`cui-label-switch`},ml={class:`text-color font-normal`},hl={class:`flex flex-col gap-6`},gl={for:`info.manufacturer`,class:`cui-label`},_l={for:`info.model`,class:`cui-label`},vl={for:`info.hardware`,class:`cui-label`},yl={for:`info.serialNumber`,class:`cui-label`},bl={for:`info.firmwareVersion`,class:`cui-label`},xl={for:`info.supportUrl`,class:`cui-label`},Sl={class:`text-color font-normal`},Cl={class:`flex flex-col gap-6`},wl={for:`interfaceSettings.streamingMode`,class:`cui-label`},Tl={for:`interfaceSettings.streamingSource`,class:`cui-label`},El={for:`interfaceSettings.aspectRatio`,class:`cui-label`},Dl={class:`text-color font-normal`},Ol={class:`flex flex-col gap-6`},kl={class:`w-full flex flex-col gap-2`},Al={class:`flex items-center gap-4`},jl={class:`flex flex-col field-switch-gap`},Ml={for:`detectionSettings.snooze`,class:`cui-label-switch`},Nl={for:`detectionSettings.motion.resolution`,class:`cui-label`},Pl={for:`detectionSettings.motion.timeout`,class:`cui-label`},Fl={for:`detectionSettings.object.confidence`,class:`cui-label`},Il={for:`detectionSettings.audio.minDecibels`,class:`cui-label`},Ll={for:`detectionSettings.audio.timeout`,class:`cui-label`},Rl={for:`detectionSettings.sensor.timeout`,class:`cui-label`},zl={for:`detectionSettings.sensor.triggers`,class:`cui-label`},Bl={class:`text-color font-normal`},Vl={class:`w-full flex flex-col gap-4`},Hl={class:`flex items-center gap-4`},Ul={class:`flex flex-col field-switch-gap`},Wl={for:`ptzAutotrack.enabled`,class:`cui-label-switch`},Gl={class:`cui-label`},Kl={class:`cui-label`},ql={class:`cui-label`},Jl={class:`flex items-center gap-4`},Yl={class:`flex flex-col field-switch-gap`},Xl={for:`ptzAutotrack.returnToHome`,class:`cui-label-switch`},Zl={class:`cui-label`},Ql={class:`text-color font-normal`},$l={class:`flex flex-col gap-6 w-full items-center justify-center`},eu={class:`text-color font-normal`},tu={class:`flex flex-col gap-6`},nu={class:`w-full flex flex-col gap-2`},ru={class:`flex items-center gap-4`},iu={class:`flex flex-col field-switch-gap`},au={for:`snapshotSettings.autoRefresh`,class:`cui-label-switch`},ou={for:`snapshotSettings.ttl`,class:`cui-label`},su={for:`snapshotSettings.interval`,class:`cui-label`},cu={class:`text-color font-normal`},lu={class:`flex flex-col gap-6`},uu={for:`frameWorkerSettings.fps`,class:`cui-label`},du=Z({__name:`Settings`,props:jt({camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:jt([`close`],[`update:modelValue`]),setup(e,{emit:t}){let n=new Set([i.Contact,i.Occupancy,i.Smoke,i.Leak,i.Doorbell,i.Switch,i.Light,i.Siren,i.Lock,i.Garage,i.SecuritySystem]),r=new wr,a=new wr,o=e,s=t,l=xt(e,`modelValue`),u=zt(),d=Vt(),f=kr(),{t:m}=le(),{camera:h,cameraDevice:g,loading:_}=Dt(o),{sensors:v}=p(g),{data:y,isBusy:b}=a.getRoomsQuery(),{mutateAsync:ee,isPending:x}=r.removeCameraQuery(),S=W([`camera`,`doorbell`]),C=W([`auto`,`mse`,`webrtc`,`webrtc/tcp`]),te=W([`high-resolution`,`mid-resolution`,`low-resolution`]),w=W([`16:9`,`9:16`,`8:3`,`4:3`,`1:1`]),T=W([`low`,`medium`,`high`]),ne=W([]),re=J(()=>v.value.some(e=>e.type===i.PTZ)),E=J(()=>[{label:m(`components.automation_nodes.label_person`),value:`person`},{label:m(`components.automation_nodes.label_vehicle`),value:`vehicle`},{label:m(`components.automation_nodes.label_animal`),value:`animal`},{label:m(`components.automation_nodes.label_package`),value:`package`}]),ie=J(()=>v.value.filter(e=>n.has(e.type)).map(e=>({label:e.displayName.value,value:O(e.type,e.name,e.pluginId)}))),ae=J(()=>new Set(ie.value.map(e=>e.value))),oe=J(()=>(l.value.detectionSettings.sensor?.triggers??[]).map(e=>O(e.sensorType,e.sensorName,e.pluginId)).filter(e=>ae.value.has(e))),se=J(()=>{let e=y.value??[`Default`],t=new Set(e.map(e=>e.toLowerCase()));return[...e,...ne.value.filter(e=>!t.has(e.toLowerCase()))].map(e=>({label:e===`Default`?m(`components.form.label.room_default`):e,value:e}))}),D=J(()=>_.value||x.value);function O(e,t,n){return`${e}::${t}::${n}`}function ce(e){let t=(l.value.detectionSettings.sensor?.triggers??[]).filter(e=>!ae.value.has(O(e.sensorType,e.sensorName,e.pluginId))),n=e.map(e=>{let[t,n,r]=e.split(`::`);return{sensorType:t,sensorName:n,pluginId:r}});l.value.detectionSettings.sensor||(l.value.detectionSettings.sensor={timeout:30,triggers:[]}),l.value.detectionSettings.sensor.triggers=[...t,...n]}function k(){f.openComponentDialog(Xr,{data:{title:m(`components.dialog.title.create_room`),confirmText:m(`components.form.button.add`),contentProps:{}},onConfirm:e=>{if(!e)return;let t=se.value.find(t=>t.value.toLowerCase()===e.toLowerCase()),n=t?.value??e;t||ne.value.push(n),l.value.room=n}})}function ue(){f.openTextDialog({data:{title:m(`components.dialog.title.confirm`),confirmText:m(`components.form.button.remove`),contentText:m(`components.dialog.message.confirm_remove`),confirmButtonProps:{severity:`danger`}},onConfirm:async()=>{try{await ee({cameraname:h.value.name}),u.path.includes(h.value.name)&&d.push({path:`/home`}),s(`close`)}catch{}}})}function de(e=[]){f.openComponentDialog(rl,{data:{title:m(`components.zone_editor.edit_zones`),loading:D,contentProps:{cameraName:h.value.name,zones:e,lines:h.value.detectionLines??[]}}})}return(e,t)=>{let n=zn,r=ke,i=Bn,a=Yn,o=Yr,s=c,u=or,d=Ln,f=Xn,p=Mn,m=Jn,g=nr,_=Jr,v=Nn,y=In;return $(),H(v,{multiple:``,class:`p-4`},{default:G(()=>[Q(p,{value:`general`},{default:G(()=>[Q(n,{class:`px-0 pt-0`},{default:G(()=>[V(`span`,il,F(e.$t(`components.camera_options.general`)),1)]),_:1}),Q(f,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,al,[Q(R(L),{modelValue:l.value.name,"onUpdate:modelValue":t[0]||=e=>l.value.name=e,modelModifiers:{trim:!0},name:`name`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,ol,F(e.$t(`components.form.label.name`)),1),Q(i,null,{default:G(()=>[Q(r,lt(t,{invalid:n.length>0,loading:R(D),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`name`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(L),{"model-value":l.value.room,name:`room`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,sl,F(e.$t(`components.form.label.room`)),1),V(`div`,cl,[Q(a,{"model-value":l.value.room,options:R(se),"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:R(b),class:`w-full`,"onUpdate:modelValue":t[1]||=e=>l.value.room=e},null,8,[`model-value`,`options`,`invalid`,`loading`]),Ft(($(),H(s,{severity:`secondary`,outlined:``,class:`shrink-0 h-[42px] w-[42px] p-0`,onClick:k},{icon:G(()=>[Q(o,{class:`w-4 h-4`})]),_:1})),[[y,e.$t(`components.form.button.create_room`),void 0,{top:!0}]])]),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.room`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.type,name:`type`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,ll,F(e.$t(`components.form.label.type`)),1),Q(i,null,{default:G(()=>[Q(a,{"model-value":l.value.type,options:R(S),invalid:n.length>0,loading:R(D),type:`text`,onValueChange:t[2]||=e=>l.value.type=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`type`,class:`cui-input-error`})]),_:1})]),_:1},8,[`model-value`]),V(`div`,ul,[Q(R(L),{"model-value":l.value.disabled,value:!0,"unchecked-value":!1,type:`checkbox`,name:`disabled`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,dl,[V(`div`,fl,[V(`label`,pl,F(e.$t(`components.form.label.disabled`)),1),Q(u,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.disable_camera`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`disabled`,class:`cui-input-switch-error`})]),_:1})]),Q(d,lt({"model-value":l.value.disabled},n,{invalid:r.length>0,loading:R(D),class:`ml-auto shrink-0`,onValueChange:t[3]||=e=>l.value.disabled=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),Q(s,{fluid:``,severity:`danger`,loading:R(D),class:`cui-button-medium`,label:e.$t(`components.form.button.remove`),onClick:t[4]||=e=>ue()},null,8,[`loading`,`label`])])]),_:1})]),_:1}),Q(p,{value:`branding`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,ml,F(e.$t(`components.camera_options.branding`)),1)]),_:1}),Q(f,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,hl,[Q(R(L),{modelValue:l.value.info.manufacturer,"onUpdate:modelValue":t[5]||=e=>l.value.info.manufacturer=e,modelModifiers:{trim:!0},name:`info.manufacturer`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,gl,F(e.$t(`components.form.label.manufacturer`)),1),Q(i,null,{default:G(()=>[Q(r,lt(t,{invalid:n.length>0,loading:R(D),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`info.manufacturer`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(L),{modelValue:l.value.info.model,"onUpdate:modelValue":t[6]||=e=>l.value.info.model=e,modelModifiers:{trim:!0},name:`info.model`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,_l,F(e.$t(`components.form.label.model`)),1),Q(i,null,{default:G(()=>[Q(r,lt(t,{invalid:n.length>0,loading:R(D),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`info.model`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(L),{modelValue:l.value.info.hardware,"onUpdate:modelValue":t[7]||=e=>l.value.info.hardware=e,modelModifiers:{trim:!0},name:`info.hardware`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,vl,F(e.$t(`components.form.label.hardware_version`)),1),Q(i,null,{default:G(()=>[Q(r,lt(t,{invalid:n.length>0,loading:R(D),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`info.hardware`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(L),{modelValue:l.value.info.serialNumber,"onUpdate:modelValue":t[8]||=e=>l.value.info.serialNumber=e,modelModifiers:{trim:!0},name:`info.serialNumber`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,yl,F(e.$t(`components.form.label.serial_number`)),1),Q(i,null,{default:G(()=>[Q(r,lt(t,{invalid:n.length>0,loading:R(D),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`info.serialNumber`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(L),{modelValue:l.value.info.firmwareVersion,"onUpdate:modelValue":t[9]||=e=>l.value.info.firmwareVersion=e,modelModifiers:{trim:!0},name:`info.firmwareVersion`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,bl,F(e.$t(`components.form.label.firmware_version`)),1),Q(i,null,{default:G(()=>[Q(r,lt(t,{invalid:n.length>0,loading:R(D),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`info.firmwareVersion`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(L),{modelValue:l.value.info.supportUrl,"onUpdate:modelValue":t[10]||=e=>l.value.info.supportUrl=e,modelModifiers:{trim:!0},name:`info.supportUrl`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,xl,F(e.$t(`components.form.label.support_url`)),1),Q(i,null,{default:G(()=>[Q(r,lt(t,{invalid:n.length>0,loading:R(D),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`info.supportUrl`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`])])]),_:1})]),_:1}),Q(p,{value:`interface`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,Sl,F(e.$t(`components.camera_options.interface`)),1)]),_:1}),Q(f,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,Cl,[Q(R(L),{"model-value":l.value.interfaceSettings.streamingMode,name:`interfaceSettings.streamingMode`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,wl,F(e.$t(`components.form.label.streaming_mode`)),1),Q(i,null,{default:G(()=>[Q(a,{"model-value":l.value.interfaceSettings.streamingMode,options:R(C),invalid:n.length>0,loading:R(D),type:`text`,onValueChange:t[11]||=e=>l.value.interfaceSettings.streamingMode=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`interfaceSettings.streamingMode`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.streaming_mode`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.interfaceSettings.streamingSource,name:`interfaceSettings.streamingSource`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Tl,F(e.$t(`components.form.label.streaming_source`)),1),Q(i,null,{default:G(()=>[Q(a,{"model-value":l.value.interfaceSettings.streamingSource,options:R(te),invalid:n.length>0,loading:R(D),type:`text`,onValueChange:t[12]||=e=>l.value.interfaceSettings.streamingSource=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`interfaceSettings.streamingSource`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.streaming_source`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.interfaceSettings.aspectRatio,name:`interfaceSettings.aspectRatio`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,El,F(e.$t(`components.form.label.aspect_ratio`)),1),Q(i,null,{default:G(()=>[Q(a,{"model-value":l.value.interfaceSettings.aspectRatio,options:R(w),invalid:n.length>0,loading:R(D),type:`text`,onValueChange:t[13]||=e=>l.value.interfaceSettings.aspectRatio=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`interfaceSettings.aspectRatio`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.aspect_ratio`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),Q(p,{value:`detection`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,Dl,F(e.$t(`components.camera_options.detection`)),1)]),_:1}),Q(f,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,Ol,[V(`div`,kl,[Q(R(L),{"model-value":l.value.detectionSettings?.snooze,value:!0,"unchecked-value":!1,type:`checkbox`,name:`detectionSettings.snooze`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,Al,[V(`div`,jl,[V(`label`,Ml,F(e.$t(`components.form.label.snooze`)),1),Q(u,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.snooze_camera`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`detectionSettings.snooze`,class:`cui-input-switch-error`})]),_:1})]),Q(d,lt({"model-value":l.value.detectionSettings?.snooze},n,{invalid:r.length>0,loading:R(D),class:`ml-auto shrink-0`,onValueChange:t[14]||=e=>{l.value.detectionSettings&&(l.value.detectionSettings.snooze=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),Q(R(L),{"model-value":l.value.detectionSettings.motion.resolution,name:`detectionSettings.motion.resolution`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Nl,F(e.$t(`components.form.label.motion_resolution`)),1),Q(i,null,{default:G(()=>[Q(a,{"model-value":l.value.detectionSettings.motion.resolution,options:R(T),invalid:n.length>0,loading:R(D),type:`text`,onValueChange:t[15]||=e=>l.value.detectionSettings.motion.resolution=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`detectionSettings.motion.resolution`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.motion_resolution`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.detectionSettings.motion.timeout,name:`detectionSettings.motion.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Pl,F(e.$t(`components.form.label.motion_timeout`)),1),Q(i,null,{default:G(()=>[Q(m,{"model-value":l.value.detectionSettings.motion.timeout,invalid:n.length>0,loading:R(D),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[16]||=e=>l.value.detectionSettings.motion.timeout=e??void 0,onInput:t[17]||=e=>l.value.detectionSettings.motion.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`detectionSettings.motion.timeout`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.motion_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.detectionSettings.object.confidence,name:`detectionSettings.object.confidence`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Fl,F(e.$t(`components.form.label.confidence`)),1),Q(i,null,{default:G(()=>[Q(m,{"model-value":l.value.detectionSettings.object.confidence,invalid:n.length>0,loading:R(D),"show-buttons":``,step:.01,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[18]||=e=>l.value.detectionSettings.object.confidence=e??void 0,onInput:t[19]||=e=>l.value.detectionSettings.object.confidence=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`detectionSettings.object.confidence`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.detectionSettings.audio.minDecibels,name:`detectionSettings.audio.minDecibels`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Il,F(e.$t(`components.form.label.audio_min_decibels`)),1),Q(i,null,{default:G(()=>[Q(m,{"model-value":l.value.detectionSettings.audio.minDecibels,invalid:n.length>0,loading:R(D),"show-buttons":``,step:1,min:-100,max:0,mode:`decimal`,"use-grouping":!1,onValueChange:t[20]||=e=>l.value.detectionSettings.audio.minDecibels=e??void 0,onInput:t[21]||=e=>l.value.detectionSettings.audio.minDecibels=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`detectionSettings.audio.minDecibels`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.audio_min_decibels`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.detectionSettings.audio.timeout,name:`detectionSettings.audio.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Ll,F(e.$t(`components.form.label.audio_timeout`)),1),Q(i,null,{default:G(()=>[Q(m,{"model-value":l.value.detectionSettings.audio.timeout,invalid:n.length>0,loading:R(D),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[22]||=e=>l.value.detectionSettings.audio.timeout=e??void 0,onInput:t[23]||=e=>l.value.detectionSettings.audio.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`detectionSettings.audio.timeout`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.audio_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.detectionSettings.sensor?.timeout,name:`detectionSettings.sensor.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Rl,F(e.$t(`components.form.label.sensor_timeout`)),1),Q(i,null,{default:G(()=>[Q(m,{"model-value":l.value.detectionSettings.sensor?.timeout,invalid:n.length>0,loading:R(D),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[24]||=e=>{l.value.detectionSettings.sensor||(l.value.detectionSettings.sensor={timeout:30,triggers:[]}),l.value.detectionSettings.sensor.timeout=e??30},onInput:t[25]||=e=>{l.value.detectionSettings.sensor||(l.value.detectionSettings.sensor={timeout:30,triggers:[]}),l.value.detectionSettings.sensor.timeout=e.value??30}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`detectionSettings.sensor.timeout`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.sensor_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.detectionSettings.sensor?.triggers??[],name:`detectionSettings.sensor.triggers`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:t})=>[V(`label`,zl,F(e.$t(`components.form.label.sensor_triggers`)),1),Q(g,{"model-value":R(oe),invalid:t.length>0,options:R(ie),"option-label":`label`,"option-value":`value`,placeholder:e.$t(`components.form.hint.sensor_triggers_placeholder`),class:`w-full`,"show-toggle-all":!1,"onUpdate:modelValue":ce},null,8,[`model-value`,`invalid`,`options`,`placeholder`]),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`detectionSettings.sensor.triggers`,class:`cui-input-error`})]),_:1}),t.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.sensor_triggers`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),Q(p,{value:`ptzAutotrack`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,Bl,F(e.$t(`components.camera_options.ptz_autotrack`)),1)]),_:1}),Q(f,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,Vl,[R(re)?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-banner cui-banner-warn`},{default:G(()=>[Q(_,{class:`w-4 h-4 shrink-0 inline-block mr-1`}),X(` `+F(e.$t(`components.form.hint.ptz_autotrack_requires`)),1)]),_:1})),Q(R(L),{"model-value":l.value.ptzAutotrack?.enabled,value:!0,"unchecked-value":!1,type:`checkbox`,name:`ptzAutotrack.enabled`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,Hl,[V(`div`,Ul,[V(`label`,Wl,F(e.$t(`components.form.label.ptz_autotrack_enabled`)),1),Q(u,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`ptzAutotrack.enabled`,class:`cui-input-switch-error`})]),_:1})]),Q(d,lt({"model-value":l.value.ptzAutotrack?.enabled},n,{invalid:r.length>0,loading:R(D),disabled:!R(re),class:`ml-auto shrink-0`,onValueChange:t[26]||=e=>{l.value.ptzAutotrack&&(l.value.ptzAutotrack.enabled=e)}}),null,16,[`model-value`,`invalid`,`loading`,`disabled`])])]),_:1},8,[`model-value`]),l.value.ptzAutotrack?.enabled&&R(re)?($(),U(K,{key:1},[Q(R(L),{"model-value":l.value.ptzAutotrack?.targetLabels,name:`ptzAutotrack.targetLabels`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Gl,F(e.$t(`components.form.label.ptz_autotrack_target_labels`)),1),Q(g,{"model-value":l.value.ptzAutotrack?.targetLabels,options:R(E),"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:R(D),class:`w-full`,onValueChange:t[27]||=e=>{l.value.ptzAutotrack&&(l.value.ptzAutotrack.targetLabels=e)}},null,8,[`model-value`,`options`,`invalid`,`loading`]),Q(u,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_target_labels`)),1)]),_:1})]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.ptzAutotrack?.minConfidence,name:`ptzAutotrack.minConfidence`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Kl,F(e.$t(`components.form.label.ptz_autotrack_min_confidence`)),1),Q(m,{"model-value":l.value.ptzAutotrack?.minConfidence,min:.3,max:1,step:.05,"min-fraction-digits":2,"max-fraction-digits":2,invalid:n.length>0,loading:R(D),class:`w-full`,onValueChange:t[28]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.minConfidence=e)}},null,8,[`model-value`,`invalid`,`loading`]),Q(u,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_min_confidence`)),1)]),_:1})]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.ptzAutotrack?.triggerDeadZone,name:`ptzAutotrack.triggerDeadZone`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,ql,F(e.$t(`components.form.label.ptz_autotrack_trigger_dead_zone`)),1),Q(m,{"model-value":l.value.ptzAutotrack?.triggerDeadZone,min:0,max:.3,step:.01,"min-fraction-digits":2,"max-fraction-digits":2,invalid:n.length>0,loading:R(D),class:`w-full`,onValueChange:t[29]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.triggerDeadZone=e)}},null,8,[`model-value`,`invalid`,`loading`]),Q(u,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_trigger_dead_zone`)),1)]),_:1})]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.ptzAutotrack?.returnToHome,value:!0,"unchecked-value":!1,type:`checkbox`,name:`ptzAutotrack.returnToHome`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,Jl,[V(`div`,Yl,[V(`label`,Xl,F(e.$t(`components.form.label.ptz_autotrack_return_home`)),1),Q(u,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_return_home`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`ptzAutotrack.returnToHome`,class:`cui-input-switch-error`})]),_:1})]),Q(d,lt({"model-value":l.value.ptzAutotrack?.returnToHome},n,{invalid:r.length>0,loading:R(D),class:`ml-auto shrink-0`,onValueChange:t[30]||=e=>{l.value.ptzAutotrack&&(l.value.ptzAutotrack.returnToHome=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),l.value.ptzAutotrack?.returnToHome?($(),H(R(L),{key:0,"model-value":l.value.ptzAutotrack?.homeWaitMs,name:`ptzAutotrack.homeWaitMs`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Zl,F(e.$t(`components.form.label.ptz_autotrack_home_wait`)),1),Q(m,{"model-value":(l.value.ptzAutotrack?.homeWaitMs??0)/1e3,min:1,max:60,step:1,suffix:` s`,invalid:n.length>0,loading:R(D),class:`w-full`,onValueChange:t[31]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.homeWaitMs=e*1e3)}},null,8,[`model-value`,`invalid`,`loading`]),Q(u,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_home_wait`)),1)]),_:1})]),_:1},8,[`model-value`])):q(``,!0)],64)):q(``,!0)])]),_:1})]),_:1}),Q(p,{value:`zones`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,Ql,F(e.$t(`components.camera_options.zones`)),1)]),_:1}),Q(f,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,$l,[Q(s,{fluid:``,class:`cui-button-medium`,loading:R(D),label:e.$t(`components.form.button.edit_zones`),onClick:t[32]||=e=>de(R(h).detectionZones)},null,8,[`loading`,`label`])])]),_:1})]),_:1}),Q(p,{value:`snapshot`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,eu,F(e.$t(`components.camera_options.snapshot`)),1)]),_:1}),Q(f,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,tu,[V(`div`,nu,[Q(R(L),{"model-value":l.value.snapshotSettings.autoRefresh,value:!0,"unchecked-value":!1,type:`checkbox`,name:`snapshotSettings.autoRefresh`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,ru,[V(`div`,iu,[V(`label`,au,F(e.$t(`components.form.label.auto_refresh`)),1),Q(u,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.auto_refresh`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`snapshotSettings.autoRefresh`,class:`cui-input-switch-error`})]),_:1})]),Q(d,lt({"model-value":l.value.snapshotSettings.autoRefresh},n,{invalid:r.length>0,loading:R(D),class:`ml-auto shrink-0`,onValueChange:t[33]||=e=>l.value.snapshotSettings.autoRefresh=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),Q(R(L),{"model-value":l.value.snapshotSettings.ttl,name:`snapshotSettings.ttl`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,ou,F(e.$t(`components.form.label.cache_time`)),1),Q(i,null,{default:G(()=>[Q(m,{"model-value":l.value.snapshotSettings.ttl,invalid:n.length>0,loading:R(D),min:10,"show-buttons":``,"use-grouping":!1,onValueChange:t[34]||=e=>l.value.snapshotSettings.ttl=e??10,onInput:t[35]||=e=>l.value.snapshotSettings.ttl=e.value??10},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`snapshotSettings.ttl`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.cache_time`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(L),{"model-value":l.value.snapshotSettings.interval,name:`snapshotSettings.interval`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,su,F(e.$t(`components.form.label.refresh_interval`)),1),Q(i,null,{default:G(()=>[Q(m,{"model-value":l.value.snapshotSettings.interval,invalid:n.length>0,loading:R(D),min:10,max:60,"show-buttons":``,"use-grouping":!1,onValueChange:t[36]||=e=>l.value.snapshotSettings.interval=e??30,onInput:t[37]||=e=>l.value.snapshotSettings.interval=e.value??30},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`snapshotSettings.interval`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.refresh_interval`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),Q(p,{value:`frameworker`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,cu,F(e.$t(`components.camera_options.frame_worker`)),1)]),_:1}),Q(f,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,lu,[Q(R(L),{"model-value":l.value.frameWorkerSettings.fps,name:`frameWorkerSettings.fps`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,uu,F(e.$t(`components.form.label.fps`)),1),Q(i,null,{default:G(()=>[Q(m,{"model-value":l.value.frameWorkerSettings.fps,invalid:n.length>0,loading:R(D),min:0,"show-buttons":``,"use-grouping":!1,onValueChange:t[38]||=e=>l.value.frameWorkerSettings.fps=e??void 0,onInput:t[39]||=e=>l.value.frameWorkerSettings.fps=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`frameWorkerSettings.fps`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(u,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.frameworker_fps`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1})]),_:1})}}}),fu={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function pu(e,t){return $(),U(`svg`,fu,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M6.97.47a.75.75 0 0 1 1.06 0l1.75 1.75a.75.75 0 0 1 0 1.06L8.03 5.03a.75.75 0 0 1-1.06-1.06l.43-.43a4.5 4.5 0 0 0-2.28 7.918a.75.75 0 0 1-.961 1.152A6 6 0 0 1 7.463 2.024L6.97 1.53a.75.75 0 0 1 0-1.06m3.815 3.016a.75.75 0 0 1 1.056-.096a6 6 0 0 1-3.304 10.586l.493.494a.75.75 0 1 1-1.06 1.06l-1.75-1.75a.75.75 0 0 1 0-1.06l1.75-1.75a.75.75 0 0 1 1.06 1.06l-.43.43a4.5 4.5 0 0 0 2.28-7.918a.75.75 0 0 1-.095-1.056`},null,-1)]])}var mu=Y({name:`fluent-arrow-sync-16-filled`,render:pu}),hu={class:`flex items-center justify-between`},gu={class:`cui-label`},_u={class:`flex flex-col field-gap`},vu={class:`cui-label`},yu={class:`cui-label`},bu={class:`cui-label`},xu={key:0,class:`flex flex-col field-gap`},Su={class:`cui-label`},Cu={key:1,class:`flex flex-col field-gap`},wu={class:`cui-label`},Tu=Z({__name:`CameraSource`,props:{cameraId:{},cameraName:{},source:{},loading:{type:Boolean}},setup(e){let t=new wr,n=e,{t:r}=le(),{getSourceStatus:i,connect:a}=ni(),{copy:o}=Me({legacy:!0}),s=ct(),l=Je(),u=[`probe`,`preload`],{cameraId:d,cameraName:f,source:p,loading:m}=Dt(n),h=W(!1),{data:g,isBusy:_}=t.probeCameraSourceQuery(f.value,p.value.name,{video:!0,audio:!0,microphone:!0});a();let v=J(()=>i(d.value,p.value.name)),y=J(()=>{switch(v.value){case`connected`:return`success`;case`connecting`:return`warn`;case`error`:return`danger`;default:return`secondary`}}),b=J(()=>{switch(v.value){case`connected`:return r(`components.camera_table.online`);case`connecting`:return r(`components.camera_table.connecting`);case`error`:return r(`components.camera_table.error`);default:return r(`components.camera_table.idle`)}}),ee=J(()=>!!(m.value||_.value)),x=J(()=>g.value?.probe.consumers.filter(e=>!u.includes(e.format_name)).length||0),S=J(()=>te(`video`)),C=J(()=>te(`audio`));function te(e){let t=(g.value?.probe.producers??[]).flatMap(e=>e.receivers??[]).filter(t=>t.codec.codec_type===e).map(e=>e.codec.codec_name);return[...new Set(t)]}async function w(){if(!h.value){h.value=!0;try{let e=await Cr({cameraname:f.value,sourcename:p.value.name,probeConfig:{video:!0,audio:!0,microphone:!0},force:!0});s.setQueryData([`cameras`,f.value,`probe`,p.value.name],e)}catch{l.add({severity:`error`,detail:r(`components.toast.probe_failed`),life:3e3})}finally{h.value=!1}}}return(e,t)=>{let n=Kn,r=ke,i=c,a=Rn,s=Bn,l=or,u=Tr,d=In;return $(),U(K,null,[V(`div`,hu,[V(`label`,gu,F(e.$t(`components.form.label.stream_status`)),1),Q(n,{severity:R(y),value:R(b)},null,8,[`severity`,`value`])]),V(`div`,_u,[V(`label`,vu,F(e.$t(`components.form.label.connections`)),1),Q(s,null,{default:G(()=>[Q(r,{value:R(x),loading:R(ee),readonly:``,type:`text`},null,8,[`value`,`loading`]),Q(a,null,{default:G(()=>[Ft(($(),H(i,{severity:`secondary`,text:``,loading:R(h),disabled:R(ee),onClick:w},{icon:G(()=>[Q(R(mu),{class:`w-4 h-4`})]),_:1},8,[`loading`,`disabled`])),[[d,e.$t(`components.form.button.reload`),void 0,{left:!0}]])]),_:1})]),_:1}),Q(l,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.connections`)),1)]),_:1})]),($(!0),U(K,null,B(R(S),(t,n)=>($(),U(`div`,{key:n,class:`flex flex-col field-gap`},[V(`label`,yu,F(e.$t(`components.form.label.video_codec`)),1),Q(s,null,{default:G(()=>[Q(r,{"model-value":t,loading:R(ee),readonly:``,type:`text`},null,8,[`model-value`,`loading`])]),_:2},1024),n===R(S).length-1?($(),H(l,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.video_codec`)),1)]),_:1})):q(``,!0)]))),128)),($(!0),U(K,null,B(R(C),(t,n)=>($(),U(`div`,{key:n,class:`flex flex-col field-gap`},[V(`label`,bu,F(e.$t(`components.form.label.audio_codec`)),1),Q(s,null,{default:G(()=>[Q(r,{"model-value":t,loading:R(ee),readonly:``,type:`text`},null,8,[`model-value`,`loading`])]),_:2},1024),n===R(C).length-1?($(),H(l,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.audio_codec`)),1)]),_:1})):q(``,!0)]))),128)),R(p).role===`snapshot`?q(``,!0):($(),U(`div`,xu,[V(`label`,Su,F(e.$t(`components.form.label.rtsp_url`)),1),Q(s,null,{default:G(()=>[Q(r,{"model-value":R(g)?.rtspUrl,loading:R(ee),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),Q(a,null,{default:G(()=>[Q(u,{"action-text":e.$t(`components.form.tooltip.copied`),icon:R(Er),"button-props":{severity:`secondary`,disabled:!R(g)?.rtspUrl,loading:R(ee),text:!0},onAction:t[0]||=e=>R(o)(R(g).rtspUrl)},null,8,[`action-text`,`icon`,`button-props`])]),_:1})]),_:1}),Q(l,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.rtsp_url`)),1)]),_:1})])),R(p).role===`snapshot`?q(``,!0):($(),U(`div`,Cu,[V(`label`,wu,F(e.$t(`components.form.label.onvif_url`)),1),Q(s,null,{default:G(()=>[Q(r,{"model-value":R(g)?.onvifUrl,loading:R(ee),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),Q(a,null,{default:G(()=>[Q(u,{"action-text":e.$t(`components.form.tooltip.copied`),icon:R(Er),"button-props":{severity:`secondary`,disabled:!R(g)?.onvifUrl,loading:R(ee),text:!0},onAction:t[1]||=e=>R(o)(R(g).onvifUrl)},null,8,[`action-text`,`icon`,`button-props`])]),_:1})]),_:1}),Q(l,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.onvif_url`)),1)]),_:1})]))],64)}}}),Eu={class:`flex gap-2 items-center w-full`},Du={class:`text-color font-normal`},Ou={class:`flex flex-col gap-6`},ku=[`for`],Au=[`for`],ju={class:`w-full flex flex-col gap-2`},Mu={class:`flex items-center gap-4`},Nu={class:`flex flex-col field-switch-gap`},Pu=[`for`],Fu={class:`flex items-center gap-4`},Iu={class:`flex flex-col field-switch-gap`},Lu=[`for`],Ru={class:`flex items-center gap-4`},zu={class:`flex flex-col field-switch-gap`},Bu=[`for`],Vu=[`for`],Hu={class:`flex flex-col gap-6`},Uu={class:`flex flex-col field-gap`},Wu=[`for`],Gu={class:`w-full flex items-center justify-center my-3`},Ku=Z({__name:`Sources`,props:jt({camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:jt([`close`],[`update:modelValue`]),setup(e){let t=e,n=xt(e,`modelValue`),{t:r}=le(),{camera:i,loading:a}=Dt(t),o=W([`high-resolution`,`mid-resolution`,`low-resolution`,`snapshot`]);function s(e){return e.name.replace(/ /g,`_`).toLowerCase()}function l(e){let t=[{label:r(`components.form.label.none`),value:void 0}],i=n.value.sources[e],a=n.value;for(let e of a.sources)e.role!==`snapshot`&&e._id!==i._id&&(!e.name||!e._id||t.push({label:e.name,value:e._id}));return t}function u(e){return n.value.sources[e].childSourceId}function d(e,t){t==null?n.value.sources[e].childSourceId=null:n.value.sources[e].childSourceId=t}function f(e){n.value.sources[e].urls.push(``)}function p(e){n.value.sources.splice(e,1)}function m(e,t){n.value.sources[e].urls.splice(t,1)}function h(){n.value&&n.value.sources.push({_id:``,name:``,role:null,urls:[],useForSnapshot:!1,hotMode:!0,preload:!0})}return(e,t)=>{let r=On,g=c,_=zn,v=ke,y=Bn,b=or,ee=Tu,x=Yn,S=Ln,C=Rn,te=Xn,w=Mn,T=Nn,ne=Wr;return $(),U(K,null,[Q(T,{multiple:``,class:`p-4`},{default:G(()=>[($(!0),U(K,null,B(n.value.sources,(t,c)=>($(),H(w,{key:c,value:c},{default:G(()=>[Q(_,{class:P({"px-0 pt-0":c===0,"px-0":c!==0})},{default:G(()=>[V(`div`,Eu,[V(`span`,Du,F(e.$t(`components.camera_options.source`)+`: `+s(t)),1),Q(g,{text:``,rounded:``,loading:R(a),disabled:n.value.sources.length<2,severity:`danger`,class:`cui-icon-md ml-auto mr-2`,onClick:e=>p(c)},{icon:G(()=>[Q(r,{width:`100%`,height:`100%`})]),_:1},8,[`loading`,`disabled`,`onClick`])])]),_:2},1032,[`class`]),Q(te,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,Ou,[Q(R(L),{modelValue:t.name,"onUpdate:modelValue":e=>t.name=e,modelModifiers:{trim:!0},name:`sources[${c}].name`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:n,errors:r})=>[V(`label`,{for:`sources[${c}].name`,class:`cui-label`},F(e.$t(`components.form.label.source_name`)),9,ku),Q(y,null,{default:G(()=>[Q(v,lt({ref_for:!0},n,{invalid:r.length>0,loading:R(a),readonly:R(i).sources.some(e=>e.name===t.name),type:`text`}),null,16,[`invalid`,`loading`,`readonly`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`sources[${c}].name`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),r.length?q(``,!0):($(),H(b,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.source_name`)),1)]),_:1}))]),_:2},1032,[`modelValue`,`onUpdate:modelValue`,`name`]),t._id?($(),H(ee,{key:0,"camera-id":R(i)._id,"camera-name":R(i).name,source:t,loading:R(a)},null,8,[`camera-id`,`camera-name`,`source`,`loading`])):q(``,!0),Q(R(L),{"model-value":t.role,name:`sources[${c}].role`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:r})=>[V(`label`,{for:`sources[${c}].role`,class:`cui-label`},F(e.$t(`components.form.label.source_role`)),9,Au),Q(y,null,{default:G(()=>[Q(x,{"model-value":t.role,options:R(o).filter(e=>!n.value.sources.some(n=>n.role===e&&n._id!==t._id)),invalid:r.length>0,loading:R(a),onValueChange:e=>t.role=e},null,8,[`model-value`,`options`,`invalid`,`loading`,`onValueChange`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`sources[${c}].role`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),r.length?q(``,!0):($(),H(b,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.source_role`)),1)]),_:1}))]),_:2},1032,[`model-value`,`name`]),V(`div`,ju,[t.role!==`snapshot`&&n.value.sources.length>1?($(),H(R(L),{key:0,"model-value":t.useForSnapshot,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${c}].useForSnapshot`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:r,errors:i})=>[V(`div`,Mu,[V(`div`,Nu,[V(`label`,{for:`sources[${c}].useForSnapshot`,class:`cui-label-switch`},F(e.$t(`components.form.label.use_for_snapshot`)),9,Pu),Q(b,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.use_for_snapshot`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`sources[${c}].useForSnapshot`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Q(S,lt({"model-value":t.useForSnapshot},{ref_for:!0},r,{invalid:i.length>0,loading:R(a),disabled:n.value.sources.some(e=>(e.useForSnapshot||e.role===`snapshot`)&&e._id!==t._id),class:`ml-auto shrink-0`,onValueChange:e=>t.useForSnapshot=e}),null,16,[`model-value`,`invalid`,`loading`,`disabled`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`])):q(``,!0),t.role===`snapshot`?q(``,!0):($(),H(R(L),{key:1,"model-value":t.hotMode,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${c}].hotMode`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,Fu,[V(`div`,Iu,[V(`label`,{for:`sources[${c}].hotMode`,class:`cui-label-switch`},F(e.$t(`components.form.label.hot_mode`)),9,Lu),Q(b,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.hot_mode`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`sources[${c}].hotMode`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Q(S,lt({"model-value":t.hotMode},{ref_for:!0},n,{invalid:r.length>0,loading:R(a),class:`ml-auto shrink-0`,onValueChange:e=>t.hotMode=e}),null,16,[`model-value`,`invalid`,`loading`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`])),t.role===`snapshot`?q(``,!0):($(),H(R(L),{key:2,"model-value":t.preload,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${c}].preload`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,Ru,[V(`div`,zu,[V(`label`,{for:`sources[${c}].preload`,class:`cui-label-switch`},F(e.$t(`components.form.label.preload`)),9,Bu),Q(b,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.preload`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`sources[${c}].preload`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Q(S,lt({"model-value":t.preload},{ref_for:!0},n,{invalid:r.length>0,loading:R(a),class:`ml-auto shrink-0`,onValueChange:e=>t.preload=e}),null,16,[`model-value`,`invalid`,`loading`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`]))]),t.role===`snapshot`?q(``,!0):($(),H(R(L),{key:1,"model-value":u(c),name:`sources[${c}].childSourceId`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:t})=>[V(`label`,{for:`sources[${c}].childSourceId`,class:`cui-label`},F(e.$t(`components.form.label.pip_source`)),9,Vu),Q(y,null,{default:G(()=>[Q(x,{"model-value":u(c),options:l(c),"option-label":`label`,"option-value":`value`,invalid:t.length>0,loading:R(a),placeholder:e.$t(`components.form.label.none`),"show-clear":``,onValueChange:e=>d(c,e)},null,8,[`model-value`,`options`,`invalid`,`loading`,`placeholder`,`onValueChange`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`sources[${c}].childSourceId`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),t.length?q(``,!0):($(),H(b,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.pip_source`)),1)]),_:1}))]),_:2},1032,[`model-value`,`name`])),V(`div`,Hu,[V(`div`,Uu,[V(`label`,{for:`sources[${c}].urls[]`,class:`cui-label`},F(e.$t(`components.form.label.sources`)),9,Wu),Q(b,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.source_urls`)),1)]),_:1})]),($(!0),U(K,null,B(t.urls,(e,n)=>($(),H(R(L),{key:n,modelValue:t.urls[n],"onUpdate:modelValue":e=>t.urls[n]=e,modelModifiers:{trim:!0},name:`sources[${c}].urls[${n}]`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:e,errors:i})=>[Q(y,null,{default:G(()=>[Q(v,lt({ref_for:!0},e,{invalid:i.length>0,loading:R(a),type:`text`}),null,16,[`invalid`,`loading`]),t.urls.length>1?($(),H(C,{key:0},{default:G(()=>[Q(g,{text:``,severity:`secondary`,loading:R(a),class:`cui-icon-md`,onClick:e=>m(c,n)},{icon:G(()=>[Q(r,{width:`100%`,height:`100%`})]),_:1},8,[`loading`,`onClick`])]),_:2},1024)):q(``,!0)]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(I),{name:`sources[${c}].urls[${n}]`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`,`name`]))),128)),Q(g,{loading:R(a),label:e.$t(`components.form.button.add_source`),class:`ml-auto cui-button-medium`,onClick:e=>f(c)},null,8,[`loading`,`label`,`onClick`])])])]),_:2},1024)]),_:2},1032,[`value`]))),128))]),_:1}),V(`div`,Gu,[Q(g,{text:``,rounded:``,loading:R(a),class:`cui-icon-xl`,onClick:h},{icon:G(()=>[Q(ne,{width:`100%`,height:`100%`})]),_:1},8,[`loading`])])],64)}}}),qu={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ju(e,t){return $(),U(`svg`,qu,[...t[0]||=[V(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M10 17h.01M10 7v6m4-7h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2m8-4v-4M6 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2`},null,-1)]])}var Yu=Y({name:`lucide-battery-warning`,render:Ju}),Xu={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Zu(e,t){return $(),U(`svg`,Xu,[...t[0]||=[V(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[V(`path`,{d:`M22 14v-4M6 14v-4`}),V(`rect`,{width:`16`,height:`12`,x:`2`,y:`6`,rx:`2`})],-1)]])}var Qu=Y({name:`lucide-battery-low`,render:Zu}),$u={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ed(e,t){return $(),U(`svg`,$u,[...t[0]||=[V(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[V(`path`,{d:`M10 14v-4m12 4v-4M6 14v-4`}),V(`rect`,{width:`16`,height:`12`,x:`2`,y:`6`,rx:`2`})],-1)]])}var td=Y({name:`lucide-battery-medium`,render:ed}),nd={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function rd(e,t){return $(),U(`svg`,nd,[...t[0]||=[V(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[V(`path`,{d:`M10 10v4m4-4v4m8 0v-4M6 10v4`}),V(`rect`,{width:`16`,height:`12`,x:`2`,y:`6`,rx:`2`})],-1)]])}var id=Y({name:`lucide-battery-full`,render:rd}),ad={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function od(e,t){return $(),U(`svg`,ad,[...t[0]||=[V(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m11 7l-3 5h4l-3 5m5.856-11H16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.935M22 14v-4M5.14 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2.936`},null,-1)]])}var sd=Y({name:`lucide-battery-charging`,render:od}),cd={class:`cui-battery-info__header`},ld={class:`cui-battery-info__icon`},ud={class:`cui-battery-info__info`},dd={key:0,class:`cui-battery-info__label`},fd={class:`cui-battery-info__bar`},pd=mn(Z({__name:`CuiBatteryInfo`,props:{level:{default:100},charging:{default:`NOT_CHARGING`},low:{type:Boolean,default:!1},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},setup(e){let t=e,{t:n}=le(),{level:r,label:i,disabled:a,size:o,charging:s,low:c}=Dt(t),l=J(()=>s.value===`CHARGING`),u=J(()=>s.value===`FULL`||r.value===100),d=J(()=>c.value||r.value<=20),f=J(()=>s.value===`CHARGING`?n(`components.battery_info.charging`):s.value===`FULL`?n(`components.battery_info.fully_charged`):s.value===`NOT_CHARGEABLE`?n(`components.battery_info.not_chargeable`):r.value<=10?n(`components.battery_info.critically_low`):r.value<=20?n(`components.battery_info.low`):n(`components.battery_info.ready`)),p=J(()=>l.value?`cui-battery-info__status--charging`:u.value?`cui-battery-info__status--full`:r.value<=10?`cui-battery-info__status--critical`:d.value?`cui-battery-info__status--low`:``),m=J(()=>l.value?`cui-battery-info__level--charging`:u.value?`cui-battery-info__level--full`:r.value<=10?`cui-battery-info__level--critical`:d.value?`cui-battery-info__level--low`:``),h=J(()=>({color:`rgb(59, 130, 246)`,filter:`drop-shadow(0 0 6px rgba(59, 130, 246, 0.5))`})),g=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.5))`})),_=J(()=>({color:`rgb(34, 197, 94)`})),v=J(()=>({color:`rgb(234, 179, 8)`})),y=J(()=>({color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 6px rgba(239, 68, 68, 0.5))`})),b=J(()=>{let e=`rgb(34, 197, 94)`;return l.value?e=`rgb(59, 130, 246)`:r.value<=10?e=`rgb(239, 68, 68)`:r.value<=20&&(e=`rgb(234, 179, 8)`),{width:`${r.value}%`,backgroundColor:e}});return(e,t)=>{let n=sd,s=id,c=td,u=Qu,ee=Yu;return $(),U(`div`,{class:P([`cui-battery-info`,[`cui-battery-info--${R(o)}`,{"cui-battery-info--disabled":R(a),"cui-battery-info--low":R(d),"cui-battery-info--charging":R(l)}]])},[V(`div`,cd,[V(`div`,ld,[R(l)?($(),H(n,{key:0,class:`cui-battery-info__icon-svg`,style:z(R(h))},null,8,[`style`])):R(r)>=90?($(),H(s,{key:1,class:`cui-battery-info__icon-svg`,style:z(R(g))},null,8,[`style`])):R(r)>=50?($(),H(c,{key:2,class:`cui-battery-info__icon-svg`,style:z(R(_))},null,8,[`style`])):R(r)>=20?($(),H(u,{key:3,class:`cui-battery-info__icon-svg`,style:z(R(v))},null,8,[`style`])):($(),H(ee,{key:4,class:`cui-battery-info__icon-svg cui-battery-info__icon-svg--critical`,style:z(R(y))},null,8,[`style`]))]),V(`div`,ud,[R(i)?($(),U(`span`,dd,F(R(i)),1)):q(``,!0),V(`span`,{class:P([`cui-battery-info__status`,R(p)])},F(R(f)),3)]),V(`div`,{class:P([`cui-battery-info__level`,R(m)])},F(R(r))+`%`,3)]),V(`div`,fd,[V(`div`,{class:`cui-battery-info__bar-fill`,style:z(R(b))},null,4)])],2)}}}),[[`__scopeId`,`data-v-c181f3d4`]]),md={class:`cui-humidity-info__header`},hd={class:`cui-humidity-info__icon`},gd={class:`cui-humidity-info__info`},_d={key:0,class:`cui-humidity-info__label`},vd=mn(Z({__name:`CuiHumidityInfo`,props:{current:{},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},setup(e){let{label:t,current:n,disabled:r,size:i}=Dt(e),a=J(()=>n.value==null?`rgb(156, 163, 175)`:n.value<30?`rgb(251, 146, 60)`:n.value<=60?`rgb(34, 197, 94)`:`rgb(59, 130, 246)`),o=J(()=>({color:a.value,filter:`drop-shadow(0 0 6px ${a.value.replace(`rgb`,`rgba`).replace(`)`,`, 0.5)`)})`})),s=J(()=>({color:a.value}));return(e,c)=>{let l=dn;return $(),U(`div`,{class:P([`cui-humidity-info`,[`cui-humidity-info--${R(i)}`,{"cui-humidity-info--disabled":R(r)}]])},[V(`div`,md,[V(`div`,hd,[Q(l,{class:`cui-humidity-info__icon-svg`,style:z(R(o))},null,8,[`style`])]),V(`div`,gd,[R(t)?($(),U(`span`,_d,F(R(t)),1)):q(``,!0),V(`span`,{class:`cui-humidity-info__status`,style:z({color:R(a)})},F(R(n)==null?`--`:`${R(n)}%`),5)]),V(`div`,{class:`cui-humidity-info__value`,style:z(R(s))},F(R(n)==null?`--`:`${R(n)}%`),5)])],2)}}}),[[`__scopeId`,`data-v-1f41d794`]]),yd={class:`cui-temperature-info__header`},bd={class:`cui-temperature-info__icon`},xd={class:`cui-temperature-info__info`},Sd={key:0,class:`cui-temperature-info__label`},Cd=mn(Z({__name:`CuiTemperatureInfo`,props:{current:{},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},setup(e){let{label:t,current:n,disabled:r,size:i}=Dt(e),a=J(()=>n.value==null?`rgb(156, 163, 175)`:n.value<5?`rgb(59, 130, 246)`:n.value<15?`rgb(6, 182, 212)`:n.value<25?`rgb(34, 197, 94)`:n.value<35?`rgb(251, 146, 60)`:`rgb(239, 68, 68)`),o=J(()=>({color:a.value,filter:`drop-shadow(0 0 6px ${a.value.replace(`rgb`,`rgba`).replace(`)`,`, 0.5)`)})`})),s=J(()=>({color:a.value}));return(e,c)=>{let l=rn;return $(),U(`div`,{class:P([`cui-temperature-info`,[`cui-temperature-info--${R(i)}`,{"cui-temperature-info--disabled":R(r)}]])},[V(`div`,yd,[V(`div`,bd,[Q(l,{class:`cui-temperature-info__icon-svg`,style:z(R(o))},null,8,[`style`])]),V(`div`,xd,[R(t)?($(),U(`span`,Sd,F(R(t)),1)):q(``,!0),V(`span`,{class:`cui-temperature-info__status`,style:z({color:R(a)})},F(R(n)==null?`--`:`${R(n)}°C`),5)]),V(`div`,{class:`cui-temperature-info__value`,style:z(R(s))},F(R(n)==null?`--`:`${R(n)}°C`),5)])],2)}}}),[[`__scopeId`,`data-v-0edddec9`]]),wd={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Td(e,t){return $(),U(`svg`,wd,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M20 9v11h-2v-9H2v9H0V9l10-4zm-3 3H3v2h14zm0 3H3v2h14zm5 0v-5h2v5zm0 4v-2h2v2z`},null,-1)]])}var Ed=Y({name:`mdi-garage-alert-variant`,render:Td}),Dd=function(e){return e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e[e.Opening=2]=`Opening`,e[e.Closing=3]=`Closing`,e[e.Stopped=4]=`Stopped`,e}({}),Od=function(e){return e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e}({}),kd={currentState:1,targetState:1,obstructionDetected:!1,disabled:!1,size:`medium`},Ad={class:`cui-garage-control__header`},jd={class:`cui-garage-control__icon`},Md={key:3,class:`cui-garage-control__obstruction`},Nd={class:`cui-garage-control__info`},Pd={key:0,class:`cui-garage-control__label`},Fd=mn(Z({__name:`CuiGarageControl`,props:ht({currentState:{},targetState:{},obstructionDetected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},kd),emits:[`update:targetState`],setup(e,{emit:t}){let n=e,r=t,{t:i}=le(),{currentState:a}=Dt(n),o=J(()=>a.value===Dd.Open||a.value===Dd.Opening),s=J(()=>{switch(a.value){case Dd.Open:return i(`components.garage_control.open`);case Dd.Closed:return i(`components.garage_control.closed`);case Dd.Opening:return i(`components.garage_control.opening`);case Dd.Closing:return i(`components.garage_control.closing`);case Dd.Stopped:return i(`components.garage_control.stopped`);default:return``}}),c=J(()=>{switch(a.value){case Dd.Open:return`cui-garage-control__status--open`;case Dd.Opening:case Dd.Closing:return`cui-garage-control__status--transitioning`;case Dd.Stopped:return`cui-garage-control__status--stopped`;default:return``}}),l=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.5))`})),u=J(()=>({color:`rgb(250, 204, 21)`,filter:`drop-shadow(0 0 8px rgba(250, 204, 21, 0.5))`})),d=J(()=>({color:`rgb(251, 146, 60)`}));function f(e){r(`update:targetState`,e?Od.Open:Od.Closed)}return(t,n)=>{let r=Ed,i=en,p=Jt,m=Ln;return $(),U(`div`,{class:P([`cui-garage-control`,[`cui-garage-control--${e.size}`,{"cui-garage-control--disabled":e.disabled}]])},[V(`div`,Ad,[V(`div`,jd,[R(a)===R(Dd).Stopped?($(),H(r,{key:0,class:`cui-garage-control__icon-svg`,style:z(R(d))},null,8,[`style`])):R(a)===R(Dd).Open||R(a)===R(Dd).Opening?($(),H(i,{key:1,class:`cui-garage-control__icon-svg`,style:z(R(a)===R(Dd).Open?R(l):R(u))},null,8,[`style`])):($(),H(p,{key:2,class:`cui-garage-control__icon-svg`,style:z(R(a)===R(Dd).Closing?R(u):void 0)},null,8,[`style`])),e.obstructionDetected?($(),U(`span`,Md)):q(``,!0)]),V(`div`,Nd,[e.label?($(),U(`span`,Pd,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-garage-control__status`,R(c)])},F(R(s)),3)]),Q(m,{"model-value":R(o),disabled:e.disabled,class:`ml-auto shrink-0`,"onUpdate:modelValue":f},null,8,[`model-value`,`disabled`])])],2)}}}),[[`__scopeId`,`data-v-4c6505c2`]]),Id={detected:!1,disabled:!1,size:`medium`},Ld={class:`cui-leak-sensor__header`},Rd={class:`cui-leak-sensor__icon`},zd={class:`cui-leak-sensor__info`},Bd={key:0,class:`cui-leak-sensor__label`},Vd=mn(Z({__name:`CuiLeakSensor`,props:ht({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Id),setup(e){let t=e,{t:n}=le(),{detected:r}=Dt(t),i=J(()=>({color:`rgb(59, 130, 246)`,filter:`drop-shadow(0 0 6px rgba(59, 130, 246, 0.5))`})),a=J(()=>({color:`var(--text-secondary-color)`})),o=J(()=>r.value?`cui-leak-sensor__status--detected`:`cui-leak-sensor__status--clear`),s=J(()=>r.value?`cui-leak-sensor__indicator--detected`:`cui-leak-sensor__indicator--clear`);return(t,c)=>{let l=an,u=tn;return $(),U(`div`,{class:P([`cui-leak-sensor`,[`cui-leak-sensor--${e.size}`,{"cui-leak-sensor--disabled":e.disabled,"cui-leak-sensor--clear":!R(r),"cui-leak-sensor--detected":R(r)}]])},[V(`div`,Ld,[V(`div`,Rd,[R(r)?($(),H(l,{key:0,class:`cui-leak-sensor__icon-svg`,style:z(R(i))},null,8,[`style`])):($(),H(u,{key:1,class:`cui-leak-sensor__icon-svg`,style:z(R(a))},null,8,[`style`]))]),V(`div`,zd,[e.label?($(),U(`span`,Bd,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-leak-sensor__status`,R(o)])},F(R(r)?R(n)(`components.leak_sensor.detected`):R(n)(`components.leak_sensor.clear`)),3)]),V(`div`,{class:P([`cui-leak-sensor__indicator`,R(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-14a46a3f`]]),Hd={detected:!1,disabled:!1,size:`medium`},Ud={class:`cui-smoke-sensor__header`},Wd={class:`cui-smoke-sensor__icon`},Gd={class:`cui-smoke-sensor__info`},Kd={key:0,class:`cui-smoke-sensor__label`},qd=mn(Z({__name:`CuiSmokeSensor`,props:ht({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Hd),setup(e){let t=e,{t:n}=le(),{detected:r}=Dt(t),i=J(()=>({color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 6px rgba(239, 68, 68, 0.5))`})),a=J(()=>({color:`var(--text-secondary-color)`})),o=J(()=>r.value?`cui-smoke-sensor__status--detected`:`cui-smoke-sensor__status--clear`),s=J(()=>r.value?`cui-smoke-sensor__indicator--detected`:`cui-smoke-sensor__indicator--clear`);return(t,c)=>{let l=$t,u=sn;return $(),U(`div`,{class:P([`cui-smoke-sensor`,[`cui-smoke-sensor--${e.size}`,{"cui-smoke-sensor--disabled":e.disabled,"cui-smoke-sensor--clear":!R(r),"cui-smoke-sensor--detected":R(r)}]])},[V(`div`,Ud,[V(`div`,Wd,[R(r)?($(),H(l,{key:0,class:`cui-smoke-sensor__icon-svg`,style:z(R(i))},null,8,[`style`])):($(),H(u,{key:1,class:`cui-smoke-sensor__icon-svg`,style:z(R(a))},null,8,[`style`]))]),V(`div`,Gd,[e.label?($(),U(`span`,Kd,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-smoke-sensor__status`,R(o)])},F(R(r)?R(n)(`components.smoke_sensor.detected`):R(n)(`components.smoke_sensor.clear`)),3)]),V(`div`,{class:P([`cui-smoke-sensor__indicator`,R(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-4db50b68`]]),Jd={detected:!1,disabled:!1,size:`medium`},Yd={class:`cui-occupancy-sensor__header`},Xd={class:`cui-occupancy-sensor__icon`},Zd={class:`cui-occupancy-sensor__info`},Qd={key:0,class:`cui-occupancy-sensor__label`},$d=mn(Z({__name:`CuiOccupancySensor`,props:ht({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Jd),setup(e){let t=e,{t:n}=le(),{detected:r}=Dt(t),i=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.5))`})),a=J(()=>({color:`var(--text-secondary-color)`})),o=J(()=>r.value?`cui-occupancy-sensor__status--occupied`:`cui-occupancy-sensor__status--empty`),s=J(()=>r.value?`cui-occupancy-sensor__indicator--occupied`:`cui-occupancy-sensor__indicator--empty`);return(t,c)=>{let l=xr,u=Qt;return $(),U(`div`,{class:P([`cui-occupancy-sensor`,[`cui-occupancy-sensor--${e.size}`,{"cui-occupancy-sensor--disabled":e.disabled,"cui-occupancy-sensor--empty":!R(r),"cui-occupancy-sensor--occupied":R(r)}]])},[V(`div`,Yd,[V(`div`,Xd,[R(r)?($(),H(l,{key:0,class:`cui-occupancy-sensor__icon-svg`,style:z(R(i))},null,8,[`style`])):($(),H(u,{key:1,class:`cui-occupancy-sensor__icon-svg`,style:z(R(a))},null,8,[`style`]))]),V(`div`,Zd,[e.label?($(),U(`span`,Qd,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-occupancy-sensor__status`,R(o)])},F(R(r)?R(n)(`components.occupancy_sensor.occupied`):R(n)(`components.occupancy_sensor.empty`)),3)]),V(`div`,{class:P([`cui-occupancy-sensor__indicator`,R(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-8ca5a1ce`]]),ef={detected:!1,disabled:!1,size:`medium`},tf={class:`cui-contact-sensor__header`},nf={class:`cui-contact-sensor__icon`},rf={class:`cui-contact-sensor__info`},af={key:0,class:`cui-contact-sensor__label`},of=mn(Z({__name:`CuiContactSensor`,props:ht({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},ef),setup(e){let t=e,{t:n}=le(),{detected:r}=Dt(t),i=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.5))`})),a=J(()=>({color:`rgb(251, 146, 60)`,filter:`drop-shadow(0 0 8px rgba(251, 146, 60, 0.6))`})),o=J(()=>r.value?`cui-contact-sensor__status--closed`:`cui-contact-sensor__status--open`),s=J(()=>r.value?`cui-contact-sensor__indicator--closed`:`cui-contact-sensor__indicator--open`);return(t,c)=>{let l=nn,u=cn;return $(),U(`div`,{class:P([`cui-contact-sensor`,[`cui-contact-sensor--${e.size}`,{"cui-contact-sensor--disabled":e.disabled,"cui-contact-sensor--open":!R(r),"cui-contact-sensor--closed":R(r)}]])},[V(`div`,tf,[V(`div`,nf,[R(r)?($(),H(l,{key:0,class:`cui-contact-sensor__icon-svg`,style:z(R(i))},null,8,[`style`])):($(),H(u,{key:1,class:`cui-contact-sensor__icon-svg`,style:z(R(a))},null,8,[`style`]))]),V(`div`,rf,[e.label?($(),U(`span`,af,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-contact-sensor__status`,R(o)])},F(R(r)?R(n)(`components.contact_sensor.closed`):R(n)(`components.contact_sensor.open`)),3)]),V(`div`,{class:P([`cui-contact-sensor__indicator`,R(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-0cc50676`]]),sf={ring:!1,disabled:!1,size:`medium`},cf={class:`cui-doorbell__header`},lf={class:`cui-doorbell__icon`},uf={class:`cui-doorbell__info`},df={key:0,class:`cui-doorbell__label`},ff=mn(Z({__name:`CuiDoorbellTrigger`,props:ht({ring:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},sf),emits:[`update:ring`,`trigger`],setup(e,{emit:t}){let n=e,r=t,{t:i}=le(),{ring:a}=Dt(n),o=J(()=>a.value),s=J(()=>({color:`rgb(234, 179, 8)`,filter:`drop-shadow(0 0 10px rgba(234, 179, 8, 0.8))`}));function l(){r(`update:ring`,!0),r(`trigger`),setTimeout(()=>{r(`update:ring`,!1)},2e3)}return(t,n)=>{let r=fn,a=ri,u=c;return $(),U(`div`,{class:P([`cui-doorbell`,[`cui-doorbell--${e.size}`,{"cui-doorbell--disabled":e.disabled,"cui-doorbell--ringing":R(o)}]])},[V(`div`,cf,[V(`div`,lf,[R(o)?($(),H(r,{key:0,class:`cui-doorbell__icon-svg cui-doorbell__icon-svg--ringing`,style:z(R(s))},null,8,[`style`])):($(),H(r,{key:1,class:`cui-doorbell__icon-svg`}))]),V(`div`,uf,[e.label?($(),U(`span`,df,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-doorbell__status`,{"cui-doorbell__status--ringing":R(o)}])},F(R(o)?R(i)(`components.doorbell_trigger.ringing`):R(i)(`components.doorbell_trigger.ready`)),3)]),Q(u,{disabled:e.disabled||R(o),size:`small`,severity:`warn`,class:`cui-doorbell__button`,onClick:l},{icon:G(()=>[Q(a,{class:`cui-doorbell__button-icon`})]),_:1},8,[`disabled`])])],2)}}}),[[`__scopeId`,`data-v-b227d18a`]]),pf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function mf(e,t){return $(),U(`svg`,pf,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`m17.75 4.09l-2.53 1.94l.91 3.06l-2.63-1.81l-2.63 1.81l.91-3.06l-2.53-1.94L12.44 4l1.06-3l1.06 3zm3.5 6.91l-1.64 1.25l.59 1.98l-1.7-1.17l-1.7 1.17l.59-1.98L15.75 11l2.06-.05L18.5 9l.69 1.95zm-2.28 4.95c.83-.08 1.72 1.1 1.19 1.85c-.32.45-.66.87-1.08 1.27C15.17 23 8.84 23 4.94 19.07c-3.91-3.9-3.91-10.24 0-14.14c.4-.4.82-.76 1.27-1.08c.75-.53 1.93.36 1.85 1.19c-.27 2.86.69 5.83 2.89 8.02a9.96 9.96 0 0 0 8.02 2.89m-1.64 2.02a12.08 12.08 0 0 1-7.8-3.47c-2.17-2.19-3.33-5-3.49-7.82c-2.81 3.14-2.7 7.96.31 10.98c3.02 3.01 7.84 3.12 10.98.31`},null,-1)]])}var hf=Y({name:`mdi-weather-night`,render:mf}),gf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function _f(e,t){return $(),U(`svg`,gf,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M13.34 8.17c-.93 0-1.69-.77-1.69-1.7a1.69 1.69 0 0 1 1.69-1.69c.94 0 1.7.76 1.7 1.69s-.76 1.7-1.7 1.7M10.3 19.93l-5.93-1.18l.34-1.7l4.15.85l1.35-6.86l-1.52.6v2.86H7v-3.96l4.4-1.87l.67-.08c.6 0 1.1.34 1.43.85l.86 1.35c.68 1.21 2.03 2.03 3.64 2.03v1.68c-1.86 0-3.56-.83-4.66-2.1l-.5 2.54l1.77 1.69V23h-1.69v-5.1l-1.78-1.69zM21 23h-2V3H6v13.11l-2-.42V1h17zM6 23H4v-3.22l2 .42z`},null,-1)]])}var vf=Y({name:`mdi-exit-run`,render:_f}),yf=function(e){return e[e.StayArm=0]=`StayArm`,e[e.AwayArm=1]=`AwayArm`,e[e.NightArm=2]=`NightArm`,e[e.Disarmed=3]=`Disarmed`,e[e.AlarmTriggered=4]=`AlarmTriggered`,e}({}),bf={class:`cui-security-system__header`},xf={class:`cui-security-system__icon`},Sf={class:`cui-security-system__info`},Cf={key:0,class:`cui-security-system__label`},wf={key:0,class:`cui-security-system__alarm`},Tf={class:`cui-security-system__modes`},Ef=[`disabled`],Df=[`disabled`],Of=[`disabled`],kf=[`disabled`],Af=mn(Z({__name:`CuiSecuritySystem`,props:{currentState:{default:yf.Disarmed},targetState:{default:yf.Disarmed},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},emits:[`update:currentState`,`update:targetState`],setup(e,{emit:t}){let n=e,r=t,{t:i}=le(),{currentState:a,targetState:o}=Dt(n),s=J({get:()=>a.value,set:e=>r(`update:currentState`,e)}),l=J({get:()=>o.value,set:e=>r(`update:targetState`,e)}),u=J(()=>s.value===yf.AlarmTriggered),d=J(()=>s.value===yf.StayArm||s.value===yf.AwayArm||s.value===yf.NightArm),f=J(()=>!u.value&&l.value!==s.value),p=J(()=>{if(f.value)return l.value===yf.Disarmed?i(`components.security_system.status_disarming`):i(`components.security_system.status_arming`);switch(s.value){case yf.StayArm:return i(`components.security_system.status_home_armed`);case yf.AwayArm:return i(`components.security_system.status_away_armed`);case yf.NightArm:return i(`components.security_system.status_night_armed`);case yf.Disarmed:return i(`components.security_system.status_disarmed`);case yf.AlarmTriggered:return i(`components.security_system.status_alarm`);default:return i(`components.security_system.status_unknown`)}}),m=J(()=>u.value?`cui-security-system__status--alarm`:f.value?`cui-security-system__status--transitioning`:d.value?`cui-security-system__status--armed`:`cui-security-system__status--disarmed`),h=J(()=>({color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 12px rgba(239, 68, 68, 0.8))`,animation:`pulse 0.5s ease-in-out infinite alternate`})),g=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.5))`}));function _(e){l.value=e}function v(){s.value=l.value}return(t,n)=>{let r=pn,a=br,o=Xt,s=ln,f=c,y=ii,b=vf,ee=hf;return $(),U(`div`,{class:P([`cui-security-system`,[`cui-security-system--${e.size}`,{"cui-security-system--disabled":e.disabled}]])},[V(`div`,bf,[V(`div`,xf,[R(u)?($(),H(r,{key:0,class:`cui-security-system__icon-svg`,style:z(R(h))},null,8,[`style`])):R(d)?($(),H(a,{key:1,class:`cui-security-system__icon-svg`,style:z(R(g))},null,8,[`style`])):($(),H(o,{key:2,class:`cui-security-system__icon-svg`}))]),V(`div`,Sf,[e.label?($(),U(`span`,Cf,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-security-system__status`,R(m)])},F(R(p)),3)])]),R(u)?($(),U(`div`,wf,[Q(s,{class:`cui-security-system__alarm-icon`}),V(`span`,null,F(R(i)(`components.security_system.alarm_triggered`)),1),Q(f,{size:`small`,severity:`danger`,label:R(i)(`components.security_system.reset`),onClick:v},null,8,[`label`])])):q(``,!0),V(`div`,Tf,[V(`button`,{type:`button`,class:P([`cui-security-system__mode`,{"cui-security-system__mode--active":R(l)===R(yf).Disarmed}]),disabled:e.disabled||R(u),onClick:n[0]||=e=>_(R(yf).Disarmed)},[Q(o,{class:`cui-security-system__mode-icon`}),V(`span`,null,F(R(i)(`components.security_system.off`)),1)],10,Ef),V(`button`,{type:`button`,class:P([`cui-security-system__mode`,{"cui-security-system__mode--active":R(l)===R(yf).StayArm}]),disabled:e.disabled||R(u),onClick:n[1]||=e=>_(R(yf).StayArm)},[Q(y,{class:`cui-security-system__mode-icon`}),V(`span`,null,F(R(i)(`components.security_system.home`)),1)],10,Df),V(`button`,{type:`button`,class:P([`cui-security-system__mode`,{"cui-security-system__mode--active":R(l)===R(yf).AwayArm}]),disabled:e.disabled||R(u),onClick:n[2]||=e=>_(R(yf).AwayArm)},[Q(b,{class:`cui-security-system__mode-icon`}),V(`span`,null,F(R(i)(`components.security_system.away`)),1)],10,Of),V(`button`,{type:`button`,class:P([`cui-security-system__mode`,{"cui-security-system__mode--active":R(l)===R(yf).NightArm}]),disabled:e.disabled||R(u),onClick:n[3]||=e=>_(R(yf).NightArm)},[Q(ee,{class:`cui-security-system__mode-icon`}),V(`span`,null,F(R(i)(`components.security_system.night`)),1)],10,kf)])],2)}}}),[[`__scopeId`,`data-v-67cacde3`]]),jf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Mf(e,t){return $(),U(`svg`,jf,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.84-5 6.7v2.07c4-.91 7-4.49 7-8.77s-3-7.86-7-8.77M16.5 12c0-1.77-1-3.29-2.5-4.03V16c1.5-.71 2.5-2.24 2.5-4M3 9v6h4l5 5V4L7 9z`},null,-1)]])}var Nf=Y({name:`mdi-volume-high`,render:Mf}),Pf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ff(e,t){return $(),U(`svg`,Pf,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M6 6.9L3.87 4.78l1.41-1.41L7.4 5.5zM13 1v3h-2V1zm7.13 3.78L18 6.9l-1.4-1.4l2.12-2.13zM4.5 10.5v2h-3v-2zm15 0h3v2h-3zM6 20h12a2 2 0 0 1 2 2H4a2 2 0 0 1 2-2m6-15a6 6 0 0 1 6 6v8H6v-8a6 6 0 0 1 6-6m0 2a4 4 0 0 0-4 4v6h8v-6a4 4 0 0 0-4-4`},null,-1)]])}var If=Y({name:`mdi-alarm-light-outline`,render:Ff}),Lf={active:!1,volume:100,hasVolume:!1,disabled:!1,size:`medium`},Rf={class:`cui-siren-control__header`},zf={class:`cui-siren-control__icon`},Bf={key:0,class:`cui-siren-control__label`},Vf={key:0,class:`cui-siren-control__volume`},Hf={class:`cui-siren-control__volume-header`},Uf={class:`cui-siren-control__volume-value`},Wf=mn(Z({__name:`CuiSirenControl`,props:ht({active:{type:Boolean},volume:{},hasVolume:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Lf),emits:[`update:active`,`update:volume`],setup(e,{emit:t}){let n=e,r=t,{active:i,volume:a,hasVolume:o}=Dt(n),s=J({get:()=>i.value,set:e=>r(`update:active`,e)}),c=J({get:()=>a.value,set:e=>r(`update:volume`,e)}),l=J(()=>{let e=(o.value?a.value:100)/100;return{color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 ${4+e*12}px rgba(239, 68, 68, ${.3+e*.7}))`,opacity:.4+e*.6}});return(t,n)=>{let r=ln,i=If,a=Ln,u=Nf,d=w;return $(),U(`div`,{class:P([`cui-siren-control`,[`cui-siren-control--${e.size}`,{"cui-siren-control--disabled":e.disabled}]])},[V(`div`,Rf,[V(`div`,zf,[R(s)?($(),H(r,{key:0,class:`cui-siren-control__icon-svg cui-siren-control__icon-svg--active`,style:z(R(l))},null,8,[`style`])):($(),H(i,{key:1,class:`cui-siren-control__icon-svg`}))]),e.label?($(),U(`span`,Bf,F(e.label),1)):q(``,!0),Q(a,{modelValue:R(s),"onUpdate:modelValue":n[0]||=e=>Mt(s)?s.value=e:null,disabled:e.disabled,class:`cui-siren-control__toggle`},null,8,[`modelValue`,`disabled`])]),R(o)?($(),U(`div`,Vf,[V(`div`,Hf,[Q(u,{class:`cui-siren-control__volume-icon`}),V(`span`,Uf,F(R(c))+`%`,1)]),Q(d,{modelValue:R(c),"onUpdate:modelValue":n[1]||=e=>Mt(c)?c.value=e:null,min:0,max:100,step:1,disabled:e.disabled,class:`cui-siren-control__slider`},null,8,[`modelValue`,`disabled`])])):q(``,!0)],2)}}}),[[`__scopeId`,`data-v-7f88e563`]]),Gf=function(e){return e[e.Secured=0]=`Secured`,e[e.Unsecured=1]=`Unsecured`,e[e.Unknown=2]=`Unknown`,e}({}),Kf={currentState:2,targetState:0,disabled:!1,size:`medium`},qf={class:`cui-lock-control__header`},Jf={class:`cui-lock-control__icon`},Yf={class:`cui-lock-control__info`},Xf={key:0,class:`cui-lock-control__label`},Zf=mn(Z({__name:`CuiLockControl`,props:ht({currentState:{},targetState:{},label:{},disabled:{type:Boolean},size:{}},Kf),emits:[`update:targetState`],setup(e,{emit:t}){let n=e,r=t,{t:i}=le(),{currentState:a,targetState:o}=Dt(n),s=J(()=>o.value===Gf.Secured),c=J(()=>a.value!==o.value&&a.value!==Gf.Unknown),l=J(()=>{if(c.value)return o.value===Gf.Secured?i(`components.lock.status_locking`):i(`components.lock.status_unlocking`);switch(a.value){case Gf.Secured:return i(`components.lock.status_locked`);case Gf.Unsecured:return i(`components.lock.status_unlocked`);default:return i(`components.lock.status_unknown`)}}),u=J(()=>c.value?`cui-lock-control__status--transitioning`:a.value===Gf.Secured?`cui-lock-control__status--secured`:a.value===Gf.Unsecured?`cui-lock-control__status--unsecured`:``),d=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.5))`}));function f(e){r(`update:targetState`,e?Gf.Secured:Gf.Unsecured)}return(t,n)=>{let r=qt,i=Zt,a=Ln;return $(),U(`div`,{class:P([`cui-lock-control`,[`cui-lock-control--${e.size}`,{"cui-lock-control--disabled":e.disabled}]])},[V(`div`,qf,[V(`div`,Jf,[R(s)?($(),H(r,{key:0,class:`cui-lock-control__icon-svg`,style:z(R(d))},null,8,[`style`])):($(),H(i,{key:1,class:`cui-lock-control__icon-svg`}))]),V(`div`,Yf,[e.label?($(),U(`span`,Xf,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-lock-control__status`,R(u)])},F(R(l)),3)]),Q(a,{"model-value":R(s),disabled:e.disabled,class:`ml-auto shrink-0`,"onUpdate:modelValue":f},null,8,[`model-value`,`disabled`])])],2)}}}),[[`__scopeId`,`data-v-4b2a60ff`]]),Qf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function $f(e,t){return $(),U(`svg`,Qf,[...t[0]||=[V(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M18.36 6.64A9 9 0 0 1 20.77 15M6.16 6.16a9 9 0 1 0 12.68 12.68M12 2v4M2 2l20 20`},null,-1)]])}var ep=Y({name:`lucide-power-off`,render:$f}),tp={class:`cui-switch-control__header`},np={class:`cui-switch-control__icon`},rp={key:0,class:`cui-switch-control__label`},ip=mn(Z({__name:`CuiSwitchControl`,props:{on:{type:Boolean,default:!1},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},emits:[`update:on`],setup(e,{emit:t}){let n=e,r=t,{on:i,size:a}=Dt(n),o=J({get:()=>i.value,set:e=>r(`update:on`,e)}),s=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 10px rgba(34, 197, 94, 0.7))`}));return(t,n)=>{let r=on,i=ep,c=Ln;return $(),U(`div`,{class:P([`cui-switch-control`,[`cui-switch-control--${R(a)}`,{"cui-switch-control--disabled":e.disabled}]])},[V(`div`,tp,[V(`div`,np,[R(o)?($(),H(r,{key:0,class:`cui-switch-control__icon-svg cui-switch-control__icon-svg--on`,style:z(R(s))},null,8,[`style`])):($(),H(i,{key:1,class:`cui-switch-control__icon-svg`}))]),e.label?($(),U(`span`,rp,F(e.label),1)):q(``,!0),Q(c,{modelValue:R(o),"onUpdate:modelValue":n[0]||=e=>Mt(o)?o.value=e:null,disabled:e.disabled,class:`cui-switch-control__toggle`},null,8,[`modelValue`,`disabled`])])],2)}}}),[[`__scopeId`,`data-v-86992927`]]),ap={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function op(e,t){return $(),U(`svg`,ap,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M12 18V6a6 6 0 0 1 6 6a6 6 0 0 1-6 6m8-2.69L23.31 12L20 8.69V4h-4.69L12 .69L8.69 4H4v4.69L.69 12L4 15.31V20h4.69L12 23.31L15.31 20H20z`},null,-1)]])}var sp=Y({name:`mdi-brightness6`,render:op}),cp={on:!1,brightness:100,hasBrightness:!1,disabled:!1,size:`medium`},lp={class:`cui-light-control__header`},up={class:`cui-light-control__icon`},dp={key:0,class:`cui-light-control__label`},fp={key:0,class:`cui-light-control__brightness`},pp={class:`cui-light-control__brightness-header`},mp={class:`cui-light-control__brightness-value`},hp=mn(Z({__name:`CuiLightControl`,props:ht({on:{type:Boolean},brightness:{},hasBrightness:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},cp),emits:[`update:on`,`update:brightness`],setup(e,{emit:t}){let n=e,r=t,{on:i,brightness:a,hasBrightness:o}=Dt(n),s=W(a.value>0?a.value:100),c=J({get:()=>i.value,set:e=>{r(`update:on`,e),e&&a.value===0&&r(`update:brightness`,s.value)}}),l=J({get:()=>a.value,set:e=>{e>0&&(s.value=e),r(`update:brightness`,e),e===0&&i.value?r(`update:on`,!1):e>0&&!i.value&&r(`update:on`,!0)}}),u=J(()=>{let e=(o.value?a.value:100)/100;return{color:`rgb(250, 204, 21)`,filter:`drop-shadow(0 0 ${4+e*12}px rgba(250, 204, 21, ${.3+e*.7}))`,opacity:.4+e*.6}});return(t,n)=>{let r=Yt,i=pr,a=Ln,s=sp,d=w;return $(),U(`div`,{class:P([`cui-light-control`,[`cui-light-control--${e.size}`,{"cui-light-control--disabled":e.disabled}]])},[V(`div`,lp,[V(`div`,up,[R(c)?($(),H(r,{key:0,class:`cui-light-control__icon-svg cui-light-control__icon-svg--on`,style:z(R(u))},null,8,[`style`])):($(),H(i,{key:1,class:`cui-light-control__icon-svg`}))]),e.label?($(),U(`span`,dp,F(e.label),1)):q(``,!0),Q(a,{modelValue:R(c),"onUpdate:modelValue":n[0]||=e=>Mt(c)?c.value=e:null,disabled:e.disabled,class:`cui-light-control__toggle`},null,8,[`modelValue`,`disabled`])]),R(o)?($(),U(`div`,fp,[V(`div`,pp,[Q(s,{class:`cui-light-control__brightness-icon`}),V(`span`,mp,F(R(l))+`%`,1)]),Q(d,{modelValue:R(l),"onUpdate:modelValue":n[1]||=e=>Mt(l)?l.value=e:null,min:0,max:100,step:1,disabled:e.disabled,class:`cui-light-control__slider`},null,8,[`modelValue`,`disabled`])])):q(``,!0)],2)}}}),[[`__scopeId`,`data-v-231e0be1`]]),gp={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function _p(e,t){return $(),U(`svg`,gp,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`m5 11l1.5-4.5h11L19 11m-1.5 5a1.5 1.5 0 0 1-1.5-1.5a1.5 1.5 0 0 1 1.5-1.5a1.5 1.5 0 0 1 1.5 1.5a1.5 1.5 0 0 1-1.5 1.5m-11 0A1.5 1.5 0 0 1 5 14.5A1.5 1.5 0 0 1 6.5 13A1.5 1.5 0 0 1 8 14.5A1.5 1.5 0 0 1 6.5 16M18.92 6c-.2-.58-.76-1-1.42-1h-11c-.66 0-1.22.42-1.42 1L3 12v8a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1h12v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-8z`},null,-1)]])}var vp=Y({name:`mdi-car`,render:_p}),yp={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function bp(e,t){return $(),U(`svg`,yp,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M17 22v-2h3v-3h2v3.5c0 .39-.16.74-.46 1.04s-.65.46-1.04.46zM7 22H3.5c-.39 0-.74-.16-1.04-.46S2 20.89 2 20.5V17h2v3h3zM17 2h3.5c.39 0 .74.16 1.04.46s.46.65.46 1.04V7h-2V4h-3zM7 2v2H4v3H2V3.5c0-.39.16-.74.46-1.04S3.11 2 3.5 2zm6 15.25l4-2.3v-4.59l-4 2.3zm-1-6.33l4-2.29l-4-2.35l-4 2.35zm-5 4.03l4 2.3v-4.59l-4-2.3zm11.23-7.36c.5.32.77.75.77 1.32v6.32c0 .57-.27 1-.77 1.32l-5.48 3.18q-.75.48-1.5 0l-5.48-3.18c-.5-.32-.77-.75-.77-1.32V8.91c0-.57.27-1 .77-1.32l5.48-3.18c.25-.13.5-.19.75-.19s.5.06.75.19z`},null,-1)]])}var xp=Y({name:`mdi-cube-scan`,render:bp}),Sp={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Cp(e,t){return $(),U(`svg`,Sp,[...t[0]||=[V(`g`,{fill:`none`},[V(`path`,{d:`m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z`}),V(`path`,{fill:`currentColor`,d:`M13 2a3 3 0 0 1 .64 5.932l-.171.032l1.436 2.297l1.724-.69a1 1 0 0 1 .848 1.808l-.106.05l-1.723.689a2 2 0 0 1-2.343-.657l-.096-.14l-.163-.26l-.606 2.424a2 2 0 0 1-.256.595l-.09.13l1.653 1.228a2 2 0 0 1 .766 1.202l.029.182l.353 3.178H15a1 1 0 0 1 .117 1.993L15 22h-.91a1.1 1.1 0 0 1-1.074-.861l-.02-.117l-.442-3.979l-3.15-2.34a1 1 0 0 1-.154-.14a2 2 0 0 1-.723-1.891l.033-.157l.794-3.177l-1.57.47l-.835 2.508a1 1 0 0 1-1.928-.52l.03-.112l.836-2.508a2 2 0 0 1 1.17-1.23l.153-.053l3.437-1.031A3 3 0 0 1 13 2M9.6 15.2a1 1 0 0 1 .2 1.4l-1.216 1.622a1.5 1.5 0 0 1-2.032.348l-1.93-1.287a1 1 0 0 1-1.33-1.49l.495-.494a1.01 1.01 0 0 1 1.275-.127l2.206 1.471L8.2 15.4a1 1 0 0 1 1.4-.2`})],-1)]])}var wp=Y({name:`mingcute-run-fill`,render:Cp}),Tp={detected:!1,disabled:!1,size:`medium`},Ep={class:`cui-detection__header`},Dp={class:`cui-detection__info`},Op={key:0,class:`cui-detection__label`},kp={key:0,class:`cui-detection__detections`},Ap=mn(Z({__name:`CuiDetection`,props:ht({type:{},label:{},detected:{type:Boolean},detections:{},size:{},disabled:{type:Boolean}},Tp),setup(e){let t=e,{t:n}=le(),{detected:r}=Dt(t),i=J(()=>r.value?n(`components.detection.detected`):n(`components.detection.idle`));return(t,n)=>{let a=wp,o=xp,s=Vr,c=mr,l=vp;return $(),U(`div`,{class:P([`cui-detection`,[`cui-detection--${e.size}`,`cui-detection--${e.type}`,{"cui-detection--disabled":e.disabled,"cui-detection--detected":R(r)}]])},[V(`div`,Ep,[V(`div`,{class:P([`cui-detection__icon`,{"cui-detection__icon--detected":R(r)}])},[e.type===`motion`?($(),H(a,{key:0,class:`cui-detection__icon-svg`})):e.type===`object`?($(),H(o,{key:1,class:`cui-detection__icon-svg`})):e.type===`audio`?($(),H(s,{key:2,class:`cui-detection__icon-svg`})):e.type===`face`?($(),H(c,{key:3,class:`cui-detection__icon-svg`})):e.type===`licensePlate`?($(),H(l,{key:4,class:`cui-detection__icon-svg`})):q(``,!0)],2),V(`div`,Dp,[e.label?($(),U(`span`,Op,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-detection__status`,{"cui-detection__status--detected":R(r)}])},F(R(i)),3)]),V(`div`,{class:P([`cui-detection__indicator`,{"cui-detection__indicator--detected":R(r)}])},null,2)]),e.detections&&e.detections.length>0?($(),U(`div`,kp,[($(!0),U(K,null,B(e.detections,(e,t)=>($(),U(`span`,{key:t,class:`cui-detection__detection-tag`},F(e),1))),128))])):q(``,!0)],2)}}}),[[`__scopeId`,`data-v-4bdc871b`]]),jp={key:0,class:`flex items-center justify-center h-full`},Mp={key:1,class:`overview-container`},Np={class:`relative`},Pp={key:0,class:`absolute inset-0 z-2 flex items-center justify-center bg-black/80 pointer-events-none`},Fp={key:1,class:`absolute top-2 right-2 z-3 flex items-center gap-1 px-2 py-1 bg-black/60 rounded-full pointer-events-none`},Ip={class:`text-xs text-white/80`},Lp={key:2,class:`absolute top-2 right-2 z-2 flex items-center gap-1 px-2 py-1 bg-black/60 rounded-full pointer-events-none`},Rp={class:`text-xs text-white/80`},zp={class:`overview-section`},Bp={class:`overview-section-title`},Vp={key:1},Hp={key:0,class:`overview-section`},Up={class:`overview-section-title`},Wp={class:`flex flex-col gap-2`},Gp={key:1,class:`overview-section`},Kp={class:`overview-section-title`},qp={class:`flex flex-col gap-2`},Jp={key:2,class:`overview-section`},Yp={class:`overview-section-title`},Xp={class:`flex flex-col gap-2`},Zp={key:3,class:`overview-section`},Qp={class:`overview-section-title`},$p={class:`flex flex-col gap-2`},em={key:4,class:`overview-section`},tm={class:`overview-section-title`},nm={class:`flex flex-col gap-2`},rm={key:5,class:`overview-section`},im={class:`overview-section-title`},am={class:`flex flex-col gap-2`},om={key:6,class:`overview-section`},sm={class:`overview-section-title`},cm={class:`flex flex-col gap-2`},lm={key:7,class:`overview-section`},um={class:`overview-section-title`},dm={class:`flex flex-col gap-2`},fm={key:8,class:`overview-section`},pm={class:`overview-section-title`},mm={class:`flex flex-col gap-2`},hm={key:9,class:`overview-section`},gm={class:`overview-section-title`},_m={class:`flex flex-col gap-2`},vm={key:10,class:`overview-section`},ym={class:`overview-section-title`},bm={class:`flex flex-col gap-2`},xm={key:11,class:`overview-section`},Sm={class:`overview-section-title`},Cm={class:`flex flex-col gap-2`},wm={key:12,class:`overview-section`},Tm={class:`overview-section-title`},Em={class:`flex flex-col gap-2`},Dm={key:13,class:`overview-section`},Om={class:`overview-section-title`},km={class:`flex flex-col gap-2`},Am={key:14,class:`overview-section`},jm={class:`overview-section-title`},Mm={class:`flex flex-col gap-2`},Nm={key:15,class:`overview-section`},Pm={class:`no-sensors`},Fm=mn(Z({__name:`Overview`,props:{camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},setup(e){let t=e,{t:i}=le(),{getCameraStatus:s,connect:c}=ni(),{cameraDevice:l,latestSnapshotSrc:u}=Dt(t),{sensors:d}=p(l);c();let f=J(()=>l.value?.camera.value),m=J(()=>s(f.value?._id)),h=J(()=>{switch(m.value){case`connected`:return`success`;case`connecting`:return`warn`;case`error`:return`danger`;case`partial`:return`contrast`;default:return`secondary`}}),g=J(()=>{switch(m.value){case`connected`:return i(`components.camera_table.online`);case`connecting`:return i(`components.camera_table.connecting`);case`error`:return i(`components.camera_table.error`);case`partial`:return i(`components.camera_table.partial`);default:return i(`components.camera_table.idle`)}}),_=J(()=>d.value.filter(S)),y=J(()=>d.value.filter(r)),b=J(()=>d.value.filter(ce)),ee=J(()=>d.value.filter(A)),w=J(()=>d.value.filter(Ve)),T=J(()=>d.value.filter(de)),ne=J(()=>d.value.filter(se)),re=J(()=>d.value.filter(o)),ae=J(()=>d.value.filter(v)),oe=J(()=>d.value.filter(ze)),me=J(()=>d.value.filter(Se)),j=J(()=>d.value.filter(Te)),_e=J(()=>d.value.filter(ye)),ve=J(()=>d.value.filter(ie)),Ee=J(()=>d.value.filter(Ie)),ke=J(()=>d.value.filter(a)),je=J(()=>d.value.filter(Pe)),Me=J(()=>d.value.filter(pe)),Le=J(()=>d.value.filter(C)),Be=J(()=>_.value.some(e=>e.getProperty(Ae.Detected))),He=J(()=>{let e;for(let t of _.value){let n=t.getProperty(Ae.LastTriggered);n&&(!e||n>e)&&(e=n)}return e}),Ue=n(J(()=>new Date(He.value??0))),We=J(()=>{let e=[{label:i(`components.camera_options.overview_status`),value:g.value,tag:!0,tagSeverity:h.value},{label:i(`components.camera_options.overview_sources`),value:String(f.value?.sources.length??0)}],t=f.value?.info;return t?.manufacturer&&e.push({label:i(`components.form.label.manufacturer`),value:t.manufacturer}),t?.model&&e.push({label:i(`components.camera_options.model`),value:t.model}),t?.hardware&&e.push({label:i(`components.form.label.hardware_version`),value:t.hardware}),t?.serialNumber&&e.push({label:i(`components.form.label.serial_number`),value:t.serialNumber}),t?.firmwareVersion&&e.push({label:i(`components.form.label.firmware_version`),value:t.firmwareVersion}),t?.supportUrl&&e.push({label:i(`components.form.label.support_url`),value:t.supportUrl}),_.value.length>0&&(Be.value?e.push({label:i(`components.camera_options.overview_last_motion`),value:i(`components.camera_options.overview_motion_active`),tag:!0,tagSeverity:`danger`}):He.value?e.push({label:i(`components.camera_options.overview_last_motion`),value:Ue.value}):e.push({label:i(`components.camera_options.overview_last_motion`),value:i(`components.camera_options.overview_no_motion`)})),e}),Ge=J(()=>_.value.length>0||y.value.length>0||b.value.length>0||ee.value.length>0||w.value.length>0),Ke=J(()=>T.value.length>0||_e.value.length>0||ve.value.length>0||Ee.value.length>0||ke.value.length>0||je.value.length>0||ne.value.length>0||oe.value.length>0||Me.value.length>0||re.value.length>0||ae.value.length>0||me.value.length>0||j.value.length>0||Le.value.length>0);return(e,t)=>{let n=te,r=Gt,i=Kt,a=gr,o=ir,s=Kn,c=ai,l=hp,d=ip,p=Zf,m=Wf,h=Af,g=ff,v=of,S=$d,C=qd,ie=Vd,se=Fd,ce=Cd,le=vd,de=pd;return R(f)?($(),U(`div`,Mp,[V(`div`,Np,[R(f)?.disabled?($(),U(`div`,Pp,[Q(r,{class:`w-8 h-8 text-white/60`})])):q(``,!0),R(f)?.disabled?($(),U(`div`,Fp,[Q(r,{class:`w-3.5 h-3.5 text-red-400`}),V(`span`,Ip,F(e.$t(`views.camera.camera_disabled`)),1)])):R(f)?.detectionSettings?.snooze?($(),U(`div`,Lp,[Q(i,{class:`w-3.5 h-3.5 text-amber-400`}),V(`span`,Rp,F(e.$t(`views.camera.camera_snoozed`)),1)])):q(``,!0),Q(a,{camera:R(f),src:R(u)},null,8,[`camera`,`src`])]),V(`div`,zp,[V(`h3`,Bp,F(e.$t(`components.camera_options.overview`)),1),Q(c,{value:R(We),"striped-rows":``,"show-headers":!1,class:`card-border rounded-lg overflow-hidden`},{default:G(()=>[Q(o,{field:`label`,class:`p-2 font-medium text-sm`}),Q(o,{field:`value`,class:`p-2 text-muted text-sm text-right`},{body:G(({data:e})=>[e.tag?($(),H(s,{key:0,severity:e.tagSeverity,value:e.value},null,8,[`severity`,`value`])):($(),U(`span`,Vp,F(e.value),1))]),_:1})]),_:1},8,[`value`])]),R(Ge)?($(),U(`div`,Hp,[V(`h3`,Up,F(e.$t(`components.camera_options.detection`)),1),V(`div`,Wp,[($(!0),U(K,null,B(R(_),e=>($(),H(Ap,{key:e.id,type:`motion`,label:e.displayName.value,detected:e.getProperty(R(Ae).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128)),($(!0),U(K,null,B(R(y),e=>($(),H(Ap,{key:e.id,type:`object`,label:e.displayName.value,detected:(e.getProperty(R(be).Detections)?.length??0)>0,detections:e.getProperty(R(be).Detections)?.map(e=>e.label??e.class??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128)),($(!0),U(K,null,B(R(b),e=>($(),H(Ap,{key:e.id,type:`audio`,label:e.displayName.value,detected:e.getProperty(R(Fe).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128)),($(!0),U(K,null,B(R(ee),e=>($(),H(Ap,{key:e.id,type:`face`,label:e.displayName.value,detected:e.getProperty(R(E).Detected)??!1,detections:e.getProperty(R(E).Detections)?.map(e=>e.identity??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128)),($(!0),U(K,null,B(R(w),e=>($(),H(Ap,{key:e.id,type:`licensePlate`,label:e.displayName.value,detected:e.getProperty(R(we).Detected)??!1,detections:e.getProperty(R(we).Detections)?.map(e=>e.plateText??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128))])])):q(``,!0),R(ne).length?($(),U(`div`,Gp,[V(`h3`,Kp,F(e.$t(`components.camera_options.sensor_type_light`)),1),V(`div`,qp,[($(!0),U(K,null,B(R(ne),e=>($(),H(l,{key:e.id,label:e.displayName.value,on:e.getProperty(R(ue).On)??!1,brightness:e.getProperty(R(ue).Brightness)??100,"has-brightness":e.hasCapability(`brightness`),size:`small`,class:`card-border`,"onUpdate:on":t=>e.setProperty(R(ue).On,t),"onUpdate:brightness":t=>e.setProperty(R(ue).Brightness,t)},null,8,[`label`,`on`,`brightness`,`has-brightness`,`onUpdate:on`,`onUpdate:brightness`]))),128))])])):q(``,!0),R(ae).length?($(),U(`div`,Jp,[V(`h3`,Yp,F(e.$t(`components.camera_options.sensor_type_switch`)),1),V(`div`,Xp,[($(!0),U(K,null,B(R(ae),e=>($(),H(d,{key:e.id,label:e.displayName.value,on:e.getProperty(R(Oe).On)??!1,size:`small`,class:`card-border`,"onUpdate:on":t=>e.setProperty(R(Oe).On,t)},null,8,[`label`,`on`,`onUpdate:on`]))),128))])])):q(``,!0),R(oe).length?($(),U(`div`,Zp,[V(`h3`,Qp,F(e.$t(`components.camera_options.sensor_type_lock`)),1),V(`div`,$p,[($(!0),U(K,null,B(R(oe),e=>($(),H(p,{key:e.id,label:e.displayName.value,"current-state":e.getProperty(R(O).CurrentState)??2,"target-state":e.getProperty(R(O).TargetState)??0,size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty(R(O).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`onUpdate:targetState`]))),128))])])):q(``,!0),R(re).length?($(),U(`div`,em,[V(`h3`,tm,F(e.$t(`components.camera_options.sensor_type_siren`)),1),V(`div`,nm,[($(!0),U(K,null,B(R(re),e=>($(),H(m,{key:e.id,label:e.displayName.value,active:e.getProperty(R(De).Active)??!1,volume:e.getProperty(R(De).Volume)??100,"has-volume":e.hasCapability(`volume`),size:`small`,class:`card-border`,"onUpdate:active":t=>e.setProperty(R(De).Active,t),"onUpdate:volume":t=>e.setProperty(R(De).Volume,t)},null,8,[`label`,`active`,`volume`,`has-volume`,`onUpdate:active`,`onUpdate:volume`]))),128))])])):q(``,!0),R(Le).length?($(),U(`div`,rm,[V(`h3`,im,F(e.$t(`components.camera_options.sensor_type_securitySystem`)),1),V(`div`,am,[($(!0),U(K,null,B(R(Le),e=>($(),H(h,{key:e.id,label:e.displayName.value,"current-state":e.getProperty(R(ge).CurrentState)??3,"target-state":e.getProperty(R(ge).TargetState)??3,size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty(R(ge).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`onUpdate:targetState`]))),128))])])):q(``,!0),R(me).length?($(),U(`div`,om,[V(`h3`,sm,F(e.$t(`components.camera_options.sensor_type_doorbell`)),1),V(`div`,cm,[($(!0),U(K,null,B(R(me),e=>($(),H(g,{key:e.id,label:e.displayName.value,ring:e.getProperty(R(Ne).Ring)??!1,size:`small`,class:`card-border`,onTrigger:()=>e.setProperty(R(Ne).Ring,!0)},null,8,[`label`,`ring`,`onTrigger`]))),128))])])):q(``,!0),R(j).length?($(),U(`div`,lm,[V(`h3`,um,F(e.$t(`components.camera_options.sensor_type_contact`)),1),V(`div`,dm,[($(!0),U(K,null,B(R(j),e=>($(),H(v,{key:e.id,label:e.displayName.value,detected:e.getProperty(R(Re).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),R(Ee).length?($(),U(`div`,fm,[V(`h3`,pm,F(e.$t(`components.camera_options.sensor_type_occupancy`)),1),V(`div`,mm,[($(!0),U(K,null,B(R(Ee),e=>($(),H(S,{key:e.id,label:e.displayName.value,detected:e.getProperty(R(D).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),R(ke).length?($(),U(`div`,hm,[V(`h3`,gm,F(e.$t(`components.camera_options.sensor_type_smoke`)),1),V(`div`,_m,[($(!0),U(K,null,B(R(ke),e=>($(),H(C,{key:e.id,label:e.displayName.value,detected:e.getProperty(R(Ce).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),R(je).length?($(),U(`div`,vm,[V(`h3`,ym,F(e.$t(`components.camera_options.sensor_type_leak`)),1),V(`div`,bm,[($(!0),U(K,null,B(R(je),e=>($(),H(ie,{key:e.id,label:e.displayName.value,detected:e.getProperty(R(xe).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),R(Me).length?($(),U(`div`,xm,[V(`h3`,Sm,F(e.$t(`components.camera_options.sensor_type_garage`)),1),V(`div`,Cm,[($(!0),U(K,null,B(R(Me),e=>($(),H(se,{key:e.id,label:e.displayName.value,"current-state":e.getProperty(R(fe).CurrentState)??1,"target-state":e.getProperty(R(fe).TargetState)??1,"obstruction-detected":e.getProperty(R(fe).ObstructionDetected)??!1,size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty(R(fe).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`obstruction-detected`,`onUpdate:targetState`]))),128))])])):q(``,!0),R(_e).length?($(),U(`div`,wm,[V(`h3`,Tm,F(e.$t(`components.camera_options.sensor_type_temperature`)),1),V(`div`,Em,[($(!0),U(K,null,B(R(_e),e=>($(),H(ce,{key:e.id,label:e.displayName.value,current:e.getProperty(R(k).Current),size:`small`,class:`card-border`},null,8,[`label`,`current`]))),128))])])):q(``,!0),R(ve).length?($(),U(`div`,Dm,[V(`h3`,Om,F(e.$t(`components.camera_options.sensor_type_humidity`)),1),V(`div`,km,[($(!0),U(K,null,B(R(ve),e=>($(),H(le,{key:e.id,label:e.displayName.value,current:e.getProperty(R(he).Current),size:`small`,class:`card-border`},null,8,[`label`,`current`]))),128))])])):q(``,!0),R(T).length?($(),U(`div`,Am,[V(`h3`,jm,F(e.$t(`components.camera_options.sensor_type_battery`)),1),V(`div`,Mm,[($(!0),U(K,null,B(R(T),e=>($(),H(de,{key:e.id,label:e.displayName.value,level:e.getProperty(R(x).Level)??100,charging:e.getProperty(R(x).Charging)??`NOT_CHARGING`,low:e.getProperty(R(x).Low)??!1,size:`small`,class:`card-border`},null,8,[`label`,`level`,`charging`,`low`]))),128))])])):q(``,!0),!R(Ke)&&!R(Ge)?($(),U(`div`,Nm,[V(`div`,Pm,F(e.$t(`components.camera_options.no_sensors`)),1)])):q(``,!0)])):($(),U(`div`,jp,[Q(n,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})]))}}}),[[`__scopeId`,`data-v-5d86732a`]]),Im={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Lm(e,t){return $(),U(`svg`,Im,[...t[0]||=[V(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[V(`path`,{"stroke-width":`3`,d:`M5 10h.01M5 16h.01`}),V(`path`,{"stroke-width":`2`,d:`m10 17l4-10m2 10l4-10`})],-1)]])}var Rm=Y({name:`humbleicons-url`,render:Lm}),zm={class:`drawer-header flex items-center w-full h-[45px] border-b-[1px] border-color px-3`},Bm={class:`font-semibold text-lg truncate`},Vm=[`onClick`],Hm={class:`text-xs truncate`},Um={class:`w-full h-full max-h-full overflow-y-scroll`},Wm={key:0,class:`flex w-full h-full items-center justify-center mt-5`},Gm={key:1,class:`w-full h-full`},Km={key:0,class:`w-full flex items-center justify-center p-4 h-[70px]`},qm=mn(Z({__name:`CameraOptions`,props:{cameraName:{},latestSnapshotSrc:{}},emits:[`close`],setup(e,{emit:t}){let n=new wr,r=e,i=t,a=Ue(),o=Je(),{t:s}=le(),{cameraName:l,latestSnapshotSrc:u}=Dt(r),{camera:d,isLoading:f}=j(l),{data:p,isBusy:m}=n.getCameraQuery(l),{mutate:h,isPending:g}=n.patchCameraQuery(),_=St(`formRef`),v=W(),y=W(`overview`),b=W([{name:`overview`,icon:dr},{name:`sources`,icon:Rm},{name:`settings`,icon:fr},{name:`plugins`,icon:hr}]),ee=J(()=>m.value||f.value||g.value),x=J(()=>y.value===`sources`||y.value===`settings`);async function S(){let e=await _.value?.validate();e?.valid&&e.values?h({cameraname:l.value,cameraData:e.values}):(a.error(`Validation failed`,e),o.add({severity:`error`,detail:s(`components.toast.validation_failed`),life:3e3}))}return M(p,e=>{e&&(v.value=Ye(e))},{deep:!0,immediate:!0}),(e,t)=>{let n=On,r=c,a=jn,o=Un,s=te,f=Fm,m=Ku,h=du,g=Ws,C=Fn,w=Wn,T=Pn;return $(),U(K,null,[V(`div`,zm,[V(`span`,Bm,F(R(l)),1),Q(r,{text:``,rounded:``,severity:`secondary`,class:`ml-auto cui-icon-md shrink-0`,onClick:t[0]||=e=>i(`close`)},{icon:G(()=>[Q(n,{width:`100%`,height:`100%`})]),_:1})]),Q(R(Rt),{ref_key:`formRef`,ref:_,class:`w-full`,style:z({height:`calc(100% - 45px - ${R(x)?`70px`:`0px`})`}),"validation-schema":R(Zr)},{default:G(()=>[Q(T,{value:R(y),"onUpdate:value":t[7]||=e=>Mt(y)?y.value=e:null,scrollable:``,class:`w-full h-full`},{default:G(()=>[Q(o,{class:`justify-between`,pt:{tablist:{class:`h-[65px]`},activeBar:{class:`!w-auto`}}},{default:G(()=>[($(!0),U(K,null,B(R(b),(t,n)=>($(),H(a,{key:n,value:t.name,"as-child":``},{default:G(n=>[V(`div`,lt({ref_for:!0},n.a11yAttrs,{class:[`flex flex-col items-center justify-center flex-1 content-background !py-3`,[{"hover:!text-color active:!text-color focus:!text-color":!n.active},n.class]],onClick:n.onClick}),[($(),H(dt(t.icon),{class:`w-5 h-5`})),V(`span`,Hm,F(e.$t(`components.options_sidebar.segment_tab_${t.name}`)),1)],16,Vm)]),_:2},1032,[`value`]))),128))]),_:1}),Q(w,{class:`p-0 h-[calc(100%-65px)]`},{default:G(()=>[V(`div`,Um,[($(!0),U(K,null,B(R(b),(e,n)=>($(),H(C,{key:n,value:e.name,"as-child":``},{default:G(e=>[e.active?($(),U(`div`,lt({key:0,class:e.class},{ref_for:!0},e.a11yAttrs),[!R(v)||!R(p)||!R(d)?($(),U(`div`,Wm,[Q(s,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])):($(),U(`div`,Gm,[R(y)===`overview`?($(),H(f,{key:0,camera:R(p),"camera-device":R(d),loading:R(ee),"latest-snapshot-src":R(u),onClose:t[1]||=e=>i(`close`)},null,8,[`camera`,`camera-device`,`loading`,`latest-snapshot-src`])):q(``,!0),R(y)===`sources`?($(),H(m,{key:1,modelValue:R(v),"onUpdate:modelValue":t[2]||=e=>Mt(v)?v.value=e:null,camera:R(p),"camera-device":R(d),loading:R(ee),onClose:t[3]||=e=>i(`close`)},null,8,[`modelValue`,`camera`,`camera-device`,`loading`])):q(``,!0),R(y)===`settings`?($(),H(h,{key:2,modelValue:R(v),"onUpdate:modelValue":t[4]||=e=>Mt(v)?v.value=e:null,camera:R(p),"camera-device":R(d),loading:R(ee),onClose:t[5]||=e=>i(`close`)},null,8,[`modelValue`,`camera`,`camera-device`,`loading`])):q(``,!0),R(y)===`plugins`?($(),H(g,{key:3,camera:R(p),"camera-device":R(d),loading:R(ee),onClose:t[6]||=e=>i(`close`)},null,8,[`camera`,`camera-device`,`loading`])):q(``,!0)]))],16)):q(``,!0)]),_:1},8,[`value`]))),128))])]),_:1})]),_:1},8,[`value`]),R(x)?($(),U(`div`,Km,[Q(r,{fluid:``,severity:`success`,class:`cui-button-medium`,label:e.$t(`components.form.button.save`),onClick:S},null,8,[`label`])])):q(``,!0)]),_:1},8,[`style`,`validation-schema`])],64)}}}),[[`__scopeId`,`data-v-38cd7548`]]),Jm={class:`w-full h-full p-safe !pb-0 md:!pl-0`},Ym={class:`w-full h-full border-0 md:border-r-[1px] border-color overflow-y-auto pb-safe`},Xm=Z({__name:`CuiCameraDrawer`,setup(e){let t=Vt(),n=Dr(),r=n.getEventBus(),i=W(!1),a=W(),o=W(),s=J(()=>Or.pt);function c(){i.value=!1,n.close()}return M(t.currentRoute,(e,t)=>{e.path!==t.path&&n.close()}),pt(()=>{r.on(e=>{e.type===`open`?(a.value=e.options,o.value=e.props,i.value=!0):e.type===`close`&&(i.value=!1,a.value=void 0)})}),(e,t)=>{let n=qm,r=$n;return $(),H(r,lt({visible:R(i),"onUpdate:visible":t[0]||=e=>Mt(i)?i.value=e:null},R(o),{class:`border-0 md:border-l-[1px]`,pt:R(s),onHide:c}),{container:G(({closeCallback:e})=>[V(`div`,Jm,[V(`div`,Ym,[R(a)?($(),H(n,lt({key:0},R(a),{onClose:e}),null,16,[`onClose`])):q(``,!0)])])]),_:1},16,[`visible`,`pt`])}}}),Zm=Z({__name:`CuiToast`,setup(e){let t=Ue(),{t:n}=le(),{mdBreakpoint:r}=yn(),{theme:i}=Bt(Ir()),a={success:Lt.success,error:Lt.error,warn:Lt.warning,warning:Lt.warning,info:Lt.info};function o(e){return n(`components.toast.title_${e===`warning`?`warn`:e}`)}function s(e){return e.type===`dismiss`}return d(at.on(e=>{if(s(e)){Lt.dismiss(e.id);return}let r=e,i=a[r.severity]||Lt,c=r.summary||o(r.severity),l;if(r.action){let{label:e,loadingLabel:i,onClick:a}=r.action,o=r.id;l={label:e,onClick:r=>{r.preventDefault(),r.stopPropagation();let s=a();s instanceof Promise&&o&&(Lt.loading(i??e,{id:o,duration:1/0}),s.catch(e=>{t.error(`action failed`,e),Lt.error(n(`components.toast.title_error`),{id:o})}))}}}i(c,{id:r.id,description:r.detail,duration:r.persistent?1/0:r.life??3e3,action:l})})),(e,t)=>($(),H(R(Et),{"rich-colors":``,position:R(r)?`top-center`:`bottom-right`,"visible-toasts":3,theme:R(i)},null,8,[`position`,`theme`]))}}),Qm={class:`loader flex flex-col justify-center items-center`},$m={key:0,class:`absolute flex flex-col items-center justify-center pb-safe bottom-10`},eh={key:0,class:`offline`},th={key:1,class:`text-center text-white text-sm font-bold mt-2`},nh=mn(Z({__name:`CuiLoadingScreen`,props:{reload:{type:Boolean,default:!1},height:{default:`200px`},width:{default:`200px`},text:{},icon:{}},setup(e){let{reload:t,width:n,height:r,text:i,icon:a}=Dt(e),{start:o}=T(()=>{document.getElementById(`lens`)?.classList.add(`cameraLens`),document.getElementById(`CameraUI_U`)?.classList.add(`cameraLetter`)},100,{immediate:!1}),{resume:s}=u(()=>{document.getElementById(`lens`)?.classList.remove(`cameraLens`),document.getElementById(`CameraUI_U`)?.classList.remove(`cameraLetter`),o()},2300,{immediate:!1});return pt(()=>{t.value&&s()}),(e,t)=>($(),U(`div`,Qm,[Q(R(ft),{src:R($e)(`logo_loading_circle.svg`),width:R(n),height:R(r),title:`camera.ui`,"aria-label":`camera.ui`},null,8,[`src`,`width`,`height`]),R(a)||R(i)?($(),U(`div`,$m,[R(a)?($(),U(`div`,eh,[($(),H(dt(R(a)),{class:`w-8 h-8 text-primary`}))])):q(``,!0),R(i)?($(),U(`div`,th,F(R(i)),1)):q(``,!0)])):q(``,!0)]))}}),[[`__scopeId`,`data-v-839ba1ea`]]);Ue(`PushHandler`);function rh(){let e=Vt(),{isElectronApp:t,electron:n}=kn();function r(t,n){n?.deepLink&&e.push(n.deepLink)}pt(()=>{!t||!n||(n.removeListener(`notification-click`,r),n.on(`notification-click`,r))}),vt(()=>{n?.removeListener(`notification-click`,r)})}function ih(){let e=Vt(),{isElectronApp:t,electron:n}=kn();function r(t,n){n?.path&&e.push(n.path)}pt(()=>{!t||!n||(n.removeListener(`deep-link`,r),n.on(`deep-link`,r))}),vt(()=>{n?.removeListener(`deep-link`,r)})}var ah={key:1,class:`app`},oh=mn(Z({__name:`App`,setup(e){let{navbarState:t,subbarState:n,showBottombar:r,showNavbar:i,showTopbar:a}=hn(),o=vn(),s=zt(),c=Vt(),{mdBreakpoint:l}=yn(),{isPWA:u}=_n(),{t:d}=le(),f=qe(),{isElectronApp:p}=kn();oi(),xn(),rh(),ih();let{theme:m}=Bt(Ir()),{isLoggedIn:h}=Bt(et()),g=ur(),_=St(`navbarRef`),v=St(`topbarRef`),y=St(`bottombarRef`),b=W(!0),x=W(!1),S=ee(v,{width:0,height:0},{box:`border-box`}),C=ee(y,{width:0,height:0},{box:`border-box`}),te=J(()=>t.value===`closed`||t.value===`minified`?l.value?na.CLOSED:na.MINIFIED:na.EXPANDED),w=J(()=>t.value===`closed`?0:8),T=J(()=>!_.value||l.value?`env(safe-area-inset-left, 0px)`:`calc(${te.value}px + max(${w.value}px, env(safe-area-inset-left, 0px)))`),ne=J(()=>o.showTopbar.value?`var(--topbar-background)`:o.background.value?o.background.value:`var(--ground-background)`),re=J(()=>`calc(100dvh - ${v.value?`${S.height.value}px`:`env(safe-area-inset-top, 0px)`} - ${y.value?`${C.height.value}px`:o.ignoreSafeAreaBottom.value?`0px`:`env(safe-area-inset-bottom, 0px)`} - ${y.value||!o.disableScroll.value||o.noExtraPadding.value?`0px`:`8px`})`),E=J(()=>s.meta.auth?.requiresAuth&&!h.value||b.value||g.isSwitching),ie=J(()=>{if(!(!g.isSwitching||!g.switchTargetName))return`${d(`components.instance_switcher.switching_to`)} ${g.switchTargetName}...`});async function ae(){}return M([h,()=>f.isOnline.value],([e,t],n)=>{if(g.isSwitching)return;let r=n?.[0]===!0&&n?.[1]===!0;e&&t&&!r&&(g.saveCurrentTokens(),g.fetchInstances())},{immediate:!0}),M([ne,m],()=>{At(()=>{if(/^var\([^)]+\)$/.test(ne.value)){let e=window.getComputedStyle(document.body),t=ne.value.split(`var(`)[1].split(`)`)[0],n=e.getPropertyValue(t);document.querySelector(`meta[name="theme-color"]`)?.setAttribute(`content`,n)}else document.querySelector(`meta[name="theme-color"]`)?.setAttribute(`content`,ne.value)})},{immediate:!0}),M(()=>o.disableScroll.value,e=>{document.body.classList.toggle(`disable-overflow-scroll`,e),document.documentElement.classList.toggle(`disable-overflow-scroll`,e)},{immediate:!0}),pt(async()=>{await c.isReady(),ae(),b.value=!1,requestAnimationFrame(()=>{x.value=!0})}),(e,s)=>{let c=nh,d=Zm,f=Gn,m=qn,h=Xm,b=Ao,ee=Sa,ne=ba,ae=yt(`RouterView`),oe=Hi,se=ji,D=Oi,O=Si;return R(E)?($(),U(`div`,{key:0,class:`flex w-full h-full justify-center items-center absolute z-50`,style:z({minHeight:R(u)?`100vh !important`:`100dvh !important`})},[Q(c,{reload:``,text:R(ie)},null,8,[`text`])],4)):($(),U(`div`,ah,[Q(d),Q(f),Q(m),Q(h),R(a)?($(),H(b,{key:0,ref_key:`topbarRef`,ref:v,class:`z-2 top-0`,"offset-left":R(l)?0:R(te),animate:R(x)},null,8,[`offset-left`,`animate`])):q(``,!0),R(r)?($(),H(ee,{key:1,ref_key:`bottombarRef`,ref:y,class:`z-2`},null,512)):q(``,!0),R(i)?($(),H(ne,{key:2,ref_key:`navbarRef`,ref:_,class:`z-3 top-0 left-0`},null,512)):q(``,!0),V(`main`,{id:`container`,class:`relative w-dvw z-1 overflow-x-hidden`,style:z({transition:R(x)?`padding-left 200ms`:void 0,paddingTop:R(v)?`${R(S).height.value}px`:`env(safe-area-inset-top, 0px)`,paddingLeft:R(T),paddingRight:`env(safe-area-inset-right, 0px)`,paddingBottom:R(y)?`${R(C).height.value}px`:R(o).ignoreSafeAreaBottom.value?`0px`:`env(safe-area-inset-bottom, 0px)`})},[V(`div`,{class:P([`w-full max-w-full h-full grid`,{"p-2":R(o).padding.value,"pt-0":R(o).paddingTop.value===!1,"pb-0":R(o).paddingBottom.value===!1&&!R(y),"pb-4":(R(o).paddingBottom.value||R(y))&&!R(o).disableScroll,"pl-0":R(o).paddingLeft.value===!1,"pr-0":R(o).paddingRight.value===!1}]),style:z({minHeight:R(re),maxHeight:R(o).disableScroll.value?R(re):void 0,height:R(o).disableScroll.value?R(re):void 0,overflow:R(o).disableScroll.value?`hidden`:void 0})},[Q(ae,null,{default:G(({Component:e})=>[($(),H(dt(e),{key:R(g).switchKey,class:P([`w-full h-full relative min-w-0`,{"overflow-x-hidden":!R(o).allowOverflowX.value}]),"navbar-width":R(te),"navbar-left":R(w)},null,8,[`class`,`navbar-width`,`navbar-left`]))]),_:1})],6)],4),R(p)?($(),H(oe,{key:3})):q(``,!0),R(t)===`opened`||R(n)===`opened`&&R(l)?($(),H(Ot,{key:4,to:R(t)===`opened`?`#app`:`#container`,defer:``},[R(l)?($(),U(`div`,{key:0,class:P([`fixed top-0 left-0 right-0 bottom-0 w-full h-full bg-black/50 z-1`,{"z-2":R(t)===`opened`}])},null,2)):q(``,!0)],8,[`to`])):q(``,!0),V(`div`,{class:`fixed-bg`,style:z({background:R(o).background.value})},null,4),Q(se),Q(D),Q(O)]))}}}),[[`__scopeId`,`data-v-c73e44d2`]]);function sh(e,t){e.use(je({natsTransport:t.nats,target:t.target,wsTransport:t.ws})),e.use(_e({natsTransport:t.nats,target:t.target,wsTransport:t.ws,workerBridge:Ge(),workerRegistry:st}))}var ch=Wt(),lh=Qn(tr,{primitive:{borderRadius:{none:`0`,xs:`2px`,sm:`4px`,md:`6px`,lg:`8px`,xl:`12px`},emerald:{50:`#ecfdf5`,100:`#d1fae5`,200:`#a7f3d0`,300:`#6ee7b7`,400:`#34d399`,500:`#10b981`,600:`#059669`,700:`#047857`,800:`#065f46`,900:`#064e3b`,950:`#022c22`},green:{50:`#f0fdf4`,100:`#dcfce7`,200:`#bbf7d0`,300:`#86efac`,400:`#4ade80`,500:`#22c55e`,600:`#16a34a`,700:`#15803d`,800:`#166534`,900:`#14532d`,950:`#052e16`},lime:{50:`#f7fee7`,100:`#ecfccb`,200:`#d9f99d`,300:`#bef264`,400:`#a3e635`,500:`#84cc16`,600:`#65a30d`,700:`#4d7c0f`,800:`#3f6212`,900:`#365314`,950:`#1a2e05`},red:{50:`#fef2f2`,100:`#fee2e2`,200:`#fecaca`,300:`#fca5a5`,400:`#f87171`,500:`#ef4444`,600:`#dc2626`,700:`#b91c1c`,800:`#991b1b`,900:`#7f1d1d`,950:`#450a0a`},orange:{50:`#fff7ed`,100:`#ffedd5`,200:`#fed7aa`,300:`#fdba74`,400:`#fb923c`,500:`#f97316`,600:`#ea580c`,700:`#c2410c`,800:`#9a3412`,900:`#7c2d12`,950:`#431407`},amber:{50:`#fffbeb`,100:`#fef3c7`,200:`#fde68a`,300:`#fcd34d`,400:`#fbbf24`,500:`#f59e0b`,600:`#d97706`,700:`#b45309`,800:`#92400e`,900:`#78350f`,950:`#451a03`},yellow:{50:`#fefce8`,100:`#fef9c3`,200:`#fef08a`,300:`#fde047`,400:`#facc15`,500:`#eab308`,600:`#ca8a04`,700:`#a16207`,800:`#854d0e`,900:`#713f12`,950:`#422006`},teal:{50:`#f0fdfa`,100:`#ccfbf1`,200:`#99f6e4`,300:`#5eead4`,400:`#2dd4bf`,500:`#14b8a6`,600:`#0d9488`,700:`#0f766e`,800:`#115e59`,900:`#134e4a`,950:`#042f2e`},cyan:{50:`#ecfeff`,100:`#cffafe`,200:`#a5f3fc`,300:`#67e8f9`,400:`#22d3ee`,500:`#06b6d4`,600:`#0891b2`,700:`#0e7490`,800:`#155e75`,900:`#164e63`,950:`#083344`},sky:{50:`#f0f9ff`,100:`#e0f2fe`,200:`#bae6fd`,300:`#7dd3fc`,400:`#38bdf8`,500:`#0ea5e9`,600:`#0284c7`,700:`#0369a1`,800:`#075985`,900:`#0c4a6e`,950:`#082f49`},blue:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#93c5fd`,400:`#60a5fa`,500:`#3b82f6`,600:`#2563eb`,700:`#1d4ed8`,800:`#1e40af`,900:`#1e3a8a`,950:`#172554`},indigo:{50:`#eef2ff`,100:`#e0e7ff`,200:`#c7d2fe`,300:`#a5b4fc`,400:`#818cf8`,500:`#6366f1`,600:`#4f46e5`,700:`#4338ca`,800:`#3730a3`,900:`#312e81`,950:`#1e1b4b`},violet:{50:`#f5f3ff`,100:`#ede9fe`,200:`#ddd6fe`,300:`#c4b5fd`,400:`#a78bfa`,500:`#8b5cf6`,600:`#7c3aed`,700:`#6d28d9`,800:`#5b21b6`,900:`#4c1d95`,950:`#2e1065`},purple:{50:`#faf5ff`,100:`#f3e8ff`,200:`#e9d5ff`,300:`#d8b4fe`,400:`#c084fc`,500:`#a855f7`,600:`#9333ea`,700:`#7e22ce`,800:`#6b21a8`,900:`#581c87`,950:`#3b0764`},fuchsia:{50:`#fdf4ff`,100:`#fae8ff`,200:`#f5d0fe`,300:`#f0abfc`,400:`#e879f9`,500:`#d946ef`,600:`#c026d3`,700:`#a21caf`,800:`#86198f`,900:`#701a75`,950:`#4a044e`},pink:{50:`#fdf2f8`,100:`#fce7f3`,200:`#fbcfe8`,300:`#f9a8d4`,400:`#f472b6`,500:`#ec4899`,600:`#db2777`,700:`#be185d`,800:`#9d174d`,900:`#831843`,950:`#500724`},rose:{50:`#fff1f2`,100:`#ffe4e6`,200:`#fecdd3`,300:`#fda4af`,400:`#fb7185`,500:`#f43f5e`,600:`#e11d48`,700:`#be123c`,800:`#9f1239`,900:`#881337`,950:`#4c0519`},slate:{50:`#f8fafc`,100:`#f1f5f9`,200:`#e2e8f0`,300:`#cbd5e1`,400:`#94a3b8`,500:`#64748b`,600:`#475569`,700:`#334155`,800:`#1e293b`,900:`#0f172a`,950:`#020617`},gray:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#1f2937`,900:`#111827`,950:`#030712`},zinc:{50:`#fafafa`,100:`#f4f4f5`,200:`#e4e4e7`,300:`#d4d4d8`,400:`#a1a1aa`,500:`#71717a`,600:`#52525b`,700:`#3f3f46`,800:`#27272a`,900:`#18181b`,950:`#09090b`},neutral:{50:`#fafafa`,100:`#f5f5f5`,200:`#e5e5e5`,300:`#d4d4d4`,400:`#a3a3a3`,500:`#737373`,600:`#525252`,700:`#404040`,800:`#262626`,900:`#171717`,950:`#0a0a0a`},stone:{50:`#fafaf9`,100:`#f5f5f4`,200:`#e7e5e4`,300:`#d6d3d1`,400:`#a8a29e`,500:`#78716c`,600:`#57534e`,700:`#44403c`,800:`#292524`,900:`#1c1917`,950:`#0c0a09`}},semantic:{transitionDuration:`0.2s`,focusRing:{width:`1px`,style:`solid`,color:`{primary.color}`,offset:`2px`,shadow:`none`},disabledOpacity:`0.6`,iconSize:`1rem`,anchorGutter:`2px`,primary:{50:`#fdf4f6`,100:`#f7ccd4`,200:`#f1a3b2`,300:`#eb7b90`,400:`#e5526e`,500:`#df2a4c`,600:`#be2441`,700:`#9c1d35`,800:`#7b172a`,900:`#59111e`,950:`#380b13`},formField:{paddingX:`0.75rem`,paddingY:`0.5rem`,sm:{fontSize:`0.875rem`,paddingX:`0.625rem`,paddingY:`0.375rem`},lg:{fontSize:`1.125rem`,paddingX:`0.875rem`,paddingY:`0.625rem`},borderRadius:`{border.radius.md}`,focusRing:{width:`0`,style:`none`,color:`transparent`,offset:`0`,shadow:`none`},transitionDuration:`{transition.duration}`},list:{padding:`0.25rem 0.25rem`,gap:`2px`,header:{padding:`0.5rem 1rem 0.25rem 1rem`},option:{padding:`0.5rem 0.75rem`,borderRadius:`{border.radius.sm}`},optionGroup:{padding:`0.5rem 0.75rem`,fontWeight:`600`}},content:{borderRadius:`{border.radius.md}`},mask:{transitionDuration:`0.15s`},navigation:{list:{padding:`0.25rem 0.25rem`,gap:`2px`},item:{padding:`0.5rem 0.75rem`,borderRadius:`{border.radius.sm}`,gap:`0.5rem`},submenuLabel:{padding:`0.5rem 0.75rem`,fontWeight:`600`},submenuIcon:{size:`0.875rem`}},overlay:{select:{borderRadius:`{border.radius.md}`,shadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`},popover:{borderRadius:`{border.radius.md}`,padding:`0.75rem`,shadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`},modal:{borderRadius:`{border.radius.xl}`,padding:`1.25rem`,shadow:`0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)`},navigation:{shadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`}},colorScheme:{light:{surface:{0:`#ffffff`,50:`#f8fafc`,100:`#f1f5f9`,200:`#e2e8f0`,300:`#cbd5e1`,400:`#94a3b8`,500:`#64748b`,600:`#475569`,700:`#334155`,800:`#1e293b`,850:`#0f172a`,900:`#0f172a`,925:`#0c1421`,950:`#020617`,1e3:`#000000`},primary:{color:`{primary.500}`,contrastColor:`#ffffff`,hoverColor:`{primary.600}`,activeColor:`{primary.700}`},highlight:{background:`{primary.50}`,focusBackground:`{primary.100}`,color:`{primary.700}`,focusColor:`{primary.800}`},mask:{background:`rgba(0,0,0,0.4)`,color:`{surface.200}`},formField:{background:`{surface.50}`,disabledBackground:`{surface.200}`,filledBackground:`{surface.50}`,filledHoverBackground:`{surface.50}`,filledFocusBackground:`{surface.50}`,borderColor:`{surface.300}`,hoverBorderColor:`{surface.400}`,focusBorderColor:`{primary.color}`,invalidBorderColor:`{red.400}`,color:`{surface.700}`,disabledColor:`{surface.500}`,placeholderColor:`{surface.500}`,invalidPlaceholderColor:`{red.600}`,floatLabelColor:`{surface.500}`,floatLabelFocusColor:`{primary.600}`,floatLabelActiveColor:`{surface.500}`,floatLabelInvalidColor:`{form.field.invalid.placeholder.color}`,iconColor:`{surface.400}`,shadow:`0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)`},text:{color:`{surface.700}`,hoverColor:`{surface.800}`,mutedColor:`{surface.500}`,hoverMutedColor:`{surface.600}`},content:{background:`{surface.0}`,hoverBackground:`{surface.100}`,borderColor:`{surface.200}`,color:`{text.color}`,hoverColor:`{text.hover.color}`},overlay:{select:{background:`{surface.0}`,borderColor:`{surface.200}`,color:`{text.color}`},popover:{background:`{surface.0}`,borderColor:`{surface.200}`,color:`{text.color}`},modal:{background:`{surface.0}`,borderColor:`{surface.200}`,color:`{text.color}`}},list:{option:{focusBackground:`{surface.100}`,selectedBackground:`{highlight.background}`,selectedFocusBackground:`{highlight.focus.background}`,color:`{text.color}`,focusColor:`{text.hover.color}`,selectedColor:`{highlight.color}`,selectedFocusColor:`{highlight.focus.color}`,icon:{color:`{surface.400}`,focusColor:`{surface.500}`}},optionGroup:{background:`transparent`,color:`{text.muted.color}`}},navigation:{item:{focusBackground:`{surface.100}`,activeBackground:`{surface.100}`,color:`{text.color}`,focusColor:`{text.hover.color}`,activeColor:`{text.hover.color}`,icon:{color:`{surface.400}`,focusColor:`{surface.500}`,activeColor:`{surface.500}`}},submenuLabel:{background:`transparent`,color:`{text.muted.color}`},submenuIcon:{color:`{surface.400}`,focusColor:`{surface.500}`,activeColor:`{surface.500}`}}},dark:{surface:{0:`#ffffff`,50:`#f5f5f5`,100:`#d1d1d1`,200:`#adadad`,300:`#898989`,400:`#646464`,500:`#404040`,600:`#363636`,700:`#2d2d2d`,800:`#232323`,850:`#1d1d1d`,900:`#1a1a1a`,925:`#161616`,950:`#101010`,1e3:`#0d0d0d`},primary:{color:`{primary.500}`,contrastColor:`{surface.900}`,hoverColor:`{primary.600}`,activeColor:`{primary.700}`},highlight:{background:`color-mix(in srgb, {primary.400}, transparent 84%)`,focusBackground:`color-mix(in srgb, {primary.400}, transparent 76%)`,color:`rgba(255,255,255,.87)`,focusColor:`rgba(255,255,255,.87)`},mask:{background:`rgba(0,0,0,0.6)`,color:`{surface.200}`},formField:{background:`{surface.925}`,disabledBackground:`{surface.700}`,filledBackground:`{surface.800}`,filledHoverBackground:`{surface.800}`,filledFocusBackground:`{surface.800}`,borderColor:`{surface.800}`,hoverBorderColor:`{surface.500}`,focusBorderColor:`{primary.color}`,invalidBorderColor:`{red.300}`,color:`{surface.0}`,disabledColor:`{surface.400}`,placeholderColor:`{surface.400}`,invalidPlaceholderColor:`{red.400}`,floatLabelColor:`{surface.400}`,floatLabelFocusColor:`{primary.color}`,floatLabelActiveColor:`{surface.400}`,floatLabelInvalidColor:`{form.field.invalid.placeholder.color}`,iconColor:`{surface.400}`,shadow:`0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)`},text:{color:`{surface.0}`,hoverColor:`{surface.0}`,mutedColor:`{surface.400}`,hoverMutedColor:`{surface.300}`},content:{background:`{surface.900}`,hoverBackground:`{surface.800}`,borderColor:`{surface.700}`,color:`{text.color}`,hoverColor:`{text.hover.color}`},overlay:{select:{background:`{surface.900}`,borderColor:`{surface.700}`,color:`{text.color}`},popover:{background:`{surface.900}`,borderColor:`{surface.700}`,color:`{text.color}`},modal:{background:`{surface.900}`,borderColor:`{surface.700}`,color:`{text.color}`}},list:{option:{focusBackground:`{surface.800}`,selectedBackground:`{highlight.background}`,selectedFocusBackground:`{highlight.focus.background}`,color:`{text.color}`,focusColor:`{text.hover.color}`,selectedColor:`{highlight.color}`,selectedFocusColor:`{highlight.focus.color}`,icon:{color:`{surface.500}`,focusColor:`{surface.400}`}},optionGroup:{background:`transparent`,color:`{text.muted.color}`}},navigation:{item:{focusBackground:`{surface.800}`,activeBackground:`{surface.800}`,color:`{text.color}`,focusColor:`{text.hover.color}`,activeColor:`{text.hover.color}`,icon:{color:`{surface.500}`,focusColor:`{surface.400}`,activeColor:`{surface.400}`}},submenuLabel:{background:`transparent`,color:`{text.muted.color}`},submenuIcon:{color:`{surface.500}`,focusColor:`{surface.400}`,activeColor:`{surface.400}`}}}}}});function uh(e){it(e)||Je().add({severity:`error`,detail:e,life:3e3})}function dh(){return{enableDevtoolsV6Plugin:!0,queryClientConfig:{defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!0,gcTime:300*1e3,staleTime:1e4,networkMode:`online`,retry:(e,t)=>fh(t)===401?!1:e<2?!0:(uh(t),!1)},mutations:{retry:0,networkMode:`online`,onError:uh}}}}}function fh(e){if(typeof e==`object`&&e&&`response`in e){let t=e.response;if(typeof t?.status==`number`)return t.status}}function ph(){return{theme:{preset:lh,options:{cssLayer:{name:`primevue`,order:`theme, base, primevue`},darkModeSelector:`.dark-mode`}}}}function mh(e){e.directive(`tooltip`,In).directive(`focustrap`,l),e.use(er).use(rr).use(Zn).use(ar,ph()).use(We).use(Nt()).use(_t,dh()).use(ch)}window.addEventListener(`vite:preloadError`,()=>{sessionStorage.getItem(`cui-chunk-reload`)||(sessionStorage.setItem(`cui-chunk-reload`,`1`),window.location.reload())});var{connection:hh}=await nt({logger:new ae(`Connection`)});tt();var gh=It(oh),_h=new ae(`Vue`);gh.config.errorHandler=(e,t,n)=>_h.error(`[${n}]`,e),mh(gh),rt(hh),sh(gh,hh),gh.use(En),ur().restoreActiveOverride();var vh=await ot(hh,{onUser:e=>et().setUserFromLogin(e),onRedirectInfo:e=>{ur().redirectInfo=e},onReset:()=>{ur().activeId=null,Ke.value=null}});gh.mount(`#app`),vh||hh.boot(`default`);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{dn as e,mn as t,ur as n,zn as r}from"./vendor-DoIl6acN.js";import{t as i}from"./bell-outline-U3Gb4nI1.js";import{n as a,t as o}from"./lightbulb-outline-B0CFho4y.js";import{t as s}from"./clock-outline-MhJC2-0d.js";import{n as c,t as l}from"./webhook-Dgi5u5S_.js";import{t as u}from"./source-branch-Cd8fHY0E.js";var d={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function f(n,i){return r(),t(`svg`,d,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M4.93 4.93A9.97 9.97 0 0 0 2 12c0 2.76 1.12 5.26 2.93 7.07l1.41-1.41A7.94 7.94 0 0 1 4 12c0-2.21.89-4.22 2.34-5.66zm14.14 0l-1.41 1.41A7.96 7.96 0 0 1 20 12c0 2.22-.89 4.22-2.34 5.66l1.41 1.41A9.97 9.97 0 0 0 22 12c0-2.76-1.12-5.26-2.93-7.07M7.76 7.76A5.98 5.98 0 0 0 6 12c0 1.65.67 3.15 1.76 4.24l1.41-1.41A4 4 0 0 1 8 12c0-1.11.45-2.11 1.17-2.83zm8.48 0l-1.41 1.41A4 4 0 0 1 16 12c0 1.11-.45 2.11-1.17 2.83l1.41 1.41A5.98 5.98 0 0 0 18 12c0-1.65-.67-3.15-1.76-4.24M12 10a2 2 0 0 0-2 2a2 2 0 0 0 2 2a2 2 0 0 0 2-2a2 2 0 0 0-2-2`},null,-1)]])}var p=n({name:`mdi-access-point`,render:f}),m={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function h(n,i){return r(),t(`svg`,m,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M4 4h3l2-2h6l2 2h3a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m8 3a5 5 0 0 0-5 5a5 5 0 0 0 5 5a5 5 0 0 0 5-5a5 5 0 0 0-5-5m0 2a3 3 0 0 1 3 3a3 3 0 0 1-3 3a3 3 0 0 1-3-3a3 3 0 0 1 3-3`},null,-1)]])}var g=n({name:`mdi-camera`,render:h}),_={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function v(n,i){return r(),t(`svg`,_,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M9 12c0-.81.3-1.5.89-2.11C10.5 9.3 11.19 9 12 9s1.5.3 2.11.89c.59.61.89 1.3.89 2.11s-.3 1.5-.89 2.11c-.61.59-1.3.89-2.11.89s-1.5-.3-2.11-.89C9.3 13.5 9 12.81 9 12M5.53 8.44l1.78 1.78L5.53 12l1.78 1.78l-1.78 1.78L2 12zm2.91 10.03l1.78-1.78L12 18.47l1.78-1.78l1.78 1.78L12 22zm10.03-2.91l-1.78-1.78L18.47 12l-1.78-1.78l1.78-1.78L22 12zM15.56 5.53l-1.78 1.78L12 5.53l-1.78 1.78l-1.78-1.78L12 2z`},null,-1)]])}var y=n({name:`mdi-camera-control`,render:v}),b={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function x(n,i){return r(),t(`svg`,b,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`m23.5 17l-5 5l-3.5-3.5l1.5-1.5l2 2l3.5-3.5zm-10.4 2.9c-.4.1-.7.1-1.1.1c-4.4 0-8-3.6-8-8s3.6-8 8-8s8 3.6 8 8c0 .4 0 .7-.1 1.1c.7.1 1.3.3 1.9.6c.1-.6.2-1.1.2-1.7c0-5.5-4.5-10-10-10S2 6.5 2 12s4.5 10 10 10c.6 0 1.2-.1 1.7-.2c-.3-.5-.5-1.2-.6-1.9m2.5-5.8l-3.1-1.8V7H11v6l3.5 2.1c.3-.4.7-.7 1.1-1`},null,-1)]])}var S=n({name:`mdi-clock-check-outline`,render:x}),C={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function w(n,i){return r(),t(`svg`,C,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M8 3a2 2 0 0 0-2 2v4a2 2 0 0 1-2 2H3v2h1a2 2 0 0 1 2 2v4a2 2 0 0 0 2 2h2v-2H8v-5a2 2 0 0 0-2-2a2 2 0 0 0 2-2V5h2V3m6 0a2 2 0 0 1 2 2v4a2 2 0 0 0 2 2h1v2h-1a2 2 0 0 0-2 2v4a2 2 0 0 1-2 2h-2v-2h2v-5a2 2 0 0 1 2-2a2 2 0 0 1-2-2V5h-2V3z`},null,-1)]])}var T=n({name:`mdi-code-braces`,render:w}),E={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function D(n,i){return r(),t(`svg`,E,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M12 1L8 5h3v9h2V5h3m2 18H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h3v2H6v12h12V9h-3V7h3a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2`},null,-1)]])}var O=n({name:`mdi-export-variant`,render:D}),k={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function A(n,i){return r(),t(`svg`,k,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M7 2v11h3v9l7-12h-4l4-8z`},null,-1)]])}var j=n({name:`mdi-flash`,render:A}),M={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function N(n,i){return r(),t(`svg`,M,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M10 9a1 1 0 0 1 1-1a1 1 0 0 1 1 1v4.47l1.21.13l4.94 2.19c.53.24.85.77.85 1.35v4.36c-.03.82-.68 1.47-1.5 1.5H11c-.38 0-.74-.15-1-.43l-4.9-4.2l.74-.77c.19-.21.46-.32.74-.32h.22L10 19zm1-4a4 4 0 0 1 4 4c0 1.5-.8 2.77-2 3.46v-1.22c.61-.55 1-1.35 1-2.24a3 3 0 0 0-3-3a3 3 0 0 0-3 3c0 .89.39 1.69 1 2.24v1.22C7.8 11.77 7 10.5 7 9a4 4 0 0 1 4-4`},null,-1)]])}var P=n({name:`mdi-gesture-tap`,render:N}),F={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function I(n,i){return r(),t(`svg`,F,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M19 19H5V5h14m0-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m-5.04 9.29l-2.75 3.54l-1.96-2.36L6.5 17h11z`},null,-1)]])}var L=n({name:`mdi-image-outline`,render:I}),R={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function z(n,i){return r(),t(`svg`,R,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M22 13.5c0 1.76-1.3 3.22-3 3.46V20a2 2 0 0 1-2 2h-3.8v-.3a2.7 2.7 0 0 0-2.7-2.7c-1.5 0-2.7 1.21-2.7 2.7v.3H4a2 2 0 0 1-2-2v-3.8h.3C3.79 16.2 5 15 5 13.5s-1.21-2.7-2.7-2.7H2V7a2 2 0 0 1 2-2h3.04c.24-1.7 1.7-3 3.46-3s3.22 1.3 3.46 3H17a2 2 0 0 1 2 2v3.04c1.7.24 3 1.7 3 3.46M17 15h1.5a1.5 1.5 0 0 0 1.5-1.5a1.5 1.5 0 0 0-1.5-1.5H17V7h-5V5.5A1.5 1.5 0 0 0 10.5 4A1.5 1.5 0 0 0 9 5.5V7H4v2.12c1.76.68 3 2.38 3 4.38s-1.25 3.7-3 4.38V20h2.12a4.7 4.7 0 0 1 4.38-3c2 0 3.7 1.25 4.38 3H17z`},null,-1)]])}var B=n({name:`mdi-puzzle-outline`,render:z}),V={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function H(n,i){return r(),t(`svg`,V,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M6 2h12v6l-4 4l4 4v6H6v-6l4-4l-4-4zm10 14.5l-4-4l-4 4V20h8zm-4-5l4-4V4H8v3.5zM10 6h4v.75l-2 2l-2-2z`},null,-1)]])}var U=n({name:`mdi-timer-sand`,render:H}),W={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function G(n,i){return r(),t(`svg`,W,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M20.41 3c1.39 2.71 1.94 5.84 1.59 9c-.2 3.16-1.3 6.29-3.17 9l-1.53-1c1.61-2.43 2.55-5.2 2.7-8c.34-2.8-.11-5.57-1.3-8zM5.17 3L6.7 4C5.09 6.43 4.15 9.2 4 12c-.34 2.8.12 5.57 1.3 8l-1.69 1c-1.4-2.71-1.96-5.83-1.61-9c.2-3.16 1.3-6.29 3.17-9m6.91 7.68l2.32-3.23h2.53l-3.78 5l2.2 4.92h-2.26L11.71 14l-2.43 3.33H6.76l3.9-5.12l-2.13-4.76h2.27z`},null,-1)]])}var K=n({name:`mdi-variable`,render:G}),q={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function J(n,i){return r(),t(`svg`,q,[...i[0]||=[e(`path`,{fill:`currentColor`,d:`M16.36 14c.08-.66.14-1.32.14-2s-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2m-5.15 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95a8.03 8.03 0 0 1-4.33 3.56M14.34 14H9.66c-.1-.66-.16-1.32-.16-2s.06-1.35.16-2h4.68c.09.65.16 1.32.16 2s-.07 1.34-.16 2M12 19.96c-.83-1.2-1.5-2.53-1.91-3.96h3.82c-.41 1.43-1.08 2.76-1.91 3.96M8 8H5.08A7.92 7.92 0 0 1 9.4 4.44C8.8 5.55 8.35 6.75 8 8m-2.92 8H8c.35 1.25.8 2.45 1.4 3.56A8 8 0 0 1 5.08 16m-.82-2C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2s.06 1.34.14 2M12 4.03c.83 1.2 1.5 2.54 1.91 3.97h-3.82c.41-1.43 1.08-2.77 1.91-3.97M18.92 8h-2.95a15.7 15.7 0 0 0-1.38-3.56c1.84.63 3.37 1.9 4.33 3.56M12 2C6.47 2 2 6.5 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2`},null,-1)]])}var Y=n({name:`mdi-web`,render:J}),X=[{type:`trigger-detection`,category:`trigger`,labelKey:`components.automation_nodes.trigger_detection`,descriptionKey:`components.automation_nodes.trigger_detection_desc`,icon:j,color:`#22c55e`,defaults:{type:`trigger-detection`,cameraId:``,eventPhase:[`start`],detectionLabels:[],confidenceThreshold:0,audioLabels:[],faceFilter:[],licensePlateFilter:[]}},{type:`trigger-sensor`,category:`trigger`,labelKey:`components.automation_nodes.trigger_sensor`,descriptionKey:`components.automation_nodes.trigger_sensor_desc`,icon:p,color:`#22c55e`,defaults:{type:`trigger-sensor`,cameraId:``,sensorType:``,sensorName:``,sensorPluginId:``,properties:[]}},{type:`trigger-schedule`,category:`trigger`,labelKey:`components.automation_nodes.trigger_schedule`,descriptionKey:`components.automation_nodes.trigger_schedule_desc`,icon:s,color:`#22c55e`,defaults:{type:`trigger-schedule`,cron:`0 * * * *`}},{type:`trigger-webhook`,category:`trigger`,labelKey:`components.automation_nodes.trigger_webhook`,descriptionKey:`components.automation_nodes.trigger_webhook_desc`,icon:l,color:`#22c55e`,defaults:{type:`trigger-webhook`,webhookId:``}},{type:`trigger-system`,category:`trigger`,labelKey:`components.automation_nodes.trigger_system`,descriptionKey:`components.automation_nodes.trigger_system_desc`,icon:a,color:`#22c55e`,defaults:{type:`trigger-system`,category:`system`,eventType:``,targetId:``}},{type:`trigger-manual`,category:`trigger`,labelKey:`components.automation_nodes.trigger_manual`,descriptionKey:`components.automation_nodes.trigger_manual_desc`,icon:P,color:`#22c55e`,defaults:{type:`trigger-manual`}},{type:`trigger-geofence`,category:`trigger`,labelKey:`components.automation_nodes.trigger_geofence`,descriptionKey:`components.automation_nodes.trigger_geofence_desc`,icon:c,color:`#22c55e`,defaults:{type:`trigger-geofence`,geofenceId:``,zoneName:``,latitude:0,longitude:0,radius:200,event:`both`,users:[]}},{type:`condition-ifelse`,category:`condition`,labelKey:`components.automation_nodes.condition_ifelse`,descriptionKey:`components.automation_nodes.condition_ifelse_desc`,icon:u,color:`#f59e0b`,defaults:{type:`condition-ifelse`,leftOperand:``,operator:`==`,rightOperand:``}},{type:`condition-switch`,category:`condition`,labelKey:`components.automation_nodes.condition_switch`,descriptionKey:`components.automation_nodes.condition_switch_desc`,icon:T,color:`#f59e0b`,defaults:{type:`condition-switch`,variable:``,cases:[]}},{type:`condition-sensorstate`,category:`condition`,labelKey:`components.automation_nodes.condition_sensorstate`,descriptionKey:`components.automation_nodes.condition_sensorstate_desc`,icon:p,color:`#f59e0b`,defaults:{type:`condition-sensorstate`,cameraId:``,sensorType:``,sensorName:``,sensorPluginId:``,conditions:[],logic:`AND`}},{type:`condition-time`,category:`condition`,labelKey:`components.automation_nodes.condition_time`,descriptionKey:`components.automation_nodes.condition_time_desc`,icon:S,color:`#f59e0b`,defaults:{type:`condition-time`,startTime:`08:00`,endTime:`18:00`,days:[]}},{type:`action-snapshot`,category:`action`,labelKey:`components.automation_nodes.action_snapshot`,descriptionKey:`components.automation_nodes.action_snapshot_desc`,icon:g,color:`#3b82f6`,defaults:{type:`action-snapshot`,cameraId:``,forceNew:!0},supportsRepeat:!0},{type:`action-sensor`,category:`action`,labelKey:`components.automation_nodes.action_sensor`,descriptionKey:`components.automation_nodes.action_sensor_desc`,icon:o,color:`#3b82f6`,defaults:{type:`action-sensor`,cameraId:``,sensorType:``,sensorName:``,sensorPluginId:``,properties:[]}},{type:`action-notification`,category:`action`,labelKey:`components.automation_nodes.action_notification`,descriptionKey:`components.automation_nodes.action_notification_desc`,icon:i,color:`#3b82f6`,defaults:{type:`action-notification`,title:``,body:``,severity:`info`,deepLink:``,targets:[]}},{type:`action-http`,category:`action`,labelKey:`components.automation_nodes.action_http`,descriptionKey:`components.automation_nodes.action_http_desc`,icon:Y,color:`#3b82f6`,defaults:{type:`action-http`,url:``,method:`POST`,headers:{},body:``},supportsRepeat:!0},{type:`action-delay`,category:`action`,labelKey:`components.automation_nodes.action_delay`,descriptionKey:`components.automation_nodes.action_delay_desc`,icon:U,color:`#3b82f6`,defaults:{type:`action-delay`,duration:5,unit:`seconds`}},{type:`action-variable`,category:`action`,labelKey:`components.automation_nodes.action_variable`,descriptionKey:`components.automation_nodes.action_variable_desc`,icon:K,color:`#3b82f6`,defaults:{type:`action-variable`,variableName:``,operator:`=`,value:``}},{type:`action-plugin`,category:`action`,labelKey:`components.automation_nodes.action_plugin`,descriptionKey:`components.automation_nodes.action_plugin_desc`,icon:B,color:`#3b82f6`,defaults:{type:`action-plugin`,pluginName:``,pluginInterface:``,method:``,params:{},config:{}},supportsRepeat:!0},{type:`action-camera-control`,category:`action`,labelKey:`components.automation_nodes.action_camera_control`,descriptionKey:`components.automation_nodes.action_camera_control_desc`,icon:y,color:`#3b82f6`,defaults:{type:`action-camera-control`,cameraId:``,properties:[]}},{type:`action-image-input`,category:`utility`,labelKey:`components.automation_nodes.action_image_input`,descriptionKey:`components.automation_nodes.action_image_input_desc`,icon:L,color:`#8b5cf6`,defaults:{type:`action-image-input`,source:``,variableName:`image`}},{type:`action-output`,category:`utility`,labelKey:`components.automation_nodes.action_output`,descriptionKey:`components.automation_nodes.action_output_desc`,icon:O,color:`#8b5cf6`,defaults:{type:`action-output`,variables:[]}}];function Z(e){return X.find(t=>t.type===e)}function Q(e){return X.filter(t=>t.category===e)}export{Q as n,Z as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.chart-container[data-v-71d295c5]{position:relative}.cui-chart-table[data-v-ead6cb7f]{border-collapse:collapse}.cui-chart-table th[data-v-ead6cb7f]{text-align:left;white-space:nowrap;border-bottom:1px solid var(--p-content-border-color);font-weight:600}.cui-chart-table td[data-v-ead6cb7f]{white-space:nowrap;border-color:var(--p-datatable-body-cell-border-color);border-style:solid;border-width:0 0 1px}.cui-chart-table td>div[data-v-ead6cb7f],.cui-chart-table td>span[data-v-ead6cb7f]{white-space:normal;overflow-wrap:break-word;word-break:break-all;-webkit-hyphens:auto;hyphens:auto}.cui-chart-table tbody tr[data-v-ead6cb7f]:nth-child(2n){background-color:var(--table-row-odd-background)}
|