@camera.ui/server 2.1.6 → 2.1.8
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-EUyzR8Cu.js → 404-vRjJVgl4.js} +1 -1
- package/dist/interface/assets/{About-BmfMwt66.js → About-CO9cx5Gp.js} +1 -1
- package/dist/interface/assets/{Automation-DtTMxMlL.js → Automation-DDNhcjDg.js} +3 -3
- package/dist/interface/assets/AutomationImport-DAeFd-SZ.js +2 -0
- package/dist/interface/assets/{AutomationStore-aTGlzTcI.js → AutomationStore-NyXuw3tI.js} +2 -2
- package/dist/interface/assets/{AutomationStoreDetail-BtmSvtyE.js → AutomationStoreDetail-Dz9Y8j8g.js} +2 -2
- package/dist/interface/assets/{Automations-CBeEWCad.js → Automations-BeGe7iQE.js} +2 -2
- package/dist/interface/assets/Camera-C0sNg85L.js +2 -0
- package/dist/interface/assets/{CameraConsole-rCJr-qfx.js → CameraConsole-S9Il0g0K.js} +1 -1
- package/dist/interface/assets/{Cameras-DFuh9jxK.js → Cameras-lDMBkoUW.js} +2 -2
- package/dist/interface/assets/{Camview-DxxONfeK.css → Camview-CS7PIBMz.css} +1 -1
- package/dist/interface/assets/Camview-DzMmXQvW.js +1 -0
- package/dist/interface/assets/Config-B0cy1RIU.js +2 -0
- package/dist/interface/assets/ConfigActionCameraControl-BMlRbdRM.js +1 -0
- package/dist/interface/assets/{ConfigActionDelay-CZeAJTj7.js → ConfigActionDelay-DrzMP_7q.js} +1 -1
- package/dist/interface/assets/{ConfigActionHttp-DcQCJ4zV.js → ConfigActionHttp-BUANm5zh.js} +1 -1
- package/dist/interface/assets/{ConfigActionImageInput-DkgxdP2U.js → ConfigActionImageInput-CKvnzs_4.js} +1 -1
- package/dist/interface/assets/{ConfigActionMqtt-Dp2-YpS9.js → ConfigActionMqtt-Cz-fMzXH.js} +1 -1
- package/dist/interface/assets/{ConfigActionNotification-DDbDqLLs.js → ConfigActionNotification-exxG4m-k.js} +1 -1
- package/dist/interface/assets/ConfigActionNotificationControl-BMFbm9lJ.js +1 -0
- package/dist/interface/assets/{ConfigActionOutput-kMcDrgsm.js → ConfigActionOutput-js-UUBci.js} +1 -1
- package/dist/interface/assets/{ConfigActionPlugin-Bv2Ke9_L.js → ConfigActionPlugin-B5hrC_B6.js} +1 -1
- package/dist/interface/assets/{ConfigActionSensor-CogS-K7S.js → ConfigActionSensor-BESCtedA.js} +1 -1
- package/dist/interface/assets/{ConfigActionSnapshot-CdIciF5F.js → ConfigActionSnapshot-Uxz9dCqh.js} +1 -1
- package/dist/interface/assets/{ConfigActionVariable-DS-nQLns.js → ConfigActionVariable-CsiC6bgF.js} +1 -1
- package/dist/interface/assets/{ConfigConditionIfElse-BWYzHNnH.js → ConfigConditionIfElse-CiScJB42.js} +1 -1
- package/dist/interface/assets/{ConfigConditionSensorState-CxiaJpOs.js → ConfigConditionSensorState-CbDfsuOl.js} +1 -1
- package/dist/interface/assets/{ConfigConditionSwitch-l01kWXVF.js → ConfigConditionSwitch-B7E5DAoC.js} +1 -1
- package/dist/interface/assets/{ConfigConditionTime-0Du7w_QE.js → ConfigConditionTime-BmeGYmwH.js} +1 -1
- package/dist/interface/assets/{ConfigSensorValueInput-Dm9r6m8t.js → ConfigSensorValueInput-CNTToTaw.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerDetection-CvK9Hvcd.js → ConfigTriggerDetection-ijTkd_SS.js} +1 -1
- package/dist/interface/assets/ConfigTriggerGeofence-Q7LQpVoM.js +1 -0
- package/dist/interface/assets/{ConfigTriggerManual-IAo9sbiS.js → ConfigTriggerManual-Z1_1wUUM.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerMqtt-16hSjN-I.js → ConfigTriggerMqtt-BBvD0ow9.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSchedule-Ct_AN-xu.js → ConfigTriggerSchedule-B0rMjsZL.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSensor-DkVWre58.js → ConfigTriggerSensor-B1p15KGD.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSystem-BAd9IeRa.js → ConfigTriggerSystem-Du-AkCKy.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerWebhook-EmrFSoiV.js → ConfigTriggerWebhook-Debqt-nw.js} +1 -1
- package/dist/interface/assets/Console-Gu1eu82G.js +1 -0
- package/dist/interface/assets/CuiAutomationRunsDialog-CxcWpqrI.js +1 -0
- package/dist/interface/assets/CuiBottomSheet-BkmkKf1u.js +1 -0
- package/dist/interface/assets/{CuiBottomSheet-DxrKqjWh.js → CuiBottomSheet-DECWGdrp.js} +1 -1
- package/dist/interface/assets/CuiCameraPipCard-CuZZZ7Cv.js +1 -0
- package/dist/interface/assets/CuiCameraRecordings-BxEA_Vhd.js +1 -0
- package/dist/interface/assets/CuiCameraShares-D32cM63m.js +1 -0
- package/dist/interface/assets/CuiCameraTable-67Itb7my.js +1 -0
- package/dist/interface/assets/{CuiCameraTable-BlJHb3gX.js → CuiCameraTable-Bk9N-Oc6.js} +1 -1
- package/dist/interface/assets/{CuiConsole-D56cxVKE.js → CuiConsole-De9JpSLz.js} +2 -2
- package/dist/interface/assets/{CuiDataTable-Ca51CpsO.js → CuiDataTable-P8bWN0ZK.js} +1 -1
- package/dist/interface/assets/{CuiLightControl-DP4pbkjr.js → CuiLightControl-D5Z1AqWH.js} +1 -1
- package/dist/interface/assets/{CuiList-psx5r57o.js → CuiList-w69dERIq.js} +1 -1
- package/dist/interface/assets/CuiPluginCard-D3x9FPb6.js +2 -0
- package/dist/interface/assets/CuiPluginCategoryChip-CQ2FJafE.js +1 -0
- package/dist/interface/assets/{CuiPluginOAuthButton-ZRJJct-f.js → CuiPluginOAuthButton-CNxj7cuf.js} +2 -2
- package/dist/interface/assets/{CuiPluginTrustBadge-DNjUDEtv.js → CuiPluginTrustBadge-DYsEz6WI.js} +1 -1
- package/dist/interface/assets/CuiQRCode-CZnspFFw.js +1 -0
- package/dist/interface/assets/{CuiRecordingsGrid-Sv3uyj9a.css → CuiRecordingsGrid-Q4C3aeLo.css} +1 -1
- package/dist/interface/assets/CuiRecordingsGrid-wEaU6-3c.js +1 -0
- package/dist/interface/assets/CuiSchema-DLV1lIiB.js +1 -0
- package/dist/interface/assets/{CuiTopNavbarItem-DdFdvKkq.js → CuiTopNavbarItem-7yu9c68R.js} +1 -1
- package/dist/interface/assets/Faces-BlPQek1-.js +1 -0
- package/dist/interface/assets/FirstSteps-C-DKv_P2.js +1 -0
- package/dist/interface/assets/Instances-Bmb-yWM-.js +1 -0
- package/dist/interface/assets/{Logs-e3y9zMPD.js → Logs-DxHqkMpx.js} +2 -2
- package/dist/interface/assets/{Menu-DMLqFO8c.js → Menu-DceReBlq.js} +1 -1
- package/dist/interface/assets/Metrics-BstlZavQ.css +1 -0
- package/dist/interface/assets/Metrics-Cw_Z_e0C.js +1 -0
- package/dist/interface/assets/{OAuthDeviceFlow-C51WkjaT.js → OAuthDeviceFlow-CLi6l8jS.js} +1 -1
- package/dist/interface/assets/Plugin-BBVxbQeT.js +1 -0
- package/dist/interface/assets/{PluginConsole-D0n-Jf_E.js → PluginConsole-xOY_kwz_.js} +1 -1
- package/dist/interface/assets/{PluginDetail-NOJPSqIS.js → PluginDetail-D2RncxpL.js} +2 -2
- package/dist/interface/assets/{PluginSchema-aG4DGAcH.js → PluginSchema-DG3ou73v.js} +1 -1
- package/dist/interface/assets/PluginSearch-CBhloRm6.js +1 -0
- package/dist/interface/assets/PluginSearch-RGhSeM1T.js +2 -0
- package/dist/interface/assets/{PluginUpdateProgress-DkdoTjZY.js → PluginUpdateProgress-Bx0MXwAk.js} +1 -1
- package/dist/interface/assets/{Plugins-BzQvLNj7.js → Plugins-COHwVV0A.js} +1 -1
- package/dist/interface/assets/Recordings-H5qOm_rD.js +1 -0
- package/dist/interface/assets/Recordings-zdTzwv7C.css +1 -0
- package/dist/interface/assets/SensorEdit-C-H_3ap8.js +1 -0
- package/dist/interface/assets/{SensorHistory-C8vryAe_.js → SensorHistory-CTIUwIWN.js} +1 -1
- package/dist/interface/assets/Sensors-BUpob7LU.css +1 -0
- package/dist/interface/assets/Sensors-lPcOdHJN.js +2 -0
- package/dist/interface/assets/{Settings-BqcsLKll.js → Settings-BUoXoFiH.js} +1 -1
- package/dist/interface/assets/{Settings-B1MnGPuf.css → Settings-jQIhZFRY.css} +1 -1
- package/dist/interface/assets/SettingsAccount-CudWgknL.js +1 -0
- package/dist/interface/assets/SettingsAccount-DUy_W02_.js +1 -0
- package/dist/interface/assets/{SettingsAppearance-B-smgzKL.js → SettingsAppearance-CoTdsIwM.js} +1 -1
- package/dist/interface/assets/SettingsAppearance-eZsdWWp3.js +1 -0
- package/dist/interface/assets/{SettingsBackup-C0ekmlJy.js → SettingsBackup-ibb5I5Jv.js} +1 -1
- package/dist/interface/assets/{SettingsList-DeP1LOjz.js → SettingsList-W5FvbkXm.js} +1 -1
- package/dist/interface/assets/SettingsMqtt-Ct42icAW.js +1 -0
- package/dist/interface/assets/SettingsNotifications-B4lyMlLR.js +1 -0
- package/dist/interface/assets/SettingsPermissions-Bsv293ri.js +1 -0
- package/dist/interface/assets/{SettingsRecordings-Dh-BqEba.js → SettingsRecordings-COUi9BQg.js} +1 -1
- package/dist/interface/assets/SettingsRemote-Dq_BD0fk.js +1 -0
- package/dist/interface/assets/SettingsSystem-C5xROdA0.js +2 -0
- package/dist/interface/assets/SettingsUsers-Cjk6mevW.js +1 -0
- package/dist/interface/assets/Terminal-BIdBrL4g.js +4 -0
- package/dist/interface/assets/{VariableInput-DKmWb9RP.js → VariableInput-DhAhhfsm.js} +1 -1
- package/dist/interface/assets/{VariableSuggestions-CjlK2Uqx.js → VariableSuggestions-q0Jd1DVI.js} +1 -1
- package/dist/interface/assets/{VersionsHandler-CrHCAiKn.js → VersionsHandler-XEn3uFy7.js} +1 -1
- package/dist/interface/assets/{VirtualSensorCreate-DHhbE5iD.js → VirtualSensorCreate-_E5E0U7E.js} +1 -1
- package/dist/interface/assets/Workers-DVABUc39.js +2 -0
- package/dist/interface/assets/api-AVHJeggR.css +2 -0
- package/dist/interface/assets/{api-DwU_RUzW.js → api-C7Yv5Scr.js} +1 -1
- package/dist/interface/assets/api-CmdQlVDD.js +2 -0
- package/dist/interface/assets/{auth-BhT4BtBc.js → auth-BixzEnBM.js} +1 -1
- package/dist/interface/assets/{automations-ya-5P8Jc.js → automations-K8XPcP3U.js} +1 -1
- package/dist/interface/assets/{cameras.schema-BWH_Q16D.js → cameras.schema-A_6JklLs.js} +1 -1
- package/dist/interface/assets/cloudHandoff-D0ytFfHK.js +1 -0
- package/dist/interface/assets/{config-CgGpshGm.js → config-CURuT8_k.js} +1 -1
- package/dist/interface/assets/{flowSchema-OrM5E_3R.js → flowSchema-szT9B0sA.js} +1 -1
- package/dist/interface/assets/intercomService-BjB4QQiX.js +1 -0
- package/dist/interface/assets/main-B1ryIyTr.css +1 -0
- package/dist/interface/assets/main-BdIdmDhs.js +3 -0
- package/dist/interface/assets/mqtt-uItF3Vd7.js +1 -0
- package/dist/interface/assets/{nodeDefinitions-DQQlFmPN.js → nodeDefinitions-c5rXs9EW.js} +1 -1
- package/dist/interface/assets/{notifications-DxDFtZSo.js → notifications-CuZPzI4-.js} +1 -1
- package/dist/interface/assets/{plugins-g-qkx8GX.js → plugins-QEqfAk0G.js} +1 -1
- package/dist/interface/assets/round-alt-arrow-left-bold-CfccdiWp.js +1 -0
- package/dist/interface/assets/{round-restart-alt-YiDa63x6.js → round-restart-alt-B_7HR24a.js} +1 -1
- package/dist/interface/assets/{sensorIcons-4dvSmrEv.js → sensorIcons-BujySw0j.js} +1 -1
- package/dist/interface/assets/{sensors-BFCE7rbx.js → sensors-BxvL01cB.js} +1 -1
- package/dist/interface/assets/{server-arWVymo1.js → server-CDm6FwHH.js} +1 -1
- package/dist/interface/assets/{theme-Dw9-CwMe.js → theme-CRw47tnu.js} +1 -1
- package/dist/interface/assets/{types-D5c17URv.js → types-DtdpTPfZ.js} +1 -1
- package/dist/interface/assets/types-R10eIequ.js +1 -0
- package/dist/interface/assets/types-p_uC0rfp.js +1 -0
- package/dist/interface/assets/useAppVersion-BxTTVLKg.js +1 -0
- package/dist/interface/assets/useBackupRestore-DLieDBFC.js +1 -0
- package/dist/interface/assets/{useCameraOptions-BF3ASvVM.js → useCameraOptions-DMC2KjMS.js} +1 -1
- package/dist/interface/assets/{useLogsSocket-hJ9xUUtr.js → useLogsSocket-CmyalQi8.js} +1 -1
- package/dist/interface/assets/{useNavLayout-CcDIO9RG.js → useNavLayout-BacPxpZv.js} +1 -1
- package/dist/interface/assets/usePermissions-C2wQBWmH.js +1 -0
- package/dist/interface/assets/{usePluginUpdates-BJwtwD9v.js → usePluginUpdates-CyjxFTTi.js} +1 -1
- package/dist/interface/assets/usePushRegistration-BPSfvI_w.js +2 -0
- package/dist/interface/assets/{useServerRestart-DwpQyv5H.js → useServerRestart-x8p2rFqn.js} +1 -1
- package/dist/interface/assets/{useStreamStatus-C5dH33U5.js → useStreamStatus-PMpl519O.js} +1 -1
- package/dist/interface/assets/{useUpdateChannel-D7hnlzd5.js → useUpdateChannel-ChscS5KW.js} +1 -1
- package/dist/interface/assets/{useUserOptions-DFgkIDv8.js → useUserOptions-YiEj2ox6.js} +1 -1
- package/dist/interface/assets/{vendor-cameraui-GaXYUHUd.js → vendor-cameraui-Cf0XVNQ7.js} +44 -44
- package/dist/interface/assets/vendor-core-u4xNQ-aF.js +1 -0
- package/dist/interface/assets/{vendor-primevue-CIRUBYsf.js → vendor-primevue-BDu2BpXv.js} +1 -1
- package/dist/interface/index.html +26 -26
- package/dist/interface/sw.js +1 -1
- package/dist/server/package.json +5 -5
- package/dist/server/requirements.txt +1 -1
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/__init__.py +12 -2
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/__init__.py +14 -2
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/config.py +4 -7
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/detection.py +99 -7
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/device.py +7 -8
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/events.py +4 -0
- package/dist/server/src/api/controllers/cameras.controller.d.ts +2 -5
- package/dist/server/src/api/controllers/cameras.controller.js +2 -57
- package/dist/server/src/api/controllers/cameras.controller.js.map +1 -1
- package/dist/server/src/api/database/index.d.ts +1 -1
- package/dist/server/src/api/database/index.js +1 -1
- package/dist/server/src/api/database/migrations/v2-1-6.d.ts +3 -0
- package/dist/server/src/api/database/migrations/v2-1-6.js +62 -0
- package/dist/server/src/api/database/migrations/v2-1-6.js.map +1 -0
- package/dist/server/src/api/database/migrations/v2-1-7.d.ts +3 -0
- package/dist/server/src/api/database/migrations/v2-1-7.js +44 -0
- package/dist/server/src/api/database/migrations/v2-1-7.js.map +1 -0
- package/dist/server/src/api/database/types.d.ts +1 -0
- package/dist/server/src/api/routes/cameras.routes.js +5 -39
- package/dist/server/src/api/routes/cameras.routes.js.map +1 -1
- package/dist/server/src/api/schemas/cameras.schema.d.ts +372 -116
- package/dist/server/src/api/schemas/cameras.schema.js +55 -31
- package/dist/server/src/api/schemas/cameras.schema.js.map +1 -1
- package/dist/server/src/api/services/cameras.service.d.ts +2 -3
- package/dist/server/src/api/services/cameras.service.js +2 -17
- package/dist/server/src/api/services/cameras.service.js.map +1 -1
- package/dist/server/src/api/types/index.d.ts +3 -6
- package/dist/server/src/api/websocket/nsp/metrics.d.ts +1 -0
- package/dist/server/src/api/websocket/nsp/metrics.js +15 -0
- package/dist/server/src/api/websocket/nsp/metrics.js.map +1 -1
- package/dist/server/src/api/websocket/types.d.ts +9 -0
- package/dist/server/src/automations/actions/cameraControl.js +15 -1
- package/dist/server/src/automations/actions/cameraControl.js.map +1 -1
- package/dist/server/src/automations/actions/notificationControl.js +10 -1
- package/dist/server/src/automations/actions/notificationControl.js.map +1 -1
- package/dist/server/src/camera/controller.d.ts +1 -0
- package/dist/server/src/camera/controller.js +21 -7
- package/dist/server/src/camera/controller.js.map +1 -1
- package/dist/server/src/camera/decoder/child.d.ts +2 -3
- package/dist/server/src/camera/decoder/child.js +5 -13
- package/dist/server/src/camera/decoder/child.js.map +1 -1
- package/dist/server/src/camera/decoder/detection-coordinator.d.ts +5 -5
- package/dist/server/src/camera/decoder/detection-coordinator.js +55 -26
- package/dist/server/src/camera/decoder/detection-coordinator.js.map +1 -1
- package/dist/server/src/camera/decoder/detection-pipeline.d.ts +11 -3
- package/dist/server/src/camera/decoder/detection-pipeline.js +72 -14
- package/dist/server/src/camera/decoder/detection-pipeline.js.map +1 -1
- package/dist/server/src/camera/decoder/event-manager.d.ts +5 -1
- package/dist/server/src/camera/decoder/event-manager.js +48 -6
- package/dist/server/src/camera/decoder/event-manager.js.map +1 -1
- package/dist/server/src/camera/decoder/event-thumbnailer.d.ts +2 -0
- package/dist/server/src/camera/decoder/event-thumbnailer.js +1 -1
- package/dist/server/src/camera/decoder/event-thumbnailer.js.map +1 -1
- package/dist/server/src/camera/decoder/frame-scaler.d.ts +8 -2
- package/dist/server/src/camera/decoder/frame-scaler.js +56 -5
- package/dist/server/src/camera/decoder/frame-scaler.js.map +1 -1
- package/dist/server/src/camera/decoder/nvr-sink.js +1 -1
- package/dist/server/src/camera/decoder/nvr-sink.js.map +1 -1
- package/dist/server/src/camera/decoder/perf-tracker.d.ts +1 -0
- package/dist/server/src/camera/decoder/perf-tracker.js +14 -1
- package/dist/server/src/camera/decoder/perf-tracker.js.map +1 -1
- package/dist/server/src/camera/decoder/ptz/autotracker.d.ts +4 -0
- package/dist/server/src/camera/decoder/ptz/autotracker.js +97 -18
- package/dist/server/src/camera/decoder/ptz/autotracker.js.map +1 -1
- package/dist/server/src/camera/decoder/sources/buffered-source.d.ts +2 -0
- package/dist/server/src/camera/decoder/sources/buffered-source.js +1 -1
- package/dist/server/src/camera/decoder/sources/buffered-source.js.map +1 -1
- package/dist/server/src/camera/decoder/types.d.ts +13 -0
- package/dist/server/src/camera/decoder/types.js +3 -0
- package/dist/server/src/camera/decoder/types.js.map +1 -1
- package/dist/server/src/camera/decoder/worker.js +4 -9
- package/dist/server/src/camera/decoder/worker.js.map +1 -1
- package/dist/server/src/camera/index.d.ts +2 -3
- package/dist/server/src/camera/index.js +3 -5
- package/dist/server/src/camera/index.js.map +1 -1
- package/dist/server/src/camera/privacy/mask.d.ts +27 -0
- package/dist/server/src/camera/privacy/mask.js +204 -0
- package/dist/server/src/camera/privacy/mask.js.map +1 -0
- package/dist/server/src/camera/privacy/snapshot.d.ts +13 -0
- package/dist/server/src/camera/privacy/snapshot.js +126 -0
- package/dist/server/src/camera/privacy/snapshot.js.map +1 -0
- package/dist/server/src/camera/utils/filter.d.ts +6 -3
- package/dist/server/src/camera/utils/filter.js +12 -8
- package/dist/server/src/camera/utils/filter.js.map +1 -1
- package/dist/server/src/camera/zones.d.ts +2 -0
- package/dist/server/src/camera/zones.js +11 -0
- package/dist/server/src/camera/zones.js.map +1 -0
- package/dist/server/src/manager/notificationManager.d.ts +2 -0
- package/dist/server/src/manager/notificationManager.js +21 -2
- package/dist/server/src/manager/notificationManager.js.map +1 -1
- package/dist/server/src/plugins/runtime/python/proxy/camera_device.py +8 -8
- package/dist/server/src/plugins/schema.js +1 -1
- package/dist/server/src/plugins/schema.js.map +1 -1
- package/dist/server/src/rpc/interfaces/frameworker.d.ts +2 -3
- package/package.json +5 -5
- package/dist/interface/assets/AutomationImport-Cxrhgzer.js +0 -2
- package/dist/interface/assets/Camera-9tFj730F.js +0 -2
- package/dist/interface/assets/Camview-C2byPDDS.js +0 -1
- package/dist/interface/assets/Config-C_IAFeWx.js +0 -2
- package/dist/interface/assets/ConfigActionCameraControl-Caqlckcz.js +0 -1
- package/dist/interface/assets/ConfigActionNotificationControl-CX83znhY.js +0 -1
- package/dist/interface/assets/ConfigTriggerGeofence-DQcdG6av.js +0 -1
- package/dist/interface/assets/Console-C7lP5TMv.js +0 -1
- package/dist/interface/assets/CuiAutomationRunsDialog-BoGUmS-Q.js +0 -1
- package/dist/interface/assets/CuiBottomSheet-II-Ajj4k.js +0 -1
- package/dist/interface/assets/CuiCameraPipCard-C2nZsnPM.js +0 -1
- package/dist/interface/assets/CuiCameraRecordings-B4pJPGOQ.js +0 -1
- package/dist/interface/assets/CuiCameraShares-DBZ01JcG.js +0 -1
- package/dist/interface/assets/CuiCameraTable-WOrw4_LR.js +0 -1
- package/dist/interface/assets/CuiPluginCard-DSQ7w6Nl.js +0 -2
- package/dist/interface/assets/CuiPluginCategoryChip-DiUXddOe.js +0 -1
- package/dist/interface/assets/CuiQRCode-wxEwM1Sh.js +0 -1
- package/dist/interface/assets/CuiRecordingsGrid-DM5XDEMU.js +0 -1
- package/dist/interface/assets/CuiSchema-BJE7vHFH.js +0 -1
- package/dist/interface/assets/Faces-D4_QXhaT.js +0 -1
- package/dist/interface/assets/FirstSteps-CfKHB_uc.js +0 -1
- package/dist/interface/assets/Instances-DvAMsOPZ.js +0 -1
- package/dist/interface/assets/Metrics-C3RI973t.js +0 -1
- package/dist/interface/assets/Metrics-DqBC-wEo.css +0 -1
- package/dist/interface/assets/Plugin-DcdVF_OG.js +0 -1
- package/dist/interface/assets/PluginSearch-JGQTNibA.js +0 -1
- package/dist/interface/assets/PluginSearch-w9vvKCTP.js +0 -2
- package/dist/interface/assets/Recordings-80Xd1V3L.css +0 -1
- package/dist/interface/assets/Recordings-_2r3gD4E.js +0 -1
- package/dist/interface/assets/SensorEdit-qcv6KAap.js +0 -1
- package/dist/interface/assets/Sensors-B-Qhfr5i.css +0 -1
- package/dist/interface/assets/Sensors-DnWG7VfR.js +0 -2
- package/dist/interface/assets/SettingsAccount-BrYKAfPE.js +0 -1
- package/dist/interface/assets/SettingsAccount-CNfGFQuq.js +0 -1
- package/dist/interface/assets/SettingsAppearance-eeRSh42a.js +0 -1
- package/dist/interface/assets/SettingsMqtt-Bo4jZHMl.js +0 -1
- package/dist/interface/assets/SettingsNotifications-Dx3me91s.js +0 -2
- package/dist/interface/assets/SettingsPermissions-DU1XvFFc.js +0 -1
- package/dist/interface/assets/SettingsRemote-W3skn8qk.js +0 -1
- package/dist/interface/assets/SettingsSystem-DnQSlgu0.js +0 -2
- package/dist/interface/assets/SettingsUsers-CFBTzA0j.js +0 -1
- package/dist/interface/assets/Terminal-C7lDL745.js +0 -4
- package/dist/interface/assets/Workers-CY-3Ah4u.js +0 -2
- package/dist/interface/assets/api-Bj4QRftG.css +0 -2
- package/dist/interface/assets/api-CvO7u24f.js +0 -2
- package/dist/interface/assets/cctv-BA5DvNlE.js +0 -1
- package/dist/interface/assets/cloudHandoff-BPjQsq7k.js +0 -1
- package/dist/interface/assets/main-Dd71JT_o.css +0 -1
- package/dist/interface/assets/main-rlz9T4Ug.js +0 -3
- package/dist/interface/assets/mqtt-CO84Q9sE.js +0 -1
- package/dist/interface/assets/round-alt-arrow-left-bold-BxX4ufd0.js +0 -1
- package/dist/interface/assets/types-BCygqese.js +0 -1
- package/dist/interface/assets/types-vaT6wuY0.js +0 -1
- package/dist/interface/assets/useAppVersion-Cp6mZ-ge.js +0 -1
- package/dist/interface/assets/useBackupRestore-Drc-2VXy.js +0 -1
- package/dist/interface/assets/useElectron-BNGXeZEx.js +0 -1
- package/dist/interface/assets/usePermissions-C9kp5HQR.js +0 -1
- package/dist/interface/assets/vendor-core-BNfYBWH3.js +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./esm-JGwpHVqo.js","./vendor-capacitor-4nn-eF9U.js","./vendor-BaiDFVEr.js","./rolldown-runtime-C0FnF6B9.js","./esm-TRigYTsA.js","./cloudHandoff-D0ytFfHK.js","./api-CmdQlVDD.js","./vendor-cameraui-Cf0XVNQ7.js","./intercomService-BjB4QQiX.js","./vendor-zod-Dbq0fBXY.js","./types-R10eIequ.js","./lightbulb-outline-ClK17CO6.js","./vendor-core-u4xNQ-aF.js","./vendor-primevue-BDu2BpXv.js","./vendor-dnd-ChrDrMuz.js","./close-BNAWPz0y.js","./vendor-draggabilly-DSeIE_bQ.js","./api-AVHJeggR.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{$ as t,$n as n,A as r,Ar as i,D as a,Dr as o,Dt as s,Ei as c,Er as l,Et as u,Ft as d,G as f,Ir as p,J as m,K as h,Lt as g,M as _,Mr as v,Nr as y,Nt as b,Oi as x,Or as S,Q as C,Sr as w,Ti as T,Vt as ee,W as te,Wr as ne,X as E,Xr as re,Y as ie,Z as ae,_r as oe,at as D,ci as se,cr as O,ct as ce,dr as le,ea as ue,er as de,et as fe,fr as pe,ft as me,gr as k,hi as A,hr as he,ia as j,it as M,jt as ge,k as _e,li as ve,lr as ye,lt as be,mi as xe,mr as Se,na as N,nr as Ce,nt as P,o as we,ot as Te,pr as Ee,pt as De,q as Oe,ra as ke,rr as Ae,rt as je,sr as Me,st as Ne,tr as Pe,tt as Fe,ur as Ie,wi as Le,wr as Re,xr as ze,yr as Be}from"./vendor-cameraui-Cf0XVNQ7.js";import{$n as Ve,Cn as He,Dn as Ue,Dr as We,En as Ge,Er as Ke,Et as qe,F as Je,Fn as Ye,Hn as Xe,In as Ze,Ln as Qe,Mn as $e,Nn as et,On as tt,P as nt,Pn as rt,Rn as it,S as at,Un as ot,V as st,Vt as ct,_ as lt,_n as ut,_r as dt,_t as ft,an as pt,ar as mt,at as ht,b as gt,bn as _t,bt as vt,cn as yt,cr as bt,d as xt,dr as St,dt as Ct,er as wt,f as Tt,g as Et,gn as Dt,gr as Ot,gt as kt,hn as At,hr as jt,ht as Mt,i as Nt,it as Pt,jn as Ft,kr as It,ln as Lt,lr as Rt,mr as zt,n as Bt,o as Vt,ot as Ht,p as Ut,r as Wt,sr as Gt,st as Kt,t as qt,u as Jt,un as Yt,ur as Xt,ut as Zt,vn as Qt,w as $t,x as en,y as tn}from"./api-CmdQlVDD.js";import{$n as nn,$t as rn,Cn as an,Dn as on,Fn as F,Gn as sn,H as cn,J as ln,Jn as un,Jt as dn,K as fn,Ln as pn,Mn as mn,Nn as I,On as hn,Qt as gn,Rt as _n,Sn as vn,Tn as yn,Un as bn,Xn as L,Yt as xn,Zn as Sn,Zt as Cn,_r as R,an as z,b as wn,bn as Tn,br as B,cn as V,cr as H,dr as En,en as U,fn as W,gr as G,hn as Dn,in as K,ir as On,jn as kn,m as An,mr as jn,nn as Mn,on as q,or as Nn,p as Pn,pn as J,q as Fn,qn as Y,qt as X,rr as In,sn as Z,v as Q,wn as Ln,x as Rn,y as $,yr as zn,zn as Bn}from"./vendor-BaiDFVEr.js";import{a as Vn,i as Hn}from"./intercomService-BjB4QQiX.js";import{A as Un,D as Wn,M as Gn,N as Kn,R as qn,j as Jn}from"./types-R10eIequ.js";import{d as Yn,l as Xn,n as Zn,p as Qn,t as $n,u as er}from"./vendor-core-u4xNQ-aF.js";import{B as tr,C as nr,D as rr,E as ir,G as ar,H as or,K as sr,L as cr,O as lr,R as ur,S as dr,U as fr,V as pr,W as mr,_ as hr,a as gr,b as _r,d as vr,f as yr,j as br,k as xr,l as Sr,m as Cr,n as wr,p as Tr,r as Er,t as Dr,v as Or,y as kr,z as Ar}from"./vendor-primevue-BDu2BpXv.js";import{a as jr,i as Mr,n as Nr,r as Pr,t as Fr}from"./vendor-dnd-ChrDrMuz.js";import{t as Ir}from"./close-BNAWPz0y.js";import{t as Lr}from"./vendor-draggabilly-DSeIE_bQ.js";import{n as Rr,t as zr}from"./useBackupRestore-DLieDBFC.js";import{n as Br,t as Vr}from"./useServerRestart-x8p2rFqn.js";import{t as Hr}from"./notifications-CuZPzI4-.js";import{t as Ur}from"./usePushRegistration-BPSfvI_w.js";import{t as Wr}from"./minus-RI3VlDe8.js";import{t as Gr}from"./power-C9UIp2oO.js";import{n as Kr,t as qr}from"./eye-off-CaRq7Ks2.js";import{t as Jr}from"./chevron-down-D111daTn.js";import{t as Yr}from"./api-C7Yv5Scr.js";import{n as Xr,r as Zr,t as Qr}from"./useNavLayout-BacPxpZv.js";import{t as $r}from"./theme-CRw47tnu.js";import{t as ei}from"./trash2-BLScx4HX.js";import{n as ti,t as ni}from"./microphone-C0weJY9W.js";import{a as ri,i as ii,r as ai,t as oi}from"./CuiSchema-DLV1lIiB.js";import{t as si}from"./plugins-QEqfAk0G.js";import{t as ci}from"./sensors-BxvL01cB.js";import{t as li}from"./PluginSchema-DG3ou73v.js";import{t as ui}from"./trash-can-outline-DLKniIWM.js";import{t as di}from"./information-outline-BQDq8w2t.js";import{t as fi}from"./plus-DHwFyXkb.js";import{a as pi,i as mi,n as hi,t as gi}from"./cameras.schema-A_6JklLs.js";import{t as _i}from"./delete-BF6keuqy.js";import{t as vi}from"./useStreamStatus-PMpl519O.js";import{a as yi,c as bi,d as xi,f as Si,i as Ci,l as wi,m as Ti,n as Ei,o as Di,p as Oi,r as ki,s as Ai,t as ji,u as Mi}from"./CuiLightControl-D5Z1AqWH.js";import{t as Ni}from"./cube-scan-DOe6W9mW.js";import{t as Pi}from"./CuiDataTable-P8bWN0ZK.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),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),ue(localStorage),j(),typeof window<`u`&&window.addEventListener(`pagehide`,N);async function Fi(e,t={}){let n=window.location.hash.startsWith(`#`)?window.location.hash.substring(1):window.location.hash,r=new URLSearchParams(n),i=r.get(`auth`);if(!i)return!1;r.delete(`auth`);let a=r.toString(),o=a?`#${a}`:``;window.history.replaceState(null,``,window.location.pathname+window.location.search+o);let s;try{s=JSON.parse(atob(i))}catch{return!1}s._sourceUrl&&t.onRedirectInfo?.({sourceUrl:s._sourceUrl,instanceName:s._instanceName??`Remote`});let c=!1;if(s.access_token&&s._id&&s.username&&s.role){let n={access:s.access_token,refresh:s.refresh_token,accessExpiresAt:s.access_token_expires_at,refreshExpiresAt:s.refresh_token_expires_at},r={url:Rt(),mode:`direct-lan`,priority:0};await e.seedAndRetry({endpoint:r,tokens:n},`home`),c=!0,t.onUser?.({_id:s._id,username:s.username,email:s.email,role:s.role,firstLogin:s.firstLogin,avatar:s.avatar})}return s._reset&&t.onReset?.(),c}function Ii(e){ln.setEventListener(t=>Y(()=>e.signal.value.kind===`online`||e.signal.value.kind===`degraded`,e=>t(e),{immediate:!0}))}var Li={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ri(e,t){return I(),V(`svg`,Li,[...t[0]||=[z(`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 zi=On({name:`mdi-fingerprint`,render:Ri}),Bi=`cameraui:unlocked`;function Vi(){try{sessionStorage.setItem(Bi,`1`)}catch{}}var Hi=H(!1),Ui=H(!1);function Wi(){return{isLocked:Hi,isAvailable:Ui,unlock:Gi,init:Ki}}async function Gi(){return Hi.value=!1,Vi(),!0}async function Ki(){}var qi={key:0,class:`app-lock-overlay`},Ji={class:`flex flex-col items-center gap-6 p-8`},Yi={class:`text-center`},Xi={class:`text-lg font-semibold`},Zi={class:`text-sm text-muted mt-2`},Qi=He(Dn({__name:`CuiAppLockOverlay`,setup(e){let{isLocked:t,unlock:n}=Wi(),r=H(!1);async function i(){r.value=!0;try{await n()}finally{r.value=!1}}return Y(t,async e=>{e&&(await yn(),await i())},{immediate:!0}),(e,n)=>{let a=qe,o=zi,s=d;return G(t)?(I(),V(`div`,qi,[z(`div`,Ji,[J(a,{class:`w-16 h-16 text-muted`}),z(`div`,Yi,[z(`h2`,Xi,B(e.$t(`views.app_lock.title`)),1),z(`p`,Zi,B(e.$t(`views.app_lock.subtitle`)),1)]),J(s,{label:e.$t(`views.app_lock.unlock`),loading:G(r),fluid:``,class:`cui-button-medium`,onClick:i},{icon:L(()=>[J(o,{class:`mr-2`})]),_:1},8,[`label`,`loading`])])])):Z(``,!0)}}}),[[`__scopeId`,`data-v-baef4383`]]),$i={key:0,class:`cui-restore-overlay`},ea={class:`cui-restore-overlay__card shadow-xl`},ta={class:`text-lg font-semibold`},na={class:`text-sm text-muted`},ra={class:`text-xs text-muted`},ia=He(Dn({__name:`CuiRestoreOverlay`,setup(e){let{t}=p(),{active:n,phase:r,uploadPercent:i}=Rr(),a=K(()=>{switch(r.value){case`uploading`:return t(`restore.phase_uploading`);case`restarting`:return t(`restore.phase_restarting`);default:return t(`restore.phase_restoring`)}});return(e,t)=>{let o=vr;return I(),q(X,{name:`fade`},{default:L(()=>[G(n)?(I(),V(`div`,$i,[z(`div`,ea,[J(G(Rn),{src:G(Jt)(`logo_animated.svg`),width:`52px`,height:`58px`,title:`camera.ui`,"aria-label":`camera.ui`},null,8,[`src`]),z(`span`,ta,B(e.$t(`restore.title`)),1),z(`span`,na,B(G(a)),1),G(r)===`uploading`?(I(),q(o,{key:0,value:G(i),class:`w-full`},null,8,[`value`])):(I(),q(o,{key:1,mode:`indeterminate`,class:`w-full`,style:{height:`6px`}})),z(`span`,ra,B(e.$t(`restore.dont_close`)),1)])])):Z(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-0c1a6c8d`]]),aa={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function oa(e,t){return I(),V(`svg`,aa,[...t[0]||=[z(`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 sa=On({name:`mdi-bell-off-outline`,render:oa}),ca=Vn(`PushSync`),la=`cui.push.syncDismissed`,ua=H(!1),da=H(!1),fa=!1;function pa(){let e=Et(),{isLoggedIn:t}=Qn(e),{registerForPush:n,getSyncState:r,restoreMarker:i}=Ur(),a=new Hr,{data:o}=a.getSettingsQuery(),{data:s}=a.listDevicesQuery(()=>!1),c=K(()=>!1);async function l(){if(!(!c.value||fa)){fa=!0;try{let e=mt();if(!e)return;let t=await r(e,s.value);if(t.status!==`key-mismatch`){ua.value=!1,t.status===`registered`&&t.device&&(await i(e,t.device.id),await _a(e));return}if(await u()){ua.value=!1;return}ua.value=!await ha(e)}catch(e){ca.warn(`could not evaluate push sync state:`,e)}finally{fa=!1}}}async function u(){try{let{FirebaseMessaging:e}=await _n(async()=>{let{FirebaseMessaging:e}=await import(`./esm-JGwpHVqo.js`);return{FirebaseMessaging:e}},__vite__mapDeps([0,1,2,3]),import.meta.url);return(await e.checkPermissions()).receive===`granted`&&(await n(),await a.queryClient.invalidateQueries({queryKey:[`notifications`,`devices`]}),!0)}catch(e){return ca.warn(`silent push repair failed:`,e),!1}}async function d(){da.value=!0;try{await n(),await a.queryClient.invalidateQueries({queryKey:[`notifications`,`devices`]}),ua.value=!1}catch(e){ca.warn(`push repair failed:`,e)}finally{da.value=!1}}async function f(){ua.value=!1;let e=mt();e&&await ga(e)}return Y([c,s],()=>void l(),{immediate:!0}),{needsAction:K(()=>ua.value&&c.value),repairing:K(()=>da.value),repair:d,dismiss:f}}async function ma(){try{let{Preferences:e}=await _n(async()=>{let{Preferences:e}=await import(`./esm-TRigYTsA.js`);return{Preferences:e}},__vite__mapDeps([4,1,2,3]),import.meta.url),{value:t}=await e.get({key:la});return t?JSON.parse(t):{}}catch{return{}}}async function ha(e){return(await ma())[e]===!0}async function ga(e){await va(e,!0)}async function _a(e){(await ma())[e]&&await va(e,!1)}async function va(e,t){try{let{Preferences:n}=await _n(async()=>{let{Preferences:e}=await import(`./esm-TRigYTsA.js`);return{Preferences:e}},__vite__mapDeps([4,1,2,3]),import.meta.url),r=await ma();t?r[e]=!0:delete r[e],await n.set({key:la,value:JSON.stringify(r)})}catch{}}var ya={class:`cui-push-sync-indicator__content`},ba={class:`cui-push-sync-indicator__text`},xa=He(Dn({__name:`CuiPushSyncIndicator`,setup(e){let{t}=p(),{bottombarHeight:n}=Ue(),{needsAction:r,repairing:i,repair:a,dismiss:o}=pa(),{updateAvailable:s}=at(),c=dt(),l=K(()=>r.value&&c.bannerMode.value===null&&!s.value),u=K(()=>`calc(${n.value}px + 1rem + env(safe-area-inset-bottom, 0px))`);return(e,n)=>{let r=ge,s=sa,c=d,f=Ir;return I(),q(X,{name:`fade`},{default:L(()=>[G(l)?(I(),V(`div`,{key:0,class:`cui-push-sync-indicator shadow-xl`,style:zn({bottom:G(u)})},[z(`div`,ya,[G(i)?(I(),q(r,{key:0,class:`cui-push-sync-indicator__spinner`,"stroke-width":`5`})):(I(),q(s,{key:1,class:`cui-push-sync-indicator__icon`})),z(`span`,ba,B(G(t)(`components.push_sync.title`)),1),G(i)?Z(``,!0):(I(),q(c,{key:2,size:`small`,class:`cui-push-sync-indicator__button`,label:G(t)(`components.push_sync.action`),onClick:G(a)},null,8,[`label`,`onClick`])),G(i)?Z(``,!0):(I(),q(c,{key:3,severity:`secondary`,text:``,rounded:``,size:`small`,class:`cui-push-sync-indicator__dismiss`,"aria-label":G(t)(`components.push_sync.dismiss`),onClick:G(o)},{icon:L(()=>[J(f,{class:`w-4 h-4`})]),_:1},8,[`aria-label`,`onClick`]))])],4)):Z(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-335a3ce0`]]),Sa={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ca(e,t){return I(),V(`svg`,Sa,[...t[0]||=[z(`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 wa=On({name:`iconoir-download`,render:Ca}),Ta={class:`cui-update-indicator__content`},Ea={class:`cui-update-indicator__text`},Da=He(Dn({__name:`CuiUpdateIndicator`,setup(e){let{t}=p(),{bottombarHeight:n}=Ue(),{updateAvailable:r,isApplying:i,applyUpdate:a}=at(),o=Et(),{isLoggedIn:s}=Qn(o),c=dt(),l=K(()=>s.value&&r.value&&c.bannerMode.value===null),u=K(()=>`calc(${n.value}px + 1rem + env(safe-area-inset-bottom, 0px))`);function f(){a()}return(e,n)=>{let r=ge,a=wa,o=d;return I(),q(X,{name:`fade`},{default:L(()=>[G(l)?(I(),V(`div`,{key:0,class:`cui-update-indicator shadow-xl`,style:zn({bottom:G(u)})},[z(`div`,Ta,[G(i)?(I(),q(r,{key:0,class:`cui-update-indicator__spinner`,"stroke-width":`5`})):(I(),q(a,{key:1,class:`cui-update-indicator__icon`})),z(`span`,Ea,B(G(i)?G(t)(`components.toast.update_applying`):G(t)(`components.toast.update_available_title`)),1),G(i)?Z(``,!0):(I(),q(o,{key:2,size:`small`,class:`cui-update-indicator__button`,label:G(t)(`components.toast.update_now`),onClick:f},null,8,[`label`]))])],4)):Z(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-8ce1000d`]]),Oa={class:`cui-connection-indicator__content`},ka={class:`cui-connection-indicator__text`},Aa=He(Dn({__name:`CuiConnectionIndicator`,setup(e){let{t}=p(),{bottombarHeight:n}=Ue(),{bannerMode:r,inTrouble:i}=dt(),{restarting:a}=Br(),o=Wt(),s=Et(),{isLoggedIn:c}=Qn(s),l=K(()=>`calc(${n.value}px + 1rem + env(safe-area-inset-bottom, 0px))`),u=K(()=>c.value&&(r.value!==null||a.value)),f=K(()=>r.value===`connecting`?t(`connection.connecting_remote`):r.value===`degraded`?t(`connection.degraded`):r.value===null?t(`connection.restarting`):t(`connection.reconnecting`)),m=K(()=>i.value&&o===`cloud`);async function h(){let{bounceToCloudFrontend:e}=await _n(async()=>{let{bounceToCloudFrontend:e}=await import(`./cloudHandoff-D0ytFfHK.js`);return{bounceToCloudFrontend:e}},__vite__mapDeps([5,6,3,7,2,8,9,10,11,12,13,14,15,16,17]),import.meta.url);await e()}return(e,n)=>{let r=ge,i=Je,a=d;return I(),q(X,{name:`fade`},{default:L(()=>[G(u)?(I(),V(`div`,{key:0,class:`cui-connection-indicator shadow-xl`,style:zn({bottom:G(l)})},[z(`div`,Oa,[J(r,{class:`!w-5 !h-5 shrink-0`,"stroke-width":`5`}),z(`span`,ka,B(G(f)),1),G(m)?(I(),q(a,{key:0,size:`small`,rounded:``,class:`cui-connection-indicator__button`,"aria-label":G(t)(`connection.pick_server`),onClick:h},{default:L(()=>[J(i,{class:`w-4 h-4`})]),_:1},8,[`aria-label`])):Z(``,!0)])],4)):Z(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-0204ee57`]]),ja={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ma(e,t){return I(),V(`svg`,ja,[...t[0]||=[z(`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 Na=On({name:`mdi-unfold-less-vertical`,render:Ma}),Pa={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Fa(e,t){return I(),V(`svg`,Pa,[...t[0]||=[z(`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 Ia=On({name:`mdi-unfold-more-horizontal`,render:Fa}),La={class:`fixed flex flex-row items-center z-[99999] top-0 left-[7px] gap-2 p-2 pl-[0.4rem]! non-draggable-region`},Ra=He(Dn({__name:`CuiWindowButtons`,setup(e){let{electron:t}=Hn(),n=H(!1),r=H(!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 kn(()=>{t?.on(`fullscreen`,s)}),hn(()=>{t?.removeListener(`fullscreen`,s)}),(e,t)=>{let s=Ir,c=Wr,l=Ia,u=Na;return Sn((I(),V(`div`,La,[z(`div`,{class:`close-button`,onClick:a},[J(s,{color:`#7f050a`,width:`100%`,height:`100%`,class:R([`transition-opacity opacity-0`,{"opacity-100":G(n)}])},null,8,[`class`])]),z(`div`,{class:R({"disabled-button":G(r),"minify-button":!G(r)}),onClick:i},[G(r)?Z(``,!0):(I(),q(c,{key:0,color:`#995712`,width:`100%`,height:`100%`,class:R([`transition-opacity opacity-0`,{"opacity-100":G(n)}])},null,8,[`class`]))],2),z(`div`,{class:`expand-button`,style:zn(`${G(r)?`transform: rotate(45deg)`:`transform: rotate(-45deg)`}`),onClick:o},[G(r)?(I(),q(u,{key:1,color:`#0d650d`,width:`100%`,height:`100%`,class:R([`transition-opacity opacity-0`,{"opacity-100":G(n)}])},null,8,[`class`])):(I(),q(l,{key:0,color:`#0d650d`,width:`100%`,height:`100%`,class:R([`transition-opacity opacity-0`,{"opacity-100":G(n)}])},null,8,[`class`]))],4)])),[[G($n),e=>n.value=e]])}}}),[[`__scopeId`,`data-v-d1e31a06`]]),za={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ba(e,t){return I(),V(`svg`,za,[...t[0]||=[z(`path`,{fill:`currentColor`,d:`M12 3a9 9 0 0 0-9 9H0l4 4l4-4H5a7 7 0 0 1 7-7a7 7 0 0 1 7 7a7 7 0 0 1-7 7c-1.5 0-2.91-.5-4.06-1.3L6.5 19.14A9.1 9.1 0 0 0 12 21a9 9 0 0 0 9-9a9 9 0 0 0-9-9m2 9a2 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 Va=On({name:`mdi-backup-restore`,render:Ba}),Ha={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ua(e,t){return I(),V(`svg`,Ha,[...t[0]||=[z(`path`,{fill:`currentColor`,d:`M7 19v-2h2v2zm4 0v-2h2v2zm4 0v-2h2v2zm-8-4v-2h2v2zm4 0v-2h2v2zm4 0v-2h2v2zm-8-4V9h2v2zm4 0V9h2v2zm4 0V9h2v2zM7 7V5h2v2zm4 0V5h2v2zm4 0V5h2v2z`},null,-1)]])}var Wa=On({name:`mdi-drag`,render:Ua}),Ga=72,Ka=18;function qa(e,t){let n,r=null,i;function a(e){let t=`touches`in e?e.touches[0]:e;t&&(i=t.clientY)}function o(){if(n=requestAnimationFrame(o),!r||i===void 0)return;let e=r.getBoundingClientRect(),t=i-e.top,a=e.bottom-i;t<Ga?r.scrollTop-=Ja(Ga-t):a<Ga&&(r.scrollTop+=Ja(Ga-a))}function s(){if(r=Ya(e.value),r){i=void 0;for(let e of[`dragover`,`pointermove`,`touchmove`])window.addEventListener(e,a,{passive:!0});n=requestAnimationFrame(o)}}function c(){n!==void 0&&(cancelAnimationFrame(n),n=void 0);for(let e of[`dragover`,`pointermove`,`touchmove`])window.removeEventListener(e,a);r=null}Y(t,e=>e?s():c()),hn(c)}function Ja(e){return Math.ceil(Math.min(e,Ga)/Ga*Ka)}function Ya(e){let t=e?.parentElement??null;for(;t;){let{overflowY:e}=getComputedStyle(t);if((e===`auto`||e===`scroll`)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null}var Xa=Dn({__name:`CuiNavbarEditItem`,props:{name:{},icon:{},label:{},expanded:{type:Boolean},hideable:{type:Boolean},hidden:{type:Boolean},findItem:{type:Function},moveItem:{type:Function}},emits:[`toggle-hidden`],setup(e){let t=e,n=H(null),[r,i]=Mr(()=>({type:`nav-item`,item:()=>({name:t.name}),collect:e=>({isDragging:e.isDragging()})})),[,a]=Pr(()=>({accept:`nav-item`,hover({name:e},r){if(e===t.name)return;let i=n.value,a=t.findItem(t.name),o=t.findItem(e);if(!i||!a||!o)return;let s=i.getBoundingClientRect(),c=r.getClientOffset();if(!c)return;let l=c.y-s.top,u=s.height/2;if(o.group===a.group){if(o.index<a.index&&l<u||o.index>a.index&&l>u)return;t.moveItem(e,a.group,a.index);return}t.moveItem(e,a.group,l>u?a.index+1:a.index)}})),o=K(()=>r.value.isDragging);qa(n,o);function s(e){n.value=e,i(a(e))}return(t,n)=>{let r=qr,i=Kr,a=d,c=Wa;return I(),V(`div`,{ref:s,class:R([`w-full h-[44px] flex items-center gap-3 rounded-lg cursor-grab select-none touch-none`,[G(o)?`opacity-30`:`hover:bg-white/5`,e.hidden?`!opacity-40`:``]]),style:{color:`#a4a4a4`,paddingLeft:`14px`,paddingRight:`10px`}},[e.icon?(I(),q(Bn(e.icon),{key:0,class:`w-[22px] h-[22px] shrink-0`})):Z(``,!0),e.expanded?(I(),V(`span`,{key:1,class:R([`text-sm truncate flex-1 text-left`,{"line-through":e.hidden}])},B(e.label),3)):Z(``,!0),e.hideable&&e.expanded?(I(),q(a,{key:2,text:``,rounded:``,severity:`secondary`,class:`cui-icon-md shrink-0 !text-[#a4a4a4]`,onClick:n[0]||=rn(e=>t.$emit(`toggle-hidden`),[`stop`])},{icon:L(()=>[e.hidden?(I(),q(r,{key:0,width:`100%`,height:`100%`})):(I(),q(i,{key:1,width:`100%`,height:`100%`}))]),_:1})):Z(``,!0),e.expanded?(I(),q(c,{key:3,class:`w-[18px] h-[18px] shrink-0 opacity-60`})):Z(``,!0)],2)}}}),Za=Dn({__name:`CuiNavbarEditGroupLabel`,props:{group:{},label:{},first:{type:Boolean},moveToEnd:{type:Function}},setup(e){let t=e,[n,r]=Pr(()=>({accept:`nav-item`,hover({name:e}){t.moveToEnd(e,t.group)},collect:e=>({isOver:e.isOver()})})),i=K(()=>n.value.isOver);function a(e){r(e)}return(t,n)=>(I(),V(`div`,{ref:a,class:R([`w-full flex items-center h-[26px] mb-1 rounded-lg transition-colors`,[{"mt-4":!e.first},G(i)?`bg-white/5`:``]])},[z(`span`,{class:R([`pl-[14px] text-[11px] font-semibold uppercase tracking-widest whitespace-nowrap`,G(i)?`text-primary-500`:`text-[#7a7a7a]`])},B(e.label),3)],2))}}),Qa={key:0,class:`shrink-0 relative left-[-9px]`},$a={key:1,class:`shrink-0`},eo={key:2,class:`shrink-0`},to={key:0,class:`overflow-hidden flex-1 ml-10`},no={class:`flex flex-row items-center justify-between`},ro={class:`text-start flex-1`},io={key:0,class:`text-xs text-muted`},ao=He(Dn({__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=Xn(),r=Et(),{icon:i,iconSize:a,iconClass:o,activeIcon:s,avatarSize:c,avatar:l,labelClass:u,label:f,description:p,expanded:m,to:h,showLogout:g,darkMode:_,buttonProps:v,showTooltip:y,fallbackActivePath:b,activeColor:x,activeIconColor:S,bottomBar:C}=jn(t),w=K(()=>n.path===h.value||h.value!==`/`&&(n.path.startsWith(h.value+`/`)||n.path.startsWith((b.value??h.value)+`/`)));function T(){r.logout()}return(e,t)=>{let n=Lt,r=Gr,b=d,te=pn(`RouterLink`),ne=ee;return I(),q(te,{to:G(h)},{default:L(({isActive:e})=>[Sn((I(),q(b,Ln({text:``,severity:`secondary`,class:[`cui-button navitem-button w-full h-full flex items-center relative`,{"dark-mode":G(_),"!text-white navitem-active":(e||G(w))&&!G(l),"hover:!text-color active:!text-color focus:!text-color":!e&&!G(w),"navitem-inactive":!e&&!G(w)}],style:G(x)&&(e||G(w))?{"--navitem-active-color":G(x)}:void 0,fluid:``},G(v)),{default:L(()=>[z(`div`,{class:R([`flex items-center justify-center h-full`,{"absolute left-[14px]":!G(C)}])},[G(l)?(I(),V(`div`,Qa,[J(n,{src:G(l),size:G(c),style:zn({width:`${G(c)}px`,height:`${G(c)}px`})},null,8,[`src`,`size`,`style`])])):G(i)&&!e&&!G(w)||!G(s)?(I(),V(`div`,$a,[J(G(i),{class:R(G(o)),style:zn({width:`${G(a)}px`,height:`${G(a)}px`,color:(e||G(w))&&G(S)?G(S):void 0})},null,8,[`class`,`style`])])):G(s)&&(e||G(w))?(I(),V(`div`,eo,[J(G(s),{style:zn({width:`${G(a)}px`,height:`${G(a)}px`,color:G(S)})},null,8,[`style`])])):Z(``,!0)],2),J(X,{name:`fade`},{default:L(()=>[G(m)?(I(),V(`div`,to,[z(`div`,no,[z(`div`,ro,[z(`div`,{class:R([`text-sm max-w-100 truncate font-semibold`,[G(u),{"text-color font-bold":G(l)}]])},B(G(f)),3),G(p)?(I(),V(`div`,io,B(G(p)),1)):Z(``,!0)]),G(g)?(I(),q(b,{key:0,text:``,rounded:``,class:`dark-mode cui-icon-md`,onClick:rn(T,[`stop`,`prevent`])},{icon:L(()=>[J(r,{width:`100%`,height:`100%`})]),_:1})):Z(``,!0)])])):Z(``,!0)]),_:1})]),_:2},1040,[`class`,`style`])),[[ne,{value:G(y)&&!G(m)?G(f):``,pt:{root:{class:`dark-mode`}}}]])]),_:1},8,[`to`])}}}),[[`__scopeId`,`data-v-9e0c467b`]]),oo={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function so(e,t){return I(),V(`svg`,oo,[...t[0]||=[z(`path`,{fill:`currentColor`,d:`M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z`},null,-1)]])}var co=On({name:`mdi-chevron-up`,render:so}),{isElectronApp:lo}=Hn(),uo=lo?25:0,fo={CLOSED:0,MINIFIED:60,EXPANDED:288},po=Nn({serverUpdateAvailable:!1,pluginUpdateAvailable:!1,workerUpdateAvailable:!1,serverUpdate:null,pluginUpdates:[]}),mo=null,ho=null;async function go(){if(ho?.ready.value)try{let e=await ho.request(`get-updates`);po.pluginUpdates=e.plugins,po.pluginUpdateAvailable=e.plugins.length>0,po.serverUpdate=e.server,po.serverUpdateAvailable=e.server.updateAvailable||e.server.betaUpdateAvailable||!1,po.workerUpdateAvailable=e.workerUpdateAvailable??!1}catch{}}function _o(){return ho||(mo=nn(!0),mo.run(()=>{let e=Gt(`/server`);ho=e,e.on(`plugin-updates`,e=>{po.pluginUpdates=e,po.pluginUpdateAvailable=e.length>0}),e.on(`server-updates`,e=>{po.serverUpdate=e,po.serverUpdateAvailable=e.updateAvailable||e.betaUpdateAvailable||!1}),e.on(`worker-updates`,e=>{po.workerUpdateAvailable=e.updateAvailable}),e.onReady(()=>{go()})}),ho)}function vo(){function e(){_o()}function t(){}return{isConnected:K(()=>ho?.connected.value??!1),serverUpdateAvailable:K(()=>po.serverUpdateAvailable),pluginUpdateAvailable:K(()=>po.pluginUpdateAvailable),workerUpdateAvailable:K(()=>po.workerUpdateAvailable),serverUpdate:K(()=>po.serverUpdate),pluginUpdates:K(()=>po.pluginUpdates),connect:e,disconnect:t,fetchUpdates:go}}var yo={class:`h-full flex flex-col overflow-hidden`},bo={class:`w-full flex items-center shrink-0 h-[60px]`},xo={class:`overflow-hidden w-full pr-4`},So={key:0,class:`ml-2 w-full flex flex-row items-center`},Co={class:`flex flex-col flex-1 min-h-0 overflow-y-auto overflow-x-hidden mt-4 px-1 pb-2`},wo={class:`flex flex-col space-y-1`},To={class:`flex items-center h-full absolute left-[14px] gap-3`},Eo={key:2,class:`text-[11px] font-semibold uppercase tracking-widest whitespace-nowrap`},Do={key:0,class:`pl-[17px] text-[11px] font-semibold uppercase tracking-widest text-[#7a7a7a] whitespace-nowrap`},Oo={key:1,class:`w-[22px] mx-auto border-t border-[#313131]`},ko={key:0,class:`flex flex-col space-y-1 overflow-hidden`},Ao={class:`flex flex-col space-y-1`},jo={class:`flex items-center h-full absolute left-[14px] gap-3`},Mo={key:2,class:`text-[11px] font-semibold uppercase tracking-widest whitespace-nowrap`},No={key:0,class:`pl-[17px] text-[11px] font-semibold uppercase tracking-widest text-[#7a7a7a] whitespace-nowrap`},Po={key:1,class:`w-[22px] mx-auto border-t border-[#313131]`},Fo={key:0,class:`flex flex-col space-y-1 overflow-hidden`},Io={class:`flex flex-col flex-1`},Lo={class:`flex flex-col space-y-1`},Ro={key:0,class:`shrink-0 px-1 pb-4`},zo={key:0,class:`w-full h-[50px]`},Bo={class:`w-full h-[50px] relative`},Vo={key:1,class:`shrink-0 flex flex-col gap-2 px-1 pt-2 pb-2`},Ho=He(Dn({__name:`CuiNavbar`,setup(e,{expose:t}){let n=new Yr,r=er(),{bus:i}=Ft(),{mdBreakpoint:a,xlBreakpoint:o}=Ge(),{navbarState:s}=Ue(),{isElectronApp:c,electron:l}=Hn(),{isTouch:u}=tt(),f=vo(),{entries:p,groups:m,settingsInNav:h,isCollapsible:_,isHidden:v,toggleHidden:y,persistOrder:b,resetOrder:x}=Zr(),S=Et(),{user:C}=Qn(S),w=rt(),{uiSettings:te}=Qn(w),{data:E}=n.apiInfoQuery(),re=sn(`navbarRef`),ie=H(`closed`),ae=H(!1),oe=H(!1),D=H(!1),se=H({main:!0,manage:!0,system:!1,settings:!1}),O=H(!1),ce=H({main:[],manage:[],system:[],settings:[]}),le=K(()=>E.value?.electron??!1),ue=K(()=>c&&le.value),de=K(()=>{if(ae.value&&(C.value?.role===`admin`||C.value?.role===`master`))return`system`;let e=te.value.interface.selectedSettingsView;return et.includes(e)?e:`account`}),fe=K(()=>gt.filter(e=>e.meta?.navbar?.position===`bottom`&&!e.meta?.navbar?.group&&At(e)&&!ge(e))),pe=K(()=>_e([`main`,`manage`])),me=K(()=>_e([`system`,`settings`])),k=K(()=>h.value?Qr:Xr),A=K(()=>u.value?Fr:Nr),he=K(()=>u.value?{enableMouseEvents:!0}:void 0),j=K(()=>te.value.interface.navbarStayCollapsed&&ie.value!==`opened`?`closed`:o.value?`opened`:ie.value),M=K(()=>j.value===`closed`?a.value?fo.CLOSED:fo.MINIFIED:fo.EXPANDED);function ge(e){return le.value&&!!e.meta?.disabledInElectron}function _e(e){let t=[];for(let n of e){if(n===`settings`&&!h.value)continue;let e=m.value[n].filter(e=>!ge(e.route)&&!v(e.name));e.length&&t.push({key:n,items:e,collapsible:_(n),first:t.length===0})}return t}function ye(e){return m.value[e].some(e=>r.currentRoute.value.path===e.to||r.currentRoute.value.path.startsWith(e.to+`/`))}function be(e){se.value[e]=!se.value[e],se.value[e]&&e===`system`?setTimeout(()=>{let e=re.value?.firstElementChild;e&&e.scrollTo({top:e.scrollHeight,behavior:`smooth`})},250):se.value[e]||setTimeout(()=>Ae(),250)}function xe(){ce.value={main:m.value.main.map(e=>e.name),manage:m.value.manage.map(e=>e.name),system:m.value.system.map(e=>e.name),settings:m.value.settings.map(e=>e.name)}}function Se(){xe(),O.value=!0,i.emit({navbarState:`opened`})}function N(){b(ce.value),O.value=!1}function Ce(){x(),xe()}function P(e){return p.value.find(t=>t.name===e)}function we(e){for(let t of Qr){let n=ce.value[t].indexOf(e);if(n>=0)return{group:t,index:n}}}function Te(e,t,n){let r=we(e);r&&(ce.value[r.group].splice(r.index,1),ce.value[t].splice(n,0,e))}function Ee(e,t){let n=we(e);n&&(n.group!==t||n.index!==ce.value[t].length-1)&&(ce.value[n.group].splice(n.index,1),ce.value[t].push(e))}function De(){i.emit({navbarState:`closed`})}function Oe(e,t){ue.value&&t.channel===`update-check`&&t.status===`available`&&(ae.value=!0)}async function ke(){if(ue.value){l.removeListener(`app-status`,Oe),l.on(`app-status`,Oe),l.send(`check-for-updates`);try{let e=await l.invoke(`get-update-available`);ae.value=e.isUpdateAvailable}catch{}}}function Ae(){yn(()=>{let e=re.value?.querySelector(`.navitem-active`);e&&e.scrollIntoView({block:`center`,behavior:`smooth`})})}let je=T(Ae,100);return ne(re,e=>{if(j.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&&De()}),ve(re,()=>{je()}),Y(j,e=>{O.value&&e!==`opened`&&(O.value=!1)}),Y(()=>r.currentRoute.value.path,()=>{for(let e of Qr)ye(e)&&(se.value[e]=!0)},{immediate:!0}),Y(f.serverUpdateAvailable,e=>{ue.value||(ae.value=e)},{immediate:!0}),Y(ue,e=>{e&&ke()},{immediate:!0}),Y(f.pluginUpdateAvailable,e=>{oe.value=e}),Y(f.workerUpdateAvailable,e=>{D.value=e}),Y(s,e=>{e&&e!==ie.value&&(ie.value=e===`minified`||e===`closed`?`closed`:`opened`)},{immediate:!0}),Y(r.currentRoute,(e,t)=>{e.path!==t.path&&De()}),Y(C,()=>{C.value?.role===`admin`||C.value?.role===`master`?f.connect():f.disconnect()},{deep:!0,immediate:!0}),kn(()=>{Ae()}),mn(()=>{l?.removeListener(`app-status`,Oe)}),t({navbarState:j}),(e,t)=>{let n=pn(`RouterLink`),r=ct,i=d,o=Jr,s=co,c=g,l=ao,u=Za,f=Xa,p=Gr,m=Va,_=pt,b=ee;return I(),V(`nav`,{ref_key:`navbarRef`,ref:re,class:R([`navbar-background fixed transition-[width,left] duration-200 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 non-draggable-region`,{"shadow-xl":G(a)&&G(M)===G(fo).EXPANDED}]),style:zn({top:`calc(max(8px, env(safe-area-inset-top, 0px)) + ${G(uo)}px)`,left:G(M)===G(fo).CLOSED?`-2px`:`max(8px, env(safe-area-inset-left, 0px))`,width:`${G(M)}px`,height:`calc(100dvh - max(8px, env(safe-area-inset-top, 0px)) - max(8px, env(safe-area-inset-bottom, 0px)) - ${G(uo)}px)`,viewTransitionName:`cui-navbar`})},[z(`div`,yo,[z(`div`,bo,[J(n,{to:`/`,class:`pl-[13px]`},{default:L(()=>[J(G(Rn),{src:G(Jt)(`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`},null,8,[`src`])]),_:1}),z(`div`,xo,[J(X,{name:`fade`},{default:L(()=>[G(M)===G(fo).EXPANDED?(I(),V(`div`,So,[J(n,{to:`/`,class:`text-white font-bold text-lg text-shadow`},{default:L(()=>[...t[1]||=[W(`camera.ui`,-1)]]),_:1}),G(O)?Z(``,!0):Sn((I(),q(i,{key:0,text:``,rounded:``,severity:`secondary`,class:`dark-mode cui-icon-md ml-auto !text-[#a4a4a4] hover:!text-white`,onClick:Se},{icon:L(()=>[J(r,{class:`!w-[16px] !h-[16px]`})]),_:1})),[[b,e.$t(`navigation.edit_nav`),void 0,{bottom:!0}]])])):Z(``,!0)]),_:1})])]),z(`div`,Co,[G(O)?(I(),q(G(jr),{key:1,backend:G(A),options:G(he)},{default:L(()=>[z(`div`,Io,[z(`div`,Lo,[(I(!0),V(U,null,F(G(k),t=>(I(),V(U,{key:`edit-${t}`},[J(u,{group:t,label:e.$t(`navigation.group_${t}`),first:t===`main`,"move-to-end":Ee},null,8,[`group`,`label`,`first`]),J(dn,{name:`nav-edit`,tag:`div`,class:`relative flex flex-col space-y-1`},{default:L(()=>[(I(!0),V(U,null,F(G(ce)[t],t=>(I(),q(f,{key:t,name:t,icon:P(t)?.icon,label:e.$t(`navigation.${P(t)?.labelKey??t.toLowerCase()}`),expanded:G(M)===G(fo).EXPANDED,hideable:P(t)?.kind===`settings`,hidden:G(v)(t),"find-item":we,"move-item":Te,onToggleHidden:e=>G(y)(t)},null,8,[`name`,`icon`,`label`,`expanded`,`hideable`,`hidden`,`onToggleHidden`]))),128))]),_:2},1024)],64))),128))])])]),_:1},8,[`backend`,`options`])):(I(),V(U,{key:0},[z(`div`,wo,[(I(!0),V(U,null,F(G(pe),t=>(I(),V(U,{key:t.key},[t.collapsible?(I(),V(`div`,{key:0,class:R([`w-full h-[50px]`,{"mt-5":!t.first}])},[J(i,{text:``,severity:`secondary`,class:R([`cui-button navitem-button w-full h-full flex items-center justify-center dark-mode`,{"!text-white navitem-active":G(se)[t.key]||ye(t.key),"hover:!text-color active:!text-color focus:!text-color navitem-inactive":!G(se)[t.key]&&!ye(t.key)}]),style:{color:`#a4a4a4`},onClick:e=>be(t.key)},{default:L(()=>[z(`div`,To,[G(se)[t.key]?(I(),q(o,{key:0,class:`w-[22px] h-[22px]`})):(I(),q(s,{key:1,class:`w-[22px] h-[22px]`})),G(M)===G(fo).EXPANDED?(I(),V(`span`,Eo,B(e.$t(`navigation.group_${t.key}`)),1)):Z(``,!0)])]),_:2},1032,[`class`,`onClick`])],2)):t.key===`main`?Z(``,!0):(I(),V(`div`,{key:1,class:R([`w-full flex items-center h-[26px] mb-1`,{"mt-5":!t.first}])},[G(M)===G(fo).EXPANDED?(I(),V(`span`,Do,B(e.$t(`navigation.group_${t.key}`)),1)):(I(),V(`div`,Oo))],2)),J(X,{name:`navbar-group`},{default:L(()=>[!t.collapsible||G(se)[t.key]?(I(),V(`div`,ko,[(I(!0),V(U,null,F(t.items,t=>(I(),V(`div`,{key:t.name,class:`w-full h-[50px] relative`},[G(oe)&&t.name===`Plugins`?(I(),q(c,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):Z(``,!0),G(ae)&&t.name===`system`?(I(),q(c,{key:1,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):Z(``,!0),G(D)&&t.name===`Workers`?(I(),q(c,{key:2,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):Z(``,!0),J(l,{icon:t.icon,"active-icon":t.activeIcon,to:t.to,label:e.$t(`navigation.${t.labelKey}`),expanded:G(M)===G(fo).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:R([`w-[50px] h-[50px]`,{"w-full":G(M)===G(fo).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`label`,`expanded`,`class`])]))),128))])):Z(``,!0)]),_:2},1024)],64))),128))]),t[2]||=z(`div`,{class:`flex-1 mt-10`},null,-1),z(`div`,Ao,[(I(!0),V(U,null,F(G(me),t=>(I(),V(U,{key:t.key},[t.collapsible?(I(),V(`div`,{key:0,class:R([`w-full h-[50px]`,{"mt-5":!t.first}])},[J(i,{text:``,severity:`secondary`,class:R([`cui-button navitem-button w-full h-full flex items-center justify-center dark-mode`,{"!text-white navitem-active":G(se)[t.key]||ye(t.key),"hover:!text-color active:!text-color focus:!text-color navitem-inactive":!G(se)[t.key]&&!ye(t.key)}]),style:{color:`#a4a4a4`},onClick:e=>be(t.key)},{default:L(()=>[z(`div`,jo,[G(se)[t.key]?(I(),q(o,{key:0,class:`w-[22px] h-[22px]`})):(I(),q(s,{key:1,class:`w-[22px] h-[22px]`})),G(M)===G(fo).EXPANDED?(I(),V(`span`,Mo,B(e.$t(`navigation.group_${t.key}`)),1)):Z(``,!0)])]),_:2},1032,[`class`,`onClick`])],2)):t.key===`main`?Z(``,!0):(I(),V(`div`,{key:1,class:R([`w-full flex items-center h-[26px] mb-1`,{"mt-5":!t.first}])},[G(M)===G(fo).EXPANDED?(I(),V(`span`,No,B(e.$t(`navigation.group_${t.key}`)),1)):(I(),V(`div`,Po))],2)),J(X,{name:`navbar-group`},{default:L(()=>[!t.collapsible||G(se)[t.key]?(I(),V(`div`,Fo,[(I(!0),V(U,null,F(t.items,t=>(I(),V(`div`,{key:t.name,class:`w-full h-[50px] relative`},[G(oe)&&t.name===`Plugins`?(I(),q(c,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):Z(``,!0),G(ae)&&t.name===`system`?(I(),q(c,{key:1,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):Z(``,!0),G(D)&&t.name===`Workers`?(I(),q(c,{key:2,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):Z(``,!0),J(l,{icon:t.icon,"active-icon":t.activeIcon,to:t.to,label:e.$t(`navigation.${t.labelKey}`),expanded:G(M)===G(fo).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:R([`w-[50px] h-[50px]`,{"w-full":G(M)===G(fo).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`label`,`expanded`,`class`])]))),128))])):Z(``,!0)]),_:2},1024)],64))),128)),(I(!0),V(U,null,F(G(fe),t=>Sn((I(),V(`div`,{key:t.name,class:`w-full h-[50px] relative`},[G(ae)&&t.name===`Settings`?(I(),q(c,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):Z(``,!0),J(l,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path===`/settings`?`/settings/${G(de)}`:t.path,"fallback-active-path":t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:G(M)===G(fo).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:R([`w-[50px] h-[50px]`,{"w-full":G(M)===G(fo).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`fallback-active-path`,`label`,`expanded`,`class`])])),[[Cn,!(G(h)&&t.path===`/settings`)]])),128))])],64))]),G(O)?(I(),V(`div`,Vo,[J(i,{severity:`secondary`,label:e.$t(`components.form.button.reset_defaults`),class:`dark-mode w-full h-[40px] !text-sm`,onClick:Ce},{icon:L(()=>[J(m,{class:`w-[18px] h-[18px]`})]),_:1},8,[`label`]),J(i,{severity:`primary`,class:`w-full h-[40px]`,onClick:N},{icon:L(()=>[J(_,{class:`w-[20px] h-[20px]`})]),_:1})])):(I(),V(`div`,Ro,[z(`div`,{class:R([`mb-4 mt-2`,G(M)===G(fo).EXPANDED?`border-t border-[#313131]`:`w-[22px] mx-auto border-t border-[#313131]`])},null,2),G(M)===G(fo).MINIFIED?(I(),V(`div`,zo,[Sn((I(),q(i,{text:``,severity:`secondary`,class:`cui-button navitem-button navitem-inactive w-[50px] h-[50px] flex items-center justify-center dark-mode hover:!text-color active:!text-color focus:!text-color`,style:{color:`#a4a4a4`},onClick:t[0]||=e=>G(S).logout()},{icon:L(()=>[J(p,{class:`w-[22px] h-[22px]`})]),_:1})),[[b,e.$t(`views.menu.logout`),void 0,{right:!0}]])])):Z(``,!0),z(`div`,Bo,[J(l,{avatar:`avatar`,label:G(C)?.username??`unknown`,description:G(C)?.role??`unknown`,expanded:G(M)===G(fo).EXPANDED,"show-logout":``,to:`/settings/account`,"dark-mode":``,"avatar-size":38,class:R([`w-[50px] h-[50px]`,{"w-full":G(M)===G(fo).EXPANDED}])},null,8,[`label`,`description`,`expanded`,`class`])])]))])],6)}}}),[[`__scopeId`,`data-v-0076e59d`]]),Uo={class:`px-2 h-full flex items-center justify-around`,style:{paddingBottom:`calc(max(8px, env(safe-area-inset-bottom, 0px)))`}},Wo=He(Dn({__name:`CuiBottombar`,setup(e,{expose:t}){let{bottombarHeight:n}=Ue(),r=sn(`bottombarRef`),i=K(()=>gt.filter(e=>e.meta?.bottombar&&e.meta.auth&&At(e)));return t({bottombarRef:r}),(e,t)=>{let a=ao;return I(),V(`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:zn({height:`calc(${G(n)}px + env(safe-area-inset-bottom, 0px))`,viewTransitionName:`cui-bottombar`})},[z(`div`,Uo,[(I(!0),V(U,null,F(G(i),e=>(I(),q(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`]]),Go={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ko(e,t){return I(),V(`svg`,Go,[...t[0]||=[z(`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 qo=On({name:`material-symbols-light-mode-rounded`,render:Ko}),Jo={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Yo(e,t){return I(),V(`svg`,Jo,[...t[0]||=[z(`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 Xo=On({name:`material-symbols-dark-mode`,render:Yo}),Zo={viewBox:`0 0 48 48`,width:`1.2em`,height:`1.2em`},Qo=[`id`],$o=[`mask`];function es(e,t){return I(),V(`svg`,Zo,[z(`defs`,null,[z(`mask`,{id:e.idMap.SVGh8KaKdEb},[...t[0]||=[z(`g`,{fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`4`},[z(`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`}),z(`path`,{fill:`#000`,stroke:`#000`,d:`M27 17c0 8-5 9-10 9c0 4 6.5 8 12 4s2-13-2-13`})],-1)]],8,Qo)]),z(`path`,{fill:`currentColor`,d:`M0 0h48v48H0z`,mask:`url(#`+e.idMap.SVGh8KaKdEb+`)`},null,8,$o)])}var ts=On({name:`icon-park-solid-dark-mode`,render:es,setup(){return{idMap:{SVGh8KaKdEb:`uicons-`+Math.random().toString(36).substr(2,10)}}}}),ns=Dn({__name:`CuiThemeSwitch`,setup(e){let t=$r(),{theme:n,autoMode:r}=Qn(t);function i(){t.toggleTheme()}return(e,t)=>{let a=ts,o=Xo,s=qo,c=d;return I(),q(c,{severity:`secondary`,text:``,class:`cui-button p-2 text-color`,onClick:i},{default:L(()=>[G(r)?(I(),q(a,{key:0,class:`w-6 h-6`})):G(n)===`dark`?(I(),q(o,{key:1,class:`w-6 h-6`})):G(n)===`light`?(I(),q(s,{key:2,class:`w-6 h-6`})):Z(``,!0)]),_:1})}}}),rs={class:`relative flex overflow-hidden items-center justify-center w-5 h-5`},is={class:`flex flex-col justify-between w-4 h-3 transform transition-all duration-100 origin-center overflow-hidden`},as=Dn({__name:`CuiNavbarToggle`,setup(e){let{bus:t}=Ft(),{navbarState:n}=Ue(),{xlBreakpoint:r}=Ge(),i=rt(),{uiSettings:a}=Qn(i),o=H(`closed`),s=K(()=>o.value===`opened`);function c(){t.emit({navbarState:o.value===`opened`?`closed`:`opened`})}return Y(n,e=>{e&&e!==o.value&&(o.value=e===`minified`||e===`closed`?`closed`:`opened`)},{immediate:!0}),(e,t)=>{let n=d;return!G(r)||G(a).interface.navbarStayCollapsed?(I(),q(n,{key:0,id:`menu-icon`,class:`cui-button relative group p-2 transition-colors duration-100`,severity:`secondary`,text:``,onClick:c},{default:L(()=>[z(`div`,rs,[z(`div`,is,[z(`div`,{class:R([`h-0.5 w-2 transform transition-all duration-100 origin-center`,{"w-4 rotate-45 translate-y-[5px]":G(s)}]),style:{backgroundColor:`var(--text-color)`}},null,2),z(`div`,{class:R([`h-0.5 w-4 rounded transform transition-all duration-100`,{"opacity-0":G(s)}]),style:{backgroundColor:`var(--text-color)`}},null,2),z(`div`,{class:R([`h-0.5 w-3 transform transition-all duration-100 origin-center`,{"w-4 -rotate-45 -translate-y-[5px]":G(s)}]),style:{backgroundColor:`var(--text-color)`}},null,2)])])]),_:1})):Z(``,!0)}}}),os={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ss(e,t){return I(),V(`svg`,os,[...t[0]||=[z(`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 cs=On({name:`mdi-check-all`,render:ss}),ls={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function us(e,t){return I(),V(`svg`,ls,[...t[0]||=[z(`g`,{fill:`currentColor`},[z(`path`,{d:`M8.35179 20.2418C9.19288 21.311 10.5142 22 12 22C13.4858 22 14.8071 21.311 15.6482 20.2418C13.2264 20.57 10.7736 20.57 8.35179 20.2418Z`}),z(`path`,{d:`M18.7491 9V9.7041C18.7491 10.5491 18.9903 11.3752 19.4422 12.0782L20.5496 13.8012C21.5612 15.3749 20.789 17.5139 19.0296 18.0116C14.4273 19.3134 9.57274 19.3134 4.97036 18.0116C3.21105 17.5139 2.43882 15.3749 3.45036 13.8012L4.5578 12.0782C5.00972 11.3752 5.25087 10.5491 5.25087 9.7041V9C5.25087 5.13401 8.27256 2 12 2C15.7274 2 18.7491 5.13401 18.7491 9Z`})],-1)]])}var ds=On({name:`solar-bell-bold`,render:us}),fs={class:`flex flex-col gap-4 min-w-0`},ps=[`src`,`poster`],ms=[`src`],hs={class:`text-wrap whitespace-pre-line`},gs=Dn({__name:`NotificationDetail`,props:{src:{},videoSrc:{},text:{}},setup(e){let t=H(!1),n=H(!1);return(r,i)=>(I(),V(`div`,fs,[e.videoSrc&&!G(n)?(I(),V(`video`,{key:0,src:e.videoSrc,poster:e.src,class:`max-w-full max-h-[55vh] w-auto self-center rounded-lg`,controls:``,autoplay:``,muted:``,playsinline:``,onClick:i[0]||=rn(()=>{},[`stop`]),onError:i[1]||=e=>n.value=!0},null,40,ps)):e.src&&!G(t)?(I(),V(`img`,{key:1,src:e.src,alt:``,class:`max-w-full max-h-[55vh] w-auto self-center rounded-lg`,onError:i[2]||=e=>t.value=!0},null,40,ms)):Z(``,!0),z(`span`,hs,B(e.text),1)]))}}),_s={key:0,class:`flex items-center justify-center py-8`},vs={key:1,class:`flex flex-col items-center text-center gap-3 py-6 px-2`},ys={class:`text-sm font-semibold text-color`},bs={class:`text-xs text-muted mt-1`},xs={class:`flex justify-between items-center mb-4 h-9`},Ss={class:`flex items-center gap-2`},Cs={class:`text-base font-semibold`},ws={class:`flex items-center gap-1`},Ts={class:`overflow-y-auto`,style:{maxHeight:`234px`}},Es={class:`flex gap-3`},Ds=[`src`,`onError`],Os={class:`flex-1 min-w-0`},ks={class:`flex justify-between items-center gap-2`},As={class:`flex items-center gap-1.5 shrink-0`},js={key:0,class:`w-2 h-2 rounded-full bg-primary-500`},Ms={class:`text-xs text-muted`},Ns={class:`text-xs text-muted mt-1 text-left line-clamp-2 overflow-hidden`},Ps={key:0,class:`text-center py-8 text-muted text-sm`},Fs=Dn({__name:`CuiNotificationMenu`,setup(e){let t=er(),n=Kt(),{t:r}=p(),{isTouch:i}=tt(),{isElectronApp:a,electron:o}=Hn(),s=new Hr,c=Ht(),{data:u,isLoading:f}=s.getSettingsQuery(),m=sn(`notificationsMenuRef`),h=H({}),_=H({}),v=K(()=>c.notifications.value),y=K(()=>c.unreadCount.value),b=K(()=>u.value?.enabled??!1),x=K(()=>!f.value||u.value!==void 0);function S(e,[t]){if(!t.isIntersecting){h.value[e]?.resetFn(),h.value[e]?.stopFn(),delete h.value[e];return}if(h.value[e])return;let n=t.target;if(!n.parentElement)return;let r=ne(n,()=>{h.value[e]&&h.value[e].resetFn()}),a,{direction:o,stop:s}=(i.value?xe:se)(n,{threshold:10,disableTextSelect:!0,onSwipe(){for(let t in h.value)t!==e&&h.value[t]?.resetFn();o.value===`left`?h.value[e]={left:`-75px`,opacity:1,deleteOpacity:1,isSwiping:!0,resetFn(){this.left=`0`,this.opacity=1,this.deleteOpacity=0},stopFn:()=>{delete h.value[e],s(),r(),clearTimeout(a)}}:h.value[e]?.resetFn()},onSwipeEnd(){clearTimeout(a),a=setTimeout(()=>{h.value[e]&&(h.value[e].isSwiping=!1)},10)}})}function C(e){m.value?.toggle(e)}function w(){c.markAllSeen()}function T(e){c.markSeen(e)}function te(){m.value?.hide(),t.push({path:`/settings/notifications`})}function E(e){let t=Date.now()-e,n=Math.floor(t/6e4),i=Math.floor(t/36e5),a=Math.floor(t/864e5);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;m.value?.hide(),ie(e),n&&t.push(n)}function ie(e){e&&(h.value[e.id]?.stopFn(),c.removeNotification(e))}function ae(){for(let e in h.value)h.value[e]?.stopFn();c.clearNotifications()}function oe(e){switch(e){case l.Info:return`rgb(33, 150, 243)`;case l.Warn:return`rgb(251, 140, 0)`;case l.Error:case l.Critical:return`rgb(176, 0, 32)`;default:return`rgb(69, 69, 69)`}}function D(e){if(h.value[e.id]?.isSwiping)return;let t=[e.subtitle,e.body].filter(Boolean).join(`
|
|
3
|
+
`),i=e?.deepLink?r(`components.form.button.go_to_message`):r(`components.form.button.mark_as_read`),a=_.value[e.id]?void 0:O(e),o=Tt(e.videoUrl);if(a||o){n.openComponentDialog(gs,{data:{title:e.title,confirmText:i,contentClickConfirms:!!e.deepLink,contentProps:{src:a,videoSrc:o,text:t}},dialogSize:{desktop:{width:`480px`,maxWidth:`90vw`,maxHeight:`90vh`}},onConfirm:()=>re(e),onCancel:()=>ie(e)});return}n.openTextDialog({data:{title:e.title,contentText:t,contentClickConfirms:!!e.deepLink,confirmText:i},onConfirm:()=>re(e),onCancel:()=>ie(e)})}function O(e){return Tt(e.imageUrl)}function ce(){for(let e in h.value)h.value[e]?.resetFn(),h.value[e]?.stopFn()}function le(){return{id:`electron-update`,title:`Update`,body:`New camera.ui app update available`,severity:l.Info,deepLink:`/settings/system`,tag:`electron-update`,createdAt:Date.now(),seenAt:null,source:{kind:`system`,id:`system.electron.update_available`}}}function ue(e,t){a&&t.channel===`update-check`&&t.status===`available`&&c.addLocalNotification(le())}async function de(){if(a){o.removeListener(`app-status`,ue),o.on(`app-status`,ue),o.send(`check-for-updates`);try{(await o.invoke(`get-update-available`)).isUpdateAvailable&&c.addLocalNotification(le())}catch{}}}return Y(b,e=>{e?c.connect():ht()},{immediate:!0}),kn(()=>{a&&de()}),mn(()=>{o?.removeListener(`app-status`,ue)}),(e,t)=>{let n=ds,r=g,i=d,a=ge,o=sa,s=cs,c=ei,l=ut,u=fr,f=_e,p=ee;return I(),V(`div`,null,[J(i,{severity:`secondary`,text:``,class:`cui-button p-2 text-color`,onClick:C},{icon:L(()=>[J(n,{class:`w-6 h-6`}),G(b)&&G(y)?(I(),q(r,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] right-[10px] top-[7px]`})):Z(``,!0)]),_:1}),J(f,{ref_key:`notificationsMenuRef`,ref:m,"append-to":`self`,class:`w-[20rem] shadow-lg cui-rounded-corner notification-menu isolate overscroll-contain non-draggable-region`,onHide:ce},{default:L(()=>[G(x)?G(b)?(I(),V(U,{key:2},[z(`div`,xs,[z(`div`,Ss,[z(`h3`,Cs,B(e.$t(`components.notification_menu.notifications`)),1),J(r,{class:`rounded-full text-xs p-1`,value:G(v).length>99?`99+`:String(G(v).length)},null,8,[`value`])]),z(`div`,ws,[G(y)?Sn((I(),q(i,{key:0,severity:`secondary`,text:``,rounded:``,class:`p-2 cui-icon-md`,onClick:w},{icon:L(()=>[J(s,{width:`100%`,height:`100%`})]),_:1})),[[p,{value:e.$t(`components.notification_menu.mark_all_read`)},void 0,{left:!0}]]):Z(``,!0),G(v).length?Sn((I(),q(i,{key:1,severity:`danger`,text:``,rounded:``,class:`p-2 cui-icon-md`,onClick:ae},{icon:L(()=>[J(c,{width:`100%`,height:`100%`})]),_:1})),[[p,{value:e.$t(`components.notification_menu.clear_notifications`)},void 0,{left:!0}]]):Z(``,!0)])]),z(`div`,Ts,[(I(!0),V(U,null,F(G(v),t=>(I(),V(`div`,{key:t.id,class:`relative overflow-hidden`},[Sn((I(),V(`div`,{class:`relative transition-all duration-200`,style:zn({left:G(h)[t.id]?.left||`0`,opacity:G(h)[t.id]?.opacity||1})},[J(i,{severity:`secondary`,text:``,class:`cui-button p-2 block w-full`,onClick:e=>D(t)},{default:L(()=>[z(`div`,Es,[z(`div`,{class:`w-2 h-2 rounded-full mt-2`,style:zn({backgroundColor:oe(t.severity)})},null,4),O(t)&&!G(_)[t.id]?(I(),V(`img`,{key:0,src:O(t),alt:``,loading:`lazy`,class:`w-14 h-10 rounded-md object-cover shrink-0 self-center`,onError:e=>G(_)[t.id]=!0},null,40,Ds)):Z(``,!0),z(`div`,Os,[z(`div`,ks,[z(`h4`,{class:R([`text-sm truncate max-w-[200px]`,t.seenAt==null?`font-semibold text-color`:`font-medium text-muted`])},B(t.title),3),z(`div`,As,[t.seenAt==null?(I(),V(`span`,js)):Z(``,!0),z(`span`,Ms,B(E(t.createdAt)),1)])]),z(`p`,Ns,B(t.subtitle||t.body),1)])])]),_:2},1032,[`onClick`])],4)),[[G(Zn),e=>S(t.id,e)]]),z(`div`,{class:`absolute right-0 top-0 h-full flex items-center gap-1 pr-4`,style:zn({opacity:G(h)[t.id]?.deleteOpacity||0,pointerEvents:(G(h)[t.id]?.deleteOpacity||0)>0?`auto`:`none`})},[t.seenAt==null?Sn((I(),q(i,{key:0,severity:`secondary`,class:`cui-icon-sm`,text:``,rounded:``,onClick:e=>T(t)},{icon:L(()=>[J(l,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[p,{value:e.$t(`components.notification_menu.mark_read`)},void 0,{left:!0}]]):Z(``,!0),Sn((I(),q(i,{severity:`danger`,class:`cui-icon-sm`,text:``,rounded:``,onClick:e=>ie(t)},{icon:L(()=>[J(c,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[p,{value:e.$t(`components.notification_menu.delete`)},void 0,{left:!0}]])],4),G(v).indexOf(t)===G(v).length-1?Z(``,!0):(I(),q(u,{key:0,class:`my-0 py-1`}))]))),128))]),G(v).length===0?(I(),V(`div`,Ps,B(e.$t(`components.notification_menu.no_notifications`)),1)):Z(``,!0)],64)):(I(),V(`div`,vs,[J(o,{class:`w-8 h-8 text-muted`}),z(`div`,null,[z(`h3`,ys,B(e.$t(`components.notification_menu.disabled`)),1),z(`p`,bs,B(e.$t(`components.notification_menu.disabled_hint`)),1)]),J(i,{class:`cui-button-small`,label:e.$t(`components.notification_menu.open_settings`),onClick:te},null,8,[`label`])])):(I(),V(`div`,_s,[J(a,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})]))]),_:1},512)])}}}),Is={key:0},Ls={class:`text-sm font-medium truncate max-w-40 pointer-events-none`},Rs=Dn({__name:`CuiInstanceSwitcher`,setup(e){let{t}=p(),{smBreakpoint:n}=Ge(),r=$t(),i={style:`background: color-mix(in srgb,var(--p-red-500),transparent 84%); color: var(--p-red-400);`},a=sn(`menuRef`),o=Nn({}),s=null,c=K(()=>{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:nt,position:`footer`,onClick:()=>{let e=r.redirectInfo;e?window.location.href=e.sourceUrl:r.switchInstance(null)}}]:[],l={label:t(`components.instance_switcher.manage`),icon:ot,position:`footer`,to:`/instances`};return[a,...s,...c,l]});function l(){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=wt,o=d,s=Jr,u=co,f=yt;return G(r).isMultiInstance?(I(),V(`div`,Is,[G(n)?(I(),q(o,{key:0,severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:G(a)?.toggleMenu},{icon:L(()=>[J(i,{class:`w-6 h-6`})]),_:1},8,[`onClick`])):(I(),q(o,{key:1,severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:G(a)?.toggleMenu},{default:L(()=>[J(i,{class:`w-5 h-5 shrink-0 pointer-events-none`}),z(`span`,Ls,B(G(r).activeInstance?.name??`Local`),1),G(a)?.isOpen?G(a)?.isOpen?(I(),q(u,{key:1,class:`w-4 h-4 opacity-60 shrink-0 pointer-events-none`})):Z(``,!0):(I(),q(s,{key:0,class:`w-4 h-4 opacity-60 shrink-0 pointer-events-none`}))]),_:1},8,[`onClick`])),J(f,{ref_key:`menuRef`,ref:a,items:G(c),popover:{appendTo:`body`,pt:{root:{class:`w-[18rem]`},content:{class:`p-0! rounded-xl! overflow-hidden!`}}},onShow:l,dividers:`sections`},null,8,[`items`])])):Z(``,!0)}}}),zs={key:0,class:`flex flex-row items-center flex-1 p-2 gap-1`},Bs={class:`flex-1 flex items-center justify-start min-w-0`},Vs={key:0,class:`cui-topbar-default font-semibold text-xl truncate`},Hs={class:`flex-1 flex items-center justify-end min-w-0`},Us={class:`cui-topbar-default`},Ws=He(Dn({__name:`CuiTopbar`,props:{offsetLeft:{},animate:{type:Boolean},background:{}},setup(e){let t=e,n=er(),{smBreakpoint:r}=Ge(),{hasSlot:i,scrollToTop:a}=st(),{minifiedTopbar:o}=$e(),{topbarHeight:s}=Ue(),{isElectronApp:c}=Hn(),l=$t(),{isMultiInstance:u}=Qn(l),{offsetLeft:d,animate:f}=jn(t);return(e,t)=>{let l=Rs,p=Fs,m=as,h=ns;return I(),V(`header`,{class:R([`cui-topbar fixed flex flex-row items-center top-0 left-0 right-0 pt-safe pr-safe draggable-region`,{"!border-none":G(r)}]),style:zn({height:`calc(${G(s)}px + env(safe-area-inset-top, 0px) + ${G(Ye).ELECTRON_OFFSET}px)`,viewTransitionName:`cui-topbar`,background:G(r)?`var(--ground-background)`:void 0,paddingTop:G(c)?`calc(${G(Ye).ELECTRON_OFFSET}px + env(safe-area-inset-top, 0px))`:void 0})},[G(r)&&!G(o)?(I(),V(`div`,zs,[z(`div`,Bs,[!G(i)(`left`)&&(`hasPermission`in e?e.hasPermission:G(At))(void 0,`admin`)&&G(n).currentRoute.value.name===`Home`&&G(u)?(I(),q(l,{key:0,class:`cui-topbar-default non-draggable-region`})):Z(``,!0),t[1]||=z(`div`,{id:`cui-topbar-left`,class:`cui-topbar-slot non-draggable-region`},null,-1)]),z(`div`,{class:`shrink-0 flex items-center justify-center min-w-0 cursor-pointer`,onClick:t[0]||=(...e)=>G(a)&&G(a)(...e)},[t[2]||=z(`div`,{id:`cui-topbar-center`,class:`cui-topbar-slot truncate non-draggable-region`},null,-1),G(i)(`center`)?Z(``,!0):(I(),V(`span`,Vs,B(e.$t(`views.${String(e.$route.name).toLowerCase()}.title`)),1))]),z(`div`,Hs,[t[3]||=z(`div`,{id:`cui-topbar-right`,class:`cui-topbar-slot non-draggable-region`},null,-1),z(`div`,Us,[J(p,{class:`non-draggable-region`})])])])):G(o)?Z(``,!0):(I(),V(`div`,{key:1,class:`flex flex-row items-center flex-1 p-2`,style:zn({"margin-left":`calc(${G(d)}px + max(8px, env(safe-area-inset-left, 0px)))`,transition:G(f)?`margin-left 200ms`:void 0})},[J(m,{class:`non-draggable-region`}),(`hasPermission`in e?e.hasPermission:G(At))(void 0,`admin`)&&G(u)?(I(),q(l,{key:0,class:`non-draggable-region`})):Z(``,!0),G(St)()?Z(``,!0):(I(),q(h,{key:1,class:`ml-auto non-draggable-region`})),J(p,{class:R([`non-draggable-region`,{"ml-auto":G(St)()}])},null,8,[`class`])],4))],6)}}}),[[`__scopeId`,`data-v-ede899aa`]]),Gs={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ks(e,t){return I(),V(`svg`,Gs,[...t[0]||=[z(`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 qs=On({name:`majesticons-open`,render:Ks}),Js={class:`flex items-center gap-2 min-h-[15px]`},Ys={class:`cui-label`},Xs=Dn({__name:`SectionLabel`,props:{label:{},loading:{type:Boolean}},setup(e){return(t,n)=>{let r=ge;return I(),V(`div`,Js,[z(`span`,Ys,B(e.label),1),e.loading?(I(),q(r,{key:0,class:`w-[12px] h-[12px] m-0`,"stroke-width":`8`})):Z(``,!0)])}}}),Zs={class:`flex flex-col gap-2 w-full`},Qs={for:`sensorDisplayName`,class:`cui-label`},$s=Dn({__name:`RenameSensor`,props:{currentDisplayName:{}},setup(e,{expose:t}){let n=H(e.currentDisplayName);return t({onConfirm:async()=>n.value.trim()||null}),(e,t)=>{let r=_;return I(),V(`div`,Zs,[z(`label`,Qs,B(e.$t(`components.camera_options.sensor_display_name`)),1),J(r,{id:`sensorDisplayName`,modelValue:G(n),"onUpdate:modelValue":t[0]||=e=>In(n)?n.value=e:null,class:`w-full`,autofocus:``},null,8,[`modelValue`])])}}}),ec={class:`p-4 flex flex-col gap-2`},tc={key:0,class:`flex flex-col gap-2`},nc={key:0,class:`text-sm text-muted text-center min-h-[30px]`},rc={key:1,class:`flex flex-col gap-2`},ic={key:0,class:`text-sm text-muted text-center min-h-[30px]`},ac={key:2,class:`flex flex-col gap-2`},oc={key:0,class:`text-sm text-muted text-center min-h-[30px]`},sc={key:2,class:`text-sm text-muted text-center min-h-[30px]`},cc={key:3,class:`flex flex-col gap-2`},lc={key:0,class:`text-sm text-muted text-center min-h-[30px]`},uc={key:2,class:`text-sm text-muted text-center min-h-[30px]`},dc={key:4,class:`flex flex-col gap-2`},fc={key:0,class:`text-sm text-muted text-center min-h-[30px]`},pc={key:2,class:`text-sm text-muted text-center min-h-[30px]`},mc={key:5,class:`flex flex-col gap-2`},hc={key:0,class:`text-sm text-muted text-center min-h-[30px]`},gc={key:1,class:`w-full h-full`},_c={class:`cui-list-item`},vc=Dn({__name:`Plugins`,props:{camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},emits:[`close`],setup(e){let t=[`cameraController`,`hub`,`detection`,`core`,`accessories`,`more`],n=Kn().filter(e=>e!==v.ObjectAssist),r=Gn(),a=Un(),c=new ft,l=new si,f=new ci,m=e,h=jt(),g=Kt(),{t:_}=p(),{camera:y,cameraDevice:b,loading:x}=jn(m),{data:C,isBusy:w}=l.getPluginsQuery({page:1,pageSize:-1}),{data:T,isBusy:te,suspense:ne}=c.getCameraExtensionsQuery(y.value.name),{data:E,isBusy:re}=f.getCameraSensorsQuery(y.value._id),{data:ie,isBusy:ae}=l.getPluginsExtensionsQuery({page:1,pageSize:-1}),{mutateAsync:oe,isPending:D}=c.enableCameraExtensionQuery(),{mutateAsync:se,isPending:O}=c.disableCameraExtensionQuery(),{mutateAsync:ce,isPending:le}=c.activateCameraExtensionQuery(),{mutateAsync:ue,isPending:de}=c.deactivateCameraExtensionQuery(),{sensors:fe,isLoading:pe}=s(b),me=sn(`schemaRef`),k=H(),A=H(``),he=H(),j=H(),M=H(),ge=H(),_e=H(),ve=H(),ye=H(),be=H(),xe=H(),Se=H(),N=H(),Ce=K(()=>{if(!be.value)return``;let e=je.value.find(e=>e.id===be.value);return e?.pluginId&&qt(e.pluginId)||``}),P=K(()=>{if(!be.value)return``;let e=je.value.find(e=>e.id===be.value);return!e||e.pluginId===`cameraui.virtual`?``:e.pluginId}),we=K(()=>T.value?.filter(e=>a.some(t=>e.contract.provides.includes(t)))||[]),Te=K(()=>{let e=new Set;for(let t of we.value)for(let n of a)t.contract.provides.includes(n)&&e.add(n);for(let t of fe.value)a.includes(t.type)&&e.add(t.type);return Array.from(e).filter(Gt).sort((e,t)=>{let n=_(`components.camera_options.sensor_type_${e}`),r=_(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),Ee=K(()=>{let e=ye.value;return e?Xt(T.value?.filter(t=>t.contract.provides.includes(e)&&Wt(t,e))||[]):[]}),Oe=K(()=>ye.value?qn(ye.value):!1),ke=K(()=>{if(!ye.value)return[];let e=Jn(ye.value),t=y.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=Ee.value.map(e=>e.pluginName);return n.sort((e,t)=>r.indexOf(e)-r.indexOf(t))}),Ae=K(()=>{if(!ye.value)return[];let e=Jn(ye.value),t=y.value.assignments[e];return Array.isArray(t)?t.map(e=>e.id):t&&typeof t==`object`&&`id`in t?[t.id]:[]}),je=K(()=>{let e=new Set(Ae.value);return fe.value.filter(t=>t.type===ye.value&&(e.has(t.pluginId)||t.pluginId===`cameraui.virtual`)).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))}),Me=De(b,A),Ne=Me.config,Pe=Me.isLoading,Fe=u(be,P),Ie=Fe.config,Le=Fe.isLoading,Re=K(()=>A.value&&Ne.value?.schema?.length?Ne.value:void 0),ze=K(()=>be.value&&Ce.value&&Ie.value?.schema?.length?Ie.value:void 0),Be=K(()=>w.value||ae.value||te.value||re.value),Ve=K(()=>Be.value||He.value||pe.value),He=K(()=>te.value||ae.value||D.value||O.value||le.value||de.value),Ue=K(()=>He.value||x.value||Me.isLoading.value||Fe.isLoading.value||dt.isLoading.value||ht.isLoading.value||Ot.isLoading.value||Mt.isLoading.value||Rt.isLoading.value),We=K(()=>(ie.value?.result.filter(e=>o(e.contract)&&e.pluginName===y.value.pluginInfo?.name)||[])[0]),Ge=K(()=>Xt(T.value?.filter(e=>i(e.contract))||[])),Ke=K(()=>We.value&&Jt(We.value.pluginName)?[We.value]:[]),qe=K(()=>Ke.value.length>0),Je=K(()=>T.value?.filter(e=>n.some(t=>e.contract.provides.includes(t)))||[]),Ye=K(()=>{let e=new Set;for(let t of Je.value)for(let r of n)t.contract.provides.includes(r)&&e.add(r);return Array.from(e).filter(Gt).sort((e,t)=>{let n=_(`components.camera_options.sensor_type_${e}`),r=_(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),Xe=K(()=>{let e=j.value;return e?Xt(T.value?.filter(t=>t.contract.provides.includes(e)&&Wt(t,e))||[]):[]}),Ze=K(()=>{let e=M.value;return e?fe.value.filter(t=>t.type===j.value&&qt(t.pluginId)===e).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value)):[]}),Qe=K(()=>{if(!xe.value)return``;let e=Ze.value.find(e=>e.id===xe.value);return e?.pluginId&&qt(e.pluginId)||``}),$e=K(()=>{let e=Zt(v.ObjectAssist);return e&&Jt(e.name)?e.name:void 0}),et=K(()=>{let e=Zt(v.Object);return e?(E.value??[]).find(t=>t.connected&&t.type===v.Object&&qt(t.pluginId)===e.name)?.requiresFrames===!1:!1}),tt=K(()=>{let e=Zt(v.Object)?.name,t=new Set((E.value??[]).filter(e=>e.type===v.Object&&e.requiresFrames).map(e=>qt(e.pluginId)).filter(e=>e!==void 0));return Xt(T.value?.filter(n=>n.pluginName!==e&&t.has(n.pluginName))||[])}),nt=K(()=>j.value===v.Object&&et.value&&tt.value.length>0),rt=K(()=>xe.value&&Ze.value.find(e=>e.id===xe.value)?.pluginId||``),it=K(()=>T.value?.filter(e=>r.some(t=>e.contract.provides.includes(t)))||[]),at=K(()=>{let e=new Set;for(let t of it.value)for(let n of r)t.contract.provides.includes(n)&&e.add(n);return Array.from(e).filter(Gt).sort((e,t)=>{let n=_(`components.camera_options.sensor_type_${e}`),r=_(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),ot=K(()=>{let e=_e.value;return e?Xt(T.value?.filter(t=>t.contract.provides.includes(e)&&Wt(t,e))||[]):[]}),st=K(()=>{let e=ve.value;return e?fe.value.filter(t=>t.type===_e.value&&qt(t.pluginId)===e).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value)):[]}),ct=K(()=>{if(!Se.value)return``;let e=st.value.find(e=>e.id===Se.value);return e?.pluginId&&qt(e.pluginId)||``}),lt=K(()=>Se.value&&st.value.find(e=>e.id===Se.value)?.pluginId||``),ut=K(()=>M.value??``),dt=De(b,ut),pt=dt.config,mt=dt.isLoading,ht=u(xe,rt),gt=ht.config,_t=ht.isLoading,vt=K(()=>{if(!(!M.value||M.value===y.value.pluginInfo?.name))return pt.value?.schema?.length?pt.value:void 0}),yt=K(()=>xe.value&&Qe.value&>.value?.schema?.length?gt.value:void 0),bt=K(()=>{let e=ge.value;if(!(!e||e===Zt(v.Object)?.name))return fe.value.find(t=>t.type===v.Object&&qt(t.pluginId||``)===e)}),xt=K(()=>bt.value?.id??``),St=K(()=>bt.value?.pluginId??``),Ct=u(xt,St),wt=Ct.config,Tt=Ct.isLoading,Et=K(()=>xt.value&&wt.value?.schema?.length?wt.value:void 0),Dt=K(()=>ve.value??``),Ot=De(b,Dt),kt=Ot.config,At=Ot.isLoading,Mt=u(Se,lt),Nt=Mt.config,Pt=Mt.isLoading,Ft=K(()=>{if(!(!ve.value||ve.value===y.value.pluginInfo?.name))return kt.value?.schema?.length?kt.value:void 0}),It=K(()=>Se.value&&ct.value&&Nt.value?.schema?.length?Nt.value:void 0),Lt=K(()=>N.value??``),Rt=De(b,Lt),zt=Rt.config,Bt=Rt.isLoading,Vt=K(()=>{if(!(!N.value||N.value===y.value.pluginInfo?.name))return zt.value?.schema?.length?zt.value:void 0}),Ht=K(()=>{let e=C.value?.result||[];return(ie.value?.result||[]).filter(t=>{let n=e.find(e=>e.pluginName===t.pluginName),r=t.contract.provides.length>0,a=t.contract.consumes.length>0;return y.value.pluginInfo?.name===t.pluginName||o(t.contract)&&!S(t.contract)?!1:n&&(r||a||i(t.contract))})});function Wt(e,t){return e.pluginName!==y.value.pluginInfo?.name||(E.value??[]).some(n=>n.type===t&&qt(n.pluginId)===e.pluginName)}function Gt(e){return fe.value.some(t=>t.type===e)||(E.value??[]).some(t=>t.type===e)?!0:(T.value??[]).some(t=>t.contract.provides.includes(e)&&t.pluginName!==y.value.pluginInfo?.name)}function qt(e){return y.value.plugins.find(t=>t.id===e)?.name}function Jt(e){let t=typeof e==`string`?e:e?.name;if(t&&C.value&&C.value.result.some(e=>e.pluginName===t&&!e.disabled))return t}function Xt(e){return e.sort((e,t)=>!Jt(e.pluginName)&&Jt(t.pluginName)?1:Jt(e.pluginName)&&!Jt(t.pluginName)?-1:e.displayName.localeCompare(t.displayName))}function Zt(e){let t=Jn(e),n=y.value.assignments[t];return Array.isArray(n)?void 0:n}function Qt(e){let t=Jn(e),n=y.value.assignments[t];return Array.isArray(n)?void 0:n}async function $t(e){if(e!==void 0)A.value=e;else switch(k.value){case`cameraController`:A.value=Jt(We.value?.pluginName)||``;break;case`hub`:A.value=Jt(Ge.value[0]?.pluginName)||``;break;case`detection`:{let e=Jt(j.value?Zt(j.value):void 0);A.value=e||``,M.value=e||void 0;break}case`core`:{let e=Jt(_e.value?Qt(_e.value):void 0);A.value=e||``,ve.value=e||void 0;break}case`accessories`:A.value=``;break;default:A.value=``}A.value&&k.value!==`accessories`&&Jt(A.value)&&await Me.getConfig()}function en(){switch(k.value){case`cameraController`:Ke.value.length&&!A.value&&(A.value=Ke.value[0].pluginName);break;case`hub`:if(Ge.value.length){let e=Ge.value.find(e=>Jt(e.pluginName));he.value=e?.pluginName}break;case`detection`:{Ye.value.length&&(!j.value||!Ye.value.includes(j.value))&&(j.value=Ye.value[0]);let e=j.value?Zt(j.value):void 0;e&&Jt(e.name)?M.value=e.name:M.value=void 0;break}case`core`:{at.value.length&&(!_e.value||!at.value.includes(_e.value))&&(_e.value=at.value[0]);let e=_e.value?Qt(_e.value):void 0;e&&Jt(e.name)?ve.value=e.name:ve.value=void 0;break}case`accessories`:Te.value.length&&(!ye.value||!Te.value.includes(ye.value))&&(ye.value=Te.value[0]),yn(()=>{ke.value.length&&!N.value&&(N.value=ke.value[0])})}}async function tn(e){T.value&&(T.value.some(t=>t.pluginName===e.pluginName)?(await ue({cameraname:y.value.name,pluginname:e.pluginName}),me.value?.reset()):await ce({cameraname:y.value.name,pluginname:e.pluginName}))}async function nn(e){if(!ye.value)return;let t=ke.value;if(Oe.value){let n=e,r=t[0];if(n===r)return;r&&await se({cameraname:y.value.name,pluginname:r,type:ye.value}),n?(await oe({cameraname:y.value.name,pluginname:n,type:ye.value}),N.value=n):N.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 oe({cameraname:y.value.name,pluginname:e,type:ye.value});for(let e of i)await se({cameraname:y.value.name,pluginname:e,type:ye.value}),N.value===e&&(N.value=void 0);r.length&&!N.value?N.value=r[0]:n.length&&!N.value&&(N.value=n[0])}async function an(e,t){try{await Me.setValue(e.key,void 0),h.add({severity:`success`,detail:_(`components.toast.config_updated`),life:3e3})}catch(e){h.add({severity:`error`,detail:e,life:3e3})}}async function cn(e,t){try{let n=await Me.submitValue(e.key,e.payload);if(n?.toast){let e=Ut(n.toast.type);h.add({severity:e,detail:n.toast.message,life:3e3})}n?.schema&&n.schema.length&&g.openComponentDialog(li,{data:{title:_(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:n.schema,config:e.payload},pluginName:t,cameraName:y.value.name,buttonKey:e.key}}})}catch(e){h.add({severity:`error`,detail:e,life:3e3})}}async function ln(e,t){try{await Me.setConfig(t),h.add({severity:`success`,detail:_(`components.toast.config_updated`),life:3e3})}catch(e){h.add({severity:`error`,detail:e,life:3e3})}}async function un(e){if(!(!rt.value||!xe.value))try{await ht.setValue(e.key,void 0),h.add({severity:`success`,detail:_(`components.toast.config_updated`),life:3e3})}catch(e){h.add({severity:`error`,detail:e,life:3e3})}}async function dn(e){if(!(!rt.value||!xe.value))try{let t=await ht.submitValue(e.key,e.payload);if(t?.toast){let e=Ut(t.toast.type);h.add({severity:e,detail:t.toast.message,life:3e3})}}catch(e){h.add({severity:`error`,detail:e,life:3e3})}}async function fn(e){if(!(!rt.value||!xe.value))try{await ht.setConfig(e),h.add({severity:`success`,detail:_(`components.toast.config_updated`),life:3e3})}catch(e){h.add({severity:`error`,detail:e,life:3e3})}}async function pn(e){if(xt.value)try{await Ct.setValue(e.key,void 0),h.add({severity:`success`,detail:_(`components.toast.config_updated`),life:3e3})}catch(e){h.add({severity:`error`,detail:e,life:3e3})}}async function mn(e){if(xt.value)try{let t=await Ct.submitValue(e.key,e.payload);if(t?.toast){let e=Ut(t.toast.type);h.add({severity:e,detail:t.toast.message,life:3e3})}}catch(e){h.add({severity:`error`,detail:e,life:3e3})}}async function hn(e){if(xt.value)try{await Ct.setConfig(e),h.add({severity:`success`,detail:_(`components.toast.config_updated`),life:3e3})}catch(e){h.add({severity:`error`,detail:e,life:3e3})}}async function gn(e){if(!(!lt.value||!Se.value))try{await Mt.setValue(e.key,void 0),h.add({severity:`success`,detail:_(`components.toast.config_updated`),life:3e3})}catch(e){h.add({severity:`error`,detail:e,life:3e3})}}async function _n(e){if(!(!lt.value||!Se.value))try{let t=await Mt.submitValue(e.key,e.payload);if(t?.toast){let e=Ut(t.toast.type);h.add({severity:e,detail:t.toast.message,life:3e3})}}catch(e){h.add({severity:`error`,detail:e,life:3e3})}}async function vn(e){if(!(!lt.value||!Se.value))try{await Mt.setConfig(e),h.add({severity:`success`,detail:_(`components.toast.config_updated`),life:3e3})}catch(e){h.add({severity:`error`,detail:e,life:3e3})}}async function bn(e){if(!(!P.value||!be.value))try{await Fe.setValue(e.key,void 0),h.add({severity:`success`,detail:_(`components.toast.config_updated`),life:3e3})}catch(e){h.add({severity:`error`,detail:e,life:3e3})}}async function xn(e){if(!(!P.value||!be.value))try{let t=await Fe.submitValue(e.key,e.payload);if(t?.toast){let e=Ut(t.toast.type);h.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&g.openComponentDialog(li,{data:{title:_(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:Ce.value,cameraName:y.value.name,buttonKey:e.key,sensorId:be.value,pluginId:P.value}}})}catch(e){h.add({severity:`error`,detail:e,life:3e3})}}async function Cn(e){if(!(!P.value||!be.value))try{await Fe.setConfig(e),h.add({severity:`success`,detail:_(`components.toast.config_updated`),life:3e3})}catch(e){h.add({severity:`error`,detail:e,life:3e3})}}async function R(e){M.value&&await dt.setValue(e.key,void 0)}async function wn(e){if(M.value)try{let t=await dt.submitValue(e.key,e.payload);if(t?.toast){let e=Ut(t.toast.type);h.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&g.openComponentDialog(li,{data:{title:_(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:M.value,cameraName:y.value.name,buttonKey:e.key}}})}catch(e){h.add({severity:`error`,detail:e,life:3e3})}}async function Tn(e){M.value&&await dt.setConfig(e)}async function En(e){ve.value&&await Ot.setValue(e.key,void 0)}async function Dn(e){if(ve.value)try{let t=await Ot.submitValue(e.key,e.payload);if(t?.toast){let e=Ut(t.toast.type);h.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&g.openComponentDialog(li,{data:{title:_(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:ve.value,cameraName:y.value.name,buttonKey:e.key}}})}catch(e){h.add({severity:`error`,detail:e,life:3e3})}}async function On(e){ve.value&&await Ot.setConfig(e)}async function kn(e){N.value&&await Rt.setValue(e.key,void 0)}async function An(e){if(N.value)try{let t=await Rt.submitValue(e.key,e.payload);if(t?.toast){let e=Ut(t.toast.type);h.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&g.openComponentDialog(li,{data:{title:_(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:N.value,cameraName:y.value.name,buttonKey:e.key}}})}catch(e){h.add({severity:`error`,detail:e,life:3e3})}}async function Mn(e){N.value&&await Rt.setConfig(e)}function Nn(e){e&&g.openComponentDialog($s,{data:{title:_(`components.camera_options.sensor_display_name`),confirmText:_(`components.form.button.save`),contentProps:{currentDisplayName:e.displayName.value}},onConfirm:async t=>{t&&t!==e.displayName.value&&await e.setDisplayName(t)}})}return Y(k,()=>{yn(()=>{en(),$t()})},{immediate:!0}),Y([Ge,C],async([e,t])=>{if(k.value===`hub`&&e.length&&t?.result&&!he.value){let t=e.find(e=>Jt(e.pluginName));t&&(he.value=t.pluginName,A.value=t.pluginName,await Me.getConfig())}},{immediate:!0}),Y([Ke,()=>k.value],async([e,t])=>{t===`cameraController`&&e.length&&!A.value&&(A.value=e[0].pluginName,await Me.getConfig())},{immediate:!0}),Y(()=>A.value,async(e,t)=>{k.value===`cameraController`&&e&&e!==t&&await Me.getConfig()}),Y(he,async(e,t)=>{e&&e!==t&&Jt(e)&&(A.value=e,await Me.getConfig())}),Y(j,()=>{if(j.value){let e=Zt(j.value);e&&Jt(e.name)?M.value=e.name:M.value=void 0}else M.value=void 0;$t()},{flush:`sync`}),Y(M,async(e,t)=>{if(e!==t&&j.value){let n=Zt(j.value);!e&&t?(await se({cameraname:y.value.name,pluginname:t,type:j.value}),me.value?.reset()):e&&(n?.name!==e&&await oe({cameraname:y.value.name,pluginname:e,type:j.value}),await dt.getConfig()),yn(()=>$t(e))}}),Y(Ze,e=>{xe.value&&e.some(e=>e.id===xe.value)||(xe.value=e[0]?.id)},{immediate:!0,flush:`sync`}),Y($e,e=>ge.value=e,{immediate:!0}),Y(ge,async(e,t)=>{e!==t&&e!==$e.value&&(!e&&t?await se({cameraname:y.value.name,pluginname:t,type:v.ObjectAssist}):e&&await oe({cameraname:y.value.name,pluginname:e,type:v.ObjectAssist}))}),Y(_e,()=>{if(_e.value){let e=Qt(_e.value);e&&Jt(e.name)?ve.value=e.name:ve.value=void 0}else ve.value=void 0;$t()},{flush:`sync`}),Y(ve,async(e,t)=>{if(e!==t&&_e.value){let n=Qt(_e.value);!e&&t?(await se({cameraname:y.value.name,pluginname:t,type:_e.value}),me.value?.reset()):e&&(n?.name!==e&&await oe({cameraname:y.value.name,pluginname:e,type:_e.value}),await Ot.getConfig()),yn(()=>$t(e))}}),Y(st,e=>{Se.value&&e.some(e=>e.id===Se.value)||(Se.value=e[0]?.id)},{immediate:!0,flush:`sync`}),Y([xe,rt],async([e,t])=>{e&&t&&await ht.getConfig()}),Y([Se,lt],async([e,t])=>{e&&t&&await Mt.getConfig()}),Y(ye,()=>{ke.value.length?N.value=ke.value[0]:N.value=void 0},{flush:`sync`}),Y(je,e=>{be.value&&e.some(e=>e.id===be.value)||(be.value=e[0]?.id)},{immediate:!0,flush:`sync`}),Y(N,async e=>{e&&await Rt.getConfig()}),Y(be,async e=>{e&&P.value&&await Fe.getConfig()}),Y([qe,Be],([e,t])=>{e?k.value??=`cameraController`:!t&&(!k.value||k.value===`cameraController`)&&(k.value=`hub`)},{immediate:!0,flush:`sync`}),on(async()=>{await ne(),en(),$t()}),(e,n)=>{let r=Xs,i=ii,a=ri,o=fr,s=ti,c=d,l=sr,u=Yt,f=qs,p=ee;return I(),V(`div`,ec,[J(r,{label:e.$t(`components.camera_options.categories`),loading:G(Be)},null,8,[`label`,`loading`]),J(a,{modelValue:G(k),"onUpdate:modelValue":[n[0]||=e=>In(k)?k.value=e:null,n[1]||=e=>$t()],mandatory:``},{default:L(()=>[(I(),V(U,null,F(t,t=>J(i,{key:t,size:`small`,disabled:t===`cameraController`&&!G(qe),value:t},{default:L(()=>[W(B(e.$t(`components.camera_options.chip_${t}`)),1)]),_:2},1032,[`disabled`,`value`])),64))]),_:1},8,[`modelValue`]),J(o,{class:`m-0 py-3`}),G(k)===`cameraController`?(I(),V(`div`,tc,[G(Ke).length?(I(),V(U,{key:1},[J(r,{label:e.$t(`components.camera_options.chip_plugins`),loading:G(Pe)},null,8,[`label`,`loading`]),J(a,{modelValue:G(A),"onUpdate:modelValue":n[2]||=e=>In(A)?A.value=e:null,disabled:G(He),mandatory:``,class:`min-h-[30px]`},{default:L(()=>[(I(!0),V(U,null,F(G(Ke),e=>(I(),q(i,{key:e.pluginName,size:`small`,disabled:!Jt(e.pluginName)||G(Ue),value:e.pluginName},{default:L(()=>[W(B(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),G(Re)?(I(),V(U,{key:0},[J(o,{class:`m-0 py-3`}),J(r,{label:e.$t(`components.camera_options.plugin_settings`)},null,8,[`label`]),(I(),q(oi,{ref_key:`schemaRef`,ref:me,key:G(A),"schema-form":{schema:G(Re).schema,config:G(Re).config},loading:G(Ue),onOnFormSubmit:n[3]||=e=>ln(G(A),e),onOnSubmit:n[4]||=e=>cn(e,G(A)),onOnAction:n[5]||=e=>an(e,G(A))},null,8,[`schema-form`,`loading`]))],64)):Z(``,!0)],64)):(I(),V(U,{key:0},[J(r,{label:e.$t(`components.camera_options.chip_plugins`),loading:G(Ve)},null,8,[`label`,`loading`]),G(Ve)?Z(``,!0):(I(),V(`span`,nc,B(e.$t(`components.camera_options.no_plugins_enabled`)),1))],64))])):G(k)===`hub`?(I(),V(`div`,rc,[G(Ge).length?(I(),V(U,{key:1},[J(r,{label:e.$t(`components.camera_options.chip_plugins`),loading:G(Pe)},null,8,[`label`,`loading`]),J(a,{modelValue:G(he),"onUpdate:modelValue":n[6]||=e=>In(he)?he.value=e:null,disabled:G(He),mandatory:``,class:`min-h-[30px]`},{default:L(()=>[(I(!0),V(U,null,F(G(Ge),e=>(I(),q(i,{key:e.pluginName,size:`small`,disabled:!Jt(e.pluginName)||G(Ue),value:e.pluginName},{default:L(()=>[W(B(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),G(Re)?(I(),V(U,{key:0},[J(o,{class:`m-0 py-3`}),J(r,{label:e.$t(`components.camera_options.plugin_settings`)},null,8,[`label`]),(I(),q(oi,{ref_key:`schemaRef`,ref:me,key:G(A),"schema-form":{schema:G(Re).schema,config:G(Re).config},loading:G(Ue),onOnFormSubmit:n[7]||=e=>ln(G(A),e),onOnSubmit:n[8]||=e=>cn(e,G(A)),onOnAction:n[9]||=e=>an(e,G(A))},null,8,[`schema-form`,`loading`]))],64)):Z(``,!0)],64)):(I(),V(U,{key:0},[J(r,{label:e.$t(`components.camera_options.chip_plugins`),loading:G(Ve)},null,8,[`label`,`loading`]),G(Ve)?Z(``,!0):(I(),V(`span`,ic,B(e.$t(`components.camera_options.no_plugins_enabled`)),1))],64))])):G(k)===`detection`?(I(),V(`div`,ac,[G(Ye).length?(I(),V(U,{key:1},[J(r,{label:e.$t(`components.camera_options.sensor_types`),loading:G(Ve)},null,8,[`label`,`loading`]),J(a,{modelValue:G(j),"onUpdate:modelValue":n[10]||=e=>In(j)?j.value=e:null,mandatory:``,class:`min-h-[30px]`},{default:L(()=>[(I(!0),V(U,null,F(G(Ye),t=>(I(),q(i,{key:t,size:`small`,value:t},{default:L(()=>[W(B(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`value`]))),128))]),_:1},8,[`modelValue`]),G(Xe).length?(I(),V(U,{key:0},[J(o,{class:`m-0 py-3`}),J(r,{label:e.$t(`components.camera_options.chip_plugins`),loading:G(mt)},null,8,[`label`,`loading`]),J(a,{modelValue:G(M),"onUpdate:modelValue":n[11]||=e=>In(M)?M.value=e:null,disabled:G(He),class:`min-h-[30px]`},{default:L(()=>[(I(!0),V(U,null,F(G(Xe),e=>(I(),q(i,{key:e.pluginName,size:`small`,filter:``,disabled:!Jt(e.pluginName)||G(Ue),value:e.pluginName},{default:L(()=>[W(B(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),G(vt)?(I(),V(U,{key:0},[J(o,{class:`m-0 py-3`}),J(r,{label:e.$t(`components.camera_options.plugin_settings`)},null,8,[`label`]),(I(),q(oi,{key:`detection-plugin-${G(M)}`,"schema-form":{schema:G(vt).schema,config:G(vt).config},loading:G(Ue),onOnFormSubmit:n[12]||=e=>Tn(e),onOnSubmit:n[13]||=e=>wn(e),onOnAction:n[14]||=e=>R(e)},null,8,[`schema-form`,`loading`]))],64)):Z(``,!0),J(o,{class:`m-0 py-3`}),J(r,{label:e.$t(`components.camera_options.sensors`),loading:G(_t)},null,8,[`label`,`loading`]),G(Ze).length?(I(),q(a,{key:1,modelValue:G(xe),"onUpdate:modelValue":n[15]||=e=>In(xe)?xe.value=e:null,mandatory:``,class:`min-h-[30px]`},{default:L(()=>[(I(!0),V(U,null,F(G(Ze),e=>(I(),q(i,{key:e.id,size:`small`,value:e.id},{append:L(()=>[J(c,{text:G(be)!==e.id,rounded:``,severity:G(be)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:rn(t=>Nn(e),[`stop`])},{icon:L(()=>[J(s,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:L(()=>[W(B(e.displayName.value)+` `,1)]),_:2},1032,[`value`]))),128))]),_:1},8,[`modelValue`])):G(Ve)?Z(``,!0):(I(),V(`span`,sc,B(e.$t(`components.camera_options.no_sensors`)),1)),G(yt)?(I(),V(U,{key:3},[J(o,{class:`m-0 py-3`}),J(r,{label:e.$t(`components.camera_options.sensor_settings`)},null,8,[`label`]),(I(),q(oi,{key:`sensor-${G(xe)}`,"schema-form":{schema:G(yt).schema,config:G(yt).config},loading:G(Ue),onOnFormSubmit:n[16]||=e=>fn(e),onOnSubmit:n[17]||=e=>dn(e),onOnAction:n[18]||=e=>un(e)},null,8,[`schema-form`,`loading`]))],64)):Z(``,!0)],64)):Z(``,!0),G(nt)?(I(),V(U,{key:1},[J(o,{class:`m-0 py-3`}),J(r,{label:e.$t(`components.camera_options.object_assist`),loading:G(Tt)},null,8,[`label`,`loading`]),J(a,{modelValue:G(ge),"onUpdate:modelValue":n[19]||=e=>In(ge)?ge.value=e:null,disabled:G(He),class:`min-h-[30px]`},{default:L(()=>[(I(!0),V(U,null,F(G(tt),e=>(I(),q(i,{key:e.pluginName,size:`small`,filter:``,disabled:!Jt(e.pluginName)||G(Ue),value:e.pluginName},{default:L(()=>[W(B(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),G(Et)?(I(),V(U,{key:0},[J(o,{class:`m-0 py-3`}),J(r,{label:e.$t(`components.camera_options.sensor_settings`)},null,8,[`label`]),(I(),q(oi,{key:`object-assist-${G(xt)}`,"schema-form":{schema:G(Et).schema,config:G(Et).config},loading:G(Ue),onOnFormSubmit:n[20]||=e=>hn(e),onOnSubmit:n[21]||=e=>mn(e),onOnAction:n[22]||=e=>pn(e)},null,8,[`schema-form`,`loading`]))],64)):Z(``,!0)],64)):Z(``,!0)],64)):(I(),V(U,{key:0},[J(r,{label:e.$t(`components.camera_options.sensor_types`),loading:G(Ve)},null,8,[`label`,`loading`]),G(Ve)?Z(``,!0):(I(),V(`span`,oc,B(e.$t(`components.camera_options.no_plugins_enabled`)),1))],64))])):G(k)===`core`?(I(),V(`div`,cc,[G(at).length?(I(),V(U,{key:1},[J(r,{label:e.$t(`components.camera_options.sensor_types`),loading:G(Ve)},null,8,[`label`,`loading`]),J(a,{modelValue:G(_e),"onUpdate:modelValue":n[23]||=e=>In(_e)?_e.value=e:null,mandatory:``,class:`min-h-[30px]`},{default:L(()=>[(I(!0),V(U,null,F(G(at),t=>(I(),q(i,{key:t,size:`small`,value:t},{default:L(()=>[W(B(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`value`]))),128))]),_:1},8,[`modelValue`]),G(ot).length?(I(),V(U,{key:0},[J(o,{class:`m-0 py-3`}),J(r,{label:e.$t(`components.camera_options.chip_plugins`),loading:G(At)},null,8,[`label`,`loading`]),J(a,{modelValue:G(ve),"onUpdate:modelValue":n[24]||=e=>In(ve)?ve.value=e:null,disabled:G(He),class:`min-h-[30px]`},{default:L(()=>[(I(!0),V(U,null,F(G(ot),e=>(I(),q(i,{key:e.pluginName,size:`small`,filter:``,disabled:!Jt(e.pluginName)||G(Ue),value:e.pluginName},{default:L(()=>[W(B(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),G(Ft)?(I(),V(U,{key:0},[J(o,{class:`m-0 py-3`}),J(r,{label:e.$t(`components.camera_options.plugin_settings`)},null,8,[`label`]),(I(),q(oi,{key:`core-plugin-${G(ve)}`,"schema-form":{schema:G(Ft).schema,config:G(Ft).config},loading:G(Ue),onOnFormSubmit:n[25]||=e=>On(e),onOnSubmit:n[26]||=e=>Dn(e),onOnAction:n[27]||=e=>En(e)},null,8,[`schema-form`,`loading`]))],64)):Z(``,!0),J(o,{class:`m-0 py-3`}),J(r,{label:e.$t(`components.camera_options.sensors`),loading:G(Pt)},null,8,[`label`,`loading`]),G(st).length?(I(),q(a,{key:1,modelValue:G(Se),"onUpdate:modelValue":n[28]||=e=>In(Se)?Se.value=e:null,mandatory:``,class:`min-h-[30px]`},{default:L(()=>[(I(!0),V(U,null,F(G(st),e=>(I(),q(i,{key:e.id,size:`small`,value:e.id},{append:L(()=>[J(c,{text:G(be)!==e.id,rounded:``,severity:G(be)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:rn(t=>Nn(e),[`stop`])},{icon:L(()=>[J(s,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:L(()=>[W(B(e.displayName.value)+` `,1)]),_:2},1032,[`value`]))),128))]),_:1},8,[`modelValue`])):G(Ve)?Z(``,!0):(I(),V(`span`,uc,B(e.$t(`components.camera_options.no_sensors`)),1)),G(It)?(I(),V(U,{key:3},[J(o,{class:`m-0 py-3`}),J(r,{label:e.$t(`components.camera_options.sensor_settings`)},null,8,[`label`]),(I(),q(oi,{key:`sensor-${G(Se)}`,"schema-form":{schema:G(It).schema,config:G(It).config},loading:G(Ue),onOnFormSubmit:n[29]||=e=>vn(e),onOnSubmit:n[30]||=e=>_n(e),onOnAction:n[31]||=e=>gn(e)},null,8,[`schema-form`,`loading`]))],64)):Z(``,!0)],64)):Z(``,!0)],64)):(I(),V(U,{key:0},[J(r,{label:e.$t(`components.camera_options.sensor_types`),loading:G(Ve)},null,8,[`label`,`loading`]),G(Ve)?Z(``,!0):(I(),V(`span`,lc,B(e.$t(`components.camera_options.no_plugins_enabled`)),1))],64))])):G(k)===`accessories`?(I(),V(`div`,dc,[G(Te).length?(I(),V(U,{key:1},[J(r,{label:e.$t(`components.camera_options.sensor_types`),loading:G(Ve)},null,8,[`label`,`loading`]),J(a,{modelValue:G(ye),"onUpdate:modelValue":n[32]||=e=>In(ye)?ye.value=e:null,mandatory:``,class:`min-h-[30px]`},{default:L(()=>[(I(!0),V(U,null,F(G(Te),t=>(I(),q(i,{key:t,size:`small`,value:t},{default:L(()=>[W(B(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`value`]))),128))]),_:1},8,[`modelValue`]),G(Ee).length?(I(),V(U,{key:0},[J(o,{class:`m-0 py-3`}),J(r,{label:e.$t(`components.camera_options.chip_plugins`),loading:G(Bt)},null,8,[`label`,`loading`]),J(a,{"model-value":G(Oe)?G(ke)[0]:G(ke),disabled:G(He),multiple:!G(Oe),class:`min-h-[30px]`,"onUpdate:modelValue":nn},{default:L(()=>[(I(!0),V(U,null,F(G(Ee),e=>(I(),q(i,{key:e.pluginName,size:`small`,filter:``,disabled:!Jt(e.pluginName)||G(Ue),value:e.pluginName},{default:L(()=>[W(B(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`model-value`,`disabled`,`multiple`]),G(Vt)?(I(),V(U,{key:0},[J(o,{class:`m-0 py-3`}),J(r,{label:e.$t(`components.camera_options.plugin_settings`)},null,8,[`label`]),(I(),q(oi,{key:`accessory-plugin-${G(N)}`,"schema-form":{schema:G(Vt).schema,config:G(Vt).config},loading:G(Ue),onOnFormSubmit:n[33]||=e=>Mn(e),onOnSubmit:n[34]||=e=>An(e),onOnAction:n[35]||=e=>kn(e)},null,8,[`schema-form`,`loading`]))],64)):Z(``,!0)],64)):Z(``,!0),J(o,{class:`m-0 py-3`}),J(r,{label:e.$t(`components.camera_options.sensors`),loading:G(Le)},null,8,[`label`,`loading`]),G(je).length?(I(),q(a,{key:1,modelValue:G(be),"onUpdate:modelValue":n[36]||=e=>In(be)?be.value=e:null,mandatory:``,class:`min-h-[30px]`},{default:L(()=>[(I(!0),V(U,null,F(G(je),e=>(I(),q(i,{key:e.id,size:`small`,value:e.id},{append:L(()=>[J(c,{text:G(be)!==e.id,rounded:``,severity:G(be)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:rn(t=>Nn(e),[`stop`])},{icon:L(()=>[J(s,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:L(()=>[W(B(e.displayName.value)+` `,1)]),_:2},1032,[`value`]))),128))]),_:1},8,[`modelValue`])):G(Ve)?Z(``,!0):(I(),V(`span`,pc,B(e.$t(`components.camera_options.no_sensors`)),1)),G(ze)?(I(),V(U,{key:3},[J(o,{class:`m-0 py-3`}),J(r,{label:e.$t(`components.camera_options.sensor_settings`)},null,8,[`label`]),(I(),q(oi,{key:`sensor-${G(be)}`,"schema-form":{schema:G(ze).schema,config:G(ze).config},loading:G(Ue),onOnFormSubmit:n[37]||=e=>Cn(e),onOnSubmit:n[38]||=e=>xn(e),onOnAction:n[39]||=e=>bn(e)},null,8,[`schema-form`,`loading`]))],64)):Z(``,!0)],64)):(I(),V(U,{key:0},[J(r,{label:e.$t(`components.camera_options.sensor_types`),loading:G(Ve)},null,8,[`label`,`loading`]),G(Ve)?Z(``,!0):(I(),V(`span`,fc,B(e.$t(`components.camera_options.no_plugins_enabled`)),1))],64))])):G(k)===`more`?(I(),V(`div`,mc,[J(r,{label:e.$t(`components.camera_options.manage_plugins`),loading:G(ae)},null,8,[`label`,`loading`]),!G(Ht).length&&!G(ae)?(I(),V(`span`,hc,B(e.$t(`components.camera_options.no_plugins_found`)),1)):(I(),V(`div`,gc,[(I(!0),V(U,null,F(G(Ht),t=>Sn((I(),V(`div`,{key:t.pluginName,class:`cui-list-item`},[J(u,{disabled:G(He)||!Jt(t.pluginName),class:`h-14`,onClick:n=>e.$router.push(`/plugins/${t.pluginName}`)},{append:L(()=>[J(l,{"model-value":G(T)?.some(e=>e.pluginName===t.pluginName),disabled:G(He)||!Jt(t.pluginName),"onUpdate:modelValue":e=>tn(t)},null,8,[`model-value`,`disabled`,`onUpdate:modelValue`])]),default:L(()=>[z(`span`,null,B(t.displayName),1)]),_:2},1032,[`disabled`,`onClick`])])),[[p,{value:Jt(t.pluginName)===void 0?e.$t(`components.form.tooltip.disabled`):``},void 0,{top:!0}]])),128))])),z(`div`,_c,[J(u,{class:`h-14`,onClick:n[40]||=t=>e.$router.push(`/plugins`)},{append:L(()=>[J(c,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-md`},{icon:L(()=>[J(f,{width:`100%`,height:`100%`})]),_:1})]),default:L(()=>[z(`span`,null,B(e.$t(`components.camera_options.more_plugins`)),1)]),_:1})])])):Z(``,!0)])}}}),yc={class:`flex flex-col gap-4`},bc={class:`relative w-full bg-black rounded-xl overflow-hidden flex items-center justify-center`,style:{height:`40vh`}},xc={class:`flex flex-col field-gap`},Sc={class:`cui-label`},Cc={class:`flex flex-col field-gap`},wc={for:`aspect-ratio-custom`,class:`cui-label`},Tc=Dn({__name:`AspectRatio`,props:{camera:{},current:{},presets:{}},setup(e,{expose:t}){let n=e,{t:r}=p(),i=Tn(`dialogRefProps`),o=H(n.current||`16:9`),s=/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?)$/,c=K(()=>{let e=o.value.match(s);if(!e)return null;let t=Number(e[1]),n=Number(e[2]);return!(t>0)||!(n>0)?null:{w:t,h:n}}),l=K(()=>n.presets.includes(o.value)),u=K(()=>c.value?``:o.value.trim()===``?r(`components.form.hint.aspect_ratio_required`):r(`components.form.hint.aspect_ratio_invalid`)),d=K(()=>!c.value||l.value?r(`components.form.hint.aspect_ratio`):r(`components.form.hint.aspect_ratio_custom`,{ratio:(c.value.w/c.value.h).toFixed(2)})),f=K(()=>{let e=c.value??{w:16,h:9};return{width:`min(100%, calc(40vh * ${e.w/e.h}))`,aspectRatio:`${e.w} / ${e.h}`,transition:`width 0.25s ease, aspect-ratio 0.25s ease`}});un(()=>{i.disabled&&(i.disabled.value=!c.value)});async function m(){return c.value?o.value:null}return t({onConfirm:m}),(t,n)=>{let i=a,s=_,c=ur,p=Ar;return I(),V(`div`,yc,[z(`div`,bc,[z(`div`,{class:`relative`,style:zn(G(f))},[J(_t,{camera:e.camera,"show-loading-screen":!1,"show-timestamp":!0,class:`absolute inset-0`,"image-style":{objectFit:`fill`}},null,8,[`camera`])],4)]),z(`div`,xc,[z(`label`,Sc,B(G(r)(`components.form.label.aspect_ratio`)),1),J(i,{"model-value":G(l)?G(o):null,options:e.presets,"allow-empty":!0,size:`small`,"onUpdate:modelValue":n[0]||=e=>e&&(o.value=e)},null,8,[`model-value`,`options`])]),z(`div`,Cc,[z(`label`,wc,B(G(r)(`components.form.label.aspect_ratio_custom`)),1),J(c,null,{default:L(()=>[J(s,{id:`aspect-ratio-custom`,modelValue:G(o),"onUpdate:modelValue":n[1]||=e=>In(o)?o.value=e:null,modelModifiers:{trim:!0},invalid:!!G(u),placeholder:`16:9`,spellcheck:`false`,onKeydown:n[2]||=gn(rn(()=>{},[`prevent`]),[`enter`])},null,8,[`modelValue`,`invalid`])]),_:1}),J(X,{name:`fade`},{default:L(()=>[G(u)?(I(),q(p,{key:0,severity:`error`,variant:`simple`,size:`small`,class:`cui-input-error`},{default:L(()=>[W(B(G(u)),1)]),_:1})):Z(``,!0)]),_:1}),G(u)?Z(``,!0):(I(),q(p,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(G(d)),1)]),_:1}))])])}}}),Ec={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Dc(e,t){return I(),V(`svg`,Ec,[...t[0]||=[z(`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 Oc=On({name:`mdi-cancel`,render:Dc}),kc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ac(e,t){return I(),V(`svg`,kc,[...t[0]||=[z(`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 jc=On({name:`mdi-undo`,render:Ac}),Mc=e(Lr(),1),Nc=[`audio`,`motion`],Pc={ref:`container`,class:`w-full h-full relative min-w-0`},Fc={class:`flex flex-col justify-center items-center`},Ic={class:`relative w-full`},Lc={class:`relative w-full flex flex-col items-center justify-center`},Rc={class:`absolute top-0 left-0 right-0 bottom-0`},zc={class:`sandbox w-full h-full`},Bc={class:`handles`},Vc=[`data-id`,`data-point`,`data-point-index`,`data-zone-index`,`onDblclick`],Hc={class:`clipboard`},Uc={width:`100%`,height:`100%`,class:`polygon-container`},Wc=[`d`,`onClick`,`onMousedown`,`onTouchstart`],Gc=[`id`],Kc=[`fill`],qc=[`id`],Jc=[`fill`],Yc=[`x1`,`y1`,`x2`,`y2`,`stroke`],Xc=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-opacity`,`marker-end`,`marker-start`,`onClick`],Zc=[`x`,`y`,`fill`],Qc=[`x`,`y`],$c=[`x`,`y`,`fill`],el=[`x`,`y`],tl=[`cx`,`cy`,`fill`,`stroke`,`onMousedown`,`onTouchstart`],nl=[`cx`,`cy`,`fill`,`stroke`,`onMousedown`,`onTouchstart`],rl={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`}},il={class:`cui-input-hint w-full self-stretch text-pretty`},al={class:`flex flex-col field-gap w-full`},ol=[`for`],sl={key:0,class:`cui-input-error`},cl={class:`flex flex-col field-gap w-full`},ll=[`for`],ul={class:`inline-flex shrink-0`},dl={class:`flex flex-col field-gap w-full`},fl=[`for`],pl={class:`flex flex-col field-gap w-full`},ml=[`for`],hl={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner mt-auto`},gl={class:`cui-input-hint w-full self-stretch text-pretty`},_l={class:`flex flex-col field-gap w-full`},vl=[`for`],yl={key:0,class:`cui-input-error`},bl={key:0,class:`flex flex-col field-gap w-full`},xl=[`for`],Sl={class:`inline-flex shrink-0`},Cl={key:0,class:`cui-input-hint text-pretty`},wl={key:1,class:`flex flex-col field-gap w-full`},Tl=[`for`],El={key:2,class:`flex flex-col field-gap w-full`},Dl={for:`privacyFallback`,class:`cui-label inline-flex items-center gap-1`},Ol={class:`inline-flex shrink-0`},kl={key:3,class:`flex flex-col field-gap w-full`},Al=[`for`],jl={key:4,class:`flex flex-col field-gap w-full`},Ml=[`for`],Nl={key:5,class:`flex flex-col field-gap w-full`},Pl=[`for`],Fl={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner mt-auto`},Il=He(Dn({__name:`ZoneEditor`,props:{cameraName:{},zones:{},initialTab:{},initialSelection:{}},setup(e,{expose:t}){let n=new ft,r=e,i=jt(),{t:o}=p(),s=Tn(`dialogRefProps`),{mutateAsync:c,isPending:l}=n.patchZoneConfigQuery(),{cameraName:u,zones:f}=jn(r),m=sn(`cameraCardRef`),h=sn(`container`),g=sn(`draggablesRef`),v=sn(`outsideRef`),y=sn(`playgroundContainerRef`),b=H(r.initialTab??`motion`),x=En([]),S=H([]),C=H([]),w=H([]),T=H(`send`),te=H([]),E=H([]),ie=H(!1),ae=H([]),oe=H(void 0),D=H(-1),se=H(-1),O=H(-1);r.initialSelection!==void 0&&((r.initialTab??`zones`)===`lines`?O.value=r.initialSelection:D.value=r.initialSelection);let ce={x:0,y:0},le=!1,ue=null,de=re(h),fe=re(y),pe=hi.element.shape.name,me=gi.element.shape.name,k=K(()=>b.value===`motion`?S.value:b.value===`object`?C.value:b.value===`privacy`?w.value:te.value),A=K(()=>b.value===`object`||b.value===`alert`),he=K(()=>{if(b.value!==`alert`||D.value<0)return[];let e=C.value.filter(e=>e.filter!==`exclude`);if(e.length===0||e.some(e=>e.labels.length===0))return[];let t=new Set(e.flatMap(e=>e.labels));return(te.value[D.value]?.labels??[]).filter(e=>!t.has(e))}),j=K(()=>b.value===`motion`||b.value===`object`),M=K(()=>b.value===`alert`||b.value===`motion`);function ge(e){if(b.value===`object`)return C.value[e];if(b.value===`alert`)return te.value[e]}function _e(e){if(b.value===`motion`)return S.value[e];if(b.value===`object`)return C.value[e]}function ve(e){let t=k.value[e];return t&&`color`in t?t:void 0}function ye(e){return`color`in e?{fill:`filter`in e&&e.filter===`exclude`?`transparent`:`${e.color}4D`,stroke:e.color,"stroke-width":`2`}:{fill:`#000`,stroke:`#000`,"stroke-width":`2`}}let be=K(()=>{if(D.value<0)return``;let e=k.value[D.value];if(!e)return``;let t=pe.safeParse(e.name);return t.success?``:t.error.issues[0]?.message??``}),xe=K(()=>{if(O.value<0)return``;let e=E.value[O.value];if(!e)return``;let t=me.safeParse(e.name);return t.success?``:t.error.issues[0]?.message??``}),Se=K(()=>Math.max(0,fe.width.value-20)),N=K(()=>Math.max(0,fe.height.value-20)),Ce=K(()=>[{label:o(`components.zone_editor.tab_motion`),value:`motion`},{label:o(`components.zone_editor.tab_object`),value:`object`},{label:o(`components.zone_editor.tab_alert`),value:`alert`},{label:o(`components.zone_editor.tab_privacy`),value:`privacy`},{label:o(`components.zone_editor.tab_lines`),value:`lines`}]),P=K(()=>{let e=Be.filter(e=>!Nc.includes(e));return e.length===0?[]:[{label:o(`components.zone_editor.base_labels`),items:e.map(e=>({label:e,value:e}))}]}),we=K(()=>[{label:o(`components.zone_editor.match_anchor`),value:`anchor`},{label:o(`components.zone_editor.match_intersect`),value:`intersect`},{label:o(`components.zone_editor.match_contain`),value:`contain`}]),Te=K(()=>[{label:o(`components.zone_editor.match_intersect`),value:`intersect`},{label:o(`components.zone_editor.match_contain`),value:`contain`}]),Ee=K(()=>[{label:`A ↔ B ${o(`components.zone_editor.line_direction_both`)}`,value:`both`},{label:`A → B`,value:`a-to-b`},{label:`B → A`,value:`b-to-a`}]),De=K(()=>[{label:o(`components.zone_editor.privacy_fallback_send`),value:`send`},{label:o(`components.zone_editor.privacy_fallback_drop`),value:`drop`}]),Oe=K(()=>[{label:o(`components.zone_editor.privacy_drop_on`),value:!0},{label:o(`components.zone_editor.privacy_drop_off`),value:!1}]),ke=K(()=>[{label:o(`components.zone_editor.filter_include`),value:`include`},{label:o(`components.zone_editor.filter_exclude`),value:`exclude`}]);function Ae(e){if(b.value===`alert`){let t=te.value[D.value];t&&(t.match=e);return}let t=C.value[D.value];t&&e!==`anchor`&&(t.type=e)}let je=K(()=>!!(s.loading?.value||l.value)),Me=K(()=>{let e=[];return ie.value&&e.push(`customizing`),k.value?.length||e.push(`start`),e.join(` `)});function Ne(){if(k.value){if(k.value.length===0){ae.value=[];return}ae.value=k.value.flatMap((e,t)=>e.points.map((e,n)=>({_id:`z${t}-p${n}`,zoneIndex:t,pointIndex:n,point:[e[0],e[1]]})))}}function Pe(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 Fe(e,t){if(e.stopPropagation(),!y.value)return;Ge(ie.value),le=!0,D.value=t;let n=y.value.getBoundingClientRect(),{x:r,y:i}=Pe(e),a=Se.value,o=N.value;ce.x=(r-n.left-10)/a*100,ce.y=(i-n.top-10)/o*100}function Ie(e){if(!le||!y.value||D.value===-1||!k.value.length)return;let t=y.value.getBoundingClientRect(),{x:n,y:r}=Pe(e),i=Se.value,a=N.value,o=(n-t.left-10)/i*100,s=(r-t.top-10)/a*100,c=o-ce.x,l=s-ce.y,u=k.value[D.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;x.value.find(t=>t.id===`z${D.value}-p${e}`)?.setPosition(t,n)}ce.x=o,ce.y=s}function Le(){setTimeout(()=>{le=!1},100)}let Re=[[0,0],[100,0],[100,100],[0,100]];function ze(e){let t=Xe(),n=Date.now();b.value===`motion`?S.value.push({name:`motion-${n}`,points:[...e],filter:`include`,color:t}):b.value===`object`?C.value.push({name:`object-${n}`,points:[...e],filter:`include`,type:`intersect`,labels:[],color:t}):b.value===`privacy`?w.value.push({name:`privacy-${n}`,points:[...e],dropDetections:!0}):te.value.push({name:`alert-${n}`,points:[...e],labels:[],match:`contain`,color:t})}function Ve(e){if(!ie.value||le)return;let t=oe.value===void 0?k.value.length:oe.value,n=Math.min(Math.max(Math.round((e.offsetX-10)/Se.value*100),0),100),r=Math.min(Math.max(Math.round((e.offsetY-10)/N.value*100),0),100);oe.value===void 0&&(ze([]),oe.value=k.value.length-1),k.value[t].points.push([n,r]),Ne(),yn(()=>{let e=k.value[t].points.length-1;He({_id:`z${t}-p${e}`,zoneIndex:t,pointIndex:e,point:[n,r]})})}function He(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||nt(t[0],e.point)}function Ue(e){if(!k.value.length)return;let t=Math.round(e.point[0]/Se.value*100),n=Math.round(e.point[1]/N.value*100);k.value[e.zoneIndex].points[e.pointIndex]=[t,n]}function We(){if(b.value===`privacy`){ie.value=!0,oe.value=void 0;return}ze(Re);let e=k.value.length-1;D.value=e,oe.value=e,ie.value=!0,Ne(),yn(()=>g.value?.forEach(e=>it(e)))}function Ge(e){if(oe.value===void 0){ie.value=!1;return}ie.value=e||!1;let t=oe.value;!k.value[t]||!k.value[t].points||(k.value[t].points.length<3?(k.value.splice(t,1),Ne()):(g.value?.forEach(e=>it(e)),D.value=t),oe.value=void 0)}function Ke(){ie.value=!0,oe.value=D.value}function qe(){D.value===-1||!k.value.length||(k.value.splice(D.value,1),D.value=Math.max(-1,D.value-1),Ne(),yn(()=>{$e()}))}function Je(){if(k.value?.length){if(ie.value&&oe.value!==void 0){let e=k.value[oe.value];e.points.length&&(e.points.pop(),e.points.length===0&&(k.value.splice(oe.value,1),oe.value=void 0),Ne());return}k.value.length>0&&(k.value.pop(),Ne(),yn(()=>{$e()}))}}function Ye(){le=!1,ie.value=!1,oe.value=void 0,k.value&&(k.value.length=0,ae.value=[],yn(()=>{et()}))}function Xe(){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 Ze(e){if(!e||!e.length)return``;let t=e.map(e=>{let t=Math.round(e[0]/100*Se.value),n=Math.round(e[1]/100*N.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 Qe(e){ie.value||(D.value=e)}function $e(){et(),g.value?.forEach(e=>{if(!e.dataset.zoneIndex||!e.dataset.pointIndex)return;let t=parseInt(e.dataset.zoneIndex),n=parseInt(e.dataset.pointIndex);if(!k.value[t]||!k.value[t].points[n])return;let r=k.value[t].points[n];r&&(nt(e,r),it(e))})}function et(){x.value.forEach(e=>e.destroy()),x.value=[]}function tt(e){!k.value.length||!k.value[e.zoneIndex]||k.value[e.zoneIndex].points.length<4||(k.value[e.zoneIndex].points.splice(e.pointIndex,1),Ne(),yn(()=>{$e()}))}function nt(e,t){Object.assign(e.style,rt(t))}function rt(e){return{left:Math.round(e[0]/100*Se.value)+`px`,top:Math.round(e[1]/100*N.value)+`px`}}function it(e){e.classList.add(`draggable`);let t=new Mc.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;Ue({_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,x.value.push(t)}function at(e,t,n){e.preventDefault(),O.value=t,ue={lineIndex:t,pointIndex:n};let r=e=>{if(!ue||!y.value)return;let t=y.value.getBoundingClientRect(),{x:n,y:r}=Pe(e),i=Math.min(Math.max((n-t.left-10)/Se.value*100,0),100),a=Math.min(Math.max((r-t.top-10)/N.value*100,0),100);E.value[ue.lineIndex].points[ue.pointIndex]=[Math.round(i),Math.round(a)]},i=()=>{ue=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 ot(){E.value.push({name:`line-${Date.now()}`,points:[[40,30],[60,70]],direction:`both`,labels:[`person`,`vehicle`,`animal`,`package`],color:Xe()}),O.value=E.value.length-1}function st(){O.value<0||!E.value.length||(E.value.splice(O.value,1),O.value=Math.max(-1,O.value-1))}function ct(e){let t=Se.value,n=N.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,x=10+n,S=(e,t)=>({x:Math.max(19,Math.min(b-9,e)),y:Math.max(19,Math.min(x-9,t))}),C=S(m-v*21,h-y*21),w=S(g+v*21,_+y*21);return{h1x:r,h1y:i,h2x:a,h2y:o,ax:C.x+v*15,ay:C.y+y*15,bx:w.x-v*15,by:w.y-y*15,labelAx:C.x,labelAy:C.y,labelBx:w.x,labelBy:w.y}}async function lt(){try{await c({cameraname:u.value,zones:{privacyFallback:T.value,motion:S.value,object:C.value,privacy:w.value,alert:te.value,lines:E.value}})}catch(e){return i.add({severity:`error`,detail:e,life:3e3}),null}}return ne(v,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&&!ie.value&&!o&&!s&&!c&&(D.value=-1)}),Y(se,()=>{se.value=-1}),Y(D,(e,t)=>{if(e===-1&&k.value?.length&&k.value[t]){D.value=t;return}e===-1&&k.value?.length&&(se.value=0)}),Y(f,()=>{S.value=Vt(f.value.motion??[]),C.value=Vt(f.value.object??[]),w.value=Vt(f.value.privacy??[]),T.value=f.value.privacyFallback??`send`,te.value=Vt(f.value.alert??[]),E.value=Vt(f.value.lines??[]),Ne()},{deep:!0,immediate:!0}),Y(b,(e,t)=>{if(e===`lines`){E.value.length&&(O.value<0||O.value>=E.value.length)&&(O.value=0);return}k.value.length?(D.value<0||D.value>=k.value.length)&&(D.value=0):D.value=-1,t&&t!==e&&(Ge(!1),Ne(),yn(()=>{$e()}))},{immediate:!0}),Y([fe.width,fe.height],()=>{$e()}),kn(async()=>{setTimeout(()=>{$e()})}),t({isLoading:je,onConfirm:lt}),(e,t)=>{let n=Pt,r=a,i=_,o=ur,s=di,c=Sr,l=br,f=nr,p=cr,h=fi,x=d,S=_i,ne=ut,re=ti,se=jc,ce=Oc,le=ee;return I(),V(`div`,Pc,[z(`div`,Fc,[z(`div`,Ic,[z(`div`,{ref_key:`outsideRef`,ref:v},null,512),z(`div`,{class:R([`w-full flex justify-center gap-3`,{"flex-row items-stretch":G(de).width.value>900,"flex-col":G(de).width.value<=900}])},[z(`div`,Lc,[z(`div`,Rc,[z(`div`,{ref_key:`playgroundContainerRef`,ref:y,class:`playground-container flex w-full h-full min-w-0`},[z(`section`,{class:R([`playground w-full h-full`,G(Me)]),onClick:Ve},[z(`div`,zc,[z(`div`,Bc,[(I(!0),V(U,null,F(G(ae),e=>Sn((I(),V(`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:rn(t=>tt(e),[`prevent`])},[...t[13]||=[z(`div`,{class:`delete-point`},null,-1)]],40,Vc)),[[Cn,G(b)!==`lines`]])),128)),z(`div`,Hc,[(I(),V(`svg`,Uc,[G(b)===`lines`?Z(``,!0):(I(!0),V(U,{key:0},F(G(k),(e,t)=>(I(),V(`path`,{key:`poly-${t}`,d:Ze(e.points),class:R([`cursor-pointer`,{dash:G(M),selected:G(D)===t}]),style:zn(ye(e)),onClick:e=>Qe(t),onMousedown:e=>Fe(e,t),onMousemove:Ie,onMouseup:Le,onTouchstart:e=>Fe(e,t),onTouchmove:Ie,onTouchend:Le},null,46,Wc))),128)),G(b)===`lines`?(I(),V(U,{key:1},[z(`defs`,null,[(I(!0),V(U,null,F(G(E),(e,t)=>(I(),V(`marker`,{id:`editor-arrow-ab-${t}`,key:`marker-ab-${t}`,markerWidth:`6`,markerHeight:`5`,refX:`5`,refY:`2.5`,orient:`auto`,markerUnits:`strokeWidth`},[z(`path`,{d:`M0,0 L6,2.5 L0,5 Z`,fill:e.color},null,8,Kc)],8,Gc))),128)),(I(!0),V(U,null,F(G(E),(e,t)=>(I(),V(`marker`,{id:`editor-arrow-ba-${t}`,key:`marker-ba-${t}`,markerWidth:`6`,markerHeight:`5`,refX:`1`,refY:`2.5`,orient:`auto`,markerUnits:`strokeWidth`},[z(`path`,{d:`M6,0 L0,2.5 L6,5 Z`,fill:e.color},null,8,Jc)],8,qc))),128))]),(I(!0),V(U,null,F(G(E),(e,t)=>(I(),V(U,{key:`line-${t}`},[z(`line`,{x1:ct(e).h1x,y1:ct(e).h1y,x2:ct(e).h2x,y2:ct(e).h2y,stroke:e.color,"stroke-width":`2`,"stroke-dasharray":`6,4`,opacity:`0.6`},null,8,Yc),z(`line`,{x1:ct(e).ax,y1:ct(e).ay,x2:ct(e).bx,y2:ct(e).by,stroke:e.color,"stroke-width":`3`,class:`cursor-pointer`,"stroke-opacity":G(O)===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=>O.value=t},null,8,Xc),z(`rect`,{x:ct(e).labelAx-9,y:ct(e).labelAy-9,width:`18`,height:`18`,rx:`4`,fill:e.color},null,8,Zc),z(`text`,{x:ct(e).labelAx,y:ct(e).labelAy,fill:`#fff`,"font-size":`11`,"font-weight":`bold`,"text-anchor":`middle`,"dominant-baseline":`central`},` A `,8,Qc),z(`rect`,{x:ct(e).labelBx-9,y:ct(e).labelBy-9,width:`18`,height:`18`,rx:`4`,fill:e.color},null,8,$c),z(`text`,{x:ct(e).labelBx,y:ct(e).labelBy,fill:`#fff`,"font-size":`11`,"font-weight":`bold`,"text-anchor":`middle`,"dominant-baseline":`central`},` B `,8,el),z(`circle`,{cx:ct(e).h1x,cy:ct(e).h1y,r:`8`,fill:e.color,stroke:G(O)===t?`#fff`:e.color,"stroke-width":`2`,class:`cursor-grab`,onMousedown:rn(e=>at(e,t,0),[`stop`]),onTouchstart:rn(e=>at(e,t,0),[`stop`])},null,40,tl),z(`circle`,{cx:ct(e).h2x,cy:ct(e).h2y,r:`8`,fill:e.color,stroke:G(O)===t?`#fff`:e.color,"stroke-width":`2`,class:`cursor-grab`,onMousedown:rn(e=>at(e,t,1),[`stop`]),onTouchstart:rn(e=>at(e,t,1),[`stop`])},null,40,nl)],64))),128))],64)):Z(``,!0)]))])]),t[14]||=z(`div`,{class:`shadowboard on`},null,-1)])],2)],512)]),z(`div`,rl,[J(n,{ref_key:`cameraCardRef`,ref:m,"camera-info":G(u),"source-role":`low-resolution`,"streaming-mode":`webrtc`,toolbar:!1,control:!1,subcontrol:!1,"privacy-overlay":!1,"flat-card":``,class:`w-full h-full border-[1px] border-color-inner`,"card-background-color":`#000`},null,8,[`camera-info`])])]),z(`div`,{class:R([`w-full flex flex-col gap-6 zone-buttons items-center self-stretch`,{"!gap-3":G(de).width.value>900}]),style:zn({flex:G(de).width.value>900?`0 0 440px`:void 0,"max-width":G(de).width.value>900?`440px`:void 0})},[J(r,{modelValue:G(b),"onUpdate:modelValue":t[0]||=e=>In(b)?b.value=e:null,options:G(Ce),"allow-empty":!1,"option-label":`label`,"option-value":`value`,class:`w-full`,pt:{root:{class:`flex w-full`},pcToggleButton:{root:{class:`flex-1 !text-xs !px-1 whitespace-nowrap`}}}},null,8,[`modelValue`,`options`]),G(b)===`lines`?(I(),V(U,{key:0},[z(`p`,il,B(e.$t(`components.zone_editor.lines_hint`)),1),z(`div`,al,[z(`label`,{for:`line[${G(O)}].name`,class:`cui-label`},B(e.$t(`components.form.label.name`)),9,ol),J(o,null,{default:L(()=>[J(i,{"model-value":G(E)[G(O)]?.name,invalid:!!G(xe),loading:G(je),disabled:G(O)<0,type:`text`,onValueChange:t[1]||=e=>{G(E)[G(O)]&&(G(E)[G(O)].name=e??``)}},null,8,[`model-value`,`invalid`,`loading`,`disabled`])]),_:1}),J(X,{name:`fade`},{default:L(()=>[G(xe)?(I(),V(`span`,sl,B(G(xe)),1)):Z(``,!0)]),_:1})]),z(`div`,cl,[z(`label`,{for:`line[${G(O)}].labels`,class:`cui-label inline-flex items-center gap-1`},[W(B(e.$t(`components.form.label.labels`))+` `,1),Sn((I(),V(`span`,ul,[J(s,{class:`w-3.5 h-3.5 text-muted-color`})])),[[le,{value:e.$t(`components.zone_editor.line_labels_info`)}]])],8,ll),J(o,null,{default:L(()=>[J(c,{"model-value":G(E)[G(O)]?.labels,options:G(P),loading:G(je),"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=>{G(E)[G(O)]&&(G(E)[G(O)].labels=e)}},null,8,[`model-value`,`options`,`loading`])]),_:1})]),z(`div`,dl,[z(`label`,{for:`line[${G(O)}].direction`,class:`cui-label`},B(e.$t(`components.zone_editor.line_direction`)),9,fl),J(o,null,{default:L(()=>[J(l,{"model-value":G(E)[G(O)]?.direction??`both`,options:G(Ee),loading:G(je),disabled:G(O)<0,"option-label":`label`,"option-value":`value`,onValueChange:t[3]||=e=>{G(E)[G(O)]&&(G(E)[G(O)].direction=e)}},null,8,[`model-value`,`options`,`loading`,`disabled`])]),_:1})]),z(`div`,pl,[z(`label`,{for:`line[${G(O)}].color`,class:`cui-label`},B(e.$t(`components.form.label.color`)),9,ml),J(o,null,{default:L(()=>[J(i,{"model-value":G(E)[G(O)]?.color,loading:G(je),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),J(p,null,{default:L(()=>[(I(),q(f,{key:G(O),"model-value":G(E)[G(O)]?.color,format:`hex`,onValueChange:t[4]||=e=>e&&G(E)[G(O)]?G(E)[G(O)].color=`#${e}`:null},null,8,[`model-value`]))]),_:1})]),_:1})]),z(`div`,hl,[Sn((I(),q(x,{loading:G(je),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:ot},{icon:L(()=>[J(h,{width:`20px`,height:`20px`})]),_:1},8,[`loading`])),[[le,{value:e.$t(`components.form.tooltip.new`)},void 0,{top:!0}]]),Sn((I(),q(x,{loading:G(je),disabled:!G(E).length||G(O)<0,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:st},{icon:L(()=>[J(S,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[le,{value:e.$t(`components.form.tooltip.delete`)},void 0,{top:!0}]])])],64)):Z(``,!0),G(b)===`lines`?Z(``,!0):(I(),V(U,{key:1},[z(`p`,gl,B(e.$t(`components.zone_editor.${G(b)}_hint`)),1),z(`div`,_l,[z(`label`,{for:`zone[${G(D)}].name`,class:`cui-label`},B(e.$t(`components.form.label.name`)),9,vl),J(o,null,{default:L(()=>[J(i,{"model-value":G(k)[G(D)]?.name,invalid:!!G(be),loading:G(je),disabled:G(D)<0,type:`text`,onValueChange:t[5]||=e=>{G(k)[G(D)]&&(G(k)[G(D)].name=e??``)}},null,8,[`model-value`,`invalid`,`loading`,`disabled`])]),_:1}),J(X,{name:`fade`},{default:L(()=>[G(be)?(I(),V(`span`,yl,B(G(be)),1)):Z(``,!0)]),_:1})]),G(A)?(I(),V(`div`,bl,[z(`label`,{for:`zone[${G(D)}].labels`,class:`cui-label inline-flex items-center gap-1`},[W(B(e.$t(`components.form.label.labels`))+` `,1),Sn((I(),V(`span`,Sl,[J(s,{class:`w-3.5 h-3.5 text-muted-color`})])),[[le,{value:e.$t(`components.zone_editor.${G(b)}_labels_info`)}]])],8,xl),J(o,null,{default:L(()=>[J(c,{"model-value":ge(G(D))?.labels,options:G(P),loading:G(je),disabled:G(D)<0,"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[6]||=e=>{let t=ge(G(D));t&&(t.labels=e??[])}},null,8,[`model-value`,`options`,`loading`,`disabled`])]),_:1}),J(X,{name:`fade`},{default:L(()=>[G(he).length?(I(),V(`p`,Cl,B(e.$t(`components.zone_editor.alert_conflict`,{labels:G(he).join(`, `)})),1)):Z(``,!0)]),_:1})])):Z(``,!0),G(b)===`privacy`?(I(),V(`div`,wl,[z(`label`,{for:`zone[${G(D)}].dropDetections`,class:`cui-label`},B(e.$t(`components.zone_editor.privacy_drop`)),9,Tl),J(o,null,{default:L(()=>[J(l,{"model-value":G(w)[G(D)]?.dropDetections??!0,options:G(Oe),loading:G(je),disabled:G(D)<0,"option-label":`label`,"option-value":`value`,onValueChange:t[7]||=e=>{G(w)[G(D)]&&(G(w)[G(D)].dropDetections=e)}},null,8,[`model-value`,`options`,`loading`,`disabled`])]),_:1})])):Z(``,!0),G(b)===`privacy`?(I(),V(`div`,El,[z(`label`,Dl,[W(B(e.$t(`components.zone_editor.privacy_fallback`))+` `,1),Sn((I(),V(`span`,Ol,[J(s,{class:`w-3.5 h-3.5 text-muted-color`})])),[[le,{value:e.$t(`components.zone_editor.privacy_fallback_info`)}]])]),J(o,null,{default:L(()=>[J(l,{modelValue:G(T),"onUpdate:modelValue":t[8]||=e=>In(T)?T.value=e:null,options:G(De),loading:G(je),"option-label":`label`,"option-value":`value`},null,8,[`modelValue`,`options`,`loading`])]),_:1})])):Z(``,!0),G(j)?(I(),V(`div`,kl,[z(`label`,{for:`zone[${G(D)}].filter`,class:`cui-label`},B(e.$t(`components.zone_editor.zone_filter`)),9,Al),J(o,null,{default:L(()=>[J(l,{"model-value":_e(G(D))?.filter??`include`,options:G(ke),loading:G(je),disabled:G(D)<0,"option-label":`label`,"option-value":`value`,onValueChange:t[9]||=e=>{let t=_e(G(D));t&&(t.filter=e)}},null,8,[`model-value`,`options`,`loading`,`disabled`])]),_:1})])):Z(``,!0),G(b)===`object`||G(b)===`alert`?(I(),V(`div`,jl,[z(`label`,{for:`zone[${G(D)}].match`,class:`cui-label`},B(e.$t(`components.zone_editor.zone_match`)),9,Ml),J(o,null,{default:L(()=>[J(l,{"model-value":G(b)===`alert`?G(te)[G(D)]?.match??`contain`:G(C)[G(D)]?.type??`intersect`,options:G(b)===`alert`?G(we):G(Te),loading:G(je),disabled:G(D)<0,"option-label":`label`,"option-value":`value`,onValueChange:t[10]||=e=>Ae(e)},null,8,[`model-value`,`options`,`loading`,`disabled`])]),_:1})])):Z(``,!0),G(b)===`privacy`?Z(``,!0):(I(),V(`div`,Nl,[z(`label`,{for:`zone[${G(D)}].color`,class:`cui-label`},B(e.$t(`components.form.label.color`)),9,Pl),J(o,null,{default:L(()=>[J(i,{"model-value":ve(G(D))?.color,loading:G(je),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),J(p,null,{default:L(()=>[(I(),q(f,{key:`${G(b)}-${G(D)}`,"model-value":ve(G(D))?.color,format:`hex`,onValueChange:t[11]||=e=>{let t=ve(G(D));e&&t&&(t.color=`#${e}`)}},null,8,[`model-value`]))]),_:1})]),_:1})])),z(`div`,Fl,[G(ie)?Sn((I(),q(x,{key:1,disabled:G(oe)!==void 0&&G(k)[G(oe)]?.points?.length<3,loading:G(je),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:t[12]||=e=>Ge(!1)},{icon:L(()=>[J(ne,{width:`20px`,height:`20px`})]),_:1},8,[`disabled`,`loading`])),[[le,{value:e.$t(`components.form.tooltip.finish`)},void 0,{top:!0}]]):Sn((I(),q(x,{key:0,loading:G(je),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:We},{icon:L(()=>[J(h,{width:`20px`,height:`20px`})]),_:1},8,[`loading`])),[[le,{value:e.$t(`components.form.tooltip.new`)},void 0,{top:!0}]]),Sn((I(),q(x,{loading:G(je),disabled:!G(k).length||G(D)<0||G(ie),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ke},{icon:L(()=>[J(re,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[le,{value:e.$t(`components.form.tooltip.edit`)},void 0,{top:!0}]]),Sn((I(),q(x,{loading:G(je),disabled:!G(k).length||G(D)<0,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:qe},{icon:L(()=>[J(S,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[le,{value:e.$t(`components.form.tooltip.delete`)},void 0,{top:!0}]]),Sn((I(),q(x,{loading:G(je),disabled:!G(k).length,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Je},{icon:L(()=>[J(se,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[le,{value:e.$t(`components.form.tooltip.undo`)},void 0,{top:!0}]]),Sn((I(),q(x,{loading:G(je),disabled:!G(k).length,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ye},{icon:L(()=>[J(ce,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[le,{value:e.$t(`components.form.tooltip.clear`)},void 0,{top:!0}]])])],64))],6)],2)])])],512)}}}),[[`__scopeId`,`data-v-2d2f4bc6`]]),Ll={class:`text-color font-normal`},Rl={class:`flex flex-col gap-6`},zl={for:`name`,class:`cui-label`},Bl={for:`room`,class:`cui-label`},Vl={class:`flex gap-2`},Hl={for:`type`,class:`cui-label`},Ul={class:`w-full flex flex-col gap-2`},Wl={class:`flex items-center gap-4`},Gl={class:`flex flex-col field-switch-gap`},Kl={for:`disabled`,class:`cui-label-switch`},ql={class:`text-color font-normal`},Jl={class:`flex flex-col gap-6`},Yl={for:`info.manufacturer`,class:`cui-label`},Xl={for:`info.model`,class:`cui-label`},Zl={for:`info.hardware`,class:`cui-label`},Ql={for:`info.serialNumber`,class:`cui-label`},$l={for:`info.firmwareVersion`,class:`cui-label`},eu={for:`info.supportUrl`,class:`cui-label`},tu={class:`text-color font-normal`},nu={class:`flex flex-col gap-6`},ru={for:`interfaceSettings.streamingMode`,class:`cui-label`},iu={for:`interfaceSettings.streamingSource`,class:`cui-label`},au={for:`interfaceSettings.aspectRatio`,class:`cui-label`},ou={class:`text-color font-normal`},su={class:`flex flex-col gap-6`},cu={class:`w-full flex flex-col gap-2`},lu={class:`flex items-center gap-4`},uu={class:`flex flex-col field-switch-gap`},du={for:`detectionSettings.snooze`,class:`cui-label-switch`},fu={class:`section-title mt-2`},pu={for:`detectionSettings.motion.resolution`,class:`cui-label`},mu={for:`detectionSettings.motion.timeout`,class:`cui-label`},hu={class:`section-title mt-2`},gu={for:`detectionSettings.object.confidence`,class:`cui-label`},_u={for:`detectionSettings.object.timeout`,class:`cui-label`},vu={class:`flex items-center gap-4`},yu={class:`flex flex-col field-switch-gap`},bu={for:`detectionSettings.object.suppressStatic`,class:`cui-label-switch`},xu={class:`section-title mt-2`},Su={for:`detectionSettings.audio.confidence`,class:`cui-label`},Cu={for:`detectionSettings.audio.minDecibels`,class:`cui-label`},wu={for:`detectionSettings.audio.timeout`,class:`cui-label`},Tu={class:`section-title mt-2`},Eu={for:`detectionSettings.face.confidence`,class:`cui-label`},Du={class:`section-title mt-2`},Ou={for:`detectionSettings.licensePlate.confidence`,class:`cui-label`},ku={for:`detectionSettings.licensePlate.minLength`,class:`cui-label`},Au={class:`section-title mt-2`},ju={for:`detectionSettings.sensor.timeout`,class:`cui-label`},Mu={for:`detectionSettings.sensor.triggers`,class:`cui-label`},Nu={class:`text-color font-normal`},Pu={class:`w-full flex flex-col gap-6`},Fu={class:`flex items-center gap-4`},Iu={class:`flex flex-col field-switch-gap`},Lu={for:`recordingSettings.enabled`,class:`cui-label-switch`},Ru={for:`recordingSettings.mode`,class:`cui-label`},zu={for:`recordingSettings.preBuffer`,class:`cui-label`},Bu={for:`recordingSettings.sources`,class:`cui-label`},Vu={class:`text-color font-normal`},Hu={class:`w-full flex flex-col gap-4`},Uu={class:`flex items-center gap-4`},Wu={class:`flex flex-col field-switch-gap`},Gu={for:`ptzAutotrack.enabled`,class:`cui-label-switch`},Ku={class:`cui-label`},qu={class:`cui-label`},Ju={class:`cui-label`},Yu={class:`cui-label`},Xu={class:`cui-label`},Zu={class:`cui-label`},Qu={class:`flex items-center gap-4`},$u={class:`flex flex-col field-switch-gap`},ed={for:`ptzAutotrack.returnToHome`,class:`cui-label-switch`},td={class:`cui-label`},nd={class:`cui-label`},rd={class:`cui-label`},id={class:`flex flex-row items-center gap-3`},ad={class:`flex flex-col`},od={class:`cui-label-switch`},sd={key:0,class:`flex flex-row items-center gap-2`},cd={class:`cui-input-hint shrink-0`},ld={class:`text-color font-normal`},ud={class:`flex flex-col gap-6`},dd={class:`w-full flex flex-col gap-2`},fd={class:`flex items-center gap-4`},pd={class:`flex flex-col field-switch-gap`},md={for:`snapshotSettings.autoRefresh`,class:`cui-label-switch`},hd={for:`snapshotSettings.ttl`,class:`cui-label`},gd={for:`snapshotSettings.interval`,class:`cui-label`},_d={class:`text-color font-normal`},vd={class:`flex flex-col gap-4`},yd={key:0,class:`flex flex-col gap-2`},bd={class:`flex flex-col flex-1 min-w-0`},xd={class:`text-sm font-medium truncate`},Sd={class:`text-xs text-muted`},Cd={key:1,class:`text-sm text-muted text-center min-h-[30px]`},wd={class:`text-color font-normal`},Td={class:`flex flex-col gap-6`},Ed={for:`frameWorkerSettings.decoder.hardware`,class:`cui-label`},Dd={for:`frameWorkerSettings.decoder.device`,class:`cui-label`},Od={for:`frameWorkerSettings.workerDecoder`,class:`cui-label`},kd={for:`frameWorkerSettings.workerDecoder.device`,class:`cui-label`},Ad={class:`w-full flex flex-col gap-2`},jd={class:`flex items-center gap-4`},Md={class:`flex flex-col field-switch-gap`},Nd={for:`frameWorkerSettings.mainStreamAnalysis`,class:`cui-label-switch`},Pd=Dn({__name:`Settings`,props:an({camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:an([`close`],[`update:modelValue`]),setup(e,{emit:t}){let n=new Set(Object.entries(Wn).filter(([,e])=>e.cascadeTrigger&&!e.isDetectionType).map(([e])=>e)),i=new ft,a=new ft,o=e,c=t,l=bn(e,`modelValue`),u=Xn(),f=er(),m=Kt(),{t:h}=p(),{camera:g,cameraDevice:b,loading:x}=jn(o),{sensors:S}=s(b),{data:C,isBusy:w}=a.getRoomsQuery(),{data:T}=i.getCameraExtensionsQuery(l.value.name),{mutateAsync:te,isPending:ne}=i.removeCameraQuery(),{mutateAsync:E,isPending:re}=i.patchZoneConfigQuery(),ie=H([`camera`,`doorbell`]),ae=H([`auto`,`mse`,`webrtc`,`webrtc/tcp`]),oe=H([`high-resolution`,`mid-resolution`,`low-resolution`]),D=H([`16:9`,`9:16`,`8:3`,`4:3`,`1:1`]),se=H([`low`,`medium`,`high`]),O=H([`continuous`,`event`,`adhoc`]),ce=H([`high`,`mid`,`low`]),le=[{label:`Auto`,value:`auto`},{label:`CPU (Software)`,value:`cpu`},{label:`CUDA (NVIDIA)`,value:`cuda`},{label:`VAAPI (Intel/AMD)`,value:`vaapi`},{label:`Quick Sync (Intel)`,value:`qsv`},{label:`VideoToolbox (macOS)`,value:`videotoolbox`},{label:`D3D11VA (Windows)`,value:`d3d11va`},{label:`D3D12VA (Windows)`,value:`d3d12va`},{label:`DXVA2 (Windows)`,value:`dxva2`},{label:`Vulkan`,value:`vulkan`},{label:`OpenCL`,value:`opencl`},{label:`DRM`,value:`drm`},{label:`RKMPP (Rockchip)`,value:`rkmpp`}],ue={desktop:{maxWidth:`1280px`,width:`85vw`}},de=H([]),fe=K(()=>S.value.some(e=>e.type===v.PTZ)),pe=K(()=>{let e=l.value.frameWorkerSettings.decoder?.hardware;return!!e&&e!==`auto`&&e!==`cpu`}),me=K(()=>[{label:h(`components.form.label.decoder_same_as_server`),value:`inherit`},...le]),k=K(()=>{let e=l.value.frameWorkerSettings.workerDecoder?.hardware;return!!e&&e!==`auto`&&e!==`cpu`}),A=K(()=>(T.value??[]).some(e=>e.contract.interfaces?.includes(y.NVR))),he=K(()=>re.value),j=K(()=>g.value.zones??{motion:[],object:[],privacy:[],alert:[],lines:[]}),M=K(()=>[...j.value.motion.map((e,t)=>({kind:`motion`,index:t,name:e.name,color:e.color,typeLabel:h(`components.camera_options.zone_entry_motion`)})),...j.value.object.map((e,t)=>({kind:`object`,index:t,name:e.name,color:e.color,typeLabel:h(`components.camera_options.zone_entry_object`)})),...j.value.alert.map((e,t)=>({kind:`alert`,index:t,name:e.name,color:e.color,typeLabel:h(`components.camera_options.zone_entry_alert`)})),...j.value.privacy.map((e,t)=>({kind:`privacy`,index:t,name:e.name,color:`#333333`,typeLabel:h(`components.camera_options.zone_entry_privacy`)})),...j.value.lines.map((e,t)=>({kind:`lines`,index:t,name:e.name,color:e.color,typeLabel:h(`components.camera_options.zone_entry_line`)}))]),ge=K(()=>[{label:h(`components.automation_nodes.label_person`),value:`person`},{label:h(`components.automation_nodes.label_vehicle`),value:`vehicle`},{label:h(`components.automation_nodes.label_animal`),value:`animal`},{label:h(`components.automation_nodes.label_package`),value:`package`}]),_e=K(()=>!!l.value.ptzAutotrack?.activeHours);function ve(e){let t=l.value.ptzAutotrack?.activeHours?.[e];if(!t)return null;let[n,r]=t.split(`:`).map(Number),i=new Date;return i.setHours(n,r,0,0),i}function ye(e){let t=l.value.ptzAutotrack;t&&(t.activeHours=e?{from:`22:00`,to:`06:00`,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}:void 0)}function be(e,t){let n=l.value.ptzAutotrack?.activeHours;!n||!t||(n[e]=`${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}`,n.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone)}let xe=K(()=>S.value.filter(e=>n.has(e.type)).map(e=>({label:e.displayName.value,value:e.id}))),Se=K(()=>new Set(xe.value.map(e=>e.value))),N=K(()=>(l.value.detectionSettings.sensor?.triggers??[]).filter(e=>Se.value.has(e))),Ce=K(()=>{let e=C.value??[`Default`],t=new Set(e.map(e=>e.toLowerCase()));return[...e,...de.value.filter(e=>!t.has(e.toLowerCase()))].map(e=>({label:e===`Default`?h(`components.form.label.room_default`):e,value:e}))}),P=K(()=>x.value||ne.value);function we(e){let t=e===`auto`||e===`cpu`?``:l.value.frameWorkerSettings.decoder?.device??``;l.value.frameWorkerSettings.decoder={hardware:e,device:t}}function Te(e){let t=l.value.frameWorkerSettings.decoder?.hardware??`auto`;l.value.frameWorkerSettings.decoder={hardware:t,device:e}}function Ee(e){if(e===`inherit`){l.value.frameWorkerSettings.workerDecoder=void 0;return}let t=e===`auto`||e===`cpu`?``:l.value.frameWorkerSettings.workerDecoder?.device??``;l.value.frameWorkerSettings.workerDecoder={hardware:e,device:t}}function De(e){let t=l.value.frameWorkerSettings.workerDecoder?.hardware??`auto`;l.value.frameWorkerSettings.workerDecoder={hardware:t,device:e}}function Oe(e){let t=l.value.recordingSettings??{enabled:!0,mode:`continuous`,preBuffer:10,sources:[`high`,`mid`,`low`]};l.value.recordingSettings={...t,...e}}function ke(e){let t=(l.value.detectionSettings.sensor?.triggers??[]).filter(e=>!Se.value.has(e));l.value.detectionSettings.sensor||(l.value.detectionSettings.sensor={timeout:30,triggers:[]}),l.value.detectionSettings.sensor.triggers=[...t,...e]}function Ae(){m.openComponentDialog(pi,{data:{title:h(`components.dialog.title.create_room`),confirmText:h(`components.form.button.add`),contentProps:{}},onConfirm:e=>{if(!e)return;let t=Ce.value.find(t=>t.value.toLowerCase()===e.toLowerCase()),n=t?.value??e;t||de.value.push(n),l.value.room=n}})}function je(){m.openTextDialog({data:{title:h(`components.dialog.title.confirm`),confirmText:h(`components.form.button.remove`),contentText:h(`components.dialog.message.confirm_remove`),confirmButtonProps:{severity:`danger`}},onConfirm:async()=>{try{await te({cameraname:g.value.name}),u.path.includes(g.value.name)&&f.push({path:`/home`}),c(`close`)}catch{}}})}function Me(){m.openComponentDialog(Il,{data:{title:h(`components.zone_editor.edit_zones`),loading:P,contentProps:{cameraName:g.value.name,zones:j.value}},dialogSize:ue})}function Ne(){m.openComponentDialog(Tc,{data:{title:h(`components.form.label.aspect_ratio`),contentProps:{camera:g.value,current:l.value.interfaceSettings.aspectRatio,presets:D.value},confirmText:h(`components.form.button.apply`)},onConfirm:e=>{l.value.interfaceSettings.aspectRatio=e}})}function Pe(e){m.openComponentDialog(Il,{data:{title:h(`components.zone_editor.edit_zones`),loading:P,contentProps:{cameraName:g.value.name,zones:j.value,initialTab:e.kind,initialSelection:e.index}},dialogSize:ue})}function Fe(e){m.openTextDialog({data:{title:h(`components.camera_options.zone_entry_delete`),contentText:h(`components.camera_options.zone_entry_delete_confirm`),confirmText:h(`components.form.button.remove`),loading:he},onConfirm:async()=>{let t={...j.value,[e.kind]:j.value[e.kind].filter((t,n)=>n!==e.index)};await E({cameraname:g.value.name,zones:t})}})}return(e,t)=>{let n=lr,i=Ar,a=_,o=ur,s=br,c=fi,u=d,f=sr,p=xr,m=rr,h=hr,g=Sr,v=di,y=r,b=ti,x=ui,S=ir,C=ee;return I(),q(S,{multiple:``,class:`p-4`},{default:L(()=>[J(m,{value:`general`},{default:L(()=>[J(n,{class:`px-0 pt-0`},{default:L(()=>[z(`span`,Ll,B(e.$t(`components.camera_options.general`)),1)]),_:1}),J(p,{pt:{content:{class:`px-0`}}},{default:L(()=>[z(`div`,Rl,[J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.camera_options.general_hint`)),1)]),_:1}),J(G($),{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:L(({field:t,errors:n})=>[z(`label`,zl,B(e.$t(`components.form.label.name`)),1),J(o,null,{default:L(()=>[J(a,Ln(t,{invalid:n.length>0,loading:G(P),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`name`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),J(G($),{"model-value":l.value.room,name:`room`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,Bl,B(e.$t(`components.form.label.room`)),1),z(`div`,Vl,[J(s,{"model-value":l.value.room,options:G(Ce),"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:G(w),class:`w-full`,"onUpdate:modelValue":t[1]||=e=>l.value.room=e},null,8,[`model-value`,`options`,`invalid`,`loading`]),Sn((I(),q(u,{severity:`secondary`,outlined:``,class:`shrink-0 h-[42px] w-[42px] p-0`,onClick:Ae},{icon:L(()=>[J(c,{class:`w-4 h-4`})]),_:1})),[[C,e.$t(`components.form.button.create_room`),void 0,{top:!0}]])]),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.room`)),1)]),_:1}))]),_:1},8,[`model-value`]),J(G($),{"model-value":l.value.type,name:`type`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,Hl,B(e.$t(`components.form.label.type`)),1),J(o,null,{default:L(()=>[J(s,{"model-value":l.value.type,options:G(ie),invalid:n.length>0,loading:G(P),type:`text`,onValueChange:t[2]||=e=>l.value.type=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`type`,class:`cui-input-error`})]),_:1})]),_:1},8,[`model-value`]),z(`div`,Ul,[J(G($),{"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:L(({field:n,errors:r})=>[z(`div`,Wl,[z(`div`,Gl,[z(`label`,Kl,B(e.$t(`components.form.label.disabled`)),1),J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.disable_camera`)),1)]),_:1}),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`disabled`,class:`cui-input-switch-error`})]),_:1})]),J(f,Ln({"model-value":l.value.disabled},n,{invalid:r.length>0,loading:G(P),class:`ml-auto shrink-0`,onValueChange:t[3]||=e=>l.value.disabled=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),J(u,{fluid:``,severity:`danger`,loading:G(P),class:`cui-button-medium`,label:e.$t(`components.form.button.remove`),onClick:t[4]||=e=>je()},null,8,[`loading`,`label`])])]),_:1})]),_:1}),J(m,{value:`branding`},{default:L(()=>[J(n,{class:`px-0`},{default:L(()=>[z(`span`,ql,B(e.$t(`components.camera_options.branding`)),1)]),_:1}),J(p,{pt:{content:{class:`px-0`}}},{default:L(()=>[z(`div`,Jl,[J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.camera_options.branding_hint`)),1)]),_:1}),J(G($),{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:L(({field:t,errors:n})=>[z(`label`,Yl,B(e.$t(`components.form.label.manufacturer`)),1),J(o,null,{default:L(()=>[J(a,Ln(t,{invalid:n.length>0,loading:G(P),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`info.manufacturer`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),J(G($),{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:L(({field:t,errors:n})=>[z(`label`,Xl,B(e.$t(`components.form.label.model`)),1),J(o,null,{default:L(()=>[J(a,Ln(t,{invalid:n.length>0,loading:G(P),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`info.model`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),J(G($),{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:L(({field:t,errors:n})=>[z(`label`,Zl,B(e.$t(`components.form.label.hardware_version`)),1),J(o,null,{default:L(()=>[J(a,Ln(t,{invalid:n.length>0,loading:G(P),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`info.hardware`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),J(G($),{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:L(({field:t,errors:n})=>[z(`label`,Ql,B(e.$t(`components.form.label.serial_number`)),1),J(o,null,{default:L(()=>[J(a,Ln(t,{invalid:n.length>0,loading:G(P),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`info.serialNumber`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),J(G($),{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:L(({field:t,errors:n})=>[z(`label`,$l,B(e.$t(`components.form.label.firmware_version`)),1),J(o,null,{default:L(()=>[J(a,Ln(t,{invalid:n.length>0,loading:G(P),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`info.firmwareVersion`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),J(G($),{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:L(({field:t,errors:n})=>[z(`label`,eu,B(e.$t(`components.form.label.support_url`)),1),J(o,null,{default:L(()=>[J(a,Ln(t,{invalid:n.length>0,loading:G(P),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`info.supportUrl`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`])])]),_:1})]),_:1}),J(m,{value:`interface`},{default:L(()=>[J(n,{class:`px-0`},{default:L(()=>[z(`span`,tu,B(e.$t(`components.camera_options.interface`)),1)]),_:1}),J(p,{pt:{content:{class:`px-0`}}},{default:L(()=>[z(`div`,nu,[J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.camera_options.interface_hint`)),1)]),_:1}),J(G($),{"model-value":l.value.interfaceSettings.streamingMode,name:`interfaceSettings.streamingMode`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,ru,B(e.$t(`components.form.label.streaming_mode`)),1),J(o,null,{default:L(()=>[J(s,{"model-value":l.value.interfaceSettings.streamingMode,options:G(ae),invalid:n.length>0,loading:G(P),type:`text`,onValueChange:t[11]||=e=>l.value.interfaceSettings.streamingMode=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`interfaceSettings.streamingMode`,class:`cui-input-error`})]),_:1}),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.streaming_mode`)),1)]),_:1}))]),_:1},8,[`model-value`]),J(G($),{"model-value":l.value.interfaceSettings.streamingSource,name:`interfaceSettings.streamingSource`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,iu,B(e.$t(`components.form.label.streaming_source`)),1),J(o,null,{default:L(()=>[J(s,{"model-value":l.value.interfaceSettings.streamingSource,options:G(oe),invalid:n.length>0,loading:G(P),type:`text`,onValueChange:t[12]||=e=>l.value.interfaceSettings.streamingSource=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`interfaceSettings.streamingSource`,class:`cui-input-error`})]),_:1}),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.streaming_source`)),1)]),_:1}))]),_:1},8,[`model-value`]),J(G($),{"model-value":l.value.interfaceSettings.aspectRatio,name:`interfaceSettings.aspectRatio`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:t})=>[z(`label`,au,B(e.$t(`components.form.label.aspect_ratio`)),1),J(o,null,{default:L(()=>[J(a,{"model-value":l.value.interfaceSettings.aspectRatio,invalid:t.length>0,readonly:``,tabindex:`-1`,class:`cursor-pointer`,onClick:Ne},null,8,[`model-value`,`invalid`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`interfaceSettings.aspectRatio`,class:`cui-input-error`})]),_:1}),t.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.aspect_ratio`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),J(m,{value:`detection`},{default:L(()=>[J(n,{class:`px-0`},{default:L(()=>[z(`span`,ou,B(e.$t(`components.camera_options.detection`)),1)]),_:1}),J(p,{pt:{content:{class:`px-0`}}},{default:L(()=>[z(`div`,su,[J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.camera_options.detection_hint`)),1)]),_:1}),z(`div`,cu,[J(G($),{"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:L(({field:n,errors:r})=>[z(`div`,lu,[z(`div`,uu,[z(`label`,du,B(e.$t(`components.form.label.snooze`)),1),J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.snooze_camera`)),1)]),_:1}),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`detectionSettings.snooze`,class:`cui-input-switch-error`})]),_:1})]),J(f,Ln({"model-value":l.value.detectionSettings?.snooze},n,{invalid:r.length>0,loading:G(P),class:`ml-auto shrink-0`,onValueChange:t[13]||=e=>{l.value.detectionSettings&&(l.value.detectionSettings.snooze=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),z(`span`,fu,B(e.$t(`components.camera_options.sensor_type_motion`)),1),J(G($),{"model-value":l.value.detectionSettings.motion.resolution,name:`detectionSettings.motion.resolution`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,pu,B(e.$t(`components.form.label.motion_resolution`)),1),J(o,null,{default:L(()=>[J(s,{"model-value":l.value.detectionSettings.motion.resolution,options:G(se),invalid:n.length>0,loading:G(P),type:`text`,onValueChange:t[14]||=e=>l.value.detectionSettings.motion.resolution=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`detectionSettings.motion.resolution`,class:`cui-input-error`})]),_:1}),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.motion_resolution`)),1)]),_:1}))]),_:1},8,[`model-value`]),J(G($),{"model-value":l.value.detectionSettings.motion.timeout,name:`detectionSettings.motion.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,mu,B(e.$t(`components.form.label.motion_timeout`)),1),J(o,null,{default:L(()=>[J(h,{"model-value":l.value.detectionSettings.motion.timeout,invalid:n.length>0,loading:G(P),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[15]||=e=>l.value.detectionSettings.motion.timeout=e??void 0,onInput:t[16]||=e=>l.value.detectionSettings.motion.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`detectionSettings.motion.timeout`,class:`cui-input-error`})]),_:1}),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.motion_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),z(`span`,hu,B(e.$t(`components.camera_options.sensor_type_object`)),1),J(G($),{"model-value":l.value.detectionSettings.object.confidence,name:`detectionSettings.object.confidence`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,gu,B(e.$t(`components.form.label.confidence`)),1),J(o,null,{default:L(()=>[J(h,{"model-value":l.value.detectionSettings.object.confidence,invalid:n.length>0,loading:G(P),"show-buttons":``,step:.01,"max-fraction-digits":2,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[17]||=e=>l.value.detectionSettings.object.confidence=e??void 0,onInput:t[18]||=e=>l.value.detectionSettings.object.confidence=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`detectionSettings.object.confidence`,class:`cui-input-error`})]),_:1}),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),J(G($),{"model-value":l.value.detectionSettings.object.timeout??15,name:`detectionSettings.object.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,_u,B(e.$t(`components.form.label.object_timeout`)),1),J(o,null,{default:L(()=>[J(h,{"model-value":l.value.detectionSettings.object.timeout??15,invalid:n.length>0,loading:G(P),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[19]||=e=>l.value.detectionSettings.object.timeout=e??void 0,onInput:t[20]||=e=>l.value.detectionSettings.object.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`detectionSettings.object.timeout`,class:`cui-input-error`})]),_:1}),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.object_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),J(G($),{"model-value":l.value.detectionSettings.object.suppressStatic??!0,value:!0,"unchecked-value":!1,type:`checkbox`,name:`detectionSettings.object.suppressStatic`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:L(({field:n,errors:r})=>[z(`div`,vu,[z(`div`,yu,[z(`label`,bu,B(e.$t(`components.form.label.suppress_static`)),1),J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.suppress_static`)),1)]),_:1}),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`detectionSettings.object.suppressStatic`,class:`cui-input-switch-error`})]),_:1})]),J(f,Ln({"model-value":l.value.detectionSettings.object.suppressStatic??!0},n,{invalid:r.length>0,loading:G(P),class:`ml-auto shrink-0`,onValueChange:t[21]||=e=>l.value.detectionSettings.object.suppressStatic=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),z(`span`,xu,B(e.$t(`components.camera_options.sensor_type_audio`)),1),J(G($),{"model-value":l.value.detectionSettings.audio.confidence,name:`detectionSettings.audio.confidence`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,Su,B(e.$t(`components.form.label.audio_confidence`)),1),J(o,null,{default:L(()=>[J(h,{"model-value":l.value.detectionSettings.audio.confidence,invalid:n.length>0,loading:G(P),"show-buttons":``,step:.05,"max-fraction-digits":2,min:0,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[22]||=e=>l.value.detectionSettings.audio.confidence=e??void 0,onInput:t[23]||=e=>l.value.detectionSettings.audio.confidence=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`detectionSettings.audio.confidence`,class:`cui-input-error`})]),_:1}),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.audio_confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),J(G($),{"model-value":l.value.detectionSettings.audio.minDecibels,name:`detectionSettings.audio.minDecibels`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,Cu,B(e.$t(`components.form.label.audio_min_decibels`)),1),J(o,null,{default:L(()=>[J(h,{"model-value":l.value.detectionSettings.audio.minDecibels,invalid:n.length>0,loading:G(P),"show-buttons":``,step:1,min:-100,max:0,mode:`decimal`,"use-grouping":!1,onValueChange:t[24]||=e=>l.value.detectionSettings.audio.minDecibels=e??void 0,onInput:t[25]||=e=>l.value.detectionSettings.audio.minDecibels=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`detectionSettings.audio.minDecibels`,class:`cui-input-error`})]),_:1}),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.audio_min_decibels`)),1)]),_:1}))]),_:1},8,[`model-value`]),J(G($),{"model-value":l.value.detectionSettings.audio.timeout,name:`detectionSettings.audio.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,wu,B(e.$t(`components.form.label.audio_timeout`)),1),J(o,null,{default:L(()=>[J(h,{"model-value":l.value.detectionSettings.audio.timeout,invalid:n.length>0,loading:G(P),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[26]||=e=>l.value.detectionSettings.audio.timeout=e??void 0,onInput:t[27]||=e=>l.value.detectionSettings.audio.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`detectionSettings.audio.timeout`,class:`cui-input-error`})]),_:1}),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.audio_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),z(`span`,Tu,B(e.$t(`components.camera_options.sensor_type_face`)),1),J(G($),{"model-value":l.value.detectionSettings.face?.confidence,name:`detectionSettings.face.confidence`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,Eu,B(e.$t(`components.form.label.face_confidence`)),1),J(o,null,{default:L(()=>[J(h,{"model-value":l.value.detectionSettings.face?.confidence,invalid:n.length>0,loading:G(P),"show-buttons":``,step:.01,"max-fraction-digits":2,min:0,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[28]||=e=>l.value.detectionSettings.face={confidence:e??void 0},onInput:t[29]||=e=>l.value.detectionSettings.face={confidence:e.value??void 0}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`detectionSettings.face.confidence`,class:`cui-input-error`})]),_:1}),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.face_confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),z(`span`,Du,B(e.$t(`components.camera_options.sensor_type_licensePlate`)),1),J(G($),{"model-value":l.value.detectionSettings.licensePlate?.confidence,name:`detectionSettings.licensePlate.confidence`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,Ou,B(e.$t(`components.form.label.plate_confidence`)),1),J(o,null,{default:L(()=>[J(h,{"model-value":l.value.detectionSettings.licensePlate?.confidence,invalid:n.length>0,loading:G(P),"show-buttons":``,step:.01,"max-fraction-digits":2,min:0,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[30]||=e=>l.value.detectionSettings.licensePlate={...l.value.detectionSettings.licensePlate,confidence:e??void 0},onInput:t[31]||=e=>l.value.detectionSettings.licensePlate={...l.value.detectionSettings.licensePlate,confidence:e.value??void 0}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`detectionSettings.licensePlate.confidence`,class:`cui-input-error`})]),_:1}),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.plate_confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),J(G($),{"model-value":l.value.detectionSettings.licensePlate?.minLength,name:`detectionSettings.licensePlate.minLength`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,ku,B(e.$t(`components.form.label.plate_min_length`)),1),J(o,null,{default:L(()=>[J(h,{"model-value":l.value.detectionSettings.licensePlate?.minLength,invalid:n.length>0,loading:G(P),"show-buttons":``,step:1,min:1,max:10,"use-grouping":!1,onValueChange:t[32]||=e=>l.value.detectionSettings.licensePlate={...l.value.detectionSettings.licensePlate,minLength:e??void 0},onInput:t[33]||=e=>l.value.detectionSettings.licensePlate={...l.value.detectionSettings.licensePlate,minLength:e.value??void 0}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`detectionSettings.licensePlate.minLength`,class:`cui-input-error`})]),_:1}),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.plate_min_length`)),1)]),_:1}))]),_:1},8,[`model-value`]),z(`span`,Au,B(e.$t(`components.camera_options.sensors`)),1),J(G($),{"model-value":l.value.detectionSettings.sensor?.timeout,name:`detectionSettings.sensor.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,ju,B(e.$t(`components.form.label.sensor_timeout`)),1),J(o,null,{default:L(()=>[J(h,{"model-value":l.value.detectionSettings.sensor?.timeout,invalid:n.length>0,loading:G(P),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[34]||=e=>{l.value.detectionSettings.sensor||(l.value.detectionSettings.sensor={timeout:30,triggers:[]}),l.value.detectionSettings.sensor.timeout=e??30},onInput:t[35]||=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),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`detectionSettings.sensor.timeout`,class:`cui-input-error`})]),_:1}),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.sensor_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),J(G($),{"model-value":l.value.detectionSettings.sensor?.triggers??[],name:`detectionSettings.sensor.triggers`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:t})=>[z(`label`,Mu,B(e.$t(`components.form.label.sensor_triggers`)),1),J(g,{"model-value":G(N),invalid:t.length>0,options:G(xe),"option-label":`label`,"option-value":`value`,placeholder:e.$t(`components.form.hint.sensor_triggers_placeholder`),class:`w-full`,"show-toggle-all":!1,"onUpdate:modelValue":ke},null,8,[`model-value`,`invalid`,`options`,`placeholder`]),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`detectionSettings.sensor.triggers`,class:`cui-input-error`})]),_:1}),t.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.sensor_triggers`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),J(m,{value:`recording`},{default:L(()=>[J(n,{class:`px-0`},{default:L(()=>[z(`span`,Nu,B(e.$t(`components.camera_options.recording`)),1)]),_:1}),J(p,{pt:{content:{class:`px-0`}}},{default:L(()=>[z(`div`,Pu,[J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.camera_options.recording_hint`)),1)]),_:1}),G(A)?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-banner cui-banner-warn`},{default:L(()=>[J(v,{class:`w-4 h-4 shrink-0 inline-block mr-1`}),W(` `+B(e.$t(`components.camera_options.recording_requires`)),1)]),_:1})),J(G($),{"model-value":l.value.recordingSettings?.enabled??!0,value:!0,"unchecked-value":!1,type:`checkbox`,name:`recordingSettings.enabled`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:L(({field:n,errors:r})=>[z(`div`,Fu,[z(`div`,Iu,[z(`label`,Lu,B(e.$t(`components.form.label.recording_enabled`)),1),J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.recording_enabled`)),1)]),_:1}),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`recordingSettings.enabled`,class:`cui-input-switch-error`})]),_:1})]),J(f,Ln({"model-value":l.value.recordingSettings?.enabled??!0},n,{invalid:r.length>0,loading:G(P),class:`ml-auto shrink-0`,onValueChange:t[36]||=e=>Oe({enabled:e})}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),l.value.recordingSettings?.enabled??!0?(I(),V(U,{key:1},[J(G($),{"model-value":l.value.recordingSettings?.mode,name:`recordingSettings.mode`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,Ru,B(e.$t(`components.form.label.recording_mode`)),1),J(o,null,{default:L(()=>[J(s,{"model-value":l.value.recordingSettings?.mode??`continuous`,options:G(O),invalid:n.length>0,loading:G(P),type:`text`,onValueChange:t[37]||=e=>Oe({mode:e})},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`recordingSettings.mode`,class:`cui-input-error`})]),_:1}),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.recording_mode`)),1)]),_:1}))]),_:1},8,[`model-value`]),l.value.recordingSettings?.mode===`event`?(I(),q(G($),{key:0,"model-value":l.value.recordingSettings?.preBuffer,name:`recordingSettings.preBuffer`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,zu,B(e.$t(`components.form.label.recording_prebuffer`)),1),J(o,null,{default:L(()=>[J(h,{"model-value":l.value.recordingSettings?.preBuffer??10,invalid:n.length>0,loading:G(P),"show-buttons":``,step:1,min:0,max:60,"use-grouping":!1,onValueChange:t[38]||=e=>Oe({preBuffer:e??10}),onInput:t[39]||=e=>Oe({preBuffer:e.value??10})},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`recordingSettings.preBuffer`,class:`cui-input-error`})]),_:1}),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.recording_prebuffer`)),1)]),_:1}))]),_:1},8,[`model-value`])):Z(``,!0),J(G($),{"model-value":l.value.recordingSettings?.sources,name:`recordingSettings.sources`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,Bu,B(e.$t(`components.form.label.recording_sources`)),1),J(g,{"model-value":l.value.recordingSettings?.sources??[`high`,`mid`,`low`],invalid:n.length>0,options:G(ce),class:`w-full`,"show-toggle-all":!1,"onUpdate:modelValue":t[40]||=e=>Oe({sources:e})},null,8,[`model-value`,`invalid`,`options`]),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`recordingSettings.sources`,class:`cui-input-error`})]),_:1}),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.recording_sources`)),1)]),_:1}))]),_:1},8,[`model-value`])],64)):Z(``,!0)])]),_:1})]),_:1}),J(m,{value:`ptzAutotrack`},{default:L(()=>[J(n,{class:`px-0`},{default:L(()=>[z(`span`,Vu,B(e.$t(`components.camera_options.ptz_autotrack`)),1)]),_:1}),J(p,{pt:{content:{class:`px-0`}}},{default:L(()=>[z(`div`,Hu,[J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.camera_options.ptz_autotrack_hint`)),1)]),_:1}),G(fe)?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-banner cui-banner-warn`},{default:L(()=>[J(v,{class:`w-4 h-4 shrink-0 inline-block mr-1`}),W(` `+B(e.$t(`components.form.hint.ptz_autotrack_requires`)),1)]),_:1})),J(G($),{"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:L(({field:n,errors:r})=>[z(`div`,Uu,[z(`div`,Wu,[z(`label`,Gu,B(e.$t(`components.form.label.ptz_autotrack_enabled`)),1),J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.ptz_autotrack`)),1)]),_:1}),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`ptzAutotrack.enabled`,class:`cui-input-switch-error`})]),_:1})]),J(f,Ln({"model-value":l.value.ptzAutotrack?.enabled},n,{invalid:r.length>0,loading:G(P),class:`ml-auto shrink-0`,onValueChange:t[41]||=e=>{l.value.ptzAutotrack&&(l.value.ptzAutotrack.enabled=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),l.value.ptzAutotrack?.enabled?(I(),V(U,{key:1},[J(G($),{"model-value":l.value.ptzAutotrack?.targetLabels,name:`ptzAutotrack.targetLabels`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,Ku,B(e.$t(`components.form.label.ptz_autotrack_target_labels`)),1),J(g,{"model-value":l.value.ptzAutotrack?.targetLabels,options:G(ge),"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:G(P),class:`w-full`,onValueChange:t[42]||=e=>{l.value.ptzAutotrack&&(l.value.ptzAutotrack.targetLabels=e)}},null,8,[`model-value`,`options`,`invalid`,`loading`]),J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.ptz_autotrack_target_labels`)),1)]),_:1})]),_:1},8,[`model-value`]),J(G($),{"model-value":l.value.ptzAutotrack?.minConfidence,name:`ptzAutotrack.minConfidence`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,qu,B(e.$t(`components.form.label.ptz_autotrack_min_confidence`)),1),J(h,{"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:G(P),class:`w-full`,onValueChange:t[43]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.minConfidence=e)}},null,8,[`model-value`,`invalid`,`loading`]),J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.ptz_autotrack_min_confidence`)),1)]),_:1})]),_:1},8,[`model-value`]),J(G($),{"model-value":l.value.ptzAutotrack?.triggerDeadZone,name:`ptzAutotrack.triggerDeadZone`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,Ju,B(e.$t(`components.form.label.ptz_autotrack_trigger_dead_zone`)),1),J(h,{"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:G(P),class:`w-full`,onValueChange:t[44]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.triggerDeadZone=e)}},null,8,[`model-value`,`invalid`,`loading`]),J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.ptz_autotrack_trigger_dead_zone`)),1)]),_:1})]),_:1},8,[`model-value`]),J(G($),{"model-value":l.value.ptzAutotrack?.trackingSpeed??2,name:`ptzAutotrack.trackingSpeed`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,Yu,B(e.$t(`components.form.label.ptz_autotrack_tracking_speed`)),1),J(h,{"model-value":l.value.ptzAutotrack?.trackingSpeed??2,min:1,max:5,step:.5,"min-fraction-digits":1,"max-fraction-digits":1,invalid:n.length>0,loading:G(P),class:`w-full`,onValueChange:t[45]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.trackingSpeed=e)}},null,8,[`model-value`,`invalid`,`loading`]),J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.ptz_autotrack_tracking_speed`)),1)]),_:1})]),_:1},8,[`model-value`]),J(G($),{"model-value":l.value.ptzAutotrack?.leadMs??1800,name:`ptzAutotrack.leadMs`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,Xu,B(e.$t(`components.form.label.ptz_autotrack_lead_ms`)),1),J(h,{"model-value":l.value.ptzAutotrack?.leadMs??1800,min:0,max:4e3,step:100,invalid:n.length>0,loading:G(P),class:`w-full`,onValueChange:t[46]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.leadMs=e)}},null,8,[`model-value`,`invalid`,`loading`]),J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.ptz_autotrack_lead_ms`)),1)]),_:1})]),_:1},8,[`model-value`]),J(G($),{"model-value":l.value.ptzAutotrack?.panRate??.85,name:`ptzAutotrack.panRate`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,Zu,B(e.$t(`components.form.label.ptz_autotrack_pan_rate`)),1),J(h,{"model-value":l.value.ptzAutotrack?.panRate??.85,min:.1,max:3,step:.05,"min-fraction-digits":2,"max-fraction-digits":2,invalid:n.length>0,loading:G(P),class:`w-full`,onValueChange:t[47]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.panRate=e)}},null,8,[`model-value`,`invalid`,`loading`]),J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.ptz_autotrack_pan_rate`)),1)]),_:1})]),_:1},8,[`model-value`]),J(G($),{"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:L(({field:n,errors:r})=>[z(`div`,Qu,[z(`div`,$u,[z(`label`,ed,B(e.$t(`components.form.label.ptz_autotrack_return_home`)),1),J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.ptz_autotrack_return_home`)),1)]),_:1}),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`ptzAutotrack.returnToHome`,class:`cui-input-switch-error`})]),_:1})]),J(f,Ln({"model-value":l.value.ptzAutotrack?.returnToHome},n,{invalid:r.length>0,loading:G(P),class:`ml-auto shrink-0`,onValueChange:t[48]||=e=>{l.value.ptzAutotrack&&(l.value.ptzAutotrack.returnToHome=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),l.value.ptzAutotrack?.returnToHome?(I(),q(G($),{key:0,"model-value":l.value.ptzAutotrack?.homeWaitMs,name:`ptzAutotrack.homeWaitMs`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,td,B(e.$t(`components.form.label.ptz_autotrack_home_wait`)),1),J(h,{"model-value":(l.value.ptzAutotrack?.homeWaitMs??0)/1e3,min:1,max:60,step:1,suffix:` s`,invalid:n.length>0,loading:G(P),class:`w-full`,onValueChange:t[49]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.homeWaitMs=e*1e3)}},null,8,[`model-value`,`invalid`,`loading`]),J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.ptz_autotrack_home_wait`)),1)]),_:1})]),_:1},8,[`model-value`])):Z(``,!0),J(G($),{"model-value":l.value.ptzAutotrack?.minTargetSize,name:`ptzAutotrack.minTargetSize`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,nd,B(e.$t(`components.form.label.ptz_autotrack_min_target_size`)),1),J(h,{"model-value":Math.round((l.value.ptzAutotrack?.minTargetSize??0)*100),min:0,max:50,step:1,suffix:` %`,invalid:n.length>0,loading:G(P),class:`w-full`,onValueChange:t[50]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.minTargetSize=e/100)}},null,8,[`model-value`,`invalid`,`loading`]),J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.ptz_autotrack_min_target_size`)),1)]),_:1})]),_:1},8,[`model-value`]),J(G($),{"model-value":l.value.ptzAutotrack?.maxTargetSize,name:`ptzAutotrack.maxTargetSize`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,rd,B(e.$t(`components.form.label.ptz_autotrack_max_target_size`)),1),J(h,{"model-value":Math.round((l.value.ptzAutotrack?.maxTargetSize??0)*100),min:0,max:100,step:1,suffix:` %`,invalid:n.length>0,loading:G(P),class:`w-full`,onValueChange:t[51]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.maxTargetSize=e/100)}},null,8,[`model-value`,`invalid`,`loading`]),J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.ptz_autotrack_max_target_size`)),1)]),_:1})]),_:1},8,[`model-value`]),J(G($),{"model-value":G(_e),name:`ptzAutotrack.activeHours`,as:`div`,class:`flex flex-col field-gap`},{default:L(()=>[z(`div`,id,[z(`div`,ad,[z(`label`,od,B(e.$t(`components.form.label.ptz_autotrack_active_hours`)),1),J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.ptz_autotrack_active_hours`)),1)]),_:1})]),J(f,{"model-value":G(_e),loading:G(P),class:`ml-auto shrink-0`,onValueChange:ye},null,8,[`model-value`,`loading`])]),G(_e)?(I(),V(`div`,sd,[J(y,{"model-value":ve(`from`),"time-only":``,fluid:``,loading:G(P),"onUpdate:modelValue":t[52]||=e=>be(`from`,e)},null,8,[`model-value`,`loading`]),z(`span`,cd,B(e.$t(`components.form.label.until`)),1),J(y,{"model-value":ve(`to`),"time-only":``,fluid:``,loading:G(P),"onUpdate:modelValue":t[53]||=e=>be(`to`,e)},null,8,[`model-value`,`loading`])])):Z(``,!0)]),_:1},8,[`model-value`])],64)):Z(``,!0)])]),_:1})]),_:1}),J(m,{value:`snapshot`},{default:L(()=>[J(n,{class:`px-0`},{default:L(()=>[z(`span`,ld,B(e.$t(`components.camera_options.snapshot`)),1)]),_:1}),J(p,{pt:{content:{class:`px-0`}}},{default:L(()=>[z(`div`,ud,[J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.camera_options.snapshot_hint`)),1)]),_:1}),z(`div`,dd,[J(G($),{"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:L(({field:n,errors:r})=>[z(`div`,fd,[z(`div`,pd,[z(`label`,md,B(e.$t(`components.form.label.auto_refresh`)),1),J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.auto_refresh`)),1)]),_:1}),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`snapshotSettings.autoRefresh`,class:`cui-input-switch-error`})]),_:1})]),J(f,Ln({"model-value":l.value.snapshotSettings.autoRefresh},n,{invalid:r.length>0,loading:G(P),class:`ml-auto shrink-0`,onValueChange:t[54]||=e=>l.value.snapshotSettings.autoRefresh=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),J(G($),{"model-value":l.value.snapshotSettings.ttl,name:`snapshotSettings.ttl`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,hd,B(e.$t(`components.form.label.cache_time`)),1),J(o,null,{default:L(()=>[J(h,{"model-value":l.value.snapshotSettings.ttl,invalid:n.length>0,loading:G(P),min:10,"show-buttons":``,"use-grouping":!1,onValueChange:t[55]||=e=>l.value.snapshotSettings.ttl=e??10,onInput:t[56]||=e=>l.value.snapshotSettings.ttl=e.value??10},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`snapshotSettings.ttl`,class:`cui-input-error`})]),_:1}),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.cache_time`)),1)]),_:1}))]),_:1},8,[`model-value`]),J(G($),{"model-value":l.value.snapshotSettings.interval,name:`snapshotSettings.interval`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,gd,B(e.$t(`components.form.label.refresh_interval`)),1),J(o,null,{default:L(()=>[J(h,{"model-value":l.value.snapshotSettings.interval,invalid:n.length>0,loading:G(P),min:10,max:60,"show-buttons":``,"use-grouping":!1,onValueChange:t[57]||=e=>l.value.snapshotSettings.interval=e??30,onInput:t[58]||=e=>l.value.snapshotSettings.interval=e.value??30},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`snapshotSettings.interval`,class:`cui-input-error`})]),_:1}),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.refresh_interval`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),J(m,{value:`zones`},{default:L(()=>[J(n,{class:`px-0`},{default:L(()=>[z(`span`,_d,B(e.$t(`components.camera_options.zones`)),1)]),_:1}),J(p,{pt:{content:{class:`px-0`}}},{default:L(()=>[z(`div`,vd,[J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.camera_options.zones_hint`)),1)]),_:1}),G(M).length?(I(),V(`div`,yd,[(I(!0),V(U,null,F(G(M),t=>(I(),V(`div`,{key:`${t.kind}-${t.index}`,class:`flex items-center gap-2 p-2 rounded-md border-color`},[z(`span`,{class:`w-2.5 h-2.5 rounded-full shrink-0`,style:zn({background:t.color})},null,4),z(`div`,bd,[z(`span`,xd,B(t.name),1),z(`span`,Sd,B(t.typeLabel),1)]),Sn((I(),q(u,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-sm shrink-0`,onClick:e=>Pe(t)},{icon:L(()=>[J(b,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[C,e.$t(`components.zone_editor.edit_zones`),void 0,{top:!0}]]),Sn((I(),q(u,{text:``,rounded:``,severity:`danger`,class:`cui-icon-sm shrink-0`,onClick:e=>Fe(t)},{icon:L(()=>[J(x,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[C,e.$t(`components.camera_options.zone_entry_delete`),void 0,{top:!0}]])]))),128))])):(I(),V(`span`,Cd,B(e.$t(`components.camera_options.zones_empty`)),1)),J(u,{fluid:``,class:`cui-button-medium`,loading:G(P),label:e.$t(`components.form.button.edit_zones`),onClick:t[59]||=e=>Me()},null,8,[`loading`,`label`])])]),_:1})]),_:1}),J(m,{value:`frameworker`},{default:L(()=>[J(n,{class:`px-0`},{default:L(()=>[z(`span`,wd,B(e.$t(`components.camera_options.frame_worker`)),1)]),_:1}),J(p,{pt:{content:{class:`px-0`}}},{default:L(()=>[z(`div`,Td,[J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.camera_options.frame_worker_hint`)),1)]),_:1}),J(G($),{"model-value":l.value.frameWorkerSettings.decoder?.hardware??`auto`,name:`frameWorkerSettings.decoder.hardware`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,Ed,B(e.$t(`components.form.label.decoder_hardware`)),1),J(o,null,{default:L(()=>[J(s,{"model-value":l.value.frameWorkerSettings.decoder?.hardware??`auto`,options:le,"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:G(P),"onUpdate:modelValue":t[60]||=e=>we(e)},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.decoder_hardware`)),1)]),_:1}))]),_:1},8,[`model-value`]),G(pe)?(I(),q(G($),{key:0,"model-value":l.value.frameWorkerSettings.decoder?.device??``,name:`frameWorkerSettings.decoder.device`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,Dd,B(e.$t(`components.form.label.decoder_device`)),1),J(o,null,{default:L(()=>[J(a,{"model-value":l.value.frameWorkerSettings.decoder?.device??``,invalid:n.length>0,loading:G(P),type:`text`,"onUpdate:modelValue":t[61]||=e=>Te(e??``)},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.decoder_device`)),1)]),_:1}))]),_:1},8,[`model-value`])):Z(``,!0),J(G($),{"model-value":l.value.frameWorkerSettings.workerDecoder??null,name:`frameWorkerSettings.workerDecoder`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:n})=>[z(`label`,Od,B(e.$t(`components.form.label.worker_decoder_hardware`)),1),J(o,null,{default:L(()=>[J(s,{"model-value":l.value.frameWorkerSettings.workerDecoder?.hardware??`inherit`,options:G(me),"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:G(P),"onUpdate:modelValue":t[62]||=e=>Ee(e)},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.worker_decoder_hardware`)),1)]),_:1})),G(k)?(I(),V(U,{key:1},[z(`label`,kd,B(e.$t(`components.form.label.worker_decoder_device`)),1),J(o,null,{default:L(()=>[J(a,{"model-value":l.value.frameWorkerSettings.workerDecoder?.device??``,invalid:n.length>0,loading:G(P),type:`text`,"onUpdate:modelValue":t[63]||=e=>De(e??``)},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),n.length?Z(``,!0):(I(),q(i,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.decoder_device`)),1)]),_:1}))],64)):Z(``,!0)]),_:1},8,[`model-value`]),z(`div`,Ad,[J(G($),{"model-value":l.value.frameWorkerSettings.mainStreamAnalysis,value:!0,"unchecked-value":!1,type:`checkbox`,name:`frameWorkerSettings.mainStreamAnalysis`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:L(({field:n,errors:r})=>[z(`div`,jd,[z(`div`,Md,[z(`label`,Nd,B(e.$t(`components.form.label.main_stream_analysis`)),1),J(i,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.main_stream_analysis`)),1)]),_:1}),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`frameWorkerSettings.mainStreamAnalysis`,class:`cui-input-switch-error`})]),_:1})]),J(f,Ln({"model-value":l.value.frameWorkerSettings.mainStreamAnalysis},n,{invalid:r.length>0,loading:G(P),class:`ml-auto shrink-0`,onValueChange:t[64]||=e=>l.value.frameWorkerSettings.mainStreamAnalysis=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])])])]),_:1})]),_:1})]),_:1})}}}),Fd={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function Id(e,t){return I(),V(`svg`,Fd,[...t[0]||=[z(`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 Ld=On({name:`fluent-arrow-sync-16-filled`,render:Id}),Rd={class:`flex items-center justify-between`},zd={class:`cui-label`},Bd={class:`flex flex-col field-gap`},Vd={class:`cui-label`},Hd={class:`cui-label`},Ud={class:`cui-label`},Wd={key:0,class:`flex flex-col field-gap`},Gd={class:`cui-label`},Kd={key:1,class:`flex flex-col field-gap`},qd={class:`cui-label`},Jd=Dn({__name:`CameraSource`,props:{cameraId:{},cameraName:{},source:{},loading:{type:Boolean}},setup(e){let t=new ft,n=e,{t:r}=p(),{getSourceStatus:i,connect:a}=vi(),o=Fn(),s=jt(),c=[`probe`,`preload`],{cameraId:l,cameraName:u,source:f,loading:m}=jn(n),h=H(!1),{data:g,isBusy:v}=t.probeCameraSourceQuery(u.value,f.value.name,{video:!0,audio:!0,microphone:!0});a();let y=K(()=>i(l.value,f.value.name)),b=K(()=>{switch(y.value){case`connected`:return`success`;case`connecting`:return`warn`;case`error`:return`danger`;default:return`secondary`}}),x=K(()=>{switch(y.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`)}}),S=K(()=>!!(m.value||v.value)),C=K(()=>g.value?.probe.consumers.filter(e=>!c.includes(e.format_name)).length||0),w=K(()=>te(`video`)),T=K(()=>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 ne(){if(!h.value){h.value=!0;try{let e=await vt({cameraname:u.value,sourcename:f.value.name,probeConfig:{video:!0,audio:!0,microphone:!0},force:!0});o.setQueryData([`cameras`,u.value,`probe`,f.value.name],e)}catch{s.add({severity:`error`,detail:r(`components.toast.probe_failed`),life:3e3})}finally{h.value=!1}}}return(e,t)=>{let n=gr,r=_,i=d,a=cr,o=ur,s=Ar,c=kt,l=ee;return I(),V(U,null,[z(`div`,Rd,[z(`label`,zd,B(e.$t(`components.form.label.stream_status`)),1),J(n,{severity:G(b),value:G(x)},null,8,[`severity`,`value`])]),z(`div`,Bd,[z(`label`,Vd,B(e.$t(`components.form.label.connections`)),1),J(o,null,{default:L(()=>[J(r,{value:G(C),loading:G(S),readonly:``,type:`text`},null,8,[`value`,`loading`]),J(a,null,{default:L(()=>[Sn((I(),q(i,{severity:`secondary`,text:``,loading:G(h),disabled:G(S),onClick:ne},{icon:L(()=>[J(G(Ld),{class:`w-4 h-4`})]),_:1},8,[`loading`,`disabled`])),[[l,e.$t(`components.form.button.reload`),void 0,{left:!0}]])]),_:1})]),_:1}),J(s,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.connections`)),1)]),_:1})]),(I(!0),V(U,null,F(G(w),(t,n)=>(I(),V(`div`,{key:n,class:`flex flex-col field-gap`},[z(`label`,Hd,B(e.$t(`components.form.label.video_codec`)),1),J(o,null,{default:L(()=>[J(r,{"model-value":t,loading:G(S),readonly:``,type:`text`},null,8,[`model-value`,`loading`])]),_:2},1024),n===G(w).length-1?(I(),q(s,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.video_codec`)),1)]),_:1})):Z(``,!0)]))),128)),(I(!0),V(U,null,F(G(T),(t,n)=>(I(),V(`div`,{key:n,class:`flex flex-col field-gap`},[z(`label`,Ud,B(e.$t(`components.form.label.audio_codec`)),1),J(o,null,{default:L(()=>[J(r,{"model-value":t,loading:G(S),readonly:``,type:`text`},null,8,[`model-value`,`loading`])]),_:2},1024),n===G(T).length-1?(I(),q(s,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.audio_codec`)),1)]),_:1})):Z(``,!0)]))),128)),G(f).role===`snapshot`?Z(``,!0):(I(),V(`div`,Wd,[z(`label`,Gd,B(e.$t(`components.form.label.rtsp_url`)),1),J(o,null,{default:L(()=>[J(r,{"model-value":G(g)?.rtspUrl,loading:G(S),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),J(a,null,{default:L(()=>[J(c,{"action-text":e.$t(`components.form.tooltip.copied`),icon:G(Mt),"button-props":{severity:`secondary`,disabled:!G(g)?.rtspUrl,loading:G(S),text:!0},onAction:t[0]||=e=>G(Nt)(G(g).rtspUrl)},null,8,[`action-text`,`icon`,`button-props`])]),_:1})]),_:1}),J(s,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.rtsp_url`)),1)]),_:1})])),G(f).role===`snapshot`?Z(``,!0):(I(),V(`div`,Kd,[z(`label`,qd,B(e.$t(`components.form.label.onvif_url`)),1),J(o,null,{default:L(()=>[J(r,{"model-value":G(g)?.onvifUrl,loading:G(S),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),J(a,null,{default:L(()=>[J(c,{"action-text":e.$t(`components.form.tooltip.copied`),icon:G(Mt),"button-props":{severity:`secondary`,disabled:!G(g)?.onvifUrl,loading:G(S),text:!0},onAction:t[1]||=e=>G(Nt)(G(g).onvifUrl)},null,8,[`action-text`,`icon`,`button-props`])]),_:1})]),_:1}),J(s,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.onvif_url`)),1)]),_:1})]))],64)}}}),Yd={class:`flex gap-2 items-center w-full`},Xd={class:`text-color font-normal`},Zd={class:`flex flex-col gap-6`},Qd=[`for`],$d=[`for`],ef={class:`w-full flex flex-col gap-2`},tf={class:`flex items-center gap-4`},nf={class:`flex flex-col field-switch-gap`},rf=[`for`],af={class:`flex items-center gap-4`},of={class:`flex flex-col field-switch-gap`},sf=[`for`],cf={class:`flex items-center gap-4`},lf={class:`flex flex-col field-switch-gap`},uf=[`for`],df={class:`flex items-center gap-4`},ff={class:`flex flex-col field-switch-gap`},pf=[`for`],mf=[`for`],hf={class:`flex flex-col gap-6`},gf={class:`flex flex-col field-gap`},_f=[`for`],vf={class:`w-full flex items-center justify-center my-3`},yf=Dn({__name:`Sources`,props:an({camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:an([`close`],[`update:modelValue`]),setup(e){let t=e,n=bn(e,`modelValue`),{t:r}=p(),i=Kt(),{camera:a,loading:o}=jn(t),s=H([`high-resolution`,`mid-resolution`,`low-resolution`,`snapshot`]);function c(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 f(e,t){t==null?n.value.sources[e].childSourceId=null:n.value.sources[e].childSourceId=t}function m(e){n.value.sources[e].urls.push(``)}function h(e){let t=n.value.sources[e];i.openTextDialog({data:{title:r(`components.camera_options.source_delete`),contentText:r(`components.camera_options.source_delete_confirm`,{name:c(t)}),confirmText:r(`components.form.button.remove`),confirmButtonProps:{severity:`danger`}},onConfirm:()=>{n.value.sources.splice(e,1)}})}function g(e,t){n.value.sources[e].urls.splice(t,1)}function v(e,t){e.role=t,t===`snapshot`&&(e.useForSnapshot=!1,e.hotMode=!1,e.preload=!1)}function y(){n.value&&n.value.sources.push({_id:``,name:``,role:null,urls:[],useForSnapshot:!1,hotMode:!0,preload:!0,muted:!1})}return(e,t)=>{let r=Ir,i=d,p=lr,b=_,x=ur,S=Ar,C=Jd,w=br,T=sr,ee=cr,te=xr,ne=rr,E=ir,re=ai;return I(),V(U,null,[J(E,{multiple:``,class:`p-4`},{default:L(()=>[(I(!0),V(U,null,F(n.value.sources,(t,d)=>(I(),q(ne,{key:d,value:d},{default:L(()=>[J(p,{class:R({"px-0 pt-0":d===0,"px-0":d!==0})},{default:L(()=>[z(`div`,Yd,[z(`span`,Xd,B(e.$t(`components.camera_options.source`)+`: `+c(t)),1),J(i,{text:``,rounded:``,loading:G(o),disabled:n.value.sources.length<2,severity:`danger`,class:`cui-icon-md ml-auto mr-2`,onClick:rn(e=>h(d),[`stop`])},{icon:L(()=>[J(r,{width:`100%`,height:`100%`})]),_:1},8,[`loading`,`disabled`,`onClick`])])]),_:2},1032,[`class`]),J(te,{pt:{content:{class:`px-0`}}},{default:L(()=>[z(`div`,Zd,[J(G($),{modelValue:t.name,"onUpdate:modelValue":e=>t.name=e,modelModifiers:{trim:!0},name:`sources[${d}].name`,as:`div`,class:`flex flex-col field-gap`},{default:L(({field:n,errors:r})=>[z(`label`,{for:`sources[${d}].name`,class:`cui-label`},B(e.$t(`components.form.label.source_name`)),9,Qd),J(x,null,{default:L(()=>[J(b,Ln({ref_for:!0},n,{invalid:r.length>0,loading:G(o),readonly:G(a).sources.some(e=>e.name===t.name),type:`text`}),null,16,[`invalid`,`loading`,`readonly`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`sources[${d}].name`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),r.length?Z(``,!0):(I(),q(S,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.source_name`)),1)]),_:1}))]),_:2},1032,[`modelValue`,`onUpdate:modelValue`,`name`]),t._id?(I(),q(C,{key:0,"camera-id":G(a)._id,"camera-name":G(a).name,source:t,loading:G(o)},null,8,[`camera-id`,`camera-name`,`source`,`loading`])):Z(``,!0),J(G($),{"model-value":t.role,name:`sources[${d}].role`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:r})=>[z(`label`,{for:`sources[${d}].role`,class:`cui-label`},B(e.$t(`components.form.label.source_role`)),9,$d),J(x,null,{default:L(()=>[J(w,{"model-value":t.role,options:G(s).filter(e=>!n.value.sources.some(n=>n.role===e&&n._id!==t._id)),invalid:r.length>0,loading:G(o),onValueChange:e=>v(t,e)},null,8,[`model-value`,`options`,`invalid`,`loading`,`onValueChange`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`sources[${d}].role`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),r.length?Z(``,!0):(I(),q(S,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.source_role`)),1)]),_:1}))]),_:2},1032,[`model-value`,`name`]),z(`div`,ef,[t.role!==`snapshot`&&n.value.sources.length>1?(I(),q(G($),{key:0,"model-value":t.useForSnapshot,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${d}].useForSnapshot`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:L(({field:r,errors:i})=>[z(`div`,tf,[z(`div`,nf,[z(`label`,{for:`sources[${d}].useForSnapshot`,class:`cui-label-switch`},B(e.$t(`components.form.label.use_for_snapshot`)),9,rf),J(S,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.use_for_snapshot`)),1)]),_:1}),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`sources[${d}].useForSnapshot`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),J(T,Ln({"model-value":t.useForSnapshot},{ref_for:!0},r,{invalid:i.length>0,loading:G(o),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`])):Z(``,!0),t.role===`snapshot`?Z(``,!0):(I(),q(G($),{key:1,"model-value":t.hotMode,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${d}].hotMode`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:L(({field:n,errors:r})=>[z(`div`,af,[z(`div`,of,[z(`label`,{for:`sources[${d}].hotMode`,class:`cui-label-switch`},B(e.$t(`components.form.label.hot_mode`)),9,sf),J(S,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.hot_mode`)),1)]),_:1}),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`sources[${d}].hotMode`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),J(T,Ln({"model-value":t.hotMode},{ref_for:!0},n,{invalid:r.length>0,loading:G(o),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`?Z(``,!0):(I(),q(G($),{key:2,"model-value":t.preload,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${d}].preload`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:L(({field:n,errors:r})=>[z(`div`,cf,[z(`div`,lf,[z(`label`,{for:`sources[${d}].preload`,class:`cui-label-switch`},B(e.$t(`components.form.label.preload`)),9,uf),J(S,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.preload`)),1)]),_:1}),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`sources[${d}].preload`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),J(T,Ln({"model-value":t.preload},{ref_for:!0},n,{invalid:r.length>0,loading:G(o),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`?Z(``,!0):(I(),q(G($),{key:3,"model-value":t.muted,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${d}].muted`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:L(({field:n,errors:r})=>[z(`div`,df,[z(`div`,ff,[z(`label`,{for:`sources[${d}].muted`,class:`cui-label-switch`},B(e.$t(`components.form.label.muted`)),9,pf),J(S,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.muted`)),1)]),_:1}),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`sources[${d}].muted`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),J(T,Ln({"model-value":t.muted},{ref_for:!0},n,{invalid:r.length>0,loading:G(o),class:`ml-auto shrink-0`,onValueChange:e=>t.muted=e}),null,16,[`model-value`,`invalid`,`loading`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`]))]),t.role===`snapshot`?Z(``,!0):(I(),q(G($),{key:1,"model-value":u(d),name:`sources[${d}].childSourceId`,as:`div`,class:`flex flex-col field-gap`},{default:L(({errors:t})=>[z(`label`,{for:`sources[${d}].childSourceId`,class:`cui-label`},B(e.$t(`components.form.label.pip_source`)),9,mf),J(x,null,{default:L(()=>[J(w,{"model-value":u(d),options:l(d),"option-label":`label`,"option-value":`value`,invalid:t.length>0,loading:G(o),placeholder:e.$t(`components.form.label.none`),"show-clear":``,onValueChange:e=>f(d,e)},null,8,[`model-value`,`options`,`invalid`,`loading`,`placeholder`,`onValueChange`])]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`sources[${d}].childSourceId`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),t.length?Z(``,!0):(I(),q(S,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.pip_source`)),1)]),_:1}))]),_:2},1032,[`model-value`,`name`])),z(`div`,hf,[z(`div`,gf,[z(`label`,{for:`sources[${d}].urls[]`,class:`cui-label`},B(e.$t(`components.form.label.sources`)),9,_f),J(S,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:L(()=>[W(B(e.$t(`components.form.hint.source_urls`)),1)]),_:1})]),(I(!0),V(U,null,F(t.urls,(e,n)=>(I(),q(G($),{key:n,modelValue:t.urls[n],"onUpdate:modelValue":e=>t.urls[n]=e,modelModifiers:{trim:!0},name:`sources[${d}].urls[${n}]`,as:`div`,class:`flex flex-col field-gap`},{default:L(({field:e,errors:a})=>[J(x,null,{default:L(()=>[J(b,Ln({ref_for:!0},e,{invalid:a.length>0,loading:G(o),type:`text`}),null,16,[`invalid`,`loading`]),t.urls.length>1?(I(),q(ee,{key:0},{default:L(()=>[J(i,{text:``,severity:`secondary`,loading:G(o),class:`cui-icon-md`,onClick:e=>g(d,n)},{icon:L(()=>[J(r,{width:`100%`,height:`100%`})]),_:1},8,[`loading`,`onClick`])]),_:2},1024)):Z(``,!0)]),_:2},1024),J(X,{name:`fade`},{default:L(()=>[J(G(Q),{name:`sources[${d}].urls[${n}]`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`,`name`]))),128)),J(i,{loading:G(o),label:e.$t(`components.form.button.add_source`),class:`ml-auto cui-button-medium`,onClick:e=>m(d)},null,8,[`loading`,`label`,`onClick`])])])]),_:2},1024)]),_:2},1032,[`value`]))),128))]),_:1}),z(`div`,vf,[J(i,{text:``,rounded:``,loading:G(o),class:`cui-icon-xl`,onClick:y},{icon:L(()=>[J(re,{width:`100%`,height:`100%`})]),_:1},8,[`loading`])])],64)}}}),bf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function xf(e,t){return I(),V(`svg`,bf,[...t[0]||=[z(`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 Sf=On({name:`mdi-car`,render:xf}),Cf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function wf(e,t){return I(),V(`svg`,Cf,[...t[0]||=[z(`path`,{fill:`currentColor`,"fill-rule":`evenodd`,d:`M10 5a3 3 0 1 1 3.469 2.964l1.436 2.297l1.724-.69a1 1 0 0 1 .742 1.858l-2.111.844a1.5 1.5 0 0 1-1.83-.598l-.406-.65l-.611 2.476a2 2 0 0 1-.33.701l1.664 1.236a2 2 0 0 1 .795 1.384L14.895 20H15a1 1 0 1 1 0 2h-1a1 1 0 0 1-.994-.89l-.452-4.067l-3.15-2.34c-.66-.49-1.018-1.336-.818-2.146l.796-3.228l-1.597.48l-.836 2.507a1 1 0 1 1-1.898-.632l.836-2.508A2 2 0 0 1 7.21 7.893l3.437-1.031A3 3 0 0 1 10 5m-.4 10.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.5-.5a1 1 0 0 1 1.263-.125l2.213 1.475L8.2 15.4a1 1 0 0 1 1.4-.2`,"clip-rule":`evenodd`},null,-1)]])}var Tf=On({name:`mingcute-run-fill`,render:wf}),Ef={detected:!1,disabled:!1,size:`medium`},Df={class:`cui-detection__header`},Of={class:`cui-detection__info`},kf={key:0,class:`cui-detection__label`},Af={key:0,class:`cui-detection__detections`},jf=He(Dn({__name:`CuiDetection`,props:vn({type:{},label:{},detected:{type:Boolean},detections:{},size:{},disabled:{type:Boolean}},Ef),setup(e){let t=e,{t:n}=p(),{detected:r}=jn(t),i=K(()=>r.value?n(`components.detection.detected`):n(`components.detection.idle`));return(t,n)=>{let a=Tf,o=Ni,s=ni,c=Xe,l=Sf;return I(),V(`div`,{class:R([`cui-detection`,[`cui-detection--${e.size}`,`cui-detection--${e.type}`,{"cui-detection--disabled":e.disabled,"cui-detection--detected":G(r)}]])},[z(`div`,Df,[z(`div`,{class:R([`cui-detection__icon`,{"cui-detection__icon--detected":G(r)}])},[e.type===`motion`?(I(),q(a,{key:0,class:`cui-detection__icon-svg`})):e.type===`object`?(I(),q(o,{key:1,class:`cui-detection__icon-svg`})):e.type===`audio`?(I(),q(s,{key:2,class:`cui-detection__icon-svg`})):e.type===`face`?(I(),q(c,{key:3,class:`cui-detection__icon-svg`})):e.type===`licensePlate`?(I(),q(l,{key:4,class:`cui-detection__icon-svg`})):Z(``,!0)],2),z(`div`,Of,[e.label?(I(),V(`span`,kf,B(e.label),1)):Z(``,!0),z(`span`,{class:R([`cui-detection__status`,{"cui-detection__status--detected":G(r)}])},B(G(i)),3)]),z(`div`,{class:R([`cui-detection__indicator`,{"cui-detection__indicator--detected":G(r)}])},null,2)]),e.detections&&e.detections.length>0?(I(),V(`div`,Af,[(I(!0),V(U,null,F(e.detections,(e,t)=>(I(),V(`span`,{key:t,class:`cui-detection__detection-tag`},B(e),1))),128))])):Z(``,!0)],2)}}}),[[`__scopeId`,`data-v-4bdc871b`]]),Mf={key:0,class:`flex items-center justify-center h-full`},Nf={key:1,class:`overview-container`},Pf={class:`relative`},Ff={key:0,class:`absolute inset-0 z-2 flex items-center justify-center bg-black/80 pointer-events-none`},If={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`},Lf={class:`text-xs text-white/80`},Rf={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`},zf={class:`text-xs text-white/80`},Bf={class:`overview-section`},Vf={class:`overview-section-title`},Hf={key:1},Uf={key:0,class:`overview-section`},Wf={class:`overview-section-title`},Gf={class:`flex flex-col gap-2`},Kf={key:1,class:`overview-section`},qf={class:`overview-section-title`},Jf={class:`flex flex-col gap-2`},Yf={key:2,class:`overview-section`},Xf={class:`overview-section-title`},Zf={class:`flex flex-col gap-2`},Qf={key:3,class:`overview-section`},$f={class:`overview-section-title`},ep={class:`flex flex-col gap-2`},tp={key:4,class:`overview-section`},np={class:`overview-section-title`},rp={class:`flex flex-col gap-2`},ip={key:5,class:`overview-section`},ap={class:`overview-section-title`},op={class:`flex flex-col gap-2`},sp={key:6,class:`overview-section`},cp={class:`overview-section-title`},lp={class:`flex flex-col gap-2`},up={key:7,class:`overview-section`},dp={class:`overview-section-title`},fp={class:`flex flex-col gap-2`},pp={key:8,class:`overview-section`},mp={class:`overview-section-title`},hp={class:`flex flex-col gap-2`},gp={key:9,class:`overview-section`},_p={class:`overview-section-title`},vp={class:`flex flex-col gap-2`},yp={key:10,class:`overview-section`},bp={class:`overview-section-title`},xp={class:`flex flex-col gap-2`},Sp={key:11,class:`overview-section`},Cp={class:`overview-section-title`},wp={class:`flex flex-col gap-2`},Tp={key:12,class:`overview-section`},Ep={class:`overview-section-title`},Dp={class:`flex flex-col gap-2`},Op={key:13,class:`overview-section`},kp={class:`overview-section-title`},Ap={class:`flex flex-col gap-2`},jp={key:14,class:`overview-section`},Mp={class:`overview-section-title`},Np={class:`flex flex-col gap-2`},Pp={key:15,class:`overview-section`},Fp={class:`no-sensors`},Ip=He(Dn({__name:`Overview`,props:{camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},setup(e){let r=e,{t:i}=p(),{getCameraStatus:a,connect:o}=vi(),{cameraDevice:c,latestSnapshotSrc:l}=jn(r),{sensors:u}=s(c),d=At(void 0,`admin`);o();let g=K(()=>c.value?.camera.value),_=K(()=>a(g.value?._id)),v=K(()=>{switch(_.value){case`connected`:return`success`;case`connecting`:return`warn`;case`error`:return`danger`;case`partial`:return`contrast`;default:return`secondary`}}),y=K(()=>{switch(_.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`)}}),b=K(()=>u.value.filter(P)),x=K(()=>u.value.filter(je)),S=K(()=>u.value.filter(f)),T=K(()=>u.value.filter(ie)),ee=K(()=>u.value.filter(t)),te=K(()=>u.value.filter(h)),ne=K(()=>u.value.filter(fe)),re=K(()=>u.value.filter(Te)),se=K(()=>u.value.filter(ce)),ue=K(()=>u.value.filter(Fe)),me=K(()=>u.value.filter(m)),j=K(()=>u.value.filter(Oe)),_e=K(()=>u.value.filter(be)),ve=K(()=>u.value.filter(ae)),xe=K(()=>u.value.filter(M)),N=K(()=>u.value.filter(Ne)),we=K(()=>u.value.filter(C)),De=K(()=>u.value.filter(E)),ke=K(()=>u.value.filter(D)),Le=K(()=>b.value.some(e=>e.getProperty(ye.Detected))),Be=K(()=>{let e;for(let t of b.value){let n=t.getProperty(ye.LastTriggered);n&&(!e||n>e)&&(e=n)}return e}),Ve=K(()=>new Date(Be.value??0)),He=A(Ve),Ue=K(()=>{let e=[{label:i(`components.camera_options.overview_status`),value:y.value,tag:!0,tagSeverity:v.value},{label:i(`components.camera_options.overview_sources`),value:String(g.value?.sources.length??0)}],t=g.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}),b.value.length>0&&(Le.value?e.push({label:i(`components.camera_options.overview_last_motion`),value:i(`components.camera_options.overview_motion_active`),tag:!0,tagSeverity:`danger`}):Be.value?e.push({label:i(`components.camera_options.overview_last_motion`),value:He.value}):e.push({label:i(`components.camera_options.overview_last_motion`),value:i(`components.camera_options.overview_no_motion`)})),e}),We=K(()=>b.value.length>0||x.value.length>0||S.value.length>0||T.value.length>0||ee.value.length>0),Ge=K(()=>te.value.length>0||_e.value.length>0||ve.value.length>0||xe.value.length>0||N.value.length>0||we.value.length>0||ne.value.length>0||ue.value.length>0||De.value.length>0||re.value.length>0||se.value.length>0||me.value.length>0||j.value.length>0||ke.value.length>0);return(e,t)=>{let r=ge,i=Dt,a=Qt,o=_t,s=dr,c=gr,u=Pi,f=ji,p=Ei,m=ki,h=Ci,_=yi,v=Di,y=Ai,C=bi,E=wi,ie=Mi,ae=xi,D=Si,ce=Oi,fe=Ti;return G(g)?(I(),V(`div`,Nf,[z(`div`,Pf,[G(g)?.disabled?(I(),V(`div`,Ff,[J(i,{class:`w-8 h-8 text-white/60`})])):Z(``,!0),G(g)?.disabled?(I(),V(`div`,If,[J(i,{class:`w-3.5 h-3.5 text-red-400`}),z(`span`,Lf,B(e.$t(`views.camera.camera_disabled`)),1)])):G(g)?.detectionSettings?.snooze?(I(),V(`div`,Rf,[J(a,{class:`w-3.5 h-3.5 text-amber-400`}),z(`span`,zf,B(e.$t(`views.camera.camera_snoozed`)),1)])):Z(``,!0),J(o,{camera:G(g),src:G(l)},null,8,[`camera`,`src`])]),z(`div`,Bf,[z(`h3`,Vf,B(e.$t(`components.camera_options.overview`)),1),J(u,{value:G(Ue),"striped-rows":``,"show-headers":!1,class:`card-border rounded-lg overflow-hidden`},{default:L(()=>[J(s,{field:`label`,class:`p-2 font-medium text-sm`}),J(s,{field:`value`,class:`p-2 text-muted text-sm text-right`},{body:L(({data:e})=>[e.tag?(I(),q(c,{key:0,severity:e.tagSeverity,value:e.value},null,8,[`severity`,`value`])):(I(),V(`span`,Hf,B(e.value),1))]),_:1})]),_:1},8,[`value`])]),G(We)?(I(),V(`div`,Uf,[z(`h3`,Wf,B(e.$t(`components.camera_options.detection`)),1),z(`div`,Gf,[(I(!0),V(U,null,F(G(b),e=>(I(),q(jf,{key:e.id,type:`motion`,label:e.displayName.value,detected:e.getProperty(G(ye).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128)),(I(!0),V(U,null,F(G(x),e=>(I(),q(jf,{key:e.id,type:`object`,label:e.displayName.value,detected:(e.getProperty(G(O).Detections)?.length??0)>0,detections:e.getProperty(G(O).Detections)?.map(e=>e.label??e.class??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128)),(I(!0),V(U,null,F(G(S),e=>(I(),q(jf,{key:e.id,type:`audio`,label:e.displayName.value,detected:e.getProperty(G(Re).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128)),(I(!0),V(U,null,F(G(T),e=>(I(),q(jf,{key:e.id,type:`face`,label:e.displayName.value,detected:e.getProperty(G(k).Detected)??!1,detections:e.getProperty(G(k).Detections)?.map(e=>e.identity??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128)),(I(!0),V(U,null,F(G(ee),e=>(I(),q(jf,{key:e.id,type:`licensePlate`,label:e.displayName.value,detected:e.getProperty(G(pe).Detected)??!1,detections:e.getProperty(G(pe).Detections)?.map(e=>e.plateText??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128))])])):Z(``,!0),G(ne).length?(I(),V(`div`,Kf,[z(`h3`,qf,B(e.$t(`components.camera_options.sensor_type_light`)),1),z(`div`,Jf,[(I(!0),V(U,null,F(G(ne),e=>(I(),q(f,{key:e.id,label:e.displayName.value,on:e.getProperty(G(le).On)??!1,brightness:e.getProperty(G(le).Brightness)??100,"has-brightness":e.hasCapability(`brightness`),disabled:!G(d),size:`small`,class:`card-border`,"onUpdate:on":t=>e.setProperty(G(le).On,t),"onUpdate:brightness":t=>e.setProperty(G(le).Brightness,t)},null,8,[`label`,`on`,`brightness`,`has-brightness`,`disabled`,`onUpdate:on`,`onUpdate:brightness`]))),128))])])):Z(``,!0),G(se).length?(I(),V(`div`,Yf,[z(`h3`,Xf,B(e.$t(`components.camera_options.sensor_type_switch`)),1),z(`div`,Zf,[(I(!0),V(U,null,F(G(se),e=>(I(),q(p,{key:e.id,label:e.displayName.value,on:e.getProperty(G(de).On)??!1,disabled:!G(d),size:`small`,class:`card-border`,"onUpdate:on":t=>e.setProperty(G(de).On,t)},null,8,[`label`,`on`,`disabled`,`onUpdate:on`]))),128))])])):Z(``,!0),G(ue).length?(I(),V(`div`,Qf,[z(`h3`,$f,B(e.$t(`components.camera_options.sensor_type_lock`)),1),z(`div`,ep,[(I(!0),V(U,null,F(G(ue),e=>(I(),q(m,{key:e.id,label:e.displayName.value,"current-state":e.getProperty(G(Ie).CurrentState)??2,"target-state":e.getProperty(G(Ie).TargetState)??0,disabled:!G(d),size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty(G(Ie).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`disabled`,`onUpdate:targetState`]))),128))])])):Z(``,!0),G(re).length?(I(),V(`div`,tp,[z(`h3`,np,B(e.$t(`components.camera_options.sensor_type_siren`)),1),z(`div`,rp,[(I(!0),V(U,null,F(G(re),e=>(I(),q(h,{key:e.id,label:e.displayName.value,active:e.getProperty(G(Ce).Active)??!1,volume:e.getProperty(G(Ce).Volume)??100,"has-volume":e.hasCapability(`volume`),disabled:!G(d),size:`small`,class:`card-border`,"onUpdate:active":t=>e.setProperty(G(Ce).Active,t),"onUpdate:volume":t=>e.setProperty(G(Ce).Volume,t)},null,8,[`label`,`active`,`volume`,`has-volume`,`disabled`,`onUpdate:active`,`onUpdate:volume`]))),128))])])):Z(``,!0),G(ke).length?(I(),V(`div`,ip,[z(`h3`,ap,B(e.$t(`components.camera_options.sensor_type_securitySystem`)),1),z(`div`,op,[(I(!0),V(U,null,F(G(ke),e=>(I(),q(_,{key:e.id,label:e.displayName.value,"current-state":e.getProperty(G(Ae).CurrentState)??3,"target-state":e.getProperty(G(Ae).TargetState)??3,disabled:!G(d),size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty(G(Ae).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`disabled`,`onUpdate:targetState`]))),128))])])):Z(``,!0),G(me).length?(I(),V(`div`,sp,[z(`h3`,cp,B(e.$t(`components.camera_options.sensor_type_doorbell`)),1),z(`div`,lp,[(I(!0),V(U,null,F(G(me),e=>(I(),q(v,{key:e.id,label:e.displayName.value,ring:e.getProperty(G(oe).Ring)??!1,disabled:!G(d),size:`small`,class:`card-border`,onTrigger:()=>e.setProperty(G(oe).Ring,!0)},null,8,[`label`,`ring`,`disabled`,`onTrigger`]))),128))])])):Z(``,!0),G(j).length?(I(),V(`div`,up,[z(`h3`,dp,B(e.$t(`components.camera_options.sensor_type_contact`)),1),z(`div`,fp,[(I(!0),V(U,null,F(G(j),e=>(I(),q(y,{key:e.id,label:e.displayName.value,detected:e.getProperty(G(ze).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):Z(``,!0),G(xe).length?(I(),V(`div`,pp,[z(`h3`,mp,B(e.$t(`components.camera_options.sensor_type_occupancy`)),1),z(`div`,hp,[(I(!0),V(U,null,F(G(xe),e=>(I(),q(C,{key:e.id,label:e.displayName.value,detected:e.getProperty(G(Me).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):Z(``,!0),G(N).length?(I(),V(`div`,gp,[z(`h3`,_p,B(e.$t(`components.camera_options.sensor_type_smoke`)),1),z(`div`,vp,[(I(!0),V(U,null,F(G(N),e=>(I(),q(E,{key:e.id,label:e.displayName.value,detected:e.getProperty(G(Pe).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):Z(``,!0),G(we).length?(I(),V(`div`,yp,[z(`h3`,bp,B(e.$t(`components.camera_options.sensor_type_leak`)),1),z(`div`,xp,[(I(!0),V(U,null,F(G(we),e=>(I(),q(ie,{key:e.id,label:e.displayName.value,detected:e.getProperty(G(Ee).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):Z(``,!0),G(De).length?(I(),V(`div`,Sp,[z(`h3`,Cp,B(e.$t(`components.camera_options.sensor_type_garage`)),1),z(`div`,wp,[(I(!0),V(U,null,F(G(De),e=>(I(),q(ae,{key:e.id,label:e.displayName.value,"current-state":e.getProperty(G(he).CurrentState)??1,"target-state":e.getProperty(G(he).TargetState)??1,"obstruction-detected":e.getProperty(G(he).ObstructionDetected)??!1,disabled:!G(d),size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty(G(he).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`obstruction-detected`,`disabled`,`onUpdate:targetState`]))),128))])])):Z(``,!0),G(_e).length?(I(),V(`div`,Tp,[z(`h3`,Ep,B(e.$t(`components.camera_options.sensor_type_temperature`)),1),z(`div`,Dp,[(I(!0),V(U,null,F(G(_e),e=>(I(),q(D,{key:e.id,label:e.displayName.value,current:e.getProperty(G(n).Current),size:`small`,class:`card-border`},null,8,[`label`,`current`]))),128))])])):Z(``,!0),G(ve).length?(I(),V(`div`,Op,[z(`h3`,kp,B(e.$t(`components.camera_options.sensor_type_humidity`)),1),z(`div`,Ap,[(I(!0),V(U,null,F(G(ve),e=>(I(),q(ce,{key:e.id,label:e.displayName.value,current:e.getProperty(G(Se).Current),size:`small`,class:`card-border`},null,8,[`label`,`current`]))),128))])])):Z(``,!0),G(te).length?(I(),V(`div`,jp,[z(`h3`,Mp,B(e.$t(`components.camera_options.sensor_type_battery`)),1),z(`div`,Np,[(I(!0),V(U,null,F(G(te),e=>(I(),q(fe,{key:e.id,label:e.displayName.value,level:e.getProperty(G(w).Level)??100,charging:e.getProperty(G(w).Charging)??`NOT_CHARGING`,low:e.getProperty(G(w).Low)??!1,size:`small`,class:`card-border`},null,8,[`label`,`level`,`charging`,`low`]))),128))])])):Z(``,!0),!G(Ge)&&!G(We)?(I(),V(`div`,Pp,[z(`div`,Fp,B(e.$t(`components.camera_options.no_sensors`)),1)])):Z(``,!0)])):(I(),V(`div`,Mf,[J(r,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})]))}}}),[[`__scopeId`,`data-v-9b7f0edd`]]),Lp={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Rp(e,t){return I(),V(`svg`,Lp,[...t[0]||=[z(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[z(`path`,{"stroke-width":`3`,d:`M5 10h.01M5 16h.01`}),z(`path`,{"stroke-width":`2`,d:`m10 17l4-10m2 10l4-10`})],-1)]])}var zp=On({name:`humbleicons-url`,render:Rp}),Bp={class:`drawer-header flex items-center w-full h-[45px] border-b-[1px] border-color px-3`},Vp={class:`font-semibold text-lg truncate`},Hp=[`onClick`],Up={class:`text-xs truncate`},Wp={class:`w-full h-full max-h-full overflow-y-scroll`},Gp={key:0,class:`flex w-full h-full items-center justify-center mt-5`},Kp={key:1,class:`w-full h-full`},qp={key:0,class:`w-full flex items-center justify-center p-4 h-[70px]`},Jp=He(Dn({__name:`CameraOptions`,props:{cameraName:{},latestSnapshotSrc:{}},emits:[`close`],setup(e,{emit:t}){let n=new ft,r=e,i=t,a=Vn(),o=jt(),{t:s}=p(),{latestSnapshotSrc:c}=jn(r),l=H(r.cameraName),{camera:u,isLoading:f}=me(l),{data:m,isBusy:h}=n.getCameraQuery(l),{mutate:g,isPending:_}=n.patchCameraQuery(),v=sn(`formRef`),y=En(),b=H(),x=H(`overview`),S=H([{name:`overview`,icon:Ve},{name:`sources`,icon:zp},{name:`settings`,icon:ot},{name:`plugins`,icon:it}]),C=K(()=>h.value||f.value||_.value),w=K(()=>x.value===`sources`||x.value===`settings`);function T(e){return Array.isArray(e.sources)?{...e,sources:e.sources.map((e,t)=>{let n=b.value?.sources.find(t=>t._id&&t._id===e._id)??b.value?.sources[t];return{...e,childSourceId:n?.childSourceId??null}})}:e}async function ee(){let e=await v.value?.validate();if(e?.valid&&e.values){let t=e.values.name;g({cameraname:l.value,cameraData:T(e.values)},{onSuccess:()=>{t&&t!==l.value&&(l.value=t)}})}else a.error(`Validation failed`,e),o.add({severity:`error`,detail:s(`components.toast.validation_failed`),life:3e3})}return Y(u,e=>{e&&(y.value=e)},{immediate:!0}),Y(()=>r.cameraName,e=>{y.value=void 0,l.value=e}),Y(m,e=>{e&&(b.value=Vt(e))},{deep:!0,immediate:!0}),(e,t)=>{let n=Ir,r=d,a=tr,o=pr,s=ge,u=Ip,f=yf,p=Pd,h=vc,g=or,_=mr,T=ar;return I(),V(U,null,[z(`div`,Bp,[z(`span`,Vp,B(G(l)),1),J(r,{text:``,rounded:``,severity:`secondary`,class:`ml-auto cui-icon-md shrink-0`,onClick:t[0]||=e=>i(`close`)},{icon:L(()=>[J(n,{width:`100%`,height:`100%`})]),_:1})]),J(G(wn),{ref_key:`formRef`,ref:v,class:`w-full`,style:zn({height:`calc(100% - 45px - ${G(w)?`70px`:`0px`})`}),"validation-schema":G(mi)},{default:L(()=>[J(T,{value:G(x),"onUpdate:value":t[7]||=e=>In(x)?x.value=e:null,scrollable:``,class:`w-full h-full`},{default:L(()=>[J(o,{class:`justify-between`,pt:{tablist:{class:`h-[65px]`},activeBar:{class:`!w-auto`}}},{default:L(()=>[(I(!0),V(U,null,F(G(S),(t,n)=>(I(),q(a,{key:n,value:t.name,"as-child":``},{default:L(n=>[z(`div`,Ln({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}),[(I(),q(Bn(t.icon),{class:`w-5 h-5`})),z(`span`,Up,B(e.$t(`components.options_sidebar.segment_tab_${t.name}`)),1)],16,Hp)]),_:2},1032,[`value`]))),128))]),_:1}),J(_,{class:`p-0 h-[calc(100%-65px)]`},{default:L(()=>[z(`div`,Wp,[(I(!0),V(U,null,F(G(S),(e,n)=>(I(),q(g,{key:n,value:e.name,"as-child":``},{default:L(e=>[e.active?(I(),V(`div`,Ln({key:0,class:e.class},{ref_for:!0},e.a11yAttrs),[!G(b)||!G(m)||!G(y)?(I(),V(`div`,Gp,[J(s,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])):(I(),V(`div`,Kp,[G(x)===`overview`?(I(),q(u,{key:0,camera:G(m),"camera-device":G(y),loading:G(C),"latest-snapshot-src":G(c),onClose:t[1]||=e=>i(`close`)},null,8,[`camera`,`camera-device`,`loading`,`latest-snapshot-src`])):Z(``,!0),G(x)===`sources`?(I(),q(f,{key:1,modelValue:G(b),"onUpdate:modelValue":t[2]||=e=>In(b)?b.value=e:null,camera:G(m),"camera-device":G(y),loading:G(C),onClose:t[3]||=e=>i(`close`)},null,8,[`modelValue`,`camera`,`camera-device`,`loading`])):Z(``,!0),G(x)===`settings`?(I(),q(p,{key:2,modelValue:G(b),"onUpdate:modelValue":t[4]||=e=>In(b)?b.value=e:null,camera:G(m),"camera-device":G(y),loading:G(C),onClose:t[5]||=e=>i(`close`)},null,8,[`modelValue`,`camera`,`camera-device`,`loading`])):Z(``,!0),G(x)===`plugins`?(I(),q(h,{key:3,camera:G(m),"camera-device":G(y),loading:G(C),onClose:t[6]||=e=>i(`close`)},null,8,[`camera`,`camera-device`,`loading`])):Z(``,!0)]))],16)):Z(``,!0)]),_:1},8,[`value`]))),128))])]),_:1})]),_:1},8,[`value`]),G(w)?(I(),V(`div`,qp,[J(r,{fluid:``,severity:`success`,class:`cui-button-medium`,label:e.$t(`components.form.button.save`),onClick:ee},null,8,[`label`])])):Z(``,!0)]),_:1},8,[`style`,`validation-schema`])],64)}}}),[[`__scopeId`,`data-v-94cafb3a`]]),Yp={class:`w-full h-full p-safe !pb-0 md:!pl-0 non-draggable-region`},Xp={class:`w-full h-full border-0 md:border-r-[1px] border-color overflow-y-auto pb-safe`},Zp=Dn({__name:`CuiCameraDrawer`,setup(e){let t=er(),n=Ct(),r=n.getEventBus(),i=H(!1),a=H(),o=H(),s=K(()=>Zt.pt);function c(){i.value=!1,n.close()}return Y(t.currentRoute,(e,t)=>{e.path!==t.path&&n.close()}),kn(()=>{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=Jp,r=Tr;return I(),q(r,Ln({visible:G(i),"onUpdate:visible":t[0]||=e=>In(i)?i.value=e:null},G(o),{class:`border-0 md:border-l-[1px]`,pt:G(s),onHide:c}),{container:L(({closeCallback:e})=>[z(`div`,Yp,[z(`div`,Xp,[G(a)?(I(),q(n,Ln({key:0},G(a),{onClose:e}),null,16,[`onClose`])):Z(``,!0)])])]),_:1},16,[`visible`,`pt`])}}}),Qp=Dn({__name:`CuiToast`,setup(e){let t=Vn(),{t:n}=p(),{mdBreakpoint:r}=Ge(),i=$r(),{theme:a}=Qn(i),o={success:An.success,error:An.error,warn:An.warning,warning:An.warning,info:An.info};function s(e){return n(`components.toast.title_${e===`warning`?`warn`:e}`)}function c(e){return e.type===`dismiss`}let l=zt.on(e=>{if(c(e)){An.dismiss(e.id);return}let r=e,i=o[r.severity]||An,a=r.summary||s(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&&(An.loading(i??e,{id:o,duration:1/0}),s.catch(e=>{t.error(`action failed`,e),An.error(n(`components.toast.title_error`),{id:o})}))}}}i(a,{id:r.id,description:r.detail,duration:r.persistent?1/0:r.life??3e3,action:l})});return Le(l),(e,t)=>(I(),q(G(Pn),{"rich-colors":``,position:G(r)?`top-center`:`bottom-right`,"visible-toasts":3,theme:G(a)},null,8,[`position`,`theme`]))}}),$p={class:`loader flex flex-col justify-center items-center`},em={key:0,class:`absolute flex flex-col items-center justify-center pb-safe bottom-10`},tm={key:0,class:`offline`},nm={key:1,class:`text-center text-white text-sm font-bold mt-2`},rm=He(Dn({__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}=jn(e),{start:o}=x(()=>{document.getElementById(`lens`)?.classList.add(`cameraLens`),document.getElementById(`CameraUI_U`)?.classList.add(`cameraLetter`)},100,{immediate:!1}),{resume:s}=c(()=>{document.getElementById(`lens`)?.classList.remove(`cameraLens`),document.getElementById(`CameraUI_U`)?.classList.remove(`cameraLetter`),o()},2300,{immediate:!1});return kn(()=>{t.value&&s()}),(e,t)=>(I(),V(`div`,$p,[J(G(Rn),{src:G(Jt)(`logo_loading_circle.svg`),width:G(n),height:G(r),title:`camera.ui`,"aria-label":`camera.ui`},null,8,[`src`,`width`,`height`]),G(a)||G(i)?(I(),V(`div`,em,[G(a)?(I(),V(`div`,tm,[(I(),q(Bn(G(a)),{class:`w-8 h-8 text-primary`}))])):Z(``,!0),G(i)?(I(),V(`div`,nm,B(G(i)),1)):Z(``,!0)])):Z(``,!0)]))}}),[[`__scopeId`,`data-v-839ba1ea`]]);Vn(`PushHandler`);function im(){let e=er(),{isElectronApp:t,electron:n}=Hn();function r(t,n){n?.deepLink&&e.push(n.deepLink)}kn(()=>{!t||!n||(n.removeListener(`notification-click`,r),n.on(`notification-click`,r))}),mn(()=>{n?.removeListener(`notification-click`,r)})}function am(){let e=er(),{isElectronApp:t,electron:n}=Hn();function r(t,n){n?.path&&e.push(n.path)}kn(()=>{!t||!n||(n.removeListener(`deep-link`,r),n.on(`deep-link`,r))}),mn(()=>{n?.removeListener(`deep-link`,r)})}var om={key:1,class:`app`},sm=He(Dn({__name:`App`,setup(e){let{navbarState:t,subbarState:n,showBottombar:r,showNavbar:i,showTopbar:a}=Ue(),o=$e(),s=Xn(),c=er(),{mdBreakpoint:l}=Ge(),{isPWA:u}=tt(),{t:d}=p(),f=dt(),{isElectronApp:m}=Hn();lt(),en(),im(),am();let h=$r(),{theme:g}=Qn(h),_=Et(),{isLoggedIn:v}=Qn(_),y=$t(),b=sn(`navbarRef`),x=sn(`topbarRef`),S=sn(`bottombarRef`),C=H(!0),w=H(!1),T=re(x,{width:0,height:0},{box:`border-box`}),ee=re(S,{width:0,height:0},{box:`border-box`}),te=K(()=>t.value===`closed`||t.value===`minified`?l.value?fo.CLOSED:fo.MINIFIED:fo.EXPANDED),ne=K(()=>t.value===`closed`?0:8),E=K(()=>!b.value||l.value?`env(safe-area-inset-left, 0px)`:`calc(${te.value}px + max(${ne.value}px, env(safe-area-inset-left, 0px)))`),ie=K(()=>o.showTopbar.value?`var(--topbar-background)`:o.background.value?o.background.value:`var(--ground-background)`),ae=K(()=>`calc(100dvh - ${x.value?`${T.height.value}px`:`env(safe-area-inset-top, 0px)`} - ${S.value?`${ee.height.value}px`:o.ignoreSafeAreaBottom.value?`0px`:`env(safe-area-inset-bottom, 0px)`} - ${S.value||!o.disableScroll.value||o.noExtraPadding.value?`0px`:`8px`})`),oe=K(()=>s.meta.auth?.requiresAuth&&!v.value||C.value||y.isSwitching),D=K(()=>{if(!(!y.isSwitching||!y.switchTargetName))return`${d(`components.instance_switcher.switching_to`)} ${y.switchTargetName}...`});async function se(){}return Y([v,()=>f.isOnline.value],([e,t],n)=>{if(y.isSwitching)return;let r=n?.[0]===!0&&n?.[1]===!0;e&&t&&!r&&(y.saveCurrentTokens(),y.fetchInstances())},{immediate:!0}),Y([ie,g],()=>{yn(()=>{if(/^var\([^)]+\)$/.test(ie.value)){let e=window.getComputedStyle(document.body),t=ie.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`,ie.value)})},{immediate:!0}),Y(()=>o.disableScroll.value,e=>{document.body.classList.toggle(`disable-overflow-scroll`,e),document.documentElement.classList.toggle(`disable-overflow-scroll`,e)},{immediate:!0}),kn(async()=>{await c.isReady(),se(),C.value=!1,requestAnimationFrame(()=>{w.value=!0})}),(e,s)=>{let c=rm,d=Qp,f=Or,p=yr,h=Zp,g=Ws,_=Wo,v=Ho,C=pn(`RouterView`),re=Ra,ie=Aa,se=Da,O=xa,ce=ia,le=Qi;return G(oe)?(I(),V(`div`,{key:0,class:`flex w-full h-full justify-center items-center absolute z-50`,style:zn({minHeight:G(u)?`100vh !important`:`100dvh !important`})},[J(c,{reload:``,text:G(D)},null,8,[`text`])],4)):(I(),V(`div`,om,[J(d),J(f),J(p),J(h),G(a)?(I(),q(g,{key:0,ref_key:`topbarRef`,ref:x,class:`z-2 top-0`,"offset-left":G(l)?0:G(te),animate:G(w)},null,8,[`offset-left`,`animate`])):Z(``,!0),G(r)?(I(),q(_,{key:1,ref_key:`bottombarRef`,ref:S,class:`z-2`},null,512)):Z(``,!0),G(i)?(I(),q(v,{key:2,ref_key:`navbarRef`,ref:b,class:`z-3 top-0 left-0`},null,512)):Z(``,!0),z(`main`,{id:`container`,class:`relative w-dvw z-1 overflow-x-hidden`,style:zn({transition:G(w)?`padding-left 200ms`:void 0,paddingTop:G(x)?`${G(T).height.value}px`:`env(safe-area-inset-top, 0px)`,paddingLeft:G(E),paddingRight:`env(safe-area-inset-right, 0px)`,paddingBottom:G(S)?`${G(ee).height.value}px`:G(o).ignoreSafeAreaBottom.value?`0px`:`env(safe-area-inset-bottom, 0px)`})},[z(`div`,{class:R([`w-full max-w-full h-full grid`,{"p-2":G(o).padding.value,"pt-0":G(o).paddingTop.value===!1,"pb-0":G(o).paddingBottom.value===!1&&!G(S),"pb-4":(G(o).paddingBottom.value||G(S))&&!G(o).disableScroll,"pl-0":G(o).paddingLeft.value===!1,"pr-0":G(o).paddingRight.value===!1}]),style:zn({minHeight:G(ae),maxHeight:G(o).disableScroll.value?G(ae):void 0,height:G(o).disableScroll.value?G(ae):void 0,overflow:G(o).disableScroll.value?`hidden`:void 0})},[J(C,null,{default:L(({Component:e})=>[(I(),q(Bn(e),{key:G(y).switchKey,class:R([`w-full h-full relative min-w-0`,{"overflow-x-hidden":!G(o).allowOverflowX.value}]),"navbar-width":G(te),"navbar-left":G(ne)},null,8,[`class`,`navbar-width`,`navbar-left`]))]),_:1})],6)],4),G(m)?(I(),q(re,{key:3})):Z(``,!0),G(t)===`opened`||G(n)===`opened`&&G(l)?(I(),q(Mn,{key:4,to:G(t)===`opened`?`#app`:`#container`,defer:``},[G(l)?(I(),V(`div`,{key:0,class:R([`fixed top-0 left-0 right-0 bottom-0 w-full h-full bg-black/50 z-1`,{"z-2":G(t)===`opened`}])},null,2)):Z(``,!0)],8,[`to`])):Z(``,!0),z(`div`,{class:`fixed-bg`,style:zn({background:G(o).background.value})},null,4),J(ie),J(se),G(!1)?(I(),q(O,{key:5})):Z(``,!0),J(ce),J(le)]))}}}),[[`__scopeId`,`data-v-366c2467`]]);Vn();function cm(e){St()&&window.addEventListener(`message`,t=>{if(t.origin!==window.location.origin)return;let n=t.data;n&&(n.type===`cui:theme`&&(n.mode===`dark`||n.mode===`light`)?e.onTheme?.(n.mode):n.type===`cui:language`&&typeof n.language==`string`&&n.language&&e.onLanguage?.(n.language))})}function lm(e,t){e.use(te({natsTransport:t.nats,target:t.target,wsTransport:t.ws})),e.use(we({natsTransport:t.nats,target:t.target,wsTransport:t.ws,workerBridge:Ke(),workerRegistry:It}))}var um=Yn(),dm=wr(Dr,{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 fm(e){xt(e)||zr.value||Vr.value||jt().add({severity:`error`,detail:e,life:3e3})}function pm(){return{enableDevtoolsV6Plugin:!0,queryClientConfig:{defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!0,gcTime:3e5,staleTime:1e4,networkMode:`online`,retry:(e,t)=>mm(t)===401?!1:e<2||(fm(t),!1)},mutations:{retry:0,networkMode:`online`,onError:fm}}}}}function mm(e){if(typeof e==`object`&&e&&`response`in e){let t=e.response;if(typeof t?.status==`number`)return t.status}}function hm(){return{theme:{preset:dm,options:{cssLayer:{name:`primevue`,order:`theme, base, primevue`},darkModeSelector:`.dark-mode`}}}}function gm(e){e.directive(`tooltip`,ee).directive(`focustrap`,b),e.use(Er).use(kr).use(Cr).use(_r,hm()).use(Ot).use(cn()).use(fn,pm()).use(um)}window.addEventListener(`vite:preloadError`,()=>Ze(()=>window.location.reload()));var{connection:_m}=await Bt({logger:new ke(`Connection`)});qt();var vm=xn(sm),ym=new ke(`Vue`);vm.config.errorHandler=(e,t,n)=>ym.error(`[${n}]`,e),gm(vm),Ii(_m),lm(vm,_m),$t().restoreActiveOverride(),lt(),cm({onTheme:e=>$r().applyHostTheme(e),onLanguage:e=>lt().applyHostLanguage(e)});var bm=await Fi(_m,{onUser:e=>Et().setUserFromLogin(e),onRedirectInfo:e=>{$t().redirectInfo=e},onReset:()=>{$t().activeId=null,We.value=null}});!bm&&Xt()&&(bm=await bt(_m,{onUser:e=>Et().setUserFromLogin(e)})),vm.use(tn),vm.mount(`#app`),Qe(),bm||_m.boot(`default`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{gr as e,hr as t,pr as n,wr as r}from"./api-CmdQlVDD.js";import{U as i,q as a}from"./vendor-BaiDFVEr.js";async function o({signal:e}){return(await r.get(`/mqtt`,{signal:e})).data}async function s(e){return(await r.patch(`/mqtt`,e)).data}async function c({signal:e}){return(await r.get(`/mqtt/topics`,{signal:e})).data}async function l(e){return(await r.post(`/mqtt/test`,e)).data}var u=class{_queryClient=a();t=e.global.t;toast=t();get queryClient(){return this._queryClient}getMqttInfoQuery(){return n({queryKey:[`mqtt`],queryFn:({signal:e})=>o({signal:e}),staleTime:1e3})}patchMqttInfoMutation(){return i({mutationFn:s,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`mqtt`],exact:!0}),this.toast.add({severity:`success`,detail:this.t(`components.toast.mqtt_updated`),life:3e3})}})}getMqttTopicsQuery(){return n({queryKey:[`mqtt`,`topics`],queryFn:({signal:e})=>c({signal:e}),staleTime:1e4})}testMqttConnectionMutation(){return i({mutationFn:l})}};export{u as t};
|