@camera.ui/server 2.1.14-beta.2 → 2.1.14-beta.3
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-BUI5AjaN.js → 404-Ct2rp3W6.js} +1 -1
- package/dist/interface/assets/{About-B68h2Ypp.js → About-BkrFfbam.js} +1 -1
- package/dist/interface/assets/Automation-D2PHM9TZ.js +3 -0
- package/dist/interface/assets/AutomationImport-DbRJF8i2.js +2 -0
- package/dist/interface/assets/AutomationStore-D-PBrft2.js +2 -0
- package/dist/interface/assets/AutomationStoreDetail-RU-UXz0W.js +2 -0
- package/dist/interface/assets/Automations-D-AAcPfb.js +2 -0
- package/dist/interface/assets/Camera-BWdUUW_H.css +1 -0
- package/dist/interface/assets/Camera-Bz5NfM2e.js +2 -0
- package/dist/interface/assets/{CameraConsole-2ik6hqsi.js → CameraConsole-_v6lLT9V.js} +1 -1
- package/dist/interface/assets/{Cameras-BiBeIDTT.js → Cameras-BICfDnxO.js} +2 -2
- package/dist/interface/assets/{Camview-DIEa8IRE.css → Camview-BZS4_jv1.css} +1 -1
- package/dist/interface/assets/Camview-CKX9B9Ak.js +1 -0
- package/dist/interface/assets/{CertificateUpload-BsnlaxRS.js → CertificateUpload-CWt_CAt6.js} +1 -1
- package/dist/interface/assets/Config-CKn4Gc_s.js +2 -0
- package/dist/interface/assets/{ConfigActionCameraControl-Um6CGbRu.js → ConfigActionCameraControl-BpZrhaAg.js} +1 -1
- package/dist/interface/assets/{ConfigActionDelay-D10_C6yo.js → ConfigActionDelay-D-Rn2YP6.js} +1 -1
- package/dist/interface/assets/{ConfigActionHttp-DL4jh9Wz.js → ConfigActionHttp-DzoBcypZ.js} +1 -1
- package/dist/interface/assets/{ConfigActionImageInput-DVvMUzrT.js → ConfigActionImageInput-DHBsjlY-.js} +1 -1
- package/dist/interface/assets/{ConfigActionMqtt-doO8Az89.js → ConfigActionMqtt-DBssl5vL.js} +1 -1
- package/dist/interface/assets/{ConfigActionNotification-B5EpVQYl.js → ConfigActionNotification-nDKENsVa.js} +1 -1
- package/dist/interface/assets/{ConfigActionNotificationControl-zSrCVmyd.js → ConfigActionNotificationControl-Gd955Nu4.js} +1 -1
- package/dist/interface/assets/{ConfigActionOutput-udY95_rH.js → ConfigActionOutput-CPlUnJPX.js} +1 -1
- package/dist/interface/assets/{ConfigActionPlugin-DAsJCHlA.js → ConfigActionPlugin-DMT0GG9J.js} +1 -1
- package/dist/interface/assets/{ConfigActionSensor-DXbcVPIc.js → ConfigActionSensor-B9qfwZPK.js} +1 -1
- package/dist/interface/assets/{ConfigActionSnapshot-DxN3OCxP.js → ConfigActionSnapshot-DmzC7Ka8.js} +1 -1
- package/dist/interface/assets/{ConfigActionVariable-BagC3lj5.js → ConfigActionVariable-BcTGZbYR.js} +1 -1
- package/dist/interface/assets/{ConfigConditionIfElse-CQOZJ19Y.js → ConfigConditionIfElse-C-0FNq8c.js} +1 -1
- package/dist/interface/assets/{ConfigConditionSensorState-CSXRl20N.js → ConfigConditionSensorState-DoOyDkd8.js} +1 -1
- package/dist/interface/assets/{ConfigConditionSwitch-BXR6xUN8.js → ConfigConditionSwitch-DonNSgEC.js} +1 -1
- package/dist/interface/assets/{ConfigConditionTime-BrEhw1R9.js → ConfigConditionTime-b05J39ya.js} +1 -1
- package/dist/interface/assets/{ConfigSensorValueInput-DezTWtbA.js → ConfigSensorValueInput-DbKeWPpA.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerDetection-Bm4rRg1w.js → ConfigTriggerDetection-DvoA49uo.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerGeofence-CBe0l1jA.js → ConfigTriggerGeofence-CZRFnbWY.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerManual-CmAdnZQK.js → ConfigTriggerManual-DYDhaI_A.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerMqtt-X6PJ4118.js → ConfigTriggerMqtt-CkClS0me.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSchedule-BGci3Aed.js → ConfigTriggerSchedule-Co2A9pH7.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSensor-THoba5wK.js → ConfigTriggerSensor-B6KlmsnV.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSystem-DvKpEj8j.js → ConfigTriggerSystem-CC-NtLwh.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerWebhook-COk74WMO.js → ConfigTriggerWebhook-CPjRwtA-.js} +1 -1
- package/dist/interface/assets/{Console-B-c9uFON.js → Console-BbdPBqEC.js} +1 -1
- package/dist/interface/assets/{CuiAutomationRunsDialog-B4jdBnXB.js → CuiAutomationRunsDialog-DoPIIX-T.js} +1 -1
- package/dist/interface/assets/{CuiBottomSheet-D6Ar_Vq5.js → CuiBottomSheet-B6X4pbeR.js} +1 -1
- package/dist/interface/assets/CuiBottomSheet-CNc2pbC7.js +1 -0
- package/dist/interface/assets/CuiCameraPipCard-BlZJUCJP.js +1 -0
- package/dist/interface/assets/{CuiCameraRecordings-B57cH2Zl.js → CuiCameraRecordings-BvQ_6Elk.js} +1 -1
- package/dist/interface/assets/{CuiCameraShares-CIiNdSs9.js → CuiCameraShares-CGYScB2u.js} +1 -1
- package/dist/interface/assets/CuiCameraTable-Cgm7BoLZ.js +1 -0
- package/dist/interface/assets/{CuiCameraTable-BwcUrxRG.js → CuiCameraTable-Cm-wfsDL.js} +1 -1
- package/dist/interface/assets/{CuiChartTable-T7LhCE75.js → CuiChartTable-CKP8f68c.js} +1 -1
- package/dist/interface/assets/{CuiConsole-eYQze0Ui.js → CuiConsole-BWrpJYcX.js} +1 -1
- package/dist/interface/assets/{CuiDataTable-DRn4fgA3.js → CuiDataTable-BozSktV7.js} +1 -1
- package/dist/interface/assets/{CuiLightControl-BUYobZ7u.js → CuiLightControl-DRNXOigw.js} +1 -1
- package/dist/interface/assets/{CuiList-D-hOSNou.js → CuiList-DRkSKm6_.js} +1 -1
- package/dist/interface/assets/CuiPluginCard-DQLIw-q8.js +2 -0
- package/dist/interface/assets/{CuiPluginCategoryChip-BcUzuEzZ.js → CuiPluginCategoryChip-CcKK1e-h.js} +1 -1
- package/dist/interface/assets/CuiPluginOAuthButton-Bbh4geGP.js +2 -0
- package/dist/interface/assets/{CuiPluginTrustBadge-DVgAlpH5.js → CuiPluginTrustBadge-UJafoYxB.js} +1 -1
- package/dist/interface/assets/{CuiQRCode-CeQ_McaA.js → CuiQRCode-gqnAR_Zp.js} +1 -1
- package/dist/interface/assets/{CuiSchema-DdZA0ZMU.js → CuiSchema-Bhs017IB.js} +1 -1
- package/dist/interface/assets/{CuiTopNavbarItem-C4k-nVFX.js → CuiTopNavbarItem-C-7LPPKD.js} +1 -1
- package/dist/interface/assets/Faces-BfBHLOZg.js +1 -0
- package/dist/interface/assets/FirstSteps-zHSDaE1p.js +1 -0
- package/dist/interface/assets/Floorplan-BlT1vOq0.js +1 -0
- package/dist/interface/assets/Instances-BNylwtFA.js +1 -0
- package/dist/interface/assets/{Logs-BMbipaHY.js → Logs-Bh8kvHG-.js} +2 -2
- package/dist/interface/assets/{Menu-CeRrSc4S.js → Menu-BDdiFqwe.js} +1 -1
- package/dist/interface/assets/Metrics-dqXxkjt9.js +9 -0
- package/dist/interface/assets/{OAuthDeviceFlow-h34MrQBF.js → OAuthDeviceFlow-BRTodx33.js} +1 -1
- package/dist/interface/assets/Plugin-BZZ9P2-2.js +1 -0
- package/dist/interface/assets/{PluginConsole-BmoxL8Zf.js → PluginConsole-DxxCx7q1.js} +1 -1
- package/dist/interface/assets/PluginDetail-l_l3WOqM.js +2 -0
- package/dist/interface/assets/{PluginSchema-E2mYGyo7.js → PluginSchema-D0stZt2c.js} +1 -1
- package/dist/interface/assets/PluginSearch-C_4Txq7k.js +1 -0
- package/dist/interface/assets/PluginSearch-lqGiQjP4.js +2 -0
- package/dist/interface/assets/{PluginUpdateProgress-C24YDhuR.js → PluginUpdateProgress-CUUVf_wg.js} +1 -1
- package/dist/interface/assets/Plugins-Y634pLhv.js +1 -0
- package/dist/interface/assets/Recordings-Ct6GmMEP.js +1 -0
- package/dist/interface/assets/{SensorEdit-BNjKeleI.js → SensorEdit-DnPyIBu5.js} +1 -1
- package/dist/interface/assets/{SensorHistory-CdH5maOV.js → SensorHistory-Bwmg24QZ.js} +1 -1
- package/dist/interface/assets/Sensors-BaMYFgjD.js +2 -0
- package/dist/interface/assets/{Settings-DKBZFxlv.js → Settings-DulVBel0.js} +1 -1
- package/dist/interface/assets/SettingsAccount-CL2RTnFz.js +1 -0
- package/dist/interface/assets/SettingsAccount-DbArOHXx.js +1 -0
- package/dist/interface/assets/SettingsAppearance-CPrCyxBA.js +1 -0
- package/dist/interface/assets/{SettingsAppearance-CQCBQbi9.js → SettingsAppearance-cq1t3BEj.js} +1 -1
- package/dist/interface/assets/SettingsBackup-21a3QmN1.js +1 -0
- package/dist/interface/assets/{SettingsList-DBsW8ThN.js → SettingsList-dO_4W9uY.js} +1 -1
- package/dist/interface/assets/{SettingsMqtt-2CZar6Ok.js → SettingsMqtt-CAxcvp74.js} +1 -1
- package/dist/interface/assets/{SettingsNotifications-XklBpBAA.js → SettingsNotifications-C8OyC6Uo.js} +1 -1
- package/dist/interface/assets/{SettingsPermissions-gFDNSlTh.js → SettingsPermissions-BPZlOEWO.js} +1 -1
- package/dist/interface/assets/{SettingsRecordings-DNivVi-n.js → SettingsRecordings-Boja0QZp.js} +1 -1
- package/dist/interface/assets/SettingsRemote-Dga6BXDI.js +2 -0
- package/dist/interface/assets/SettingsSystem-DnipKTG6.js +2 -0
- package/dist/interface/assets/SettingsUsers-Bxf1RaY3.js +1 -0
- package/dist/interface/assets/{Terminal-DIJQiSuv.js → Terminal-Cr3hOv8-.js} +1 -1
- package/dist/interface/assets/Updates-DiBrlchb.js +2 -0
- package/dist/interface/assets/{VariableInput-n0TxKRqq.js → VariableInput-C7XFQ66c.js} +1 -1
- package/dist/interface/assets/{VariableSuggestions-C4LmaCAo.js → VariableSuggestions-DohkCyGS.js} +1 -1
- package/dist/interface/assets/{VersionsHandler-DQIGi_rX.js → VersionsHandler-DFef44HF.js} +1 -1
- package/dist/interface/assets/{VirtualSensorCreate-hkTH1oyx.js → VirtualSensorCreate-9X6C1NR1.js} +1 -1
- package/dist/interface/assets/Workers-D5OtbF4f.js +2 -0
- package/dist/interface/assets/api-Br1U09Hq.js +4 -0
- package/dist/interface/assets/{api-DO5wBndX.css → api-SOlhy6R4.css} +1 -1
- package/dist/interface/assets/{api-Fnlph_Dy.js → api-ZL-_Y0-o.js} +1 -1
- package/dist/interface/assets/{auth-BR3YzjI6.js → auth-CUXeNcmI.js} +1 -1
- package/dist/interface/assets/{automations-CEQA_ktf.js → automations-Bz9Wo-Xf.js} +1 -1
- package/dist/interface/assets/{cameraSources-C3cl6FVD.js → cameraSources-BpaS7lCe.js} +1 -1
- package/dist/interface/assets/cloudHandoff-Colhf5P9.js +1 -0
- package/dist/interface/assets/{config-C9VJJPSY.js → config-bmrb5S6z.js} +1 -1
- package/dist/interface/assets/{flowSchema-BOrDqdeG.js → flowSchema-D4Ys_7rr.js} +1 -1
- package/dist/interface/assets/{intercomService-CfCIMUlA.js → intercomService-CmFnb1sI.js} +1 -1
- package/dist/interface/assets/main-CrXBqh3b.js +3 -0
- package/dist/interface/assets/{mqtt-C0Fk_0A0.js → mqtt-Cotm4qW5.js} +1 -1
- package/dist/interface/assets/{notifications-cLHaJrkF.js → notifications-D4SOTDPx.js} +1 -1
- package/dist/interface/assets/{plugins-BSj5ptYS.js → plugins-Bxyydn6v.js} +1 -1
- package/dist/interface/assets/{rooms-B2qpadxS.js → rooms-DdSOohLs.js} +1 -1
- package/dist/interface/assets/sensorIcons-CtVSmjCW.js +1 -0
- package/dist/interface/assets/{sensors-CF2XtbQy.js → sensors-C4ZGeFC2.js} +1 -1
- package/dist/interface/assets/{server-CtYeoF7I.js → server-DWPgetQJ.js} +1 -1
- package/dist/interface/assets/{theme-XIkYA0Sr.js → theme-BTgw7al1.js} +1 -1
- package/dist/interface/assets/{types-D19FOdYo.js → types-BX3Shvk-.js} +1 -1
- package/dist/interface/assets/{types-CSWXRySW.js → types-DJucLQEM.js} +1 -1
- package/dist/interface/assets/{types-C_BNAgFu.js → types-sQfxKKSk.js} +1 -1
- package/dist/interface/assets/ungrouped-CfLdttI0.js +1 -0
- package/dist/interface/assets/{updates-BAgOBEkj.js → updates-DSQhfbpi.js} +1 -1
- package/dist/interface/assets/{useAppVersion-D9KkJTXk.js → useAppVersion-Dm0wl8Ks.js} +1 -1
- package/dist/interface/assets/{useBackupRestore-sN-km6-B.js → useBackupRestore-ARFlxu4a.js} +1 -1
- package/dist/interface/assets/{useCameraOptions-DMVDXZmK.js → useCameraOptions-CkKmF0Hk.js} +1 -1
- package/dist/interface/assets/{useLogsSocket-DQkjdbYG.js → useLogsSocket-BQGKfynj.js} +1 -1
- package/dist/interface/assets/{useNavLayout-D3ouWCmp.js → useNavLayout-CB6pDWQI.js} +1 -1
- package/dist/interface/assets/{usePermissions-zJF4LCPm.js → usePermissions-CKQU5_yK.js} +1 -1
- package/dist/interface/assets/{usePluginUpdates-aa47-Yks.js → usePluginUpdates-DsX5Nf9S.js} +1 -1
- package/dist/interface/assets/{usePushRegistration-CTL6lj6G.js → usePushRegistration-CR4ZsM1s.js} +1 -1
- package/dist/interface/assets/{useServerRestart-DJ7Yp-hS.js → useServerRestart-B0ux2xXZ.js} +1 -1
- package/dist/interface/assets/{useStreamStatus-caRsJFPo.js → useStreamStatus-B13lBsjn.js} +1 -1
- package/dist/interface/assets/{useTabSwipe-C0dqPNrP.js → useTabSwipe-CC9fSJyW.js} +1 -1
- package/dist/interface/assets/{useUpdateChannel-rQpLNPVf.js → useUpdateChannel-4932QugL.js} +1 -1
- package/dist/interface/assets/{useUpdatesSocket-BRGd8z0Q.js → useUpdatesSocket-BYOu1jFQ.js} +1 -1
- package/dist/interface/assets/{useUserOptions-DJzQcCxU.js → useUserOptions-7qZi1YVO.js} +1 -1
- package/dist/interface/assets/{vendor-cameraui-phsC2Mmi.js → vendor-cameraui-C5_h4c-5.js} +12 -12
- package/dist/interface/assets/{vendor-core-C0ZWoGJD.js → vendor-core-DeodbhZZ.js} +1 -1
- package/dist/interface/assets/{vendor-primevue-nPess0JU.js → vendor-primevue-C9-jpd5L.js} +1 -1
- package/dist/interface/ha/{404-XfD0QhlQ.js → 404-BJV77Tm3.js} +1 -1
- package/dist/interface/ha/{About-BDT0bXs9.js → About-B9m7sPyi.js} +3 -3
- package/dist/interface/ha/{Automation-zp87FeF1.js → Automation-CpRTKtII.js} +157 -157
- package/dist/interface/ha/{AutomationImport-DqW0CH_W.js → AutomationImport-Cwx9PKHq.js} +6 -6
- package/dist/interface/ha/{AutomationStore-BzbphHII.js → AutomationStore-D1DJAo3Y.js} +49 -49
- package/dist/interface/ha/{AutomationStoreDetail-BLo9ruib.js → AutomationStoreDetail-BWkMk3zp.js} +6 -6
- package/dist/interface/ha/{Automations-CPnr0gsA.js → Automations-2-dpUnyN.js} +96 -96
- package/dist/interface/ha/{Camera-B4ER1Z0s.js → Camera-BFQCXQ-9.js} +160 -160
- package/dist/interface/ha/{CameraConsole-BmCff686.js → CameraConsole-DN2AUzCO.js} +3 -3
- package/dist/interface/ha/{Cameras-BhqLnuzl.js → Cameras-Cp2tLuzn.js} +25 -25
- package/dist/interface/ha/{Camview-B4gJF52k.js → Camview-9-QATaMt.js} +333 -327
- package/dist/interface/ha/{Config-CZsLcgnx.js → Config-B7BWUVjy.js} +109 -109
- package/dist/interface/ha/{ConfigActionCameraControl-BO_omYtE.js → ConfigActionCameraControl-B4bligkf.js} +3 -3
- package/dist/interface/ha/{ConfigActionHttp-0XiJGo1p.js → ConfigActionHttp-Ci1pT2TU.js} +2 -2
- package/dist/interface/ha/{ConfigActionImageInput-DKfoq44v.js → ConfigActionImageInput-JL7XqPlF.js} +1 -1
- package/dist/interface/ha/{ConfigActionMqtt-DpWEe172.js → ConfigActionMqtt-CErH-8g0.js} +4 -4
- package/dist/interface/ha/{ConfigActionNotification-C-dw-rJc.js → ConfigActionNotification-DbB5il5h.js} +3 -3
- package/dist/interface/ha/{ConfigActionNotificationControl-BKETfXHu.js → ConfigActionNotificationControl-BidGFW5w.js} +2 -2
- package/dist/interface/ha/{ConfigActionOutput-Bl0WhQsB.js → ConfigActionOutput-BbEPcSqB.js} +1 -1
- package/dist/interface/ha/{ConfigActionPlugin-DQ-IQioz.js → ConfigActionPlugin-BQUbQheX.js} +5 -5
- package/dist/interface/ha/{ConfigActionSensor-COKCL9VJ.js → ConfigActionSensor-ZwXZF672.js} +4 -4
- package/dist/interface/ha/{ConfigActionSnapshot-KMgZaQTk.js → ConfigActionSnapshot-CKCKSlvU.js} +2 -2
- package/dist/interface/ha/{ConfigActionVariable-B6c0mHx3.js → ConfigActionVariable-DB-leNOV.js} +1 -1
- package/dist/interface/ha/{ConfigConditionIfElse-DjqW9DL2.js → ConfigConditionIfElse-268mse2c.js} +3 -3
- package/dist/interface/ha/{ConfigConditionSensorState-DP4H2EhX.js → ConfigConditionSensorState-DwPY2W53.js} +4 -4
- package/dist/interface/ha/{ConfigConditionSwitch-DUZ4EXMa.js → ConfigConditionSwitch-C9zW3TAK.js} +4 -4
- package/dist/interface/ha/{ConfigSensorValueInput-BZ6VP_SV.js → ConfigSensorValueInput-cKpE0FZE.js} +3 -3
- package/dist/interface/ha/{ConfigTriggerDetection-DubElOjf.js → ConfigTriggerDetection-C0S-k9O5.js} +3 -3
- package/dist/interface/ha/{ConfigTriggerGeofence-CAb9EIyW.js → ConfigTriggerGeofence-CjmlCNj3.js} +2 -2
- package/dist/interface/ha/{ConfigTriggerMqtt-DEEiQfiG.js → ConfigTriggerMqtt-YpTYEXuH.js} +1 -1
- package/dist/interface/ha/{ConfigTriggerSensor-BWU9p7DN.js → ConfigTriggerSensor-jTkbOjQw.js} +1 -1
- package/dist/interface/ha/{ConfigTriggerSystem-CrBnn7N4.js → ConfigTriggerSystem-ChQOH5XE.js} +2 -2
- package/dist/interface/ha/{ConfigTriggerWebhook-BxhYX1v3.js → ConfigTriggerWebhook--Xitqvob.js} +1 -1
- package/dist/interface/ha/{Console-DSFjYlo2.js → Console-BLBwNOGF.js} +2 -2
- package/dist/interface/ha/{CuiAutomationRunsDialog-B_6B5g5M.js → CuiAutomationRunsDialog-DZpflYbm.js} +2 -2
- package/dist/interface/ha/{CuiBottomSheet-H-Q85NZI.js → CuiBottomSheet-x112x30L.js} +1 -1
- package/dist/interface/ha/{CuiCameraRecordings-RbA-z2aC.js → CuiCameraRecordings-kyJmGt96.js} +7 -7
- package/dist/interface/ha/{CuiCameraShares-ljsNljpk.js → CuiCameraShares-C64w7YIg.js} +2 -2
- package/dist/interface/ha/{CuiCameraTable-D8v9f0KG.js → CuiCameraTable-BcucTb-H.js} +2 -2
- package/dist/interface/ha/{CuiChartTable-CRh5hraX.js → CuiChartTable-HtK2jIrg.js} +3 -3
- package/dist/interface/ha/{CuiConsole-BDyVAdJ1.js → CuiConsole-B6UN73LC.js} +1 -1
- package/dist/interface/ha/{CuiDataTable-BQJn0V9s.js → CuiDataTable-C06T8Rgf.js} +1 -1
- package/dist/interface/ha/{CuiPluginCard-BBufTf5G.js → CuiPluginCard-Ca1syMp2.js} +90 -90
- package/dist/interface/ha/{CuiPluginOAuthButton-C040cvyg.js → CuiPluginOAuthButton-B_kD1J7y.js} +3 -3
- package/dist/interface/ha/{CuiPluginTrustBadge-nzUGrby_.js → CuiPluginTrustBadge-BGnfwBkE.js} +1 -1
- package/dist/interface/ha/{CuiQRCode-D5mDAVxc.js → CuiQRCode-C8afEdjI.js} +2 -2
- package/dist/interface/ha/{CuiSchema-Dediu0ne.js → CuiSchema-BDqA8ICl.js} +115 -115
- package/dist/interface/ha/{CuiTopNavbarItem-CLctGl42.js → CuiTopNavbarItem-Cowg2EeV.js} +1 -1
- package/dist/interface/ha/{Faces-Dj-0ZqJo.js → Faces-COKq1uOY.js} +98 -98
- package/dist/interface/ha/{FirstSteps-D8Oz_1wZ.js → FirstSteps-B6Rpbo6X.js} +62 -62
- package/dist/interface/ha/{Floorplan-bSWb_OO9.js → Floorplan-C7Z973FS.js} +36 -36
- package/dist/interface/ha/{Instances-DHn0dknd.js → Instances-D5jpC7_k.js} +3 -3
- package/dist/interface/ha/{Logs-ztXnQRDu.js → Logs-BQ7844YD.js} +8 -8
- package/dist/interface/ha/{Menu-DZjKIIdo.js → Menu-BA3FMf84.js} +2 -2
- package/dist/interface/ha/{Metrics-CaQpSqaT.js → Metrics-CW7eFTFq.js} +312 -312
- package/dist/interface/ha/{OAuthDeviceFlow-CXFvbNVS.js → OAuthDeviceFlow-DY0EmFd2.js} +4 -4
- package/dist/interface/ha/{Plugin-Bobl3pAj.js → Plugin-CDTqk1Za.js} +26 -26
- package/dist/interface/ha/{PluginConsole-BeTXH3CA.js → PluginConsole-BHPYWTQI.js} +4 -4
- package/dist/interface/ha/{PluginDetail-DYwkpSJl.js → PluginDetail-CCanv1XC.js} +9 -9
- package/dist/interface/ha/{PluginSearch-CNvESsIW.js → PluginSearch-CN5u42N5.js} +43 -43
- package/dist/interface/ha/{PluginUpdateProgress-uTba6bsg.js → PluginUpdateProgress-CYIL5ZH9.js} +3 -3
- package/dist/interface/ha/{Plugins-IVwEtrWx.js → Plugins-Cej_rQF0.js} +7 -7
- package/dist/interface/ha/{Recordings-DQHW85Xb.js → Recordings-CUBsiex_.js} +39 -39
- package/dist/interface/ha/{SensorEdit-DTzTZ0Qx.js → SensorEdit-CHw_qb02.js} +3 -3
- package/dist/interface/ha/{SensorHistory-Dpol8a3B.js → SensorHistory-CN-cU83N.js} +2 -2
- package/dist/interface/ha/{Sensors-CcYkfpcW.js → Sensors-CsDHqjPN.js} +296 -296
- package/dist/interface/ha/{Settings-DOHd_Zfh.js → Settings-xYx7OlnI.js} +2 -2
- package/dist/interface/ha/{SettingsAccount-BlR20Jka.js → SettingsAccount-CS3pzQOR.js} +11 -11
- package/dist/interface/ha/{SettingsAppearance-BzJjEnql.js → SettingsAppearance-DJ7N-8pK.js} +3 -3
- package/dist/interface/ha/{SettingsBackup-QU7tBfCW.js → SettingsBackup-CIa5Xieg.js} +29 -29
- package/dist/interface/ha/{SettingsList-QfhxkhGx.js → SettingsList-B15eyCEc.js} +1 -1
- package/dist/interface/ha/{SettingsMqtt-Cn0-nvNq.js → SettingsMqtt-CAV58dIf.js} +3 -3
- package/dist/interface/ha/{SettingsNotifications-CFDrkIuj.js → SettingsNotifications-CaFA1fgA.js} +3 -3
- package/dist/interface/ha/{SettingsRecordings-BL5w_tTM.js → SettingsRecordings-CdU1gIj-.js} +4 -4
- package/dist/interface/ha/{SettingsRemote-CMKRVkmQ.js → SettingsRemote-CfZF4rVJ.js} +251 -251
- package/dist/interface/ha/{SettingsSystem-BZ0kjqI4.js → SettingsSystem-pAKtXD6a.js} +10 -10
- package/dist/interface/ha/{SettingsUsers-D_43q_Z9.js → SettingsUsers-bb02QZmu.js} +10 -10
- package/dist/interface/ha/{Terminal-D9aTmirQ.js → Terminal-D8nt8rJZ.js} +3 -3
- package/dist/interface/ha/{Updates-Ba7nwyPE.js → Updates-CN1ovwX3.js} +11 -11
- package/dist/interface/ha/{VariableInput-Ba8UmjLp.js → VariableInput-CknW9Awp.js} +1 -1
- package/dist/interface/ha/{VersionsHandler-aP1yiV6h.js → VersionsHandler-DL_zS-ms.js} +8 -8
- package/dist/interface/ha/{VirtualSensorCreate-DYip9rEZ.js → VirtualSensorCreate-DhYEEPoo.js} +1 -1
- package/dist/interface/ha/{Workers-0JfC-Rpb.js → Workers-22Qvr1uT.js} +9 -9
- package/dist/interface/ha/{api-DgV9VAO6.js → api-BqtwQvFZ.js} +4735 -4705
- package/dist/interface/ha/{api-BlYG2Y80.js → api-jFJQoLDe.js} +1 -1
- package/dist/interface/ha/{auth-BWXBL9G_.js → auth-DYjwhf8n.js} +1 -1
- package/dist/interface/ha/{automationBlueprint-6k7kFTOs.js → automationBlueprint-BinFQ4tN.js} +2 -2
- package/dist/interface/ha/cameraui-cards.js +1 -1
- package/dist/interface/ha/{cards-Nr4bm7Wh.js → cards-JO0NQxtH.js} +42 -41
- package/dist/interface/ha/{config-CPv6cFbP.js → config-BZ6AkzPk.js} +1 -1
- package/dist/interface/ha/{dist-Ca9_5rzq.js → dist-BQFunPaA.js} +281 -267
- package/dist/interface/ha/{mqtt-BKhgNbHr.js → mqtt-DvoRfg48.js} +1 -1
- package/dist/interface/ha/{notifications-DZioGp1d.js → notifications-BXyPUJeI.js} +1 -1
- package/dist/interface/ha/{plugins-CtPzLfvr.js → plugins-B7xVEI2U.js} +1 -1
- package/dist/interface/ha/{rooms-CKuaHJV7.js → rooms-wdWj7L04.js} +1 -1
- package/dist/interface/ha/{server-BWqoFAaO.js → server-BoeQx2s1.js} +1 -1
- package/dist/interface/ha/{types-C5EVK0o5.js → types-BLB8t9IM.js} +2 -2
- package/dist/interface/ha/{ungrouped-l7bhuZz1.js → ungrouped-BTlRpp_C.js} +11 -11
- package/dist/interface/ha/{updates-UPyHju8C.js → updates-DJQ3mgFB.js} +5 -5
- package/dist/interface/ha/{useAppVersion-B9trcrlI.js → useAppVersion-DBQHtFHV.js} +1 -1
- package/dist/interface/ha/{useLogsSocket-BDb1lLIi.js → useLogsSocket-DUVEzjQv.js} +1 -1
- package/dist/interface/ha/{useNavLayout-DaNSE-ip.js → useNavLayout-Tm6brv5T.js} +1 -1
- package/dist/interface/ha/{useServerRestart-Dj428ORg.js → useServerRestart-qfZkaizw.js} +1 -1
- package/dist/interface/ha/{useTabSwipe-CUN_ESGI.js → useTabSwipe-DZZV2CAu.js} +1 -1
- package/dist/interface/ha/{useUpdateChannel-CkvgjPZ9.js → useUpdateChannel-CAAsjUty.js} +2 -2
- package/dist/interface/ha/{useUpdatesSocket-5MdVL3-H.js → useUpdatesSocket-UVjukmiK.js} +1 -1
- package/dist/interface/ha/{useUserOptions-CypjzB3t.js → useUserOptions-fca_GryG.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/src/api/types/index.d.ts +1 -0
- package/dist/server/src/camera/decoder/event-manager.js +2 -1
- package/dist/server/src/camera/decoder/event-manager.js.map +1 -1
- package/dist/server/src/camera/decoder/event-trace.d.ts +2 -0
- package/dist/server/src/camera/decoder/event-trace.js +28 -1
- package/dist/server/src/camera/decoder/event-trace.js.map +1 -1
- package/package.json +5 -5
- package/dist/interface/assets/Automation-3b8p-NP7.js +0 -3
- package/dist/interface/assets/AutomationImport-Cof0ZgBr.js +0 -2
- package/dist/interface/assets/AutomationStore-DqwY7_JA.js +0 -2
- package/dist/interface/assets/AutomationStoreDetail-uFGvc8bB.js +0 -2
- package/dist/interface/assets/Automations-DdQcG0T5.js +0 -2
- package/dist/interface/assets/Camera-DYVLSEOo.js +0 -2
- package/dist/interface/assets/Camera-LSq1bWmA.css +0 -1
- package/dist/interface/assets/Camview-BkEubnjc.js +0 -1
- package/dist/interface/assets/Config-BpJm9zF3.js +0 -2
- package/dist/interface/assets/CuiBottomSheet-BBOwB5Zq.js +0 -1
- package/dist/interface/assets/CuiCameraPipCard-DdBfjmdR.js +0 -1
- package/dist/interface/assets/CuiCameraTable-CHr9p0ba.js +0 -1
- package/dist/interface/assets/CuiPluginCard-DG548RLO.js +0 -2
- package/dist/interface/assets/CuiPluginOAuthButton-DKJ_GwoH.js +0 -2
- package/dist/interface/assets/Faces-BN3LDg5D.js +0 -1
- package/dist/interface/assets/FirstSteps-CdEYgnJS.js +0 -1
- package/dist/interface/assets/Floorplan-C0DE4XmK.js +0 -1
- package/dist/interface/assets/Instances-ko7OBDH1.js +0 -1
- package/dist/interface/assets/Metrics-FaEC2O0W.js +0 -9
- package/dist/interface/assets/Plugin-CAOe6A6k.js +0 -1
- package/dist/interface/assets/PluginDetail-B7m8ItCA.js +0 -2
- package/dist/interface/assets/PluginSearch-Bz7yBDFM.js +0 -2
- package/dist/interface/assets/PluginSearch-COU0ZMPl.js +0 -1
- package/dist/interface/assets/Plugins-awtrDkXE.js +0 -1
- package/dist/interface/assets/Recordings-DmSUUu1g.js +0 -1
- package/dist/interface/assets/Sensors-JWeMNQk7.js +0 -2
- package/dist/interface/assets/SettingsAccount-BZUeNC1l.js +0 -1
- package/dist/interface/assets/SettingsAccount-C28fm0rI.js +0 -1
- package/dist/interface/assets/SettingsAppearance-BpBmVVsX.js +0 -1
- package/dist/interface/assets/SettingsBackup-Bwm-t1Bv.js +0 -1
- package/dist/interface/assets/SettingsRemote-DoEn1Sh8.js +0 -2
- package/dist/interface/assets/SettingsSystem-D9kKvgg7.js +0 -2
- package/dist/interface/assets/SettingsUsers-CiVQEe21.js +0 -1
- package/dist/interface/assets/Updates-DmgVULv6.js +0 -2
- package/dist/interface/assets/Workers-5z3GS0W5.js +0 -2
- package/dist/interface/assets/api-Cgd8B7dM.js +0 -4
- package/dist/interface/assets/cloudHandoff-KBagmIaI.js +0 -1
- package/dist/interface/assets/main-ByhmqKXq.js +0 -3
- package/dist/interface/assets/sensorIcons-DyhiORrB.js +0 -1
- package/dist/interface/assets/ungrouped-B8BjUBtt.js +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./esm-C0UOpApX.js","./vendor-capacitor-B-ykF6jr.js","./vendor-AX0A8AMd.js","./rolldown-runtime-C0FnF6B9.js","./esm-BvcRUTNT.js","./cloudHandoff-Colhf5P9.js","./api-Br1U09Hq.js","./vendor-cameraui-C5_h4c-5.js","./intercomService-CmFnb1sI.js","./vendor-zod-CJ7LAMqQ.js","./types-DJucLQEM.js","./alert-outline-DtiCgufF.js","./vendor-core-DeodbhZZ.js","./vendor-primevue-C9-jpd5L.js","./vendor-dnd-onyWAbsd.js","./close-ChGy_BeH.js","./vendor-draggabilly-B7q3Src-.js","./api-SOlhy6R4.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{$ as t,Ai as n,Ar as r,At as i,Br as a,Cr as o,Er as s,Ft as c,Gt as l,I as u,Ir as d,J as f,Jr as p,Lr as m,Lt as h,Mr as g,N as _,Ni as v,Or as y,P as b,Pr as x,Q as S,Tr as C,Vt as w,X as ee,Y as te,Z as ne,_r as re,_t as T,a as ie,aa as ae,ar as oe,at as E,bi as D,br as se,ca as O,ct as ce,dr as le,dt as ue,et as de,fr as fe,ft as pe,gr as k,gt as me,hr as he,ir as ge,it as _e,j as A,ji as j,jr as ve,jt as ye,ki as be,kr as xe,la as Se,lt as Ce,mi as we,mr as Te,n as Ee,nt as De,or as Oe,ot as ke,pi as Ae,pr as je,pt as Me,rr as Ne,rt as M,sa as Pe,sr as Fe,st as Ie,ti as Le,tt as Re,ut as ze,vr as Be,wr as Ve,xr as He,yi as Ue,yr as We,zt as Ge}from"./vendor-cameraui-C5_h4c-5.js";import{$ as Ke,$t as qe,An as N,Bn as Je,Bt as Ye,Cn as Xe,Cr as Ze,Dn as Qe,F as $e,Fn as et,Fr as tt,Gn as nt,Hn as rt,Lr as it,Lt as at,Nn as ot,P as st,Pn as ct,Pr as lt,Q as ut,Rn as dt,S as ft,Sn as pt,Sr as mt,Tn as ht,Tr as gt,Un as _t,V as vt,Vn as yt,Wn as bt,X as xt,Xn as St,Xt as Ct,Yn as wt,Z as Tt,_ as Et,_n as Dt,_r as Ot,_t as kt,b as At,d as jt,f as Mt,fn as Nt,fr as Pt,g as Ft,gn as It,gr as Lt,hn as Rt,hr as zt,i as Bt,kn as Vt,mr as Ht,n as Ut,nt as Wt,o as Gt,or as Kt,p as qt,r as Jt,rt as Yt,sr as Xt,t as Zt,u as Qt,vt as $t,w as en,wn as tn,wr as nn,x as rn,y as an,yr as on,zn as sn}from"./api-Br1U09Hq.js";import{$t as P,An as cn,Cn as ln,Dn as un,En as dn,H as fn,Hn as pn,In as mn,J as hn,Jt as gn,K as _n,Kn as F,Kt as I,Mn as L,Pn as R,Qn as vn,Qt as yn,Rn as bn,Rt as xn,Sn,Wn as Cn,Xn as z,Xt as wn,Yn as B,Zt as Tn,an as V,ar as En,b as Dn,dn as H,fn as U,gr as W,hr as G,in as K,jn as On,m as kn,mn as An,nr as jn,on as q,p as Mn,pr as Nn,q as Pn,qn as Fn,qt as In,rn as J,rr as Ln,sn as Y,sr as X,tn as Rn,ur as zn,v as Z,vr as Bn,wn as Vn,x as Hn,xn as Un,y as Q,yn as Wn,yr as $}from"./vendor-AX0A8AMd.js";import{a as Gn,i as Kn}from"./intercomService-CmFnb1sI.js";import{M as qn,N as Jn,O as Yn,P as Xn,Z as Zn,j as Qn,z as $n}from"./types-DJucLQEM.js";import{n as er,r as tr,t as nr}from"./lan-D9PCM8iA.js";import{d as rr,l as ir,n as ar,p as or,t as sr,u as cr}from"./vendor-core-DeodbhZZ.js";import{B as lr,C as ur,D as dr,E as fr,G as pr,H as mr,K as hr,L as gr,O as _r,R as vr,S as yr,U as br,V as xr,W as Sr,_ as Cr,a as wr,b as Tr,d as Er,f as Dr,j as Or,k as kr,l as Ar,m as jr,n as Mr,p as Nr,r as Pr,t as Fr,v as Ir,w as Lr,y as Rr,z as zr}from"./vendor-primevue-C9-jpd5L.js";import{a as Br,i as Vr,n as Hr,r as Ur,t as Wr}from"./vendor-dnd-onyWAbsd.js";import{t as Gr}from"./close-ChGy_BeH.js";import{t as Kr}from"./vendor-draggabilly-B7q3Src-.js";import{n as qr,t as Jr}from"./useBackupRestore-ARFlxu4a.js";import{n as Yr,t as Xr}from"./useServerRestart-B0ux2xXZ.js";import{t as Zr}from"./notifications-D4SOTDPx.js";import{t as Qr}from"./usePushRegistration-CR4ZsM1s.js";import{t as $r}from"./check-circle-DNTQ812v.js";import{t as ei}from"./alert-circle-We_nDFAy.js";import{t as ti}from"./useUpdatesSocket-BYOu1jFQ.js";import{t as ni}from"./minus-HH0UdIjG.js";import{t as ri}from"./power-C-XO8yWI.js";import{n as ii,t as ai}from"./eye-off-DAhBNvxJ.js";import{n as oi,t as si}from"./restore-D_Dq23W9.js";import{t as ci}from"./chevron-down-DqCuosKP.js";import{t as li}from"./api-ZL-_Y0-o.js";import{n as ui,r as di,t as fi}from"./useNavLayout-CB6pDWQI.js";import{n as pi}from"./theme-BTgw7al1.js";import{t as mi}from"./trash2-Czz-2j5D.js";import{a as hi,i as gi,r as _i,t as vi}from"./CuiSchema-Bhs017IB.js";import{t as yi}from"./plugins-Bxyydn6v.js";import{t as bi}from"./sensors-C4ZGeFC2.js";import{t as xi}from"./PluginSchema-D0stZt2c.js";import{t as Si}from"./trash-can-outline-_aiv_oEu.js";import{n as Ci,t as wi}from"./microphone-CGwzrMxl.js";import{t as Ti}from"./information-outline-CQ5e79wc.js";import{t as Ei}from"./plus-CxnlTOHI.js";import{t as Di}from"./rooms-DdSOohLs.js";import{a as Oi,i as ki,r as Ai,t as ji}from"./eventLabels-BsPoPWS9.js";import{a as Mi,c as Ni,i as Pi,l as Fi,n as Ii,s as Li}from"./cameraSources-BpaS7lCe.js";import{t as Ri}from"./delete-CiJ6ng5_.js";import{t as zi}from"./useStreamStatus-B13lBsjn.js";import{a as Bi,c as Vi,d as Hi,f as Ui,i as Wi,l as Gi,m as Ki,n as qi,o as Ji,p as Yi,r as Xi,s as Zi,t as Qi,u as $i}from"./CuiLightControl-DRNXOigw.js";import{t as ea}from"./cube-scan-BR5la6Qx.js";import{t as ta}from"./CuiDataTable-BozSktV7.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)}})(),ae(localStorage),Se(),typeof window<`u`&&window.addEventListener(`pagehide`,Pe);async function na(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:Lt(),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 ra(e){Pn.setEventListener(t=>F(()=>e.signal.value.kind===`online`||e.signal.value.kind===`degraded`,e=>t(e),{immediate:!0}))}var ia={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function aa(e,t){return L(),Y(`svg`,ia,[...t[0]||=[K(`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 oa=Ln({name:`mdi-fingerprint`,render:aa}),sa=`cameraui:unlocked`;function ca(){try{sessionStorage.setItem(sa,`1`)}catch{}}var la=X(!1),ua=X(!1);function da(){return{isLocked:la,isAvailable:ua,unlock:fa,init:pa}}async function fa(){return la.value=!1,ca(),!0}async function pa(){}var ma={key:0,class:`app-lock-overlay`},ha={class:`flex flex-col items-center gap-6 p-8`},ga={class:`text-center`},_a={class:`text-lg font-semibold`},va={class:`text-sm text-muted mt-2`},ya=N(An({__name:`CuiAppLockOverlay`,setup(e){let{isLocked:t,unlock:n}=da(),r=X(!1);async function i(){r.value=!0;try{await n()}finally{r.value=!1}}return F(t,async e=>{e&&(await Vn(),await i())},{immediate:!0}),(e,n)=>{let a=Ct,o=oa,s=Ge;return G(t)?(L(),Y(`div`,ma,[K(`div`,ha,[U(a,{class:`w-16 h-16 text-muted`}),K(`div`,ga,[K(`h2`,_a,$(e.$t(`views.app_lock.title`)),1),K(`p`,va,$(e.$t(`views.app_lock.subtitle`)),1)]),U(s,{label:e.$t(`views.app_lock.unlock`),loading:G(r),fluid:``,class:`cui-button-medium`,onClick:i},{icon:B(()=>[U(o,{class:`mr-2`})]),_:1},8,[`label`,`loading`])])])):q(``,!0)}}}),[[`__scopeId`,`data-v-baef4383`]]),ba={key:0,class:`cui-restore-overlay`},xa={class:`cui-restore-overlay__card shadow-xl`},Sa={class:`text-lg font-semibold`},Ca={class:`text-sm text-muted`},wa={class:`text-xs text-muted`},Ta=N(An({__name:`CuiRestoreOverlay`,setup(e){let{t}=a(),{active:n,phase:r,uploadPercent:i}=qr(),o=J(()=>{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 a=Er;return L(),V(I,{name:`fade`},{default:B(()=>[G(n)?(L(),Y(`div`,ba,[K(`div`,xa,[U(G(Hn),{src:G(Qt)(`logo_animated.svg`),width:`52px`,height:`58px`,title:`camera.ui`,"aria-label":`camera.ui`},null,8,[`src`]),K(`span`,Sa,$(e.$t(`restore.title`)),1),K(`span`,Ca,$(G(o)),1),G(r)===`uploading`?(L(),V(a,{key:0,value:G(i),class:`w-full`},null,8,[`value`])):(L(),V(a,{key:1,mode:`indeterminate`,class:`w-full`,style:{height:`6px`}})),K(`span`,wa,$(e.$t(`restore.dont_close`)),1)])])):q(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-0c1a6c8d`]]),Ea={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Da(e,t){return L(),Y(`svg`,Ea,[...t[0]||=[K(`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 Oa=Ln({name:`mdi-bell-off-outline`,render:Da}),ka=Gn(`PushSync`),Aa=`cui.push.syncDismissed`,ja=X(!1),Ma=X(!1),Na=!1;function Pa(){let e=Ft(),{isLoggedIn:t}=or(e),{registerForPush:n,getSyncState:r,restoreMarker:i}=Qr(),a=new Zr,{data:o}=a.getSettingsQuery(),{data:s}=a.listDevicesQuery(()=>!1),c=J(()=>!1);async function l(){if(!(!c.value||Na)){Na=!0;try{let e=Pt();if(!e)return;let t=await r(e,s.value);if(t.status!==`key-mismatch`){ja.value=!1,t.status===`registered`&&t.device&&(await i(e,t.device.id),await Ra(e));return}if(await u()){ja.value=!1;return}ja.value=!await Ia(e)}catch(e){ka.warn(`could not evaluate push sync state:`,e)}finally{Na=!1}}}async function u(){try{let{FirebaseMessaging:e}=await xn(async()=>{let{FirebaseMessaging:e}=await import(`./esm-C0UOpApX.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 ka.warn(`silent push repair failed:`,e),!1}}async function d(){Ma.value=!0;try{await n(),await a.queryClient.invalidateQueries({queryKey:[`notifications`,`devices`]}),ja.value=!1}catch(e){ka.warn(`push repair failed:`,e)}finally{Ma.value=!1}}async function f(){ja.value=!1;let e=Pt();e&&await La(e)}return F([c,s],()=>l(),{immediate:!0}),{needsAction:J(()=>ja.value&&c.value),repairing:J(()=>Ma.value),repair:d,dismiss:f}}async function Fa(){try{let{Preferences:e}=await xn(async()=>{let{Preferences:e}=await import(`./esm-BvcRUTNT.js`);return{Preferences:e}},__vite__mapDeps([4,1,2,3]),import.meta.url),{value:t}=await e.get({key:Aa});return t?JSON.parse(t):{}}catch{return{}}}async function Ia(e){return(await Fa())[e]===!0}async function La(e){await za(e,!0)}async function Ra(e){(await Fa())[e]&&await za(e,!1)}async function za(e,t){try{let{Preferences:n}=await xn(async()=>{let{Preferences:e}=await import(`./esm-BvcRUTNT.js`);return{Preferences:e}},__vite__mapDeps([4,1,2,3]),import.meta.url),r=await Fa();t?r[e]=!0:delete r[e],await n.set({key:Aa,value:JSON.stringify(r)})}catch{}}var Ba={class:`cui-push-sync-indicator__content`},Va={class:`cui-push-sync-indicator__text`},Ha=N(An({__name:`CuiPushSyncIndicator`,setup(e){let{t}=a(),{bottombarHeight:n}=ct(),{needsAction:r,repairing:i,repair:o,dismiss:s}=Pa(),{updateAvailable:l}=ft(),u=gt(),d=J(()=>r.value&&u.bannerMode.value===null&&!l.value),f=J(()=>`calc(${n.value}px + 1rem + env(safe-area-inset-bottom, 0px))`);return(e,n)=>{let r=c,a=Oa,l=Ge,u=Gr;return L(),V(I,{name:`fade`},{default:B(()=>[G(d)?(L(),Y(`div`,{key:0,class:`cui-push-sync-indicator shadow-xl`,style:Bn({bottom:G(f)})},[K(`div`,Ba,[G(i)?(L(),V(r,{key:0,class:`cui-push-sync-indicator__spinner`,"stroke-width":`5`})):(L(),V(a,{key:1,class:`cui-push-sync-indicator__icon`})),K(`span`,Va,$(G(t)(`components.push_sync.title`)),1),G(i)?q(``,!0):(L(),V(l,{key:2,size:`small`,class:`cui-push-sync-indicator__button`,label:G(t)(`components.push_sync.action`),onClick:G(o)},null,8,[`label`,`onClick`])),G(i)?q(``,!0):(L(),V(l,{key:3,severity:`secondary`,text:``,rounded:``,size:`small`,class:`cui-push-sync-indicator__dismiss`,"aria-label":G(t)(`components.push_sync.dismiss`),onClick:G(s)},{icon:B(()=>[U(u,{class:`w-4 h-4`})]),_:1},8,[`aria-label`,`onClick`]))])],4)):q(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-335a3ce0`]]),Ua={class:`cui-updates-indicator__content`},Wa={class:`cui-updates-indicator__text`},Ga=4e3,Ka=N(An({__name:`CuiUpdatesIndicator`,setup(e){let t=cr(),{t:n}=a(),{bottombarHeight:r}=ct(),i=ti(),o=Ft(),{isLoggedIn:s,user:l}=or(o),u=X(!1),d,f=J(()=>l.value?.role===`admin`||l.value?.role===`master`),p=i.status,m=J(()=>p.value?.items.filter(e=>e.status===`updating`)??[]),h=J(()=>p.value?.items.some(e=>e.status===`restarting`)===!0),g=J(()=>p.value?.items.filter(e=>e.status===`error`).length??0),_=J(()=>p.value?.updating===!0),v=J(()=>p.value?.runActive===!0),y=J(()=>p.value?.items.filter(e=>e.status===`success`||e.status===`error`).length??0),b=J(()=>p.value?.items.length??0),x=J(()=>s.value&&!h.value&&(_.value||u.value)),S=J(()=>u.value?g.value>0?n(`views.updates.indicator_failed`,{count:g.value}):n(`views.updates.indicator_done`):v.value&&m.value[0]?n(`views.updates.indicator_running`,{name:te(m.value[0]),done:y.value+1,total:b.value}):m.value.length>1?n(`views.updates.indicator_running_many`,{count:m.value.length}):m.value[0]?n(`views.updates.run_updating`,{name:te(m.value[0])}):n(`views.updates.indicator_preparing`)),C=J(()=>`calc(${r.value}px + 1rem + env(safe-area-inset-bottom, 0px))`);function w(){f.value&&t.push(`/updates`)}function ee(){d!==void 0&&(clearTimeout(d),d=void 0),u.value=!1}function te(e){return e.displayName||e.name}return F(s,e=>{e?i.connect():ee()},{immediate:!0}),F(_,(e,t)=>{t&&!e?(u.value=!0,clearTimeout(d),d=setTimeout(ee,Ga)):e&&ee()}),On(()=>{clearTimeout(d)}),(e,t)=>{let n=c,r=ei,i=$r;return L(),V(I,{name:`fade`},{default:B(()=>[G(x)?(L(),Y(`div`,{key:0,class:W([`cui-updates-indicator shadow-xl`,{"cursor-pointer":G(f)}]),style:Bn({bottom:G(C)}),onClick:w},[K(`div`,Ua,[G(u)?G(g)>0?(L(),V(r,{key:1,class:`w-5 h-5 shrink-0 text-red-500`})):(L(),V(i,{key:2,class:`w-5 h-5 shrink-0 text-success`})):(L(),V(n,{key:0,class:`!w-5 !h-5 shrink-0`,"stroke-width":`5`})),K(`span`,Wa,$(G(S)),1)])],6)):q(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-e87759b0`]]),qa={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ja(e,t){return L(),Y(`svg`,qa,[...t[0]||=[K(`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 Ya=Ln({name:`iconoir-download`,render:Ja}),Xa={class:`cui-update-indicator__content`},Za={class:`cui-update-indicator__text`},Qa=N(An({__name:`CuiUpdateIndicator`,setup(e){let{t}=a(),{bottombarHeight:n}=ct(),{updateAvailable:r,isApplying:i,applyUpdate:o}=ft(),s=Ft(),{isLoggedIn:l}=or(s),u=gt(),d=J(()=>l.value&&r.value&&u.bannerMode.value===null),f=J(()=>`calc(${n.value}px + 1rem + env(safe-area-inset-bottom, 0px))`);function p(){o()}return(e,n)=>{let r=c,a=Ya,o=Ge;return L(),V(I,{name:`fade`},{default:B(()=>[G(d)?(L(),Y(`div`,{key:0,class:`cui-update-indicator shadow-xl`,style:Bn({bottom:G(f)})},[K(`div`,Xa,[G(i)?(L(),V(r,{key:0,class:`cui-update-indicator__spinner`,"stroke-width":`5`})):(L(),V(a,{key:1,class:`cui-update-indicator__icon`})),K(`span`,Za,$(G(i)?G(t)(`components.toast.update_applying`):G(t)(`components.toast.update_available_title`)),1),G(i)?q(``,!0):(L(),V(o,{key:2,size:`small`,class:`cui-update-indicator__button`,label:G(t)(`components.toast.update_now`),onClick:p},null,8,[`label`]))])],4)):q(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-8ce1000d`]]),$a={class:`cui-connection-indicator__content`},eo={class:`cui-connection-indicator__text`},to=3e3,no=N(An({__name:`CuiConnectionIndicator`,setup(e){let{t}=a(),{bottombarHeight:n}=ct(),{bannerMode:r,inTrouble:i,isOnline:o,target:s}=gt(),{restarting:l}=Yr(),u=Jt(),d=Ft(),{isLoggedIn:f}=or(d),p=X(null),m=X(null),h,g=J(()=>`calc(${n.value}px + 1rem + env(safe-area-inset-bottom, 0px))`),_=J(()=>f.value&&(r.value!==null||l.value)),v=J(()=>r.value===`connecting`?t(`connection.connecting_remote`):r.value===`degraded`?t(`connection.degraded`):r.value===null?t(`connection.restarting`):t(`connection.reconnecting`)),y=J(()=>{if(!f.value||!o.value)return null;let e=s.value?.endpoint;return e?tr(e,u)?`lan`:`wan`:null}),b=J(()=>p.value===`lan`?t(`connection.connected_lan`):t(`connection.connected_wan`)),x=J(()=>p.value===`lan`?nr:er),S=J(()=>p.value===`lan`?`text-success`:`text-info`),C=J(()=>i.value&&u===`cloud`);function w(){h!==void 0&&(clearTimeout(h),h=void 0),p.value=null}async function ee(){let{bounceToCloudFrontend:e}=await xn(async()=>{let{bounceToCloudFrontend:e}=await import(`./cloudHandoff-Colhf5P9.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 F(y,e=>{!e||e===m.value||(m.value=e,w(),p.value=e,h=setTimeout(w,to))}),F(_,e=>{e&&w()}),F(f,e=>{e||(w(),m.value=null)}),On(()=>{w()}),(e,n)=>{let r=c,i=$e,a=Ge;return L(),V(I,{name:`fade`},{default:B(()=>[G(_)||G(p)?(L(),Y(`div`,{key:0,class:`cui-connection-indicator shadow-xl`,style:Bn({bottom:G(g)})},[K(`div`,$a,[G(_)?(L(),V(r,{key:0,class:`!w-5 !h-5 shrink-0`,"stroke-width":`5`})):(L(),V(bn(G(x)),{key:1,class:W([`w-5 h-5 shrink-0`,G(S)])},null,8,[`class`])),K(`span`,eo,$(G(_)?G(v):G(b)),1),G(_)&&G(C)?(L(),V(a,{key:2,size:`small`,rounded:``,class:`cui-connection-indicator__button`,"aria-label":G(t)(`connection.pick_server`),onClick:ee},{default:B(()=>[U(i,{class:`w-4 h-4`})]),_:1},8,[`aria-label`])):q(``,!0)])],4)):q(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-b51a08be`]]),ro={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function io(e,t){return L(),Y(`svg`,ro,[...t[0]||=[K(`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 ao=Ln({name:`mdi-unfold-less-vertical`,render:io}),oo={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function so(e,t){return L(),Y(`svg`,oo,[...t[0]||=[K(`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 co=Ln({name:`mdi-unfold-more-horizontal`,render:so}),lo={class:`fixed flex flex-row items-center z-[99999] top-0 left-[7px] gap-2 p-2 pl-[0.4rem]! non-draggable-region`},uo=N(An({__name:`CuiWindowButtons`,setup(e){let{electron:t}=Kn(),n=X(!1),r=X(!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 cn(()=>{t?.on(`fullscreen`,s)}),un(()=>{t?.removeListener(`fullscreen`,s)}),(e,t)=>{let s=Gr,c=ni,l=co,u=ao;return z((L(),Y(`div`,lo,[K(`div`,{class:`close-button`,onClick:a},[U(s,{color:`#7f050a`,width:`100%`,height:`100%`,class:W([`transition-opacity opacity-0`,{"opacity-100":G(n)}])},null,8,[`class`])]),K(`div`,{class:W({"disabled-button":G(r),"minify-button":!G(r)}),onClick:i},[G(r)?q(``,!0):(L(),V(c,{key:0,color:`#995712`,width:`100%`,height:`100%`,class:W([`transition-opacity opacity-0`,{"opacity-100":G(n)}])},null,8,[`class`]))],2),K(`div`,{class:`expand-button`,style:Bn(`${G(r)?`transform: rotate(45deg)`:`transform: rotate(-45deg)`}`),onClick:o},[G(r)?(L(),V(u,{key:1,color:`#0d650d`,width:`100%`,height:`100%`,class:W([`transition-opacity opacity-0`,{"opacity-100":G(n)}])},null,8,[`class`])):(L(),V(l,{key:0,color:`#0d650d`,width:`100%`,height:`100%`,class:W([`transition-opacity opacity-0`,{"opacity-100":G(n)}])},null,8,[`class`]))],4)])),[[G(sr),e=>n.value=e]])}}}),[[`__scopeId`,`data-v-d1e31a06`]]),fo={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function po(e,t){return L(),Y(`svg`,fo,[...t[0]||=[K(`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 mo=Ln({name:`mdi-backup-restore`,render:po}),ho={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function go(e,t){return L(),Y(`svg`,ho,[...t[0]||=[K(`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 _o=Ln({name:`mdi-drag`,render:go}),vo=72,yo=18;function bo(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<vo?r.scrollTop-=xo(vo-t):a<vo&&(r.scrollTop+=xo(vo-a))}function s(){if(r=So(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}F(t,e=>e?s():c()),un(c)}function xo(e){return Math.ceil(Math.min(e,vo)/vo*yo)}function So(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 Co=An({__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=X(null),[r,i]=Vr(()=>({type:`nav-item`,item:()=>({name:t.name}),collect:e=>({isDragging:e.isDragging()})})),[,a]=Ur(()=>({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=J(()=>r.value.isDragging);bo(n,o);function s(e){n.value=e,i(a(e))}return(t,n)=>{let r=ai,i=ii,a=Ge,c=_o;return L(),Y(`div`,{ref:s,class:W([`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?(L(),V(bn(e.icon),{key:0,class:`w-[22px] h-[22px] shrink-0`})):q(``,!0),e.expanded?(L(),Y(`span`,{key:1,class:W([`text-sm truncate flex-1 text-left`,{"line-through":e.hidden}])},$(e.label),3)):q(``,!0),e.hideable&&e.expanded?(L(),V(a,{key:2,text:``,rounded:``,severity:`secondary`,class:`cui-icon-md shrink-0 !text-[#a4a4a4]`,onClick:n[0]||=yn(e=>t.$emit(`toggle-hidden`),[`stop`])},{icon:B(()=>[e.hidden?(L(),V(r,{key:0,width:`100%`,height:`100%`})):(L(),V(i,{key:1,width:`100%`,height:`100%`}))]),_:1})):q(``,!0),e.expanded?(L(),V(c,{key:3,class:`w-[18px] h-[18px] shrink-0 opacity-60`})):q(``,!0)],2)}}}),wo=An({__name:`CuiNavbarEditGroupLabel`,props:{group:{},label:{},first:{type:Boolean},moveToEnd:{type:Function}},setup(e){let t=e,[n,r]=Ur(()=>({accept:`nav-item`,hover({name:e}){t.moveToEnd(e,t.group)},collect:e=>({isOver:e.isOver()})})),i=J(()=>n.value.isOver);function a(e){r(e)}return(t,n)=>(L(),Y(`div`,{ref:a,class:W([`w-full flex items-center h-[26px] mb-1 rounded-lg transition-colors`,[{"mt-4":!e.first},G(i)?`bg-white/5`:``]])},[K(`span`,{class:W([`pl-[14px] text-[11px] font-semibold uppercase tracking-widest whitespace-nowrap`,G(i)?`text-primary-500`:`text-[#7a7a7a]`])},$(e.label),3)],2))}}),To={key:0,class:`shrink-0 relative left-[-9px]`},Eo={key:1,class:`shrink-0`},Do={key:2,class:`shrink-0`},Oo={key:0,class:`overflow-hidden flex-1 ml-10`},ko={class:`flex flex-row items-center justify-between`},Ao={class:`text-start flex-1`},jo={key:0,class:`text-xs text-muted`},Mo=N(An({__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=ir(),r=Ft(),{icon:i,iconSize:a,iconClass:o,activeIcon:s,avatarSize:c,avatar:u,labelClass:d,label:f,description:p,expanded:m,to:h,showLogout:g,darkMode:_,buttonProps:v,showTooltip:y,fallbackActivePath:b,activeColor:x,activeIconColor:S,bottomBar:C}=Nn(t),w=J(()=>n.path===h.value||h.value!==`/`&&(n.path.startsWith(h.value+`/`)||n.path.startsWith((b.value??h.value)+`/`)));function ee(){r.logout()}return(e,t)=>{let n=It,r=ri,b=Ge,te=mn(`RouterLink`),ne=l;return L(),V(te,{to:G(h)},{default:B(({isActive:e})=>[z((L(),V(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(u),"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:B(()=>[K(`div`,{class:W([`flex items-center justify-center h-full`,{"absolute left-[14px]":!G(C)}])},[G(u)?(L(),Y(`div`,To,[U(n,{src:G(u),size:G(c),style:Bn({width:`${G(c)}px`,height:`${G(c)}px`})},null,8,[`src`,`size`,`style`])])):G(i)&&!e&&!G(w)||!G(s)?(L(),Y(`div`,Eo,[U(G(i),{class:W(G(o)),style:Bn({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))?(L(),Y(`div`,Do,[U(G(s),{style:Bn({width:`${G(a)}px`,height:`${G(a)}px`,color:G(S)})},null,8,[`style`])])):q(``,!0)],2),U(I,{name:`fade`},{default:B(()=>[G(m)?(L(),Y(`div`,Oo,[K(`div`,ko,[K(`div`,Ao,[K(`div`,{class:W([`text-sm max-w-100 truncate font-semibold`,[G(d),{"text-color font-bold":G(u)}]])},$(G(f)),3),G(p)?(L(),Y(`div`,jo,$(G(p)),1)):q(``,!0)]),G(g)?(L(),V(b,{key:0,text:``,rounded:``,class:`dark-mode cui-icon-md`,onClick:yn(ee,[`stop`,`prevent`])},{icon:B(()=>[U(r,{width:`100%`,height:`100%`})]),_:1})):q(``,!0)])])):q(``,!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`]]),{isElectronApp:No}=Kn(),Po=No?25:0,Fo={CLOSED:0,MINIFIED:60,EXPANDED:288},Io=En({serverUpdateAvailable:!1,pluginUpdateAvailable:!1,workerUpdateAvailable:!1,serverUpdate:null,pluginUpdates:[]}),Lo=null,Ro=null;async function zo(){if(Ro?.ready.value)try{let e=await Ro.request(`get-updates`);Io.pluginUpdates=e.plugins,Io.pluginUpdateAvailable=e.plugins.length>0,Io.serverUpdate=e.server,Io.serverUpdateAvailable=e.server.updateAvailable||e.server.betaUpdateAvailable||!1,Io.workerUpdateAvailable=e.workerUpdateAvailable??!1}catch{}}function Bo(){return Ro||(Lo=vn(!0),Lo.run(()=>{let e=Ht(`/server`);Ro=e,e.on(`plugin-updates`,e=>{Io.pluginUpdates=e,Io.pluginUpdateAvailable=e.length>0}),e.on(`server-updates`,e=>{Io.serverUpdate=e,Io.serverUpdateAvailable=e.updateAvailable||e.betaUpdateAvailable||!1}),e.on(`worker-updates`,e=>{Io.workerUpdateAvailable=e.updateAvailable}),e.onReady(()=>{zo()})}),Ro)}function Vo(){function e(){Bo()}function t(){}return{isConnected:J(()=>Ro?.connected.value??!1),serverUpdateAvailable:J(()=>Io.serverUpdateAvailable),pluginUpdateAvailable:J(()=>Io.pluginUpdateAvailable),workerUpdateAvailable:J(()=>Io.workerUpdateAvailable),serverUpdate:J(()=>Io.serverUpdate),pluginUpdates:J(()=>Io.pluginUpdates),connect:e,disconnect:t,fetchUpdates:zo}}var Ho={class:`h-full flex flex-col overflow-hidden`},Uo={class:`w-full flex items-center shrink-0 h-[60px]`},Wo={class:`overflow-hidden w-full pr-4`},Go={key:0,class:`ml-2 w-full flex flex-row items-center`},Ko={class:`flex flex-col flex-1 min-h-0 overflow-y-auto overflow-x-hidden mt-4 px-1 pb-2`},qo={class:`flex flex-col space-y-1`},Jo={class:`flex items-center h-full absolute left-[14px] gap-3`},Yo={key:2,class:`text-[11px] font-semibold uppercase tracking-widest whitespace-nowrap`},Xo={key:0,class:`pl-[17px] text-[11px] font-semibold uppercase tracking-widest text-[#7a7a7a] whitespace-nowrap`},Zo={key:1,class:`w-[22px] mx-auto border-t border-[#313131]`},Qo={key:0,class:`flex flex-col space-y-1 overflow-hidden`},$o={class:`flex flex-col space-y-1`},es={class:`flex items-center h-full absolute left-[14px] gap-3`},ts={key:2,class:`text-[11px] font-semibold uppercase tracking-widest whitespace-nowrap`},ns={key:0,class:`pl-[17px] text-[11px] font-semibold uppercase tracking-widest text-[#7a7a7a] whitespace-nowrap`},rs={key:1,class:`w-[22px] mx-auto border-t border-[#313131]`},is={key:0,class:`flex flex-col space-y-1 overflow-hidden`},as={class:`flex flex-col flex-1`},os={class:`flex flex-col space-y-1`},ss={key:0,class:`shrink-0 px-1 pb-4`},cs={key:0,class:`w-full h-[50px]`},ls={class:`w-full h-[50px] relative`},us={key:1,class:`shrink-0 flex flex-col gap-2 px-1 pt-2 pb-2`},ds=N(An({__name:`CuiNavbar`,setup(e,{expose:t}){let r=new li,i=cr(),{bus:a}=dt(),{mdBreakpoint:o,xlBreakpoint:s}=ot(),{navbarState:c}=ct(),{isElectronApp:u,electron:d}=Kn(),{isTouch:f}=et(),m=Vo(),{entries:h,groups:g,settingsInNav:_,isCollapsible:v,isHidden:y,toggleHidden:b,persistOrder:x,resetOrder:S}=di(),C=Ft(),{user:ee}=or(C),te=yt(),{uiSettings:ne}=or(te),{data:re}=r.apiInfoQuery(),T=Cn(`navbarRef`),ie=X(`closed`),ae=X(!1),oe=X(!1),E=X(!1),D=X({main:!0,manage:!0,system:!1,settings:!1}),se=X(!1),O=X({main:[],manage:[],system:[],settings:[]}),ce=J(()=>ae.value||oe.value||E.value),le=J(()=>re.value?.electron??!1),ue=J(()=>u&&le.value),de=J(()=>{let e=ne.value.interface.selectedSettingsView;return Je.includes(e)?e:`account`}),fe=J(()=>At.filter(e=>e.meta?.navbar?.position===`bottom`&&!e.meta?.navbar?.group&&pt(e)&&!j(e))),pe=J(()=>ve([`main`,`manage`])),k=J(()=>ve([`system`,`settings`])),me=J(()=>_.value?fi:ui),he=J(()=>f.value?Wr:Hr),ge=J(()=>f.value?{enableMouseEvents:!0}:void 0),_e=J(()=>ne.value.interface.navbarStayCollapsed&&ie.value!==`opened`?`closed`:s.value?`opened`:ie.value),A=J(()=>_e.value===`closed`?o.value?Fo.CLOSED:Fo.MINIFIED:Fo.EXPANDED);function j(e){return le.value&&!!e.meta?.disabledInElectron}function ve(e){let t=[];for(let n of e){if(n===`settings`&&!_.value)continue;let e=g.value[n].filter(e=>!j(e.route)&&!y(e.name));e.length&&t.push({key:n,items:e,collapsible:v(n),first:t.length===0})}return t}function ye(e){return g.value[e].some(e=>i.currentRoute.value.path===e.to||i.currentRoute.value.path.startsWith(e.to+`/`))}function be(e){D.value[e]=!D.value[e],D.value[e]&&e===`system`?setTimeout(()=>{let e=T.value?.firstElementChild;e&&e.scrollTo({top:e.scrollHeight,behavior:`smooth`})},250):D.value[e]||setTimeout(()=>Ne(),250)}function xe(){O.value={main:g.value.main.map(e=>e.name),manage:g.value.manage.map(e=>e.name),system:g.value.system.map(e=>e.name),settings:g.value.settings.map(e=>e.name)}}function Se(){xe(),se.value=!0,a.emit({navbarState:`opened`})}function Ce(){x(O.value),se.value=!1}function Te(){S(),xe()}function Ee(e){return h.value.find(t=>t.name===e)}function De(e){for(let t of fi){let n=O.value[t].indexOf(e);if(n>=0)return{group:t,index:n}}}function Oe(e,t,n){let r=De(e);r&&(O.value[r.group].splice(r.index,1),O.value[t].splice(n,0,e))}function ke(e,t){let n=De(e);n&&(n.group!==t||n.index!==O.value[t].length-1)&&(O.value[n.group].splice(n.index,1),O.value[t].push(e))}function Ae(){a.emit({navbarState:`closed`})}function je(e,t){ue.value&&t.channel===`update-check`&&t.status===`available`&&(ae.value=!0)}async function Me(){if(ue.value){d.removeListener(`app-status`,je),d.on(`app-status`,je),d.send(`check-for-updates`);try{let e=await d.invoke(`get-update-available`);ae.value=e.isUpdateAvailable}catch{}}}function Ne(){Vn(()=>{let e=T.value?.querySelector(`.navitem-active`);e&&e.scrollIntoView({block:`center`,behavior:`smooth`})})}let M=n(Ne,100);return p(T,e=>{if(_e.value!==`opened`)return;let t=e.target,n=t.closest(`#menu-icon`),r=t.closest(`#submenu-icon`),i=t.closest(`#navbar-icon`);!n&&!r&&!i&&Ae()}),we(T,()=>{M()}),F(_e,e=>{se.value&&e!==`opened`&&Ce()}),F(()=>i.currentRoute.value.path,()=>{for(let e of fi)ye(e)&&(D.value[e]=!0)},{immediate:!0}),F(m.serverUpdateAvailable,e=>{ue.value||(ae.value=e)},{immediate:!0}),F(ue,e=>{e&&Me()},{immediate:!0}),F(m.pluginUpdateAvailable,e=>{oe.value=e}),F(m.workerUpdateAvailable,e=>{E.value=e}),F(c,e=>{e&&e!==ie.value&&(ie.value=e===`minified`||e===`closed`?`closed`:`opened`)},{immediate:!0}),F(i.currentRoute,(e,t)=>{e.path!==t.path&&Ae()}),F(ee,()=>{ee.value?.role===`admin`||ee.value?.role===`master`?m.connect():m.disconnect()},{deep:!0,immediate:!0}),cn(()=>{Ne()}),On(()=>{d?.removeListener(`app-status`,je)}),t({navbarState:_e}),(e,t)=>{let n=mn(`RouterLink`),r=qe,i=Ge,a=ci,s=oi,c=Mo,u=w,d=wo,f=Co,p=ri,m=mo,h=Nt,g=l;return L(),Y(`nav`,{ref_key:`navbarRef`,ref:T,class:W([`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(o)&&G(A)===G(Fo).EXPANDED}]),style:Bn({top:`calc(max(8px, env(safe-area-inset-top, 0px)) + ${G(Po)}px)`,left:G(A)===G(Fo).CLOSED?`-2px`:`max(8px, env(safe-area-inset-left, 0px))`,width:`${G(A)}px`,height:`calc(100dvh - max(8px, env(safe-area-inset-top, 0px)) - max(8px, env(safe-area-inset-bottom, 0px)) - ${G(Po)}px)`,viewTransitionName:`cui-navbar`})},[K(`div`,Ho,[K(`div`,Uo,[U(n,{to:`/`,class:`pl-[13px]`},{default:B(()=>[U(G(Hn),{src:G(Qt)(`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}),K(`div`,Wo,[U(I,{name:`fade`},{default:B(()=>[G(A)===G(Fo).EXPANDED?(L(),Y(`div`,Go,[U(n,{to:`/`,class:`text-white font-bold text-lg text-shadow`},{default:B(()=>[...t[1]||=[H(`camera.ui`,-1)]]),_:1}),G(se)?q(``,!0):z((L(),V(i,{key:0,text:``,rounded:``,severity:`secondary`,class:`dark-mode cui-icon-md ml-auto !text-[#a4a4a4] hover:!text-white`,onClick:Se},{icon:B(()=>[U(r,{class:`!w-[16px] !h-[16px]`})]),_:1})),[[g,e.$t(`navigation.edit_nav`),void 0,{bottom:!0}]])])):q(``,!0)]),_:1})])]),K(`div`,Ko,[G(se)?(L(),V(G(Br),{key:1,backend:G(he),options:G(ge)},{default:B(()=>[K(`div`,as,[K(`div`,os,[(L(!0),Y(P,null,R(G(me),t=>(L(),Y(P,{key:`edit-${t}`},[U(d,{group:t,label:e.$t(`navigation.group_${t}`),first:t===`main`,"move-to-end":ke},null,8,[`group`,`label`,`first`]),U(In,{name:`nav-edit`,tag:`div`,class:`relative flex flex-col space-y-1`},{default:B(()=>[(L(!0),Y(P,null,R(G(O)[t],t=>(L(),V(f,{key:t,name:t,icon:Ee(t)?.icon,label:e.$t(`navigation.${Ee(t)?.labelKey??t.toLowerCase()}`),expanded:G(A)===G(Fo).EXPANDED,hideable:Ee(t)?.kind===`settings`,hidden:G(y)(t),"find-item":De,"move-item":Oe,onToggleHidden:e=>G(b)(t)},null,8,[`name`,`icon`,`label`,`expanded`,`hideable`,`hidden`,`onToggleHidden`]))),128))]),_:2},1024)],64))),128))])])]),_:1},8,[`backend`,`options`])):(L(),Y(P,{key:0},[K(`div`,qo,[(L(!0),Y(P,null,R(G(pe),t=>(L(),Y(P,{key:t.key},[t.collapsible?(L(),Y(`div`,{key:0,class:W([`w-full h-[50px]`,{"mt-5":!t.first}])},[U(i,{text:``,severity:`secondary`,class:W([`cui-button navitem-button w-full h-full flex items-center justify-center dark-mode`,{"!text-white navitem-active":G(D)[t.key]||ye(t.key),"hover:!text-color active:!text-color focus:!text-color navitem-inactive":!G(D)[t.key]&&!ye(t.key)}]),style:{color:`#a4a4a4`},onClick:e=>be(t.key)},{default:B(()=>[K(`div`,Jo,[G(D)[t.key]?(L(),V(a,{key:0,class:`w-[22px] h-[22px]`})):(L(),V(s,{key:1,class:`w-[22px] h-[22px]`})),G(A)===G(Fo).EXPANDED?(L(),Y(`span`,Yo,$(e.$t(`navigation.group_${t.key}`)),1)):q(``,!0)])]),_:2},1032,[`class`,`onClick`])],2)):t.key===`main`?q(``,!0):(L(),Y(`div`,{key:1,class:W([`w-full flex items-center h-[26px] mb-1`,{"mt-5":!t.first}])},[G(A)===G(Fo).EXPANDED?(L(),Y(`span`,Xo,$(e.$t(`navigation.group_${t.key}`)),1)):(L(),Y(`div`,Zo))],2)),U(I,{name:`navbar-group`},{default:B(()=>[!t.collapsible||G(D)[t.key]?(L(),Y(`div`,Qo,[(L(!0),Y(P,null,R(t.items,t=>(L(),Y(`div`,{key:t.name,class:`w-full h-[50px] relative`},[U(c,{icon:t.icon,"active-icon":t.activeIcon,to:t.to,label:e.$t(`navigation.${t.labelKey}`),expanded:G(A)===G(Fo).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:W([`w-[50px] h-[50px]`,{"w-full":G(A)===G(Fo).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`label`,`expanded`,`class`])]))),128))])):q(``,!0)]),_:2},1024)],64))),128))]),t[2]||=K(`div`,{class:`flex-1 mt-10`},null,-1),K(`div`,$o,[(L(!0),Y(P,null,R(G(k),t=>(L(),Y(P,{key:t.key},[t.collapsible?(L(),Y(`div`,{key:0,class:W([`w-full h-[50px]`,{"mt-5":!t.first}])},[U(i,{text:``,severity:`secondary`,class:W([`cui-button navitem-button w-full h-full flex items-center justify-center dark-mode`,{"!text-white navitem-active":G(D)[t.key]||ye(t.key),"hover:!text-color active:!text-color focus:!text-color navitem-inactive":!G(D)[t.key]&&!ye(t.key)}]),style:{color:`#a4a4a4`},onClick:e=>be(t.key)},{default:B(()=>[K(`div`,es,[G(D)[t.key]?(L(),V(a,{key:0,class:`w-[22px] h-[22px]`})):(L(),V(s,{key:1,class:`w-[22px] h-[22px]`})),G(A)===G(Fo).EXPANDED?(L(),Y(`span`,ts,$(e.$t(`navigation.group_${t.key}`)),1)):q(``,!0)])]),_:2},1032,[`class`,`onClick`])],2)):t.key===`main`?q(``,!0):(L(),Y(`div`,{key:1,class:W([`w-full flex items-center h-[26px] mb-1`,{"mt-5":!t.first}])},[G(A)===G(Fo).EXPANDED?(L(),Y(`span`,ns,$(e.$t(`navigation.group_${t.key}`)),1)):(L(),Y(`div`,rs))],2)),U(I,{name:`navbar-group`},{default:B(()=>[!t.collapsible||G(D)[t.key]?(L(),Y(`div`,is,[(L(!0),Y(P,null,R(t.items,t=>(L(),Y(`div`,{key:t.name,class:`w-full h-[50px] relative`},[U(c,{icon:t.icon,"active-icon":t.activeIcon,to:t.to,label:e.$t(`navigation.${t.labelKey}`),expanded:G(A)===G(Fo).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:W([`w-[50px] h-[50px]`,{"w-full":G(A)===G(Fo).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`label`,`expanded`,`class`])]))),128))])):q(``,!0)]),_:2},1024)],64))),128)),(L(!0),Y(P,null,R(G(fe),t=>z((L(),Y(`div`,{key:t.name,class:`w-full h-[50px] relative`},[G(ce)&&t.name===`Updates`?(L(),V(u,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):q(``,!0),U(c,{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(A)===G(Fo).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:W([`w-[50px] h-[50px]`,{"w-full":G(A)===G(Fo).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`fallback-active-path`,`label`,`expanded`,`class`])])),[[wn,!(G(_)&&t.path===`/settings`)]])),128))])],64))]),G(se)?(L(),Y(`div`,us,[U(i,{severity:`secondary`,label:e.$t(`components.form.button.reset_defaults`),class:`dark-mode w-full h-[40px] !text-sm`,onClick:Te},{icon:B(()=>[U(m,{class:`w-[18px] h-[18px]`})]),_:1},8,[`label`]),U(i,{severity:`primary`,class:`w-full h-[40px]`,onClick:Ce},{icon:B(()=>[U(h,{class:`w-[20px] h-[20px]`})]),_:1})])):(L(),Y(`div`,ss,[K(`div`,{class:W([`mb-4 mt-2`,G(A)===G(Fo).EXPANDED?`border-t border-[#313131]`:`w-[22px] mx-auto border-t border-[#313131]`])},null,2),G(A)===G(Fo).MINIFIED?(L(),Y(`div`,cs,[z((L(),V(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(C).logout()},{icon:B(()=>[U(p,{class:`w-[22px] h-[22px]`})]),_:1})),[[g,e.$t(`views.menu.logout`),void 0,{right:!0}]])])):q(``,!0),K(`div`,ls,[U(c,{avatar:`avatar`,label:G(ee)?.username??`unknown`,description:G(ee)?.role??`unknown`,expanded:G(A)===G(Fo).EXPANDED,"show-logout":``,to:`/settings/account`,"dark-mode":``,"avatar-size":38,class:W([`w-[50px] h-[50px]`,{"w-full":G(A)===G(Fo).EXPANDED}])},null,8,[`label`,`description`,`expanded`,`class`])])]))])],6)}}}),[[`__scopeId`,`data-v-a82da88e`]]),fs={class:`px-2 h-full flex items-center justify-around`,style:{paddingBottom:`calc(max(8px, env(safe-area-inset-bottom, 0px)))`}},ps=N(An({__name:`CuiBottombar`,setup(e,{expose:t}){let{bottombarHeight:n}=ct(),r=Cn(`bottombarRef`),i=J(()=>At.filter(e=>e.meta?.bottombar&&e.meta.auth&&pt(e)));return t({bottombarRef:r}),(e,t)=>{let a=Mo;return L(),Y(`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:Bn({height:`calc(${G(n)}px + env(safe-area-inset-bottom, 0px))`,viewTransitionName:`cui-bottombar`})},[K(`div`,fs,[(L(!0),Y(P,null,R(G(i),e=>(L(),V(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`]]),ms={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function hs(e,t){return L(),Y(`svg`,ms,[...t[0]||=[K(`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 gs=Ln({name:`material-symbols-light-mode-rounded`,render:hs}),_s={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function vs(e,t){return L(),Y(`svg`,_s,[...t[0]||=[K(`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 ys=Ln({name:`material-symbols-dark-mode`,render:vs}),bs={viewBox:`0 0 48 48`,width:`1.2em`,height:`1.2em`},xs=[`id`],Ss=[`mask`];function Cs(e,t){return L(),Y(`svg`,bs,[K(`defs`,null,[K(`mask`,{id:e.idMap.SVGh8KaKdEb},[...t[0]||=[K(`g`,{fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`4`},[K(`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`}),K(`path`,{fill:`#000`,stroke:`#000`,d:`M27 17c0 8-5 9-10 9c0 4 6.5 8 12 4s2-13-2-13`})],-1)]],8,xs)]),K(`path`,{fill:`currentColor`,d:`M0 0h48v48H0z`,mask:`url(#`+e.idMap.SVGh8KaKdEb+`)`},null,8,Ss)])}var ws=Ln({name:`icon-park-solid-dark-mode`,render:Cs,setup(){return{idMap:{SVGh8KaKdEb:`uicons-`+Math.random().toString(36).substr(2,10)}}}}),Ts=An({__name:`CuiThemeSwitch`,setup(e){let t=pi(),{theme:n,autoMode:r}=or(t);function i(){t.toggleTheme()}return(e,t)=>{let a=ws,o=ys,s=gs,c=Ge;return L(),V(c,{severity:`secondary`,text:``,class:`cui-button p-2 text-color`,onClick:i},{default:B(()=>[G(r)?(L(),V(a,{key:0,class:`w-6 h-6`})):G(n)===`dark`?(L(),V(o,{key:1,class:`w-6 h-6`})):G(n)===`light`?(L(),V(s,{key:2,class:`w-6 h-6`})):q(``,!0)]),_:1})}}}),Es={class:`relative flex overflow-hidden items-center justify-center w-5 h-5`},Ds={class:`flex flex-col justify-between w-4 h-3 transform transition-all duration-100 origin-center overflow-hidden`},Os=An({__name:`CuiNavbarToggle`,setup(e){let{bus:t}=dt(),{navbarState:n}=ct(),{xlBreakpoint:r}=ot(),i=yt(),{uiSettings:a}=or(i),o=X(`closed`),s=J(()=>o.value===`opened`);function c(){t.emit({navbarState:o.value===`opened`?`closed`:`opened`})}return F(n,e=>{e&&e!==o.value&&(o.value=e===`minified`||e===`closed`?`closed`:`opened`)},{immediate:!0}),(e,t)=>{let n=Ge;return!G(r)||G(a).interface.navbarStayCollapsed?(L(),V(n,{key:0,id:`menu-icon`,class:`cui-button relative group p-2 transition-colors duration-100`,severity:`secondary`,text:``,onClick:c},{default:B(()=>[K(`div`,Es,[K(`div`,Ds,[K(`div`,{class:W([`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),K(`div`,{class:W([`h-0.5 w-4 rounded transform transition-all duration-100`,{"opacity-0":G(s)}]),style:{backgroundColor:`var(--text-color)`}},null,2),K(`div`,{class:W([`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})):q(``,!0)}}}),ks={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function As(e,t){return L(),Y(`svg`,ks,[...t[0]||=[K(`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 js=Ln({name:`mdi-check-all`,render:As}),Ms={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ns(e,t){return L(),Y(`svg`,Ms,[...t[0]||=[K(`g`,{fill:`currentColor`},[K(`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`}),K(`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 Ps=Ln({name:`solar-bell-bold`,render:Ns}),Fs={class:`flex flex-col gap-4 min-w-0`},Is=[`src`,`poster`],Ls=[`src`],Rs={class:`text-wrap whitespace-pre-line`},zs=An({__name:`NotificationDetail`,props:{src:{},videoSrc:{},text:{}},setup(e){let t=X(!1),n=X(!1);return(r,i)=>(L(),Y(`div`,Fs,[e.videoSrc&&!G(n)?(L(),Y(`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]||=yn(()=>{},[`stop`]),onError:i[1]||=e=>n.value=!0},null,40,Is)):e.src&&!G(t)?(L(),Y(`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,Ls)):q(``,!0),K(`span`,Rs,$(e.text),1)]))}}),Bs={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`},Hs={class:`text-sm font-semibold text-color`},Us={class:`text-xs text-muted mt-1`},Ws={class:`flex justify-between items-center mb-4 h-9`},Gs={class:`flex items-center gap-2`},Ks={class:`text-base font-semibold`},qs={class:`flex items-center gap-1`},Js={class:`overflow-y-auto`,style:{maxHeight:`234px`}},Ys={class:`flex gap-3`},Xs={key:0,class:`w-14 h-10 rounded-md overflow-hidden shrink-0 self-center bg-black`},Zs={class:`flex-1 min-w-0`},Qs={class:`flex justify-between items-center gap-2`},$s={class:`flex items-center gap-1.5 shrink-0`},ec={key:0,class:`w-2 h-2 rounded-full bg-primary-500`},tc={class:`text-xs text-muted`},nc={class:`text-xs text-muted mt-1 text-left line-clamp-2 overflow-hidden`},rc={key:0,class:`text-center py-8 text-muted text-sm`},ic=An({__name:`CuiNotificationMenu`,setup(e){let t=cr(),n=Ke(),{t:i}=a(),{isTouch:o}=et(),{isElectronApp:s,electron:u}=Kn(),d=new Zr,f=ut(),{data:m,isLoading:h}=d.getSettingsQuery(),g=Cn(`notificationsMenuRef`),v=X({}),y=X(!1),b=J(()=>f.notifications.value),x=J(()=>f.unreadCount.value),S=J(()=>m.value?.enabled??!1),C=J(()=>!h.value||m.value!==void 0);function ee(e,[t]){if(!t.isIntersecting){v.value[e]?.resetFn(),v.value[e]?.stopFn(),delete v.value[e];return}if(v.value[e])return;let n=t.target;if(!n.parentElement)return;let r=p(n,()=>{v.value[e]&&v.value[e].resetFn()}),i,{direction:a,stop:s}=(o.value?Ue:Ae)(n,{threshold:10,disableTextSelect:!0,onSwipe(){for(let t in v.value)t!==e&&v.value[t]?.resetFn();a.value===`left`?v.value[e]={left:`-75px`,opacity:1,deleteOpacity:1,isSwiping:!0,resetFn(){this.left=`0`,this.opacity=1,this.deleteOpacity=0},stopFn:()=>{delete v.value[e],s(),r(),clearTimeout(i)}}:v.value[e]?.resetFn()},onSwipeEnd(){clearTimeout(i),i=setTimeout(()=>{v.value[e]&&(v.value[e].isSwiping=!1)},10)}})}function te(e){g.value?.toggle(e)}function ne(){f.markAllSeen()}function re(e){f.markSeen(e)}function T(){g.value?.hide(),t.push({path:`/settings/notifications`})}function ie(e){let t=Date.now()-e,n=Math.floor(t/6e4),r=Math.floor(t/36e5),a=Math.floor(t/864e5);return n<60?`${n}${i(`components.notification_menu.short_minutes`)}`:r<24?`${r}${i(`components.notification_menu.short_hours`)}`:a<7?`${a}${i(`components.notification_menu.short_days`)}`:a<30?`${Math.floor(a/7)}${i(`components.notification_menu.short_weeks`)}`:a<365?`${Math.floor(a/30)}${i(`components.notification_menu.short_months`)}`:`${Math.floor(a/365)}${i(`components.notification_menu.short_years`)}`}function ae(e){let n=e.deepLink;g.value?.hide(),oe(e),n&&t.push(n)}function oe(e){e&&(v.value[e.id]?.stopFn(),f.removeNotification(e))}function E(){for(let e in v.value)v.value[e]?.stopFn();f.clearNotifications()}function D(e){switch(e){case r.Info:return`rgb(33, 150, 243)`;case r.Warn:return`rgb(251, 140, 0)`;case r.Error:case r.Critical:return`rgb(176, 0, 32)`;default:return`rgb(69, 69, 69)`}}function se(e){if(v.value[e.id]?.isSwiping)return;let t=[e.subtitle,e.body].filter(Boolean).join(`
|
|
3
|
+
`),r=e?.deepLink?i(`components.form.button.go_to_message`):i(`components.form.button.mark_as_read`),a=O(e),o=Mt(e.videoUrl);if(y.value=!0,a||o){n.openComponentDialog(zs,{data:{title:e.title,confirmText:r,contentClickConfirms:!!e.deepLink,contentProps:{src:a,videoSrc:o,text:t}},dialogSize:{desktop:{width:`480px`,maxWidth:`90vw`,maxHeight:`90vh`}},onConfirm:()=>ae(e),onCancel:()=>oe(e),onSettled:()=>y.value=!1});return}n.openTextDialog({data:{title:e.title,contentText:t,contentClickConfirms:!!e.deepLink,confirmText:r},onConfirm:()=>ae(e),onCancel:()=>oe(e),onSettled:()=>y.value=!1})}function O(e){return Mt(e.imageUrl)}function ce(){for(let e in v.value)v.value[e]?.resetFn(),v.value[e]?.stopFn()}function le(){return{id:`electron-update`,title:`Update`,body:`New camera.ui app update available`,severity:r.Info,deepLink:`/updates`,tag:`electron-update`,createdAt:Date.now(),seenAt:null,source:{kind:`system`,id:`system.electron.update_available`}}}function ue(e,t){s&&t.channel===`update-check`&&t.status===`available`&&f.addLocalNotification(le())}async function de(){if(s){u.removeListener(`app-status`,ue),u.on(`app-status`,ue),u.send(`check-for-updates`);try{(await u.invoke(`get-update-available`)).isUpdateAvailable&&f.addLocalNotification(le())}catch{}}}return F(S,e=>{e?f.connect():Tt()},{immediate:!0}),cn(()=>{s&&de()}),On(()=>{u?.removeListener(`app-status`,ue)}),(e,t)=>{let n=Ps,r=w,i=Ge,a=c,o=Oa,s=js,u=mi,d=Vt,f=tn,p=br,m=_,h=l;return L(),Y(`div`,null,[U(i,{severity:`secondary`,text:``,class:`cui-button p-2 text-color`,onClick:te},{icon:B(()=>[U(n,{class:`w-6 h-6`}),G(S)&&G(x)?(L(),V(r,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] right-[10px] top-[7px]`})):q(``,!0)]),_:1}),U(m,{ref_key:`notificationsMenuRef`,ref:g,"append-to":`self`,dismissable:!G(y),class:`w-[20rem] shadow-lg cui-rounded-corner notification-menu isolate overscroll-contain non-draggable-region`,onHide:ce},{default:B(()=>[G(C)?G(S)?(L(),Y(P,{key:2},[K(`div`,Ws,[K(`div`,Gs,[K(`h3`,Ks,$(e.$t(`components.notification_menu.notifications`)),1),U(r,{class:`rounded-full text-xs p-1`,value:G(b).length>99?`99+`:String(G(b).length)},null,8,[`value`])]),K(`div`,qs,[G(x)?z((L(),V(i,{key:0,severity:`secondary`,text:``,rounded:``,class:`p-2 cui-icon-md`,onClick:ne},{icon:B(()=>[U(s,{width:`100%`,height:`100%`})]),_:1})),[[h,{value:e.$t(`components.notification_menu.mark_all_read`)},void 0,{left:!0}]]):q(``,!0),G(b).length?z((L(),V(i,{key:1,severity:`danger`,text:``,rounded:``,class:`p-2 cui-icon-md`,onClick:E},{icon:B(()=>[U(u,{width:`100%`,height:`100%`})]),_:1})),[[h,{value:e.$t(`components.notification_menu.clear_notifications`)},void 0,{left:!0}]]):q(``,!0)])]),K(`div`,Js,[(L(!0),Y(P,null,R(G(b),t=>(L(),Y(`div`,{key:t.id,class:`relative overflow-hidden`},[z((L(),Y(`div`,{class:`relative transition-all duration-200`,style:Bn({left:G(v)[t.id]?.left||`0`,opacity:G(v)[t.id]?.opacity||1})},[U(i,{severity:`secondary`,text:``,class:`cui-button p-2 block w-full`,onClick:e=>se(t)},{default:B(()=>[K(`div`,Ys,[K(`div`,{class:`w-2 h-2 rounded-full mt-2`,style:Bn({backgroundColor:D(t.severity)})},null,4),O(t)?(L(),Y(`div`,Xs,[U(d,{src:O(t),alt:``,"image-style":{objectFit:`cover`},"image-container-class":`w-full h-full`},null,8,[`src`])])):q(``,!0),K(`div`,Zs,[K(`div`,Qs,[K(`h4`,{class:W([`text-sm truncate max-w-[200px]`,t.seenAt==null?`font-semibold text-color`:`font-medium text-muted`])},$(t.title),3),K(`div`,$s,[t.seenAt==null?(L(),Y(`span`,ec)):q(``,!0),K(`span`,tc,$(ie(t.createdAt)),1)])]),K(`p`,nc,$(t.subtitle||t.body),1)])])]),_:2},1032,[`onClick`])],4)),[[G(ar),e=>ee(t.id,e)]]),K(`div`,{class:`absolute right-0 top-0 h-full flex items-center gap-1 pr-4`,style:Bn({opacity:G(v)[t.id]?.deleteOpacity||0,pointerEvents:(G(v)[t.id]?.deleteOpacity||0)>0?`auto`:`none`})},[t.seenAt==null?z((L(),V(i,{key:0,severity:`secondary`,class:`cui-icon-sm`,text:``,rounded:``,onClick:e=>re(t)},{icon:B(()=>[U(f,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[h,{value:e.$t(`components.notification_menu.mark_read`)},void 0,{left:!0}]]):q(``,!0),z((L(),V(i,{severity:`danger`,class:`cui-icon-sm`,text:``,rounded:``,onClick:e=>oe(t)},{icon:B(()=>[U(u,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[h,{value:e.$t(`components.notification_menu.delete`)},void 0,{left:!0}]])],4),G(b).indexOf(t)===G(b).length-1?q(``,!0):(L(),V(p,{key:0,class:`my-0 py-1`}))]))),128))]),G(b).length===0?(L(),Y(`div`,rc,$(e.$t(`components.notification_menu.no_notifications`)),1)):q(``,!0)],64)):(L(),Y(`div`,Vs,[U(o,{class:`w-8 h-8 text-muted`}),K(`div`,null,[K(`h3`,Hs,$(e.$t(`components.notification_menu.disabled`)),1),K(`p`,Us,$(e.$t(`components.notification_menu.disabled_hint`)),1)]),U(i,{class:`cui-button-small`,label:e.$t(`components.notification_menu.open_settings`),onClick:T},null,8,[`label`])])):(L(),Y(`div`,Bs,[U(a,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})]))]),_:1},8,[`dismissable`])])}}}),ac={key:0},oc={class:`text-sm font-medium truncate max-w-40 pointer-events-none`},sc=An({__name:`CuiInstanceSwitcher`,setup(e){let{t}=a(),{smBreakpoint:n}=ot(),r=en(),i={style:`background: color-mix(in srgb,var(--p-red-500),transparent 84%); color: var(--p-red-400);`},o=Cn(`menuRef`),s=En({}),c=null,l=J(()=>{let e=r.activeInstance,n=!r.isHomeActive||r.redirectInfo,a={label:e.name,position:`header`,active:!0},o=r.favoriteInstances.filter(e=>e.id!==r.activeId).map(e=>{let t=s[e.id],n=e.hasCredentials&&t===`checking`,a=e.hasCredentials&&t===`offline`,o,c;return a&&(o=`Offline`,c=i),{label:e.name,badge:o,badgeProps:c,loading:n,disabled:n||a,onClick:()=>r.switchInstance(e.id)}}),c=n?[{label:t(`components.instance_switcher.go_back`),icon:st,position:`footer`,onClick:()=>{let e=r.redirectInfo;e?window.location.href=e.sourceUrl:r.switchInstance(null)}}]:[],l={label:t(`components.instance_switcher.manage`),icon:St,position:`footer`,to:`/instances`};return[a,...o,...c,l]});function u(){c?.abort(),c=new AbortController;let{signal:e}=c,t=r.favoriteInstances.filter(e=>e.id!==r.activeId&&e.hasCredentials);for(let e of t)s[e.id]=`checking`;for(let n of t)r.probeInstance(n.id,e).then(t=>{e.aborted||(s[n.id]=t?`online`:`offline`)}).catch(()=>{e.aborted||(s[n.id]=`offline`)})}return(e,t)=>{let i=Xt,a=Ge,s=ci,c=oi,d=Rt;return G(r).isMultiInstance?(L(),Y(`div`,ac,[G(n)?(L(),V(a,{key:0,severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:G(o)?.toggleMenu},{icon:B(()=>[U(i,{class:`w-6 h-6`})]),_:1},8,[`onClick`])):(L(),V(a,{key:1,severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:G(o)?.toggleMenu},{default:B(()=>[U(i,{class:`w-5 h-5 shrink-0 pointer-events-none`}),K(`span`,oc,$(G(r).activeInstance?.name??`Local`),1),G(o)?.isOpen?G(o)?.isOpen?(L(),V(c,{key:1,class:`w-4 h-4 opacity-60 shrink-0 pointer-events-none`})):q(``,!0):(L(),V(s,{key:0,class:`w-4 h-4 opacity-60 shrink-0 pointer-events-none`}))]),_:1},8,[`onClick`])),U(d,{ref_key:`menuRef`,ref:o,items:G(l),popover:{appendTo:`body`,pt:{root:{class:`w-[18rem]`},content:{class:`p-0! rounded-xl! overflow-hidden!`}}},onShow:u,dividers:`sections`},null,8,[`items`])])):q(``,!0)}}}),cc={key:0,class:`flex flex-row items-center flex-1 p-2 gap-1`},lc={class:`flex-1 flex items-center justify-start min-w-0`},uc={key:0,class:`cui-topbar-default font-semibold text-xl truncate`},dc={class:`flex-1 flex items-center justify-end min-w-0`},fc={class:`cui-topbar-default`},pc=N(An({__name:`CuiTopbar`,props:{offsetLeft:{},animate:{type:Boolean},background:{}},setup(e){let t=e,n=cr(),{smBreakpoint:r}=ot(),{hasSlot:i,scrollToTop:a}=vt(),{minifiedTopbar:o}=sn(),{topbarHeight:s}=ct(),{isElectronApp:c}=Kn(),l=en(),{isMultiInstance:u}=or(l),{offsetLeft:d,animate:f}=Nn(t);return(e,t)=>{let l=sc,p=ic,m=Os,h=Ts;return L(),Y(`header`,{class:W([`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:Bn({height:`calc(${G(s)}px + env(safe-area-inset-top, 0px) + ${G(rt).ELECTRON_OFFSET}px)`,viewTransitionName:`cui-topbar`,background:G(r)?`var(--ground-background)`:void 0,paddingTop:G(c)?`calc(${G(rt).ELECTRON_OFFSET}px + env(safe-area-inset-top, 0px))`:void 0})},[G(r)&&!G(o)?(L(),Y(`div`,cc,[K(`div`,lc,[!G(i)(`left`)&&(`hasPermission`in e?e.hasPermission:G(pt))(void 0,`admin`)&&G(n).currentRoute.value.name===`Home`&&G(u)?(L(),V(l,{key:0,class:`cui-topbar-default non-draggable-region`})):q(``,!0),t[1]||=K(`div`,{id:`cui-topbar-left`,class:`cui-topbar-slot non-draggable-region`},null,-1)]),K(`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]||=K(`div`,{id:`cui-topbar-center`,class:`cui-topbar-slot truncate non-draggable-region`},null,-1),G(i)(`center`)?q(``,!0):(L(),Y(`span`,uc,$(e.$t(`views.${String(e.$route.name).toLowerCase()}.title`)),1))]),K(`div`,dc,[t[3]||=K(`div`,{id:`cui-topbar-right`,class:`cui-topbar-slot non-draggable-region`},null,-1),K(`div`,fc,[U(p,{class:`non-draggable-region`})])])])):G(o)?q(``,!0):(L(),Y(`div`,{key:1,class:`flex flex-row items-center flex-1 p-2`,style:Bn({"margin-left":`calc(${G(d)}px + max(8px, env(safe-area-inset-left, 0px)))`,transition:G(f)?`margin-left 200ms`:void 0})},[U(m,{class:`non-draggable-region`}),(`hasPermission`in e?e.hasPermission:G(pt))(void 0,`admin`)&&G(u)?(L(),V(l,{key:0,class:`non-draggable-region`})):q(``,!0),G(on)()?q(``,!0):(L(),V(h,{key:1,class:`ml-auto non-draggable-region`})),U(p,{class:W([`non-draggable-region`,{"ml-auto":G(on)()}])},null,8,[`class`])],4))],6)}}}),[[`__scopeId`,`data-v-ede899aa`]]),mc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function hc(e,t){return L(),Y(`svg`,mc,[...t[0]||=[K(`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 gc=Ln({name:`majesticons-open`,render:hc}),_c={class:`flex items-center gap-2 min-h-[15px]`},vc={class:`cui-label`},yc=An({__name:`SectionLabel`,props:{label:{},loading:{type:Boolean}},setup(e){return(t,n)=>{let r=c;return L(),Y(`div`,_c,[K(`span`,vc,$(e.label),1),e.loading?(L(),V(r,{key:0,class:`w-[12px] h-[12px] m-0`,"stroke-width":`8`})):q(``,!0)])}}}),bc={class:`p-4 flex flex-col gap-2`},xc={key:0,class:`flex flex-col gap-2`},Sc={key:0,class:`text-sm text-muted text-center min-h-[30px]`},Cc={key:1,class:`flex flex-col gap-2`},wc={key:0,class:`text-sm text-muted text-center min-h-[30px]`},Tc={key:2,class:`flex flex-col gap-2`},Ec={key:0,class:`text-sm text-muted text-center min-h-[30px]`},Dc={key:2,class:`text-sm text-muted text-center min-h-[30px]`},Oc={key:3,class:`flex flex-col gap-2`},kc={key:0,class:`text-sm text-muted text-center min-h-[30px]`},Ac={key:2,class:`text-sm text-muted text-center min-h-[30px]`},jc={key:4,class:`flex flex-col gap-2`},Mc={key:0,class:`text-sm text-muted text-center min-h-[30px]`},Nc={key:2,class:`text-sm text-muted text-center min-h-[30px]`},Pc={key:5,class:`flex flex-col gap-2`},Fc={key:0,class:`text-sm text-muted text-center min-h-[30px]`},Ic={key:1,class:`w-full h-full`},Lc={class:`cui-list-item`},Rc=An({__name:`Plugins`,props:{camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},emits:[`close`],setup(e){let t=[`cameraController`,`hub`,`detection`,`core`,`accessories`,`more`],n=Xn().filter(e=>e!==d.ObjectAssist),r=Jn(),o=Qn(),s=new at,c=new yi,u=new bi,f=e,p=Ze(),m=Ke(),{t:h}=a(),{camera:_,cameraDevice:v,loading:y}=Nn(f),{data:b,isBusy:S}=c.getPluginsQuery({page:1,pageSize:-1}),{data:C,isBusy:w,suspense:ee}=s.getCameraExtensionsQuery(_.value.name),{data:te,isBusy:ne}=u.getCameraSensorsQuery(_.value._id),{data:re,isBusy:ie}=c.getPluginsExtensionsQuery({page:1,pageSize:-1}),{mutateAsync:ae,isPending:oe}=s.enableCameraExtensionQuery(),{mutateAsync:E,isPending:D}=s.disableCameraExtensionQuery(),{mutateAsync:se,isPending:O}=s.activateCameraExtensionQuery(),{mutateAsync:ce,isPending:le}=s.deactivateCameraExtensionQuery(),{sensors:ue,isLoading:de}=ye(v),fe=Cn(`schemaRef`),pe=X(),k=X(``),me=X(),he=X(),ge=X(),_e=X(),A=X(),j=X(),be=X(),xe=X(),Se=X(),Ce=X(),we=X(),Te=zn(),Ee=X(),De=J(()=>{if(!xe.value)return``;let e=Pe.value.find(e=>e.id===xe.value);return e?.pluginId&&Xt(e.pluginId)||``}),Oe=J(()=>{if(!xe.value)return``;let e=Pe.value.find(e=>e.id===xe.value);return!e||e.pluginId===`cameraui.virtual`?``:e.pluginId}),ke=J(()=>C.value?.filter(e=>o.some(t=>e.contract.provides.includes(t)))||[]),Ae=J(()=>{let e=new Set;for(let t of ke.value)for(let n of o)t.contract.provides.includes(n)&&e.add(n);for(let t of ue.value)o.includes(t.type)&&e.add(t.type);return Array.from(e).filter(Yt).sort((e,t)=>{let n=h(`components.camera_options.sensor_type_${e}`),r=h(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),je=J(()=>{let e=be.value;return e?Qt(C.value?.filter(t=>t.contract.provides.includes(e)&&Jt(t,e))||[]):[]}),Me=J(()=>be.value?$n(be.value):!1),Ne=J(()=>{if(!be.value)return[];let e=qn(be.value),t=_.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=je.value.map(e=>e.pluginName);return n.sort((e,t)=>r.indexOf(e)-r.indexOf(t))}),M=J(()=>{if(!be.value)return[];let e=qn(be.value),t=_.value.assignments[e];return Array.isArray(t)?t.map(e=>e.id):t&&typeof t==`object`&&`id`in t?[t.id]:[]}),Pe=J(()=>{let e=new Set(M.value);return ue.value.filter(t=>t.type===be.value&&(e.has(t.pluginId)||t.pluginId===`cameraui.virtual`)).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))}),Fe=T(v,k),Ie=Fe.config,Le=Fe.isLoading,Re=i(xe,Oe),ze=Re.config,Be=Re.isLoading,Ve=J(()=>k.value&&Ie.value?.schema?.length?Ie.value:void 0),He=J(()=>xe.value&&De.value&&ze.value?.schema?.length?ze.value:void 0),Ue=J(()=>S.value||ie.value||w.value||ne.value),We=J(()=>Ue.value||qe.value||de.value),qe=J(()=>w.value||ie.value||oe.value||D.value||O.value||le.value),N=J(()=>qe.value||y.value||Fe.isLoading.value||Re.isLoading.value||_t.isLoading.value||yt.isLoading.value||Nt.isLoading.value||It.isLoading.value||Ht.isLoading.value),Je=J(()=>(re.value?.result.filter(e=>ve(e.contract)&&e.pluginName===_.value.pluginInfo?.name)||[])[0]),Ye=J(()=>Qt(C.value?.filter(e=>x(e.contract))||[])),Xe=J(()=>Je.value&&Zt(Je.value.pluginName)?[Je.value]:[]),Qe=J(()=>Xe.value.length>0),$e=J(()=>C.value?.filter(e=>n.some(t=>e.contract.provides.includes(t)))||[]),et=J(()=>{let e=new Set;for(let t of $e.value)for(let r of n)t.contract.provides.includes(r)&&e.add(r);return Array.from(e).filter(Yt).sort((e,t)=>{let n=h(`components.camera_options.sensor_type_${e}`),r=h(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),tt=J(()=>{let e=he.value;return e?Qt(C.value?.filter(t=>t.contract.provides.includes(e)&&Jt(t,e))||[]):[]}),nt=J(()=>{let e=ge.value;return e?ue.value.filter(t=>t.type===he.value&&Xt(t.pluginId)===e).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value)):[]}),rt=J(()=>{if(!Se.value)return``;let e=nt.value.find(e=>e.id===Se.value);return e?.pluginId&&Xt(e.pluginId)||``}),it=J(()=>{let e=$t(d.ObjectAssist);return e&&Zt(e.name)?e.name:void 0}),ot=J(()=>{let e=$t(d.Object);return e?(te.value??[]).find(t=>t.connected&&t.type===d.Object&&Xt(t.pluginId)===e.name)?.requiresFrames===!1:!1}),st=J(()=>{let e=$t(d.Object)?.name,t=new Set((te.value??[]).filter(e=>e.type===d.Object&&e.requiresFrames).map(e=>Xt(e.pluginId)).filter(e=>e!==void 0));return Qt(C.value?.filter(n=>n.pluginName!==e&&t.has(n.pluginName))||[])}),ct=J(()=>he.value===d.Object&&ot.value&&st.value.length>0),lt=J(()=>Se.value&&nt.value.find(e=>e.id===Se.value)?.pluginId||``),ut=J(()=>C.value?.filter(e=>r.some(t=>e.contract.provides.includes(t)))||[]),dt=J(()=>{let e=new Set;for(let t of ut.value)for(let n of r)t.contract.provides.includes(n)&&e.add(n);return Array.from(e).filter(Yt).sort((e,t)=>{let n=h(`components.camera_options.sensor_type_${e}`),r=h(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),ft=J(()=>{let e=A.value;return e?Qt(C.value?.filter(t=>t.contract.provides.includes(e)&&Jt(t,e))||[]):[]}),pt=J(()=>{let e=j.value;return e?ue.value.filter(t=>t.type===A.value&&Xt(t.pluginId)===e).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value)):[]}),mt=J(()=>{if(!Ce.value)return``;let e=pt.value.find(e=>e.id===Ce.value);return e?.pluginId&&Xt(e.pluginId)||``}),ht=J(()=>Ce.value&&pt.value.find(e=>e.id===Ce.value)?.pluginId||``),gt=J(()=>ge.value??``),_t=T(v,gt),vt=_t.isLoading,yt=i(Se,lt),bt=yt.config,xt=yt.isLoading,St=J(()=>{if(!ge.value||ge.value===_.value.pluginInfo?.name)return;let e=Te.value;if(e?.plugin===ge.value)return e.config.schema?.length?e.config:void 0}),Ct=J(()=>Se.value&&rt.value&&Ee.value===Se.value&&bt.value?.schema?.length?bt.value:void 0),wt=J(()=>{let e=_e.value;if(!(!e||e===$t(d.Object)?.name))return ue.value.find(t=>t.type===d.Object&&Xt(t.pluginId||``)===e)}),Tt=J(()=>wt.value?.id??``),Et=J(()=>wt.value?.pluginId??``),Ot=i(Tt,Et),kt=Ot.config,At=Ot.isLoading,jt=J(()=>Tt.value&&kt.value?.schema?.length?kt.value:void 0),Mt=J(()=>j.value??``),Nt=T(v,Mt),Pt=Nt.config,Ft=Nt.isLoading,It=i(Ce,ht),Lt=It.config,Rt=It.isLoading,zt=J(()=>{if(!(!j.value||j.value===_.value.pluginInfo?.name))return Pt.value?.schema?.length?Pt.value:void 0}),Bt=J(()=>Ce.value&&mt.value&&Lt.value?.schema?.length?Lt.value:void 0),Vt=J(()=>we.value??``),Ht=T(v,Vt),Ut=Ht.config,Wt=Ht.isLoading,Gt=J(()=>{if(!(!we.value||we.value===_.value.pluginInfo?.name))return Ut.value?.schema?.length?Ut.value:void 0}),Kt=J(()=>{let e=b.value?.result||[];return(re.value?.result||[]).filter(t=>{let n=e.find(e=>e.pluginName===t.pluginName),r=t.contract.provides.length>0,i=t.contract.consumes.length>0;return _.value.pluginInfo?.name===t.pluginName||ve(t.contract)&&!g(t.contract)?!1:n&&(r||i||x(t.contract))})});function Jt(e,t){return e.pluginName!==_.value.pluginInfo?.name||(te.value??[]).some(n=>n.type===t&&Xt(n.pluginId)===e.pluginName)}function Yt(e){return ue.value.some(t=>t.type===e)||(te.value??[]).some(t=>t.type===e)?!0:(C.value??[]).some(t=>t.contract.provides.includes(e)&&t.pluginName!==_.value.pluginInfo?.name)}function Xt(e){return _.value.plugins.find(t=>t.id===e)?.name}function Zt(e){let t=typeof e==`string`?e:e?.name;if(t&&b.value&&b.value.result.some(e=>e.pluginName===t&&!e.disabled))return t}function Qt(e){return e.sort((e,t)=>!Zt(e.pluginName)&&Zt(t.pluginName)?1:Zt(e.pluginName)&&!Zt(t.pluginName)?-1:e.displayName.localeCompare(t.displayName))}function $t(e){let t=qn(e),n=_.value.assignments[t];return Array.isArray(n)?void 0:n}function en(e){let t=qn(e),n=_.value.assignments[t];return Array.isArray(n)?void 0:n}async function tn(e){if(e!==void 0)k.value=e;else switch(pe.value){case`cameraController`:k.value=Zt(Je.value?.pluginName)||``;break;case`hub`:k.value=Zt(Ye.value[0]?.pluginName)||``;break;case`detection`:{let e=Zt(he.value?$t(he.value):void 0);k.value=e||``,ge.value=e||void 0;break}case`core`:{let e=Zt(A.value?en(A.value):void 0);k.value=e||``,j.value=e||void 0;break}case`accessories`:k.value=``;break;default:k.value=``}let t=pe.value===`accessories`||pe.value===`detection`||pe.value===`core`;k.value&&!t&&Zt(k.value)&&await Fe.getConfig()}function nn(){switch(pe.value){case`cameraController`:Xe.value.length&&!k.value&&(k.value=Xe.value[0].pluginName);break;case`hub`:if(Ye.value.length){let e=Ye.value.find(e=>Zt(e.pluginName));me.value=e?.pluginName}break;case`detection`:{et.value.length&&(!he.value||!et.value.includes(he.value))&&(he.value=et.value[0]);let e=he.value?$t(he.value):void 0;e&&Zt(e.name)?ge.value=e.name:ge.value=void 0;break}case`core`:{dt.value.length&&(!A.value||!dt.value.includes(A.value))&&(A.value=dt.value[0]);let e=A.value?en(A.value):void 0;e&&Zt(e.name)?j.value=e.name:j.value=void 0;break}case`accessories`:Ae.value.length&&(!be.value||!Ae.value.includes(be.value))&&(be.value=Ae.value[0]),Vn(()=>{Ne.value.length&&!we.value&&(we.value=Ne.value[0])})}}async function rn(e){C.value&&(C.value.some(t=>t.pluginName===e.pluginName)?(await ce({cameraname:_.value.name,pluginname:e.pluginName}),fe.value?.reset()):await se({cameraname:_.value.name,pluginname:e.pluginName}))}async function an(e){if(!be.value)return;let t=Ne.value;if(Me.value){let n=e,r=t[0];if(n===r)return;r&&await E({cameraname:_.value.name,pluginname:r,type:be.value}),n?(await ae({cameraname:_.value.name,pluginname:n,type:be.value}),we.value=n):we.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 ae({cameraname:_.value.name,pluginname:e,type:be.value});for(let e of i)await E({cameraname:_.value.name,pluginname:e,type:be.value}),we.value===e&&(we.value=void 0);r.length&&!we.value?we.value=r[0]:n.length&&!we.value&&(we.value=n[0])}async function on(e,t){try{await Fe.setValue(e.key,void 0),p.add({severity:`success`,detail:h(`components.toast.config_updated`),life:3e3})}catch(e){p.add({severity:`error`,detail:e,life:3e3})}}async function sn(e,t){try{let n=await Fe.submitValue(e.key,e.payload);if(n?.toast){let e=qt(n.toast.type);p.add({severity:e,detail:n.toast.message,life:3e3})}n?.schema&&n.schema.length&&m.openComponentDialog(xi,{data:{title:h(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:n.schema,config:e.payload},pluginName:t,cameraName:_.value.name,buttonKey:e.key}}})}catch(e){p.add({severity:`error`,detail:e,life:3e3})}}async function cn(e,t){try{await Fe.setConfig(t),p.add({severity:`success`,detail:h(`components.toast.config_updated`),life:3e3})}catch(e){p.add({severity:`error`,detail:e,life:3e3})}}async function ln(e){if(!(!lt.value||!Se.value))try{await yt.setValue(e.key,void 0),p.add({severity:`success`,detail:h(`components.toast.config_updated`),life:3e3})}catch(e){p.add({severity:`error`,detail:e,life:3e3})}}async function un(e){if(!(!lt.value||!Se.value))try{let t=await yt.submitValue(e.key,e.payload);if(t?.toast){let e=qt(t.toast.type);p.add({severity:e,detail:t.toast.message,life:3e3})}}catch(e){p.add({severity:`error`,detail:e,life:3e3})}}async function fn(e){if(!(!lt.value||!Se.value))try{await yt.setConfig(e),p.add({severity:`success`,detail:h(`components.toast.config_updated`),life:3e3})}catch(e){p.add({severity:`error`,detail:e,life:3e3})}}async function pn(e){if(Tt.value)try{await Ot.setValue(e.key,void 0),p.add({severity:`success`,detail:h(`components.toast.config_updated`),life:3e3})}catch(e){p.add({severity:`error`,detail:e,life:3e3})}}async function mn(e){if(Tt.value)try{let t=await Ot.submitValue(e.key,e.payload);if(t?.toast){let e=qt(t.toast.type);p.add({severity:e,detail:t.toast.message,life:3e3})}}catch(e){p.add({severity:`error`,detail:e,life:3e3})}}async function hn(e){if(Tt.value)try{await Ot.setConfig(e),p.add({severity:`success`,detail:h(`components.toast.config_updated`),life:3e3})}catch(e){p.add({severity:`error`,detail:e,life:3e3})}}async function gn(e){if(!(!ht.value||!Ce.value))try{await It.setValue(e.key,void 0),p.add({severity:`success`,detail:h(`components.toast.config_updated`),life:3e3})}catch(e){p.add({severity:`error`,detail:e,life:3e3})}}async function _n(e){if(!(!ht.value||!Ce.value))try{let t=await It.submitValue(e.key,e.payload);if(t?.toast){let e=qt(t.toast.type);p.add({severity:e,detail:t.toast.message,life:3e3})}}catch(e){p.add({severity:`error`,detail:e,life:3e3})}}async function I(e){if(!(!ht.value||!Ce.value))try{await It.setConfig(e),p.add({severity:`success`,detail:h(`components.toast.config_updated`),life:3e3})}catch(e){p.add({severity:`error`,detail:e,life:3e3})}}async function vn(e){if(!(!Oe.value||!xe.value))try{await Re.setValue(e.key,void 0),p.add({severity:`success`,detail:h(`components.toast.config_updated`),life:3e3})}catch(e){p.add({severity:`error`,detail:e,life:3e3})}}async function yn(e){if(!(!Oe.value||!xe.value))try{let t=await Re.submitValue(e.key,e.payload);if(t?.toast){let e=qt(t.toast.type);p.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&m.openComponentDialog(xi,{data:{title:h(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:De.value,cameraName:_.value.name,buttonKey:e.key,sensorId:xe.value,pluginId:Oe.value}}})}catch(e){p.add({severity:`error`,detail:e,life:3e3})}}async function bn(e){if(!(!Oe.value||!xe.value))try{await Re.setConfig(e),p.add({severity:`success`,detail:h(`components.toast.config_updated`),life:3e3})}catch(e){p.add({severity:`error`,detail:e,life:3e3})}}async function xn(e){ge.value&&await _t.setValue(e.key,void 0)}async function Sn(e){if(ge.value)try{let t=await _t.submitValue(e.key,e.payload);if(t?.toast){let e=qt(t.toast.type);p.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&m.openComponentDialog(xi,{data:{title:h(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:ge.value,cameraName:_.value.name,buttonKey:e.key}}})}catch(e){p.add({severity:`error`,detail:e,life:3e3})}}async function wn(e){let t=ge.value;if(!t)return;await _t.setConfig(e);let n=await _t.getConfig();n&&ge.value===t&&(Te.value={plugin:t,config:n})}async function Tn(e){j.value&&await Nt.setValue(e.key,void 0)}async function En(e){if(j.value)try{let t=await Nt.submitValue(e.key,e.payload);if(t?.toast){let e=qt(t.toast.type);p.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&m.openComponentDialog(xi,{data:{title:h(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:j.value,cameraName:_.value.name,buttonKey:e.key}}})}catch(e){p.add({severity:`error`,detail:e,life:3e3})}}async function Dn(e){j.value&&await Nt.setConfig(e)}async function W(e){we.value&&await Ht.setValue(e.key,void 0)}async function On(e){if(we.value)try{let t=await Ht.submitValue(e.key,e.payload);if(t?.toast){let e=qt(t.toast.type);p.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&m.openComponentDialog(xi,{data:{title:h(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:we.value,cameraName:_.value.name,buttonKey:e.key}}})}catch(e){p.add({severity:`error`,detail:e,life:3e3})}}async function kn(e){we.value&&await Ht.setConfig(e)}return F(pe,()=>{Vn(()=>{nn(),tn()})},{immediate:!0}),F([Ye,b],async([e,t])=>{if(pe.value===`hub`&&e.length&&t?.result&&!me.value){let t=e.find(e=>Zt(e.pluginName));t&&(me.value=t.pluginName,k.value=t.pluginName,await Fe.getConfig())}},{immediate:!0}),F([Xe,()=>pe.value],async([e,t])=>{t===`cameraController`&&e.length&&!k.value&&(k.value=e[0].pluginName,await Fe.getConfig())},{immediate:!0}),F(()=>k.value,async(e,t)=>{pe.value===`cameraController`&&e&&e!==t&&await Fe.getConfig()}),F(me,async(e,t)=>{e&&e!==t&&Zt(e)&&(k.value=e,await Fe.getConfig())}),F(he,()=>{if(he.value){let e=$t(he.value);e&&Zt(e.name)?ge.value=e.name:ge.value=void 0}else ge.value=void 0;tn()},{flush:`sync`}),F(ge,async(e,t)=>{if(e!==t&&he.value){let n=$t(he.value);if(Te.value=void 0,!e&&t)await E({cameraname:_.value.name,pluginname:t,type:he.value}),fe.value?.reset();else if(e){n?.name!==e&&await ae({cameraname:_.value.name,pluginname:e,type:he.value});let t=await _t.getConfig();t&&ge.value===e&&(Te.value={plugin:e,config:t})}Vn(()=>tn(e))}}),F(nt,e=>{Se.value&&e.some(e=>e.id===Se.value)||(Se.value=e[0]?.id)},{immediate:!0,flush:`sync`}),F(it,e=>_e.value=e,{immediate:!0}),F(_e,async(e,t)=>{e!==t&&e!==it.value&&(!e&&t?await E({cameraname:_.value.name,pluginname:t,type:d.ObjectAssist}):e&&await ae({cameraname:_.value.name,pluginname:e,type:d.ObjectAssist}))}),F(A,()=>{if(A.value){let e=en(A.value);e&&Zt(e.name)?j.value=e.name:j.value=void 0}else j.value=void 0;tn()},{flush:`sync`}),F(j,async(e,t)=>{if(e!==t&&A.value){let n=en(A.value);!e&&t?(await E({cameraname:_.value.name,pluginname:t,type:A.value}),fe.value?.reset()):e&&(n?.name!==e&&await ae({cameraname:_.value.name,pluginname:e,type:A.value}),await Nt.getConfig()),Vn(()=>tn(e))}}),F(pt,e=>{Ce.value&&e.some(e=>e.id===Ce.value)||(Ce.value=e[0]?.id)},{immediate:!0,flush:`sync`}),F([Se,lt],async([e,t])=>{Ee.value=void 0,e&&t&&(await yt.getConfig(),Se.value===e&&(Ee.value=e))}),F([Ce,ht],async([e,t])=>{e&&t&&await It.getConfig()}),F(be,()=>{Ne.value.length?we.value=Ne.value[0]:we.value=void 0},{flush:`sync`}),F(Pe,e=>{xe.value&&e.some(e=>e.id===xe.value)||(xe.value=e[0]?.id)},{immediate:!0,flush:`sync`}),F(we,async e=>{e&&await Ht.getConfig()}),F(xe,async e=>{e&&Oe.value&&await Re.getConfig()}),F([Qe,Ue],([e,t])=>{e?pe.value??=`cameraController`:!t&&(!pe.value||pe.value===`cameraController`)&&(pe.value=`hub`)},{immediate:!0,flush:`sync`}),dn(async()=>{await ee(),nn(),tn()}),(e,n)=>{let r=yc,i=gi,a=hi,o=br,s=hr,c=Dt,u=gc,d=Ge,f=l;return L(),Y(`div`,bc,[U(r,{label:e.$t(`components.camera_options.categories`),loading:G(Ue)},null,8,[`label`,`loading`]),U(a,{modelValue:G(pe),"onUpdate:modelValue":[n[0]||=e=>jn(pe)?pe.value=e:null,n[1]||=e=>tn()],mandatory:``},{default:B(()=>[(L(),Y(P,null,R(t,t=>U(i,{key:t,size:`small`,disabled:t===`cameraController`&&!G(Qe),value:t},{default:B(()=>[H($(e.$t(`components.camera_options.chip_${t}`)),1)]),_:2},1032,[`disabled`,`value`])),64))]),_:1},8,[`modelValue`]),U(o,{class:`m-0 py-3`}),G(pe)===`cameraController`?(L(),Y(`div`,xc,[G(Xe).length?(L(),Y(P,{key:1},[U(r,{label:e.$t(`components.camera_options.chip_plugins`),loading:G(Le)},null,8,[`label`,`loading`]),U(a,{modelValue:G(k),"onUpdate:modelValue":n[2]||=e=>jn(k)?k.value=e:null,disabled:G(qe),mandatory:``,class:`min-h-[30px]`},{default:B(()=>[(L(!0),Y(P,null,R(G(Xe),e=>(L(),V(i,{key:e.pluginName,size:`small`,disabled:!Zt(e.pluginName)||G(N),value:e.pluginName},{default:B(()=>[H($(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),G(Ve)?(L(),Y(P,{key:0},[U(o,{class:`m-0 py-3`}),U(r,{label:e.$t(`components.camera_options.plugin_settings`)},null,8,[`label`]),(L(),V(vi,{ref_key:`schemaRef`,ref:fe,key:G(k),"schema-form":{schema:G(Ve).schema,config:G(Ve).config},loading:G(N),onOnFormSubmit:n[3]||=e=>cn(G(k),e),onOnSubmit:n[4]||=e=>sn(e,G(k)),onOnAction:n[5]||=e=>on(e,G(k))},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):(L(),Y(P,{key:0},[U(r,{label:e.$t(`components.camera_options.chip_plugins`),loading:G(We)},null,8,[`label`,`loading`]),G(We)?q(``,!0):(L(),Y(`span`,Sc,$(e.$t(`components.camera_options.no_plugins_enabled`)),1))],64))])):G(pe)===`hub`?(L(),Y(`div`,Cc,[G(Ye).length?(L(),Y(P,{key:1},[U(r,{label:e.$t(`components.camera_options.chip_plugins`),loading:G(Le)},null,8,[`label`,`loading`]),U(a,{modelValue:G(me),"onUpdate:modelValue":n[6]||=e=>jn(me)?me.value=e:null,disabled:G(qe),mandatory:``,class:`min-h-[30px]`},{default:B(()=>[(L(!0),Y(P,null,R(G(Ye),e=>(L(),V(i,{key:e.pluginName,size:`small`,disabled:!Zt(e.pluginName)||G(N),value:e.pluginName},{default:B(()=>[H($(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),G(Ve)?(L(),Y(P,{key:0},[U(o,{class:`m-0 py-3`}),U(r,{label:e.$t(`components.camera_options.plugin_settings`)},null,8,[`label`]),(L(),V(vi,{ref_key:`schemaRef`,ref:fe,key:G(k),"schema-form":{schema:G(Ve).schema,config:G(Ve).config},loading:G(N),onOnFormSubmit:n[7]||=e=>cn(G(k),e),onOnSubmit:n[8]||=e=>sn(e,G(k)),onOnAction:n[9]||=e=>on(e,G(k))},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):(L(),Y(P,{key:0},[U(r,{label:e.$t(`components.camera_options.chip_plugins`),loading:G(We)},null,8,[`label`,`loading`]),G(We)?q(``,!0):(L(),Y(`span`,wc,$(e.$t(`components.camera_options.no_plugins_enabled`)),1))],64))])):G(pe)===`detection`?(L(),Y(`div`,Tc,[G(et).length?(L(),Y(P,{key:1},[U(r,{label:e.$t(`components.camera_options.sensor_types`),loading:G(We)},null,8,[`label`,`loading`]),U(a,{modelValue:G(he),"onUpdate:modelValue":n[10]||=e=>jn(he)?he.value=e:null,mandatory:``,class:`min-h-[30px]`},{default:B(()=>[(L(!0),Y(P,null,R(G(et),t=>(L(),V(i,{key:t,size:`small`,value:t},{default:B(()=>[H($(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`value`]))),128))]),_:1},8,[`modelValue`]),G(tt).length?(L(),Y(P,{key:0},[U(o,{class:`m-0 py-3`}),U(r,{label:e.$t(`components.camera_options.chip_plugins`),loading:G(vt)},null,8,[`label`,`loading`]),U(a,{modelValue:G(ge),"onUpdate:modelValue":n[11]||=e=>jn(ge)?ge.value=e:null,disabled:G(qe),class:`min-h-[30px]`},{default:B(()=>[(L(!0),Y(P,null,R(G(tt),e=>(L(),V(i,{key:e.pluginName,size:`small`,filter:``,disabled:!Zt(e.pluginName)||G(N),value:e.pluginName},{default:B(()=>[H($(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),G(St)?(L(),Y(P,{key:0},[U(o,{class:`m-0 py-3`}),U(r,{label:e.$t(`components.camera_options.plugin_settings`)},null,8,[`label`]),(L(),V(vi,{key:`detection-plugin-${G(ge)}`,"schema-form":{schema:G(St).schema,config:G(St).config},loading:G(N),onOnFormSubmit:n[12]||=e=>wn(e),onOnSubmit:n[13]||=e=>Sn(e),onOnAction:n[14]||=e=>xn(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0),U(o,{class:`m-0 py-3`}),U(r,{label:e.$t(`components.camera_options.sensors`),loading:G(xt)},null,8,[`label`,`loading`]),G(nt).length?(L(),V(a,{key:1,modelValue:G(Se),"onUpdate:modelValue":n[15]||=e=>jn(Se)?Se.value=e:null,mandatory:``,class:`min-h-[30px]`},{default:B(()=>[(L(!0),Y(P,null,R(G(nt),e=>(L(),V(i,{key:e.id,size:`small`,value:e.id},{default:B(()=>[H($(e.displayName.value),1)]),_:2},1032,[`value`]))),128))]),_:1},8,[`modelValue`])):G(We)?q(``,!0):(L(),Y(`span`,Dc,$(e.$t(`components.camera_options.no_sensors`)),1)),G(Ct)?(L(),Y(P,{key:3},[U(o,{class:`m-0 py-3`}),U(r,{label:e.$t(`components.camera_options.sensor_settings`)},null,8,[`label`]),(L(),V(vi,{key:`sensor-${G(Se)}`,"schema-form":{schema:G(Ct).schema,config:G(Ct).config},loading:G(N),onOnFormSubmit:n[16]||=e=>fn(e),onOnSubmit:n[17]||=e=>un(e),onOnAction:n[18]||=e=>ln(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):q(``,!0),G(ct)?(L(),Y(P,{key:1},[U(o,{class:`m-0 py-3`}),U(r,{label:e.$t(`components.camera_options.object_assist`),loading:G(At)},null,8,[`label`,`loading`]),U(a,{modelValue:G(_e),"onUpdate:modelValue":n[19]||=e=>jn(_e)?_e.value=e:null,disabled:G(qe),class:`min-h-[30px]`},{default:B(()=>[(L(!0),Y(P,null,R(G(st),e=>(L(),V(i,{key:e.pluginName,size:`small`,filter:``,disabled:!Zt(e.pluginName)||G(N),value:e.pluginName},{default:B(()=>[H($(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),G(jt)?(L(),Y(P,{key:0},[U(o,{class:`m-0 py-3`}),U(r,{label:e.$t(`components.camera_options.sensor_settings`)},null,8,[`label`]),(L(),V(vi,{key:`object-assist-${G(Tt)}`,"schema-form":{schema:G(jt).schema,config:G(jt).config},loading:G(N),onOnFormSubmit:n[20]||=e=>hn(e),onOnSubmit:n[21]||=e=>mn(e),onOnAction:n[22]||=e=>pn(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):q(``,!0)],64)):(L(),Y(P,{key:0},[U(r,{label:e.$t(`components.camera_options.sensor_types`),loading:G(We)},null,8,[`label`,`loading`]),G(We)?q(``,!0):(L(),Y(`span`,Ec,$(e.$t(`components.camera_options.no_plugins_enabled`)),1))],64))])):G(pe)===`core`?(L(),Y(`div`,Oc,[G(dt).length?(L(),Y(P,{key:1},[U(r,{label:e.$t(`components.camera_options.sensor_types`),loading:G(We)},null,8,[`label`,`loading`]),U(a,{modelValue:G(A),"onUpdate:modelValue":n[23]||=e=>jn(A)?A.value=e:null,mandatory:``,class:`min-h-[30px]`},{default:B(()=>[(L(!0),Y(P,null,R(G(dt),t=>(L(),V(i,{key:t,size:`small`,value:t},{default:B(()=>[H($(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`value`]))),128))]),_:1},8,[`modelValue`]),G(ft).length?(L(),Y(P,{key:0},[U(o,{class:`m-0 py-3`}),U(r,{label:e.$t(`components.camera_options.chip_plugins`),loading:G(Ft)},null,8,[`label`,`loading`]),U(a,{modelValue:G(j),"onUpdate:modelValue":n[24]||=e=>jn(j)?j.value=e:null,disabled:G(qe),class:`min-h-[30px]`},{default:B(()=>[(L(!0),Y(P,null,R(G(ft),e=>(L(),V(i,{key:e.pluginName,size:`small`,filter:``,disabled:!Zt(e.pluginName)||G(N),value:e.pluginName},{default:B(()=>[H($(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),G(zt)?(L(),Y(P,{key:0},[U(o,{class:`m-0 py-3`}),U(r,{label:e.$t(`components.camera_options.plugin_settings`)},null,8,[`label`]),(L(),V(vi,{key:`core-plugin-${G(j)}`,"schema-form":{schema:G(zt).schema,config:G(zt).config},loading:G(N),onOnFormSubmit:n[25]||=e=>Dn(e),onOnSubmit:n[26]||=e=>En(e),onOnAction:n[27]||=e=>Tn(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0),U(o,{class:`m-0 py-3`}),U(r,{label:e.$t(`components.camera_options.sensors`),loading:G(Rt)},null,8,[`label`,`loading`]),G(pt).length?(L(),V(a,{key:1,modelValue:G(Ce),"onUpdate:modelValue":n[28]||=e=>jn(Ce)?Ce.value=e:null,mandatory:``,class:`min-h-[30px]`},{default:B(()=>[(L(!0),Y(P,null,R(G(pt),e=>(L(),V(i,{key:e.id,size:`small`,value:e.id},{default:B(()=>[H($(e.displayName.value),1)]),_:2},1032,[`value`]))),128))]),_:1},8,[`modelValue`])):G(We)?q(``,!0):(L(),Y(`span`,Ac,$(e.$t(`components.camera_options.no_sensors`)),1)),G(Bt)?(L(),Y(P,{key:3},[U(o,{class:`m-0 py-3`}),U(r,{label:e.$t(`components.camera_options.sensor_settings`)},null,8,[`label`]),(L(),V(vi,{key:`sensor-${G(Ce)}`,"schema-form":{schema:G(Bt).schema,config:G(Bt).config},loading:G(N),onOnFormSubmit:n[29]||=e=>I(e),onOnSubmit:n[30]||=e=>_n(e),onOnAction:n[31]||=e=>gn(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):q(``,!0)],64)):(L(),Y(P,{key:0},[U(r,{label:e.$t(`components.camera_options.sensor_types`),loading:G(We)},null,8,[`label`,`loading`]),G(We)?q(``,!0):(L(),Y(`span`,kc,$(e.$t(`components.camera_options.no_plugins_enabled`)),1))],64))])):G(pe)===`accessories`?(L(),Y(`div`,jc,[G(Ae).length?(L(),Y(P,{key:1},[U(r,{label:e.$t(`components.camera_options.sensor_types`),loading:G(We)},null,8,[`label`,`loading`]),U(a,{modelValue:G(be),"onUpdate:modelValue":n[32]||=e=>jn(be)?be.value=e:null,mandatory:``,class:`min-h-[30px]`},{default:B(()=>[(L(!0),Y(P,null,R(G(Ae),t=>(L(),V(i,{key:t,size:`small`,value:t},{default:B(()=>[H($(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`value`]))),128))]),_:1},8,[`modelValue`]),G(je).length?(L(),Y(P,{key:0},[U(o,{class:`m-0 py-3`}),U(r,{label:e.$t(`components.camera_options.chip_plugins`),loading:G(Wt)},null,8,[`label`,`loading`]),U(a,{"model-value":G(Me)?G(Ne)[0]:G(Ne),disabled:G(qe),multiple:!G(Me),class:`min-h-[30px]`,"onUpdate:modelValue":an},{default:B(()=>[(L(!0),Y(P,null,R(G(je),e=>(L(),V(i,{key:e.pluginName,size:`small`,filter:``,disabled:!Zt(e.pluginName)||G(N),value:e.pluginName},{default:B(()=>[H($(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`model-value`,`disabled`,`multiple`]),G(Gt)?(L(),Y(P,{key:0},[U(o,{class:`m-0 py-3`}),U(r,{label:e.$t(`components.camera_options.plugin_settings`)},null,8,[`label`]),(L(),V(vi,{key:`accessory-plugin-${G(we)}`,"schema-form":{schema:G(Gt).schema,config:G(Gt).config},loading:G(N),onOnFormSubmit:n[33]||=e=>kn(e),onOnSubmit:n[34]||=e=>On(e),onOnAction:n[35]||=e=>W(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):q(``,!0),U(o,{class:`m-0 py-3`}),U(r,{label:e.$t(`components.camera_options.sensors`),loading:G(Be)},null,8,[`label`,`loading`]),G(Pe).length?(L(),V(a,{key:1,modelValue:G(xe),"onUpdate:modelValue":n[36]||=e=>jn(xe)?xe.value=e:null,mandatory:``,class:`min-h-[30px]`},{default:B(()=>[(L(!0),Y(P,null,R(G(Pe),e=>(L(),V(i,{key:e.id,size:`small`,value:e.id},{default:B(()=>[H($(e.displayName.value),1)]),_:2},1032,[`value`]))),128))]),_:1},8,[`modelValue`])):G(We)?q(``,!0):(L(),Y(`span`,Nc,$(e.$t(`components.camera_options.no_sensors`)),1)),G(He)?(L(),Y(P,{key:3},[U(o,{class:`m-0 py-3`}),U(r,{label:e.$t(`components.camera_options.sensor_settings`)},null,8,[`label`]),(L(),V(vi,{key:`sensor-${G(xe)}`,"schema-form":{schema:G(He).schema,config:G(He).config},loading:G(N),onOnFormSubmit:n[37]||=e=>bn(e),onOnSubmit:n[38]||=e=>yn(e),onOnAction:n[39]||=e=>vn(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):(L(),Y(P,{key:0},[U(r,{label:e.$t(`components.camera_options.sensor_types`),loading:G(We)},null,8,[`label`,`loading`]),G(We)?q(``,!0):(L(),Y(`span`,Mc,$(e.$t(`components.camera_options.no_plugins_enabled`)),1))],64))])):G(pe)===`more`?(L(),Y(`div`,Pc,[U(r,{label:e.$t(`components.camera_options.manage_plugins`),loading:G(ie)},null,8,[`label`,`loading`]),!G(Kt).length&&!G(ie)?(L(),Y(`span`,Fc,$(e.$t(`components.camera_options.no_plugins_found`)),1)):(L(),Y(`div`,Ic,[(L(!0),Y(P,null,R(G(Kt),t=>z((L(),Y(`div`,{key:t.pluginName,class:`cui-list-item`},[U(c,{disabled:G(qe)||!Zt(t.pluginName),class:`h-14`,onClick:n=>e.$router.push(`/plugins/${t.pluginName}`)},{append:B(()=>[U(s,{"model-value":G(C)?.some(e=>e.pluginName===t.pluginName),disabled:G(qe)||!Zt(t.pluginName),"onUpdate:modelValue":e=>rn(t)},null,8,[`model-value`,`disabled`,`onUpdate:modelValue`])]),default:B(()=>[K(`span`,null,$(t.displayName),1)]),_:2},1032,[`disabled`,`onClick`])])),[[f,{value:Zt(t.pluginName)===void 0?e.$t(`components.form.tooltip.disabled`):``},void 0,{top:!0}]])),128))])),K(`div`,Lc,[U(c,{class:`h-14`,onClick:n[40]||=t=>e.$router.push(`/plugins`)},{append:B(()=>[U(d,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-md`},{icon:B(()=>[U(u,{width:`100%`,height:`100%`})]),_:1})]),default:B(()=>[K(`span`,null,$(e.$t(`components.camera_options.more_plugins`)),1)]),_:1})])])):q(``,!0)])}}}),zc={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`}},Vc={class:`flex flex-col field-gap`},Hc={class:`cui-label`},Uc={class:`flex flex-col field-gap`},Wc={for:`aspect-ratio-custom`,class:`cui-label`},Gc=An({__name:`AspectRatio`,props:{camera:{},current:{},presets:{}},setup(e,{expose:t}){let n=e,{t:r}=a(),i=Wn(`dialogRefProps`),o=X(n.current||`16:9`),s=/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?)$/,c=J(()=>{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=J(()=>n.presets.includes(o.value)),d=J(()=>c.value?``:o.value.trim()===``?r(`components.form.hint.aspect_ratio_required`):r(`components.form.hint.aspect_ratio_invalid`)),f=J(()=>!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)})),p=J(()=>{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`}});Fn(()=>{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,a=u,s=vr,c=zr;return L(),Y(`div`,zc,[K(`div`,Bc,[K(`div`,{class:`relative`,style:Bn(G(p))},[U(Qe,{camera:e.camera,"show-loading-screen":!1,"show-timestamp":!0,class:`absolute inset-0`,"image-style":{objectFit:`fill`}},null,8,[`camera`])],4)]),K(`div`,Vc,[K(`label`,Hc,$(G(r)(`components.form.label.aspect_ratio`)),1),U(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`])]),K(`div`,Uc,[K(`label`,Wc,$(G(r)(`components.form.label.aspect_ratio_custom`)),1),U(s,null,{default:B(()=>[U(a,{id:`aspect-ratio-custom`,modelValue:G(o),"onUpdate:modelValue":n[1]||=e=>jn(o)?o.value=e:null,modelModifiers:{trim:!0},invalid:!!G(d),placeholder:`16:9`,spellcheck:`false`,onKeydown:n[2]||=Tn(yn(()=>{},[`prevent`]),[`enter`])},null,8,[`modelValue`,`invalid`])]),_:1}),U(I,{name:`fade`},{default:B(()=>[G(d)?(L(),V(c,{key:0,severity:`error`,variant:`simple`,size:`small`,class:`cui-input-error`},{default:B(()=>[H($(G(d)),1)]),_:1})):q(``,!0)]),_:1}),G(d)?q(``,!0):(L(),V(c,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(G(f)),1)]),_:1}))])])}}}),Kc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function qc(e,t){return L(),Y(`svg`,Kc,[...t[0]||=[K(`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 Jc=Ln({name:`mdi-cancel`,render:qc}),Yc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Xc(e,t){return L(),Y(`svg`,Yc,[...t[0]||=[K(`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 Zc=Ln({name:`mdi-undo`,render:Xc}),Qc=e(Kr(),1),$c=[`audio`,`motion`],el={ref:`container`,class:`w-full h-full relative min-w-0`},tl={class:`flex flex-col justify-center items-center`},nl={class:`relative w-full`},rl={class:`relative w-full flex flex-col items-center justify-center`},il={class:`absolute top-0 left-0 right-0 bottom-0 flex items-center justify-center pointer-events-none`},al={class:`sandbox w-full h-full`},ol={class:`handles`},sl=[`data-id`,`data-point`,`data-point-index`,`data-zone-index`,`onDblclick`],cl=[`onClick`],ll={class:`clipboard`},ul={width:`100%`,height:`100%`,class:`polygon-container`},dl=[`d`,`onClick`,`onMousedown`,`onTouchstart`],fl=[`id`],pl=[`fill`],ml=[`id`],hl=[`fill`],gl=[`x1`,`y1`,`x2`,`y2`,`stroke`],_l=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-opacity`,`marker-end`,`marker-start`,`onClick`],vl=[`x`,`y`,`fill`],yl=[`x`,`y`],bl=[`x`,`y`,`fill`],xl=[`x`,`y`],Sl=[`cx`,`cy`,`fill`,`stroke`,`onMousedown`,`onTouchstart`],Cl=[`cx`,`cy`,`fill`,`stroke`,`onMousedown`,`onTouchstart`],wl={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`}},Tl={class:`cui-input-hint w-full self-stretch text-pretty`},El={class:`flex flex-col field-gap w-full`},Dl=[`for`],Ol={key:0,class:`cui-input-error`},kl={class:`flex flex-col field-gap w-full`},Al=[`for`],jl={class:`inline-flex shrink-0`},Ml={class:`flex flex-col field-gap w-full`},Nl=[`for`],Pl={class:`inline-flex shrink-0`},Fl={class:`flex flex-col field-gap w-full`},Il=[`for`],Ll={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner mt-auto`},Rl={class:`cui-input-hint w-full self-stretch text-pretty`},zl={class:`flex flex-col field-gap w-full`},Bl=[`for`],Vl={key:0,class:`cui-input-error`},Hl={key:0,class:`flex flex-col field-gap w-full`},Ul=[`for`],Wl={class:`inline-flex shrink-0`},Gl={key:0,class:`cui-input-hint text-pretty`},Kl={key:1,class:`flex flex-col field-gap w-full`},ql=[`for`],Jl={class:`inline-flex shrink-0`},Yl={key:2,class:`flex flex-col field-gap w-full`},Xl=[`for`],Zl={class:`inline-flex shrink-0`},Ql={key:3,class:`flex flex-col field-gap w-full`},$l=[`for`],eu={class:`inline-flex shrink-0`},tu={key:4,class:`flex flex-col field-gap w-full`},nu={for:`privacyFallback`,class:`cui-label inline-flex items-center gap-1`},ru={class:`inline-flex shrink-0`},iu={key:5,class:`flex flex-col field-gap w-full`},au=[`for`],ou={class:`inline-flex shrink-0`},su={key:6,class:`flex flex-col field-gap w-full`},cu=[`for`],lu={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner mt-auto`},uu=`__faces__`,du=`__plates__`,fu=`__known__`,pu=`unknown`,mu=N(An({__name:`ZoneEditor`,props:{cameraName:{},zones:{},initialTab:{},initialSelection:{}},setup(e,{expose:t}){let n=new at,r=e,i=Ze(),{t:s}=a(),c=ie(),d=Wn(`dialogRefProps`),{mutateAsync:f,isPending:m}=n.patchZoneConfigQuery(),{cameraName:h,zones:g}=Nn(r),_=Cn(`cameraCardRef`),v=Cn(`container`),y=Cn(`draggablesRef`),b=Cn(`outsideRef`),x=Cn(`playgroundContainerRef`),S=X(r.initialTab??`motion`),C=zn([]),w=X([]),ee=X([]),te=X([]),ne=X(`send`),re=X([]),T=X([]),ae=X(!1),oe=X([]),E=X(void 0),D=X(-1),se=X(-1),O=X(-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=!1,de=null,fe=null,pe=Le(v),k=Le(x),me=Le(()=>_.value?.videoBoxRef??null),he=Mi.element.shape.name,ge=Pi.element.shape.name;function _e(e){return e===`motion`?w.value:e===`object`?ee.value:e===`privacy`?te.value:re.value}let j=J(()=>_e(S.value)),ve=J(()=>S.value===`object`||S.value===`alert`),ye=J(()=>{if(S.value!==`alert`||D.value<0)return[];let e=ee.value;if(e.length===0||e.some(e=>e.labels.length===0))return[];let t=new Set(e.flatMap(e=>e.labels));return(re.value[D.value]?.labels??[]).filter(e=>!t.has(e))}),be=J(()=>S.value===`alert`||S.value===`motion`);function xe(e){if(S.value===`object`)return ee.value[e];if(S.value===`alert`)return re.value[e]}function Se(e){let t=j.value[e];return t&&`color`in t?t:void 0}function Ce(e){return`color`in e?{fill:`${e.color}4D`,stroke:e.color,"stroke-width":`2`}:{fill:`#000`,stroke:`#000`,"stroke-width":`2`}}let we=J(()=>{if(D.value<0)return``;let e=j.value[D.value];if(!e)return``;let t=he.safeParse(e.name);return t.success?``:t.error.issues[0]?.message??``}),Te=J(()=>{if(O.value<0)return``;let e=T.value[O.value];if(!e)return``;let t=ge.safeParse(e.name);return t.success?``:t.error.issues[0]?.message??``}),Ee=J(()=>Math.max(0,k.width.value-20)),De=J(()=>Math.max(0,k.height.value-20)),Oe=J(()=>{let e=me.width.value,t=me.height.value;return!e||!t?{width:`100%`,height:`100%`}:{width:`${e+20}px`,height:`${t+20}px`}}),ke=J(()=>[{label:s(`components.zone_editor.tab_motion`),value:`motion`},{label:s(`components.zone_editor.tab_object`),value:`object`},{label:s(`components.zone_editor.tab_alert`),value:`alert`},{label:s(`components.zone_editor.tab_privacy`),value:`privacy`},{label:s(`components.zone_editor.tab_lines`),value:`lines`}]),Ae=J(()=>{let e=o.filter(e=>!$c.includes(e));return e.length===0?[]:[{label:s(`components.zone_editor.base_labels`),items:e.map(e=>({label:s(ki(e)),value:e}))}]}),je=Ae,Me=J(()=>[...Ae.value,{label:s(`components.zone_editor.identify_group`),items:[{label:s(`components.zone_editor.identify_faces`),value:`face`},{label:s(`components.zone_editor.identify_plates`),value:`license_plate`}]}]),Ne=J(()=>[...Ae.value,{label:s(`components.zone_editor.alert_attributes`),items:[{label:s(`components.zone_editor.alert_faces`),value:uu},{label:s(`components.zone_editor.alert_plates`),value:du}]}]),M=J(()=>{let e=re.value[D.value];if(!e)return[];let t=[...e.labels];return e.faces&&t.push(uu),e.plates&&t.push(du),t}),Pe=J(()=>[{label:s(`components.zone_editor.alert_face_unknown`),value:pu},{label:s(`components.zone_editor.alert_face_any_known`),value:fu},...c.knownFaces.value.map(e=>({label:e.name,value:e.name}))]),Fe=J(()=>[{label:s(`components.zone_editor.match_anchor`),value:`anchor`},{label:s(`components.zone_editor.match_intersect`),value:`intersect`},{label:s(`components.zone_editor.match_contain`),value:`contain`}]),Ie=J(()=>[{label:s(`components.zone_editor.match_intersect`),value:`intersect`},{label:s(`components.zone_editor.match_contain`),value:`contain`}]),Re=J(()=>[{label:`A ↔ B ${s(`components.zone_editor.line_direction_both`)}`,value:`both`},{label:`A → B`,value:`a-to-b`},{label:`B → A`,value:`b-to-a`}]),ze=J(()=>[{label:s(`components.zone_editor.privacy_fallback_send`),value:`send`},{label:s(`components.zone_editor.privacy_fallback_drop`),value:`drop`}]),Be=J(()=>[{label:s(`components.zone_editor.privacy_drop_on`),value:!0},{label:s(`components.zone_editor.privacy_drop_off`),value:!1}]),Ve=J(()=>!!(d.loading?.value||m.value)),He=J(()=>{let e=[];return ae.value&&e.push(`customizing`),j.value?.length||e.push(`start`),e.join(` `)});function Ue(e){if(S.value===`alert`){let t=re.value[D.value];t&&(t.match=e);return}let t=ee.value[D.value];t&&e!==`anchor`&&(t.type=e)}function We(e){let t=re.value[D.value];if(!t)return;let n=e??[],r=n.includes(uu),i=n.includes(du),a=n.filter(e=>e!==uu&&e!==du);r&&!a.includes(`person`)&&a.push(`person`),i&&!a.includes(`vehicle`)&&a.push(`vehicle`),t.labels=a,t.faces=r?t.faces??[]:void 0,t.plates=i?t.plates??[]:void 0}function Ke(){if(j.value){if(j.value.length===0){oe.value=[];return}oe.value=j.value.flatMap((e,t)=>e.points.map((e,n)=>({_id:`z${t}-p${n}`,zoneIndex:t,pointIndex:n,point:[e[0],e[1]]})))}}function qe(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 N(e,t){if(ae.value||!x.value)return;e.stopPropagation(),le=!0,D.value=t;let n=x.value.getBoundingClientRect(),{x:r,y:i}=qe(e),a=Ee.value,o=De.value;ce.x=(r-n.left-10)/a*100,ce.y=(i-n.top-10)/o*100}function Je(e){if(!le||!x.value||D.value===-1||!j.value.length)return;let t=x.value.getBoundingClientRect(),{x:n,y:r}=qe(e),i=Ee.value,a=De.value,o=(n-t.left-10)/i*100,s=(r-t.top-10)/a*100,c=o-ce.x,l=s-ce.y,u=j.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;C.value.find(t=>t.id===`z${D.value}-p${e}`)?.setPosition(t,n)}ce.x=o,ce.y=s}function Ye(){setTimeout(()=>{le=!1},100)}function Xe(e){let t=st(),n=Date.now();S.value===`motion`?w.value.push({name:`motion-${n}`,points:[...e],color:t}):S.value===`object`?ee.value.push({name:`object-${n}`,points:[...e],type:`intersect`,labels:[],color:t}):S.value===`privacy`?te.value.push({name:`privacy-${n}`,points:[...e],dropDetections:!0}):re.value.push({name:`alert-${n}`,points:[...e],labels:[],match:`contain`,color:t})}function Qe(e){if(!ae.value||le||ue||e.target?.closest(`.handle`)||!x.value)return;let t=E.value===void 0?j.value.length:E.value,n=x.value.getBoundingClientRect(),r=Math.min(Math.max(Math.round((e.clientX-n.left-10)/Ee.value*100),0),100),i=Math.min(Math.max(Math.round((e.clientY-n.top-10)/De.value*100),0),100);if(E.value===void 0&&(Xe([]),E.value=j.value.length-1),!j.value[t]){E.value=void 0;return}let a=j.value[t].points,o=(de?.zoneIndex===t?de.pointIndex:a.length-1)+1;a.splice(o,0,[r,i]),de={zoneIndex:t,pointIndex:o},Ke(),Vn(()=>ut())}function $e(e){if(!j.value.length)return;let t=Math.round(e.point[0]/Ee.value*100),n=Math.round(e.point[1]/De.value*100);j.value[e.zoneIndex].points[e.pointIndex]=[t,n]}function et(){ae.value=!0,E.value=void 0,de=null,dt()}function tt(e,t=S.value){if(E.value===void 0){ae.value=!1;return}ae.value=e||!1;let n=E.value;E.value=void 0;let r=_e(t);r[n]?.points&&(r[n].points.length<3?(r.splice(n,1),Ke()):t===S.value&&(ut(),D.value=n))}function nt(){ae.value=!0,E.value=D.value;let e=j.value[D.value]?.points;de=e?.length?{zoneIndex:D.value,pointIndex:e.length-1}:null,dt()}function rt(){D.value===-1||!j.value.length||(E.value===D.value&&(E.value=void 0,ae.value=!1),j.value.splice(D.value,1),D.value=Math.max(-1,D.value-1),de=null,Ke(),Vn(()=>{ut()}))}function it(){if(j.value?.length){if(ae.value&&E.value!==void 0){let e=j.value[E.value];e.points.length&&(e.points.pop(),e.points.length===0&&(j.value.splice(E.value,1),E.value=void 0),Ke());return}j.value.length>0&&(j.value.pop(),Ke(),Vn(()=>{ut()}))}}function ot(){le=!1,ae.value=!1,E.value=void 0,j.value&&(j.value.length=0,oe.value=[],Vn(()=>{ft()}))}function st(){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 ct(e){if(!e||!e.length)return``;let t=e.map(e=>{let t=Math.round(e[0]/100*Ee.value),n=Math.round(e[1]/100*De.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 lt(e){if(!ae.value&&(D.value=e,de?.zoneIndex!==e)){let t=j.value[e]?.points;de=t?.length?{zoneIndex:e,pointIndex:t.length-1}:null,dt()}}function ut(){ft(),y.value?.forEach(e=>{if(!e.dataset.zoneIndex||!e.dataset.pointIndex)return;let t=parseInt(e.dataset.zoneIndex),n=parseInt(e.dataset.pointIndex);if(!j.value[t]||!j.value[t].points[n])return;let r=j.value[t].points[n];r&&(mt(e,r),gt(e))}),dt()}function dt(){let e=de?j.value[de.zoneIndex]:void 0;e?.points.length?de&&de.pointIndex>=e.points.length&&(de={zoneIndex:de.zoneIndex,pointIndex:e.points.length-1}):de=null,y.value?.forEach(e=>{let t=!!de&&e.dataset.zoneIndex===String(de.zoneIndex)&&e.dataset.pointIndex===String(de.pointIndex);e.classList.toggle(`active`,t),e.classList.toggle(`show-delete`,t)})}function ft(){C.value.forEach(e=>e.destroy()),C.value=[]}function pt(e){if(!j.value.length||!j.value[e.zoneIndex])return;let t=j.value[e.zoneIndex];t.points.splice(e.pointIndex,1),t.points.length===0?(j.value.splice(e.zoneIndex,1),de=null,E.value===e.zoneIndex?E.value=void 0:E.value!==void 0&&E.value>e.zoneIndex&&--E.value,D.value>=e.zoneIndex&&(D.value=Math.max(-1,D.value-1))):de?.zoneIndex===e.zoneIndex&&de.pointIndex>=e.pointIndex&&(de={zoneIndex:e.zoneIndex,pointIndex:Math.max(0,de.pointIndex-1)}),Ke(),Vn(()=>{ut()})}function mt(e,t){Object.assign(e.style,ht(t))}function ht(e){return{left:Math.round(e[0]/100*Ee.value)+`px`,top:Math.round(e[1]/100*De.value)+`px`}}function gt(e){e.classList.add(`draggable`);let t=new Qc.default(e,{containment:!0,grid:[0,0]}).on(`pointerDown`,()=>{if(ue=!0,e.dataset.zoneIndex&&e.dataset.pointIndex){let t=parseInt(e.dataset.zoneIndex);lt(t),de={zoneIndex:t,pointIndex:parseInt(e.dataset.pointIndex)},dt()}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;$e({_id:e.dataset.id,point:[n,r],pointIndex:parseInt(e.dataset.pointIndex),zoneIndex:parseInt(e.dataset.zoneIndex)})}).on(`pointerUp`,()=>{setTimeout(()=>{ue=!1},100),document.querySelectorAll(`.point`).forEach(e=>e.classList.remove(`changing`))});t.id=e.dataset.id,C.value.push(t)}function _t(e,t,n){e.preventDefault(),O.value=t,fe={lineIndex:t,pointIndex:n};let r=e=>{if(!fe||!x.value)return;let t=x.value.getBoundingClientRect(),{x:n,y:r}=qe(e),i=Math.min(Math.max((n-t.left-10)/Ee.value*100,0),100),a=Math.min(Math.max((r-t.top-10)/De.value*100,0),100);T.value[fe.lineIndex].points[fe.pointIndex]=[Math.round(i),Math.round(a)]},i=()=>{fe=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 vt(){T.value.push({name:`line-${Date.now()}`,points:[[40,30],[60,70]],direction:`both`,labels:[`person`,`vehicle`,`animal`],color:st()}),O.value=T.value.length-1}function yt(){O.value<0||!T.value.length||(T.value.splice(O.value,1),O.value=Math.max(-1,O.value-1))}function bt(e){let t=Ee.value,n=De.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 St(){let e=[...w.value,...ee.value,...te.value,...re.value].filter(e=>e.points.length<3);if(e.length)return i.add({severity:`error`,detail:s(`components.toast.zone_incomplete`,{zones:e.map(e=>e.name).join(`, `)}),life:5e3}),null;try{await f({cameraname:h.value,zones:{privacyFallback:ne.value,motion:w.value,object:ee.value,privacy:te.value,alert:re.value,lines:T.value}})}catch(e){return i.add({severity:`error`,detail:e,life:3e3}),null}}return p(b,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&&!ae.value&&!o&&!s&&!c&&(D.value=-1)}),F(se,()=>{se.value=-1}),F(D,(e,t)=>{if(e===-1&&j.value?.length&&j.value[t]){D.value=t;return}e===-1&&j.value?.length&&(se.value=0)}),F(g,()=>{w.value=Gt(g.value.motion??[]),ee.value=Gt(g.value.object??[]),te.value=Gt(g.value.privacy??[]),ne.value=g.value.privacyFallback??`send`,re.value=Gt(g.value.alert??[]),T.value=Gt(g.value.lines??[]),Ke()},{deep:!0,immediate:!0}),F(S,(e,t)=>{if(e===`lines`){T.value.length&&(O.value<0||O.value>=T.value.length)&&(O.value=0);return}j.value.length?(D.value<0||D.value>=j.value.length)&&(D.value=0):D.value=-1,t&&t!==e&&(tt(!1,t),Ke(),Vn(()=>{ut()}))},{immediate:!0}),F([k.width,k.height],()=>{ut()}),cn(async()=>{setTimeout(()=>{ut()})}),t({isLoading:Ve,onConfirm:St}),(e,t)=>{let n=xt,r=A,i=u,a=vr,o=Ti,s=Ar,c=Or,d=ur,f=gr,p=Ei,m=Ge,g=Ri,v=Lr,C=tn,w=Ci,ie=Zc,se=Jc,ce=l;return L(),Y(`div`,el,[K(`div`,tl,[K(`div`,nl,[K(`div`,{ref_key:`outsideRef`,ref:b},null,512),K(`div`,{class:W([`w-full flex justify-center gap-3`,{"flex-row items-stretch":G(pe).width.value>900,"flex-col":G(pe).width.value<=900}])},[K(`div`,rl,[K(`div`,il,[K(`div`,{ref_key:`playgroundContainerRef`,ref:x,class:`playground-container flex min-w-0 pointer-events-auto`,style:Bn(G(Oe))},[K(`section`,{class:W([`playground w-full h-full`,G(He)]),onClick:Qe},[K(`div`,al,[K(`div`,ol,[(L(!0),Y(P,null,R(G(oe),e=>z((L(),Y(`div`,{key:e._id,ref_for:!0,ref_key:`draggablesRef`,ref:y,class:`handle`,"data-id":e._id,"data-point":`${e.zoneIndex}-${e.pointIndex}`,"data-point-index":e.pointIndex,"data-zone-index":e.zoneIndex,onDblclick:yn(t=>pt(e),[`prevent`])},[K(`div`,{class:`delete-point`,onClick:yn(t=>pt(e),[`stop`]),onPointerdown:t[0]||=yn(()=>{},[`stop`]),onMousedown:t[1]||=yn(()=>{},[`stop`]),onTouchstart:t[2]||=yn(()=>{},[`stop`])},null,40,cl)],40,sl)),[[wn,G(S)!==`lines`]])),128)),K(`div`,ll,[(L(),Y(`svg`,ul,[G(S)===`lines`?q(``,!0):(L(!0),Y(P,{key:0},R(G(j),(e,t)=>(L(),Y(`path`,{key:`poly-${t}`,d:ct(e.points),class:W([`cursor-pointer`,{dash:G(be),selected:G(D)===t}]),style:Bn(Ce(e)),onClick:e=>lt(t),onMousedown:e=>N(e,t),onMousemove:Je,onMouseup:Ye,onTouchstart:e=>N(e,t),onTouchmove:Je,onTouchend:Ye},null,46,dl))),128)),G(S)===`lines`?(L(),Y(P,{key:1},[K(`defs`,null,[(L(!0),Y(P,null,R(G(T),(e,t)=>(L(),Y(`marker`,{id:`editor-arrow-ab-${t}`,key:`marker-ab-${t}`,markerWidth:`6`,markerHeight:`5`,refX:`5`,refY:`2.5`,orient:`auto`,markerUnits:`strokeWidth`},[K(`path`,{d:`M0,0 L6,2.5 L0,5 Z`,fill:e.color},null,8,pl)],8,fl))),128)),(L(!0),Y(P,null,R(G(T),(e,t)=>(L(),Y(`marker`,{id:`editor-arrow-ba-${t}`,key:`marker-ba-${t}`,markerWidth:`6`,markerHeight:`5`,refX:`1`,refY:`2.5`,orient:`auto`,markerUnits:`strokeWidth`},[K(`path`,{d:`M6,0 L0,2.5 L6,5 Z`,fill:e.color},null,8,hl)],8,ml))),128))]),(L(!0),Y(P,null,R(G(T),(e,t)=>(L(),Y(P,{key:`line-${t}`},[K(`line`,{x1:bt(e).h1x,y1:bt(e).h1y,x2:bt(e).h2x,y2:bt(e).h2y,stroke:e.color,"stroke-width":`2`,"stroke-dasharray":`6,4`,opacity:`0.6`},null,8,gl),K(`line`,{x1:bt(e).ax,y1:bt(e).ay,x2:bt(e).bx,y2:bt(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,_l),K(`rect`,{x:bt(e).labelAx-9,y:bt(e).labelAy-9,width:`18`,height:`18`,rx:`4`,fill:e.color},null,8,vl),K(`text`,{x:bt(e).labelAx,y:bt(e).labelAy,fill:`#fff`,"font-size":`11`,"font-weight":`bold`,"text-anchor":`middle`,"dominant-baseline":`central`},` A `,8,yl),K(`rect`,{x:bt(e).labelBx-9,y:bt(e).labelBy-9,width:`18`,height:`18`,rx:`4`,fill:e.color},null,8,bl),K(`text`,{x:bt(e).labelBx,y:bt(e).labelBy,fill:`#fff`,"font-size":`11`,"font-weight":`bold`,"text-anchor":`middle`,"dominant-baseline":`central`},` B `,8,xl),K(`circle`,{cx:bt(e).h1x,cy:bt(e).h1y,r:`8`,fill:e.color,stroke:G(O)===t?`#fff`:e.color,"stroke-width":`2`,class:`cursor-grab`,onMousedown:yn(e=>_t(e,t,0),[`stop`]),onTouchstart:yn(e=>_t(e,t,0),[`stop`])},null,40,Sl),K(`circle`,{cx:bt(e).h2x,cy:bt(e).h2y,r:`8`,fill:e.color,stroke:G(O)===t?`#fff`:e.color,"stroke-width":`2`,class:`cursor-grab`,onMousedown:yn(e=>_t(e,t,1),[`stop`]),onTouchstart:yn(e=>_t(e,t,1),[`stop`])},null,40,Cl)],64))),128))],64)):q(``,!0)]))])]),t[17]||=K(`div`,{class:`shadowboard on`},null,-1)])],2)],4)]),K(`div`,wl,[U(n,{ref_key:`cameraCardRef`,ref:_,"camera-info":G(h),"source-role":`low-resolution`,"streaming-mode":`auto`,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`])])]),K(`div`,{class:W([`w-full flex flex-col gap-6 zone-buttons items-center self-stretch`,{"!gap-3":G(pe).width.value>900}]),style:Bn({flex:G(pe).width.value>900?`0 0 440px`:void 0,"max-width":G(pe).width.value>900?`440px`:void 0})},[U(r,{modelValue:G(S),"onUpdate:modelValue":t[3]||=e=>jn(S)?S.value=e:null,options:G(ke),"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(S)===`lines`?(L(),Y(P,{key:0},[K(`p`,Tl,$(e.$t(`components.zone_editor.lines_hint`)),1),K(`div`,El,[K(`label`,{for:`line[${G(O)}].name`,class:`cui-label`},$(e.$t(`components.form.label.name`)),9,Dl),U(a,null,{default:B(()=>[U(i,{"model-value":G(T)[G(O)]?.name,invalid:!!G(Te),loading:G(Ve),disabled:G(O)<0,type:`text`,onValueChange:t[4]||=e=>{G(T)[G(O)]&&(G(T)[G(O)].name=e??``)}},null,8,[`model-value`,`invalid`,`loading`,`disabled`])]),_:1}),U(I,{name:`fade`},{default:B(()=>[G(Te)?(L(),Y(`span`,Ol,$(G(Te)),1)):q(``,!0)]),_:1})]),K(`div`,kl,[K(`label`,{for:`line[${G(O)}].labels`,class:`cui-label inline-flex items-center gap-1`},[H($(e.$t(`components.form.label.labels`))+` `,1),z((L(),Y(`span`,jl,[U(o,{class:`w-3.5 h-3.5 text-muted-color`})])),[[ce,{value:e.$t(`components.zone_editor.line_labels_info`)}]])],8,Al),U(a,null,{default:B(()=>[U(s,{"model-value":G(T)[G(O)]?.labels,options:G(je),loading:G(Ve),"max-selected-labels":2,"show-toggle-all":!1,"option-label":`label`,"option-value":`value`,"option-group-label":`label`,"option-group-children":`items`,"show-clear":``,type:`text`,onValueChange:t[5]||=e=>{G(T)[G(O)]&&(G(T)[G(O)].labels=e)}},null,8,[`model-value`,`options`,`loading`])]),_:1})]),K(`div`,Ml,[K(`label`,{for:`line[${G(O)}].direction`,class:`cui-label inline-flex items-center gap-1`},[H($(e.$t(`components.zone_editor.line_direction`))+` `,1),z((L(),Y(`span`,Pl,[U(o,{class:`w-3.5 h-3.5 text-muted-color`})])),[[ce,{value:e.$t(`components.zone_editor.line_direction_info`)}]])],8,Nl),U(a,null,{default:B(()=>[U(c,{"model-value":G(T)[G(O)]?.direction??`both`,options:G(Re),loading:G(Ve),disabled:G(O)<0,"option-label":`label`,"option-value":`value`,onValueChange:t[6]||=e=>{G(T)[G(O)]&&(G(T)[G(O)].direction=e)}},null,8,[`model-value`,`options`,`loading`,`disabled`])]),_:1})]),K(`div`,Fl,[K(`label`,{for:`line[${G(O)}].color`,class:`cui-label`},$(e.$t(`components.form.label.color`)),9,Il),U(a,null,{default:B(()=>[U(i,{"model-value":G(T)[G(O)]?.color,loading:G(Ve),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),U(f,null,{default:B(()=>[(L(),V(d,{key:G(O),"model-value":G(T)[G(O)]?.color,format:`hex`,onValueChange:t[7]||=e=>e&&G(T)[G(O)]?G(T)[G(O)].color=`#${e}`:null},null,8,[`model-value`]))]),_:1})]),_:1})]),K(`div`,Ll,[z((L(),V(m,{loading:G(Ve),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:vt},{icon:B(()=>[U(p,{width:`20px`,height:`20px`})]),_:1},8,[`loading`])),[[ce,{value:e.$t(`components.form.tooltip.new`)},void 0,{top:!0}]]),z((L(),V(m,{loading:G(Ve),disabled:!G(T).length||G(O)<0,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:yt},{icon:B(()=>[U(g,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[ce,{value:e.$t(`components.form.tooltip.delete_line`)},void 0,{top:!0}]])])],64)):q(``,!0),G(S)===`lines`?q(``,!0):(L(),Y(P,{key:1},[K(`p`,Rl,$(e.$t(`components.zone_editor.${G(S)}_hint`)),1),K(`div`,zl,[K(`label`,{for:`zone[${G(D)}].name`,class:`cui-label`},$(e.$t(`components.form.label.name`)),9,Bl),U(a,null,{default:B(()=>[U(i,{"model-value":G(j)[G(D)]?.name,invalid:!!G(we),loading:G(Ve),disabled:G(D)<0,type:`text`,onValueChange:t[8]||=e=>{G(j)[G(D)]&&(G(j)[G(D)].name=e??``)}},null,8,[`model-value`,`invalid`,`loading`,`disabled`])]),_:1}),U(I,{name:`fade`},{default:B(()=>[G(we)?(L(),Y(`span`,Vl,$(G(we)),1)):q(``,!0)]),_:1})]),G(ve)?(L(),Y(`div`,Hl,[K(`label`,{for:`zone[${G(D)}].labels`,class:`cui-label inline-flex items-center gap-1`},[H($(e.$t(`components.form.label.labels`))+` `,1),z((L(),Y(`span`,Wl,[U(o,{class:`w-3.5 h-3.5 text-muted-color`})])),[[ce,{value:e.$t(`components.zone_editor.${G(S)}_labels_info`)}]])],8,Ul),U(a,null,{default:B(()=>[U(s,{"model-value":G(S)===`alert`?G(M):xe(G(D))?.labels,options:G(S)===`alert`?G(Ne):G(S)===`object`?G(Me):G(Ae),loading:G(Ve),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[9]||=e=>{if(G(S)===`alert`){We(e);return}let t=xe(G(D));t&&(t.labels=e??[])}},null,8,[`model-value`,`options`,`loading`,`disabled`])]),_:1}),U(I,{name:`fade`},{default:B(()=>[G(ye).length?(L(),Y(`p`,Gl,$(e.$t(`components.zone_editor.alert_conflict`,{labels:G(ye).join(`, `)})),1)):q(``,!0)]),_:1})])):q(``,!0),G(S)===`alert`&&G(re)[G(D)]?.faces?(L(),Y(`div`,Kl,[K(`label`,{for:`zone[${G(D)}].faces`,class:`cui-label inline-flex items-center gap-1`},[H($(e.$t(`components.zone_editor.alert_faces`))+` `,1),z((L(),Y(`span`,Jl,[U(o,{class:`w-3.5 h-3.5 text-muted-color`})])),[[ce,{value:e.$t(`components.zone_editor.alert_faces_info`)}]])],8,ql),U(a,null,{default:B(()=>[U(s,{"model-value":G(re)[G(D)]?.faces??[],options:G(Pe),loading:G(Ve),"max-selected-labels":2,"show-toggle-all":!1,"option-label":`label`,"option-value":`value`,filter:``,"show-clear":``,type:`text`,onValueChange:t[10]||=e=>{let t=G(re)[G(D)];t&&(t.faces=e??[])}},null,8,[`model-value`,`options`,`loading`])]),_:1})])):q(``,!0),G(S)===`alert`&&G(re)[G(D)]?.plates?(L(),Y(`div`,Yl,[K(`label`,{for:`zone[${G(D)}].plates`,class:`cui-label inline-flex items-center gap-1`},[H($(e.$t(`components.zone_editor.alert_plates`))+` `,1),z((L(),Y(`span`,Zl,[U(o,{class:`w-3.5 h-3.5 text-muted-color`})])),[[ce,{value:e.$t(`components.zone_editor.alert_plates_info`)}]])],8,Xl),U(a,null,{default:B(()=>[U(v,{"model-value":G(re)[G(D)]?.plates??[],multiple:``,typeahead:!1,placeholder:e.$t(`components.zone_editor.alert_plates_placeholder`),class:`w-full`,"onUpdate:modelValue":t[11]||=e=>{let t=G(re)[G(D)];t&&(t.plates=e??[])}},null,8,[`model-value`,`placeholder`])]),_:1})])):q(``,!0),G(S)===`privacy`?(L(),Y(`div`,Ql,[K(`label`,{for:`zone[${G(D)}].dropDetections`,class:`cui-label inline-flex items-center gap-1`},[H($(e.$t(`components.zone_editor.privacy_drop`))+` `,1),z((L(),Y(`span`,eu,[U(o,{class:`w-3.5 h-3.5 text-muted-color`})])),[[ce,{value:e.$t(`components.zone_editor.privacy_drop_info`)}]])],8,$l),U(a,null,{default:B(()=>[U(c,{"model-value":G(te)[G(D)]?.dropDetections??!0,options:G(Be),loading:G(Ve),disabled:G(D)<0,"option-label":`label`,"option-value":`value`,onValueChange:t[12]||=e=>{G(te)[G(D)]&&(G(te)[G(D)].dropDetections=e)}},null,8,[`model-value`,`options`,`loading`,`disabled`])]),_:1})])):q(``,!0),G(S)===`privacy`?(L(),Y(`div`,tu,[K(`label`,nu,[H($(e.$t(`components.zone_editor.privacy_fallback`))+` `,1),z((L(),Y(`span`,ru,[U(o,{class:`w-3.5 h-3.5 text-muted-color`})])),[[ce,{value:e.$t(`components.zone_editor.privacy_fallback_info`)}]])]),U(a,null,{default:B(()=>[U(c,{modelValue:G(ne),"onUpdate:modelValue":t[13]||=e=>jn(ne)?ne.value=e:null,options:G(ze),loading:G(Ve),"option-label":`label`,"option-value":`value`},null,8,[`modelValue`,`options`,`loading`])]),_:1})])):q(``,!0),G(S)===`object`||G(S)===`alert`?(L(),Y(`div`,iu,[K(`label`,{for:`zone[${G(D)}].match`,class:`cui-label inline-flex items-center gap-1`},[H($(e.$t(`components.zone_editor.zone_match`))+` `,1),z((L(),Y(`span`,ou,[U(o,{class:`w-3.5 h-3.5 text-muted-color`})])),[[ce,{value:e.$t(`components.zone_editor.${G(S)}_match_info`)}]])],8,au),U(a,null,{default:B(()=>[U(c,{"model-value":G(S)===`alert`?G(re)[G(D)]?.match??`contain`:G(ee)[G(D)]?.type??`intersect`,options:G(S)===`alert`?G(Fe):G(Ie),loading:G(Ve),disabled:G(D)<0,"option-label":`label`,"option-value":`value`,onValueChange:t[14]||=e=>Ue(e)},null,8,[`model-value`,`options`,`loading`,`disabled`])]),_:1})])):q(``,!0),G(S)===`privacy`?q(``,!0):(L(),Y(`div`,su,[K(`label`,{for:`zone[${G(D)}].color`,class:`cui-label`},$(e.$t(`components.form.label.color`)),9,cu),U(a,null,{default:B(()=>[U(i,{"model-value":Se(G(D))?.color,loading:G(Ve),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),U(f,null,{default:B(()=>[(L(),V(d,{key:`${G(S)}-${G(D)}`,"model-value":Se(G(D))?.color,format:`hex`,onValueChange:t[15]||=e=>{let t=Se(G(D));e&&t&&(t.color=`#${e}`)}},null,8,[`model-value`]))]),_:1})]),_:1})])),K(`div`,lu,[G(ae)?z((L(),V(m,{key:1,disabled:G(E)!==void 0&&G(j)[G(E)]?.points?.length<3,loading:G(Ve),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:t[16]||=e=>tt(!1)},{icon:B(()=>[U(C,{width:`20px`,height:`20px`})]),_:1},8,[`disabled`,`loading`])),[[ce,{value:e.$t(`components.form.tooltip.finish`)},void 0,{top:!0}]]):z((L(),V(m,{key:0,loading:G(Ve),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:et},{icon:B(()=>[U(p,{width:`20px`,height:`20px`})]),_:1},8,[`loading`])),[[ce,{value:e.$t(`components.form.tooltip.new`)},void 0,{top:!0}]]),z((L(),V(m,{loading:G(Ve),disabled:!G(j).length||G(D)<0||G(ae),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:nt},{icon:B(()=>[U(w,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[ce,{value:e.$t(`components.form.tooltip.edit`)},void 0,{top:!0}]]),z((L(),V(m,{loading:G(Ve),disabled:!G(j).length||G(D)<0,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:rt},{icon:B(()=>[U(g,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[ce,{value:e.$t(`components.form.tooltip.delete_zone`)},void 0,{top:!0}]]),z((L(),V(m,{loading:G(Ve),disabled:!G(j).length,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:it},{icon:B(()=>[U(ie,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[ce,{value:e.$t(`components.form.tooltip.undo`)},void 0,{top:!0}]]),z((L(),V(m,{loading:G(Ve),disabled:!G(j).length,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:ot},{icon:B(()=>[U(se,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[ce,{value:e.$t(`components.form.tooltip.clear`)},void 0,{top:!0}]])])],64))],6)],2)])])],512)}}}),[[`__scopeId`,`data-v-4c58523d`]]),hu={class:`text-color font-normal`},gu={class:`flex flex-col gap-6`},_u={for:`name`,class:`cui-label`},vu={for:`room`,class:`cui-label`},yu={class:`flex gap-2`},bu={for:`type`,class:`cui-label`},xu={class:`w-full flex flex-col gap-2`},Su={class:`flex items-center gap-4`},Cu={class:`flex flex-col field-switch-gap`},wu={for:`disabled`,class:`cui-label-switch`},Tu={class:`text-color font-normal`},Eu={class:`flex flex-col gap-6`},Du={for:`info.manufacturer`,class:`cui-label`},Ou={for:`info.model`,class:`cui-label`},ku={for:`info.hardware`,class:`cui-label`},Au={for:`info.serialNumber`,class:`cui-label`},ju={for:`info.firmwareVersion`,class:`cui-label`},Mu={for:`info.supportUrl`,class:`cui-label`},Nu={class:`text-color font-normal`},Pu={class:`flex flex-col gap-6`},Fu={for:`interfaceSettings.streamingMode`,class:`cui-label`},Iu={for:`interfaceSettings.streamingSource`,class:`cui-label`},Lu={for:`interfaceSettings.playbackSource`,class:`cui-label`},Ru={for:`interfaceSettings.activityMode`,class:`cui-label`},zu={for:`interfaceSettings.aspectRatio`,class:`cui-label`},Bu={class:`text-color font-normal`},Vu={class:`flex flex-col gap-6`},Hu={class:`w-full flex flex-col gap-2`},Uu={class:`flex items-center gap-4`},Wu={class:`flex flex-col field-switch-gap`},Gu={for:`detectionSettings.snooze`,class:`cui-label-switch`},Ku={class:`mt-2 flex items-center justify-between`},qu={class:`section-chip`},Ju={for:`detectionSettings.motion.resolution`,class:`cui-label`},Yu={for:`detectionSettings.motion.timeout`,class:`cui-label`},Xu={class:`mt-2 flex items-center justify-between`},Zu={class:`section-chip`},Qu=[`for`],$u={for:`detectionSettings.object.timeout`,class:`cui-label`},ed={class:`flex items-center gap-4`},td={class:`flex flex-col field-switch-gap`},nd={for:`detectionSettings.object.suppressStatic`,class:`cui-label-switch`},rd={class:`mt-2 flex items-center justify-between`},id={class:`section-chip`},ad={for:`detectionSettings.audio.confidence`,class:`cui-label`},od={for:`detectionSettings.audio.minDecibels`,class:`cui-label`},sd={for:`detectionSettings.audio.timeout`,class:`cui-label`},cd={class:`mt-2 flex items-center justify-between`},ld={class:`section-chip`},ud={for:`detectionSettings.face.confidence`,class:`cui-label`},dd={for:`detectionSettings.face.matchThreshold`,class:`cui-label`},fd={class:`mt-2 flex items-center justify-between`},pd={class:`section-chip`},md={for:`detectionSettings.licensePlate.confidence`,class:`cui-label`},hd={for:`detectionSettings.licensePlate.ocrConfidence`,class:`cui-label`},gd={for:`detectionSettings.licensePlate.minLength`,class:`cui-label`},_d={class:`mt-2 flex items-center justify-between`},vd={class:`section-chip`},yd={for:`detectionSettings.sensor.timeout`,class:`cui-label`},bd={for:`detectionSettings.sensor.triggers`,class:`cui-label`},xd={class:`text-color font-normal`},Sd={class:`w-full flex flex-col gap-6`},Cd={class:`flex items-center gap-4`},wd={class:`flex flex-col field-switch-gap`},Td={for:`recordingSettings.enabled`,class:`cui-label-switch`},Ed={for:`recordingSettings.mode`,class:`cui-label`},Dd={for:`recordingSettings.preBuffer`,class:`cui-label`},Od={for:`recordingSettings.sources`,class:`cui-label`},kd={class:`text-color font-normal`},Ad={class:`w-full flex flex-col gap-6`},jd={class:`flex items-center gap-4`},Md={class:`flex flex-col field-switch-gap`},Nd={for:`notificationSettings.enabled`,class:`cui-label-switch`},Pd={class:`flex items-center gap-4`},Fd={class:`flex flex-col field-switch-gap`},Id={for:`notificationSettings.video`,class:`cui-label-switch`},Ld={for:`notificationSettings.audio`,class:`cui-label`},Rd={for:`notificationSettings.sensors`,class:`cui-label`},zd={for:`notificationSettings.speed`,class:`cui-label`},Bd={for:`notificationSettings.cooldown`,class:`cui-label`},Vd={class:`text-color font-normal`},Hd={class:`w-full flex flex-col gap-4`},Ud={class:`flex items-center gap-4`},Wd={class:`flex flex-col field-switch-gap`},Gd={for:`ptzAutotrack.enabled`,class:`cui-label-switch`},Kd={class:`cui-label`},qd={class:`cui-label`},Jd={class:`cui-label`},Yd={class:`cui-label`},Xd={class:`cui-label`},Zd={class:`cui-label`},Qd={class:`flex items-center gap-4`},$d={class:`flex flex-col field-switch-gap`},ef={for:`ptzAutotrack.returnToHome`,class:`cui-label-switch`},tf={class:`cui-label`},nf={class:`cui-label`},rf={class:`cui-label`},af={class:`flex flex-row items-center gap-3`},of={class:`flex flex-col`},sf={class:`cui-label-switch`},cf={key:0,class:`flex flex-row items-center gap-2`},lf={class:`cui-input-hint shrink-0`},uf={class:`text-color font-normal`},df={class:`flex flex-col gap-6`},ff={class:`w-full flex flex-col gap-2`},pf={class:`flex items-center gap-4`},mf={class:`flex flex-col field-switch-gap`},hf={for:`snapshotSettings.autoRefresh`,class:`cui-label-switch`},gf={for:`snapshotSettings.ttl`,class:`cui-label`},_f={for:`snapshotSettings.interval`,class:`cui-label`},vf={class:`text-color font-normal`},yf={class:`flex flex-col gap-4`},bf={key:0,class:`flex flex-col gap-2`},xf={class:`flex flex-col flex-1 min-w-0`},Sf={class:`text-sm font-medium truncate`},Cf={class:`text-xs text-muted`},wf={key:1,class:`text-sm text-muted text-center min-h-[30px]`},Tf={class:`text-color font-normal`},Ef={class:`flex flex-col gap-6`},Df={for:`frameWorkerSettings.decoder.hardware`,class:`cui-label`},Of={for:`frameWorkerSettings.decoder.device`,class:`cui-label`},kf={for:`frameWorkerSettings.workerDecoder`,class:`cui-label`},Af={for:`frameWorkerSettings.workerDecoder.device`,class:`cui-label`},jf={class:`w-full flex flex-col gap-2`},Mf={class:`flex items-center gap-4`},Nf={class:`flex flex-col field-switch-gap`},Pf={for:`frameWorkerSettings.mainStreamAnalysis`,class:`cui-label-switch`},Ff=An({__name:`Settings`,props:Sn({camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:Sn([`close`],[`update:modelValue`]),setup(e,{emit:t}){let n=new Set(Object.entries(Yn).filter(([,e])=>e.cascadeTrigger&&!e.isDetectionType).map(([e])=>e)),r=new at,i=new Di,o=e,s=t,c=pn(e,`modelValue`),f=Zn().detectionSettings;function p(e){c.value.detectionSettings[e]=structuredClone(f[e])}let h=ir(),g=cr(),_=Ke(),{t:v}=a(),{camera:y,cameraDevice:x,loading:S}=Nn(o),{sensors:C}=ye(x),{data:w,isBusy:ee}=i.getRoomsQuery(),{mutateAsync:te}=i.createRoomMutation(),{data:ne}=r.getCameraExtensionsQuery(c.value.name),{mutateAsync:re,isPending:T}=r.removeCameraQuery(),{mutateAsync:ie,isPending:ae}=r.patchZoneConfigQuery(),oe=X([`camera`,`doorbell`]),E=X([`auto`,`mse`,`webrtc`,`webrtc/tcp`]),D=X([`high-resolution`,`mid-resolution`,`low-resolution`]),se=X([`auto`,`high`,`mid`,`low`]),O=X([`always-on`,`activity`,`standby`]),ce=X([`16:9`,`9:16`,`8:3`,`4:3`,`1:1`]),le=X([`low`,`medium`,`high`]),ue=X([`continuous`,`event`,`adhoc`]),de=X([`high`,`mid`,`low`]),fe=X([`immediate`,`balanced`,`best`]),pe=J(()=>[...xe.filter(e=>e!==`doorbell`).map(e=>({label:v(Ai(e)),value:e})),{label:v(`components.camera_options.notify_audio_other`),value:`other`}]),k=J(()=>ji.map(e=>({label:v(Oi(e)),value:e}))),me=[{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`}],he={desktop:{maxWidth:`1280px`,width:`85vw`}},ge=J(()=>C.value.some(e=>e.type===d.PTZ)),_e=J(()=>{let e=c.value.frameWorkerSettings.decoder?.hardware;return!!e&&e!==`auto`&&e!==`cpu`}),A=J(()=>[{label:v(`components.form.label.decoder_same_as_server`),value:`inherit`},...me]),j=J(()=>{let e=c.value.frameWorkerSettings.workerDecoder?.hardware;return!!e&&e!==`auto`&&e!==`cpu`}),ve=J(()=>(ne.value??[]).some(e=>e.contract.interfaces?.includes(m.NVR))),be=J(()=>ae.value),Se=J(()=>y.value.zones??{motion:[],object:[],privacy:[],alert:[],lines:[]}),Ce=J(()=>[...Se.value.motion.map((e,t)=>({kind:`motion`,index:t,name:e.name,color:e.color,typeLabel:v(`components.camera_options.zone_entry_motion`)})),...Se.value.object.map((e,t)=>({kind:`object`,index:t,name:e.name,color:e.color,typeLabel:v(`components.camera_options.zone_entry_object`)})),...Se.value.alert.map((e,t)=>({kind:`alert`,index:t,name:e.name,color:e.color,typeLabel:v(`components.camera_options.zone_entry_alert`)})),...Se.value.privacy.map((e,t)=>({kind:`privacy`,index:t,name:e.name,color:`#333333`,typeLabel:v(`components.camera_options.zone_entry_privacy`)})),...Se.value.lines.map((e,t)=>({kind:`lines`,index:t,name:e.name,color:e.color,typeLabel:v(`components.camera_options.zone_entry_line`)}))]),we=J(()=>[{label:v(`components.automation_nodes.label_person`),value:`person`},{label:v(`components.automation_nodes.label_vehicle`),value:`vehicle`},{label:v(`components.automation_nodes.label_animal`),value:`animal`}]),Te=J(()=>!!c.value.ptzAutotrack?.activeHours);function Ee(e){let t=c.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 De(e){let t=c.value.ptzAutotrack;t&&(t.activeHours=e?{from:`22:00`,to:`06:00`,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}:void 0)}function Oe(e,t){let n=c.value.ptzAutotrack,r=n?.activeHours;!n||!r||!t||(n.activeHours={...r,[e]:`${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}`,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})}let ke=J(()=>C.value.filter(e=>n.has(e.type)).map(e=>({label:e.displayName.value,value:e.id}))),Ae=J(()=>new Set(ke.value.map(e=>e.value))),je=J(()=>(c.value.detectionSettings.sensor?.triggers??[]).filter(e=>Ae.value.has(e))),Me=J(()=>(w.value?.levels.length??0)>0),Ne=J(()=>Fi(w.value,v)),M=J(()=>S.value||T.value);function Pe(e){let t=e===`auto`||e===`cpu`?``:c.value.frameWorkerSettings.decoder?.device??``;c.value.frameWorkerSettings.decoder={hardware:e,device:t}}function Fe(e){let t=c.value.frameWorkerSettings.decoder?.hardware??`auto`;c.value.frameWorkerSettings.decoder={hardware:t,device:e}}function Ie(e){if(e===`inherit`){c.value.frameWorkerSettings.workerDecoder=void 0;return}let t=e===`auto`||e===`cpu`?``:c.value.frameWorkerSettings.workerDecoder?.device??``;c.value.frameWorkerSettings.workerDecoder={hardware:e,device:t}}function Le(e){let t=c.value.frameWorkerSettings.workerDecoder?.hardware??`auto`;c.value.frameWorkerSettings.workerDecoder={hardware:t,device:e}}function Re(e){let t=c.value.notificationSettings??{enabled:!0,video:!1,audio:[],sensors:[],cooldown:30,speed:`balanced`};c.value.notificationSettings={...t,...e}}function ze(e){let t=c.value.recordingSettings??{enabled:!0,mode:`continuous`,preBuffer:10,sources:[`high`,`mid`,`low`]};c.value.recordingSettings={...t,...e}}function Be(e){let t=(c.value.detectionSettings.sensor?.triggers??[]).filter(e=>!Ae.value.has(e));c.value.detectionSettings.sensor||(c.value.detectionSettings.sensor={timeout:30,triggers:[]}),c.value.detectionSettings.sensor.triggers=[...t,...e]}function He(){_.openComponentDialog(Ni,{data:{title:v(`components.dialog.title.create_room`),confirmText:v(`components.form.button.add`),contentProps:{}},onConfirm:async e=>{if(!e)return;let t=await te({name:e,levelId:null,outdoor:!1,publicSpace:!1,note:``});c.value.roomId=t.id}})}function Ue(){_.openTextDialog({data:{title:v(`components.dialog.title.confirm`),confirmText:v(`components.form.button.remove`),contentText:v(`components.dialog.message.confirm_remove`),confirmButtonProps:{severity:`danger`}},onConfirm:async()=>{try{await re({cameraname:y.value.name}),h.path.includes(y.value.name)&&g.push({path:`/home`}),s(`close`)}catch{}}})}function We(){_.openComponentDialog(mu,{data:{title:v(`components.zone_editor.edit_zones`),loading:M,contentProps:{cameraName:y.value.name,zones:Se.value}},dialogSize:he})}function qe(){_.openComponentDialog(Gc,{data:{title:v(`components.form.label.aspect_ratio`),contentProps:{camera:y.value,current:c.value.interfaceSettings.aspectRatio,presets:ce.value},confirmText:v(`components.form.button.apply`)},onConfirm:e=>{c.value.interfaceSettings.aspectRatio=e}})}function N(e){_.openComponentDialog(mu,{data:{title:v(`components.zone_editor.edit_zones`),loading:M,contentProps:{cameraName:y.value.name,zones:Se.value,initialTab:e.kind,initialSelection:e.index}},dialogSize:he})}function Je(e){_.openTextDialog({data:{title:v(`components.camera_options.zone_entry_delete`),contentText:v(`components.camera_options.zone_entry_delete_confirm`),confirmText:v(`components.form.button.remove`),loading:be},onConfirm:async()=>{let t={...Se.value,[e.kind]:Se.value[e.kind].filter((t,n)=>n!==e.index)};await ie({cameraname:y.value.name,zones:t})}})}return(e,t)=>{let n=_r,r=zr,i=u,a=vr,o=Or,s=Ei,d=Ge,f=hr,m=kr,h=dr,g=si,_=Cr,v=Ar,y=Ti,x=b,S=Ci,C=Si,w=fr,te=l;return L(),V(w,{multiple:``,class:`p-4`},{default:B(()=>[U(h,{value:`general`},{default:B(()=>[U(n,{class:`px-0 pt-0`},{default:B(()=>[K(`span`,hu,$(e.$t(`components.camera_options.general`)),1)]),_:1}),U(m,{pt:{content:{class:`px-0`}}},{default:B(()=>[K(`div`,gu,[U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.camera_options.general_hint`)),1)]),_:1}),U(G(Q),{modelValue:c.value.name,"onUpdate:modelValue":t[0]||=e=>c.value.name=e,modelModifiers:{trim:!0},name:`name`,as:`div`,class:`flex flex-col field-gap`},{default:B(({field:t,errors:n})=>[K(`label`,_u,$(e.$t(`components.form.label.name`)),1),U(a,null,{default:B(()=>[U(i,ln(t,{invalid:n.length>0,loading:G(M),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`name`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),U(G(Q),{"model-value":c.value.room,name:`room`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,vu,$(e.$t(`components.form.label.room`)),1),K(`div`,yu,[U(o,{"model-value":c.value.roomId,options:G(Ne),"option-label":`label`,"option-value":`value`,"option-group-label":G(Me)?`label`:void 0,"option-group-children":G(Me)?`items`:void 0,invalid:n.length>0,loading:G(ee),class:`w-full`,"onUpdate:modelValue":t[1]||=e=>c.value.roomId=e},null,8,[`model-value`,`options`,`option-group-label`,`option-group-children`,`invalid`,`loading`]),z((L(),V(d,{severity:`secondary`,outlined:``,class:`shrink-0 h-[42px] w-[42px] p-0`,onClick:He},{icon:B(()=>[U(s,{class:`w-4 h-4`})]),_:1})),[[te,e.$t(`components.form.button.create_room`),void 0,{top:!0}]])]),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.room`)),1)]),_:1}))]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.type,name:`type`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,bu,$(e.$t(`components.form.label.type`)),1),U(a,null,{default:B(()=>[U(o,{"model-value":c.value.type,options:G(oe),invalid:n.length>0,loading:G(M),type:`text`,onValueChange:t[2]||=e=>c.value.type=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`type`,class:`cui-input-error`})]),_:1})]),_:1},8,[`model-value`]),K(`div`,xu,[U(G(Q),{"model-value":c.value.disabled,value:!0,"unchecked-value":!1,type:`checkbox`,name:`disabled`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:B(({field:n,errors:i})=>[K(`div`,Su,[K(`div`,Cu,[K(`label`,wu,$(e.$t(`components.form.label.disabled`)),1),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.disable_camera`)),1)]),_:1}),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`disabled`,class:`cui-input-switch-error`})]),_:1})]),U(f,ln({"model-value":c.value.disabled},n,{invalid:i.length>0,loading:G(M),class:`ml-auto shrink-0`,onValueChange:t[3]||=e=>c.value.disabled=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),U(d,{fluid:``,severity:`danger`,loading:G(M),class:`cui-button-medium`,label:e.$t(`components.form.button.remove`),onClick:t[4]||=e=>Ue()},null,8,[`loading`,`label`])])]),_:1})]),_:1}),U(h,{value:`branding`},{default:B(()=>[U(n,{class:`px-0`},{default:B(()=>[K(`span`,Tu,$(e.$t(`components.camera_options.branding`)),1)]),_:1}),U(m,{pt:{content:{class:`px-0`}}},{default:B(()=>[K(`div`,Eu,[U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.camera_options.branding_hint`)),1)]),_:1}),U(G(Q),{modelValue:c.value.info.manufacturer,"onUpdate:modelValue":t[5]||=e=>c.value.info.manufacturer=e,modelModifiers:{trim:!0},name:`info.manufacturer`,as:`div`,class:`flex flex-col field-gap`},{default:B(({field:t,errors:n})=>[K(`label`,Du,$(e.$t(`components.form.label.manufacturer`)),1),U(a,null,{default:B(()=>[U(i,ln(t,{invalid:n.length>0,loading:G(M),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`info.manufacturer`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),U(G(Q),{modelValue:c.value.info.model,"onUpdate:modelValue":t[6]||=e=>c.value.info.model=e,modelModifiers:{trim:!0},name:`info.model`,as:`div`,class:`flex flex-col field-gap`},{default:B(({field:t,errors:n})=>[K(`label`,Ou,$(e.$t(`components.form.label.model`)),1),U(a,null,{default:B(()=>[U(i,ln(t,{invalid:n.length>0,loading:G(M),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`info.model`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),U(G(Q),{modelValue:c.value.info.hardware,"onUpdate:modelValue":t[7]||=e=>c.value.info.hardware=e,modelModifiers:{trim:!0},name:`info.hardware`,as:`div`,class:`flex flex-col field-gap`},{default:B(({field:t,errors:n})=>[K(`label`,ku,$(e.$t(`components.form.label.hardware_version`)),1),U(a,null,{default:B(()=>[U(i,ln(t,{invalid:n.length>0,loading:G(M),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`info.hardware`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),U(G(Q),{modelValue:c.value.info.serialNumber,"onUpdate:modelValue":t[8]||=e=>c.value.info.serialNumber=e,modelModifiers:{trim:!0},name:`info.serialNumber`,as:`div`,class:`flex flex-col field-gap`},{default:B(({field:t,errors:n})=>[K(`label`,Au,$(e.$t(`components.form.label.serial_number`)),1),U(a,null,{default:B(()=>[U(i,ln(t,{invalid:n.length>0,loading:G(M),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`info.serialNumber`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),U(G(Q),{modelValue:c.value.info.firmwareVersion,"onUpdate:modelValue":t[9]||=e=>c.value.info.firmwareVersion=e,modelModifiers:{trim:!0},name:`info.firmwareVersion`,as:`div`,class:`flex flex-col field-gap`},{default:B(({field:t,errors:n})=>[K(`label`,ju,$(e.$t(`components.form.label.firmware_version`)),1),U(a,null,{default:B(()=>[U(i,ln(t,{invalid:n.length>0,loading:G(M),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`info.firmwareVersion`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),U(G(Q),{modelValue:c.value.info.supportUrl,"onUpdate:modelValue":t[10]||=e=>c.value.info.supportUrl=e,modelModifiers:{trim:!0},name:`info.supportUrl`,as:`div`,class:`flex flex-col field-gap`},{default:B(({field:t,errors:n})=>[K(`label`,Mu,$(e.$t(`components.form.label.support_url`)),1),U(a,null,{default:B(()=>[U(i,ln(t,{invalid:n.length>0,loading:G(M),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`info.supportUrl`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`])])]),_:1})]),_:1}),U(h,{value:`interface`},{default:B(()=>[U(n,{class:`px-0`},{default:B(()=>[K(`span`,Nu,$(e.$t(`components.camera_options.interface`)),1)]),_:1}),U(m,{pt:{content:{class:`px-0`}}},{default:B(()=>[K(`div`,Pu,[U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.camera_options.interface_hint`)),1)]),_:1}),U(G(Q),{"model-value":c.value.interfaceSettings.streamingMode,name:`interfaceSettings.streamingMode`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Fu,$(e.$t(`components.form.label.streaming_mode`)),1),U(a,null,{default:B(()=>[U(o,{"model-value":c.value.interfaceSettings.streamingMode,options:G(E),invalid:n.length>0,loading:G(M),type:`text`,onValueChange:t[11]||=e=>c.value.interfaceSettings.streamingMode=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`interfaceSettings.streamingMode`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.streaming_mode`)),1)]),_:1}))]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.interfaceSettings.streamingSource,name:`interfaceSettings.streamingSource`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Iu,$(e.$t(`components.form.label.streaming_source`)),1),U(a,null,{default:B(()=>[U(o,{"model-value":c.value.interfaceSettings.streamingSource,options:G(D),invalid:n.length>0,loading:G(M),type:`text`,onValueChange:t[12]||=e=>c.value.interfaceSettings.streamingSource=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`interfaceSettings.streamingSource`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.streaming_source`)),1)]),_:1}))]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.interfaceSettings.playbackSource,name:`interfaceSettings.playbackSource`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Lu,$(e.$t(`components.form.label.playback_source`)),1),U(a,null,{default:B(()=>[U(o,{"model-value":c.value.interfaceSettings.playbackSource??`auto`,options:G(se),invalid:n.length>0,loading:G(M),type:`text`,onValueChange:t[13]||=e=>c.value.interfaceSettings.playbackSource=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`interfaceSettings.playbackSource`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.playback_source`)),1)]),_:1}))]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.interfaceSettings.activityMode,name:`interfaceSettings.activityMode`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Ru,$(e.$t(`components.form.label.activity_mode`)),1),U(a,null,{default:B(()=>[U(o,{"model-value":c.value.interfaceSettings.activityMode??`always-on`,options:G(O),invalid:n.length>0,loading:G(M),type:`text`,onValueChange:t[14]||=e=>c.value.interfaceSettings.activityMode=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`interfaceSettings.activityMode`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.activity_mode`)),1)]),_:1}))]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.interfaceSettings.aspectRatio,name:`interfaceSettings.aspectRatio`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:t})=>[K(`label`,zu,$(e.$t(`components.form.label.aspect_ratio`)),1),U(a,null,{default:B(()=>[U(i,{"model-value":c.value.interfaceSettings.aspectRatio,invalid:t.length>0,readonly:``,tabindex:`-1`,class:`cursor-pointer`,onClick:qe},null,8,[`model-value`,`invalid`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`interfaceSettings.aspectRatio`,class:`cui-input-error`})]),_:1}),t.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.aspect_ratio`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),U(h,{value:`detection`},{default:B(()=>[U(n,{class:`px-0`},{default:B(()=>[K(`span`,Bu,$(e.$t(`components.camera_options.detection`)),1)]),_:1}),U(m,{pt:{content:{class:`px-0`}}},{default:B(()=>[K(`div`,Vu,[U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.camera_options.detection_hint`)),1)]),_:1}),K(`div`,Hu,[U(G(Q),{"model-value":c.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:B(({field:n,errors:i})=>[K(`div`,Uu,[K(`div`,Wu,[K(`label`,Gu,$(e.$t(`components.form.label.snooze`)),1),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.snooze_camera`)),1)]),_:1}),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`detectionSettings.snooze`,class:`cui-input-switch-error`})]),_:1})]),U(f,ln({"model-value":c.value.detectionSettings?.snooze},n,{invalid:i.length>0,loading:G(M),class:`ml-auto shrink-0`,onValueChange:t[15]||=e=>{c.value.detectionSettings&&(c.value.detectionSettings.snooze=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),K(`div`,Ku,[K(`span`,qu,$(e.$t(`components.camera_options.sensor_type_motion`)),1),z((L(),V(d,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-md shrink-0`,onClick:t[16]||=e=>p(`motion`)},{icon:B(()=>[U(g,{class:`w-4 h-4`})]),_:1})),[[te,e.$t(`components.form.button.reset_defaults`),void 0,{left:!0}]])]),U(G(Q),{"model-value":c.value.detectionSettings.motion.resolution,name:`detectionSettings.motion.resolution`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Ju,$(e.$t(`components.form.label.motion_resolution`)),1),U(a,null,{default:B(()=>[U(o,{"model-value":c.value.detectionSettings.motion.resolution,options:G(le),invalid:n.length>0,loading:G(M),type:`text`,onValueChange:t[17]||=e=>c.value.detectionSettings.motion.resolution=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`detectionSettings.motion.resolution`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.motion_resolution`)),1)]),_:1}))]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.detectionSettings.motion.timeout,name:`detectionSettings.motion.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Yu,$(e.$t(`components.form.label.motion_timeout`)),1),U(a,null,{default:B(()=>[U(_,{"model-value":c.value.detectionSettings.motion.timeout,invalid:n.length>0,loading:G(M),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[18]||=e=>c.value.detectionSettings.motion.timeout=e??void 0,onInput:t[19]||=e=>c.value.detectionSettings.motion.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`detectionSettings.motion.timeout`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.motion_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),K(`div`,Xu,[K(`span`,Zu,$(e.$t(`components.camera_options.sensor_type_object`)),1),z((L(),V(d,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-md shrink-0`,onClick:t[20]||=e=>p(`object`)},{icon:B(()=>[U(g,{class:`w-4 h-4`})]),_:1})),[[te,e.$t(`components.form.button.reset_defaults`),void 0,{left:!0}]])]),(L(!0),Y(P,null,R(G(Ve),t=>(L(),V(G(Q),{key:t,"model-value":c.value.detectionSettings.object.confidences[t],name:`detectionSettings.object.confidences.${t}`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,{for:`detectionSettings.object.confidences.${t}`,class:`cui-label`},$(e.$t(`components.form.label.confidence_${t}`)),9,Qu),U(a,null,{default:B(()=>[U(_,{"model-value":c.value.detectionSettings.object.confidences[t],invalid:n.length>0,loading:G(M),"show-buttons":``,step:.01,"max-fraction-digits":2,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:e=>c.value.detectionSettings.object.confidences[t]=e??void 0,onInput:e=>c.value.detectionSettings.object.confidences[t]=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`,`onValueChange`,`onInput`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`detectionSettings.object.confidences.${t}`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.confidence_${t}`)),1)]),_:2},1024))]),_:2},1032,[`model-value`,`name`]))),128)),U(G(Q),{"model-value":c.value.detectionSettings.object.timeout??15,name:`detectionSettings.object.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,$u,$(e.$t(`components.form.label.object_timeout`)),1),U(a,null,{default:B(()=>[U(_,{"model-value":c.value.detectionSettings.object.timeout??15,invalid:n.length>0,loading:G(M),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[21]||=e=>c.value.detectionSettings.object.timeout=e??void 0,onInput:t[22]||=e=>c.value.detectionSettings.object.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`detectionSettings.object.timeout`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.object_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.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:B(({field:n,errors:i})=>[K(`div`,ed,[K(`div`,td,[K(`label`,nd,$(e.$t(`components.form.label.suppress_static`)),1),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.suppress_static`)),1)]),_:1}),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`detectionSettings.object.suppressStatic`,class:`cui-input-switch-error`})]),_:1})]),U(f,ln({"model-value":c.value.detectionSettings.object.suppressStatic??!0},n,{invalid:i.length>0,loading:G(M),class:`ml-auto shrink-0`,onValueChange:t[23]||=e=>c.value.detectionSettings.object.suppressStatic=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),K(`div`,rd,[K(`span`,id,$(e.$t(`components.camera_options.sensor_type_audio`)),1),z((L(),V(d,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-md shrink-0`,onClick:t[24]||=e=>p(`audio`)},{icon:B(()=>[U(g,{class:`w-4 h-4`})]),_:1})),[[te,e.$t(`components.form.button.reset_defaults`),void 0,{left:!0}]])]),U(G(Q),{"model-value":c.value.detectionSettings.audio.confidence,name:`detectionSettings.audio.confidence`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,ad,$(e.$t(`components.form.label.audio_confidence`)),1),U(a,null,{default:B(()=>[U(_,{"model-value":c.value.detectionSettings.audio.confidence,invalid:n.length>0,loading:G(M),"show-buttons":``,step:.05,"max-fraction-digits":2,min:0,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[25]||=e=>c.value.detectionSettings.audio.confidence=e??void 0,onInput:t[26]||=e=>c.value.detectionSettings.audio.confidence=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`detectionSettings.audio.confidence`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.audio_confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.detectionSettings.audio.minDecibels,name:`detectionSettings.audio.minDecibels`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,od,$(e.$t(`components.form.label.audio_min_decibels`)),1),U(a,null,{default:B(()=>[U(_,{"model-value":c.value.detectionSettings.audio.minDecibels,invalid:n.length>0,loading:G(M),"show-buttons":``,step:1,min:-100,max:0,mode:`decimal`,"use-grouping":!1,onValueChange:t[27]||=e=>c.value.detectionSettings.audio.minDecibels=e??void 0,onInput:t[28]||=e=>c.value.detectionSettings.audio.minDecibels=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`detectionSettings.audio.minDecibels`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.audio_min_decibels`)),1)]),_:1}))]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.detectionSettings.audio.timeout,name:`detectionSettings.audio.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,sd,$(e.$t(`components.form.label.audio_timeout`)),1),U(a,null,{default:B(()=>[U(_,{"model-value":c.value.detectionSettings.audio.timeout,invalid:n.length>0,loading:G(M),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[29]||=e=>c.value.detectionSettings.audio.timeout=e??void 0,onInput:t[30]||=e=>c.value.detectionSettings.audio.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`detectionSettings.audio.timeout`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.audio_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),K(`div`,cd,[K(`span`,ld,$(e.$t(`components.camera_options.sensor_type_face`)),1),z((L(),V(d,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-md shrink-0`,onClick:t[31]||=e=>p(`face`)},{icon:B(()=>[U(g,{class:`w-4 h-4`})]),_:1})),[[te,e.$t(`components.form.button.reset_defaults`),void 0,{left:!0}]])]),U(G(Q),{"model-value":c.value.detectionSettings.face?.confidence,name:`detectionSettings.face.confidence`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,ud,$(e.$t(`components.form.label.face_confidence`)),1),U(a,null,{default:B(()=>[U(_,{"model-value":c.value.detectionSettings.face?.confidence,invalid:n.length>0,loading:G(M),"show-buttons":``,step:.01,"max-fraction-digits":2,min:0,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[32]||=e=>c.value.detectionSettings.face={...c.value.detectionSettings.face,confidence:e??void 0},onInput:t[33]||=e=>c.value.detectionSettings.face={...c.value.detectionSettings.face,confidence:e.value??void 0}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`detectionSettings.face.confidence`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.face_confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.detectionSettings.face?.matchThreshold,name:`detectionSettings.face.matchThreshold`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,dd,$(e.$t(`components.form.label.face_match_threshold`)),1),U(a,null,{default:B(()=>[U(_,{"model-value":c.value.detectionSettings.face?.matchThreshold,invalid:n.length>0,loading:G(M),"show-buttons":``,step:.05,"max-fraction-digits":2,min:.3,max:.95,mode:`decimal`,"use-grouping":!1,onValueChange:t[34]||=e=>c.value.detectionSettings.face={...c.value.detectionSettings.face,matchThreshold:e??void 0},onInput:t[35]||=e=>c.value.detectionSettings.face={...c.value.detectionSettings.face,matchThreshold:e.value??void 0}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`detectionSettings.face.matchThreshold`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.face_match_threshold`)),1)]),_:1}))]),_:1},8,[`model-value`]),K(`div`,fd,[K(`span`,pd,$(e.$t(`components.camera_options.sensor_type_licensePlate`)),1),z((L(),V(d,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-md shrink-0`,onClick:t[36]||=e=>p(`licensePlate`)},{icon:B(()=>[U(g,{class:`w-4 h-4`})]),_:1})),[[te,e.$t(`components.form.button.reset_defaults`),void 0,{left:!0}]])]),U(G(Q),{"model-value":c.value.detectionSettings.licensePlate?.confidence,name:`detectionSettings.licensePlate.confidence`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,md,$(e.$t(`components.form.label.plate_confidence`)),1),U(a,null,{default:B(()=>[U(_,{"model-value":c.value.detectionSettings.licensePlate?.confidence,invalid:n.length>0,loading:G(M),"show-buttons":``,step:.01,"max-fraction-digits":2,min:0,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[37]||=e=>c.value.detectionSettings.licensePlate={...c.value.detectionSettings.licensePlate,confidence:e??void 0},onInput:t[38]||=e=>c.value.detectionSettings.licensePlate={...c.value.detectionSettings.licensePlate,confidence:e.value??void 0}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`detectionSettings.licensePlate.confidence`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.plate_confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.detectionSettings.licensePlate?.ocrConfidence,name:`detectionSettings.licensePlate.ocrConfidence`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,hd,$(e.$t(`components.form.label.plate_ocr_confidence`)),1),U(a,null,{default:B(()=>[U(_,{"model-value":c.value.detectionSettings.licensePlate?.ocrConfidence,invalid:n.length>0,loading:G(M),"show-buttons":``,step:.01,"max-fraction-digits":2,min:0,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[39]||=e=>c.value.detectionSettings.licensePlate={...c.value.detectionSettings.licensePlate,ocrConfidence:e??void 0},onInput:t[40]||=e=>c.value.detectionSettings.licensePlate={...c.value.detectionSettings.licensePlate,ocrConfidence:e.value??void 0}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`detectionSettings.licensePlate.ocrConfidence`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.plate_ocr_confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.detectionSettings.licensePlate?.minLength,name:`detectionSettings.licensePlate.minLength`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,gd,$(e.$t(`components.form.label.plate_min_length`)),1),U(a,null,{default:B(()=>[U(_,{"model-value":c.value.detectionSettings.licensePlate?.minLength,invalid:n.length>0,loading:G(M),"show-buttons":``,step:1,min:1,max:10,"use-grouping":!1,onValueChange:t[41]||=e=>c.value.detectionSettings.licensePlate={...c.value.detectionSettings.licensePlate,minLength:e??void 0},onInput:t[42]||=e=>c.value.detectionSettings.licensePlate={...c.value.detectionSettings.licensePlate,minLength:e.value??void 0}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`detectionSettings.licensePlate.minLength`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.plate_min_length`)),1)]),_:1}))]),_:1},8,[`model-value`]),K(`div`,_d,[K(`span`,vd,$(e.$t(`components.camera_options.sensors`)),1),z((L(),V(d,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-md shrink-0`,onClick:t[43]||=e=>p(`sensor`)},{icon:B(()=>[U(g,{class:`w-4 h-4`})]),_:1})),[[te,e.$t(`components.form.button.reset_defaults`),void 0,{left:!0}]])]),U(G(Q),{"model-value":c.value.detectionSettings.sensor?.timeout,name:`detectionSettings.sensor.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,yd,$(e.$t(`components.form.label.sensor_timeout`)),1),U(a,null,{default:B(()=>[U(_,{"model-value":c.value.detectionSettings.sensor?.timeout,invalid:n.length>0,loading:G(M),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[44]||=e=>{c.value.detectionSettings.sensor||(c.value.detectionSettings.sensor={timeout:30,triggers:[]}),c.value.detectionSettings.sensor.timeout=e??30},onInput:t[45]||=e=>{c.value.detectionSettings.sensor||(c.value.detectionSettings.sensor={timeout:30,triggers:[]}),c.value.detectionSettings.sensor.timeout=e.value??30}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`detectionSettings.sensor.timeout`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.sensor_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.detectionSettings.sensor?.triggers??[],name:`detectionSettings.sensor.triggers`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:t})=>[K(`label`,bd,$(e.$t(`components.form.label.sensor_triggers`)),1),U(v,{"model-value":G(je),invalid:t.length>0,options:G(ke),"option-label":`label`,"option-value":`value`,placeholder:e.$t(`components.form.hint.sensor_triggers_placeholder`),class:`w-full`,"show-toggle-all":!1,"onUpdate:modelValue":Be},null,8,[`model-value`,`invalid`,`options`,`placeholder`]),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`detectionSettings.sensor.triggers`,class:`cui-input-error`})]),_:1}),t.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.sensor_triggers`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),U(h,{value:`recording`},{default:B(()=>[U(n,{class:`px-0`},{default:B(()=>[K(`span`,xd,$(e.$t(`components.camera_options.recording`)),1)]),_:1}),U(m,{pt:{content:{class:`px-0`}}},{default:B(()=>[K(`div`,Sd,[U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.camera_options.recording_hint`)),1)]),_:1}),G(ve)?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-banner cui-banner-warn`},{default:B(()=>[U(y,{class:`w-4 h-4 shrink-0 inline-block mr-1`}),H(` `+$(e.$t(`components.camera_options.recording_requires`)),1)]),_:1})),U(G(Q),{"model-value":c.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:B(({field:n,errors:i})=>[K(`div`,Cd,[K(`div`,wd,[K(`label`,Td,$(e.$t(`components.form.label.recording_enabled`)),1),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.recording_enabled`)),1)]),_:1}),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`recordingSettings.enabled`,class:`cui-input-switch-error`})]),_:1})]),U(f,ln({"model-value":c.value.recordingSettings?.enabled??!0},n,{invalid:i.length>0,loading:G(M),class:`ml-auto shrink-0`,onValueChange:t[46]||=e=>ze({enabled:e})}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),c.value.recordingSettings?.enabled??!0?(L(),Y(P,{key:1},[U(G(Q),{"model-value":c.value.recordingSettings?.mode,name:`recordingSettings.mode`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Ed,$(e.$t(`components.form.label.recording_mode`)),1),U(a,null,{default:B(()=>[U(o,{"model-value":c.value.recordingSettings?.mode??`continuous`,options:G(ue),invalid:n.length>0,loading:G(M),type:`text`,onValueChange:t[47]||=e=>ze({mode:e})},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`recordingSettings.mode`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.recording_mode`)),1)]),_:1}))]),_:1},8,[`model-value`]),c.value.recordingSettings?.mode===`event`?(L(),V(G(Q),{key:0,"model-value":c.value.recordingSettings?.preBuffer,name:`recordingSettings.preBuffer`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Dd,$(e.$t(`components.form.label.recording_prebuffer`)),1),U(a,null,{default:B(()=>[U(_,{"model-value":c.value.recordingSettings?.preBuffer??10,invalid:n.length>0,loading:G(M),"show-buttons":``,step:1,min:0,max:60,"use-grouping":!1,onValueChange:t[48]||=e=>ze({preBuffer:e??10}),onInput:t[49]||=e=>ze({preBuffer:e.value??10})},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`recordingSettings.preBuffer`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.recording_prebuffer`)),1)]),_:1}))]),_:1},8,[`model-value`])):q(``,!0),U(G(Q),{"model-value":c.value.recordingSettings?.sources,name:`recordingSettings.sources`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Od,$(e.$t(`components.form.label.recording_sources`)),1),U(v,{"model-value":c.value.recordingSettings?.sources??[`high`,`mid`,`low`],invalid:n.length>0,options:G(de),class:`w-full`,"show-toggle-all":!1,"onUpdate:modelValue":t[50]||=e=>ze({sources:e})},null,8,[`model-value`,`invalid`,`options`]),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`recordingSettings.sources`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.recording_sources`)),1)]),_:1}))]),_:1},8,[`model-value`])],64)):q(``,!0)])]),_:1})]),_:1}),U(h,{value:`notifications`},{default:B(()=>[U(n,{class:`px-0`},{default:B(()=>[K(`span`,kd,$(e.$t(`components.camera_options.notifications`)),1)]),_:1}),U(m,{pt:{content:{class:`px-0`}}},{default:B(()=>[K(`div`,Ad,[U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.camera_options.notifications_hint`)),1)]),_:1}),G(ve)?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-banner cui-banner-warn`},{default:B(()=>[U(y,{class:`w-4 h-4 shrink-0 inline-block mr-1`}),H(` `+$(e.$t(`components.camera_options.recording_requires`)),1)]),_:1})),U(G(Q),{"model-value":c.value.notificationSettings?.enabled??!0,value:!0,"unchecked-value":!1,type:`checkbox`,name:`notificationSettings.enabled`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:B(({field:n,errors:i})=>[K(`div`,jd,[K(`div`,Md,[K(`label`,Nd,$(e.$t(`components.form.label.notify_enabled`)),1),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.notify_enabled`)),1)]),_:1}),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`notificationSettings.enabled`,class:`cui-input-switch-error`})]),_:1})]),U(f,ln({"model-value":c.value.notificationSettings?.enabled??!0},n,{invalid:i.length>0,loading:G(M),class:`ml-auto shrink-0`,onValueChange:t[51]||=e=>Re({enabled:e})}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),c.value.notificationSettings?.enabled??!0?(L(),Y(P,{key:1},[U(G(Q),{"model-value":c.value.notificationSettings?.video??!1,value:!0,"unchecked-value":!1,type:`checkbox`,name:`notificationSettings.video`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:B(({field:n,errors:i})=>[K(`div`,Pd,[K(`div`,Fd,[K(`label`,Id,$(e.$t(`components.form.label.notify_video`)),1),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.notify_video`)),1)]),_:1}),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`notificationSettings.video`,class:`cui-input-switch-error`})]),_:1})]),U(f,ln({"model-value":c.value.notificationSettings?.video??!1},n,{invalid:i.length>0,loading:G(M),class:`ml-auto shrink-0`,onValueChange:t[52]||=e=>Re({video:e})}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.notificationSettings?.audio,name:`notificationSettings.audio`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Ld,$(e.$t(`components.form.label.notify_audio`)),1),U(v,{"model-value":c.value.notificationSettings?.audio??[],invalid:n.length>0,options:G(pe),"max-selected-labels":2,"show-toggle-all":!1,"option-label":`label`,"option-value":`value`,filter:``,class:`w-full min-w-0`,"onUpdate:modelValue":t[53]||=e=>Re({audio:e})},null,8,[`model-value`,`invalid`,`options`]),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`notificationSettings.audio`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.notify_audio`)),1)]),_:1}))]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.notificationSettings?.sensors,name:`notificationSettings.sensors`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Rd,$(e.$t(`components.form.label.notify_sensors`)),1),U(v,{"model-value":c.value.notificationSettings?.sensors??[],invalid:n.length>0,options:G(k),"max-selected-labels":2,"show-toggle-all":!1,"option-label":`label`,"option-value":`value`,filter:``,class:`w-full min-w-0`,"onUpdate:modelValue":t[54]||=e=>Re({sensors:e})},null,8,[`model-value`,`invalid`,`options`]),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`notificationSettings.sensors`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.notify_sensors`)),1)]),_:1}))]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.notificationSettings?.speed,name:`notificationSettings.speed`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,zd,$(e.$t(`components.form.label.notify_speed`)),1),U(a,null,{default:B(()=>[U(o,{"model-value":c.value.notificationSettings?.speed??`balanced`,options:G(fe),invalid:n.length>0,loading:G(M),type:`text`,onValueChange:t[55]||=e=>Re({speed:e})},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`notificationSettings.speed`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.notify_speed`)),1)]),_:1}))]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.notificationSettings?.cooldown,name:`notificationSettings.cooldown`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Bd,$(e.$t(`components.form.label.notify_cooldown`)),1),U(a,null,{default:B(()=>[U(_,{"model-value":c.value.notificationSettings?.cooldown??30,invalid:n.length>0,loading:G(M),"show-buttons":``,step:5,min:0,max:600,"use-grouping":!1,onValueChange:t[56]||=e=>Re({cooldown:e??30}),onInput:t[57]||=e=>Re({cooldown:e.value??30})},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`notificationSettings.cooldown`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.notify_cooldown`)),1)]),_:1}))]),_:1},8,[`model-value`])],64)):q(``,!0)])]),_:1})]),_:1}),U(h,{value:`ptzAutotrack`},{default:B(()=>[U(n,{class:`px-0`},{default:B(()=>[K(`span`,Vd,$(e.$t(`components.camera_options.ptz_autotrack`)),1)]),_:1}),U(m,{pt:{content:{class:`px-0`}}},{default:B(()=>[K(`div`,Hd,[U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.camera_options.ptz_autotrack_hint`)),1)]),_:1}),G(ge)?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-banner cui-banner-warn`},{default:B(()=>[U(y,{class:`w-4 h-4 shrink-0 inline-block mr-1`}),H(` `+$(e.$t(`components.form.hint.ptz_autotrack_requires`)),1)]),_:1})),U(G(Q),{"model-value":c.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:B(({field:n,errors:i})=>[K(`div`,Ud,[K(`div`,Wd,[K(`label`,Gd,$(e.$t(`components.form.label.ptz_autotrack_enabled`)),1),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.ptz_autotrack`)),1)]),_:1}),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`ptzAutotrack.enabled`,class:`cui-input-switch-error`})]),_:1})]),U(f,ln({"model-value":c.value.ptzAutotrack?.enabled},n,{invalid:i.length>0,loading:G(M),class:`ml-auto shrink-0`,onValueChange:t[58]||=e=>{c.value.ptzAutotrack&&(c.value.ptzAutotrack.enabled=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),c.value.ptzAutotrack?.enabled?(L(),Y(P,{key:1},[U(G(Q),{"model-value":c.value.ptzAutotrack?.targetLabels,name:`ptzAutotrack.targetLabels`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Kd,$(e.$t(`components.form.label.ptz_autotrack_target_labels`)),1),U(v,{"model-value":c.value.ptzAutotrack?.targetLabels,options:G(we),"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:G(M),class:`w-full`,onValueChange:t[59]||=e=>{c.value.ptzAutotrack&&(c.value.ptzAutotrack.targetLabels=e)}},null,8,[`model-value`,`options`,`invalid`,`loading`]),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.ptz_autotrack_target_labels`)),1)]),_:1})]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.ptzAutotrack?.minConfidence,name:`ptzAutotrack.minConfidence`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,qd,$(e.$t(`components.form.label.ptz_autotrack_min_confidence`)),1),U(_,{"model-value":c.value.ptzAutotrack?.minConfidence,min:.3,max:1,step:.05,"min-fraction-digits":2,"max-fraction-digits":2,invalid:n.length>0,loading:G(M),class:`w-full`,onValueChange:t[60]||=e=>{c.value.ptzAutotrack&&e!=null&&(c.value.ptzAutotrack.minConfidence=e)}},null,8,[`model-value`,`invalid`,`loading`]),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.ptz_autotrack_min_confidence`)),1)]),_:1})]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.ptzAutotrack?.triggerDeadZone,name:`ptzAutotrack.triggerDeadZone`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Jd,$(e.$t(`components.form.label.ptz_autotrack_trigger_dead_zone`)),1),U(_,{"model-value":c.value.ptzAutotrack?.triggerDeadZone,min:0,max:.3,step:.01,"min-fraction-digits":2,"max-fraction-digits":2,invalid:n.length>0,loading:G(M),class:`w-full`,onValueChange:t[61]||=e=>{c.value.ptzAutotrack&&e!=null&&(c.value.ptzAutotrack.triggerDeadZone=e)}},null,8,[`model-value`,`invalid`,`loading`]),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.ptz_autotrack_trigger_dead_zone`)),1)]),_:1})]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.ptzAutotrack?.trackingSpeed??2,name:`ptzAutotrack.trackingSpeed`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Yd,$(e.$t(`components.form.label.ptz_autotrack_tracking_speed`)),1),U(_,{"model-value":c.value.ptzAutotrack?.trackingSpeed??2,min:1,max:5,step:.5,"min-fraction-digits":1,"max-fraction-digits":1,invalid:n.length>0,loading:G(M),class:`w-full`,onValueChange:t[62]||=e=>{c.value.ptzAutotrack&&e!=null&&(c.value.ptzAutotrack.trackingSpeed=e)}},null,8,[`model-value`,`invalid`,`loading`]),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.ptz_autotrack_tracking_speed`)),1)]),_:1})]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.ptzAutotrack?.leadMs??1800,name:`ptzAutotrack.leadMs`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Xd,$(e.$t(`components.form.label.ptz_autotrack_lead_ms`)),1),U(_,{"model-value":c.value.ptzAutotrack?.leadMs??1800,min:0,max:4e3,step:100,invalid:n.length>0,loading:G(M),class:`w-full`,onValueChange:t[63]||=e=>{c.value.ptzAutotrack&&e!=null&&(c.value.ptzAutotrack.leadMs=e)}},null,8,[`model-value`,`invalid`,`loading`]),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.ptz_autotrack_lead_ms`)),1)]),_:1})]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.ptzAutotrack?.panRate??.85,name:`ptzAutotrack.panRate`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Zd,$(e.$t(`components.form.label.ptz_autotrack_pan_rate`)),1),U(_,{"model-value":c.value.ptzAutotrack?.panRate??.85,min:.1,max:3,step:.05,"min-fraction-digits":2,"max-fraction-digits":2,invalid:n.length>0,loading:G(M),class:`w-full`,onValueChange:t[64]||=e=>{c.value.ptzAutotrack&&e!=null&&(c.value.ptzAutotrack.panRate=e)}},null,8,[`model-value`,`invalid`,`loading`]),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.ptz_autotrack_pan_rate`)),1)]),_:1})]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.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:B(({field:n,errors:i})=>[K(`div`,Qd,[K(`div`,$d,[K(`label`,ef,$(e.$t(`components.form.label.ptz_autotrack_return_home`)),1),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.ptz_autotrack_return_home`)),1)]),_:1}),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`ptzAutotrack.returnToHome`,class:`cui-input-switch-error`})]),_:1})]),U(f,ln({"model-value":c.value.ptzAutotrack?.returnToHome},n,{invalid:i.length>0,loading:G(M),class:`ml-auto shrink-0`,onValueChange:t[65]||=e=>{c.value.ptzAutotrack&&(c.value.ptzAutotrack.returnToHome=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),c.value.ptzAutotrack?.returnToHome?(L(),V(G(Q),{key:0,"model-value":c.value.ptzAutotrack?.homeWaitMs,name:`ptzAutotrack.homeWaitMs`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,tf,$(e.$t(`components.form.label.ptz_autotrack_home_wait`)),1),U(_,{"model-value":(c.value.ptzAutotrack?.homeWaitMs??0)/1e3,min:1,max:60,step:1,suffix:` s`,invalid:n.length>0,loading:G(M),class:`w-full`,onValueChange:t[66]||=e=>{c.value.ptzAutotrack&&e!=null&&(c.value.ptzAutotrack.homeWaitMs=e*1e3)}},null,8,[`model-value`,`invalid`,`loading`]),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.ptz_autotrack_home_wait`)),1)]),_:1})]),_:1},8,[`model-value`])):q(``,!0),U(G(Q),{"model-value":c.value.ptzAutotrack?.minTargetSize,name:`ptzAutotrack.minTargetSize`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,nf,$(e.$t(`components.form.label.ptz_autotrack_min_target_size`)),1),U(_,{"model-value":Math.round((c.value.ptzAutotrack?.minTargetSize??0)*100),min:0,max:50,step:1,suffix:` %`,invalid:n.length>0,loading:G(M),class:`w-full`,onValueChange:t[67]||=e=>{c.value.ptzAutotrack&&e!=null&&(c.value.ptzAutotrack.minTargetSize=e/100)}},null,8,[`model-value`,`invalid`,`loading`]),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.ptz_autotrack_min_target_size`)),1)]),_:1})]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.ptzAutotrack?.maxTargetSize,name:`ptzAutotrack.maxTargetSize`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,rf,$(e.$t(`components.form.label.ptz_autotrack_max_target_size`)),1),U(_,{"model-value":Math.round((c.value.ptzAutotrack?.maxTargetSize??0)*100),min:0,max:100,step:1,suffix:` %`,invalid:n.length>0,loading:G(M),class:`w-full`,onValueChange:t[68]||=e=>{c.value.ptzAutotrack&&e!=null&&(c.value.ptzAutotrack.maxTargetSize=e/100)}},null,8,[`model-value`,`invalid`,`loading`]),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.ptz_autotrack_max_target_size`)),1)]),_:1})]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.ptzAutotrack?.activeHours,name:`ptzAutotrack.activeHours`,as:`div`,class:`flex flex-col field-gap`},{default:B(()=>[K(`div`,af,[K(`div`,of,[K(`label`,sf,$(e.$t(`components.form.label.ptz_autotrack_active_hours`)),1),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.ptz_autotrack_active_hours`)),1)]),_:1})]),U(f,{"model-value":G(Te),loading:G(M),class:`ml-auto shrink-0`,onValueChange:De},null,8,[`model-value`,`loading`])]),G(Te)?(L(),Y(`div`,cf,[U(x,{"model-value":Ee(`from`),"time-only":``,fluid:``,loading:G(M),"onUpdate:modelValue":t[69]||=e=>Oe(`from`,e)},null,8,[`model-value`,`loading`]),K(`span`,lf,$(e.$t(`components.form.label.until`)),1),U(x,{"model-value":Ee(`to`),"time-only":``,fluid:``,loading:G(M),"onUpdate:modelValue":t[70]||=e=>Oe(`to`,e)},null,8,[`model-value`,`loading`])])):q(``,!0)]),_:1},8,[`model-value`])],64)):q(``,!0)])]),_:1})]),_:1}),U(h,{value:`snapshot`},{default:B(()=>[U(n,{class:`px-0`},{default:B(()=>[K(`span`,uf,$(e.$t(`components.camera_options.snapshot`)),1)]),_:1}),U(m,{pt:{content:{class:`px-0`}}},{default:B(()=>[K(`div`,df,[U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.camera_options.snapshot_hint`)),1)]),_:1}),K(`div`,ff,[U(G(Q),{"model-value":c.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:B(({field:n,errors:i})=>[K(`div`,pf,[K(`div`,mf,[K(`label`,hf,$(e.$t(`components.form.label.auto_refresh`)),1),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.auto_refresh`)),1)]),_:1}),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`snapshotSettings.autoRefresh`,class:`cui-input-switch-error`})]),_:1})]),U(f,ln({"model-value":c.value.snapshotSettings.autoRefresh},n,{invalid:i.length>0,loading:G(M),class:`ml-auto shrink-0`,onValueChange:t[71]||=e=>c.value.snapshotSettings.autoRefresh=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),U(G(Q),{"model-value":c.value.snapshotSettings.ttl,name:`snapshotSettings.ttl`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,gf,$(e.$t(`components.form.label.cache_time`)),1),U(a,null,{default:B(()=>[U(_,{"model-value":c.value.snapshotSettings.ttl,invalid:n.length>0,loading:G(M),min:10,"show-buttons":``,"use-grouping":!1,onValueChange:t[72]||=e=>c.value.snapshotSettings.ttl=e??10,onInput:t[73]||=e=>c.value.snapshotSettings.ttl=e.value??10},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`snapshotSettings.ttl`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.cache_time`)),1)]),_:1}))]),_:1},8,[`model-value`]),U(G(Q),{"model-value":c.value.snapshotSettings.interval,name:`snapshotSettings.interval`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,_f,$(e.$t(`components.form.label.refresh_interval`)),1),U(a,null,{default:B(()=>[U(_,{"model-value":c.value.snapshotSettings.interval,invalid:n.length>0,loading:G(M),min:10,max:60,"show-buttons":``,"use-grouping":!1,onValueChange:t[74]||=e=>c.value.snapshotSettings.interval=e??30,onInput:t[75]||=e=>c.value.snapshotSettings.interval=e.value??30},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`snapshotSettings.interval`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.refresh_interval`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),U(h,{value:`zones`},{default:B(()=>[U(n,{class:`px-0`},{default:B(()=>[K(`span`,vf,$(e.$t(`components.camera_options.zones`)),1)]),_:1}),U(m,{pt:{content:{class:`px-0`}}},{default:B(()=>[K(`div`,yf,[U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.camera_options.zones_hint`)),1)]),_:1}),G(Ce).length?(L(),Y(`div`,bf,[(L(!0),Y(P,null,R(G(Ce),t=>(L(),Y(`div`,{key:`${t.kind}-${t.index}`,class:`flex items-center gap-2 p-2 rounded-md border-color`},[K(`span`,{class:`w-2.5 h-2.5 rounded-full shrink-0`,style:Bn({background:t.color})},null,4),K(`div`,xf,[K(`span`,Sf,$(t.name),1),K(`span`,Cf,$(t.typeLabel),1)]),z((L(),V(d,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-sm shrink-0`,onClick:e=>N(t)},{icon:B(()=>[U(S,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[te,e.$t(`components.zone_editor.edit_zones`),void 0,{top:!0}]]),z((L(),V(d,{text:``,rounded:``,severity:`danger`,class:`cui-icon-sm shrink-0`,onClick:e=>Je(t)},{icon:B(()=>[U(C,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[te,e.$t(`components.camera_options.zone_entry_delete`),void 0,{top:!0}]])]))),128))])):(L(),Y(`span`,wf,$(e.$t(`components.camera_options.zones_empty`)),1)),U(d,{fluid:``,class:`cui-button-medium`,loading:G(M),label:e.$t(`components.form.button.edit_zones`),onClick:t[76]||=e=>We()},null,8,[`loading`,`label`])])]),_:1})]),_:1}),U(h,{value:`frameworker`},{default:B(()=>[U(n,{class:`px-0`},{default:B(()=>[K(`span`,Tf,$(e.$t(`components.camera_options.frame_worker`)),1)]),_:1}),U(m,{pt:{content:{class:`px-0`}}},{default:B(()=>[K(`div`,Ef,[U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.camera_options.frame_worker_hint`)),1)]),_:1}),U(G(Q),{"model-value":c.value.frameWorkerSettings.decoder?.hardware??`auto`,name:`frameWorkerSettings.decoder.hardware`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Df,$(e.$t(`components.form.label.decoder_hardware`)),1),U(a,null,{default:B(()=>[U(o,{"model-value":c.value.frameWorkerSettings.decoder?.hardware??`auto`,options:me,"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:G(M),"onUpdate:modelValue":t[77]||=e=>Pe(e)},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.decoder_hardware`)),1)]),_:1}))]),_:1},8,[`model-value`]),G(_e)?(L(),V(G(Q),{key:0,"model-value":c.value.frameWorkerSettings.decoder?.device??``,name:`frameWorkerSettings.decoder.device`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,Of,$(e.$t(`components.form.label.decoder_device`)),1),U(a,null,{default:B(()=>[U(i,{"model-value":c.value.frameWorkerSettings.decoder?.device??``,invalid:n.length>0,loading:G(M),type:`text`,"onUpdate:modelValue":t[78]||=e=>Fe(e??``)},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.decoder_device`)),1)]),_:1}))]),_:1},8,[`model-value`])):q(``,!0),U(G(Q),{"model-value":c.value.frameWorkerSettings.workerDecoder??null,name:`frameWorkerSettings.workerDecoder`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,kf,$(e.$t(`components.form.label.worker_decoder_hardware`)),1),U(a,null,{default:B(()=>[U(o,{"model-value":c.value.frameWorkerSettings.workerDecoder?.hardware??`inherit`,options:G(A),"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:G(M),"onUpdate:modelValue":t[79]||=e=>Ie(e)},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.worker_decoder_hardware`)),1)]),_:1})),G(j)?(L(),Y(P,{key:1},[K(`label`,Af,$(e.$t(`components.form.label.worker_decoder_device`)),1),U(a,null,{default:B(()=>[U(i,{"model-value":c.value.frameWorkerSettings.workerDecoder?.device??``,invalid:n.length>0,loading:G(M),type:`text`,"onUpdate:modelValue":t[80]||=e=>Le(e??``)},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),n.length?q(``,!0):(L(),V(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.decoder_device`)),1)]),_:1}))],64)):q(``,!0)]),_:1},8,[`model-value`]),K(`div`,jf,[U(G(Q),{"model-value":c.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:B(({field:n,errors:i})=>[K(`div`,Mf,[K(`div`,Nf,[K(`label`,Pf,$(e.$t(`components.form.label.main_stream_analysis`)),1),U(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.main_stream_analysis`)),1)]),_:1}),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`frameWorkerSettings.mainStreamAnalysis`,class:`cui-input-switch-error`})]),_:1})]),U(f,ln({"model-value":c.value.frameWorkerSettings.mainStreamAnalysis},n,{invalid:i.length>0,loading:G(M),class:`ml-auto shrink-0`,onValueChange:t[81]||=e=>c.value.frameWorkerSettings.mainStreamAnalysis=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])])])]),_:1})]),_:1})]),_:1})}}}),If={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function Lf(e,t){return L(),Y(`svg`,If,[...t[0]||=[K(`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 Rf=Ln({name:`fluent-arrow-sync-16-filled`,render:Lf}),zf={class:`flex items-center justify-between`},Bf={class:`cui-label`},Vf={class:`flex flex-col field-gap`},Hf={class:`cui-label`},Uf={class:`cui-label`},Wf={class:`cui-label`},Gf={key:0,class:`flex flex-col field-gap`},Kf={class:`cui-label`},qf={key:1,class:`flex flex-col field-gap`},Jf={class:`cui-label`},Yf=An({__name:`CameraSource`,props:{cameraId:{},cameraName:{},source:{},loading:{type:Boolean}},setup(e){let t=new at,n=e,{t:r}=a(),{getSourceStatus:i,connect:o}=zi(),s=hn(),c=Ze(),d=[`probe`,`preload`],{cameraId:f,cameraName:p,source:m,loading:h}=Nn(n),g=X(!1),{data:_,isBusy:v}=t.probeCameraSourceQuery(p.value,m.value.name,{video:!0,audio:!0,microphone:!0});o();let y=J(()=>i(f.value,m.value.name)),b=J(()=>{switch(y.value){case`connected`:return`success`;case`connecting`:return`warn`;case`error`:return`danger`;default:return`secondary`}}),x=J(()=>{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=J(()=>!!(h.value||v.value)),C=J(()=>_.value?.probe.consumers.filter(e=>!d.includes(e.format_name)).length||0),w=J(()=>te(`video`)),ee=J(()=>te(`audio`));function te(e){let t=(_.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(!g.value){g.value=!0;try{let e=await Ye({cameraname:p.value,sourcename:m.value.name,probeConfig:{video:!0,audio:!0,microphone:!0},force:!0});s.setQueryData([`cameras`,p.value,`probe`,m.value.name],e)}catch{c.add({severity:`error`,detail:r(`components.toast.probe_failed`),life:3e3})}finally{g.value=!1}}}return(e,t)=>{let n=wr,r=u,i=Ge,a=gr,o=vr,s=zr,c=$t,d=l;return L(),Y(P,null,[K(`div`,zf,[K(`label`,Bf,$(e.$t(`components.form.label.stream_status`)),1),U(n,{severity:G(b),value:G(x)},null,8,[`severity`,`value`])]),K(`div`,Vf,[K(`label`,Hf,$(e.$t(`components.form.label.connections`)),1),U(o,null,{default:B(()=>[U(r,{value:G(C),loading:G(S),readonly:``,type:`text`},null,8,[`value`,`loading`]),U(a,null,{default:B(()=>[z((L(),V(i,{severity:`secondary`,text:``,loading:G(g),disabled:G(S),onClick:ne},{icon:B(()=>[U(G(Rf),{class:`w-4 h-4`})]),_:1},8,[`loading`,`disabled`])),[[d,e.$t(`components.form.button.reload`),void 0,{left:!0}]])]),_:1})]),_:1}),U(s,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.connections`)),1)]),_:1})]),(L(!0),Y(P,null,R(G(w),(t,n)=>(L(),Y(`div`,{key:n,class:`flex flex-col field-gap`},[K(`label`,Uf,$(e.$t(`components.form.label.video_codec`)),1),U(o,null,{default:B(()=>[U(r,{"model-value":t,loading:G(S),readonly:``,type:`text`},null,8,[`model-value`,`loading`])]),_:2},1024),n===G(w).length-1?(L(),V(s,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.video_codec`)),1)]),_:1})):q(``,!0)]))),128)),(L(!0),Y(P,null,R(G(ee),(t,n)=>(L(),Y(`div`,{key:n,class:`flex flex-col field-gap`},[K(`label`,Wf,$(e.$t(`components.form.label.audio_codec`)),1),U(o,null,{default:B(()=>[U(r,{"model-value":t,loading:G(S),readonly:``,type:`text`},null,8,[`model-value`,`loading`])]),_:2},1024),n===G(ee).length-1?(L(),V(s,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.audio_codec`)),1)]),_:1})):q(``,!0)]))),128)),G(m).role===`snapshot`?q(``,!0):(L(),Y(`div`,Gf,[K(`label`,Kf,$(e.$t(`components.form.label.rtsp_url`)),1),U(o,null,{default:B(()=>[U(r,{"model-value":G(_)?.rtspUrl,loading:G(S),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),U(a,null,{default:B(()=>[U(c,{"action-text":e.$t(`components.form.tooltip.copied`),icon:G(kt),"button-props":{severity:`secondary`,disabled:!G(_)?.rtspUrl,loading:G(S),text:!0},onAction:t[0]||=e=>G(Bt)(G(_).rtspUrl)},null,8,[`action-text`,`icon`,`button-props`])]),_:1})]),_:1}),U(s,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.rtsp_url`)),1)]),_:1})])),G(m).role===`snapshot`?q(``,!0):(L(),Y(`div`,qf,[K(`label`,Jf,$(e.$t(`components.form.label.onvif_url`)),1),U(o,null,{default:B(()=>[U(r,{"model-value":G(_)?.onvifUrl,loading:G(S),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),U(a,null,{default:B(()=>[U(c,{"action-text":e.$t(`components.form.tooltip.copied`),icon:G(kt),"button-props":{severity:`secondary`,disabled:!G(_)?.onvifUrl,loading:G(S),text:!0},onAction:t[1]||=e=>G(Bt)(G(_).onvifUrl)},null,8,[`action-text`,`icon`,`button-props`])]),_:1})]),_:1}),U(s,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.onvif_url`)),1)]),_:1})]))],64)}}}),Xf={class:`flex gap-2 items-center w-full`},Zf={class:`text-color font-normal`},Qf={class:`flex flex-col gap-6`},$f=[`for`],ep=[`for`],tp={class:`w-full flex flex-col gap-2`},np={class:`flex items-center gap-4`},rp={class:`flex flex-col field-switch-gap`},ip=[`for`],ap={class:`flex items-center gap-4`},op={class:`flex flex-col field-switch-gap`},sp=[`for`],cp={class:`flex items-center gap-4`},lp={class:`flex flex-col field-switch-gap`},up=[`for`],dp={class:`flex items-center gap-4`},fp={class:`flex flex-col field-switch-gap`},pp=[`for`],mp={class:`flex items-center gap-4`},hp={class:`flex flex-col field-switch-gap`},gp=[`for`],_p=[`for`],vp=[`for`],yp=[`for`],bp={class:`flex flex-col gap-6`},xp={class:`flex flex-col field-gap`},Sp=[`for`],Cp={class:`w-full flex items-center justify-center my-3`},wp=An({__name:`Sources`,props:Sn({camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:Sn([`close`],[`update:modelValue`]),setup(e){let t=e,n=pn(e,`modelValue`),{t:r}=a(),i=Ke(),{camera:o,loading:s}=Nn(t),c=X([`high-resolution`,`mid-resolution`,`low-resolution`,`snapshot`]);function l(e){return!!e._id&&o.value.sources.some(t=>t._id===e._id)}function d(e){return e.name.replace(/ /g,`_`).toLowerCase()}function f(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 p(e){return n.value.sources[e].childSourceId}function m(e,t){t==null?n.value.sources[e].childSourceId=null:n.value.sources[e].childSourceId=t}function h(e){n.value.sources[e].urls.push(``)}function g(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:d(t)}),confirmText:r(`components.form.button.remove`),confirmButtonProps:{severity:`danger`}},onConfirm:()=>{n.value.sources.splice(e,1)}})}function _(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,backchannelDisabled:!1})}return(e,t)=>{let r=Gr,i=Ge,a=_r,b=u,x=vr,S=zr,C=Yf,w=Or,ee=hr,te=Cr,ne=gr,re=kr,T=dr,ie=fr,ae=_i;return L(),Y(P,null,[U(ie,{multiple:``,class:`p-4`},{default:B(()=>[(L(!0),Y(P,null,R(n.value.sources,(t,u)=>(L(),V(T,{key:u,value:u},{default:B(()=>[U(a,{class:W({"px-0 pt-0":u===0,"px-0":u!==0})},{default:B(()=>[K(`div`,Xf,[K(`span`,Zf,$(e.$t(`components.camera_options.source`)+`: `+d(t)),1),U(i,{text:``,rounded:``,loading:G(s),disabled:n.value.sources.length<2,severity:`danger`,class:`cui-icon-md ml-auto mr-2`,onClick:yn(e=>g(u),[`stop`])},{icon:B(()=>[U(r,{width:`100%`,height:`100%`})]),_:1},8,[`loading`,`disabled`,`onClick`])])]),_:2},1032,[`class`]),U(re,{pt:{content:{class:`px-0`}}},{default:B(()=>[K(`div`,Qf,[U(G(Q),{modelValue:t.name,"onUpdate:modelValue":e=>t.name=e,modelModifiers:{trim:!0},name:`sources[${u}].name`,as:`div`,class:`flex flex-col field-gap`},{default:B(({field:n,errors:r})=>[K(`label`,{for:`sources[${u}].name`,class:`cui-label`},$(e.$t(`components.form.label.source_name`)),9,$f),U(x,null,{default:B(()=>[U(b,ln({ref_for:!0},n,{invalid:r.length>0,loading:G(s),readonly:l(t),type:`text`}),null,16,[`invalid`,`loading`,`readonly`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`sources[${u}].name`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),r.length?q(``,!0):(L(),V(S,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.source_name`)),1)]),_:1}))]),_:2},1032,[`modelValue`,`onUpdate:modelValue`,`name`]),t._id?(L(),V(C,{key:0,"camera-id":G(o)._id,"camera-name":G(o).name,source:t,loading:G(s)},null,8,[`camera-id`,`camera-name`,`source`,`loading`])):q(``,!0),U(G(Q),{"model-value":t.role,name:`sources[${u}].role`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:r})=>[K(`label`,{for:`sources[${u}].role`,class:`cui-label`},$(e.$t(`components.form.label.source_role`)),9,ep),U(x,null,{default:B(()=>[U(w,{"model-value":t.role,options:G(c).filter(e=>!n.value.sources.some(n=>n.role===e&&n._id!==t._id)),invalid:r.length>0,loading:G(s),onValueChange:e=>v(t,e)},null,8,[`model-value`,`options`,`invalid`,`loading`,`onValueChange`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`sources[${u}].role`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),r.length?q(``,!0):(L(),V(S,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.source_role`)),1)]),_:1}))]),_:2},1032,[`model-value`,`name`]),K(`div`,tp,[t.role!==`snapshot`&&n.value.sources.length>1?(L(),V(G(Q),{key:0,"model-value":t.useForSnapshot,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${u}].useForSnapshot`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:B(({field:r,errors:i})=>[K(`div`,np,[K(`div`,rp,[K(`label`,{for:`sources[${u}].useForSnapshot`,class:`cui-label-switch`},$(e.$t(`components.form.label.use_for_snapshot`)),9,ip),U(S,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.use_for_snapshot`)),1)]),_:1}),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`sources[${u}].useForSnapshot`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),U(ee,ln({"model-value":t.useForSnapshot},{ref_for:!0},r,{invalid:i.length>0,loading:G(s),disabled:n.value.sources.some(e=>(e.useForSnapshot||e.role===`snapshot`)&&e._id!==t._id),class:`ml-auto shrink-0`,onValueChange:e=>t.useForSnapshot=e}),null,16,[`model-value`,`invalid`,`loading`,`disabled`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`])):q(``,!0),t.role===`snapshot`?q(``,!0):(L(),V(G(Q),{key:1,"model-value":t.hotMode,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${u}].hotMode`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:B(({field:n,errors:r})=>[K(`div`,ap,[K(`div`,op,[K(`label`,{for:`sources[${u}].hotMode`,class:`cui-label-switch`},$(e.$t(`components.form.label.hot_mode`)),9,sp),U(S,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.hot_mode`)),1)]),_:1}),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`sources[${u}].hotMode`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),U(ee,ln({"model-value":t.hotMode},{ref_for:!0},n,{invalid:r.length>0,loading:G(s),class:`ml-auto shrink-0`,onValueChange:e=>t.hotMode=e}),null,16,[`model-value`,`invalid`,`loading`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`])),t.role===`snapshot`?q(``,!0):(L(),V(G(Q),{key:2,"model-value":t.preload,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${u}].preload`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:B(({field:n,errors:r})=>[K(`div`,cp,[K(`div`,lp,[K(`label`,{for:`sources[${u}].preload`,class:`cui-label-switch`},$(e.$t(`components.form.label.preload`)),9,up),U(S,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.preload`)),1)]),_:1}),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`sources[${u}].preload`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),U(ee,ln({"model-value":t.preload},{ref_for:!0},n,{invalid:r.length>0,loading:G(s),class:`ml-auto shrink-0`,onValueChange:e=>t.preload=e}),null,16,[`model-value`,`invalid`,`loading`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`])),t.role===`snapshot`?q(``,!0):(L(),V(G(Q),{key:3,"model-value":t.muted,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${u}].muted`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:B(({field:n,errors:r})=>[K(`div`,dp,[K(`div`,fp,[K(`label`,{for:`sources[${u}].muted`,class:`cui-label-switch`},$(e.$t(`components.form.label.muted`)),9,pp),U(S,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.muted`)),1)]),_:1}),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`sources[${u}].muted`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),U(ee,ln({"model-value":t.muted},{ref_for:!0},n,{invalid:r.length>0,loading:G(s),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`?q(``,!0):(L(),V(G(Q),{key:4,"model-value":t.backchannelDisabled,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${u}].backchannelDisabled`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:B(({field:n,errors:r})=>[K(`div`,mp,[K(`div`,hp,[K(`label`,{for:`sources[${u}].backchannelDisabled`,class:`cui-label-switch`},$(e.$t(`components.form.label.two_way_audio_disabled`)),9,gp),U(S,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.two_way_audio_disabled`)),1)]),_:1}),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`sources[${u}].backchannelDisabled`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),U(ee,ln({"model-value":t.backchannelDisabled},{ref_for:!0},n,{invalid:r.length>0,loading:G(s),class:`ml-auto shrink-0`,onValueChange:e=>t.backchannelDisabled=e}),null,16,[`model-value`,`invalid`,`loading`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`]))]),t.role===`snapshot`?q(``,!0):(L(),V(G(Q),{key:1,"model-value":t.timeout,name:`sources[${u}].timeout`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,{for:`sources[${u}].timeout`,class:`cui-label`},$(e.$t(`components.form.label.source_timeout`)),9,_p),U(x,null,{default:B(()=>[U(te,{"model-value":t.timeout,invalid:n.length>0,loading:G(s),"show-buttons":``,min:5,max:120,"use-grouping":!1,suffix:` s`,placeholder:String(t.urls.some(G(Ii))?60:5),onValueChange:e=>t.timeout=e??void 0,onInput:e=>t.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`,`placeholder`,`onValueChange`,`onInput`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`sources[${u}].timeout`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),n.length?q(``,!0):(L(),V(S,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.source_timeout`)),1)]),_:1}))]),_:2},1032,[`model-value`,`name`])),t.role===`snapshot`?q(``,!0):(L(),V(G(Q),{key:2,"model-value":t.handshakeTimeout,name:`sources[${u}].handshakeTimeout`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:n})=>[K(`label`,{for:`sources[${u}].handshakeTimeout`,class:`cui-label`},$(e.$t(`components.form.label.source_handshake_timeout`)),9,vp),U(x,null,{default:B(()=>[U(te,{"model-value":t.handshakeTimeout,invalid:n.length>0,loading:G(s),"show-buttons":``,min:1,max:60,"use-grouping":!1,suffix:` s`,placeholder:`5`,onValueChange:e=>t.handshakeTimeout=e??void 0,onInput:e=>t.handshakeTimeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`,`onValueChange`,`onInput`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`sources[${u}].handshakeTimeout`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),n.length?q(``,!0):(L(),V(S,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.source_handshake_timeout`)),1)]),_:1}))]),_:2},1032,[`model-value`,`name`])),t.role===`snapshot`?q(``,!0):(L(),V(G(Q),{key:3,"model-value":p(u),name:`sources[${u}].childSourceId`,as:`div`,class:`flex flex-col field-gap`},{default:B(({errors:t})=>[K(`label`,{for:`sources[${u}].childSourceId`,class:`cui-label`},$(e.$t(`components.form.label.pip_source`)),9,yp),U(x,null,{default:B(()=>[U(w,{"model-value":p(u),options:f(u),"option-label":`label`,"option-value":`value`,invalid:t.length>0,loading:G(s),placeholder:e.$t(`components.form.label.none`),"show-clear":``,onValueChange:e=>m(u,e)},null,8,[`model-value`,`options`,`invalid`,`loading`,`placeholder`,`onValueChange`])]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`sources[${u}].childSourceId`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),t.length?q(``,!0):(L(),V(S,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.pip_source`)),1)]),_:1}))]),_:2},1032,[`model-value`,`name`])),K(`div`,bp,[K(`div`,xp,[K(`label`,{for:`sources[${u}].urls[]`,class:`cui-label`},$(e.$t(`components.form.label.sources`)),9,Sp),U(S,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:B(()=>[H($(e.$t(`components.form.hint.source_urls`)),1)]),_:1})]),(L(!0),Y(P,null,R(t.urls,(e,n)=>(L(),V(G(Q),{key:n,modelValue:t.urls[n],"onUpdate:modelValue":e=>t.urls[n]=e,modelModifiers:{trim:!0},name:`sources[${u}].urls[${n}]`,as:`div`,class:`flex flex-col field-gap`},{default:B(({field:e,errors:a})=>[U(x,null,{default:B(()=>[U(b,ln({ref_for:!0},e,{invalid:a.length>0,loading:G(s),type:`text`}),null,16,[`invalid`,`loading`]),t.urls.length>1?(L(),V(ne,{key:0},{default:B(()=>[U(i,{text:``,severity:`secondary`,loading:G(s),class:`cui-icon-md`,onClick:e=>_(u,n)},{icon:B(()=>[U(r,{width:`100%`,height:`100%`})]),_:1},8,[`loading`,`onClick`])]),_:2},1024)):q(``,!0)]),_:2},1024),U(I,{name:`fade`},{default:B(()=>[U(G(Z),{name:`sources[${u}].urls[${n}]`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`,`name`]))),128)),U(i,{loading:G(s),label:e.$t(`components.form.button.add_source`),class:`ml-auto cui-button-medium`,onClick:e=>h(u)},null,8,[`loading`,`label`,`onClick`])])])]),_:2},1024)]),_:2},1032,[`value`]))),128))]),_:1}),K(`div`,Cp,[U(i,{text:``,rounded:``,loading:G(s),class:`cui-icon-xl`,onClick:y},{icon:B(()=>[U(ae,{width:`100%`,height:`100%`})]),_:1},8,[`loading`])])],64)}}}),Tp={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ep(e,t){return L(),Y(`svg`,Tp,[...t[0]||=[K(`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 Dp=Ln({name:`mdi-car`,render:Ep}),Op={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function kp(e,t){return L(),Y(`svg`,Op,[...t[0]||=[K(`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 Ap=Ln({name:`mingcute-run-fill`,render:kp}),jp={detected:!1,disabled:!1,size:`medium`},Mp={class:`cui-detection__header`},Np={class:`cui-detection__info`},Pp={key:0,class:`cui-detection__label`},Fp={key:0,class:`cui-detection__detections`},Ip=N(An({__name:`CuiDetection`,props:Un({type:{},label:{},detected:{type:Boolean},detections:{},size:{},disabled:{type:Boolean}},jp),setup(e){let t=e,{t:n}=a(),{detected:r}=Nn(t),i=J(()=>r.value?n(`components.detection.detected`):n(`components.detection.idle`));return(t,n)=>{let a=Ap,o=ea,s=wi,c=wt,l=Dp;return L(),Y(`div`,{class:W([`cui-detection`,[`cui-detection--${e.size}`,`cui-detection--${e.type}`,{"cui-detection--disabled":e.disabled,"cui-detection--detected":G(r)}]])},[K(`div`,Mp,[K(`div`,{class:W([`cui-detection__icon`,{"cui-detection__icon--detected":G(r)}])},[e.type===`motion`?(L(),V(a,{key:0,class:`cui-detection__icon-svg`})):e.type===`object`?(L(),V(o,{key:1,class:`cui-detection__icon-svg`})):e.type===`audio`?(L(),V(s,{key:2,class:`cui-detection__icon-svg`})):e.type===`face`?(L(),V(c,{key:3,class:`cui-detection__icon-svg`})):e.type===`licensePlate`?(L(),V(l,{key:4,class:`cui-detection__icon-svg`})):q(``,!0)],2),K(`div`,Np,[e.label?(L(),Y(`span`,Pp,$(e.label),1)):q(``,!0),K(`span`,{class:W([`cui-detection__status`,{"cui-detection__status--detected":G(r)}])},$(G(i)),3)]),K(`div`,{class:W([`cui-detection__indicator`,{"cui-detection__indicator--detected":G(r)}])},null,2)]),e.detections&&e.detections.length>0?(L(),Y(`div`,Fp,[(L(!0),Y(P,null,R(e.detections,(e,t)=>(L(),Y(`span`,{key:t,class:`cui-detection__detection-tag`},$(e),1))),128))])):q(``,!0)],2)}}}),[[`__scopeId`,`data-v-4bdc871b`]]),Lp={key:0,class:`flex items-center justify-center h-full`},Rp={key:1,class:`overview-container`},zp={class:`relative`},Bp={key:0,class:`absolute inset-0 z-2 flex items-center justify-center bg-black/80 pointer-events-none`},Vp={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`},Hp={class:`text-xs text-white/80`},Up={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`},Wp={class:`text-xs text-white/80`},Gp={class:`overview-section`},Kp={class:`overview-section-title`},qp={key:1},Jp={key:0,class:`overview-section`},Yp={class:`overview-section-title`},Xp={class:`flex flex-col gap-2`},Zp={key:1,class:`overview-section`},Qp={class:`overview-section-title`},$p={class:`flex flex-col gap-2`},em={key:2,class:`overview-section`},tm={class:`overview-section-title`},nm={class:`flex flex-col gap-2`},rm={key:3,class:`overview-section`},im={class:`overview-section-title`},am={class:`flex flex-col gap-2`},om={key:4,class:`overview-section`},sm={class:`overview-section-title`},cm={class:`flex flex-col gap-2`},lm={key:5,class:`overview-section`},um={class:`overview-section-title`},dm={class:`flex flex-col gap-2`},fm={key:6,class:`overview-section`},pm={class:`overview-section-title`},mm={class:`flex flex-col gap-2`},hm={key:7,class:`overview-section`},gm={class:`overview-section-title`},_m={class:`flex flex-col gap-2`},vm={key:8,class:`overview-section`},ym={class:`overview-section-title`},bm={class:`flex flex-col gap-2`},xm={key:9,class:`overview-section`},Sm={class:`overview-section-title`},Cm={class:`flex flex-col gap-2`},wm={key:10,class:`overview-section`},Tm={class:`overview-section-title`},Em={class:`flex flex-col gap-2`},Dm={key:11,class:`overview-section`},Om={class:`overview-section-title`},km={class:`flex flex-col gap-2`},Am={key:12,class:`overview-section`},jm={class:`overview-section-title`},Mm={class:`flex flex-col gap-2`},Nm={key:13,class:`overview-section`},Pm={class:`overview-section-title`},Fm={class:`flex flex-col gap-2`},Im={key:14,class:`overview-section`},Lm={class:`overview-section-title`},Rm={class:`flex flex-col gap-2`},zm={key:15,class:`overview-section`},Bm={class:`no-sensors`},Vm=N(An({__name:`Overview`,props:{camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},setup(e){let n=e,{t:r}=a(),{getCameraStatus:i,connect:o}=zi(),{cameraDevice:l,latestSnapshotSrc:u}=Nn(n),{sensors:d}=ye(l),f=pt(void 0,`admin`);o();let p=J(()=>l.value?.camera.value),m=J(()=>i(p.value?._id)),h=J(()=>{switch(m.value){case`connected`:return`success`;case`connecting`:return`warn`;case`error`:return`danger`;case`partial`:return`contrast`;default:return`secondary`}}),g=J(()=>{switch(m.value){case`connected`:return r(`components.camera_table.online`);case`connecting`:return r(`components.camera_table.connecting`);case`error`:return r(`components.camera_table.error`);case`partial`:return r(`components.camera_table.partial`);default:return r(`components.camera_table.idle`)}}),_=J(()=>N(d.value.filter(ke))),v=J(()=>N(d.value.filter(Ie))),b=J(()=>N(d.value.filter(te))),x=J(()=>N(d.value.filter(t))),w=J(()=>N(d.value.filter(M))),T=J(()=>d.value.filter(ee)),ie=J(()=>d.value.filter(_e)),ae=J(()=>d.value.filter(ze)),O=J(()=>d.value.filter(pe)),me=J(()=>d.value.filter(E)),A=J(()=>d.value.filter(S)),j=J(()=>d.value.filter(ne)),ve=J(()=>d.value.filter(Me)),be=J(()=>d.value.filter(Re)),xe=J(()=>d.value.filter(ce)),Se=J(()=>d.value.filter(ue)),we=J(()=>d.value.filter(De)),Ee=J(()=>d.value.filter(de)),Ae=J(()=>d.value.filter(Ce)),Pe=J(()=>_.value.some(e=>e.getProperty(je.Detected))),Le=J(()=>{let e;for(let t of _.value){let n=t.getProperty(je.LastTriggered);n&&(!e||n>e)&&(e=n)}return e}),Ve=J(()=>new Date(Le.value??0)),Ue=D(Ve),Ge=J(()=>{let e=[{label:r(`components.camera_options.overview_status`),value:g.value,tag:!0,tagSeverity:h.value},{label:r(`components.camera_options.overview_sources`),value:String(p.value?.sources.length??0)}],t=p.value?.info;return t?.manufacturer&&e.push({label:r(`components.form.label.manufacturer`),value:t.manufacturer}),t?.model&&e.push({label:r(`components.camera_options.model`),value:t.model}),t?.hardware&&e.push({label:r(`components.form.label.hardware_version`),value:t.hardware}),t?.serialNumber&&e.push({label:r(`components.form.label.serial_number`),value:t.serialNumber}),t?.firmwareVersion&&e.push({label:r(`components.form.label.firmware_version`),value:t.firmwareVersion}),t?.supportUrl&&e.push({label:r(`components.form.label.support_url`),value:t.supportUrl}),_.value.length>0&&(Pe.value?e.push({label:r(`components.camera_options.overview_last_motion`),value:r(`components.camera_options.overview_motion_active`),tag:!0,tagSeverity:`danger`}):Le.value?e.push({label:r(`components.camera_options.overview_last_motion`),value:Ue.value}):e.push({label:r(`components.camera_options.overview_last_motion`),value:r(`components.camera_options.overview_no_motion`)})),e}),Ke=J(()=>_.value.length>0||v.value.length>0||b.value.length>0||x.value.length>0||w.value.length>0),qe=J(()=>T.value.length>0||ve.value.length>0||be.value.length>0||xe.value.length>0||Se.value.length>0||we.value.length>0||ie.value.length>0||me.value.length>0||Ee.value.length>0||ae.value.length>0||O.value.length>0||A.value.length>0||j.value.length>0||Ae.value.length>0);function N(e){if(e.length===0)return e;let t=qn(e[0].type),n=p.value?.assignments?.[t],r=Array.isArray(n)?void 0:n?.name;return r?e.filter(e=>p.value?.plugins.find(t=>t.id===e.pluginId)?.name===r):e}return(e,t)=>{let n=c,r=Xe,i=ht,a=Qe,o=yr,l=wr,d=ta,m=Qi,h=qi,g=Xi,S=Wi,ee=Bi,te=Ji,ne=Zi,E=Vi,D=Gi,ce=$i,ue=Hi,de=Ui,pe=Yi,_e=Ki;return G(p)?(L(),Y(`div`,Rp,[K(`div`,zp,[G(p)?.disabled?(L(),Y(`div`,Bp,[U(r,{class:`w-8 h-8 text-white/60`})])):q(``,!0),G(p)?.disabled?(L(),Y(`div`,Vp,[U(r,{class:`w-3.5 h-3.5 text-red-400`}),K(`span`,Hp,$(e.$t(`views.camera.camera_disabled`)),1)])):G(p)?.detectionSettings?.snooze?(L(),Y(`div`,Up,[U(i,{class:`w-3.5 h-3.5 text-amber-400`}),K(`span`,Wp,$(e.$t(`views.camera.camera_snoozed`)),1)])):q(``,!0),U(a,{camera:G(p),src:G(u)},null,8,[`camera`,`src`])]),K(`div`,Gp,[K(`h3`,Kp,$(e.$t(`components.camera_options.overview`)),1),U(d,{value:G(Ge),"striped-rows":``,"show-headers":!1,class:`card-border rounded-lg overflow-hidden`},{default:B(()=>[U(o,{field:`label`,class:`p-2 font-medium text-sm`}),U(o,{field:`value`,class:`p-2 text-muted text-sm text-right`},{body:B(({data:e})=>[e.tag?(L(),V(l,{key:0,severity:e.tagSeverity,value:e.value},null,8,[`severity`,`value`])):(L(),Y(`span`,qp,$(e.value),1))]),_:1})]),_:1},8,[`value`])]),G(Ke)?(L(),Y(`div`,Jp,[K(`h3`,Yp,$(e.$t(`components.camera_options.detection`)),1),K(`div`,Xp,[(L(!0),Y(P,null,R(G(_),e=>(L(),V(Ip,{key:e.id,type:`motion`,label:e.displayName.value,detected:e.getProperty(G(je).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128)),(L(!0),Y(P,null,R(G(v),e=>(L(),V(Ip,{key:e.id,type:`object`,label:e.displayName.value,detected:(e.getProperty(G(fe).Detections)?.length??0)>0,detections:e.getProperty(G(fe).Detections)?.map(e=>e.label??e.class??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128)),(L(!0),Y(P,null,R(G(b),e=>(L(),V(Ip,{key:e.id,type:`audio`,label:e.displayName.value,detected:e.getProperty(G(y).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128)),(L(!0),Y(P,null,R(G(x),e=>(L(),V(Ip,{key:e.id,type:`face`,label:e.displayName.value,detected:e.getProperty(G(se).Detected)??!1,detections:e.getProperty(G(se).Detections)?.map(e=>e.identity??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128)),(L(!0),Y(P,null,R(G(w),e=>(L(),V(Ip,{key:e.id,type:`licensePlate`,label:e.displayName.value,detected:e.getProperty(G(k).Detected)??!1,detections:e.getProperty(G(k).Detections)?.map(e=>e.plateText??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128))])])):q(``,!0),G(ie).length?(L(),Y(`div`,Zp,[K(`h3`,Qp,$(e.$t(`components.camera_options.sensor_type_light`)),1),K(`div`,$p,[(L(!0),Y(P,null,R(G(ie),e=>(L(),V(m,{key:e.id,label:e.displayName.value,on:e.getProperty(G(he).On)??!1,brightness:e.getProperty(G(he).Brightness)??100,"has-brightness":e.hasCapability(`brightness`),disabled:!G(f),size:`small`,class:`card-border`,"onUpdate:on":t=>e.setProperty(G(he).On,t),"onUpdate:brightness":t=>e.setProperty(G(he).Brightness,t)},null,8,[`label`,`on`,`brightness`,`has-brightness`,`disabled`,`onUpdate:on`,`onUpdate:brightness`]))),128))])])):q(``,!0),G(O).length?(L(),Y(`div`,em,[K(`h3`,tm,$(e.$t(`components.camera_options.sensor_type_switch`)),1),K(`div`,nm,[(L(!0),Y(P,null,R(G(O),e=>(L(),V(h,{key:e.id,label:e.displayName.value,on:e.getProperty(G(ge).On)??!1,disabled:!G(f),size:`small`,class:`card-border`,"onUpdate:on":t=>e.setProperty(G(ge).On,t)},null,8,[`label`,`on`,`disabled`,`onUpdate:on`]))),128))])])):q(``,!0),G(me).length?(L(),Y(`div`,rm,[K(`h3`,im,$(e.$t(`components.camera_options.sensor_type_lock`)),1),K(`div`,am,[(L(!0),Y(P,null,R(G(me),e=>(L(),V(g,{key:e.id,label:e.displayName.value,"current-state":e.getProperty(G(Te).CurrentState)??2,"target-state":e.getProperty(G(Te).TargetState)??0,disabled:!G(f),size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty(G(Te).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`disabled`,`onUpdate:targetState`]))),128))])])):q(``,!0),G(ae).length?(L(),Y(`div`,om,[K(`h3`,sm,$(e.$t(`components.camera_options.sensor_type_siren`)),1),K(`div`,cm,[(L(!0),Y(P,null,R(G(ae),e=>(L(),V(S,{key:e.id,label:e.displayName.value,active:e.getProperty(G(Oe).Active)??!1,volume:e.getProperty(G(Oe).Volume)??100,"has-volume":e.hasCapability(`volume`),disabled:!G(f),size:`small`,class:`card-border`,"onUpdate:active":t=>e.setProperty(G(Oe).Active,t),"onUpdate:volume":t=>e.setProperty(G(Oe).Volume,t)},null,8,[`label`,`active`,`volume`,`has-volume`,`disabled`,`onUpdate:active`,`onUpdate:volume`]))),128))])])):q(``,!0),G(Ae).length?(L(),Y(`div`,lm,[K(`h3`,um,$(e.$t(`components.camera_options.sensor_type_securitySystem`)),1),K(`div`,dm,[(L(!0),Y(P,null,R(G(Ae),e=>(L(),V(ee,{key:e.id,label:e.displayName.value,"current-state":e.getProperty(G(Fe).CurrentState)??3,"target-state":e.getProperty(G(Fe).TargetState)??3,disabled:!G(f),size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty(G(Fe).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`disabled`,`onUpdate:targetState`]))),128))])])):q(``,!0),G(A).length?(L(),Y(`div`,fm,[K(`h3`,pm,$(e.$t(`components.camera_options.sensor_type_doorbell`)),1),K(`div`,mm,[(L(!0),Y(P,null,R(G(A),e=>(L(),V(te,{key:e.id,label:e.displayName.value,ring:e.getProperty(G(He).Ring)??!1,disabled:!G(f),size:`small`,class:`card-border`,onTrigger:()=>e.setProperty(G(He).Ring,!0)},null,8,[`label`,`ring`,`disabled`,`onTrigger`]))),128))])])):q(``,!0),G(j).length?(L(),Y(`div`,hm,[K(`h3`,gm,$(e.$t(`components.camera_options.sensor_type_contact`)),1),K(`div`,_m,[(L(!0),Y(P,null,R(G(j),e=>(L(),V(ne,{key:e.id,label:e.displayName.value,detected:e.getProperty(G(C).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),G(xe).length?(L(),Y(`div`,vm,[K(`h3`,ym,$(e.$t(`components.camera_options.sensor_type_occupancy`)),1),K(`div`,bm,[(L(!0),Y(P,null,R(G(xe),e=>(L(),V(E,{key:e.id,label:e.displayName.value,detected:e.getProperty(G(le).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),G(Se).length?(L(),Y(`div`,xm,[K(`h3`,Sm,$(e.$t(`components.camera_options.sensor_type_smoke`)),1),K(`div`,Cm,[(L(!0),Y(P,null,R(G(Se),e=>(L(),V(D,{key:e.id,label:e.displayName.value,detected:e.getProperty(G(oe).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),G(we).length?(L(),Y(`div`,wm,[K(`h3`,Tm,$(e.$t(`components.camera_options.sensor_type_leak`)),1),K(`div`,Em,[(L(!0),Y(P,null,R(G(we),e=>(L(),V(ce,{key:e.id,label:e.displayName.value,detected:e.getProperty(G(re).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),G(Ee).length?(L(),Y(`div`,Dm,[K(`h3`,Om,$(e.$t(`components.camera_options.sensor_type_garage`)),1),K(`div`,km,[(L(!0),Y(P,null,R(G(Ee),e=>(L(),V(ue,{key:e.id,label:e.displayName.value,"current-state":e.getProperty(G(We).CurrentState)??1,"target-state":e.getProperty(G(We).TargetState)??1,"obstruction-detected":e.getProperty(G(We).ObstructionDetected)??!1,disabled:!G(f),size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty(G(We).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`obstruction-detected`,`disabled`,`onUpdate:targetState`]))),128))])])):q(``,!0),G(ve).length?(L(),Y(`div`,Am,[K(`h3`,jm,$(e.$t(`components.camera_options.sensor_type_temperature`)),1),K(`div`,Mm,[(L(!0),Y(P,null,R(G(ve),e=>(L(),V(de,{key:e.id,label:e.displayName.value,current:e.getProperty(G(Ne).Current),size:`small`,class:`card-border`},null,8,[`label`,`current`]))),128))])])):q(``,!0),G(be).length?(L(),Y(`div`,Nm,[K(`h3`,Pm,$(e.$t(`components.camera_options.sensor_type_humidity`)),1),K(`div`,Fm,[(L(!0),Y(P,null,R(G(be),e=>(L(),V(pe,{key:e.id,label:e.displayName.value,current:e.getProperty(G(Be).Current),size:`small`,class:`card-border`},null,8,[`label`,`current`]))),128))])])):q(``,!0),G(T).length?(L(),Y(`div`,Im,[K(`h3`,Lm,$(e.$t(`components.camera_options.sensor_type_battery`)),1),K(`div`,Rm,[(L(!0),Y(P,null,R(G(T),e=>(L(),V(_e,{key:e.id,label:e.displayName.value,level:e.getProperty(G(s).Level)??100,charging:e.getProperty(G(s).Charging)??`NOT_CHARGING`,low:e.getProperty(G(s).Low)??!1,size:`small`,class:`card-border`},null,8,[`label`,`level`,`charging`,`low`]))),128))])])):q(``,!0),!G(qe)&&!G(Ke)?(L(),Y(`div`,zm,[K(`div`,Bm,$(e.$t(`components.camera_options.no_sensors`)),1)])):q(``,!0)])):(L(),Y(`div`,Lp,[U(n,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})]))}}}),[[`__scopeId`,`data-v-f34b01a5`]]),Hm={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Um(e,t){return L(),Y(`svg`,Hm,[...t[0]||=[K(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[K(`path`,{"stroke-width":`3`,d:`M5 10h.01M5 16h.01`}),K(`path`,{"stroke-width":`2`,d:`m10 17l4-10m2 10l4-10`})],-1)]])}var Wm=Ln({name:`humbleicons-url`,render:Um}),Gm={class:`drawer-header flex items-center w-full h-[45px] border-b-[1px] border-color px-3`},Km={class:`font-semibold text-lg truncate`},qm=[`onClick`],Jm={class:`text-xs truncate`},Ym={class:`w-full h-full max-h-full overflow-y-scroll`},Xm={key:0,class:`flex w-full h-full items-center justify-center mt-5`},Zm={key:1,class:`w-full h-full`},Qm={key:0,class:`w-full flex items-center justify-center p-4 h-[70px]`},$m=N(An({__name:`CameraOptions`,props:{cameraName:{},latestSnapshotSrc:{}},emits:[`close`],setup(e,{emit:t}){let n=new at,r=e,i=t,o=Gn(),s=Ze(),{t:l}=a(),{latestSnapshotSrc:u}=Nn(r),d=X(r.cameraName),{camera:f,isLoading:p}=me(d),{data:m,isBusy:h}=n.getCameraQuery(d),{mutate:g,isPending:_}=n.patchCameraQuery(),v=Cn(`formRef`),y=zn(),b=X(),x=X(`overview`),S=X([{name:`overview`,icon:Kt},{name:`sources`,icon:Wm},{name:`settings`,icon:St},{name:`plugins`,icon:nt}]),C=J(()=>h.value||p.value||_.value),w=J(()=>x.value===`sources`||x.value===`settings`);function ee(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 te(){let e=await v.value?.validate();if(e?.valid&&e.values){let t=e.values.name;g({cameraname:d.value,cameraData:ee(e.values)},{onSuccess:()=>{t&&t!==d.value&&(d.value=t)}})}else o.error(`Validation failed`,e),s.add({severity:`error`,detail:l(`components.toast.validation_failed`),life:3e3})}return F(f,e=>{e&&(y.value=e)},{immediate:!0}),F(()=>r.cameraName,e=>{y.value=void 0,d.value=e}),F(m,e=>{e&&(b.value=Gt(e))},{deep:!0,immediate:!0}),(e,t)=>{let n=Gr,r=Ge,a=lr,o=xr,s=c,l=Vm,f=wp,p=Ff,h=Rc,g=mr,_=Sr,ee=pr;return L(),Y(P,null,[K(`div`,Gm,[K(`span`,Km,$(G(d)),1),U(r,{text:``,rounded:``,severity:`secondary`,class:`ml-auto cui-icon-md shrink-0`,onClick:t[0]||=e=>i(`close`)},{icon:B(()=>[U(n,{width:`100%`,height:`100%`})]),_:1})]),U(G(Dn),{ref_key:`formRef`,ref:v,class:`w-full`,style:Bn({height:`calc(100% - 45px - ${G(w)?`70px`:`0px`})`}),"validation-schema":G(Li)},{default:B(()=>[U(ee,{value:G(x),"onUpdate:value":t[7]||=e=>jn(x)?x.value=e:null,scrollable:``,class:`w-full h-full`},{default:B(()=>[U(o,{class:`justify-between`,pt:{tablist:{class:`h-[65px]`},activeBar:{class:`!w-auto`}}},{default:B(()=>[(L(!0),Y(P,null,R(G(S),(t,n)=>(L(),V(a,{key:n,value:t.name,"as-child":``},{default:B(n=>[K(`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}),[(L(),V(bn(t.icon),{class:`w-5 h-5`})),K(`span`,Jm,$(e.$t(`components.options_sidebar.segment_tab_${t.name}`)),1)],16,qm)]),_:2},1032,[`value`]))),128))]),_:1}),U(_,{class:`p-0 h-[calc(100%-65px)]`},{default:B(()=>[K(`div`,Ym,[(L(!0),Y(P,null,R(G(S),(e,n)=>(L(),V(g,{key:n,value:e.name,"as-child":``},{default:B(e=>[e.active?(L(),Y(`div`,ln({key:0,class:e.class},{ref_for:!0},e.a11yAttrs),[!G(b)||!G(m)||!G(y)?(L(),Y(`div`,Xm,[U(s,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])):(L(),Y(`div`,Zm,[G(x)===`overview`?(L(),V(l,{key:0,camera:G(m),"camera-device":G(y),loading:G(C),"latest-snapshot-src":G(u),onClose:t[1]||=e=>i(`close`)},null,8,[`camera`,`camera-device`,`loading`,`latest-snapshot-src`])):q(``,!0),G(x)===`sources`?(L(),V(f,{key:1,modelValue:G(b),"onUpdate:modelValue":t[2]||=e=>jn(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`])):q(``,!0),G(x)===`settings`?(L(),V(p,{key:2,modelValue:G(b),"onUpdate:modelValue":t[4]||=e=>jn(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`])):q(``,!0),G(x)===`plugins`?(L(),V(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`])):q(``,!0)]))],16)):q(``,!0)]),_:1},8,[`value`]))),128))])]),_:1})]),_:1},8,[`value`]),G(w)?(L(),Y(`div`,Qm,[U(r,{fluid:``,severity:`success`,class:`cui-button-medium`,label:e.$t(`components.form.button.save`),onClick:te},null,8,[`label`])])):q(``,!0)]),_:1},8,[`style`,`validation-schema`])],64)}}}),[[`__scopeId`,`data-v-94cafb3a`]]),eh={class:`w-full h-full p-safe !pb-0 md:!pl-0 non-draggable-region`},th={class:`w-full h-full border-0 md:border-r-[1px] border-color overflow-y-auto pb-safe`},nh=An({__name:`CuiCameraDrawer`,setup(e){let t=cr(),n=Yt(),r=n.getEventBus(),i=X(!1),a=X(),o=X(),s=J(()=>Wt.pt);function c(){i.value=!1,n.close()}return F(t.currentRoute,(e,t)=>{e.path!==t.path&&n.close()}),cn(()=>{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=$m,r=Nr;return L(),V(r,ln({visible:G(i),"onUpdate:visible":t[0]||=e=>jn(i)?i.value=e:null},G(o),{class:`border-0 md:border-l-[1px]`,pt:G(s),onHide:c}),{container:B(({closeCallback:e})=>[K(`div`,eh,[K(`div`,th,[G(a)?(L(),V(n,ln({key:0},G(a),{onClose:e}),null,16,[`onClose`])):q(``,!0)])])]),_:1},16,[`visible`,`pt`])}}}),rh=An({__name:`CuiToast`,setup(e){let t=Gn(),{t:n}=a(),{mdBreakpoint:r}=ot(),i=pi(),{theme:o}=or(i),s={success:kn.success,error:kn.error,warn:kn.warning,warning:kn.warning,info:kn.info};function c(e){return n(`components.toast.title_${e===`warning`?`warn`:e}`)}function l(e){return e.type===`dismiss`}let u=mt.on(e=>{if(l(e)){kn.dismiss(e.id);return}let r=e,i=s[r.severity]||kn,a=r.summary||c(r.severity),o;if(r.action){let{label:e,loadingLabel:i,onClick:a}=r.action,s=r.id;o={label:e,onClick:r=>{r.preventDefault(),r.stopPropagation();let o=a();o instanceof Promise&&s&&(kn.loading(i??e,{id:s,duration:1/0}),o.catch(e=>{t.error(`action failed`,e),kn.error(n(`components.toast.title_error`),{id:s})}))}}}i(a,{id:r.id,description:r.detail,duration:r.persistent?1/0:r.life??3e3,action:o})});return be(u),(e,t)=>(L(),V(G(Mn),{"rich-colors":``,position:G(r)?`top-center`:`bottom-right`,"visible-toasts":3,theme:G(o)},null,8,[`position`,`theme`]))}}),ih={class:`loader flex flex-col justify-center items-center`},ah={key:0,class:`absolute flex flex-col items-center justify-center pb-safe bottom-10`},oh={key:0,class:`offline`},sh={key:1,class:`text-center text-white text-sm font-bold mt-2`},ch=N(An({__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}=Nn(e),{start:o}=v(()=>{document.getElementById(`lens`)?.classList.add(`cameraLens`),document.getElementById(`CameraUI_U`)?.classList.add(`cameraLetter`)},100,{immediate:!1}),{resume:s}=j(()=>{document.getElementById(`lens`)?.classList.remove(`cameraLens`),document.getElementById(`CameraUI_U`)?.classList.remove(`cameraLetter`),o()},2300,{immediate:!1});return cn(()=>{t.value&&s()}),(e,t)=>(L(),Y(`div`,ih,[U(G(Hn),{src:G(Qt)(`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)?(L(),Y(`div`,ah,[G(a)?(L(),Y(`div`,oh,[(L(),V(bn(G(a)),{class:`w-8 h-8 text-primary`}))])):q(``,!0),G(i)?(L(),Y(`div`,sh,$(G(i)),1)):q(``,!0)])):q(``,!0)]))}}),[[`__scopeId`,`data-v-839ba1ea`]]);Gn(`PushHandler`);function lh(){let e=cr(),{isElectronApp:t,electron:n}=Kn();function r(t,n){n?.deepLink&&e.push(n.deepLink)}cn(()=>{!t||!n||(n.removeListener(`notification-click`,r),n.on(`notification-click`,r))}),On(()=>{n?.removeListener(`notification-click`,r)})}function uh(){let e=cr(),{isElectronApp:t,electron:n}=Kn();function r(t,n){n?.path&&e.push(n.path)}cn(()=>{!t||!n||(n.removeListener(`deep-link`,r),n.on(`deep-link`,r))}),On(()=>{n?.removeListener(`deep-link`,r)})}var dh={key:1,class:`app`},fh=N(An({__name:`App`,setup(e){let{navbarState:t,subbarState:n,showBottombar:r,showNavbar:i,showTopbar:o}=ct(),s=sn(),c=ir(),l=cr(),{mdBreakpoint:u}=ot(),{isPWA:d}=et(),{t:f}=a(),p=gt(),{isElectronApp:m}=Kn();Et(),rn(),lh(),uh();let h=pi(),{theme:g}=or(h),_=Ft(),{isLoggedIn:v}=or(_),y=en(),b=Cn(`navbarRef`),x=Cn(`topbarRef`),S=Cn(`bottombarRef`),C=X(!0),w=X(!1),ee=Le(x,{width:0,height:0},{box:`border-box`}),te=Le(S,{width:0,height:0},{box:`border-box`}),ne=J(()=>t.value===`closed`||t.value===`minified`?u.value?Fo.CLOSED:Fo.MINIFIED:Fo.EXPANDED),re=J(()=>t.value===`closed`?0:8),T=J(()=>!b.value||u.value?`env(safe-area-inset-left, 0px)`:`calc(${ne.value}px + max(${re.value}px, env(safe-area-inset-left, 0px)))`),ie=J(()=>s.showTopbar.value?`var(--topbar-background)`:s.background.value?s.background.value:`var(--ground-background)`),ae=J(()=>`calc(100dvh - ${x.value?`${ee.height.value}px`:`env(safe-area-inset-top, 0px)`} - ${S.value?`${te.height.value}px`:s.ignoreSafeAreaBottom.value?`0px`:`env(safe-area-inset-bottom, 0px)`} - ${S.value||!s.disableScroll.value||s.noExtraPadding.value?`0px`:`8px`})`),oe=J(()=>c.meta.auth?.requiresAuth&&!v.value||C.value||y.isSwitching),E=J(()=>{if(!(!y.isSwitching||!y.switchTargetName))return`${f(`components.instance_switcher.switching_to`)} ${y.switchTargetName}...`});async function D(){}return F([v,()=>p.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}),F([ie,g],()=>{Vn(()=>{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}),F(()=>s.disableScroll.value,e=>{document.body.classList.toggle(`disable-overflow-scroll`,e),document.documentElement.classList.toggle(`disable-overflow-scroll`,e)},{immediate:!0}),cn(async()=>{await l.isReady(),D(),C.value=!1,requestAnimationFrame(()=>{w.value=!0})}),(e,a)=>{let c=ch,l=rh,f=Ir,p=Dr,h=nh,g=pc,_=ps,v=ds,C=mn(`RouterView`),ie=uo,D=no,se=Qa,O=Ka,ce=Ha,le=Ta,ue=ya;return G(oe)?(L(),Y(`div`,{key:0,class:`flex w-full h-full justify-center items-center absolute z-50`,style:Bn({minHeight:G(d)?`100vh !important`:`100dvh !important`})},[U(c,{reload:``,text:G(E)},null,8,[`text`])],4)):(L(),Y(`div`,dh,[U(l),U(f),U(p),U(h),G(o)?(L(),V(g,{key:0,ref_key:`topbarRef`,ref:x,class:`z-2 top-0`,"offset-left":G(u)?0:G(ne),animate:G(w)},null,8,[`offset-left`,`animate`])):q(``,!0),G(r)?(L(),V(_,{key:1,ref_key:`bottombarRef`,ref:S,class:`z-2`},null,512)):q(``,!0),G(i)?(L(),V(v,{key:2,ref_key:`navbarRef`,ref:b,class:`z-3 top-0 left-0`},null,512)):q(``,!0),K(`main`,{id:`container`,class:`relative w-dvw z-1 overflow-x-hidden`,style:Bn({transition:G(w)?`padding-left 200ms`:void 0,paddingTop:G(x)?`${G(ee).height.value}px`:`env(safe-area-inset-top, 0px)`,paddingLeft:G(T),paddingRight:`env(safe-area-inset-right, 0px)`,paddingBottom:G(S)?`${G(te).height.value}px`:G(s).ignoreSafeAreaBottom.value?`0px`:`env(safe-area-inset-bottom, 0px)`})},[K(`div`,{class:W([`w-full max-w-full h-full grid`,{"p-2":G(s).padding.value,"pt-0":G(s).paddingTop.value===!1,"pb-0":G(s).paddingBottom.value===!1&&!G(S),"pb-4":(G(s).paddingBottom.value||G(S))&&!G(s).disableScroll,"pl-0":G(s).paddingLeft.value===!1,"pr-0":G(s).paddingRight.value===!1}]),style:Bn({minHeight:G(ae),maxHeight:G(s).disableScroll.value?G(ae):void 0,height:G(s).disableScroll.value?G(ae):void 0,overflow:G(s).disableScroll.value?`hidden`:void 0})},[U(C,null,{default:B(({Component:e})=>[(L(),V(bn(e),{key:G(y).switchKey,class:W([`w-full h-full relative min-w-0`,{"overflow-x-hidden":!G(s).allowOverflowX.value}]),"navbar-width":G(ne),"navbar-left":G(re)},null,8,[`class`,`navbar-width`,`navbar-left`]))]),_:1})],6)],4),G(m)?(L(),V(ie,{key:3})):q(``,!0),G(t)===`opened`||G(n)===`opened`&&G(u)?(L(),V(Rn,{key:4,to:G(t)===`opened`?`#app`:`#container`,defer:``},[G(u)?(L(),Y(`div`,{key:0,class:W([`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)):q(``,!0)],8,[`to`])):q(``,!0),K(`div`,{class:`fixed-bg`,style:Bn({background:G(s).background.value})},null,4),U(D),U(se),U(O),G(!1)?(L(),V(ce,{key:5})):q(``,!0),U(le),U(ue)]))}}}),[[`__scopeId`,`data-v-a40ed066`]]);Gn();function ph(e){return typeof e==`string`&&e.startsWith(`/`)&&!e.startsWith(`//`)}function mh(e){on()&&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):n.type===`cui:navigate`&&ph(n.path)&&e.onNavigate?.(n.path))})}function hh(e,t){e.use(f({natsTransport:t.nats,target:t.target,wsTransport:t.ws})),e.use(Ee({natsTransport:t.nats,target:t.target,wsTransport:t.ws,workerBridge:lt(),workerRegistry:it}))}var gh=rr(),_h=Mr(Fr,{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 vh(e){jt(e)||Jr.value||Xr.value||Ze().add({severity:`error`,detail:e,life:3e3})}function yh(){return{enableDevtoolsV6Plugin:!0,queryClientConfig:{defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!0,gcTime:3e5,staleTime:1e4,networkMode:`online`,retry:(e,t)=>bh(t)===401?!1:e<2||(vh(t),!1)},mutations:{retry:0,networkMode:`online`,onError:vh}}}}}function bh(e){if(typeof e==`object`&&e&&`response`in e){let t=e.response;if(typeof t?.status==`number`)return t.status}}function xh(){return{theme:{preset:_h,options:{cssLayer:{name:`primevue`,order:`theme, base, primevue`},darkModeSelector:`.dark-mode`}}}}function Sh(e){e.directive(`tooltip`,l).directive(`focustrap`,h),e.use(Pr).use(Rr).use(jr).use(Tr,xh()).use(nn).use(fn()).use(_n,yh()).use(gh)}window.addEventListener(`vite:preloadError`,()=>_t(()=>window.location.reload()));var{connection:Ch}=await Ut({logger:new O(`Connection`)});Zt();var wh=gn(fh),Th=new O(`Vue`);wh.config.errorHandler=(e,t,n)=>Th.error(`[${n}]`,e),Sh(wh),ra(Ch),hh(wh,Ch),en().restoreActiveOverride(),Et(),mh({onTheme:e=>pi().applyHostTheme(e),onLanguage:e=>Et().applyHostLanguage(e),onNavigate:e=>an.push(e)});var Eh=await na(Ch,{onUser:e=>Ft().setUserFromLogin(e),onRedirectInfo:e=>{en().redirectInfo=e},onReset:()=>{en().activeId=null,tt.value=null}});!Eh&&Ot()&&(Eh=await zt(Ch,{onUser:e=>Ft().setUserFromLogin(e)})),wh.use(an),wh.mount(`#app`),bt(),Eh||Ch.boot(`default`);
|