@camera.ui/server 0.0.112 → 0.0.114
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-Dd3AyWdE.js → 404-CZtDF9in.js} +1 -1
- package/dist/interface/assets/{About-DAV31RZ5.js → About-BzuuHdW1.js} +1 -1
- package/dist/interface/assets/{Adminpanel-zLLSmbSt.js → Adminpanel-uj7eTmlN.js} +1 -1
- package/dist/interface/assets/{Automation-Dx--ghuY.js → Automation-D0ps_z9e.js} +2 -2
- package/dist/interface/assets/{AutomationImport-chsxrEfX.js → AutomationImport-CR4Vsxkb.js} +2 -2
- package/dist/interface/assets/AutomationStore-BcMX7WbG.js +2 -0
- package/dist/interface/assets/AutomationStoreDetail-D6Ugj8ba.js +2 -0
- package/dist/interface/assets/Automations-DBACrYHy.js +2 -0
- package/dist/interface/assets/{Camera-DVJbyl93.js → Camera-Cf4QZbsx.js} +2 -2
- package/dist/interface/assets/{CameraConsole-DOiCJAQS.js → CameraConsole-uD4aWou8.js} +1 -1
- package/dist/interface/assets/{Cameras-Dz7bZyRE.js → Cameras-DbBU5mou.js} +1 -1
- package/dist/interface/assets/{Camview-CDM4Q_tc.css → Camview-CS2a2okQ.css} +1 -1
- package/dist/interface/assets/{Camview-CBywGGI8.js → Camview-CoHrXLHW.js} +1 -1
- package/dist/interface/assets/{Config-BfijMggp.js → Config-B9jI0lTQ.js} +1 -1
- package/dist/interface/assets/{ConfigActionCameraControl-B2xFxVNO.js → ConfigActionCameraControl-D4hJLWmj.js} +1 -1
- package/dist/interface/assets/{ConfigActionNotification-hmTEfMw3.js → ConfigActionNotification-B5cCmBXr.js} +1 -1
- package/dist/interface/assets/{ConfigActionPlugin-BgKKvqAy.js → ConfigActionPlugin-B7YAbFlf.js} +1 -1
- package/dist/interface/assets/{ConfigActionSensor-Du072tTI.js → ConfigActionSensor-D_Dt1qtt.js} +1 -1
- package/dist/interface/assets/{ConfigActionSnapshot-9aGopbuJ.js → ConfigActionSnapshot-ClyCQuB3.js} +1 -1
- package/dist/interface/assets/{ConfigConditionSensorState-D2IIsthA.js → ConfigConditionSensorState-x0M0kHwL.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerDetection-CYJOEkHi.js → ConfigTriggerDetection-DWjlecON.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerGeofence-4t1aW1Iw.js → ConfigTriggerGeofence-CTqptMUN.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSensor-CVzeR8ac.js → ConfigTriggerSensor-DuCtavZo.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSystem-5TI9H8mj.js → ConfigTriggerSystem-D1oGAhLn.js} +1 -1
- package/dist/interface/assets/{Console-COaJF4Fu.js → Console-DrDqDUtO.js} +1 -1
- package/dist/interface/assets/{CuiAvatar-Drdaxxcm.js → CuiAvatar-of_eVQsv.js} +1 -1
- package/dist/interface/assets/{CuiBottomSheet-ljGYA9W5.js → CuiBottomSheet-B7aQ7GCw.js} +1 -1
- package/dist/interface/assets/CuiBottomSheet-DKUg_g5x.js +1 -0
- package/dist/interface/assets/{CuiCameraCard-O22PEfyi.js → CuiCameraCard-IyJNZMGs.js} +1 -1
- package/dist/interface/assets/{CuiCameraPipCard-BDZ3W5sh.js → CuiCameraPipCard-KUBxGPoU.js} +1 -1
- package/dist/interface/assets/{CuiCameraRecordings-BWlxU4qP.js → CuiCameraRecordings-iWAFGo8e.js} +1 -1
- package/dist/interface/assets/{CuiCameraShares-BIXFV72I.js → CuiCameraShares-BCMYN11A.js} +1 -1
- package/dist/interface/assets/{CuiCameraSnapshot-BAwo37N7.js → CuiCameraSnapshot-DTtvEMy1.js} +1 -1
- package/dist/interface/assets/{CuiCameraTable-6tWx74Nl.js → CuiCameraTable-B7g53tPM.js} +1 -1
- package/dist/interface/assets/{CuiImage-KyBpvv-t.js → CuiImage-B97QDAl7.js} +1 -1
- package/dist/interface/assets/{CuiMenu-BBequFn_.js → CuiMenu-Ds6GufVn.js} +1 -1
- package/dist/interface/assets/{CuiPluginCard-Bnb0YKK1.js → CuiPluginCard-D1SylQbM.js} +2 -2
- package/dist/interface/assets/{CuiPluginOAuthButton-CvVnSP0h.js → CuiPluginOAuthButton-X8ZGFPwW.js} +2 -2
- package/dist/interface/assets/{CuiQRCode-Di0RLqfL.js → CuiQRCode-D_31ri5b.js} +1 -1
- package/dist/interface/assets/{CuiRecordingsGrid-DNw21B-r.js → CuiRecordingsGrid-CzMzhUXb.js} +1 -1
- package/dist/interface/assets/{CuiSchema-Cr90oo-T.js → CuiSchema-CfqOJmDH.js} +1 -1
- package/dist/interface/assets/{Faces-CFN1J-o4.js → Faces-IVmqcGuF.js} +1 -1
- package/dist/interface/assets/{FirstSteps-uzffNroi.js → FirstSteps-Boec1bzd.js} +1 -1
- package/dist/interface/assets/{Instances-CsAKq-HH.js → Instances-kmkRiBrV.js} +1 -1
- package/dist/interface/assets/{Logs-DKwNBSz9.js → Logs-DzR8mmLu.js} +1 -1
- package/dist/interface/assets/{Menu-Db1mi08W.js → Menu-Ct3W72Nu.js} +1 -1
- package/dist/interface/assets/{OAuthDeviceFlow-B4cT3UTT.js → OAuthDeviceFlow-Cp9uZWm1.js} +1 -1
- package/dist/interface/assets/Plugin-CeLrucXT.js +1 -0
- package/dist/interface/assets/Plugin-Yv0ZmTNZ.css +1 -0
- package/dist/interface/assets/{PluginConsole-Bs9HqX_F.js → PluginConsole-BdbmROpF.js} +1 -1
- package/dist/interface/assets/PluginDetail-DKywYzmS.js +2 -0
- package/dist/interface/assets/PluginDetail-DbYxVe3g.css +1 -0
- package/dist/interface/assets/{PluginSchema-D3BCVJNa.js → PluginSchema-CWcq67pj.js} +1 -1
- package/dist/interface/assets/PluginSearch-BC1L0-VN.js +1 -0
- package/dist/interface/assets/PluginSearch-DCuLwE3v.js +2 -0
- package/dist/interface/assets/{PluginSearch-BOWQC1zl.css → PluginSearch-XjGr5qdW.css} +1 -1
- package/dist/interface/assets/{Plugins-DD8FPbtv.js → Plugins-DMLQY_6J.js} +1 -1
- package/dist/interface/assets/{Recordings-Bt8clj2R.js → Recordings--XaVJZJi.js} +1 -1
- package/dist/interface/assets/{Settings-Bj_41fdw.js → Settings-BZDfWnB8.js} +1 -1
- package/dist/interface/assets/SettingsAccount-DFMOh1ci.js +1 -0
- package/dist/interface/assets/{SettingsAccount-CWVj8S8j.js → SettingsAccount-DKHO4mDj.js} +1 -1
- package/dist/interface/assets/SettingsAppearance-DzG2tlwK.js +1 -0
- package/dist/interface/assets/{SettingsAppearance-DNaNlO1q.js → SettingsAppearance-V5aeQ9c8.js} +1 -1
- package/dist/interface/assets/{SettingsBackup-stUbnWJf.js → SettingsBackup-CfOHDar8.js} +1 -1
- package/dist/interface/assets/{SettingsNotifications-Do2Cy2yf.js → SettingsNotifications-BZ1IXj0a.js} +1 -1
- package/dist/interface/assets/{SettingsRecordings-DWX69m9b.js → SettingsRecordings-BsJ9z-RE.js} +1 -1
- package/dist/interface/assets/{SettingsRemote-RqXtq3dF.js → SettingsRemote-Bf8bqXYs.js} +1 -1
- package/dist/interface/assets/SettingsSystem-obAYrm8J.js +2 -0
- package/dist/interface/assets/{SettingsUsers-Cb6zolu8.js → SettingsUsers-Ciu1ry18.js} +1 -1
- package/dist/interface/assets/{Terminal-D2zkV1fJ.js → Terminal-CD9he5xW.js} +1 -1
- package/dist/interface/assets/VersionsHandler-Dpo-L314.js +7 -0
- package/dist/interface/assets/Workers-DCx1wSq5.css +1 -0
- package/dist/interface/assets/Workers-DiIBLgfr.js +2 -0
- package/dist/interface/assets/alert-circle-azHizGIK.js +1 -0
- package/dist/interface/assets/{api-CvihG9kg.js → api-CbBOEbKQ.js} +1 -1
- package/dist/interface/assets/api-aSYFKxo6.js +2 -0
- package/dist/interface/assets/api-vCJ1T8Ow.css +2 -0
- package/dist/interface/assets/{auth-BeYrbk7B.js → auth-cdPNNpNC.js} +1 -1
- package/dist/interface/assets/{automations-egbiXwMx.js → automations-E7vwN3kw.js} +1 -1
- package/dist/interface/assets/{backup-82y2bZBX.js → backup-Co1bwdSv.js} +1 -1
- package/dist/interface/assets/{cameras-DRRy289F.js → cameras-CvJDLEZ3.js} +1 -1
- package/dist/interface/assets/{cameras.schema-qOAUe-E9.js → cameras.schema-Clwro_L9.js} +1 -1
- package/dist/interface/assets/check-circle-BauXcL6H.js +1 -0
- package/dist/interface/assets/cloudHandoff-Bym-XqR1.js +1 -0
- package/dist/interface/assets/{deviceId-DXf6AlPA.js → deviceId-OXLTtG-_.js} +1 -1
- package/dist/interface/assets/{hasPermission-CPgoH1JH.js → hasPermission-P1TgpAur.js} +1 -1
- package/dist/interface/assets/{instances-Crs3gwnp.js → instances-DwnEOXk1.js} +1 -1
- package/dist/interface/assets/{locale-BCQeXbI8.js → locale-BWvy9Nlz.js} +1 -1
- package/dist/interface/assets/{main-D0vO1lt0.js → main-DiF8p_7h.js} +2 -2
- package/dist/interface/assets/{notifications-AiaxATml.js → notifications-DHmx6O_s.js} +1 -1
- package/dist/interface/assets/platformLabels-D-cF6OTP.js +1 -0
- package/dist/interface/assets/{plugins-C_Mh_UEw.js → plugins-NVAodP6s.js} +1 -1
- package/dist/interface/assets/{round-restart-alt-BJAngKc7.js → round-restart-alt-c8MQjhLh.js} +1 -1
- package/dist/interface/assets/{router-C2x34pNg.js → router-6GfEM8TO.js} +2 -2
- package/dist/interface/assets/{server-GaO6jF81.js → server-CRxodRik.js} +1 -1
- package/dist/interface/assets/{shares-Cw2NYamp.js → shares-4w6GDwjp.js} +1 -1
- package/dist/interface/assets/{theme-cGiCxaXN.js → theme-DhaXe7yA.js} +1 -1
- package/dist/interface/assets/types-BXo-JDGR.js +1 -0
- package/dist/interface/assets/{useBiometricCredentials-CEmbsdFy.js → useBiometricCredentials-BGRyKe48.js} +1 -1
- package/dist/interface/assets/{useCameraOptions-quplvW_7.js → useCameraOptions-CO1HD_gL.js} +1 -1
- package/dist/interface/assets/{useCuiDialog-j9ybKsCK.js → useCuiDialog-DHktK-mZ.js} +1 -1
- package/dist/interface/assets/{useFileDownload-BcOErnCc.js → useFileDownload-Cp1oH80I.js} +1 -1
- package/dist/interface/assets/{useLogsSocket-gXiAENMr.js → useLogsSocket-OnTDnkPr.js} +1 -1
- package/dist/interface/assets/{useStreamStatus-bjptbs6u.js → useStreamStatus-N--czepD.js} +1 -1
- package/dist/interface/assets/{useUserOptions-CA-AJeEh.js → useUserOptions-CPkl1O0A.js} +1 -1
- package/dist/interface/assets/{users.schema-DaXV2Jq7.js → users.schema-BIL9DqRo.js} +1 -1
- package/dist/interface/assets/{view-grid-Coh7iX5e.js → view-grid-B0KB2pRf.js} +1 -1
- package/dist/interface/index.html +29 -29
- package/dist/interface/sw.js +1 -1
- package/dist/server/package.json +1 -1
- package/dist/server/src/api/controllers/plugins.controller.js +16 -3
- package/dist/server/src/api/controllers/plugins.controller.js.map +1 -1
- package/dist/server/src/api/controllers/server.controller.js +3 -2
- package/dist/server/src/api/controllers/server.controller.js.map +1 -1
- package/dist/server/src/api/controllers/workers.controller.d.ts +9 -4
- package/dist/server/src/api/controllers/workers.controller.js +132 -9
- package/dist/server/src/api/controllers/workers.controller.js.map +1 -1
- package/dist/server/src/api/database/index.d.ts +1 -2
- package/dist/server/src/api/database/index.js +5 -19
- package/dist/server/src/api/database/index.js.map +1 -1
- package/dist/server/src/api/database/types.d.ts +29 -1
- package/dist/server/src/api/routes/workers.routes.js +61 -7
- package/dist/server/src/api/routes/workers.routes.js.map +1 -1
- package/dist/server/src/api/schemas/config.schema.d.ts +8 -2
- package/dist/server/src/api/schemas/config.schema.js +8 -1
- package/dist/server/src/api/schemas/config.schema.js.map +1 -1
- package/dist/server/src/api/schemas/remote.schema.d.ts +1 -1
- package/dist/server/src/api/schemas/workers.schema.d.ts +19 -0
- package/dist/server/src/api/schemas/workers.schema.js +19 -0
- package/dist/server/src/api/schemas/workers.schema.js.map +1 -1
- package/dist/server/src/api/services/plugins.service.d.ts +2 -0
- package/dist/server/src/api/services/plugins.service.js +25 -3
- package/dist/server/src/api/services/plugins.service.js.map +1 -1
- package/dist/server/src/api/services/server.service.d.ts +0 -2
- package/dist/server/src/api/services/server.service.js +0 -12
- package/dist/server/src/api/services/server.service.js.map +1 -1
- package/dist/server/src/api/services/workers.service.d.ts +15 -0
- package/dist/server/src/api/services/workers.service.js +95 -2
- package/dist/server/src/api/services/workers.service.js.map +1 -1
- package/dist/server/src/api/types/index.d.ts +37 -0
- package/dist/server/src/api/utils/cert.js +43 -9
- package/dist/server/src/api/utils/cert.js.map +1 -1
- package/dist/server/src/api/websocket/nsp/server.d.ts +0 -2
- package/dist/server/src/api/websocket/nsp/server.js +1 -8
- package/dist/server/src/api/websocket/nsp/server.js.map +1 -1
- package/dist/server/src/api/websocket/nsp/workers.d.ts +0 -3
- package/dist/server/src/api/websocket/nsp/workers.js +4 -17
- package/dist/server/src/api/websocket/nsp/workers.js.map +1 -1
- package/dist/server/src/camera/decoder/worker.d.ts +3 -0
- package/dist/server/src/camera/decoder/worker.js +58 -36
- package/dist/server/src/camera/decoder/worker.js.map +1 -1
- package/dist/server/src/go2rtc/index.js +3 -2
- package/dist/server/src/go2rtc/index.js.map +1 -1
- package/dist/server/src/main.js +11 -3
- package/dist/server/src/main.js.map +1 -1
- package/dist/server/src/manager/downloadManager.d.ts +6 -0
- package/dist/server/src/manager/downloadManager.js +162 -3
- package/dist/server/src/manager/downloadManager.js.map +1 -1
- package/dist/server/src/plugins/bundle.d.ts +2 -0
- package/dist/server/src/plugins/bundle.js +24 -0
- package/dist/server/src/plugins/bundle.js.map +1 -0
- package/dist/server/src/plugins/config-store.d.ts +16 -0
- package/dist/server/src/plugins/config-store.js +33 -0
- package/dist/server/src/plugins/config-store.js.map +1 -0
- package/dist/server/src/plugins/index.d.ts +1 -1
- package/dist/server/src/plugins/index.js +3 -17
- package/dist/server/src/plugins/index.js.map +1 -1
- package/dist/server/src/plugins/main-file.d.ts +2 -0
- package/dist/server/src/plugins/main-file.js +24 -0
- package/dist/server/src/plugins/main-file.js.map +1 -0
- package/dist/server/src/plugins/plugin.d.ts +0 -1
- package/dist/server/src/plugins/plugin.js +7 -25
- package/dist/server/src/plugins/plugin.js.map +1 -1
- package/dist/server/src/plugins/runtime/base.d.ts +23 -7
- package/dist/server/src/plugins/runtime/base.js +32 -29
- package/dist/server/src/plugins/runtime/base.js.map +1 -1
- package/dist/server/src/plugins/runtime/index.d.ts +2 -3
- package/dist/server/src/plugins/runtime/index.js.map +1 -1
- package/dist/server/src/plugins/runtime/node/child.d.ts +1 -0
- package/dist/server/src/plugins/runtime/node/child.js +24 -4
- package/dist/server/src/plugins/runtime/node/child.js.map +1 -1
- package/dist/server/src/plugins/runtime/node/configDb.d.ts +15 -0
- package/dist/server/src/plugins/runtime/node/configDb.js +18 -0
- package/dist/server/src/plugins/runtime/node/configDb.js.map +1 -0
- package/dist/server/src/plugins/runtime/node/index.d.ts +2 -2
- package/dist/server/src/plugins/runtime/node/index.js.map +1 -1
- package/dist/server/src/plugins/runtime/node/pluginApi.d.ts +2 -2
- package/dist/server/src/plugins/runtime/node/pluginApi.js.map +1 -1
- package/dist/server/src/plugins/runtime/node/proxy/cameraDevice.js +2 -0
- package/dist/server/src/plugins/runtime/node/proxy/cameraDevice.js.map +1 -1
- package/dist/server/src/plugins/runtime/node/proxy/coreManager.js +5 -0
- package/dist/server/src/plugins/runtime/node/proxy/coreManager.js.map +1 -1
- package/dist/server/src/plugins/runtime/node/proxy/downloadManager.js +6 -2
- package/dist/server/src/plugins/runtime/node/proxy/downloadManager.js.map +1 -1
- package/dist/server/src/plugins/runtime/node/proxy/fileServe.d.ts +13 -0
- package/dist/server/src/plugins/runtime/node/proxy/fileServe.js +82 -0
- package/dist/server/src/plugins/runtime/node/proxy/fileServe.js.map +1 -0
- package/dist/server/src/plugins/runtime/node/remoteUrls.d.ts +1 -0
- package/dist/server/src/plugins/runtime/node/remoteUrls.js +32 -0
- package/dist/server/src/plugins/runtime/node/remoteUrls.js.map +1 -0
- package/dist/server/src/plugins/runtime/node/storage.d.ts +2 -2
- package/dist/server/src/plugins/runtime/node/storage.js +1 -1
- package/dist/server/src/plugins/runtime/node/storage.js.map +1 -1
- package/dist/server/src/plugins/runtime/node/storageController.d.ts +2 -2
- package/dist/server/src/plugins/runtime/node/storageController.js.map +1 -1
- package/dist/server/src/plugins/runtime/python/child.py +16 -4
- package/dist/server/src/plugins/runtime/python/config_db.py +42 -0
- package/dist/server/src/plugins/runtime/python/index.d.ts +2 -2
- package/dist/server/src/plugins/runtime/python/index.js +3 -1
- package/dist/server/src/plugins/runtime/python/index.js.map +1 -1
- package/dist/server/src/plugins/runtime/python/namespaces.py +2 -0
- package/dist/server/src/plugins/runtime/python/plugin_api.py +2 -2
- package/dist/server/src/plugins/runtime/python/proxy/camera_device.py +5 -0
- package/dist/server/src/plugins/runtime/python/proxy/core_manager.py +6 -0
- package/dist/server/src/plugins/runtime/python/remote_urls.py +42 -0
- package/dist/server/src/plugins/runtime/python/storage.py +2 -2
- package/dist/server/src/plugins/runtime/python/storage_controller.py +2 -2
- package/dist/server/src/plugins/types.d.ts +2 -1
- package/dist/server/src/plugins/types.js +1 -0
- package/dist/server/src/plugins/types.js.map +1 -1
- package/dist/server/src/plugins/worker.d.ts +8 -0
- package/dist/server/src/plugins/worker.js +109 -3
- package/dist/server/src/plugins/worker.js.map +1 -1
- package/dist/server/src/remote/tunnel/client.js +3 -2
- package/dist/server/src/remote/tunnel/client.js.map +1 -1
- package/dist/server/src/rpc/index.d.ts +2 -1
- package/dist/server/src/rpc/index.js +43 -23
- package/dist/server/src/rpc/index.js.map +1 -1
- package/dist/server/src/rpc/interfaces/download.d.ts +10 -0
- package/dist/server/src/rpc/namespaces.d.ts +5 -1
- package/dist/server/src/rpc/namespaces.js +12 -2
- package/dist/server/src/rpc/namespaces.js.map +1 -1
- package/dist/server/src/rpc/server.d.ts +16 -3
- package/dist/server/src/rpc/server.js +150 -22
- package/dist/server/src/rpc/server.js.map +1 -1
- package/dist/server/src/rpc/utils.d.ts +1 -1
- package/dist/server/src/rpc/utils.js +2 -0
- package/dist/server/src/rpc/utils.js.map +1 -1
- package/dist/server/src/services/config/constants.js +4 -1
- package/dist/server/src/services/config/constants.js.map +1 -1
- package/dist/server/src/services/config/index.d.ts +1 -0
- package/dist/server/src/services/config/index.js +16 -10
- package/dist/server/src/services/config/index.js.map +1 -1
- package/dist/server/src/services/config/types.d.ts +5 -1
- package/dist/server/src/shutdown-state.d.ts +3 -0
- package/dist/server/src/shutdown-state.js +11 -0
- package/dist/server/src/shutdown-state.js.map +1 -0
- package/dist/server/src/utils/platform.d.ts +2 -0
- package/dist/server/src/utils/platform.js +26 -0
- package/dist/server/src/utils/platform.js.map +1 -0
- package/dist/server/src/workers/agent.d.ts +15 -9
- package/dist/server/src/workers/agent.js +157 -64
- package/dist/server/src/workers/agent.js.map +1 -1
- package/dist/server/src/workers/capabilities/frame-decoding.d.ts +7 -3
- package/dist/server/src/workers/capabilities/frame-decoding.js +44 -10
- package/dist/server/src/workers/capabilities/frame-decoding.js.map +1 -1
- package/dist/server/src/workers/capabilities/handler.d.ts +1 -0
- package/dist/server/src/workers/capabilities/plugin-host.d.ts +23 -0
- package/dist/server/src/workers/capabilities/plugin-host.js +161 -0
- package/dist/server/src/workers/capabilities/plugin-host.js.map +1 -0
- package/dist/server/src/workers/manager.d.ts +28 -3
- package/dist/server/src/workers/manager.js +316 -92
- package/dist/server/src/workers/manager.js.map +1 -1
- package/dist/server/src/workers/pairing.d.ts +3 -0
- package/dist/server/src/workers/pairing.js +80 -0
- package/dist/server/src/workers/pairing.js.map +1 -0
- package/dist/server/src/workers/types.d.ts +42 -17
- package/dist/server/src/workers/types.js +4 -0
- package/dist/server/src/workers/types.js.map +1 -1
- package/package.json +1 -1
- package/dist/interface/assets/AutomationStore-BhL1O1qq.js +0 -2
- package/dist/interface/assets/AutomationStoreDetail-pW5g8G4I.js +0 -2
- package/dist/interface/assets/Automations-CQioiNmw.js +0 -2
- package/dist/interface/assets/CuiBottomSheet-CrsJjITg.js +0 -1
- package/dist/interface/assets/Plugin-BDwSHzi9.js +0 -1
- package/dist/interface/assets/Plugin-CHdZvbiP.css +0 -1
- package/dist/interface/assets/PluginDetail-B2odw9DA.css +0 -1
- package/dist/interface/assets/PluginDetail-C3j4zIxC.js +0 -2
- package/dist/interface/assets/PluginSearch-BLWXmn9w.js +0 -2
- package/dist/interface/assets/PluginSearch-BwG61G-G.js +0 -1
- package/dist/interface/assets/SettingsAccount-DnZKU_tM.js +0 -1
- package/dist/interface/assets/SettingsAppearance-k5WMN34x.js +0 -1
- package/dist/interface/assets/SettingsSystem-BZ14jaFr.js +0 -2
- package/dist/interface/assets/VersionsHandler-nZK8BEJK.js +0 -7
- package/dist/interface/assets/Workers-CKR9yslJ.js +0 -1
- package/dist/interface/assets/api-Cntxdwiu.js +0 -2
- package/dist/interface/assets/api-CrAOxyt8.css +0 -2
- package/dist/interface/assets/cloudHandoff-CiV159TL.js +0 -1
- package/dist/interface/assets/types-aZM1hCux.js +0 -1
- /package/dist/interface/assets/{error-256-DLKVOU2S.png → logo-512-DLKVOU2S.png} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as e,Hn as t,I as n,It as r,N as i,Si as a,Vn as o,fi as s,tt as c}from"./vendor-cameraui-DgSMexWY.js";import{A as l,S as u,T as d,a as f,m as p}from"./api-Cntxdwiu.js";import{$n as m,$t as h,An as ee,Cr as g,En as _,Er as v,Gn as te,L as y,Ln as ne,On as b,Pn as x,R as re,Rn as S,Sr as C,Tr as w,Vn as T,Zn as E,_r as D,an as O,br as k,dn as A,fn as j,fr as M,jn as N,mn as P,mr as F,nr as I,on as ie,pn as L,rn as ae,rr as R,un as z,ur as B,vr as oe,xn as V,yn as H,z as se,zn as U}from"./vendor-DoIl6acN.js";import{f as ce}from"./vendor-core-BKHiXSX7.js";import{A as le,D as W,E as ue,M as G,N as K,O as de,P as fe,S as pe,T as me,j as he,k as ge,w as _e}from"./CuiCameraCard-O22PEfyi.js";import{t as ve}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{i as ye,n as be,r as xe,t as Se}from"./useSharedComposables-gpJ--qZh.js";import{n as Ce}from"./ui-DrzKhUXW.js";import{t as we}from"./close-DuwOOM-P.js";import{J as Te,K as Ee,R as q,U as De,b as Oe,o as ke}from"./vendor-primevue-7iEzPOvf.js";import{t as Ae}from"./grid-fill-DBU_n60V.js";import{t as J}from"./CuiCameraSnapshot-BAwo37N7.js";import{a as Y,i as X,n as Z,r as je,t as Me}from"./vendor-dnd-_zxmhxjM.js";import{n as Ne,t as Pe}from"./CuiMenu-BBequFn_.js";import{t as Fe}from"./cameras-DRRy289F.js";import{t as Ie}from"./useCuiDialog-j9ybKsCK.js";import{a as Le}from"./users.schema-DaXV2Jq7.js";import{t as Re}from"./routerState-dQtObsFs.js";import{t as ze}from"./check-BMoCATAa.js";import{n as Be,t as Ve}from"./microphone-CAVr4YFv.js";import{t as He}from"./plus-Dqgz6pez.js";import{t as Ue}from"./delete-5a2q7_46.js";import{t as We}from"./CuiCameraPipCard-BDZ3W5sh.js";import{n as Ge,t as Ke}from"./CuiTopNavbarItem-Q7M4nMw5.js";import{t as qe}from"./vendor-gridstack-DD5uGA3X.js";var Je={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ye(e,t){return U(),P(`svg`,Je,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M7.5 5.6L5 7l1.4-2.5L5 2l2.5 1.4L10 2L8.6 4.5L10 7zm12 9.8L22 14l-1.4 2.5L22 19l-2.5-1.4L17 19l1.4-2.5L17 14zM22 2l-1.4 2.5L22 7l-2.5-1.4L17 7l1.4-2.5L17 2l2.5 1.4zm-8.66 10.78l2.44-2.44l-2.12-2.12l-2.44 2.44zm1.03-5.49l2.34 2.34c.39.37.39 1.02 0 1.41L5.04 22.71c-.39.39-1.04.39-1.41 0l-2.34-2.34c-.39-.37-.39-1.02 0-1.41L12.96 7.29c.39-.39 1.04-.39 1.41 0`},null,-1)]])}var Xe=B({name:`mdi-auto-fix`,render:Ye}),Ze={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Qe(e,t){return U(),P(`svg`,Ze,[...t[0]||=[A(`g`,{fill:`none`,"fill-rule":`evenodd`},[A(`path`,{d:`m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z`}),A(`path`,{fill:`currentColor`,d:`M19 11a2 2 0 0 1 1.995 1.85L21 13v6a2 2 0 0 1-1.85 1.995L19 21h-4a2 2 0 0 1-1.995-1.85L13 19v-6a2 2 0 0 1 1.85-1.995L15 11zM9 15a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2zM9 3a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zm10 0a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`})],-1)]])}var $e=B({name:`mingcute-grid2-fill`,render:Qe}),et={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function tt(e,t){return U(),P(`svg`,et,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M13 6v5h5V7.75L22.25 12L18 16.25V13h-5v5h3.25L12 22.25L7.75 18H11v-5H6v3.25L1.75 12L6 7.75V11h5V6H7.75L12 1.75L16.25 6z`},null,-1)]])}var nt=B({name:`mdi-cursor-move`,render:tt}),rt={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Q(e,t){return U(),P(`svg`,rt,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`m8.471 7.237l3.056 12.992c.233.993 1.63 1.04 1.929.065l2.945-9.58l.384 1.527a1 1 0 0 0 .97.756H21a1 1 0 1 0 0-2h-2.466l-1.069-4.241c-.247-.981-1.628-1.017-1.925-.05l-2.912 9.472L9.475 2.771c-.24-1.02-1.688-1.03-1.943-.014l-2.065 8.24H3a1 1 0 0 0 0 2h3.247a1 1 0 0 0 .97-.757z`},null,-1)]])}var it=B({name:`fluent-pulse-24-filled`,render:Q}),at={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function ot(e,t){return U(),P(`svg`,at,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124m5.393.984a.75.75 0 1 0-1.06 1.06a5.5 5.5 0 0 1 0 7.78a.75.75 0 1 0 1.06 1.06a7 7 0 0 0 0-9.9`},null,-1),A(`path`,{fill:`currentColor`,d:`M10.828 5.172a.75.75 0 1 0-1.06 1.06a2.5 2.5 0 0 1 0 3.536a.75.75 0 1 0 1.06 1.06a4 4 0 0 0 0-5.656`},null,-1)]])}var st=B({name:`heroicons-speaker-wave-16-solid`,render:ot}),$={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function ct(e,t){return U(),P(`svg`,$,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124M11.28 5.72a.75.75 0 1 0-1.06 1.06L11.44 8l-1.22 1.22a.75.75 0 1 0 1.06 1.06l1.22-1.22l1.22 1.22a.75.75 0 1 0 1.06-1.06L13.56 8l1.22-1.22a.75.75 0 0 0-1.06-1.06L12.5 6.94z`},null,-1)]])}var lt=B({name:`heroicons-speaker-x-mark-16-solid`,render:ct}),ut={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function dt(e,t){return U(),P(`svg`,ut,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M10.4 13.45h3.2l.6 1.625q.075.2.238.313t.362.112q.35 0 .538-.275t.062-.6l-2.55-6.7q-.075-.2-.237-.312T12.25 7.5h-.5q-.2 0-.363.113t-.237.312L8.625 14.65q-.125.3.05.575t.525.275q.2 0 .363-.112t.237-.313zm.4-1.15L11.95 9h.1l1.15 3.3zM12 22q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12q0-.8.125-1.6T2.5 8.825q.125-.4.513-.537t.737.062q.375.2.538.588t.037.812q-.15.55-.238 1.113T4 12q0 3.35 2.325 5.675T12 20t5.675-2.325T20 12t-2.325-5.675T12 4q-.6 0-1.187.087T9.65 4.35q-.425.125-.8-.025T8.3 3.8t-.013-.762t.563-.513q.75-.275 1.55-.4T12 2q2.075 0 3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22M4.438 6.563Q4 6.125 4 5.5t.438-1.062T5.5 4t1.063.438T7 5.5t-.437 1.063T5.5 7t-1.062-.437M12 12`},null,-1)]])}var ft=B({name:`material-symbols-motion-photos-auto-outline-rounded`,render:dt}),pt={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function mt(e,t){return U(),P(`svg`,pt,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M21 15v3h3v2h-3v3h-2v-3h-3v-2h3v-3zm-7 3H3V6h16v7h2V6c0-1.11-.89-2-2-2H3a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h11z`},null,-1)]])}var ht=B({name:`mdi-card-plus-outline`,render:mt}),gt={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function _t(e,t){return U(),P(`svg`,gt,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M9 3h2v2H9zm4 0h2v2h-2zM9 7h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2z`},null,-1)]])}var vt=B({name:`mdi-drag-vertical`,render:_t}),yt={class:`text-sm text-muted truncate`},bt=ve(V({__name:`ViewDnDDrag`,props:{camera:{},isDropped:{type:Boolean},canDrag:{type:Boolean}},setup(e){let{camera:n,canDrag:r}=k(e),i=E(`boxRef`),a=D(null),o=F(0),s=F(0),c=F(!1),{x:l,y:u,sourceType:d}=ye(),[f,p]=X(()=>({type:`camera-sidebar`,options:{dropEffect:`copy`},item:n.value,canDrag:r.value,collect:e=>({style:{opacity:e.isDragging()?.4:1},isDragging:e.isDragging()})})),h=z(()=>f.value.isDragging),ee=z(()=>h.value&&d.value===`touch`);function _(){a.value&&document.body.contains(a.value)&&document.body.removeChild(a.value),a.value=null}function te(){if(_(),!i.value)return;let e=i.value.cloneNode(!0),t=i.value.getBoundingClientRect();e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.classList.add(`drag-preview`),e.style.position=`fixed`,e.style.left=`${l.value-o.value}px`,e.style.top=`${u.value-s.value}px`,document.body.appendChild(e),a.value=e}function y(){c.value=!1,_()}function ne(){y(),c.value=!0;let e=i.value?.getBoundingClientRect();e&&(o.value=l.value-e.left,s.value=u.value-e.top,te())}function b(){!a.value||!c.value||requestAnimationFrame(()=>{a.value&&(a.value.style.left=`${l.value-o.value}px`,a.value.style.top=`${u.value-s.value}px`)})}return m(ee,e=>e?ne():y()),m([l,u],()=>b(),{flush:`sync`}),x(()=>y()),(r,a)=>{let o=vt,s=J,c=t;return U(),P(`div`,{ref_key:`boxRef`,ref:i},[A(`div`,{ref:C(p),style:w(C(f).style)},[H(c,{disabled:e.isDropped,fluid:``,severity:`secondary`,class:`cui-rounded-corner dark-mode shadow-sm items-center justify-normal`,style:w({cursor:e.isDropped?`not-allowed`:`grab`})},{default:I(()=>[H(o,{size:`20`,class:`text-muted mr-2`}),H(s,{camera:C(n),width:`110px`,class:g([`cui-rounded-corner shadow-md overflow-hidden`,{"opacity-30":e.isDropped}])},null,8,[`camera`,`class`]),A(`span`,yt,v(C(n).name),1)]),_:1},8,[`disabled`,`style`])],4)],512)}}}),[[`__scopeId`,`data-v-a4c67afd`]]),xt={editMode:!1,rearrangeMode:!1,viewSize:1},St=Object.fromEntries(Object.entries({1:{cols:1,rows:1},4:{cols:2,rows:2},6:{cols:3,rows:3},7:{cols:4,rows:4},9:{cols:3,rows:3},10:{cols:4,rows:4},12:{cols:6,rows:6},13:{cols:4,rows:4},15:{cols:12,rows:12},16:{cols:4,rows:4},20:{cols:6,rows:6},26:{cols:12,rows:12}}).map(([e,t])=>[e,{cols:t.cols*16,rows:t.rows*16}])),Ct=e=>e.map(e=>({x:e.x*16,y:e.y*16,w:e.w*16,h:e.h*16})),wt=Object.fromEntries(Object.entries({1:[{x:0,y:0,w:1,h:1}],4:[{x:0,y:0,w:1,h:1},{x:1,y:0,w:1,h:1},{x:0,y:1,w:1,h:1},{x:1,y:1,w:1,h:1}],6:[{x:0,y:0,w:2,h:2},{x:2,y:0,w:1,h:1},{x:2,y:1,w:1,h:1},{x:0,y:2,w:1,h:1},{x:1,y:2,w:1,h:1},{x:2,y:2,w:1,h:1}],7:[{x:0,y:0,w:2,h:2},{x:2,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:2,y:2,w:1,h:1},{x:3,y:2,w:1,h:1},{x:2,y:3,w:1,h:1},{x:3,y:3,w:1,h:1}],9:[{x:0,y:0,w:1,h:1},{x:1,y:0,w:1,h:1},{x:2,y:0,w:1,h:1},{x:0,y:1,w:1,h:1},{x:1,y:1,w:1,h:1},{x:2,y:1,w:1,h:1},{x:0,y:2,w:1,h:1},{x:1,y:2,w:1,h:1},{x:2,y:2,w:1,h:1}],10:[{x:0,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:2,y:0,w:1,h:1},{x:3,y:0,w:1,h:1},{x:2,y:1,w:1,h:1},{x:3,y:1,w:1,h:1},{x:2,y:2,w:1,h:1},{x:3,y:2,w:1,h:1},{x:2,y:3,w:1,h:1},{x:3,y:3,w:1,h:1}],12:[{x:0,y:0,w:3,h:3},{x:3,y:0,w:3,h:3},{x:0,y:3,w:3,h:3},{x:3,y:3,w:1,h:1},{x:4,y:3,w:1,h:1},{x:5,y:3,w:1,h:1},{x:3,y:4,w:1,h:1},{x:4,y:4,w:1,h:1},{x:5,y:4,w:1,h:1},{x:3,y:5,w:1,h:1},{x:4,y:5,w:1,h:1},{x:5,y:5,w:1,h:1}],13:[{x:0,y:0,w:2,h:2},{x:2,y:0,w:1,h:1},{x:3,y:0,w:1,h:1},{x:2,y:1,w:1,h:1},{x:3,y:1,w:1,h:1},{x:0,y:2,w:1,h:1},{x:1,y:2,w:1,h:1},{x:2,y:2,w:1,h:1},{x:3,y:2,w:1,h:1},{x:0,y:3,w:1,h:1},{x:1,y:3,w:1,h:1},{x:2,y:3,w:1,h:1},{x:3,y:3,w:1,h:1}],15:[{x:0,y:0,w:6,h:6},{x:6,y:0,w:6,h:6},{x:0,y:6,w:3,h:3},{x:3,y:6,w:3,h:3},{x:0,y:9,w:3,h:3},{x:3,y:9,w:3,h:3},{x:6,y:6,w:2,h:2},{x:8,y:6,w:2,h:2},{x:10,y:6,w:2,h:2},{x:6,y:8,w:2,h:2},{x:8,y:8,w:2,h:2},{x:10,y:8,w:2,h:2},{x:6,y:10,w:2,h:2},{x:8,y:10,w:2,h:2},{x:10,y:10,w:2,h:2}],16:[{x:0,y:0,w:1,h:1},{x:1,y:0,w:1,h:1},{x:2,y:0,w:1,h:1},{x:3,y:0,w:1,h:1},{x:0,y:1,w:1,h:1},{x:1,y:1,w:1,h:1},{x:2,y:1,w:1,h:1},{x:3,y:1,w:1,h:1},{x:0,y:2,w:1,h:1},{x:1,y:2,w:1,h:1},{x:2,y:2,w:1,h:1},{x:3,y:2,w:1,h:1},{x:0,y:3,w:1,h:1},{x:1,y:3,w:1,h:1},{x:2,y:3,w:1,h:1},{x:3,y:3,w:1,h:1}],20:[{x:0,y:0,w:3,h:3},{x:0,y:3,w:3,h:3},{x:3,y:0,w:1,h:1},{x:4,y:0,w:1,h:1},{x:5,y:0,w:1,h:1},{x:3,y:1,w:1,h:1},{x:4,y:1,w:1,h:1},{x:5,y:1,w:1,h:1},{x:3,y:2,w:1,h:1},{x:4,y:2,w:1,h:1},{x:5,y:2,w:1,h:1},{x:3,y:3,w:1,h:1},{x:4,y:3,w:1,h:1},{x:5,y:3,w:1,h:1},{x:3,y:4,w:1,h:1},{x:4,y:4,w:1,h:1},{x:5,y:4,w:1,h:1},{x:3,y:5,w:1,h:1},{x:4,y:5,w:1,h:1},{x:5,y:5,w:1,h:1}],26:[{x:0,y:0,w:3,h:3},{x:3,y:0,w:3,h:3},{x:0,y:3,w:3,h:3},{x:3,y:3,w:3,h:3},{x:6,y:0,w:2,h:2},{x:8,y:0,w:2,h:2},{x:10,y:0,w:2,h:2},{x:6,y:2,w:2,h:2},{x:8,y:2,w:2,h:2},{x:10,y:2,w:2,h:2},{x:6,y:4,w:2,h:2},{x:8,y:4,w:2,h:2},{x:10,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:2,y:6,w:2,h:2},{x:4,y:6,w:2,h:2},{x:0,y:8,w:2,h:2},{x:2,y:8,w:2,h:2},{x:4,y:8,w:2,h:2},{x:0,y:10,w:2,h:2},{x:2,y:10,w:2,h:2},{x:4,y:10,w:2,h:2},{x:6,y:6,w:3,h:3},{x:9,y:6,w:3,h:3},{x:6,y:9,w:3,h:3},{x:9,y:9,w:3,h:3}]}).map(([e,t])=>[e,Ct(t)])),Tt={class:`text-lg font-semibold text-white`},Et={class:`flex flex-col gap-3 w-full h-full overflow-y-auto`},Dt={class:`cui-label`},Ot={key:0,class:`text-muted text-sm`},kt=V({__name:`ViewDnDSidebar`,props:{cameras:{},droppedCameras:{},title:{}},emits:[`changeViewSize`],setup(e,{emit:n}){let r=e,i=n,{droppedCameras:a}=k(r);function o(e){return a.value.some(t=>t.name===e.name)}return(n,r)=>{let a=t,s=bt;return U(),P(`div`,{class:`sidebar-view-background flex flex-col p-2 border-[1px] border-color gap-2 rounded-xl`,style:w({width:`${C(400)}px`})},[A(`span`,Tt,v(e.title),1),A(`div`,Et,[H(a,{fluid:``,label:`Change grid size`,class:`cui-button-small dark-mode shrink-0 my-4`,onClick:r[0]||=e=>i(`changeViewSize`)}),A(`label`,Dt,v(n.$t(`components.view_box.available_streams`)),1),(U(!0),P(ie,null,T(e.cameras,(e,t)=>(U(),P(`div`,{key:t},[H(s,{camera:e,"is-dropped":o(e),"can-drag":!o(e)},null,8,[`camera`,`is-dropped`,`can-drag`])]))),128)),e.cameras.length?L(``,!0):(U(),P(`span`,Ot,v(n.$t(`components.view_box.no_cameras`)),1))])],4)}}}),At={key:1,class:`w-full h-full bg-[#1a1a1a] flex items-center justify-center`},jt={key:2,class:`w-full h-full bg-[#111]`},Mt={key:1,class:`w-full h-full flex items-center justify-center`},Nt={key:0},Pt=ve(V({__name:`ViewDnDCard`,props:{camera:{},cameras:{},droppedCameras:{},mode:{},index:{},cameraCardProps:{},cameraCardModels:{},onDrop:{type:Function}},emits:[`drop`,`remove`,`expand`],setup(e,{expose:n,emit:r}){let i=e,o=r,{lgBreakpoint:s}=Se(),{camera:c,mode:l,cameras:u,droppedCameras:d}=k(i),f=E(`boxRef`),p=E(`containerRef`),m=E(`playerRef`),h=E(`menuRef`),{width:_}=a(p),[v,te]=je({accept:`camera-sidebar`,drop:i.onDrop,collect:e=>({isOver:e.isOver(),canDrop:e.canDrop()&&!c.value}),canDrop:()=>l.value===`edit`&&!c.value}),y=z(()=>v.value.canDrop&&v.value.isOver),ne=z(()=>l.value===`edit`?y.value?`#171717`:`#202020`:`#000`),b=z(()=>_.value<=200),x=z(()=>u.value.filter(e=>!d.value.some(t=>t.name===e.name))),re=z(()=>x.value.map(e=>({label:e.name,onClick:()=>o(`drop`,e)})));function S(e){m.value?.toggleMute(e)}async function T(e,t){await m.value?.toggleMicrophone(e,t)}function D(e){m.value?.toggleActivityMode(e)}async function M(e){await m.value?.toggleSourceRole(e)}async function N(e){await m.value?.toggleStreamingMode(e)}function F(e){m.value?.toggleBbox(e)}function ae(e){m.value?.togglePip(e)}return n({togglePlayerMute:S,toggleMicrophone:T,togglePlayerActivityMode:D,togglePlayerSourceRole:M,togglePlayerStreamingMode:N,togglePlayerBbox:F,togglePip:ae}),(n,r)=>{let i=We,a=He,d=we,_=t,v=J,y=Pe,x=Te;return U(),P(`div`,{ref_key:`boxRef`,ref:f,class:`view-dnd-card`},[C(l)===`normal`||C(l)===`rearrange`?(U(),P(ie,{key:0},[C(c)?(U(),j(i,ee({key:0,ref_key:`playerRef`,ref:m},e.cameraCardProps,{"activity-mode":e.cameraCardModels?.activityMode,"source-role":e.cameraCardModels?.sourceRole,"streaming-mode":e.cameraCardModels?.streamingMode,"camera-info":C(c),class:`w-full h-full`,onExpand:r[0]||=e=>o(`expand`,C(c),e)}),null,16,[`activity-mode`,`source-role`,`streaming-mode`,`camera-info`])):C(l)===`rearrange`?(U(),P(`div`,At,[H(a,{class:`w-6 h-6 text-white/20`})])):(U(),P(`div`,jt))],64)):C(l)===`edit`?(U(),P(ie,{key:1},[A(`div`,{ref:C(te),style:w({backgroundColor:C(ne)}),class:`w-full h-full`},[C(c)?(U(),P(`div`,{key:0,ref_key:`containerRef`,ref:p,class:`w-full h-full flex items-center justify-center relative min-w-0`},[H(_,{class:g([`z-1`,{"cui-icon-lg":C(b),"cui-button-small":!C(b)}]),label:C(b)?void 0:C(c).name,onClick:r[1]||=O(e=>o(`remove`,C(c)),[`prevent`])},{icon:I(()=>[H(d)]),_:1},8,[`class`,`label`]),H(v,{camera:C(c),class:`absolute w-full h-full top-0 left-0 bg-black/50 opacity-20`},null,8,[`camera`])],512)):C(s)?L(``,!0):(U(),P(`div`,Mt,[C(u).length?(U(),j(_,{key:1,text:``,rounded:``,class:`cui-icon-md`,onClick:C(h)?.toggleMenu},{icon:I(()=>[H(a,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])):R((U(),P(`div`,Nt,[H(_,{text:``,rounded:``,disabled:``,class:`cui-icon-md`},{icon:I(()=>[H(a,{width:`100%`,height:`100%`})]),_:1})])),[[x,{value:n.$t(`views.camview.no_cameras`)},void 0,{top:!0}]])]))],4),H(y,{ref_key:`menuRef`,ref:h,items:C(re),popover:{pt:{content:{class:`p-0! rounded-xl! overflow-hidden!`}}}},null,8,[`items`])],64)):L(``,!0)],512)}}}),[[`__scopeId`,`data-v-49edf1f5`]]),Ft={class:`w-full h-full flex flex-row`},It=[`gs-id`,`gs-x`,`gs-y`,`gs-w`,`gs-h`],Lt={class:`grid-stack-item-content`},Rt=ve(V({__name:`CuiCameraViewDnD`,props:b({cameras:{},viewSize:{},cards:{},title:{},editMode:{type:Boolean},rearrangeMode:{type:Boolean},cameraCardProps:{},cameraCardModels:{}},xt),emits:[`drop`,`remove`,`changeViewSize`,`expand`,`rearrange`],setup(n,{expose:i,emit:o}){let s=n,c=o,{isTouch:l}=xe(),{smBreakpoint:u,lgBreakpoint:d}=Se(),f=_(e,void 0),{routeFrom:p,routeTo:h}=ce(Re()),{editMode:ee,rearrangeMode:v,viewSize:te,cards:y,cameraCardProps:b}=k(s),re=E(`viewRef`),S=E(`wrapperRef`),D=E(`gridRef`),O=E(`cardRefs`),M=F(),B=F(),V=null,{isFullscreen:se,toggle:le}=r(re,{mode:`scroll`}),W=a(re),ue=a(S),G=z(()=>ee.value?`edit`:v.value?`rearrange`:`normal`),K=z(()=>M.value??B.value),de=z(()=>e=>{let t={...oe(b.value)};if(e){let n=p.value?.includes(`/cameras/${e.name}`)??!1,r=h.value?.includes(`/cameras/${e.name}`)??!1,i=t.viewTransition&&(n||r),a=`/cameras/${e.name}`;f?.isActive.value?t.routerLink=`${a}?startTs=${Math.floor(f.currentTimestamp.value/1e3)}`:t.routerLink=a,t.viewTransition=i}return t}),fe=z(()=>(W.height.value-16)*(16/9)),pe=z(()=>y.value.filter(e=>e.lastDroppedCamera).map(e=>e.lastDroppedCamera));function he(e){let t=y.value[e];if(u.value)return{x:0,y:t?.y??e,w:1,h:1};let n=wt[te.value]?.[e];return{x:t?.x??n?.x??0,y:t?.y??n?.y??0,w:t?.colSpan??n?.w??1,h:t?.rowSpan??n?.h??1}}function ge(){if(!V)return;let e=[];for(let t of V.getGridItems()){let n=t.gridstackNode;if(!n)continue;let r=parseInt(n.id),i=y.value[r];i?.lastDroppedCamera&&e.push({index:r,cameraId:i.lastDroppedCamera._id,colSpan:n.w,rowSpan:n.h,x:n.x,y:n.y})}c(`rearrange`,e)}function _e(){ge()}function ve(){if(!D.value)return;let e=St[te.value];if(!e)return;let t=u.value,n=t?1:e.cols,r=t?y.value.length:e.rows,i=S.value?.clientWidth??0,a=t?i*9/16:i>0?i*9/16/e.rows:60,o=G.value===`rearrange`;V=qe.init({column:n,minRow:r,cellHeight:a,margin:o?3:1,float:!1,animate:!1,staticGrid:!o,resizable:t?{handles:``}:{handles:`se`},disableResize:t,alwaysShowResizeHandle:!t},D.value),V.on(`change`,_e),requestAnimationFrame(()=>V?.setAnimation(!0))}function ye(){V&&=(V.offAll(),V.destroy(!1),null)}function be(e,t,n){n?M.value=t:(B.value=t,M.value=void 0,setTimeout(()=>{B.value=void 0},250)),c(`expand`,e,n)}async function Ce(){await le()}function we(e){for(let t of O.value||[])t.togglePlayerMute(e)}async function Te(e,t){await Promise.allSettled((O.value||[]).map(n=>n.toggleMicrophone(e,t)))}function Ee(e){for(let t of O.value||[])t.togglePlayerActivityMode(e)}async function q(e){await Promise.allSettled((O.value||[]).map(t=>t.togglePlayerSourceRole(e)))}async function De(e){await Promise.allSettled((O.value||[]).map(t=>t.togglePlayerStreamingMode(e)))}function Oe(e){for(let t of O.value||[])t.togglePlayerBbox(e)}function ke(e){for(let t of O.value||[])t.togglePip(e)}function Ae(){V&&(V.compact(),ge())}function J(){if(!V)return;let e=St[te.value];if(!e)return;let t=e.cols,n=[];for(let e of V.getGridItems()){let t=e.gridstackNode;if(!t)continue;let r=parseInt(t.id),[i,a]=((y.value[r]?.lastDroppedCamera)?.interfaceSettings?.aspectRatio||`16:9`).split(`:`).map(Number);n.push({idx:r,el:e,cellRatio:i/a*(9/16)})}if(!n.length)return;let r=e.rows;function i(e){let r=[],i=0,a=0;for(;a<n.length;){let o=[],s=0,c=!1;for(;a<n.length;){let r=n[a].cellRatio;if(e*(s+r)>t&&o.length>0){c=!0;break}o.push(n[a]),s+=r,a++}let l=c?t/s:e;r.push({row:o,ratioSum:s,rowH:l,filled:c}),i+=l}return{rows:r,totalH:i}}let a=.25,o=r,s=a;for(let e=0;e<40;e++){let e=(a+o)/2;i(e).totalH<=r?(s=e,a=e):o=e}let{rows:c}=i(s),l=c.reduce((e,t)=>e+t.rowH,0)||1,u=l>r?r/l:1,d=c.map(e=>e.rowH*u),f=d.reduce((e,t)=>e+t,0),p=new Map,m=Math.max(0,Math.round((r-f)/2)),h=m;for(let e=0;e<c.length;e++){h+=d[e];let n=Math.min(r,Math.round(h)),i=Math.max(1,n-m),{row:a,ratioSum:o,filled:s}=c[e];if(s){let e=0;for(let n=0;n<a.length;n++){let r=n===a.length-1?Math.max(1,t-e):Math.max(1,Math.round(a[n].cellRatio/o*t));p.set(a[n].idx,{x:e,y:m,w:r,h:i}),e+=r}}else{let e=a.map(e=>Math.max(1,Math.round(e.cellRatio*i))),n=e.reduce((e,t)=>e+t,0),r=Math.max(0,Math.round((t-n)/2));for(let t=0;t<a.length;t++)p.set(a[t].idx,{x:r,y:m,w:e[t],h:i}),r+=e[t]}m=n}V.batchUpdate();for(let[e,t]of p){let r=n.find(t=>t.idx===e);r&&V.update(r.el,t)}V.batchUpdate(!1),ge()}return m([te,()=>y.value.length,u],()=>{ye(),N(()=>ve())},{immediate:!1}),m(G,e=>{if(!V)return;let t=e===`rearrange`;V.setStatic(!t),V.margin(t?3:1)}),m(()=>ue.width.value,e=>{if(!(!V||e<=0)){if(V.setAnimation(!1),u.value)V.cellHeight(e*9/16);else{let t=St[te.value]?.rows??1;V.cellHeight(e*9/16/t)}requestAnimationFrame(()=>V?.setAnimation(!0))}}),ne(()=>{N(()=>ve())}),x(()=>{ye()}),i({toggleFullscreen:Ce,toggleAllPlayerMute:we,toggleAllPlayerMicrophone:Te,toggleAllPlayerActivityMode:Ee,toggleAllPlayerSourceRole:q,toggleAllPlayerStreamingMode:De,toggleAllPlayerBbox:Oe,toggleAllPip:ke,compactGrid:Ae,fitAspectRatios:J,isFullscreen:se}),(e,r)=>{let i=me,a=t,o=Pt,s=kt;return U(),j(C(Y),{backend:C(l)?C(Me):C(Z)},{default:I(()=>[A(`div`,Ft,[A(`div`,{ref_key:`viewRef`,ref:re,class:g([`view-container w-full flex flex-col min-w-0 overflow-y-auto items-center`,{"px-2":C(ee)&&C(d)}])},[C(se)?(U(),j(a,{key:0,severity:`secondary`,rounded:``,class:`cui-fs-exit`,"aria-label":e.$t(`components.form.tooltip.fullscreen_off`),onClick:C(le)},{icon:I(()=>[H(i,{class:`w-5 h-5`})]),_:1},8,[`aria-label`,`onClick`])):L(``,!0),C(K)===void 0?L(``,!0):(U(),P(`div`,{key:1,class:`w-full aspect-video relative my-auto`,style:w({maxWidth:`${C(fe)}px`})},[H(o,{ref:`fsCardRef`,class:g([`w-full h-full`,{"card-expanded":C(M)!==void 0,"card-collapsing":C(B)!==void 0}]),camera:C(y)[C(K)]?.lastDroppedCamera,cameras:n.cameras,"dropped-cameras":C(pe),mode:`normal`,index:C(K),"camera-card-props":{...C(de)(C(y)[C(K)]?.lastDroppedCamera),expanded:!0},"camera-card-models":n.cameraCardModels,onExpand:r[0]||=(e,t)=>be(e,C(K),t)},null,8,[`class`,`camera`,`cameras`,`dropped-cameras`,`index`,`camera-card-props`,`camera-card-models`])],4)),R(A(`div`,{ref_key:`wrapperRef`,ref:S,class:g([`w-full relative my-auto`,C(u)?`h-auto`:`aspect-video`]),style:w(C(u)?void 0:{maxWidth:`${C(fe)}px`})},[A(`div`,{ref_key:`gridRef`,ref:D,class:`grid-stack w-full h-full`},[(U(!0),P(ie,null,T(C(y),(e,t)=>(U(),P(`div`,{key:t,class:`grid-stack-item`,"gs-id":String(t),"gs-x":he(t).x,"gs-y":he(t).y,"gs-w":he(t).w,"gs-h":he(t).h},[A(`div`,Lt,[H(o,{ref_for:!0,ref_key:`cardRefs`,ref:O,camera:e.lastDroppedCamera,cameras:n.cameras,"dropped-cameras":C(pe),mode:C(G),index:t,"camera-card-props":{...C(de)(e.lastDroppedCamera),expanded:C(K)===t},"camera-card-models":n.cameraCardModels,"on-drop":e=>c(`drop`,t,e),onExpand:(e,n)=>be(e,t,n),onDrop:e=>c(`drop`,t,e),onRemove:r[1]||=e=>c(`remove`,e)},null,8,[`camera`,`cameras`,`dropped-cameras`,`mode`,`index`,`camera-card-props`,`camera-card-models`,`on-drop`,`onExpand`,`onDrop`])])],8,It))),128))],512)],6),[[ae,C(K)===void 0]])],2),C(ee)&&C(d)?(U(),j(s,{key:0,cameras:n.cameras,"dropped-cameras":C(pe),title:n.title,class:`view-box shadow-xl`,style:w({"margin-right":C(ee)?`0px`:`-${C(400)}px`}),onChangeViewSize:r[2]||=e=>c(`changeViewSize`)},null,8,[`cameras`,`dropped-cameras`,`title`,`style`])):L(``,!0)])]),_:1},8,[`backend`])}}}),[[`__scopeId`,`data-v-dab436e9`]]),zt={class:`flex flex-col gap-3`},Bt={class:`text-wrap`},Vt={class:`w-full h-full flex items-center justify-center relative`},Ht=V({__name:`AudioVisualizer`,emits:[`listening`],setup(e,{expose:n,emit:r}){let i=r,a=l(),o=d(),s=_(`dialogRefProps`),c=E(`canvasRef`),u=D(),f=D(),p=F(!1),m=z(()=>!!s.loading?.value);async function h(){if(p.value)g();else try{u.value&&g();let e;try{e=await navigator.mediaDevices.getUserMedia({audio:!0})}catch(e){o.add({severity:`warn`,detail:`Can not enable AudioVisualizer, see console.`,life:3e3}),a.warn(`Can not enable AudioVisualizer`,e);return}p.value=!0,i(`listening`,!0),u.value=new AudioContext;let t=u.value.createAnalyser();t.fftSize=1024,f.value=e.getTracks(),u.value.createMediaStreamSource(e).connect(t);let n,r=c.value?.getContext(`2d`),s=()=>{if(c.value&&r){let e=[],i=[];r.clearRect(0,0,c.value.width,c.value.height),requestAnimationFrame(s);let a=t.frequencyBinCount,o=new Uint8Array(a);t.getByteFrequencyData(o),e.push(o);for(let t=0;t<e[0].length;t++)i.push(0),e.forEach(e=>{i[t]+=e[t]});let l=c.value.width/2,u=c.value.height/2;r.beginPath(),r.arc(l,u,30,0,2*Math.PI),r.lineWidth=1,r.stroke(),r.closePath();for(let e=0;e<90;e++){n=i[e]*.4;let t=Math.PI*2/90;ee(r,l+Math.cos(t*e)*30,u+Math.sin(t*e)*30,l+Math.cos(t*e)*(30+n),u+Math.sin(t*e)*(30+n),3)}p.value||r.clearRect(0,0,c.value.width,c.value.height)}};s()}catch(e){g(),a.error(e)}}function ee(e,t,n,r,i,a){let o=e.createLinearGradient(t,n,r,i);o.addColorStop(0,`#5b040f`),o.addColorStop(.5,`#b50b21`),o.addColorStop(.9,`#df2a4c`),o.addColorStop(1,`#df6380`),e.lineWidth=a,e.strokeStyle=o,e.beginPath(),e.moveTo(t,n),e.lineTo(r,i),e.stroke(),e.closePath()}function g(){u.value?.close(),u.value=void 0,f.value?.forEach(e=>e.stop()),f.value=void 0,p.value=!1,i(`listening`,!1)}return S(()=>{g()}),n({isLoading:m}),(e,n)=>{let r=Ve,i=t;return U(),P(`div`,zt,[A(`span`,Bt,v(e.$t(`components.dialog.message.intercom_info`)),1),A(`div`,Vt,[H(i,{rounded:``,class:`w-[60px] h-[60px] absolute z-1`,onClick:h},{icon:I(()=>[H(r,{width:`100%`,height:`100%`})]),_:1}),A(`canvas`,{ref_key:`canvasRef`,ref:c,height:`300`,width:`300`},null,512)])])}}}),Ut=[`fill`],Wt=V({__name:`CuiCameraGridIcon1`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm0 8h952v532H9V9Z`},null,-1)]],8,Ut))}}),Gt=[`fill`],Kt=V({__name:`CuiCameraGridIcon10`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm726 275h226v130H735V276Zm-242 0h234v130H493V276Zm0 265V414h234v127H493ZM9 541V276h476v265H9Zm726 0V414h226v127H735ZM961 9v121H735V9h226ZM735 138h226v130H735V138ZM727 9v121H493V9h234ZM493 138h234v130H493V138ZM485 9v259H9V9h476Z`},null,-1)]],8,Gt))}}),qt=[`fill`],Jt=V({__name:`CuiCameraGridIcon12`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm952 275v129H810.5V276H961Zm-158.5 0v129h-152V276h152Zm-152 265V413h152v128h-152Zm-8-265v129H493V276h149.5ZM493 541V413h149.5v128H493ZM9 276h476v265H9V276Zm801.5 265V413H961v128H810.5ZM961 9v259H493V9h468ZM9 268V9h476v259H9Z`},null,-1)]],8,qt))}}),Yt=[`fill`],Xt=V({__name:`CuiCameraGridIcon13`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M250 549.5h.5v-.5H961a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h233.5v.5h7.5Zm.5-273.5H485v129.5H250.5V276Zm-8 0v129.5H9V276h233.5ZM961 9v121H735V9h226ZM727 9v121H493V9h234ZM493 138h234v130H493V138ZM485 9v259H9V9h476Zm250 129h226v130H735V138Zm0 267.5V276h226v129.5H735ZM493 276h234v129.5H493V276Zm0 265V413.5h234V541H493Zm-242.5 0V413.5H485V541H250.5ZM9 541V413.5h233.5V541H9Zm726 0V413.5h226V541H735Z`},null,-1)]],8,Yt))}}),Zt=[`fill`],Qt=V({__name:`CuiCameraGridIcon15`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M250 549.5h.5v-.5H961a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h233.5v.5h7.5Zm.5-144V276H485v129.5H250.5Zm-8-129.5v129.5H9V276h233.5Zm570 90H961v82H812.5v-82Zm-160 0h152v82h-152v-82ZM961 276v82H812.5v-82H961Zm-308.5 0h152v82h-152v-82Zm0 180h152v85h-152v-85ZM961 541H812.5v-85H961v85Zm-316.5-93H493v-82h151.5v82Zm0-172v82H493v-82h151.5Zm0 180v85H493v-85h151.5ZM485 413.5V541H250.5V413.5H485Zm-242.5 0V541H9V413.5h233.5ZM961 9v259H493V9h468ZM9 9h476v259H9V9Z`},null,-1)]],8,Zt))}}),$t=[`fill`],en=V({__name:`CuiCameraGridIcon16`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm952 8v121.5H732.5V9H961ZM724.5 9v121.5H493V9h231.5ZM493 268V138.5h231.5V268H493Zm0 137.5V276h231.5v129.5H493Zm468 0H732.5V276H961v129.5ZM493 541V413.5h231.5V541H493Zm468 0H732.5V413.5H961V541Zm0-273H732.5V138.5H961V268ZM485 9v121.5H250.5V9H485ZM250.5 138.5H485V268H250.5V138.5ZM242.5 9v121.5H9V9h233.5ZM9 138.5h233.5V268H9V138.5ZM250.5 276H485v129.5H250.5V276Zm0 137.5H485V541H250.5V413.5Zm-8-137.5v129.5H9V276h233.5ZM9 541V413.5h233.5V541H9Z`},null,-1)]],8,$t))}}),tn=[`fill`],nn=V({__name:`CuiCameraGridIcon20`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm952 94v82H812.5V95H961Zm-156.5 82h-152V95h152v82ZM961 9v78H812.5V9H961ZM652.5 9h152v78h-152V9Zm0 176h152v83h-152v-83ZM961 268H812.5v-83H961v83Zm-308.5 8h152v82h-152v-82Zm160 0H961v82H812.5v-82Zm-168-181v82H493V95h151.5Zm0-86v78H493V9h151.5ZM493 268v-83h151.5v83H493Zm0 90v-82h151.5v82H493ZM9 9h476v259H9V9Zm952 357v82H812.5v-82H961Zm-156.5 0v82h-152v-82h152Zm-152 90h152v85h-152v-85ZM961 541H812.5v-85H961v85ZM644.5 366v82H493v-82h151.5ZM493 541v-85h151.5v85H493ZM9 276h476v265H9V276Z`},null,-1)]],8,tn))}}),rn=[`fill`],an=V({__name:`CuiCameraGridIcon26`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{"fill-rule":`evenodd`,d:`M1.5 9A7.5 7.5 0 0 1 9 1.5h952a7.5 7.5 0 0 1 7.5 7.5v532a7.5 7.5 0 0 1-7.5 7.5H9a7.5 7.5 0 0 1-7.5-7.5V9Zm960 168V94h-153v83h153Zm-160 0h-153V94h153v83Zm7-90h153V9a.5.5 0 0 0-.5-.5H808.5V87Zm-7-78.5V87h-153V8.5h153Zm0 175.5v84.5h-153V184h153Zm7 84.5V184h153v84.5h-153Zm-167-91.5V94h-149v83h149Zm0-90V8.5h-149V87h149Zm-149 97h149v84.5h-149V184Zm0 91.5H719V402H492.5V275.5Zm0 133.5v132.5H719V409H492.5Zm233.5 0v132.5h235a.5.5 0 0 0 .5-.5V409H726Zm235.5-7V275.5H726V402h235.5Zm-476-270V8.5H252V132h233.5ZM245 139H8.5v129.5H245V139Zm0-7V8.5H9a.5.5 0 0 0-.5.5v123H245Zm240.5 136.5V139H252v129.5h233.5Zm-477 7h157v81H8.5v-81Zm164 81v-81h153v81h-153Zm153 7h-153v83h153v-83Zm7 83v-83h153v83h-153Zm-7 7h-153v88h153v-88Zm7 88v-88h153v88h-153Zm0-185v-81h153v81h-153Zm-324 7h157v83H8.5v-83Zm0 90h157v88H9a.5.5 0 0 1-.5-.5v-87.5Z`},null,-1)]],8,rn))}}),on=[`fill`],sn=V({__name:`CuiCameraGridIcon4`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm952 8v259H493V9h468ZM493 541V276h468v265H493ZM485 9v259H9V9h476ZM9 541V276h476v265H9Z`},null,-1)]],8,on))}}),cn=[`fill`],ln=V({__name:`CuiCameraGridIcon6`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm641.5 187.5H961v171H650.5v-171ZM961 9v171.5H650.5V9H961ZM642.5 9v350.5H9V9h633.5ZM9 541V367.5h315.5V541H9Zm323.5-173.5h310V541h-310V367.5Zm318 0H961V541H650.5V367.5Z`},null,-1)]],8,cn))}}),un=[`fill`],dn=V({__name:`CuiCameraGridIcon7`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm725.5 275H961v130H734.5V276Zm0 265V414H961v127H734.5Zm-8-265v130H493V276h233.5ZM493 541V414h233.5v127H493ZM9 276h476v265H9V276ZM961 9v259H493V9h468ZM9 268V9h476v259H9Z`},null,-1)]],8,un))}}),fn=[`fill`],pn=V({__name:`CuiCameraGridIcon9`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M969.5 359v-.5h-.5V9a8 8 0 0 0-8-8H9a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V366.5h.5V359ZM961 187v171.5H651V187h310ZM651 541V366.5h310V541H651Zm-8-354v171.5H330V187h313ZM330 541V366.5h313V541H330Zm-8-354v171.5H9V187h313ZM9 541V366.5h313V541H9ZM961 9v170H651V9h310ZM643 9v170H330V9h313ZM322 9v170H9V9h313Z`},null,-1)]],8,fn))}}),mn={for:`name`,class:`cui-label`},hn={key:0,class:`flex flex-col gap-6 justify-center`},gn={key:0,class:`text-red-500 text-center mb-5`},_n={class:`md:max-h-[350px] overflow-y-auto`},vn={class:`block cui-label mb-3`},yn={key:1,class:`flex flex-col gap-6 justify-center`},bn={key:0,class:`text-red-500 text-center mb-5`},xn={class:`md:max-h-[450px] overflow-y-auto`},Sn={class:`block cui-label mb-3`},Cn={class:`view-select-container`},wn=[`onClick`],Tn=ve(V({__name:`CamviewForm`,props:{form:{},type:{},cameras:{},views:{}},setup(e,{expose:t}){let n=new u,r=e,i=l(),a=d(),{t:o}=s(),b=_(`dialogRefProps`),{user:x}=ce(p()),{mutateAsync:S,isPending:w}=n.createViewQuery(),{mutateAsync:D,isPending:O}=n.patchViewQuery(),{form:M,type:N,cameras:ae,views:R}=k(r),B=E(`formRef`),oe=F([1,4,6,7,9,10,12,13,15,16,20,26]),V=F(!0),le=F(!0),W=F([]),ue=F(!!M.value),G=F(M.value?f(M.value):{});!ue.value&&N.value===`view`&&(G.value.viewSize=oe.value[0]);let K=z(()=>!!(b.loading?.value||w.value||O.value));function de(e){let t=W.value.findIndex(t=>t.name===e.name);t===-1?W.value.push(e):W.value.splice(t,1)}function fe(e){switch(e){case 1:return Wt;case 4:return sn;case 6:return ln;case 7:return dn;case 9:return pn;case 10:return Kt;case 12:return Jt;case 13:return Xt;case 15:return Qt;case 16:return en;case 20:return nn;case 26:return an;default:return Wt}}async function pe(){if(!B.value||!x.value)return;let e=R.value.find(e=>e.name===G.value.name);if(e&&!ue.value)return i.error(`View already exists`,e),a.add({severity:`error`,detail:o(`components.toast.validation_failed`),life:3e3}),null;if(N.value===`dnd`){if(le.value)return i.error(`No cameras selected`),a.add({severity:`error`,detail:o(`components.toast.validation_failed`),life:3e3}),null;let e=W.value.map((e,t)=>({cameraId:e._id,index:t}));G.value.cameras=e,G.value.type=`dnd`,G.value.viewSize=1,B.value.setFieldValue(`type`,`dnd`),B.value.setFieldValue(`viewSize`,1),B.value.setFieldValue(`cameras`,e);let t=await B.value.validate();return t?.valid?ue.value?await D({username:x.value.username,viewid:G.value._id,viewData:G.value}):await S({username:x.value.username,viewData:G.value}):(i.error(`Validation failed`,t),a.add({severity:`error`,detail:o(`components.toast.validation_failed`),life:3e3}),null)}else{if(V.value)return i.error(`No view selected`),a.add({severity:`error`,detail:o(`components.toast.validation_failed`),life:3e3}),null;G.value.cameras=[],G.value.type=`view`,B.value.setFieldValue(`type`,`view`),B.value.setFieldValue(`cameras`,[]);let e=await B.value.validate();return e?.valid?f(G.value):(i.error(`Validation failed`,e),a.add({severity:`error`,detail:o(`components.toast.validation_failed`),life:3e3}),null)}}return m(G,e=>{for(let[t,n]of Object.entries(e))B.value?.setFieldValue(t,n);e.viewSize&&(V.value=!1),e.cameras?.length&&(le.value=!1)},{deep:!0,immediate:!0}),m(W,e=>{le.value=e.length===0},{deep:!0}),ne(()=>{W.value=ae.value?.filter(e=>G.value?.cameras?.some(t=>t.cameraId===e._id))||[]}),t({isLoading:K,onConfirm:pe}),(e,t)=>{let n=c,r=q,i=De,a=Ee,o=Ne;return U(),j(C(se),{ref_key:`formRef`,ref:B,class:`flex flex-col gap-6`,"validation-schema":C(Le),"initial-values":C(G)},{default:I(()=>[H(C(re),{modelValue:C(G).name,"onUpdate:modelValue":t[0]||=e=>C(G).name=e,modelModifiers:{trim:!0},name:`name`,as:`div`,class:`flex flex-col field-gap`},{default:I(({field:t,errors:i})=>[A(`label`,mn,v(e.$t(`components.form.label.name`)),1),H(r,null,{default:I(()=>[H(n,ee(t,{invalid:i.length>0,loading:C(K),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),H(h,{name:`fade`},{default:I(()=>[H(C(y),{name:`name`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),H(i,{class:`m-0 py-3`}),C(N)===`dnd`?(U(),P(`div`,hn,[H(h,{name:`fade`},{default:I(()=>[C(le)?(U(),P(`span`,gn,v(e.$t(`components.form.error.no_cameras_selected`)),1)):L(``,!0)]),_:1}),A(`div`,_n,[A(`label`,vn,v(e.$t(`components.form.label.cameras`)),1),(U(!0),P(ie,null,T(C(ae),(e,t)=>(U(),P(`div`,{key:t,class:`cui-list-item`},[H(o,{class:`h-14`,active:C(W).some(t=>t.name===e.name),onClick:t=>de(e)},{append:I(()=>[H(a,{"model-value":C(W).some(t=>t.name===e.name),"onUpdate:modelValue":t=>de(e)},null,8,[`model-value`,`onUpdate:modelValue`])]),default:I(()=>[A(`span`,null,v(e.name),1)]),_:2},1032,[`active`,`onClick`])]))),128))])])):(U(),P(`div`,yn,[H(h,{name:`fade`},{default:I(()=>[C(V)?(U(),P(`span`,bn,v(e.$t(`components.form.error.no_view_selected`)),1)):L(``,!0)]),_:1}),A(`div`,xn,[A(`label`,Sn,v(e.$t(`components.form.label.views`)),1),A(`div`,Cn,[(U(!0),P(ie,null,T(C(oe),t=>(U(),P(`div`,{key:t,class:`view-select-item w-full`,onClick:e=>C(G).viewSize=t},[A(`div`,{class:g([`view-select-item-icon w-full p-3`,{"selected-view":C(G).viewSize===t}])},[(U(),j(te(fe(t)),{style:{width:`100%`,height:`100%`}}))],2),A(`span`,{class:g([`view-select-item-label text-muted mt-3 px-2 py-1 cui-rounded-corners`,{"selected-view-label":C(G).viewSize===t}])},v(t)+` `+v(e.$t(`views.camview.cameras`)),3)],8,wn))),128))])])]))]),_:1},8,[`validation-schema`,`initial-values`])}}}),[[`__scopeId`,`data-v-641aac54`]]),En={class:`h-full w-full dark-mode relative`},Dn={key:0,class:`flex flex-col w-full h-full items-center justify-center`},On={key:1,class:`flex flex-col w-full h-full`},kn={class:`flex flex-1 min-h-0 flex-col items-center justify-center w-full gap-4`},An={class:`text-muted text-sm`},jn={class:`relative w-6 h-6`},Mn=ve(V({__name:`Camview`,props:{navbarWidth:{default:0},navbarLeft:{default:0}},setup(e){let r=new u,a=new Fe,c=e,l=s(),{t:d}=l,_=Oe(),y=Ie(),{bottombarHeight:ne}=be(),{smBreakpoint:b,lgBreakpoint:x,mdBreakpoint:re}=Se(),{user:S}=ce(p()),{uiSettings:T}=ce(Ce()),{data:D,isLoading:O}=a.getCamerasQuery({page:1,pageSize:-1}),{data:N,isLoading:ie}=r.getViewsQuery(S.value?.username??``,{page:1,pageSize:-1}),{mutate:ae,isPending:B}=r.removeViewQuery(),{mutateAsync:oe,isPending:V}=r.createViewQuery(),{mutateAsync:se,isPending:ve}=r.patchViewQuery(),{navbarWidth:ye,navbarLeft:xe}=k(c),we=E(`menuRef`),Ee=E(`newViewMenuRef`),q=E(`viewDndRef`),J=F({}),Y=F(!1),X=F(!1),Z=F(!1),je=F(!1),Me=F(!1),Ne=F(!1),Le=F(!0),Re=F(`always-on`),Ve=F(`low-resolution`),We=F(`webrtc`),qe=F([]),Je=F({}),Ye=M({sourceRole:Ve.value,activityMode:Re.value,streamingMode:We.value}),Ze=z(()=>O.value||ie.value||B.value||V.value||ve.value),Qe=z(()=>ye.value+xe.value),et=z(()=>({locale:l.locale.value,dayNames:_.config.locale?.dayNames,dayNamesShort:_.config.locale?.dayNamesShort,monthNames:_.config.locale?.monthNames,monthNamesShort:_.config.locale?.monthNamesShort})),tt=z(()=>({doubleClickZoom:!1,flatCard:!0,cameraNameOverlay:!0,control:!0,toolbar:!1,expandableCard:($.value?.cameras?.length??0)>1,detectionIndicatorOverlay:!0,boundingBoxOverlay:!1,cardClickAction:`expand`,viewTransition:!0,cardProps:{pt:{root:{style:`background: #000`}}}})),rt=z(()=>N.value?.result.length?x.value?{width:Me.value?`calc(100% - 400px)`:`100%`,height:`100%`,overflowY:`scroll`}:{height:`100%`,paddingBottom:Me.value?ne.value>0?`200px`:`192px`:`0px`,overflowY:`scroll`}:{width:`100%`,height:`100%`,overflowY:`scroll`}),Q=z(()=>Y.value||X.value),at=z(()=>!!q.value?.isFullscreen),ot=z(()=>[{label:at.value?d(`components.form.tooltip.fullscreen_off`):d(`components.form.tooltip.fullscreen_on`),icon:at.value?me:_e,command:Dt},{label:Le.value?d(`components.form.tooltip.unmute`):d(`components.form.tooltip.mute`),icon:Le.value?lt:st,command:Ot},{label:d(`components.form.tooltip.intercom`),icon:pe,command:()=>_t(`intercom`)},{label:We.value===`auto`?`${d(`components.form.tooltip.mode`)}: ${d(`components.form.tooltip.streaming_mode_auto`)}`:We.value===`webrtc`?`${d(`components.form.tooltip.mode`)}: ${d(`components.form.tooltip.streaming_mode_webrtc`)}`:`${d(`components.form.tooltip.mode`)}: ${d(`components.form.tooltip.streaming_mode_mse`)}`,icon:We.value===`auto`?ft:We.value===`webrtc`?le:ge,command:()=>jt()},{label:Re.value===`always-on`?d(`components.form.tooltip.activity_mode_always_on`):Re.value===`standby`?d(`components.form.tooltip.activity_mode_standby`):d(`components.form.tooltip.activity_mode_activity`),icon:Re.value===`always-on`?he:Re.value===`standby`?G:it,command:()=>kt()},{label:Ve.value===`low-resolution`?`${d(`components.form.tooltip.resolution`)}: ${d(`components.form.tooltip.source_role_low`)}`:Ve.value===`mid-resolution`?`${d(`components.form.tooltip.resolution`)}: ${d(`components.form.tooltip.source_role_mid`)}`:`${d(`components.form.tooltip.resolution`)}: ${d(`components.form.tooltip.source_role_high`)}`,icon:Ve.value===`low-resolution`?ue:Ve.value===`mid-resolution`?W:de,command:()=>At()}]),$=z(()=>{let e=N.value?.result.find(e=>e._id===T.value.camview.viewid)||N.value?.result[0];return e?(J.value=e,T.value.camview.viewid=e._id):J.value={},e}),ct=z(()=>$.value?.cameras?.map(e=>e.cameraId)??[]),{master:ut}=n(ct,{sourceRole:`low`}),dt=z(()=>ut.mode.value!==`idle`&&ut.currentTimestamp.value>0?Math.floor(ut.currentTimestamp.value/1e3):void 0),pt=z(()=>Q.value&&J.value.viewSize>0?J.value.viewSize:$.value?$.value.viewSize:1),mt=z(()=>{let e=[];for(let t of N.value?.result||[])e.push({label:t.name,active:t._id===$.value?._id,onClick:()=>vt(t)});return e}),gt=z(()=>[{label:d(`views.camview.new_view`),icon:ht,onClick:()=>_t(`newView`)}]);function _t(e){switch(e){case`newView`:case`editView`:{let t=e===`editView`,n=d(t?`components.dialog.title.edit_view`:`components.dialog.title.new_view`);t?Y.value=!0:X.value=!0,y.openComponentDialog(Tn,{data:{title:n,loading:Ze,confirmText:d(`components.form.button.next`),contentProps:{form:t?J.value:void 0,type:`view`,cameras:D.value?.result||[],views:N.value?.result||[]}},onConfirm:e=>{e&&(J.value=e)},onCancel:()=>{X.value=!1}});break}case`intercom`:y.openComponentDialog(Ht,{data:{title:d(`components.dialog.title.intercom`),hideConfirmButton:!0,loading:Ze,contentProps:{}},events:{listening:Mt}});break;case`removeView`:y.openTextDialog({data:{title:d(`components.dialog.title.confirm`),confirmText:d(`components.form.button.remove`),contentText:d(`components.dialog.message.confirm_remove_layout`),confirmButtonProps:{severity:`danger`}},onConfirm:yt});break}}function vt(e){T.value.camview.viewid=e._id}function yt(){!$.value||!S.value||ae({username:S.value.username,viewid:$.value._id},{onSuccess:e=>{e.length?T.value.camview.viewid=e[0]._id:T.value.camview.viewid=void 0}})}async function bt(){if(!S.value||Object.keys(J.value).length===0)return;let e=qe.value.filter(e=>e.lastDroppedCamera).map(e=>({cameraId:e.lastDroppedCamera._id,index:e.index,colSpan:e.colSpan,rowSpan:e.rowSpan})).sort((e,t)=>e.index-t.index);if(!e.length)return;let t=f(J.value);t.cameras=e,t._id?Et(await se({username:S.value.username,viewid:t._id,viewData:t})):Et(await oe({username:S.value.username,viewData:t}))}function xt(e,t){qe.value[e].lastDroppedCamera=t}function St(e){qe.value=qe.value.map(t=>(t.lastDroppedCamera?.name===e.name&&(t.lastDroppedCamera=void 0),t))}function Ct(e){return`${b.value?`mobile`:`desktop`}:${e}`}function wt(e){let t=$.value?._id;t&&(T.value.camview.layouts||(T.value.camview.layouts={}),T.value.camview.layouts[Ct(t)]=e.map(e=>({index:e.index,cameraId:e.cameraId,x:e.x??0,y:e.y??0,w:e.colSpan??1,h:e.rowSpan??1})))}function Tt(e,t){Je.value[e._id]=t}function Et(e){T.value.camview.viewid=e._id,X.value=!1,Y.value=!1}function Dt(){q.value?.toggleFullscreen()}function Ot(){Le.value=!Le.value,q.value?.toggleAllPlayerMute(Le.value)}function kt(e){let t=Re.value;t=e||(t===`always-on`?`standby`:t===`standby`?`activity`:`always-on`),q.value?.toggleAllPlayerActivityMode(t),Re.value=t}async function At(e){let t=Ve.value;t=e||(t===`low-resolution`?`mid-resolution`:t===`mid-resolution`?`high-resolution`:`low-resolution`),await q.value?.toggleAllPlayerSourceRole(t),Ve.value=t}async function jt(e){let t=We.value;t===`auto`&&(t=`webrtc`);let n=e||(t===`mse`?`webrtc`:`mse`);await q.value?.toggleAllPlayerStreamingMode(n),We.value=n}async function Mt(e){await q.value?.toggleAllPlayerMicrophone(e)}return m(je,e=>{e&&(Ne.value=!0)}),m([pt,$,D,Q,T,b],()=>{let e=Array.from({length:pt.value}).map((e,t)=>({accept:`camera`,index:t,lastDroppedCamera:void 0}));if(!X.value){let t=$.value?._id,n=t?Ct(t):void 0,r=n?T.value.camview.layouts?.[n]:void 0,i=new Set(D.value?.result.map(e=>e._id)??[]),a=!1;for(let t of $.value?.cameras||[]){if(!e[t.index])continue;let n=D.value?.result.find(e=>e._id===t.cameraId);e[t.index].lastDroppedCamera=n;let o=r?.find(e=>e.index===t.index);o&&(!o.cameraId||i.has(o.cameraId)?(e[t.index].x=o.x,e[t.index].y=o.y,e[t.index].colSpan=o.w,e[t.index].rowSpan=o.h):a=!0)}a&&n&&T.value.camview.layouts?.[n]&&(T.value.camview.layouts[n]=T.value.camview.layouts[n].filter(e=>!e.cameraId||i.has(e.cameraId)))}qe.value=e},{deep:!0,immediate:!0}),(e,n)=>{let r=Ke,a=nt,s=ze,c=$e,l=Xe,u=K,d=fe,f=De,p=Ue,m=Be,_=He,y=Ge,S=o,E=Ae,O=t,k=ke,M=Pe,F=Te;return U(),P(`div`,En,[H(y,{"left-offset":C(Qe),animate:``},{left:I(()=>[!C(X)&&C($)?(U(),j(r,{key:0,type:`dropdown`,label:C($).name,"menu-open":C(we)?.isOpen,disabled:C(Ze)||C(Y),onClick:n[0]||=e=>C(we)?.toggleMenu(e)},null,8,[`label`,`menu-open`,`disabled`])):C(X)&&C(J).name?(U(),j(r,{key:1,label:C(J).name,disabled:C(Ze)},null,8,[`label`,`disabled`])):L(``,!0)]),right:I(()=>[!C(Q)&&C($)?R((U(),j(r,{key:0,active:C(Z),onClick:n[1]||=e=>Z.value=!C(Z)},{icon:I(()=>[C(Z)?(U(),j(s,{key:1,width:`100%`,height:`100%`})):(U(),j(a,{key:0,width:`100%`,height:`100%`}))]),_:1},8,[`active`])),[[F,{value:C(Z)?e.$t(`views.camview.rearrange_done`):e.$t(`views.camview.rearrange`)},void 0,{bottom:!0}]]):L(``,!0),!C(Q)&&C($)&&C(Z)&&!C(b)?R((U(),j(r,{key:1,onClick:n[2]||=e=>C(q)?.fitAspectRatios()},{icon:I(()=>[H(c,{width:`100%`,height:`100%`})]),_:1})),[[F,{value:e.$t(`views.camview.rearrange_fit_aspect`)},void 0,{bottom:!0}]]):L(``,!0),!C(Q)&&C($)&&C(Z)&&!C(b)?R((U(),j(r,{key:2,onClick:n[3]||=e=>C(q)?.compactGrid()},{icon:I(()=>[H(l,{width:`100%`,height:`100%`})]),_:1})),[[F,{value:e.$t(`views.camview.rearrange_auto`)},void 0,{bottom:!0}]]):L(``,!0),!C(Q)&&C($)?R((U(),j(r,{key:3,active:C(je),onClick:n[4]||=e=>je.value=!C(je)},{icon:I(()=>[C(je)?(U(),j(d,{key:1,width:`100%`,height:`100%`})):(U(),j(u,{key:0,width:`100%`,height:`100%`}))]),_:1},8,[`active`])),[[F,{value:C(je)?e.$t(`components.form.tooltip.hide_timeline`):e.$t(`components.form.tooltip.show_timeline`)},void 0,{bottom:!0}]]):L(``,!0),!C(Q)&&C($)?(U(),j(f,{key:4,layout:`vertical`})):L(``,!0),!C(Q)&&C($)?R((U(),j(r,{key:5,disabled:C(Z),onClick:n[5]||=e=>_t(`removeView`)},{icon:I(()=>[H(p,{width:`100%`,height:`100%`})]),_:1},8,[`disabled`])),[[F,{value:e.$t(`components.form.tooltip.delete`)},void 0,{bottom:!0}]]):L(``,!0),!C(Y)&&!C(X)&&C($)?R((U(),j(r,{key:6,disabled:C(Z),onClick:n[6]||=e=>Y.value=!0},{icon:I(()=>[H(m,{width:`100%`,height:`100%`})]),_:1},8,[`disabled`])),[[F,{value:e.$t(`components.form.tooltip.edit`)},void 0,{bottom:!0}]]):L(``,!0),!C(Y)&&!C(X)?R((U(),j(r,{key:7,disabled:C(Z),onClick:C(Ee)?.toggleMenu},{icon:I(()=>[H(_,{class:g([`transform transition-transform duration-300`,{"rotate-45":C(Ee)?.isOpen}]),width:`100%`,height:`100%`},null,8,[`class`])]),_:1},8,[`disabled`,`onClick`])),[[F,{value:e.$t(`components.form.tooltip.new`)},void 0,{bottom:!0}]]):L(``,!0),C(Y)||C(X)?(U(),j(r,{key:8,label:e.$t(`components.form.button.cancel`),onClick:n[7]||=e=>C(Y)?Y.value=!1:X.value=!1},null,8,[`label`])):L(``,!0),C(Y)||C(X)?(U(),j(r,{key:9,label:e.$t(`components.form.button.save`),disabled:C(qe).every(e=>e.lastDroppedCamera===void 0),primary:``,onClick:bt},null,8,[`label`,`disabled`])):L(``,!0)]),_:1},8,[`left-offset`]),A(`div`,{class:g([`w-full h-full flex relative`,{"flex-row":C(x),"flex-col":!C(x)}]),style:w({paddingTop:`${C(55)}px`})},[A(`div`,{class:g([`flex relative z-1 camview-content-transition`,{"h-full items-center justify-center":C(x)||!C(N)?.result.length,"w-full items-start justify-start":!C(x)&&C(N)?.result.length}]),style:w(C(rt))},[C(Ze)?(U(),P(`div`,Dn,[(U(),j(S,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`}))])):!C($)&&!C(X)?(U(),P(`div`,On,[A(`div`,kn,[H(E,{class:`w-12 h-12 text-muted`}),A(`span`,An,v(e.$t(`views.camview.no_views_configured`)),1)])])):C($)||C(X)?(U(),P(`div`,{key:2,class:g([`w-full h-full`,{"p-2 pb-0":!C(b)}])},[(U(),j(Rt,{ref_key:`viewDndRef`,ref:q,key:C(T).camview.viewid+(C(X)?`-new`:C(Y)?`-edit`:`-view`),cameras:C(D)?.result||[],"edit-mode":C(X)||C(Y),"rearrange-mode":C(Z),"view-size":C(X)?C(J).viewSize:C(pt),title:C(J).name,cards:C(qe),"camera-card-props":C(tt),"camera-card-models":C(Ye),onDrop:xt,onRemove:St,onChangeViewSize:n[8]||=e=>_t(`editView`),onExpand:Tt,onRearrange:wt},null,8,[`cameras`,`edit-mode`,`rearrange-mode`,`view-size`,`title`,`cards`,`camera-card-props`,`camera-card-models`]))],2)):L(``,!0)],6),H(h,{name:C(x)?`slide-left`:`slide-up`,onBeforeEnter:n[9]||=e=>Me.value=!0,onAfterEnter:n[10]||=e=>Ne.value=!1,onBeforeLeave:n[11]||=e=>Me.value=!1},{default:I(()=>[C(je)?(U(),j(C(i),{key:0,"camera-ids":C(ct),"initial-timestamp":C(dt),loading:C(Ne),type:C(x)?`vertical`:`horizontal`,"dark-mode":``,"md-breakpoint":C(re),class:g([`shrink-0 transition-[left] duration-200`,{"h-full w-[400px] pt-2 pr-2":C(x),"h-[200px] pt-2 px-2 pb-2 pb-safe-offset fixed right-safe-offset-0 z-10":!C(x),"p-0! pt-2! border-color":C(b)}]),"card-class":{"!shadow-xl":!0,"!rounded-none border-l-0! border-r-0!":C(b)},style:w(C(x)?void 0:{left:`${C(Qe)}px`,bottom:`calc(${C(ne)}px + env(safe-area-inset-bottom, 0px))`}),"locale-settings":C(et)},null,8,[`camera-ids`,`initial-timestamp`,`loading`,`type`,`md-breakpoint`,`class`,`card-class`,`style`,`locale-settings`])):L(``,!0)]),_:1},8,[`name`])],6),!C(Q)&&C($)?(U(),j(k,{key:0,model:C(ot),direction:`up`,"transition-delay":80,"tooltip-options":{position:`left`,event:void 0},class:`absolute right-2 z-11 dark-mode`,pt:{root:{style:`pointer-events: none`}},style:w({bottom:C(x)?`0`:`calc(${C(Me)?192:0}px + ${C(ne)>0?`0.5rem`:`0px`})`,right:C(x)?`calc(${C(Me)?400:0}px + 0.5rem)`:`0.5rem`,transition:`bottom 0.25s ease-out, right 0.25s ease-out`})},{button:I(({visible:e,toggleCallback:t})=>[H(O,{severity:`secondary`,class:g([`dark-mode opacity-40 hover:opacity-100 active:opacity-100 focus:opacity-100 transition pointer-events-auto`,{"opacity-100":e}]),rounded:``,loading:C(Ze),onClick:t},{icon:I(()=>[A(`div`,jn,[A(`div`,{class:g([`bg-white absolute top-0.5 left-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full transform transition-all duration-100 origin-center`,{"w-4 h-[2px] rotate-45 top-1/2 -translate-y-1/2 rounded-none":e}])},null,2),A(`div`,{class:g([`bg-white absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 rounded-full transition-all duration-100`,{"opacity-0 scale-0":e}])},null,2),A(`div`,{class:g([`bg-white absolute bottom-0.5 left-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full transform transition-all duration-100 origin-center`,{"w-4 h-[2px] -rotate-45 bottom-1/2 translate-y-1/2 rounded-none":e}])},null,2)])]),_:2},1032,[`class`,`loading`,`onClick`])]),item:I(({item:e,toggleCallback:t})=>[R((U(),j(O,ee({loading:C(Ze),severity:`secondary`},e.buttonProps,{rounded:``,onClick:t}),{icon:I(()=>[(U(),j(te(e.icon)))]),_:2},1040,[`loading`,`onClick`])),[[F,{value:e.label}]])]),_:1},8,[`model`,`style`])):L(``,!0),H(M,{ref_key:`menuRef`,ref:we,items:C(mt),class:`dark-mode`,popover:{pt:{content:{class:`p-0! rounded-xl! overflow-hidden!`}}}},null,8,[`items`]),H(M,{ref_key:`newViewMenuRef`,ref:Ee,items:C(gt),class:`dark-mode`,popover:{pt:{content:{class:`p-0! rounded-xl! overflow-hidden!`}}}},null,8,[`items`])])}}}),[[`__scopeId`,`data-v-6ee3e146`]]);export{Mn as default};
|
|
1
|
+
import{G as e,Hn as t,I as n,It as r,N as i,Si as a,Vn as o,fi as s,tt as c}from"./vendor-cameraui-DgSMexWY.js";import{A as l,S as u,T as d,a as f,m as p}from"./api-aSYFKxo6.js";import{$n as m,$t as h,An as ee,Cr as g,En as _,Er as v,Gn as te,L as y,Ln as ne,On as b,Pn as x,R as re,Rn as S,Sr as C,Tr as w,Vn as T,Zn as E,_r as D,an as O,br as k,dn as A,fn as j,fr as M,jn as N,mn as P,mr as F,nr as I,on as ie,pn as L,rn as ae,rr as R,un as z,ur as B,vr as oe,xn as V,yn as H,z as se,zn as U}from"./vendor-DoIl6acN.js";import{f as ce}from"./vendor-core-BKHiXSX7.js";import{A as le,D as W,E as ue,M as G,N as K,O as de,P as fe,S as pe,T as me,j as he,k as ge,w as _e}from"./CuiCameraCard-IyJNZMGs.js";import{t as ve}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{i as ye,n as be,r as xe,t as Se}from"./useSharedComposables-gpJ--qZh.js";import{n as Ce}from"./ui-DrzKhUXW.js";import{t as we}from"./close-DuwOOM-P.js";import{J as Te,K as Ee,R as q,U as De,b as Oe,o as ke}from"./vendor-primevue-7iEzPOvf.js";import{t as Ae}from"./grid-fill-DBU_n60V.js";import{t as J}from"./CuiCameraSnapshot-DTtvEMy1.js";import{a as Y,i as X,n as Z,r as je,t as Me}from"./vendor-dnd-_zxmhxjM.js";import{n as Ne,t as Pe}from"./CuiMenu-Ds6GufVn.js";import{t as Fe}from"./cameras-CvJDLEZ3.js";import{t as Ie}from"./useCuiDialog-DHktK-mZ.js";import{a as Le}from"./users.schema-BIL9DqRo.js";import{t as Re}from"./routerState-dQtObsFs.js";import{t as ze}from"./check-BMoCATAa.js";import{n as Be,t as Ve}from"./microphone-CAVr4YFv.js";import{t as He}from"./plus-Dqgz6pez.js";import{t as Ue}from"./delete-5a2q7_46.js";import{t as We}from"./CuiCameraPipCard-KUBxGPoU.js";import{n as Ge,t as Ke}from"./CuiTopNavbarItem-Q7M4nMw5.js";import{t as qe}from"./vendor-gridstack-DD5uGA3X.js";var Je={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ye(e,t){return U(),P(`svg`,Je,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M7.5 5.6L5 7l1.4-2.5L5 2l2.5 1.4L10 2L8.6 4.5L10 7zm12 9.8L22 14l-1.4 2.5L22 19l-2.5-1.4L17 19l1.4-2.5L17 14zM22 2l-1.4 2.5L22 7l-2.5-1.4L17 7l1.4-2.5L17 2l2.5 1.4zm-8.66 10.78l2.44-2.44l-2.12-2.12l-2.44 2.44zm1.03-5.49l2.34 2.34c.39.37.39 1.02 0 1.41L5.04 22.71c-.39.39-1.04.39-1.41 0l-2.34-2.34c-.39-.37-.39-1.02 0-1.41L12.96 7.29c.39-.39 1.04-.39 1.41 0`},null,-1)]])}var Xe=B({name:`mdi-auto-fix`,render:Ye}),Ze={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Qe(e,t){return U(),P(`svg`,Ze,[...t[0]||=[A(`g`,{fill:`none`,"fill-rule":`evenodd`},[A(`path`,{d:`m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z`}),A(`path`,{fill:`currentColor`,d:`M19 11a2 2 0 0 1 1.995 1.85L21 13v6a2 2 0 0 1-1.85 1.995L19 21h-4a2 2 0 0 1-1.995-1.85L13 19v-6a2 2 0 0 1 1.85-1.995L15 11zM9 15a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2zM9 3a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zm10 0a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`})],-1)]])}var $e=B({name:`mingcute-grid2-fill`,render:Qe}),et={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function tt(e,t){return U(),P(`svg`,et,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M13 6v5h5V7.75L22.25 12L18 16.25V13h-5v5h3.25L12 22.25L7.75 18H11v-5H6v3.25L1.75 12L6 7.75V11h5V6H7.75L12 1.75L16.25 6z`},null,-1)]])}var nt=B({name:`mdi-cursor-move`,render:tt}),rt={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Q(e,t){return U(),P(`svg`,rt,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`m8.471 7.237l3.056 12.992c.233.993 1.63 1.04 1.929.065l2.945-9.58l.384 1.527a1 1 0 0 0 .97.756H21a1 1 0 1 0 0-2h-2.466l-1.069-4.241c-.247-.981-1.628-1.017-1.925-.05l-2.912 9.472L9.475 2.771c-.24-1.02-1.688-1.03-1.943-.014l-2.065 8.24H3a1 1 0 0 0 0 2h3.247a1 1 0 0 0 .97-.757z`},null,-1)]])}var it=B({name:`fluent-pulse-24-filled`,render:Q}),at={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function ot(e,t){return U(),P(`svg`,at,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124m5.393.984a.75.75 0 1 0-1.06 1.06a5.5 5.5 0 0 1 0 7.78a.75.75 0 1 0 1.06 1.06a7 7 0 0 0 0-9.9`},null,-1),A(`path`,{fill:`currentColor`,d:`M10.828 5.172a.75.75 0 1 0-1.06 1.06a2.5 2.5 0 0 1 0 3.536a.75.75 0 1 0 1.06 1.06a4 4 0 0 0 0-5.656`},null,-1)]])}var st=B({name:`heroicons-speaker-wave-16-solid`,render:ot}),$={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function ct(e,t){return U(),P(`svg`,$,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124M11.28 5.72a.75.75 0 1 0-1.06 1.06L11.44 8l-1.22 1.22a.75.75 0 1 0 1.06 1.06l1.22-1.22l1.22 1.22a.75.75 0 1 0 1.06-1.06L13.56 8l1.22-1.22a.75.75 0 0 0-1.06-1.06L12.5 6.94z`},null,-1)]])}var lt=B({name:`heroicons-speaker-x-mark-16-solid`,render:ct}),ut={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function dt(e,t){return U(),P(`svg`,ut,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M10.4 13.45h3.2l.6 1.625q.075.2.238.313t.362.112q.35 0 .538-.275t.062-.6l-2.55-6.7q-.075-.2-.237-.312T12.25 7.5h-.5q-.2 0-.363.113t-.237.312L8.625 14.65q-.125.3.05.575t.525.275q.2 0 .363-.112t.237-.313zm.4-1.15L11.95 9h.1l1.15 3.3zM12 22q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12q0-.8.125-1.6T2.5 8.825q.125-.4.513-.537t.737.062q.375.2.538.588t.037.812q-.15.55-.238 1.113T4 12q0 3.35 2.325 5.675T12 20t5.675-2.325T20 12t-2.325-5.675T12 4q-.6 0-1.187.087T9.65 4.35q-.425.125-.8-.025T8.3 3.8t-.013-.762t.563-.513q.75-.275 1.55-.4T12 2q2.075 0 3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22M4.438 6.563Q4 6.125 4 5.5t.438-1.062T5.5 4t1.063.438T7 5.5t-.437 1.063T5.5 7t-1.062-.437M12 12`},null,-1)]])}var ft=B({name:`material-symbols-motion-photos-auto-outline-rounded`,render:dt}),pt={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function mt(e,t){return U(),P(`svg`,pt,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M21 15v3h3v2h-3v3h-2v-3h-3v-2h3v-3zm-7 3H3V6h16v7h2V6c0-1.11-.89-2-2-2H3a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h11z`},null,-1)]])}var ht=B({name:`mdi-card-plus-outline`,render:mt}),gt={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function _t(e,t){return U(),P(`svg`,gt,[...t[0]||=[A(`path`,{fill:`currentColor`,d:`M9 3h2v2H9zm4 0h2v2h-2zM9 7h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2z`},null,-1)]])}var vt=B({name:`mdi-drag-vertical`,render:_t}),yt={class:`text-sm text-muted truncate`},bt=ve(V({__name:`ViewDnDDrag`,props:{camera:{},isDropped:{type:Boolean},canDrag:{type:Boolean}},setup(e){let{camera:n,canDrag:r}=k(e),i=E(`boxRef`),a=D(null),o=F(0),s=F(0),c=F(!1),{x:l,y:u,sourceType:d}=ye(),[f,p]=X(()=>({type:`camera-sidebar`,options:{dropEffect:`copy`},item:n.value,canDrag:r.value,collect:e=>({style:{opacity:e.isDragging()?.4:1},isDragging:e.isDragging()})})),h=z(()=>f.value.isDragging),ee=z(()=>h.value&&d.value===`touch`);function _(){a.value&&document.body.contains(a.value)&&document.body.removeChild(a.value),a.value=null}function te(){if(_(),!i.value)return;let e=i.value.cloneNode(!0),t=i.value.getBoundingClientRect();e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.classList.add(`drag-preview`),e.style.position=`fixed`,e.style.left=`${l.value-o.value}px`,e.style.top=`${u.value-s.value}px`,document.body.appendChild(e),a.value=e}function y(){c.value=!1,_()}function ne(){y(),c.value=!0;let e=i.value?.getBoundingClientRect();e&&(o.value=l.value-e.left,s.value=u.value-e.top,te())}function b(){!a.value||!c.value||requestAnimationFrame(()=>{a.value&&(a.value.style.left=`${l.value-o.value}px`,a.value.style.top=`${u.value-s.value}px`)})}return m(ee,e=>e?ne():y()),m([l,u],()=>b(),{flush:`sync`}),x(()=>y()),(r,a)=>{let o=vt,s=J,c=t;return U(),P(`div`,{ref_key:`boxRef`,ref:i},[A(`div`,{ref:C(p),style:w(C(f).style)},[H(c,{disabled:e.isDropped,fluid:``,severity:`secondary`,class:`cui-rounded-corner dark-mode shadow-sm items-center justify-normal`,style:w({cursor:e.isDropped?`not-allowed`:`grab`})},{default:I(()=>[H(o,{size:`20`,class:`text-muted mr-2`}),H(s,{camera:C(n),width:`110px`,class:g([`cui-rounded-corner shadow-md overflow-hidden`,{"opacity-30":e.isDropped}])},null,8,[`camera`,`class`]),A(`span`,yt,v(C(n).name),1)]),_:1},8,[`disabled`,`style`])],4)],512)}}}),[[`__scopeId`,`data-v-a4c67afd`]]),xt={editMode:!1,rearrangeMode:!1,viewSize:1},St=Object.fromEntries(Object.entries({1:{cols:1,rows:1},4:{cols:2,rows:2},6:{cols:3,rows:3},7:{cols:4,rows:4},9:{cols:3,rows:3},10:{cols:4,rows:4},12:{cols:6,rows:6},13:{cols:4,rows:4},15:{cols:12,rows:12},16:{cols:4,rows:4},20:{cols:6,rows:6},26:{cols:12,rows:12}}).map(([e,t])=>[e,{cols:t.cols*16,rows:t.rows*16}])),Ct=e=>e.map(e=>({x:e.x*16,y:e.y*16,w:e.w*16,h:e.h*16})),wt=Object.fromEntries(Object.entries({1:[{x:0,y:0,w:1,h:1}],4:[{x:0,y:0,w:1,h:1},{x:1,y:0,w:1,h:1},{x:0,y:1,w:1,h:1},{x:1,y:1,w:1,h:1}],6:[{x:0,y:0,w:2,h:2},{x:2,y:0,w:1,h:1},{x:2,y:1,w:1,h:1},{x:0,y:2,w:1,h:1},{x:1,y:2,w:1,h:1},{x:2,y:2,w:1,h:1}],7:[{x:0,y:0,w:2,h:2},{x:2,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:2,y:2,w:1,h:1},{x:3,y:2,w:1,h:1},{x:2,y:3,w:1,h:1},{x:3,y:3,w:1,h:1}],9:[{x:0,y:0,w:1,h:1},{x:1,y:0,w:1,h:1},{x:2,y:0,w:1,h:1},{x:0,y:1,w:1,h:1},{x:1,y:1,w:1,h:1},{x:2,y:1,w:1,h:1},{x:0,y:2,w:1,h:1},{x:1,y:2,w:1,h:1},{x:2,y:2,w:1,h:1}],10:[{x:0,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:2,y:0,w:1,h:1},{x:3,y:0,w:1,h:1},{x:2,y:1,w:1,h:1},{x:3,y:1,w:1,h:1},{x:2,y:2,w:1,h:1},{x:3,y:2,w:1,h:1},{x:2,y:3,w:1,h:1},{x:3,y:3,w:1,h:1}],12:[{x:0,y:0,w:3,h:3},{x:3,y:0,w:3,h:3},{x:0,y:3,w:3,h:3},{x:3,y:3,w:1,h:1},{x:4,y:3,w:1,h:1},{x:5,y:3,w:1,h:1},{x:3,y:4,w:1,h:1},{x:4,y:4,w:1,h:1},{x:5,y:4,w:1,h:1},{x:3,y:5,w:1,h:1},{x:4,y:5,w:1,h:1},{x:5,y:5,w:1,h:1}],13:[{x:0,y:0,w:2,h:2},{x:2,y:0,w:1,h:1},{x:3,y:0,w:1,h:1},{x:2,y:1,w:1,h:1},{x:3,y:1,w:1,h:1},{x:0,y:2,w:1,h:1},{x:1,y:2,w:1,h:1},{x:2,y:2,w:1,h:1},{x:3,y:2,w:1,h:1},{x:0,y:3,w:1,h:1},{x:1,y:3,w:1,h:1},{x:2,y:3,w:1,h:1},{x:3,y:3,w:1,h:1}],15:[{x:0,y:0,w:6,h:6},{x:6,y:0,w:6,h:6},{x:0,y:6,w:3,h:3},{x:3,y:6,w:3,h:3},{x:0,y:9,w:3,h:3},{x:3,y:9,w:3,h:3},{x:6,y:6,w:2,h:2},{x:8,y:6,w:2,h:2},{x:10,y:6,w:2,h:2},{x:6,y:8,w:2,h:2},{x:8,y:8,w:2,h:2},{x:10,y:8,w:2,h:2},{x:6,y:10,w:2,h:2},{x:8,y:10,w:2,h:2},{x:10,y:10,w:2,h:2}],16:[{x:0,y:0,w:1,h:1},{x:1,y:0,w:1,h:1},{x:2,y:0,w:1,h:1},{x:3,y:0,w:1,h:1},{x:0,y:1,w:1,h:1},{x:1,y:1,w:1,h:1},{x:2,y:1,w:1,h:1},{x:3,y:1,w:1,h:1},{x:0,y:2,w:1,h:1},{x:1,y:2,w:1,h:1},{x:2,y:2,w:1,h:1},{x:3,y:2,w:1,h:1},{x:0,y:3,w:1,h:1},{x:1,y:3,w:1,h:1},{x:2,y:3,w:1,h:1},{x:3,y:3,w:1,h:1}],20:[{x:0,y:0,w:3,h:3},{x:0,y:3,w:3,h:3},{x:3,y:0,w:1,h:1},{x:4,y:0,w:1,h:1},{x:5,y:0,w:1,h:1},{x:3,y:1,w:1,h:1},{x:4,y:1,w:1,h:1},{x:5,y:1,w:1,h:1},{x:3,y:2,w:1,h:1},{x:4,y:2,w:1,h:1},{x:5,y:2,w:1,h:1},{x:3,y:3,w:1,h:1},{x:4,y:3,w:1,h:1},{x:5,y:3,w:1,h:1},{x:3,y:4,w:1,h:1},{x:4,y:4,w:1,h:1},{x:5,y:4,w:1,h:1},{x:3,y:5,w:1,h:1},{x:4,y:5,w:1,h:1},{x:5,y:5,w:1,h:1}],26:[{x:0,y:0,w:3,h:3},{x:3,y:0,w:3,h:3},{x:0,y:3,w:3,h:3},{x:3,y:3,w:3,h:3},{x:6,y:0,w:2,h:2},{x:8,y:0,w:2,h:2},{x:10,y:0,w:2,h:2},{x:6,y:2,w:2,h:2},{x:8,y:2,w:2,h:2},{x:10,y:2,w:2,h:2},{x:6,y:4,w:2,h:2},{x:8,y:4,w:2,h:2},{x:10,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:2,y:6,w:2,h:2},{x:4,y:6,w:2,h:2},{x:0,y:8,w:2,h:2},{x:2,y:8,w:2,h:2},{x:4,y:8,w:2,h:2},{x:0,y:10,w:2,h:2},{x:2,y:10,w:2,h:2},{x:4,y:10,w:2,h:2},{x:6,y:6,w:3,h:3},{x:9,y:6,w:3,h:3},{x:6,y:9,w:3,h:3},{x:9,y:9,w:3,h:3}]}).map(([e,t])=>[e,Ct(t)])),Tt={class:`text-lg font-semibold text-white`},Et={class:`flex flex-col gap-3 w-full h-full overflow-y-auto`},Dt={class:`cui-label`},Ot={key:0,class:`text-muted text-sm`},kt=V({__name:`ViewDnDSidebar`,props:{cameras:{},droppedCameras:{},title:{}},emits:[`changeViewSize`],setup(e,{emit:n}){let r=e,i=n,{droppedCameras:a}=k(r);function o(e){return a.value.some(t=>t.name===e.name)}return(n,r)=>{let a=t,s=bt;return U(),P(`div`,{class:`sidebar-view-background flex flex-col p-2 border-[1px] border-color gap-2 rounded-xl`,style:w({width:`${C(400)}px`})},[A(`span`,Tt,v(e.title),1),A(`div`,Et,[H(a,{fluid:``,label:`Change grid size`,class:`cui-button-small dark-mode shrink-0 my-4`,onClick:r[0]||=e=>i(`changeViewSize`)}),A(`label`,Dt,v(n.$t(`components.view_box.available_streams`)),1),(U(!0),P(ie,null,T(e.cameras,(e,t)=>(U(),P(`div`,{key:t},[H(s,{camera:e,"is-dropped":o(e),"can-drag":!o(e)},null,8,[`camera`,`is-dropped`,`can-drag`])]))),128)),e.cameras.length?L(``,!0):(U(),P(`span`,Ot,v(n.$t(`components.view_box.no_cameras`)),1))])],4)}}}),At={key:1,class:`w-full h-full bg-[#1a1a1a] flex items-center justify-center`},jt={key:2,class:`w-full h-full bg-[#111]`},Mt={key:1,class:`w-full h-full flex items-center justify-center`},Nt={key:0},Pt=ve(V({__name:`ViewDnDCard`,props:{camera:{},cameras:{},droppedCameras:{},mode:{},index:{},cameraCardProps:{},cameraCardModels:{},onDrop:{type:Function}},emits:[`drop`,`remove`,`expand`],setup(e,{expose:n,emit:r}){let i=e,o=r,{lgBreakpoint:s}=Se(),{camera:c,mode:l,cameras:u,droppedCameras:d}=k(i),f=E(`boxRef`),p=E(`containerRef`),m=E(`playerRef`),h=E(`menuRef`),{width:_}=a(p),[v,te]=je({accept:`camera-sidebar`,drop:i.onDrop,collect:e=>({isOver:e.isOver(),canDrop:e.canDrop()&&!c.value}),canDrop:()=>l.value===`edit`&&!c.value}),y=z(()=>v.value.canDrop&&v.value.isOver),ne=z(()=>l.value===`edit`?y.value?`#171717`:`#202020`:`#000`),b=z(()=>_.value<=200),x=z(()=>u.value.filter(e=>!d.value.some(t=>t.name===e.name))),re=z(()=>x.value.map(e=>({label:e.name,onClick:()=>o(`drop`,e)})));function S(e){m.value?.toggleMute(e)}async function T(e,t){await m.value?.toggleMicrophone(e,t)}function D(e){m.value?.toggleActivityMode(e)}async function M(e){await m.value?.toggleSourceRole(e)}async function N(e){await m.value?.toggleStreamingMode(e)}function F(e){m.value?.toggleBbox(e)}function ae(e){m.value?.togglePip(e)}return n({togglePlayerMute:S,toggleMicrophone:T,togglePlayerActivityMode:D,togglePlayerSourceRole:M,togglePlayerStreamingMode:N,togglePlayerBbox:F,togglePip:ae}),(n,r)=>{let i=We,a=He,d=we,_=t,v=J,y=Pe,x=Te;return U(),P(`div`,{ref_key:`boxRef`,ref:f,class:`view-dnd-card`},[C(l)===`normal`||C(l)===`rearrange`?(U(),P(ie,{key:0},[C(c)?(U(),j(i,ee({key:0,ref_key:`playerRef`,ref:m},e.cameraCardProps,{"activity-mode":e.cameraCardModels?.activityMode,"source-role":e.cameraCardModels?.sourceRole,"streaming-mode":e.cameraCardModels?.streamingMode,"camera-info":C(c),class:`w-full h-full`,onExpand:r[0]||=e=>o(`expand`,C(c),e)}),null,16,[`activity-mode`,`source-role`,`streaming-mode`,`camera-info`])):C(l)===`rearrange`?(U(),P(`div`,At,[H(a,{class:`w-6 h-6 text-white/20`})])):(U(),P(`div`,jt))],64)):C(l)===`edit`?(U(),P(ie,{key:1},[A(`div`,{ref:C(te),style:w({backgroundColor:C(ne)}),class:`w-full h-full`},[C(c)?(U(),P(`div`,{key:0,ref_key:`containerRef`,ref:p,class:`w-full h-full flex items-center justify-center relative min-w-0`},[H(_,{class:g([`z-1`,{"cui-icon-lg":C(b),"cui-button-small":!C(b)}]),label:C(b)?void 0:C(c).name,onClick:r[1]||=O(e=>o(`remove`,C(c)),[`prevent`])},{icon:I(()=>[H(d)]),_:1},8,[`class`,`label`]),H(v,{camera:C(c),class:`absolute w-full h-full top-0 left-0 bg-black/50 opacity-20`},null,8,[`camera`])],512)):C(s)?L(``,!0):(U(),P(`div`,Mt,[C(u).length?(U(),j(_,{key:1,text:``,rounded:``,class:`cui-icon-md`,onClick:C(h)?.toggleMenu},{icon:I(()=>[H(a,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])):R((U(),P(`div`,Nt,[H(_,{text:``,rounded:``,disabled:``,class:`cui-icon-md`},{icon:I(()=>[H(a,{width:`100%`,height:`100%`})]),_:1})])),[[x,{value:n.$t(`views.camview.no_cameras`)},void 0,{top:!0}]])]))],4),H(y,{ref_key:`menuRef`,ref:h,items:C(re),popover:{pt:{content:{class:`p-0! rounded-xl! overflow-hidden!`}}}},null,8,[`items`])],64)):L(``,!0)],512)}}}),[[`__scopeId`,`data-v-49edf1f5`]]),Ft={class:`w-full h-full flex flex-row`},It=[`gs-id`,`gs-x`,`gs-y`,`gs-w`,`gs-h`],Lt={class:`grid-stack-item-content`},Rt=ve(V({__name:`CuiCameraViewDnD`,props:b({cameras:{},viewSize:{},cards:{},title:{},editMode:{type:Boolean},rearrangeMode:{type:Boolean},cameraCardProps:{},cameraCardModels:{}},xt),emits:[`drop`,`remove`,`changeViewSize`,`expand`,`rearrange`],setup(n,{expose:i,emit:o}){let s=n,c=o,{isTouch:l}=xe(),{smBreakpoint:u,lgBreakpoint:d}=Se(),f=_(e,void 0),{routeFrom:p,routeTo:h}=ce(Re()),{editMode:ee,rearrangeMode:v,viewSize:te,cards:y,cameraCardProps:b}=k(s),re=E(`viewRef`),S=E(`wrapperRef`),D=E(`gridRef`),O=E(`cardRefs`),M=F(),B=F(),V=null,{isFullscreen:se,toggle:le}=r(re,{mode:`scroll`}),W=a(re),ue=a(S),G=z(()=>ee.value?`edit`:v.value?`rearrange`:`normal`),K=z(()=>M.value??B.value),de=z(()=>e=>{let t={...oe(b.value)};if(e){let n=p.value?.includes(`/cameras/${e.name}`)??!1,r=h.value?.includes(`/cameras/${e.name}`)??!1,i=t.viewTransition&&(n||r),a=`/cameras/${e.name}`;f?.isActive.value?t.routerLink=`${a}?startTs=${Math.floor(f.currentTimestamp.value/1e3)}`:t.routerLink=a,t.viewTransition=i}return t}),fe=z(()=>(W.height.value-16)*(16/9)),pe=z(()=>y.value.filter(e=>e.lastDroppedCamera).map(e=>e.lastDroppedCamera));function he(e){let t=y.value[e];if(u.value)return{x:0,y:t?.y??e,w:1,h:1};let n=wt[te.value]?.[e];return{x:t?.x??n?.x??0,y:t?.y??n?.y??0,w:t?.colSpan??n?.w??1,h:t?.rowSpan??n?.h??1}}function ge(){if(!V)return;let e=[];for(let t of V.getGridItems()){let n=t.gridstackNode;if(!n)continue;let r=parseInt(n.id),i=y.value[r];i?.lastDroppedCamera&&e.push({index:r,cameraId:i.lastDroppedCamera._id,colSpan:n.w,rowSpan:n.h,x:n.x,y:n.y})}c(`rearrange`,e)}function _e(){ge()}function ve(){if(!D.value)return;let e=St[te.value];if(!e)return;let t=u.value,n=t?1:e.cols,r=t?y.value.length:e.rows,i=S.value?.clientWidth??0,a=t?i*9/16:i>0?i*9/16/e.rows:60,o=G.value===`rearrange`;V=qe.init({column:n,minRow:r,cellHeight:a,margin:o?3:1,float:!1,animate:!1,staticGrid:!o,resizable:t?{handles:``}:{handles:`se`},disableResize:t,alwaysShowResizeHandle:!t},D.value),V.on(`change`,_e),requestAnimationFrame(()=>V?.setAnimation(!0))}function ye(){V&&=(V.offAll(),V.destroy(!1),null)}function be(e,t,n){n?M.value=t:(B.value=t,M.value=void 0,setTimeout(()=>{B.value=void 0},250)),c(`expand`,e,n)}async function Ce(){await le()}function we(e){for(let t of O.value||[])t.togglePlayerMute(e)}async function Te(e,t){await Promise.allSettled((O.value||[]).map(n=>n.toggleMicrophone(e,t)))}function Ee(e){for(let t of O.value||[])t.togglePlayerActivityMode(e)}async function q(e){await Promise.allSettled((O.value||[]).map(t=>t.togglePlayerSourceRole(e)))}async function De(e){await Promise.allSettled((O.value||[]).map(t=>t.togglePlayerStreamingMode(e)))}function Oe(e){for(let t of O.value||[])t.togglePlayerBbox(e)}function ke(e){for(let t of O.value||[])t.togglePip(e)}function Ae(){V&&(V.compact(),ge())}function J(){if(!V)return;let e=St[te.value];if(!e)return;let t=e.cols,n=[];for(let e of V.getGridItems()){let t=e.gridstackNode;if(!t)continue;let r=parseInt(t.id),[i,a]=((y.value[r]?.lastDroppedCamera)?.interfaceSettings?.aspectRatio||`16:9`).split(`:`).map(Number);n.push({idx:r,el:e,cellRatio:i/a*(9/16)})}if(!n.length)return;let r=e.rows;function i(e){let r=[],i=0,a=0;for(;a<n.length;){let o=[],s=0,c=!1;for(;a<n.length;){let r=n[a].cellRatio;if(e*(s+r)>t&&o.length>0){c=!0;break}o.push(n[a]),s+=r,a++}let l=c?t/s:e;r.push({row:o,ratioSum:s,rowH:l,filled:c}),i+=l}return{rows:r,totalH:i}}let a=.25,o=r,s=a;for(let e=0;e<40;e++){let e=(a+o)/2;i(e).totalH<=r?(s=e,a=e):o=e}let{rows:c}=i(s),l=c.reduce((e,t)=>e+t.rowH,0)||1,u=l>r?r/l:1,d=c.map(e=>e.rowH*u),f=d.reduce((e,t)=>e+t,0),p=new Map,m=Math.max(0,Math.round((r-f)/2)),h=m;for(let e=0;e<c.length;e++){h+=d[e];let n=Math.min(r,Math.round(h)),i=Math.max(1,n-m),{row:a,ratioSum:o,filled:s}=c[e];if(s){let e=0;for(let n=0;n<a.length;n++){let r=n===a.length-1?Math.max(1,t-e):Math.max(1,Math.round(a[n].cellRatio/o*t));p.set(a[n].idx,{x:e,y:m,w:r,h:i}),e+=r}}else{let e=a.map(e=>Math.max(1,Math.round(e.cellRatio*i))),n=e.reduce((e,t)=>e+t,0),r=Math.max(0,Math.round((t-n)/2));for(let t=0;t<a.length;t++)p.set(a[t].idx,{x:r,y:m,w:e[t],h:i}),r+=e[t]}m=n}V.batchUpdate();for(let[e,t]of p){let r=n.find(t=>t.idx===e);r&&V.update(r.el,t)}V.batchUpdate(!1),ge()}return m([te,()=>y.value.length,u],()=>{ye(),N(()=>ve())},{immediate:!1}),m(G,e=>{if(!V)return;let t=e===`rearrange`;V.setStatic(!t),V.margin(t?3:1)}),m(()=>ue.width.value,e=>{if(!(!V||e<=0)){if(V.setAnimation(!1),u.value)V.cellHeight(e*9/16);else{let t=St[te.value]?.rows??1;V.cellHeight(e*9/16/t)}requestAnimationFrame(()=>V?.setAnimation(!0))}}),ne(()=>{N(()=>ve())}),x(()=>{ye()}),i({toggleFullscreen:Ce,toggleAllPlayerMute:we,toggleAllPlayerMicrophone:Te,toggleAllPlayerActivityMode:Ee,toggleAllPlayerSourceRole:q,toggleAllPlayerStreamingMode:De,toggleAllPlayerBbox:Oe,toggleAllPip:ke,compactGrid:Ae,fitAspectRatios:J,isFullscreen:se}),(e,r)=>{let i=me,a=t,o=Pt,s=kt;return U(),j(C(Y),{backend:C(l)?C(Me):C(Z)},{default:I(()=>[A(`div`,Ft,[A(`div`,{ref_key:`viewRef`,ref:re,class:g([`view-container w-full flex flex-col min-w-0 overflow-y-auto items-center`,{"px-2":C(ee)&&C(d)}])},[C(se)?(U(),j(a,{key:0,severity:`secondary`,rounded:``,class:`cui-fs-exit`,"aria-label":e.$t(`components.form.tooltip.fullscreen_off`),onClick:C(le)},{icon:I(()=>[H(i,{class:`w-5 h-5`})]),_:1},8,[`aria-label`,`onClick`])):L(``,!0),C(K)===void 0?L(``,!0):(U(),P(`div`,{key:1,class:`w-full aspect-video relative my-auto`,style:w({maxWidth:`${C(fe)}px`})},[H(o,{ref:`fsCardRef`,class:g([`w-full h-full`,{"card-expanded":C(M)!==void 0,"card-collapsing":C(B)!==void 0}]),camera:C(y)[C(K)]?.lastDroppedCamera,cameras:n.cameras,"dropped-cameras":C(pe),mode:`normal`,index:C(K),"camera-card-props":{...C(de)(C(y)[C(K)]?.lastDroppedCamera),expanded:!0},"camera-card-models":n.cameraCardModels,onExpand:r[0]||=(e,t)=>be(e,C(K),t)},null,8,[`class`,`camera`,`cameras`,`dropped-cameras`,`index`,`camera-card-props`,`camera-card-models`])],4)),R(A(`div`,{ref_key:`wrapperRef`,ref:S,class:g([`w-full relative my-auto`,C(u)?`h-auto`:`aspect-video`]),style:w(C(u)?void 0:{maxWidth:`${C(fe)}px`})},[A(`div`,{ref_key:`gridRef`,ref:D,class:`grid-stack w-full h-full`},[(U(!0),P(ie,null,T(C(y),(e,t)=>(U(),P(`div`,{key:t,class:`grid-stack-item`,"gs-id":String(t),"gs-x":he(t).x,"gs-y":he(t).y,"gs-w":he(t).w,"gs-h":he(t).h},[A(`div`,Lt,[H(o,{ref_for:!0,ref_key:`cardRefs`,ref:O,camera:e.lastDroppedCamera,cameras:n.cameras,"dropped-cameras":C(pe),mode:C(G),index:t,"camera-card-props":{...C(de)(e.lastDroppedCamera),expanded:C(K)===t},"camera-card-models":n.cameraCardModels,"on-drop":e=>c(`drop`,t,e),onExpand:(e,n)=>be(e,t,n),onDrop:e=>c(`drop`,t,e),onRemove:r[1]||=e=>c(`remove`,e)},null,8,[`camera`,`cameras`,`dropped-cameras`,`mode`,`index`,`camera-card-props`,`camera-card-models`,`on-drop`,`onExpand`,`onDrop`])])],8,It))),128))],512)],6),[[ae,C(K)===void 0]])],2),C(ee)&&C(d)?(U(),j(s,{key:0,cameras:n.cameras,"dropped-cameras":C(pe),title:n.title,class:`view-box shadow-xl`,style:w({"margin-right":C(ee)?`0px`:`-${C(400)}px`}),onChangeViewSize:r[2]||=e=>c(`changeViewSize`)},null,8,[`cameras`,`dropped-cameras`,`title`,`style`])):L(``,!0)])]),_:1},8,[`backend`])}}}),[[`__scopeId`,`data-v-3273ba0f`]]),zt={class:`flex flex-col gap-3`},Bt={class:`text-wrap`},Vt={class:`w-full h-full flex items-center justify-center relative`},Ht=V({__name:`AudioVisualizer`,emits:[`listening`],setup(e,{expose:n,emit:r}){let i=r,a=l(),o=d(),s=_(`dialogRefProps`),c=E(`canvasRef`),u=D(),f=D(),p=F(!1),m=z(()=>!!s.loading?.value);async function h(){if(p.value)g();else try{u.value&&g();let e;try{e=await navigator.mediaDevices.getUserMedia({audio:!0})}catch(e){o.add({severity:`warn`,detail:`Can not enable AudioVisualizer, see console.`,life:3e3}),a.warn(`Can not enable AudioVisualizer`,e);return}p.value=!0,i(`listening`,!0),u.value=new AudioContext;let t=u.value.createAnalyser();t.fftSize=1024,f.value=e.getTracks(),u.value.createMediaStreamSource(e).connect(t);let n,r=c.value?.getContext(`2d`),s=()=>{if(c.value&&r){let e=[],i=[];r.clearRect(0,0,c.value.width,c.value.height),requestAnimationFrame(s);let a=t.frequencyBinCount,o=new Uint8Array(a);t.getByteFrequencyData(o),e.push(o);for(let t=0;t<e[0].length;t++)i.push(0),e.forEach(e=>{i[t]+=e[t]});let l=c.value.width/2,u=c.value.height/2;r.beginPath(),r.arc(l,u,30,0,2*Math.PI),r.lineWidth=1,r.stroke(),r.closePath();for(let e=0;e<90;e++){n=i[e]*.4;let t=Math.PI*2/90;ee(r,l+Math.cos(t*e)*30,u+Math.sin(t*e)*30,l+Math.cos(t*e)*(30+n),u+Math.sin(t*e)*(30+n),3)}p.value||r.clearRect(0,0,c.value.width,c.value.height)}};s()}catch(e){g(),a.error(e)}}function ee(e,t,n,r,i,a){let o=e.createLinearGradient(t,n,r,i);o.addColorStop(0,`#5b040f`),o.addColorStop(.5,`#b50b21`),o.addColorStop(.9,`#df2a4c`),o.addColorStop(1,`#df6380`),e.lineWidth=a,e.strokeStyle=o,e.beginPath(),e.moveTo(t,n),e.lineTo(r,i),e.stroke(),e.closePath()}function g(){u.value?.close(),u.value=void 0,f.value?.forEach(e=>e.stop()),f.value=void 0,p.value=!1,i(`listening`,!1)}return S(()=>{g()}),n({isLoading:m}),(e,n)=>{let r=Ve,i=t;return U(),P(`div`,zt,[A(`span`,Bt,v(e.$t(`components.dialog.message.intercom_info`)),1),A(`div`,Vt,[H(i,{rounded:``,class:`w-[60px] h-[60px] absolute z-1`,onClick:h},{icon:I(()=>[H(r,{width:`100%`,height:`100%`})]),_:1}),A(`canvas`,{ref_key:`canvasRef`,ref:c,height:`300`,width:`300`},null,512)])])}}}),Ut=[`fill`],Wt=V({__name:`CuiCameraGridIcon1`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm0 8h952v532H9V9Z`},null,-1)]],8,Ut))}}),Gt=[`fill`],Kt=V({__name:`CuiCameraGridIcon10`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm726 275h226v130H735V276Zm-242 0h234v130H493V276Zm0 265V414h234v127H493ZM9 541V276h476v265H9Zm726 0V414h226v127H735ZM961 9v121H735V9h226ZM735 138h226v130H735V138ZM727 9v121H493V9h234ZM493 138h234v130H493V138ZM485 9v259H9V9h476Z`},null,-1)]],8,Gt))}}),qt=[`fill`],Jt=V({__name:`CuiCameraGridIcon12`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm952 275v129H810.5V276H961Zm-158.5 0v129h-152V276h152Zm-152 265V413h152v128h-152Zm-8-265v129H493V276h149.5ZM493 541V413h149.5v128H493ZM9 276h476v265H9V276Zm801.5 265V413H961v128H810.5ZM961 9v259H493V9h468ZM9 268V9h476v259H9Z`},null,-1)]],8,qt))}}),Yt=[`fill`],Xt=V({__name:`CuiCameraGridIcon13`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M250 549.5h.5v-.5H961a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h233.5v.5h7.5Zm.5-273.5H485v129.5H250.5V276Zm-8 0v129.5H9V276h233.5ZM961 9v121H735V9h226ZM727 9v121H493V9h234ZM493 138h234v130H493V138ZM485 9v259H9V9h476Zm250 129h226v130H735V138Zm0 267.5V276h226v129.5H735ZM493 276h234v129.5H493V276Zm0 265V413.5h234V541H493Zm-242.5 0V413.5H485V541H250.5ZM9 541V413.5h233.5V541H9Zm726 0V413.5h226V541H735Z`},null,-1)]],8,Yt))}}),Zt=[`fill`],Qt=V({__name:`CuiCameraGridIcon15`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M250 549.5h.5v-.5H961a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h233.5v.5h7.5Zm.5-144V276H485v129.5H250.5Zm-8-129.5v129.5H9V276h233.5Zm570 90H961v82H812.5v-82Zm-160 0h152v82h-152v-82ZM961 276v82H812.5v-82H961Zm-308.5 0h152v82h-152v-82Zm0 180h152v85h-152v-85ZM961 541H812.5v-85H961v85Zm-316.5-93H493v-82h151.5v82Zm0-172v82H493v-82h151.5Zm0 180v85H493v-85h151.5ZM485 413.5V541H250.5V413.5H485Zm-242.5 0V541H9V413.5h233.5ZM961 9v259H493V9h468ZM9 9h476v259H9V9Z`},null,-1)]],8,Zt))}}),$t=[`fill`],en=V({__name:`CuiCameraGridIcon16`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm952 8v121.5H732.5V9H961ZM724.5 9v121.5H493V9h231.5ZM493 268V138.5h231.5V268H493Zm0 137.5V276h231.5v129.5H493Zm468 0H732.5V276H961v129.5ZM493 541V413.5h231.5V541H493Zm468 0H732.5V413.5H961V541Zm0-273H732.5V138.5H961V268ZM485 9v121.5H250.5V9H485ZM250.5 138.5H485V268H250.5V138.5ZM242.5 9v121.5H9V9h233.5ZM9 138.5h233.5V268H9V138.5ZM250.5 276H485v129.5H250.5V276Zm0 137.5H485V541H250.5V413.5Zm-8-137.5v129.5H9V276h233.5ZM9 541V413.5h233.5V541H9Z`},null,-1)]],8,$t))}}),tn=[`fill`],nn=V({__name:`CuiCameraGridIcon20`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm952 94v82H812.5V95H961Zm-156.5 82h-152V95h152v82ZM961 9v78H812.5V9H961ZM652.5 9h152v78h-152V9Zm0 176h152v83h-152v-83ZM961 268H812.5v-83H961v83Zm-308.5 8h152v82h-152v-82Zm160 0H961v82H812.5v-82Zm-168-181v82H493V95h151.5Zm0-86v78H493V9h151.5ZM493 268v-83h151.5v83H493Zm0 90v-82h151.5v82H493ZM9 9h476v259H9V9Zm952 357v82H812.5v-82H961Zm-156.5 0v82h-152v-82h152Zm-152 90h152v85h-152v-85ZM961 541H812.5v-85H961v85ZM644.5 366v82H493v-82h151.5ZM493 541v-85h151.5v85H493ZM9 276h476v265H9V276Z`},null,-1)]],8,tn))}}),rn=[`fill`],an=V({__name:`CuiCameraGridIcon26`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{"fill-rule":`evenodd`,d:`M1.5 9A7.5 7.5 0 0 1 9 1.5h952a7.5 7.5 0 0 1 7.5 7.5v532a7.5 7.5 0 0 1-7.5 7.5H9a7.5 7.5 0 0 1-7.5-7.5V9Zm960 168V94h-153v83h153Zm-160 0h-153V94h153v83Zm7-90h153V9a.5.5 0 0 0-.5-.5H808.5V87Zm-7-78.5V87h-153V8.5h153Zm0 175.5v84.5h-153V184h153Zm7 84.5V184h153v84.5h-153Zm-167-91.5V94h-149v83h149Zm0-90V8.5h-149V87h149Zm-149 97h149v84.5h-149V184Zm0 91.5H719V402H492.5V275.5Zm0 133.5v132.5H719V409H492.5Zm233.5 0v132.5h235a.5.5 0 0 0 .5-.5V409H726Zm235.5-7V275.5H726V402h235.5Zm-476-270V8.5H252V132h233.5ZM245 139H8.5v129.5H245V139Zm0-7V8.5H9a.5.5 0 0 0-.5.5v123H245Zm240.5 136.5V139H252v129.5h233.5Zm-477 7h157v81H8.5v-81Zm164 81v-81h153v81h-153Zm153 7h-153v83h153v-83Zm7 83v-83h153v83h-153Zm-7 7h-153v88h153v-88Zm7 88v-88h153v88h-153Zm0-185v-81h153v81h-153Zm-324 7h157v83H8.5v-83Zm0 90h157v88H9a.5.5 0 0 1-.5-.5v-87.5Z`},null,-1)]],8,rn))}}),on=[`fill`],sn=V({__name:`CuiCameraGridIcon4`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm952 8v259H493V9h468ZM493 541V276h468v265H493ZM485 9v259H9V9h476ZM9 541V276h476v265H9Z`},null,-1)]],8,on))}}),cn=[`fill`],ln=V({__name:`CuiCameraGridIcon6`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm641.5 187.5H961v171H650.5v-171ZM961 9v171.5H650.5V9H961ZM642.5 9v350.5H9V9h633.5ZM9 541V367.5h315.5V541H9Zm323.5-173.5h310V541h-310V367.5Zm318 0H961V541H650.5V367.5Z`},null,-1)]],8,cn))}}),un=[`fill`],dn=V({__name:`CuiCameraGridIcon7`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M9 1a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V9a8 8 0 0 0-8-8H9Zm725.5 275H961v130H734.5V276Zm0 265V414H961v127H734.5Zm-8-265v130H493V276h233.5ZM493 541V414h233.5v127H493ZM9 276h476v265H9V276ZM961 9v259H493V9h468ZM9 268V9h476v259H9Z`},null,-1)]],8,un))}}),fn=[`fill`],pn=V({__name:`CuiCameraGridIcon9`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=k(e);return(e,n)=>(U(),P(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 970 550`,role:`img`,"area-hidden":`true`,fill:C(t)},[...n[0]||=[A(`path`,{d:`M969.5 359v-.5h-.5V9a8 8 0 0 0-8-8H9a8 8 0 0 0-8 8v532a8 8 0 0 0 8 8h952a8 8 0 0 0 8-8V366.5h.5V359ZM961 187v171.5H651V187h310ZM651 541V366.5h310V541H651Zm-8-354v171.5H330V187h313ZM330 541V366.5h313V541H330Zm-8-354v171.5H9V187h313ZM9 541V366.5h313V541H9ZM961 9v170H651V9h310ZM643 9v170H330V9h313ZM322 9v170H9V9h313Z`},null,-1)]],8,fn))}}),mn={for:`name`,class:`cui-label`},hn={key:0,class:`flex flex-col gap-6 justify-center`},gn={key:0,class:`text-red-500 text-center mb-5`},_n={class:`md:max-h-[350px] overflow-y-auto`},vn={class:`block cui-label mb-3`},yn={key:1,class:`flex flex-col gap-6 justify-center`},bn={key:0,class:`text-red-500 text-center mb-5`},xn={class:`md:max-h-[450px] overflow-y-auto`},Sn={class:`block cui-label mb-3`},Cn={class:`view-select-container`},wn=[`onClick`],Tn=ve(V({__name:`CamviewForm`,props:{form:{},type:{},cameras:{},views:{}},setup(e,{expose:t}){let n=new u,r=e,i=l(),a=d(),{t:o}=s(),b=_(`dialogRefProps`),{user:x}=ce(p()),{mutateAsync:S,isPending:w}=n.createViewQuery(),{mutateAsync:D,isPending:O}=n.patchViewQuery(),{form:M,type:N,cameras:ae,views:R}=k(r),B=E(`formRef`),oe=F([1,4,6,7,9,10,12,13,15,16,20,26]),V=F(!0),le=F(!0),W=F([]),ue=F(!!M.value),G=F(M.value?f(M.value):{});!ue.value&&N.value===`view`&&(G.value.viewSize=oe.value[0]);let K=z(()=>!!(b.loading?.value||w.value||O.value));function de(e){let t=W.value.findIndex(t=>t.name===e.name);t===-1?W.value.push(e):W.value.splice(t,1)}function fe(e){switch(e){case 1:return Wt;case 4:return sn;case 6:return ln;case 7:return dn;case 9:return pn;case 10:return Kt;case 12:return Jt;case 13:return Xt;case 15:return Qt;case 16:return en;case 20:return nn;case 26:return an;default:return Wt}}async function pe(){if(!B.value||!x.value)return;let e=R.value.find(e=>e.name===G.value.name);if(e&&!ue.value)return i.error(`View already exists`,e),a.add({severity:`error`,detail:o(`components.toast.validation_failed`),life:3e3}),null;if(N.value===`dnd`){if(le.value)return i.error(`No cameras selected`),a.add({severity:`error`,detail:o(`components.toast.validation_failed`),life:3e3}),null;let e=W.value.map((e,t)=>({cameraId:e._id,index:t}));G.value.cameras=e,G.value.type=`dnd`,G.value.viewSize=1,B.value.setFieldValue(`type`,`dnd`),B.value.setFieldValue(`viewSize`,1),B.value.setFieldValue(`cameras`,e);let t=await B.value.validate();return t?.valid?ue.value?await D({username:x.value.username,viewid:G.value._id,viewData:G.value}):await S({username:x.value.username,viewData:G.value}):(i.error(`Validation failed`,t),a.add({severity:`error`,detail:o(`components.toast.validation_failed`),life:3e3}),null)}else{if(V.value)return i.error(`No view selected`),a.add({severity:`error`,detail:o(`components.toast.validation_failed`),life:3e3}),null;G.value.cameras=[],G.value.type=`view`,B.value.setFieldValue(`type`,`view`),B.value.setFieldValue(`cameras`,[]);let e=await B.value.validate();return e?.valid?f(G.value):(i.error(`Validation failed`,e),a.add({severity:`error`,detail:o(`components.toast.validation_failed`),life:3e3}),null)}}return m(G,e=>{for(let[t,n]of Object.entries(e))B.value?.setFieldValue(t,n);e.viewSize&&(V.value=!1),e.cameras?.length&&(le.value=!1)},{deep:!0,immediate:!0}),m(W,e=>{le.value=e.length===0},{deep:!0}),ne(()=>{W.value=ae.value?.filter(e=>G.value?.cameras?.some(t=>t.cameraId===e._id))||[]}),t({isLoading:K,onConfirm:pe}),(e,t)=>{let n=c,r=q,i=De,a=Ee,o=Ne;return U(),j(C(se),{ref_key:`formRef`,ref:B,class:`flex flex-col gap-6`,"validation-schema":C(Le),"initial-values":C(G)},{default:I(()=>[H(C(re),{modelValue:C(G).name,"onUpdate:modelValue":t[0]||=e=>C(G).name=e,modelModifiers:{trim:!0},name:`name`,as:`div`,class:`flex flex-col field-gap`},{default:I(({field:t,errors:i})=>[A(`label`,mn,v(e.$t(`components.form.label.name`)),1),H(r,null,{default:I(()=>[H(n,ee(t,{invalid:i.length>0,loading:C(K),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),H(h,{name:`fade`},{default:I(()=>[H(C(y),{name:`name`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),H(i,{class:`m-0 py-3`}),C(N)===`dnd`?(U(),P(`div`,hn,[H(h,{name:`fade`},{default:I(()=>[C(le)?(U(),P(`span`,gn,v(e.$t(`components.form.error.no_cameras_selected`)),1)):L(``,!0)]),_:1}),A(`div`,_n,[A(`label`,vn,v(e.$t(`components.form.label.cameras`)),1),(U(!0),P(ie,null,T(C(ae),(e,t)=>(U(),P(`div`,{key:t,class:`cui-list-item`},[H(o,{class:`h-14`,active:C(W).some(t=>t.name===e.name),onClick:t=>de(e)},{append:I(()=>[H(a,{"model-value":C(W).some(t=>t.name===e.name),"onUpdate:modelValue":t=>de(e)},null,8,[`model-value`,`onUpdate:modelValue`])]),default:I(()=>[A(`span`,null,v(e.name),1)]),_:2},1032,[`active`,`onClick`])]))),128))])])):(U(),P(`div`,yn,[H(h,{name:`fade`},{default:I(()=>[C(V)?(U(),P(`span`,bn,v(e.$t(`components.form.error.no_view_selected`)),1)):L(``,!0)]),_:1}),A(`div`,xn,[A(`label`,Sn,v(e.$t(`components.form.label.views`)),1),A(`div`,Cn,[(U(!0),P(ie,null,T(C(oe),t=>(U(),P(`div`,{key:t,class:`view-select-item w-full`,onClick:e=>C(G).viewSize=t},[A(`div`,{class:g([`view-select-item-icon w-full p-3`,{"selected-view":C(G).viewSize===t}])},[(U(),j(te(fe(t)),{style:{width:`100%`,height:`100%`}}))],2),A(`span`,{class:g([`view-select-item-label text-muted mt-3 px-2 py-1 cui-rounded-corners`,{"selected-view-label":C(G).viewSize===t}])},v(t)+` `+v(e.$t(`views.camview.cameras`)),3)],8,wn))),128))])])]))]),_:1},8,[`validation-schema`,`initial-values`])}}}),[[`__scopeId`,`data-v-641aac54`]]),En={class:`h-full w-full dark-mode relative`},Dn={key:0,class:`flex flex-col w-full h-full items-center justify-center`},On={key:1,class:`flex flex-col w-full h-full`},kn={class:`flex flex-1 min-h-0 flex-col items-center justify-center w-full gap-4`},An={class:`text-muted text-sm`},jn={class:`relative w-6 h-6`},Mn=ve(V({__name:`Camview`,props:{navbarWidth:{default:0},navbarLeft:{default:0}},setup(e){let r=new u,a=new Fe,c=e,l=s(),{t:d}=l,_=Oe(),y=Ie(),{bottombarHeight:ne}=be(),{smBreakpoint:b,lgBreakpoint:x,mdBreakpoint:re}=Se(),{user:S}=ce(p()),{uiSettings:T}=ce(Ce()),{data:D,isLoading:O}=a.getCamerasQuery({page:1,pageSize:-1}),{data:N,isLoading:ie}=r.getViewsQuery(S.value?.username??``,{page:1,pageSize:-1}),{mutate:ae,isPending:B}=r.removeViewQuery(),{mutateAsync:oe,isPending:V}=r.createViewQuery(),{mutateAsync:se,isPending:ve}=r.patchViewQuery(),{navbarWidth:ye,navbarLeft:xe}=k(c),we=E(`menuRef`),Ee=E(`newViewMenuRef`),q=E(`viewDndRef`),J=F({}),Y=F(!1),X=F(!1),Z=F(!1),je=F(!1),Me=F(!1),Ne=F(!1),Le=F(!0),Re=F(`always-on`),Ve=F(`low-resolution`),We=F(`webrtc`),qe=F([]),Je=F({}),Ye=M({sourceRole:Ve.value,activityMode:Re.value,streamingMode:We.value}),Ze=z(()=>O.value||ie.value||B.value||V.value||ve.value),Qe=z(()=>ye.value+xe.value),et=z(()=>({locale:l.locale.value,dayNames:_.config.locale?.dayNames,dayNamesShort:_.config.locale?.dayNamesShort,monthNames:_.config.locale?.monthNames,monthNamesShort:_.config.locale?.monthNamesShort})),tt=z(()=>({doubleClickZoom:!1,flatCard:!0,cameraNameOverlay:!0,control:!0,toolbar:!1,expandableCard:($.value?.cameras?.length??0)>1,detectionIndicatorOverlay:!0,boundingBoxOverlay:!1,cardClickAction:`expand`,viewTransition:!0,cardProps:{pt:{root:{style:`background: #000`}}}})),rt=z(()=>N.value?.result.length?x.value?{width:Me.value?`calc(100% - 400px)`:`100%`,height:`100%`,overflowY:`scroll`}:{height:`100%`,paddingBottom:Me.value?ne.value>0?`200px`:`192px`:`0px`,overflowY:`scroll`}:{width:`100%`,height:`100%`,overflowY:`scroll`}),Q=z(()=>Y.value||X.value),at=z(()=>!!q.value?.isFullscreen),ot=z(()=>[{label:at.value?d(`components.form.tooltip.fullscreen_off`):d(`components.form.tooltip.fullscreen_on`),icon:at.value?me:_e,command:Dt},{label:Le.value?d(`components.form.tooltip.unmute`):d(`components.form.tooltip.mute`),icon:Le.value?lt:st,command:Ot},{label:d(`components.form.tooltip.intercom`),icon:pe,command:()=>_t(`intercom`)},{label:We.value===`auto`?`${d(`components.form.tooltip.mode`)}: ${d(`components.form.tooltip.streaming_mode_auto`)}`:We.value===`webrtc`?`${d(`components.form.tooltip.mode`)}: ${d(`components.form.tooltip.streaming_mode_webrtc`)}`:`${d(`components.form.tooltip.mode`)}: ${d(`components.form.tooltip.streaming_mode_mse`)}`,icon:We.value===`auto`?ft:We.value===`webrtc`?le:ge,command:()=>jt()},{label:Re.value===`always-on`?d(`components.form.tooltip.activity_mode_always_on`):Re.value===`standby`?d(`components.form.tooltip.activity_mode_standby`):d(`components.form.tooltip.activity_mode_activity`),icon:Re.value===`always-on`?he:Re.value===`standby`?G:it,command:()=>kt()},{label:Ve.value===`low-resolution`?`${d(`components.form.tooltip.resolution`)}: ${d(`components.form.tooltip.source_role_low`)}`:Ve.value===`mid-resolution`?`${d(`components.form.tooltip.resolution`)}: ${d(`components.form.tooltip.source_role_mid`)}`:`${d(`components.form.tooltip.resolution`)}: ${d(`components.form.tooltip.source_role_high`)}`,icon:Ve.value===`low-resolution`?ue:Ve.value===`mid-resolution`?W:de,command:()=>At()}]),$=z(()=>{let e=N.value?.result.find(e=>e._id===T.value.camview.viewid)||N.value?.result[0];return e?(J.value=e,T.value.camview.viewid=e._id):J.value={},e}),ct=z(()=>$.value?.cameras?.map(e=>e.cameraId)??[]),{master:ut}=n(ct,{sourceRole:`low`}),dt=z(()=>ut.mode.value!==`idle`&&ut.currentTimestamp.value>0?Math.floor(ut.currentTimestamp.value/1e3):void 0),pt=z(()=>Q.value&&J.value.viewSize>0?J.value.viewSize:$.value?$.value.viewSize:1),mt=z(()=>{let e=[];for(let t of N.value?.result||[])e.push({label:t.name,active:t._id===$.value?._id,onClick:()=>vt(t)});return e}),gt=z(()=>[{label:d(`views.camview.new_view`),icon:ht,onClick:()=>_t(`newView`)}]);function _t(e){switch(e){case`newView`:case`editView`:{let t=e===`editView`,n=d(t?`components.dialog.title.edit_view`:`components.dialog.title.new_view`);t?Y.value=!0:X.value=!0,y.openComponentDialog(Tn,{data:{title:n,loading:Ze,confirmText:d(`components.form.button.next`),contentProps:{form:t?J.value:void 0,type:`view`,cameras:D.value?.result||[],views:N.value?.result||[]}},onConfirm:e=>{e&&(J.value=e)},onCancel:()=>{X.value=!1}});break}case`intercom`:y.openComponentDialog(Ht,{data:{title:d(`components.dialog.title.intercom`),hideConfirmButton:!0,loading:Ze,contentProps:{}},events:{listening:Mt}});break;case`removeView`:y.openTextDialog({data:{title:d(`components.dialog.title.confirm`),confirmText:d(`components.form.button.remove`),contentText:d(`components.dialog.message.confirm_remove_layout`),confirmButtonProps:{severity:`danger`}},onConfirm:yt});break}}function vt(e){T.value.camview.viewid=e._id}function yt(){!$.value||!S.value||ae({username:S.value.username,viewid:$.value._id},{onSuccess:e=>{e.length?T.value.camview.viewid=e[0]._id:T.value.camview.viewid=void 0}})}async function bt(){if(!S.value||Object.keys(J.value).length===0)return;let e=qe.value.filter(e=>e.lastDroppedCamera).map(e=>({cameraId:e.lastDroppedCamera._id,index:e.index,colSpan:e.colSpan,rowSpan:e.rowSpan})).sort((e,t)=>e.index-t.index);if(!e.length)return;let t=f(J.value);t.cameras=e,t._id?Et(await se({username:S.value.username,viewid:t._id,viewData:t})):Et(await oe({username:S.value.username,viewData:t}))}function xt(e,t){qe.value[e].lastDroppedCamera=t}function St(e){qe.value=qe.value.map(t=>(t.lastDroppedCamera?.name===e.name&&(t.lastDroppedCamera=void 0),t))}function Ct(e){return`${b.value?`mobile`:`desktop`}:${e}`}function wt(e){let t=$.value?._id;t&&(T.value.camview.layouts||(T.value.camview.layouts={}),T.value.camview.layouts[Ct(t)]=e.map(e=>({index:e.index,cameraId:e.cameraId,x:e.x??0,y:e.y??0,w:e.colSpan??1,h:e.rowSpan??1})))}function Tt(e,t){Je.value[e._id]=t}function Et(e){T.value.camview.viewid=e._id,X.value=!1,Y.value=!1}function Dt(){q.value?.toggleFullscreen()}function Ot(){Le.value=!Le.value,q.value?.toggleAllPlayerMute(Le.value)}function kt(e){let t=Re.value;t=e||(t===`always-on`?`standby`:t===`standby`?`activity`:`always-on`),q.value?.toggleAllPlayerActivityMode(t),Re.value=t}async function At(e){let t=Ve.value;t=e||(t===`low-resolution`?`mid-resolution`:t===`mid-resolution`?`high-resolution`:`low-resolution`),await q.value?.toggleAllPlayerSourceRole(t),Ve.value=t}async function jt(e){let t=We.value;t===`auto`&&(t=`webrtc`);let n=e||(t===`mse`?`webrtc`:`mse`);await q.value?.toggleAllPlayerStreamingMode(n),We.value=n}async function Mt(e){await q.value?.toggleAllPlayerMicrophone(e)}return m(je,e=>{e&&(Ne.value=!0)}),m([pt,$,D,Q,T,b],()=>{let e=Array.from({length:pt.value}).map((e,t)=>({accept:`camera`,index:t,lastDroppedCamera:void 0}));if(!X.value){let t=$.value?._id,n=t?Ct(t):void 0,r=n?T.value.camview.layouts?.[n]:void 0,i=new Set(D.value?.result.map(e=>e._id)??[]),a=!1;for(let t of $.value?.cameras||[]){if(!e[t.index])continue;let n=D.value?.result.find(e=>e._id===t.cameraId);e[t.index].lastDroppedCamera=n;let o=r?.find(e=>e.index===t.index);o&&(!o.cameraId||i.has(o.cameraId)?(e[t.index].x=o.x,e[t.index].y=o.y,e[t.index].colSpan=o.w,e[t.index].rowSpan=o.h):a=!0)}a&&n&&T.value.camview.layouts?.[n]&&(T.value.camview.layouts[n]=T.value.camview.layouts[n].filter(e=>!e.cameraId||i.has(e.cameraId)))}qe.value=e},{deep:!0,immediate:!0}),(e,n)=>{let r=Ke,a=nt,s=ze,c=$e,l=Xe,u=K,d=fe,f=De,p=Ue,m=Be,_=He,y=Ge,S=o,E=Ae,O=t,k=ke,M=Pe,F=Te;return U(),P(`div`,En,[H(y,{"left-offset":C(Qe),animate:``},{left:I(()=>[!C(X)&&C($)?(U(),j(r,{key:0,type:`dropdown`,label:C($).name,"menu-open":C(we)?.isOpen,disabled:C(Ze)||C(Y),onClick:n[0]||=e=>C(we)?.toggleMenu(e)},null,8,[`label`,`menu-open`,`disabled`])):C(X)&&C(J).name?(U(),j(r,{key:1,label:C(J).name,disabled:C(Ze)},null,8,[`label`,`disabled`])):L(``,!0)]),right:I(()=>[!C(Q)&&C($)?R((U(),j(r,{key:0,active:C(Z),onClick:n[1]||=e=>Z.value=!C(Z)},{icon:I(()=>[C(Z)?(U(),j(s,{key:1,width:`100%`,height:`100%`})):(U(),j(a,{key:0,width:`100%`,height:`100%`}))]),_:1},8,[`active`])),[[F,{value:C(Z)?e.$t(`views.camview.rearrange_done`):e.$t(`views.camview.rearrange`)},void 0,{bottom:!0}]]):L(``,!0),!C(Q)&&C($)&&C(Z)&&!C(b)?R((U(),j(r,{key:1,onClick:n[2]||=e=>C(q)?.fitAspectRatios()},{icon:I(()=>[H(c,{width:`100%`,height:`100%`})]),_:1})),[[F,{value:e.$t(`views.camview.rearrange_fit_aspect`)},void 0,{bottom:!0}]]):L(``,!0),!C(Q)&&C($)&&C(Z)&&!C(b)?R((U(),j(r,{key:2,onClick:n[3]||=e=>C(q)?.compactGrid()},{icon:I(()=>[H(l,{width:`100%`,height:`100%`})]),_:1})),[[F,{value:e.$t(`views.camview.rearrange_auto`)},void 0,{bottom:!0}]]):L(``,!0),!C(Q)&&C($)?R((U(),j(r,{key:3,active:C(je),onClick:n[4]||=e=>je.value=!C(je)},{icon:I(()=>[C(je)?(U(),j(d,{key:1,width:`100%`,height:`100%`})):(U(),j(u,{key:0,width:`100%`,height:`100%`}))]),_:1},8,[`active`])),[[F,{value:C(je)?e.$t(`components.form.tooltip.hide_timeline`):e.$t(`components.form.tooltip.show_timeline`)},void 0,{bottom:!0}]]):L(``,!0),!C(Q)&&C($)?(U(),j(f,{key:4,layout:`vertical`})):L(``,!0),!C(Q)&&C($)?R((U(),j(r,{key:5,disabled:C(Z),onClick:n[5]||=e=>_t(`removeView`)},{icon:I(()=>[H(p,{width:`100%`,height:`100%`})]),_:1},8,[`disabled`])),[[F,{value:e.$t(`components.form.tooltip.delete`)},void 0,{bottom:!0}]]):L(``,!0),!C(Y)&&!C(X)&&C($)?R((U(),j(r,{key:6,disabled:C(Z),onClick:n[6]||=e=>Y.value=!0},{icon:I(()=>[H(m,{width:`100%`,height:`100%`})]),_:1},8,[`disabled`])),[[F,{value:e.$t(`components.form.tooltip.edit`)},void 0,{bottom:!0}]]):L(``,!0),!C(Y)&&!C(X)?R((U(),j(r,{key:7,disabled:C(Z),onClick:C(Ee)?.toggleMenu},{icon:I(()=>[H(_,{class:g([`transform transition-transform duration-300`,{"rotate-45":C(Ee)?.isOpen}]),width:`100%`,height:`100%`},null,8,[`class`])]),_:1},8,[`disabled`,`onClick`])),[[F,{value:e.$t(`components.form.tooltip.new`)},void 0,{bottom:!0}]]):L(``,!0),C(Y)||C(X)?(U(),j(r,{key:8,label:e.$t(`components.form.button.cancel`),onClick:n[7]||=e=>C(Y)?Y.value=!1:X.value=!1},null,8,[`label`])):L(``,!0),C(Y)||C(X)?(U(),j(r,{key:9,label:e.$t(`components.form.button.save`),disabled:C(qe).every(e=>e.lastDroppedCamera===void 0),primary:``,onClick:bt},null,8,[`label`,`disabled`])):L(``,!0)]),_:1},8,[`left-offset`]),A(`div`,{class:g([`w-full h-full flex relative`,{"flex-row":C(x),"flex-col":!C(x)}]),style:w({paddingTop:`${C(55)}px`})},[A(`div`,{class:g([`flex relative z-1 camview-content-transition`,{"h-full items-center justify-center":C(x)||!C(N)?.result.length,"w-full items-start justify-start":!C(x)&&C(N)?.result.length}]),style:w(C(rt))},[C(Ze)?(U(),P(`div`,Dn,[(U(),j(S,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`}))])):!C($)&&!C(X)?(U(),P(`div`,On,[A(`div`,kn,[H(E,{class:`w-12 h-12 text-muted`}),A(`span`,An,v(e.$t(`views.camview.no_views_configured`)),1)])])):C($)||C(X)?(U(),P(`div`,{key:2,class:g([`w-full h-full`,{"p-2 pb-0":!C(b)}])},[(U(),j(Rt,{ref_key:`viewDndRef`,ref:q,key:C(T).camview.viewid+(C(X)?`-new`:C(Y)?`-edit`:`-view`),cameras:C(D)?.result||[],"edit-mode":C(X)||C(Y),"rearrange-mode":C(Z),"view-size":C(X)?C(J).viewSize:C(pt),title:C(J).name,cards:C(qe),"camera-card-props":C(tt),"camera-card-models":C(Ye),onDrop:xt,onRemove:St,onChangeViewSize:n[8]||=e=>_t(`editView`),onExpand:Tt,onRearrange:wt},null,8,[`cameras`,`edit-mode`,`rearrange-mode`,`view-size`,`title`,`cards`,`camera-card-props`,`camera-card-models`]))],2)):L(``,!0)],6),H(h,{name:C(x)?`slide-left`:`slide-up`,onBeforeEnter:n[9]||=e=>Me.value=!0,onAfterEnter:n[10]||=e=>Ne.value=!1,onBeforeLeave:n[11]||=e=>Me.value=!1},{default:I(()=>[C(je)?(U(),j(C(i),{key:0,"camera-ids":C(ct),"initial-timestamp":C(dt),loading:C(Ne),type:C(x)?`vertical`:`horizontal`,"dark-mode":``,"md-breakpoint":C(re),class:g([`shrink-0 transition-[left] duration-200`,{"h-full w-[400px] pt-2 pr-2":C(x),"h-[200px] pt-2 px-2 pb-2 pb-safe-offset fixed right-safe-offset-0 z-10":!C(x),"p-0! pt-2! border-color":C(b)}]),"card-class":{"!shadow-xl":!0,"!rounded-none border-l-0! border-r-0!":C(b)},style:w(C(x)?void 0:{left:`${C(Qe)}px`,bottom:`calc(${C(ne)}px + env(safe-area-inset-bottom, 0px))`}),"locale-settings":C(et)},null,8,[`camera-ids`,`initial-timestamp`,`loading`,`type`,`md-breakpoint`,`class`,`card-class`,`style`,`locale-settings`])):L(``,!0)]),_:1},8,[`name`])],6),!C(Q)&&C($)?(U(),j(k,{key:0,model:C(ot),direction:`up`,"transition-delay":80,"tooltip-options":{position:`left`,event:void 0},class:`absolute right-2 z-11 dark-mode`,pt:{root:{style:`pointer-events: none`}},style:w({bottom:C(x)?`0`:`calc(${C(Me)?192:0}px + ${C(ne)>0?`0.5rem`:`0px`})`,right:C(x)?`calc(${C(Me)?400:0}px + 0.5rem)`:`0.5rem`,transition:`bottom 0.25s ease-out, right 0.25s ease-out`})},{button:I(({visible:e,toggleCallback:t})=>[H(O,{severity:`secondary`,class:g([`dark-mode opacity-40 hover:opacity-100 active:opacity-100 focus:opacity-100 transition pointer-events-auto`,{"opacity-100":e}]),rounded:``,loading:C(Ze),onClick:t},{icon:I(()=>[A(`div`,jn,[A(`div`,{class:g([`bg-white absolute top-0.5 left-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full transform transition-all duration-100 origin-center`,{"w-4 h-[2px] rotate-45 top-1/2 -translate-y-1/2 rounded-none":e}])},null,2),A(`div`,{class:g([`bg-white absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 rounded-full transition-all duration-100`,{"opacity-0 scale-0":e}])},null,2),A(`div`,{class:g([`bg-white absolute bottom-0.5 left-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full transform transition-all duration-100 origin-center`,{"w-4 h-[2px] -rotate-45 bottom-1/2 translate-y-1/2 rounded-none":e}])},null,2)])]),_:2},1032,[`class`,`loading`,`onClick`])]),item:I(({item:e,toggleCallback:t})=>[R((U(),j(O,ee({loading:C(Ze),severity:`secondary`},e.buttonProps,{rounded:``,onClick:t}),{icon:I(()=>[(U(),j(te(e.icon)))]),_:2},1040,[`loading`,`onClick`])),[[F,{value:e.label}]])]),_:1},8,[`model`,`style`])):L(``,!0),H(M,{ref_key:`menuRef`,ref:we,items:C(mt),class:`dark-mode`,popover:{pt:{content:{class:`p-0! rounded-xl! overflow-hidden!`}}}},null,8,[`items`]),H(M,{ref_key:`newViewMenuRef`,ref:Ee,items:C(gt),class:`dark-mode`,popover:{pt:{content:{class:`p-0! rounded-xl! overflow-hidden!`}}}},null,8,[`items`])])}}}),[[`__scopeId`,`data-v-6ee3e146`]]);export{Mn as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ace.config-D884GuRj.js","assets/rolldown-runtime-DAXXjFlN.js","assets/vendor-ace-DdrK3_G3.js","assets/ace-DQ1lNH50.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{$t as t,Hn as n,Pi as r,Vn as i,fi as a}from"./vendor-cameraui-DgSMexWY.js";import{A as o,C as s,D as c,P as l,T as u}from"./api-Cntxdwiu.js";import{$ as d,$n as f,An as p,Cr as m,Gn as h,Ln as g,On as _,Rn as v,Sr as y,Wt as b,Y as x,Yn as S,Zn as C,_r as w,br as T,dn as E,fn as D,kn as O,lr as k,mn as A,mr as j,nn as M,nr as N,rn as P,rr as F,sn as I,tr as L,un as R,ur as z,xn as B,yn as V,zn as H}from"./vendor-DoIl6acN.js";import{f as U}from"./vendor-core-BKHiXSX7.js";import{t as W}from"./useSharedComposables-gpJ--qZh.js";import{n as ee}from"./ui-DrzKhUXW.js";import{J as te,o as ne}from"./vendor-primevue-7iEzPOvf.js";import{t as re}from"./useCuiDialog-j9ybKsCK.js";import{t as ie}from"./CuiTopbarSlot-ac4GLLbf.js";import{t as G}from"./theme-cGiCxaXN.js";import{t as ae}from"./server-GaO6jF81.js";import{t as oe}from"./back-filled-DqCMpeEk.js";import{n as se,t as ce}from"./zoom-in-D2zo_jfL.js";var K={lang:`yaml`,readOnly:!1,printMargin:!1,borderRadius:!1,border:!0},q={useWorker:!0,wrap:!0,showPrintMargin:!1,tabSize:2,highlightGutterLine:!0,useSoftTabs:!0,dragEnabled:!1,showGutter:!0,scrollPastEnd:.1},le=B({__name:`CuiEditor`,props:O(_({lang:{},readOnly:{type:Boolean},printMargin:{type:[Number,Boolean]},options:{},placeholder:{},borderRadius:{type:Boolean},borderTopRightRadius:{type:Boolean},borderBottomRightRadius:{type:Boolean},borderBottomLeftRadius:{type:Boolean},borderTopLeftRadius:{type:Boolean},border:{type:Boolean}},K),{modelValue:{required:!0},modelModifiers:{}}),emits:O([`init`,`blur`,`input`,`change`,`changeSelectionStyle`,`changeSession`,`copy`,`focus`,`paste`,`update:value`],[`update:modelValue`]),async setup(t,{emit:n}){let i,a;M(e=>({v3cc736da:y(te),v66726fab:y(W),v58e243dc:y(V),v527a6c67:y(ee),v244c42c0:y(B)})),[i,a]=L(()=>b(()=>import(`./ace.config-D884GuRj.js`),__vite__mapDeps([0,1,2]))),await i,a();let o=([i,a]=L(()=>b(()=>import(`./ace-DQ1lNH50.js`).then(t=>e(t.default,1)),__vite__mapDeps([3,2,1]))),i=await i,a(),i),s=t,c=n,l=S(t,`modelValue`),{theme:u}=U(G()),{readOnly:d,options:p,lang:m,printMargin:h,placeholder:_,borderRadius:x,borderBottomLeftRadius:E,borderTopLeftRadius:D,borderTopRightRadius:O,borderBottomRightRadius:k,border:N}=T(s),P=C(`editorRef`),F=w(),I=j(!1),z=j(``),B=R(()=>x.value||O.value?`10px`:`0px`),V=R(()=>x.value||k.value?`10px`:`0px`),W=R(()=>x.value||E.value?`10px`:`0px`),ee=R(()=>x.value||D.value?`10px`:`0px`),te=R(()=>N.value?`1px solid var(--border-color)`:`none`);return r(P,()=>{F.value&&F.value.resize(!0)}),f(l,e=>{if(z.value!==e){try{I.value=!0,F.value?.setValue(e,1)}finally{I.value=!1}z.value=e}}),f(m,e=>{F.value?.setOption(`mode`,`ace/mode/`+e)}),f(p,e=>{e&&F.value?.setOptions(e)}),f(_,e=>{e!==void 0&&F.value?.setOption(`placeholder`,e)}),f(d,e=>{F.value?.setReadOnly(e)}),f(h,e=>{F.value?.setOption(`printMargin`,e)}),f(u,e=>{if(F.value){let t=e===`dark`?`twilight`:`github`;F.value.setOption(`theme`,`ace/theme/`+t)}}),g(()=>{P.value&&(F.value=o.edit(P.value,{placeholder:_.value,readOnly:d.value,value:l.value,mode:`ace/mode/`+m.value,theme:u.value===`dark`?`ace/theme/twilight`:`ace/theme/github`,printMargin:h.value,fadeFoldWidgets:!0,...q,...p.value}),F.value.on(`change`,()=>{if(I.value)return;let e=F.value.getValue();z.value=e,l.value=e}),F.value.on(`blur`,e=>{c(`blur`,e)}),F.value.on(`input`,()=>{c(`input`)}),F.value.on(`change`,e=>{c(`change`,e)}),F.value.on(`changeSelectionStyle`,e=>{c(`changeSelectionStyle`,e)}),F.value.on(`changeSession`,e=>{c(`changeSession`,e)}),F.value.on(`copy`,e=>{c(`copy`,e)}),F.value.on(`focus`,e=>{c(`focus`,e)}),F.value.on(`paste`,e=>{c(`paste`,e.text)}),c(`init`,F.value))}),v(()=>{F.value?.removeAllListeners(),F.value?.destroy()}),(e,t)=>(H(),A(`div`,{ref_key:`editorRef`,ref:P,class:`h-full bg-none`},null,512))}}),J=[`fill`],ue=B({__name:`CuiGo2RtcIcon`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=T(e);return(e,n)=>(H(),A(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,role:`img`,"aria-hidden":`true`,fill:y(t)},[...n[0]||=[E(`path`,{d:`M 10.859375 7.105469 C 10.242188 7.195312 9.65625 7.367188 9.226562 7.585938 C 8.269531 8.070312 7.378906 9.0625 7.027344 10.054688 C 6.574219 11.328125 6.816406 12.757812 7.625 13.601562 L 7.796875 13.78125 L 7.304688 16.078125 L 6.8125 18.378906 L 7.472656 18.390625 C 7.835938 18.394531 8.140625 18.390625 8.148438 18.382812 C 8.160156 18.375 8.210938 18.164062 8.265625 17.910156 C 8.316406 17.664062 8.386719 17.328125 8.425781 17.167969 L 8.484375 16.878906 L 8.957031 16.878906 L 9.035156 17.148438 C 9.078125 17.300781 9.171875 17.628906 9.242188 17.878906 C 9.3125 18.132812 9.378906 18.351562 9.394531 18.371094 C 9.410156 18.386719 9.730469 18.394531 10.109375 18.390625 L 10.792969 18.378906 L 10.539062 17.558594 L 10.289062 16.738281 L 10.476562 16.644531 C 11.042969 16.355469 11.394531 15.730469 11.347656 15.085938 C 11.335938 14.914062 11.316406 14.738281 11.300781 14.695312 C 11.277344 14.617188 11.300781 14.601562 11.539062 14.519531 C 11.683594 14.472656 11.8125 14.441406 11.820312 14.449219 C 11.832031 14.457031 11.820312 14.527344 11.800781 14.605469 C 11.714844 14.890625 11.691406 14.878906 12.378906 14.878906 C 12.757812 14.878906 13 14.894531 13 14.921875 C 13 14.941406 12.839844 15.714844 12.640625 16.648438 C 12.445312 17.574219 12.28125 18.347656 12.28125 18.367188 C 12.28125 18.382812 12.578125 18.398438 12.953125 18.398438 L 13.621094 18.398438 L 13.9375 16.90625 C 14.109375 16.09375 14.277344 15.300781 14.308594 15.148438 L 14.367188 14.878906 L 15 14.878906 C 15.703125 14.878906 15.648438 14.902344 15.703125 14.578125 C 15.738281 14.355469 15.738281 14.355469 15.933594 14.4375 C 16.023438 14.476562 16.132812 14.519531 16.171875 14.535156 C 16.238281 14.554688 16.234375 14.574219 16.128906 14.726562 C 15.957031 14.980469 15.820312 15.265625 15.71875 15.578125 C 15.613281 15.9375 15.566406 16.652344 15.636719 17.003906 C 15.828125 17.972656 16.679688 18.539062 17.820312 18.46875 C 18.847656 18.398438 19.636719 17.816406 19.894531 16.925781 C 19.933594 16.804688 19.960938 16.691406 19.960938 16.671875 C 19.960938 16.65625 19.664062 16.640625 19.304688 16.640625 L 18.648438 16.640625 L 18.605469 16.773438 C 18.492188 17.113281 18.128906 17.363281 17.742188 17.367188 C 17.425781 17.371094 17.246094 17.269531 17.113281 17 C 17.011719 16.8125 17 16.738281 17 16.421875 C 17 15.707031 17.273438 15.148438 17.730469 14.914062 C 17.972656 14.792969 18.371094 14.820312 18.570312 14.972656 C 18.761719 15.113281 18.8125 15.210938 18.839844 15.460938 L 18.859375 15.660156 L 19.507812 15.671875 L 20.15625 15.679688 L 20.167969 15.570312 C 20.191406 15.359375 20.121094 14.953125 20.027344 14.742188 C 19.976562 14.632812 19.859375 14.460938 19.773438 14.363281 L 19.613281 14.183594 L 19.914062 13.988281 C 20.332031 13.71875 20.945312 13.09375 21.234375 12.636719 C 21.847656 11.691406 22.007812 10.464844 21.65625 9.398438 C 21.335938 8.4375 20.453125 7.621094 19.390625 7.316406 C 18.757812 7.136719 17.792969 7.175781 16.941406 7.421875 C 15.765625 7.757812 14.792969 8.617188 14.238281 9.808594 L 14.058594 10.199219 L 12.449219 10.199219 C 11.351562 10.199219 10.808594 10.214844 10.753906 10.242188 C 10.640625 10.304688 10.070312 11.488281 10.089844 11.632812 C 10.097656 11.703125 10.132812 11.742188 10.199219 11.765625 C 10.257812 11.78125 10.726562 11.792969 11.253906 11.796875 L 12.203125 11.800781 L 12.089844 11.96875 C 11.289062 13.128906 9.621094 13.109375 9.066406 11.929688 C 8.964844 11.703125 8.941406 11.601562 8.929688 11.300781 C 8.894531 10.535156 9.171875 9.925781 9.738281 9.492188 C 10.574219 8.855469 11.453125 8.859375 12.125 9.5 L 12.351562 9.714844 L 12.863281 9.574219 C 13.148438 9.5 13.523438 9.398438 13.699219 9.355469 C 14.28125 9.210938 14.292969 9.203125 14.261719 9.085938 C 14.222656 8.941406 14.027344 8.609375 13.808594 8.316406 C 13.449219 7.835938 12.675781 7.34375 12.039062 7.183594 C 11.78125 7.117188 11.085938 7.070312 10.859375 7.105469 Z M 18.886719 9.1875 C 19.378906 9.421875 19.710938 9.875 19.8125 10.464844 C 19.867188 10.796875 19.785156 11.261719 19.59375 11.636719 C 19.34375 12.128906 18.726562 12.628906 18.183594 12.78125 C 17.867188 12.871094 17.347656 12.84375 17.027344 12.722656 C 16.207031 12.40625 15.808594 11.511719 16.085938 10.617188 C 16.304688 9.886719 16.773438 9.40625 17.496094 9.152344 C 17.785156 9.050781 17.863281 9.039062 18.21875 9.046875 C 18.570312 9.058594 18.652344 9.074219 18.886719 9.1875 Z M 14.597656 11.570312 C 14.925781 11.789062 14.964844 12.164062 14.691406 12.476562 C 14.617188 12.566406 14.367188 12.785156 14.144531 12.953125 L 13.738281 13.261719 L 14.203125 13.273438 L 14.671875 13.285156 L 14.578125 13.699219 L 13.726562 13.710938 C 13.265625 13.714844 12.878906 13.710938 12.878906 13.699219 C 12.878906 13.683594 12.898438 13.597656 12.925781 13.496094 C 12.96875 13.328125 13.003906 13.289062 13.519531 12.894531 C 14.117188 12.445312 14.320312 12.242188 14.320312 12.113281 C 14.320312 11.875 13.964844 11.792969 13.78125 11.980469 C 13.722656 12.03125 13.679688 12.097656 13.679688 12.121094 C 13.679688 12.144531 13.574219 12.160156 13.421875 12.160156 C 13.125 12.160156 13.109375 12.136719 13.238281 11.878906 C 13.390625 11.585938 13.695312 11.4375 14.125 11.449219 C 14.375 11.460938 14.453125 11.476562 14.597656 11.570312 Z M 9.65625 14.84375 C 9.902344 14.910156 10 15.035156 10 15.292969 C 10 15.546875 9.890625 15.730469 9.679688 15.84375 C 9.566406 15.902344 9.453125 15.921875 9.109375 15.921875 C 8.710938 15.921875 8.675781 15.910156 8.695312 15.847656 C 8.71875 15.777344 8.921875 14.847656 8.921875 14.816406 C 8.921875 14.78125 9.507812 14.804688 9.65625 14.84375 Z M 9.65625 14.84375 M 3.019531 9.1875 C 2.945312 9.273438 2.878906 9.351562 2.878906 9.363281 C 2.878906 9.414062 3.59375 9.441406 5.046875 9.441406 L 6.554688 9.441406 L 6.675781 9.265625 C 6.742188 9.167969 6.785156 9.078125 6.773438 9.0625 C 6.757812 9.050781 5.941406 9.039062 4.953125 9.039062 L 3.15625 9.039062 Z M 3.019531 9.1875 M 1.617188 9.992188 C 1.597656 10.007812 1.523438 10.089844 1.464844 10.167969 L 1.351562 10.320312 L 6.195312 10.320312 L 6.234375 10.167969 C 6.261719 10.089844 6.28125 10.007812 6.28125 9.988281 C 6.28125 9.953125 1.671875 9.953125 1.617188 9.992188 Z M 1.617188 9.992188 M 3.882812 11.015625 C 3.835938 11.089844 3.800781 11.167969 3.800781 11.1875 C 3.800781 11.222656 4.882812 11.28125 5.644531 11.28125 C 6.035156 11.28125 6.09375 11.246094 6.070312 11.03125 L 6.058594 10.898438 L 5.011719 10.886719 L 3.96875 10.878906 Z M 3.882812 11.015625 `},null,-1)]],8,J))}}),Y=[`fill`],de=B({__name:`CuiCameraUiIcon`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=T(e);return(e,n)=>(H(),A(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,role:`img`,"aria-hidden":`true`,fill:y(t)},[...n[0]||=[E(`path`,{d:`M 17.335938 2.410156 C 16.851562 2.484375 16.515625 2.625 16.160156 2.90625 C 15.636719 3.320312 15.320312 3.980469 15.320312 4.652344 C 15.320312 5.019531 15.390625 5.324219 15.550781 5.652344 C 15.9375 6.4375 16.710938 6.917969 17.585938 6.917969 C 18.234375 6.917969 18.789062 6.683594 19.242188 6.210938 C 19.539062 5.90625 19.746094 5.5 19.828125 5.078125 C 19.863281 4.894531 19.867188 4.492188 19.839844 4.3125 C 19.761719 3.839844 19.542969 3.414062 19.203125 3.074219 C 18.878906 2.746094 18.5 2.542969 18.046875 2.445312 C 17.902344 2.417969 17.453125 2.394531 17.335938 2.410156 Z M 17.335938 2.410156 M 6.160156 4.90625 C 5.589844 4.953125 5.0625 5.191406 4.714844 5.554688 C 4.5625 5.710938 4.386719 5.96875 4.300781 6.164062 C 4.144531 6.515625 4.046875 7.289062 3.953125 8.933594 C 3.921875 9.488281 3.921875 11.171875 3.953125 11.746094 L 3.980469 12.195312 L 4.226562 12.675781 C 5.1875 14.515625 5.785156 15.28125 6.789062 15.945312 C 7.546875 16.453125 8.503906 16.785156 9.453125 16.875 C 9.605469 16.890625 9.875 16.894531 10.195312 16.886719 C 10.742188 16.878906 11.019531 16.84375 11.503906 16.722656 C 12.375 16.503906 13.246094 16.054688 13.835938 15.519531 C 13.945312 15.421875 13.929688 15.402344 13.808594 15.476562 C 13.445312 15.710938 12.902344 15.917969 12.476562 15.984375 C 12.207031 16.027344 11.738281 16.015625 11.472656 15.957031 C 11.023438 15.863281 10.558594 15.652344 10.21875 15.394531 C 9.984375 15.222656 9.65625 14.882812 9.492188 14.652344 C 9.097656 14.097656 8.859375 13.347656 8.773438 12.394531 C 8.761719 12.25 8.75 11.433594 8.746094 10.304688 C 8.742188 9.28125 8.730469 8.300781 8.71875 8.128906 C 8.671875 7.410156 8.558594 6.570312 8.476562 6.328125 C 8.355469 5.988281 8.058594 5.613281 7.734375 5.398438 C 7.535156 5.269531 7.136719 5.078125 6.925781 5.007812 C 6.742188 4.945312 6.4375 4.890625 6.308594 4.898438 C 6.269531 4.898438 6.199219 4.902344 6.160156 4.90625 Z M 6.160156 4.90625 M 17.46875 7.671875 C 17.25 7.691406 16.957031 7.769531 16.769531 7.851562 C 16.289062 8.058594 15.898438 8.460938 15.730469 8.925781 C 15.554688 9.410156 15.496094 9.828125 15.394531 11.429688 C 15.347656 12.128906 15.3125 12.507812 15.261719 12.871094 C 15.152344 13.628906 14.960938 14.242188 14.707031 14.667969 C 14.515625 14.988281 14.089844 15.480469 13.847656 15.664062 C 13.761719 15.726562 13.597656 15.851562 13.480469 15.9375 C 12.789062 16.460938 11.972656 16.808594 11.0625 16.976562 C 10.433594 17.089844 9.699219 17.09375 9.066406 16.984375 C 8.128906 16.824219 7.292969 16.472656 6.570312 15.9375 C 6.226562 15.683594 5.835938 15.308594 5.578125 14.980469 C 5.179688 14.484375 4.628906 13.570312 4.160156 12.632812 C 4.078125 12.46875 4.003906 12.335938 3.992188 12.335938 C 3.972656 12.335938 3.972656 12.460938 3.992188 12.890625 C 4.109375 14.992188 4.671875 16.917969 5.582031 18.328125 C 6.117188 19.15625 6.898438 19.9375 7.78125 20.523438 C 8.691406 21.128906 9.59375 21.492188 10.726562 21.703125 C 10.992188 21.753906 11.015625 21.757812 11.820312 21.765625 C 12.691406 21.773438 12.761719 21.765625 13.226562 21.683594 C 13.945312 21.550781 14.597656 21.328125 15.308594 20.980469 C 16.027344 20.625 16.527344 20.289062 17.089844 19.769531 C 18.839844 18.160156 19.894531 15.460938 20.0625 12.167969 C 20.097656 11.46875 20.082031 10.585938 20.023438 10.117188 C 19.929688 9.367188 19.65625 8.695312 19.285156 8.320312 C 18.84375 7.871094 18.089844 7.601562 17.46875 7.671875 Z M 17.46875 7.671875`},null,-1)]],8,Y))}}),X={viewBox:`0 0 20 20`,width:`1.2em`,height:`1.2em`};function Z(e,t){return H(),A(`svg`,X,[...t[0]||=[E(`path`,{fill:`currentColor`,d:`m15.3 5.3l-6.8 6.8l-2.8-2.8l-1.4 1.4l4.2 4.2l8.2-8.2z`},null,-1)]])}var fe=z({name:`dashicons-saved`,render:Z});async function Q({json:e,signal:t}){return(await l.get(`/config`,{params:{json:e},signal:t})).data}async function pe({json:e,signal:t}){return(await l.get(`/config/go2rtc`,{params:{json:e},signal:t})).data}async function me({configData:e}){return(await l.patch(`/config`,e,{headers:{"Content-Type":`text/yaml`}})).data}async function he({configData:e}){return(await l.patch(`/config/go2rtc`,e,{headers:{"Content-Type":`text/yaml`}})).data}async function $(){return(await l.delete(`/config`)).data}async function ge(){return(await l.delete(`/config/go2rtc`)).data}var _e=class{_queryClient=d();t=c.global.t;toast=u();queryActivator=j([{name:`getConfigQuery`,enabled:!0},{name:`getGo2RtcConfigQuery`,enabled:!0}]);get queryClient(){return this._queryClient}getConfigQuery(e=!1){return s({queryKey:[`config`,{json:e}],queryFn:({signal:t})=>Q({json:y(e),signal:t}),enabled:()=>this.queryActivator.value.some(e=>e.name===`getConfigQuery`&&e.enabled)})}getGo2RtcConfigQuery(e=!1){return s({queryKey:[`go2rtcConfig`],queryFn:({signal:t})=>pe({json:y(e),signal:t}),enabled:()=>this.queryActivator.value.some(e=>e.name===`getGo2RtcConfigQuery`&&e.enabled)})}patchConfigQuery(){return x({mutationFn:me,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`config`]}),this.toast.add({severity:`success`,detail:this.t(`components.toast.config_updated`),life:3e3})}})}patchGo2RtcConfigQuery(){return x({mutationFn:he,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`go2rtcConfig`]}),this.toast.add({severity:`success`,detail:this.t(`components.toast.config_go2rtc_updated`),life:3e3})}})}delteConfigQuery(){return x({mutationFn:$,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`config`]}),this.toast.add({severity:`success`,detail:this.t(`components.toast.config_deleted`),life:3e3})}})}delteGo2RtcConfigQuery(){return x({mutationFn:ge,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`go2rtcConfig`]}),this.toast.add({severity:`success`,detail:this.t(`components.toast.config_go2rtc_deleted`),life:3e3})}})}toggleQueryActivator(e,t){let n=this.queryActivator.value.find(t=>t.name===e);return n&&(n.enabled=t),this}},ve={class:`relative w-6 h-6`},ye={class:`w-full h-full`},be={class:`w-full h-full flex items-center justify-center`},xe=B({__name:`Config`,setup(e){let r=new _e,s=new ae,c=o(),l=re(),{t:u}=a(),{smBreakpoint:d}=W(),{uiSettings:_}=U(ee()),v=j(!1),{data:b,isBusy:x}=r.getConfigQuery(v),{data:S,isBusy:C}=r.getGo2RtcConfigQuery(v),{mutateAsync:w,isPending:T}=r.patchConfigQuery(),{mutateAsync:O,isPending:M}=r.patchGo2RtcConfigQuery(),{mutateAsync:L,isPending:z}=s.restartServerQuery(),{mutateAsync:B,isPending:G}=s.restartGo2RtcQuery(),K=j(`camera.ui`),q=j(``),J=j(``),Y=j(!1),X=j([{label:u(`components.dialog.title.confirm`),icon:fe,buttonProps:{severity:`success`},command:()=>{l.openTextDialog({data:{title:u(`components.dialog.title.confirm`),contentText:u(`components.dialog.message.confirm_restart_server`),confirmText:u(`components.form.button.save_and_restart`),confirmButtonProps:{loading:Z.value},cancelButtonProps:{loading:Z.value}},onConfirm:pe})}},{label:u(`components.form.tooltip.zoom_out`),icon:se,command:()=>{$()}},{label:u(`components.form.tooltip.zoom_in`),icon:ce,command:()=>{he()}}]),Z=R(()=>x.value||C.value||T.value||M.value||z.value||G.value),Q=R(()=>({fontSize:_.value.config.zoom}));async function pe(){try{K.value===`camera.ui`?(await w({configData:q.value}),await t(500),await L()):(await O({configData:J.value}),await t(500),await B())}catch(e){c.error(e)}}function me(){K.value=K.value===`camera.ui`?`go2rtc`:`camera.ui`}function he(){_.value.config.zoom!==20&&_.value.config.zoom++}function $(){_.value.config.zoom!==8&&_.value.config.zoom--}return f(b,()=>{q.value=b.value||``},{deep:!0,immediate:!0}),f(S,()=>{J.value=S.value||``},{deep:!0,immediate:!0}),g(async()=>{await t(100),Y.value=!0}),(e,t)=>{let r=oe,a=n,o=ie,s=ne,c=de,l=ue,u=le,f=i,g=te;return H(),A(`div`,null,[V(o,{position:`left`},{default:N(()=>[V(a,{severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:t[0]||=t=>e.$router.push(`/menu`)},{icon:N(()=>[V(r,{class:`w-6 h-6`})]),_:1})]),_:1}),V(s,{model:y(X),direction:`up`,"transition-delay":80,"tooltip-options":{position:`left`,event:void 0},class:`absolute right-3 bottom-3 z-2`,pt:{root:{style:`pointer-events: none`}}},{button:N(({visible:e,toggleCallback:t})=>[V(a,{severity:`secondary`,class:m([`opacity-40 hover:opacity-100 active:opacity-100 focus:opacity-100 transition pointer-events-auto`,{"opacity-100":e}]),rounded:``,loading:y(Z),onClick:t},{icon:N(()=>[E(`div`,ve,[E(`div`,{class:m([`absolute top-0.5 left-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full transform transition-all duration-100 origin-center`,{"w-4 h-[2px] rotate-45 top-1/2 -translate-y-1/2 rounded-none":e}]),style:{backgroundColor:`var(--text-color)`}},null,2),E(`div`,{class:m([`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 rounded-full transition-all duration-100`,{"opacity-0 scale-0":e}]),style:{backgroundColor:`var(--text-color)`}},null,2),E(`div`,{class:m([`absolute bottom-0.5 left-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full transform transition-all duration-100 origin-center`,{"w-4 h-[2px] -rotate-45 bottom-1/2 translate-y-1/2 rounded-none":e}]),style:{backgroundColor:`var(--text-color)`}},null,2)])]),_:2},1032,[`class`,`loading`,`onClick`])]),item:N(({item:e,toggleCallback:t})=>[F((H(),D(a,p({loading:y(Z),severity:`secondary`},e.buttonProps,{rounded:``,onClick:t}),{icon:N(()=>[(H(),D(h(e.icon)))]),_:2},1040,[`loading`,`onClick`])),[[g,{value:e.label}]])]),_:1},8,[`model`]),V(a,{class:`opacity-40 hover:opacity-100 active:opacity-100 focus:opacity-100 transition absolute bottom-3 right-14 z-2`,rounded:``,loading:y(Z),onClick:me},{icon:N(()=>[y(K)===`camera.ui`?F((H(),D(c,{key:0,class:`fill-white w-[30px]`},null,512)),[[g,{value:`camera.ui`}]]):F((H(),D(l,{key:1,class:`fill-white w-[30px]`},null,512)),[[g,{value:`go2rtc`}]])]),_:1},8,[`loading`]),E(`div`,ye,[(H(),D(I,null,{fallback:N(()=>[E(`div`,be,[V(f,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])]),default:N(()=>[y(K)===`camera.ui`?F((H(),D(u,{key:0,modelValue:y(q),"onUpdate:modelValue":t[1]||=e=>k(q)?q.value=e:null,lang:`yaml`,options:y(Q),"read-only":y(Z),border:!y(d),"border-bottom-left-radius":!y(d),"border-bottom-right-radius":!y(d),"border-top-right-radius":!1,"border-top-left-radius":!1},null,8,[`modelValue`,`options`,`read-only`,`border`,`border-bottom-left-radius`,`border-bottom-right-radius`])),[[P,y(Y)]]):F((H(),D(u,{key:1,modelValue:y(J),"onUpdate:modelValue":t[2]||=e=>k(J)?J.value=e:null,lang:`yaml`,options:y(Q),"read-only":y(Z),"border-radius":!y(d),border:!y(d)},null,8,[`modelValue`,`options`,`read-only`,`border-radius`,`border`])),[[P,y(Y)]])]),_:1}))])])}}});export{xe as default};
|
|
2
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{$t as t,Hn as n,Pi as r,Vn as i,fi as a}from"./vendor-cameraui-DgSMexWY.js";import{A as o,C as s,D as c,P as l,T as u}from"./api-aSYFKxo6.js";import{$ as d,$n as f,An as p,Cr as m,Gn as h,Ln as g,On as _,Rn as v,Sr as y,Wt as b,Y as x,Yn as S,Zn as C,_r as w,br as T,dn as E,fn as D,kn as O,lr as k,mn as A,mr as j,nn as M,nr as N,rn as P,rr as F,sn as I,tr as L,un as R,ur as z,xn as B,yn as V,zn as H}from"./vendor-DoIl6acN.js";import{f as U}from"./vendor-core-BKHiXSX7.js";import{t as W}from"./useSharedComposables-gpJ--qZh.js";import{n as ee}from"./ui-DrzKhUXW.js";import{J as te,o as ne}from"./vendor-primevue-7iEzPOvf.js";import{t as re}from"./useCuiDialog-DHktK-mZ.js";import{t as ie}from"./CuiTopbarSlot-ac4GLLbf.js";import{t as G}from"./theme-DhaXe7yA.js";import{t as ae}from"./server-CRxodRik.js";import{t as oe}from"./back-filled-DqCMpeEk.js";import{n as se,t as ce}from"./zoom-in-D2zo_jfL.js";var K={lang:`yaml`,readOnly:!1,printMargin:!1,borderRadius:!1,border:!0},q={useWorker:!0,wrap:!0,showPrintMargin:!1,tabSize:2,highlightGutterLine:!0,useSoftTabs:!0,dragEnabled:!1,showGutter:!0,scrollPastEnd:.1},le=B({__name:`CuiEditor`,props:O(_({lang:{},readOnly:{type:Boolean},printMargin:{type:[Number,Boolean]},options:{},placeholder:{},borderRadius:{type:Boolean},borderTopRightRadius:{type:Boolean},borderBottomRightRadius:{type:Boolean},borderBottomLeftRadius:{type:Boolean},borderTopLeftRadius:{type:Boolean},border:{type:Boolean}},K),{modelValue:{required:!0},modelModifiers:{}}),emits:O([`init`,`blur`,`input`,`change`,`changeSelectionStyle`,`changeSession`,`copy`,`focus`,`paste`,`update:value`],[`update:modelValue`]),async setup(t,{emit:n}){let i,a;M(e=>({v3cc736da:y(te),v66726fab:y(W),v58e243dc:y(V),v527a6c67:y(ee),v244c42c0:y(B)})),[i,a]=L(()=>b(()=>import(`./ace.config-D884GuRj.js`),__vite__mapDeps([0,1,2]))),await i,a();let o=([i,a]=L(()=>b(()=>import(`./ace-DQ1lNH50.js`).then(t=>e(t.default,1)),__vite__mapDeps([3,2,1]))),i=await i,a(),i),s=t,c=n,l=S(t,`modelValue`),{theme:u}=U(G()),{readOnly:d,options:p,lang:m,printMargin:h,placeholder:_,borderRadius:x,borderBottomLeftRadius:E,borderTopLeftRadius:D,borderTopRightRadius:O,borderBottomRightRadius:k,border:N}=T(s),P=C(`editorRef`),F=w(),I=j(!1),z=j(``),B=R(()=>x.value||O.value?`10px`:`0px`),V=R(()=>x.value||k.value?`10px`:`0px`),W=R(()=>x.value||E.value?`10px`:`0px`),ee=R(()=>x.value||D.value?`10px`:`0px`),te=R(()=>N.value?`1px solid var(--border-color)`:`none`);return r(P,()=>{F.value&&F.value.resize(!0)}),f(l,e=>{if(z.value!==e){try{I.value=!0,F.value?.setValue(e,1)}finally{I.value=!1}z.value=e}}),f(m,e=>{F.value?.setOption(`mode`,`ace/mode/`+e)}),f(p,e=>{e&&F.value?.setOptions(e)}),f(_,e=>{e!==void 0&&F.value?.setOption(`placeholder`,e)}),f(d,e=>{F.value?.setReadOnly(e)}),f(h,e=>{F.value?.setOption(`printMargin`,e)}),f(u,e=>{if(F.value){let t=e===`dark`?`twilight`:`github`;F.value.setOption(`theme`,`ace/theme/`+t)}}),g(()=>{P.value&&(F.value=o.edit(P.value,{placeholder:_.value,readOnly:d.value,value:l.value,mode:`ace/mode/`+m.value,theme:u.value===`dark`?`ace/theme/twilight`:`ace/theme/github`,printMargin:h.value,fadeFoldWidgets:!0,...q,...p.value}),F.value.on(`change`,()=>{if(I.value)return;let e=F.value.getValue();z.value=e,l.value=e}),F.value.on(`blur`,e=>{c(`blur`,e)}),F.value.on(`input`,()=>{c(`input`)}),F.value.on(`change`,e=>{c(`change`,e)}),F.value.on(`changeSelectionStyle`,e=>{c(`changeSelectionStyle`,e)}),F.value.on(`changeSession`,e=>{c(`changeSession`,e)}),F.value.on(`copy`,e=>{c(`copy`,e)}),F.value.on(`focus`,e=>{c(`focus`,e)}),F.value.on(`paste`,e=>{c(`paste`,e.text)}),c(`init`,F.value))}),v(()=>{F.value?.removeAllListeners(),F.value?.destroy()}),(e,t)=>(H(),A(`div`,{ref_key:`editorRef`,ref:P,class:`h-full bg-none`},null,512))}}),J=[`fill`],ue=B({__name:`CuiGo2RtcIcon`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=T(e);return(e,n)=>(H(),A(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,role:`img`,"aria-hidden":`true`,fill:y(t)},[...n[0]||=[E(`path`,{d:`M 10.859375 7.105469 C 10.242188 7.195312 9.65625 7.367188 9.226562 7.585938 C 8.269531 8.070312 7.378906 9.0625 7.027344 10.054688 C 6.574219 11.328125 6.816406 12.757812 7.625 13.601562 L 7.796875 13.78125 L 7.304688 16.078125 L 6.8125 18.378906 L 7.472656 18.390625 C 7.835938 18.394531 8.140625 18.390625 8.148438 18.382812 C 8.160156 18.375 8.210938 18.164062 8.265625 17.910156 C 8.316406 17.664062 8.386719 17.328125 8.425781 17.167969 L 8.484375 16.878906 L 8.957031 16.878906 L 9.035156 17.148438 C 9.078125 17.300781 9.171875 17.628906 9.242188 17.878906 C 9.3125 18.132812 9.378906 18.351562 9.394531 18.371094 C 9.410156 18.386719 9.730469 18.394531 10.109375 18.390625 L 10.792969 18.378906 L 10.539062 17.558594 L 10.289062 16.738281 L 10.476562 16.644531 C 11.042969 16.355469 11.394531 15.730469 11.347656 15.085938 C 11.335938 14.914062 11.316406 14.738281 11.300781 14.695312 C 11.277344 14.617188 11.300781 14.601562 11.539062 14.519531 C 11.683594 14.472656 11.8125 14.441406 11.820312 14.449219 C 11.832031 14.457031 11.820312 14.527344 11.800781 14.605469 C 11.714844 14.890625 11.691406 14.878906 12.378906 14.878906 C 12.757812 14.878906 13 14.894531 13 14.921875 C 13 14.941406 12.839844 15.714844 12.640625 16.648438 C 12.445312 17.574219 12.28125 18.347656 12.28125 18.367188 C 12.28125 18.382812 12.578125 18.398438 12.953125 18.398438 L 13.621094 18.398438 L 13.9375 16.90625 C 14.109375 16.09375 14.277344 15.300781 14.308594 15.148438 L 14.367188 14.878906 L 15 14.878906 C 15.703125 14.878906 15.648438 14.902344 15.703125 14.578125 C 15.738281 14.355469 15.738281 14.355469 15.933594 14.4375 C 16.023438 14.476562 16.132812 14.519531 16.171875 14.535156 C 16.238281 14.554688 16.234375 14.574219 16.128906 14.726562 C 15.957031 14.980469 15.820312 15.265625 15.71875 15.578125 C 15.613281 15.9375 15.566406 16.652344 15.636719 17.003906 C 15.828125 17.972656 16.679688 18.539062 17.820312 18.46875 C 18.847656 18.398438 19.636719 17.816406 19.894531 16.925781 C 19.933594 16.804688 19.960938 16.691406 19.960938 16.671875 C 19.960938 16.65625 19.664062 16.640625 19.304688 16.640625 L 18.648438 16.640625 L 18.605469 16.773438 C 18.492188 17.113281 18.128906 17.363281 17.742188 17.367188 C 17.425781 17.371094 17.246094 17.269531 17.113281 17 C 17.011719 16.8125 17 16.738281 17 16.421875 C 17 15.707031 17.273438 15.148438 17.730469 14.914062 C 17.972656 14.792969 18.371094 14.820312 18.570312 14.972656 C 18.761719 15.113281 18.8125 15.210938 18.839844 15.460938 L 18.859375 15.660156 L 19.507812 15.671875 L 20.15625 15.679688 L 20.167969 15.570312 C 20.191406 15.359375 20.121094 14.953125 20.027344 14.742188 C 19.976562 14.632812 19.859375 14.460938 19.773438 14.363281 L 19.613281 14.183594 L 19.914062 13.988281 C 20.332031 13.71875 20.945312 13.09375 21.234375 12.636719 C 21.847656 11.691406 22.007812 10.464844 21.65625 9.398438 C 21.335938 8.4375 20.453125 7.621094 19.390625 7.316406 C 18.757812 7.136719 17.792969 7.175781 16.941406 7.421875 C 15.765625 7.757812 14.792969 8.617188 14.238281 9.808594 L 14.058594 10.199219 L 12.449219 10.199219 C 11.351562 10.199219 10.808594 10.214844 10.753906 10.242188 C 10.640625 10.304688 10.070312 11.488281 10.089844 11.632812 C 10.097656 11.703125 10.132812 11.742188 10.199219 11.765625 C 10.257812 11.78125 10.726562 11.792969 11.253906 11.796875 L 12.203125 11.800781 L 12.089844 11.96875 C 11.289062 13.128906 9.621094 13.109375 9.066406 11.929688 C 8.964844 11.703125 8.941406 11.601562 8.929688 11.300781 C 8.894531 10.535156 9.171875 9.925781 9.738281 9.492188 C 10.574219 8.855469 11.453125 8.859375 12.125 9.5 L 12.351562 9.714844 L 12.863281 9.574219 C 13.148438 9.5 13.523438 9.398438 13.699219 9.355469 C 14.28125 9.210938 14.292969 9.203125 14.261719 9.085938 C 14.222656 8.941406 14.027344 8.609375 13.808594 8.316406 C 13.449219 7.835938 12.675781 7.34375 12.039062 7.183594 C 11.78125 7.117188 11.085938 7.070312 10.859375 7.105469 Z M 18.886719 9.1875 C 19.378906 9.421875 19.710938 9.875 19.8125 10.464844 C 19.867188 10.796875 19.785156 11.261719 19.59375 11.636719 C 19.34375 12.128906 18.726562 12.628906 18.183594 12.78125 C 17.867188 12.871094 17.347656 12.84375 17.027344 12.722656 C 16.207031 12.40625 15.808594 11.511719 16.085938 10.617188 C 16.304688 9.886719 16.773438 9.40625 17.496094 9.152344 C 17.785156 9.050781 17.863281 9.039062 18.21875 9.046875 C 18.570312 9.058594 18.652344 9.074219 18.886719 9.1875 Z M 14.597656 11.570312 C 14.925781 11.789062 14.964844 12.164062 14.691406 12.476562 C 14.617188 12.566406 14.367188 12.785156 14.144531 12.953125 L 13.738281 13.261719 L 14.203125 13.273438 L 14.671875 13.285156 L 14.578125 13.699219 L 13.726562 13.710938 C 13.265625 13.714844 12.878906 13.710938 12.878906 13.699219 C 12.878906 13.683594 12.898438 13.597656 12.925781 13.496094 C 12.96875 13.328125 13.003906 13.289062 13.519531 12.894531 C 14.117188 12.445312 14.320312 12.242188 14.320312 12.113281 C 14.320312 11.875 13.964844 11.792969 13.78125 11.980469 C 13.722656 12.03125 13.679688 12.097656 13.679688 12.121094 C 13.679688 12.144531 13.574219 12.160156 13.421875 12.160156 C 13.125 12.160156 13.109375 12.136719 13.238281 11.878906 C 13.390625 11.585938 13.695312 11.4375 14.125 11.449219 C 14.375 11.460938 14.453125 11.476562 14.597656 11.570312 Z M 9.65625 14.84375 C 9.902344 14.910156 10 15.035156 10 15.292969 C 10 15.546875 9.890625 15.730469 9.679688 15.84375 C 9.566406 15.902344 9.453125 15.921875 9.109375 15.921875 C 8.710938 15.921875 8.675781 15.910156 8.695312 15.847656 C 8.71875 15.777344 8.921875 14.847656 8.921875 14.816406 C 8.921875 14.78125 9.507812 14.804688 9.65625 14.84375 Z M 9.65625 14.84375 M 3.019531 9.1875 C 2.945312 9.273438 2.878906 9.351562 2.878906 9.363281 C 2.878906 9.414062 3.59375 9.441406 5.046875 9.441406 L 6.554688 9.441406 L 6.675781 9.265625 C 6.742188 9.167969 6.785156 9.078125 6.773438 9.0625 C 6.757812 9.050781 5.941406 9.039062 4.953125 9.039062 L 3.15625 9.039062 Z M 3.019531 9.1875 M 1.617188 9.992188 C 1.597656 10.007812 1.523438 10.089844 1.464844 10.167969 L 1.351562 10.320312 L 6.195312 10.320312 L 6.234375 10.167969 C 6.261719 10.089844 6.28125 10.007812 6.28125 9.988281 C 6.28125 9.953125 1.671875 9.953125 1.617188 9.992188 Z M 1.617188 9.992188 M 3.882812 11.015625 C 3.835938 11.089844 3.800781 11.167969 3.800781 11.1875 C 3.800781 11.222656 4.882812 11.28125 5.644531 11.28125 C 6.035156 11.28125 6.09375 11.246094 6.070312 11.03125 L 6.058594 10.898438 L 5.011719 10.886719 L 3.96875 10.878906 Z M 3.882812 11.015625 `},null,-1)]],8,J))}}),Y=[`fill`],de=B({__name:`CuiCameraUiIcon`,props:{color:{default:`currentColor`}},setup(e){let{color:t}=T(e);return(e,n)=>(H(),A(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,role:`img`,"aria-hidden":`true`,fill:y(t)},[...n[0]||=[E(`path`,{d:`M 17.335938 2.410156 C 16.851562 2.484375 16.515625 2.625 16.160156 2.90625 C 15.636719 3.320312 15.320312 3.980469 15.320312 4.652344 C 15.320312 5.019531 15.390625 5.324219 15.550781 5.652344 C 15.9375 6.4375 16.710938 6.917969 17.585938 6.917969 C 18.234375 6.917969 18.789062 6.683594 19.242188 6.210938 C 19.539062 5.90625 19.746094 5.5 19.828125 5.078125 C 19.863281 4.894531 19.867188 4.492188 19.839844 4.3125 C 19.761719 3.839844 19.542969 3.414062 19.203125 3.074219 C 18.878906 2.746094 18.5 2.542969 18.046875 2.445312 C 17.902344 2.417969 17.453125 2.394531 17.335938 2.410156 Z M 17.335938 2.410156 M 6.160156 4.90625 C 5.589844 4.953125 5.0625 5.191406 4.714844 5.554688 C 4.5625 5.710938 4.386719 5.96875 4.300781 6.164062 C 4.144531 6.515625 4.046875 7.289062 3.953125 8.933594 C 3.921875 9.488281 3.921875 11.171875 3.953125 11.746094 L 3.980469 12.195312 L 4.226562 12.675781 C 5.1875 14.515625 5.785156 15.28125 6.789062 15.945312 C 7.546875 16.453125 8.503906 16.785156 9.453125 16.875 C 9.605469 16.890625 9.875 16.894531 10.195312 16.886719 C 10.742188 16.878906 11.019531 16.84375 11.503906 16.722656 C 12.375 16.503906 13.246094 16.054688 13.835938 15.519531 C 13.945312 15.421875 13.929688 15.402344 13.808594 15.476562 C 13.445312 15.710938 12.902344 15.917969 12.476562 15.984375 C 12.207031 16.027344 11.738281 16.015625 11.472656 15.957031 C 11.023438 15.863281 10.558594 15.652344 10.21875 15.394531 C 9.984375 15.222656 9.65625 14.882812 9.492188 14.652344 C 9.097656 14.097656 8.859375 13.347656 8.773438 12.394531 C 8.761719 12.25 8.75 11.433594 8.746094 10.304688 C 8.742188 9.28125 8.730469 8.300781 8.71875 8.128906 C 8.671875 7.410156 8.558594 6.570312 8.476562 6.328125 C 8.355469 5.988281 8.058594 5.613281 7.734375 5.398438 C 7.535156 5.269531 7.136719 5.078125 6.925781 5.007812 C 6.742188 4.945312 6.4375 4.890625 6.308594 4.898438 C 6.269531 4.898438 6.199219 4.902344 6.160156 4.90625 Z M 6.160156 4.90625 M 17.46875 7.671875 C 17.25 7.691406 16.957031 7.769531 16.769531 7.851562 C 16.289062 8.058594 15.898438 8.460938 15.730469 8.925781 C 15.554688 9.410156 15.496094 9.828125 15.394531 11.429688 C 15.347656 12.128906 15.3125 12.507812 15.261719 12.871094 C 15.152344 13.628906 14.960938 14.242188 14.707031 14.667969 C 14.515625 14.988281 14.089844 15.480469 13.847656 15.664062 C 13.761719 15.726562 13.597656 15.851562 13.480469 15.9375 C 12.789062 16.460938 11.972656 16.808594 11.0625 16.976562 C 10.433594 17.089844 9.699219 17.09375 9.066406 16.984375 C 8.128906 16.824219 7.292969 16.472656 6.570312 15.9375 C 6.226562 15.683594 5.835938 15.308594 5.578125 14.980469 C 5.179688 14.484375 4.628906 13.570312 4.160156 12.632812 C 4.078125 12.46875 4.003906 12.335938 3.992188 12.335938 C 3.972656 12.335938 3.972656 12.460938 3.992188 12.890625 C 4.109375 14.992188 4.671875 16.917969 5.582031 18.328125 C 6.117188 19.15625 6.898438 19.9375 7.78125 20.523438 C 8.691406 21.128906 9.59375 21.492188 10.726562 21.703125 C 10.992188 21.753906 11.015625 21.757812 11.820312 21.765625 C 12.691406 21.773438 12.761719 21.765625 13.226562 21.683594 C 13.945312 21.550781 14.597656 21.328125 15.308594 20.980469 C 16.027344 20.625 16.527344 20.289062 17.089844 19.769531 C 18.839844 18.160156 19.894531 15.460938 20.0625 12.167969 C 20.097656 11.46875 20.082031 10.585938 20.023438 10.117188 C 19.929688 9.367188 19.65625 8.695312 19.285156 8.320312 C 18.84375 7.871094 18.089844 7.601562 17.46875 7.671875 Z M 17.46875 7.671875`},null,-1)]],8,Y))}}),X={viewBox:`0 0 20 20`,width:`1.2em`,height:`1.2em`};function Z(e,t){return H(),A(`svg`,X,[...t[0]||=[E(`path`,{fill:`currentColor`,d:`m15.3 5.3l-6.8 6.8l-2.8-2.8l-1.4 1.4l4.2 4.2l8.2-8.2z`},null,-1)]])}var fe=z({name:`dashicons-saved`,render:Z});async function Q({json:e,signal:t}){return(await l.get(`/config`,{params:{json:e},signal:t})).data}async function pe({json:e,signal:t}){return(await l.get(`/config/go2rtc`,{params:{json:e},signal:t})).data}async function me({configData:e}){return(await l.patch(`/config`,e,{headers:{"Content-Type":`text/yaml`}})).data}async function he({configData:e}){return(await l.patch(`/config/go2rtc`,e,{headers:{"Content-Type":`text/yaml`}})).data}async function $(){return(await l.delete(`/config`)).data}async function ge(){return(await l.delete(`/config/go2rtc`)).data}var _e=class{_queryClient=d();t=c.global.t;toast=u();queryActivator=j([{name:`getConfigQuery`,enabled:!0},{name:`getGo2RtcConfigQuery`,enabled:!0}]);get queryClient(){return this._queryClient}getConfigQuery(e=!1){return s({queryKey:[`config`,{json:e}],queryFn:({signal:t})=>Q({json:y(e),signal:t}),enabled:()=>this.queryActivator.value.some(e=>e.name===`getConfigQuery`&&e.enabled)})}getGo2RtcConfigQuery(e=!1){return s({queryKey:[`go2rtcConfig`],queryFn:({signal:t})=>pe({json:y(e),signal:t}),enabled:()=>this.queryActivator.value.some(e=>e.name===`getGo2RtcConfigQuery`&&e.enabled)})}patchConfigQuery(){return x({mutationFn:me,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`config`]}),this.toast.add({severity:`success`,detail:this.t(`components.toast.config_updated`),life:3e3})}})}patchGo2RtcConfigQuery(){return x({mutationFn:he,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`go2rtcConfig`]}),this.toast.add({severity:`success`,detail:this.t(`components.toast.config_go2rtc_updated`),life:3e3})}})}delteConfigQuery(){return x({mutationFn:$,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`config`]}),this.toast.add({severity:`success`,detail:this.t(`components.toast.config_deleted`),life:3e3})}})}delteGo2RtcConfigQuery(){return x({mutationFn:ge,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`go2rtcConfig`]}),this.toast.add({severity:`success`,detail:this.t(`components.toast.config_go2rtc_deleted`),life:3e3})}})}toggleQueryActivator(e,t){let n=this.queryActivator.value.find(t=>t.name===e);return n&&(n.enabled=t),this}},ve={class:`relative w-6 h-6`},ye={class:`w-full h-full`},be={class:`w-full h-full flex items-center justify-center`},xe=B({__name:`Config`,setup(e){let r=new _e,s=new ae,c=o(),l=re(),{t:u}=a(),{smBreakpoint:d}=W(),{uiSettings:_}=U(ee()),v=j(!1),{data:b,isBusy:x}=r.getConfigQuery(v),{data:S,isBusy:C}=r.getGo2RtcConfigQuery(v),{mutateAsync:w,isPending:T}=r.patchConfigQuery(),{mutateAsync:O,isPending:M}=r.patchGo2RtcConfigQuery(),{mutateAsync:L,isPending:z}=s.restartServerQuery(),{mutateAsync:B,isPending:G}=s.restartGo2RtcQuery(),K=j(`camera.ui`),q=j(``),J=j(``),Y=j(!1),X=j([{label:u(`components.dialog.title.confirm`),icon:fe,buttonProps:{severity:`success`},command:()=>{l.openTextDialog({data:{title:u(`components.dialog.title.confirm`),contentText:u(`components.dialog.message.confirm_restart_server`),confirmText:u(`components.form.button.save_and_restart`),confirmButtonProps:{loading:Z.value},cancelButtonProps:{loading:Z.value}},onConfirm:pe})}},{label:u(`components.form.tooltip.zoom_out`),icon:se,command:()=>{$()}},{label:u(`components.form.tooltip.zoom_in`),icon:ce,command:()=>{he()}}]),Z=R(()=>x.value||C.value||T.value||M.value||z.value||G.value),Q=R(()=>({fontSize:_.value.config.zoom}));async function pe(){try{K.value===`camera.ui`?(await w({configData:q.value}),await t(500),await L()):(await O({configData:J.value}),await t(500),await B())}catch(e){c.error(e)}}function me(){K.value=K.value===`camera.ui`?`go2rtc`:`camera.ui`}function he(){_.value.config.zoom!==20&&_.value.config.zoom++}function $(){_.value.config.zoom!==8&&_.value.config.zoom--}return f(b,()=>{q.value=b.value||``},{deep:!0,immediate:!0}),f(S,()=>{J.value=S.value||``},{deep:!0,immediate:!0}),g(async()=>{await t(100),Y.value=!0}),(e,t)=>{let r=oe,a=n,o=ie,s=ne,c=de,l=ue,u=le,f=i,g=te;return H(),A(`div`,null,[V(o,{position:`left`},{default:N(()=>[V(a,{severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:t[0]||=t=>e.$router.push(`/menu`)},{icon:N(()=>[V(r,{class:`w-6 h-6`})]),_:1})]),_:1}),V(s,{model:y(X),direction:`up`,"transition-delay":80,"tooltip-options":{position:`left`,event:void 0},class:`absolute right-3 bottom-3 z-2`,pt:{root:{style:`pointer-events: none`}}},{button:N(({visible:e,toggleCallback:t})=>[V(a,{severity:`secondary`,class:m([`opacity-40 hover:opacity-100 active:opacity-100 focus:opacity-100 transition pointer-events-auto`,{"opacity-100":e}]),rounded:``,loading:y(Z),onClick:t},{icon:N(()=>[E(`div`,ve,[E(`div`,{class:m([`absolute top-0.5 left-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full transform transition-all duration-100 origin-center`,{"w-4 h-[2px] rotate-45 top-1/2 -translate-y-1/2 rounded-none":e}]),style:{backgroundColor:`var(--text-color)`}},null,2),E(`div`,{class:m([`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 rounded-full transition-all duration-100`,{"opacity-0 scale-0":e}]),style:{backgroundColor:`var(--text-color)`}},null,2),E(`div`,{class:m([`absolute bottom-0.5 left-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full transform transition-all duration-100 origin-center`,{"w-4 h-[2px] -rotate-45 bottom-1/2 translate-y-1/2 rounded-none":e}]),style:{backgroundColor:`var(--text-color)`}},null,2)])]),_:2},1032,[`class`,`loading`,`onClick`])]),item:N(({item:e,toggleCallback:t})=>[F((H(),D(a,p({loading:y(Z),severity:`secondary`},e.buttonProps,{rounded:``,onClick:t}),{icon:N(()=>[(H(),D(h(e.icon)))]),_:2},1040,[`loading`,`onClick`])),[[g,{value:e.label}]])]),_:1},8,[`model`]),V(a,{class:`opacity-40 hover:opacity-100 active:opacity-100 focus:opacity-100 transition absolute bottom-3 right-14 z-2`,rounded:``,loading:y(Z),onClick:me},{icon:N(()=>[y(K)===`camera.ui`?F((H(),D(c,{key:0,class:`fill-white w-[30px]`},null,512)),[[g,{value:`camera.ui`}]]):F((H(),D(l,{key:1,class:`fill-white w-[30px]`},null,512)),[[g,{value:`go2rtc`}]])]),_:1},8,[`loading`]),E(`div`,ye,[(H(),D(I,null,{fallback:N(()=>[E(`div`,be,[V(f,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])]),default:N(()=>[y(K)===`camera.ui`?F((H(),D(u,{key:0,modelValue:y(q),"onUpdate:modelValue":t[1]||=e=>k(q)?q.value=e:null,lang:`yaml`,options:y(Q),"read-only":y(Z),border:!y(d),"border-bottom-left-radius":!y(d),"border-bottom-right-radius":!y(d),"border-top-right-radius":!1,"border-top-left-radius":!1},null,8,[`modelValue`,`options`,`read-only`,`border`,`border-bottom-left-radius`,`border-bottom-right-radius`])),[[P,y(Y)]]):F((H(),D(u,{key:1,modelValue:y(J),"onUpdate:modelValue":t[2]||=e=>k(J)?J.value=e:null,lang:`yaml`,options:y(Q),"read-only":y(Z),"border-radius":!y(d),border:!y(d)},null,8,[`modelValue`,`options`,`read-only`,`border-radius`,`border`])),[[P,y(Y)]])]),_:1}))])])}}});export{xe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fi as e}from"./vendor-cameraui-DgSMexWY.js";import{Er as t,Sr as n,Vn as r,dn as i,fn as a,mn as o,on as s,pn as c,xn as l,yn as u,zn as d}from"./vendor-DoIl6acN.js";import{C as f,K as p,g as m,j as h}from"./vendor-primevue-7iEzPOvf.js";import{t as g}from"./useCameraOptions-
|
|
1
|
+
import{fi as e}from"./vendor-cameraui-DgSMexWY.js";import{Er as t,Sr as n,Vn as r,dn as i,fn as a,mn as o,on as s,pn as c,xn as l,yn as u,zn as d}from"./vendor-DoIl6acN.js";import{C as f,K as p,g as m,j as h}from"./vendor-primevue-7iEzPOvf.js";import{t as g}from"./useCameraOptions-CO1HD_gL.js";import{t as _}from"./types-BxFyoO54.js";var v={class:`flex flex-col gap-4`},y={class:`flex flex-col field-gap`},b={class:`cui-label`},x={class:`flex flex-col field-gap`},S={class:`cui-label`},C={class:`text-xs text-muted`},w={class:`flex items-center gap-2`},T=[`onClick`],E={key:0,class:`pl-7`},D=l({__name:`ConfigActionCameraControl`,props:{data:{}},emits:[`update:data`],setup(l,{emit:D}){let O=l,k=D,{t:A}=e(),{cameraOptions:j}=g();function M(e){return O.data.properties.some(t=>t.property===e)}function N(e){return O.data.properties.find(t=>t.property===e)?.value??``}function P(e,t){let n=[...O.data.properties];if(t){if(!n.some(t=>t.property===e)){let t=_.find(t=>t.key===e);n.push({property:e,value:t?.defaultValue??``})}}else{let t=n.findIndex(t=>t.property===e);t>=0&&n.splice(t,1)}k(`update:data`,{properties:n})}function F(e,t){k(`update:data`,{properties:O.data.properties.map(n=>n.property===e?{...n,value:t}:n)})}function I(e,t){k(`update:data`,{[e]:t})}return(e,g)=>{let D=h,O=f,k=p,L=m;return d(),o(`div`,v,[i(`div`,y,[i(`label`,b,t(n(A)(`components.automation_nodes.camera`)),1),u(D,{"model-value":l.data.cameraId,options:n(j),"option-label":`label`,"option-value":`value`,placeholder:n(A)(`components.automation_nodes.camera_select`),class:`w-full`,"onUpdate:modelValue":g[0]||=e=>I(`cameraId`,e)},null,8,[`model-value`,`options`,`placeholder`])]),i(`div`,x,[i(`label`,S,t(n(A)(`components.automation_nodes.camera_control_properties`)),1),i(`span`,C,t(n(A)(`components.automation_nodes.camera_control_properties_hint`)),1)]),(d(!0),o(s,null,r(n(_),e=>(d(),o(`div`,{key:e.key,class:`flex flex-col gap-2`},[i(`div`,w,[u(O,{"model-value":M(e.key),binary:``,"onUpdate:modelValue":t=>P(e.key,t)},null,8,[`model-value`,`onUpdate:modelValue`]),i(`label`,{class:`cui-label-switch cursor-pointer flex-1 min-w-0 truncate`,onClick:t=>P(e.key,!M(e.key))},t(n(A)(e.labelKey)),9,T),M(e.key)&&e.inputType===`boolean`?(d(),a(k,{key:0,"model-value":N(e.key)===`true`,class:`shrink-0`,"onUpdate:modelValue":t=>F(e.key,String(t))},null,8,[`model-value`,`onUpdate:modelValue`])):c(``,!0)]),M(e.key)&&e.inputType!==`boolean`?(d(),o(`div`,E,[e.inputType===`select`?(d(),a(D,{key:0,"model-value":N(e.key),options:e.options,"option-label":`label`,"option-value":`value`,class:`w-full`,"onUpdate:modelValue":t=>F(e.key,t)},null,8,[`model-value`,`options`,`onUpdate:modelValue`])):e.inputType===`number`?(d(),a(L,{key:1,"model-value":Number(N(e.key))||e.min,min:e.min,max:e.max,step:e.step??1,"min-fraction-digits":e.step&&e.step<1?2:0,"max-fraction-digits":e.step&&e.step<1?2:0,class:`w-full`,"onUpdate:modelValue":t=>F(e.key,String(t))},null,8,[`model-value`,`min`,`max`,`step`,`min-fraction-digits`,`max-fraction-digits`,`onUpdate:modelValue`])):c(``,!0)])):c(``,!0)]))),128))])}}});export{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Hn as e,tt as t}from"./vendor-cameraui-DgSMexWY.js";import{Sr as n,Zn as r,dn as i,fn as a,mn as o,nr as s,pn as c,rr as l,un as u,vn as d,xn as f,yn as p,zn as m}from"./vendor-DoIl6acN.js";import{J as h,i as g,j as _,u as v,z as y}from"./vendor-primevue-7iEzPOvf.js";import{t as b}from"./notifications-
|
|
1
|
+
import{Hn as e,tt as t}from"./vendor-cameraui-DgSMexWY.js";import{Sr as n,Zn as r,dn as i,fn as a,mn as o,nr as s,pn as c,rr as l,un as u,vn as d,xn as f,yn as p,zn as m}from"./vendor-DoIl6acN.js";import{J as h,i as g,j as _,u as v,z as y}from"./vendor-primevue-7iEzPOvf.js";import{t as b}from"./notifications-DHmx6O_s.js";import{n as x,t as S}from"./VariableInput-CFs-kzqd.js";import{t as C}from"./automations-C309DNNg.js";import{t as w}from"./VariableSuggestions-PEzupqiE.js";import{t as T}from"./upload-AGww_lJf.js";var E={class:`flex flex-col gap-4`},D={class:`flex flex-col field-gap`},O={class:`flex flex-col field-gap`},k={class:`flex flex-col field-gap`},A={class:`flex flex-col field-gap`},j={class:`flex gap-2`},M={key:0,class:`rounded-lg overflow-hidden border-[1px] border-color bg-black`},N=[`src`],P={class:`flex flex-col field-gap`},F={class:`flex flex-col field-gap`},I=f({__name:`ConfigActionNotification`,props:{data:{},nodeId:{}},emits:[`update:data`],setup(f,{emit:I}){let L=new b,R=f,z=I,B=C(),{data:V,isLoading:H}=L.listDevicesQuery(),U=[{label:`Info`,value:`info`},{label:`Warning`,value:`warn`},{label:`Error`,value:`error`},{label:`Critical (DND-bypass)`,value:`critical`}],W=r(`fileInput`),G=u(()=>(V.value??[]).map(e=>({id:e.id,label:e.name}))),K=u(()=>{let e=B.draft;return x(e,R.nodeId)}),q=u(()=>{let e=R.data.image;if(e){if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`))return e;if(e.length>100&&!e.startsWith(`{{`))return`data:image/jpeg;base64,${e}`}});function J(e,t){let n=R.data[e]??``;z(`update:data`,{[e]:n+t})}function Y(e,t){z(`update:data`,{[e]:t})}function X(){W.value?.click()}function Z(e){let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=()=>{let e=n.result.split(`,`)[1];e&&z(`update:data`,{image:e})},n.readAsDataURL(t)}return(r,u)=>{let b=t,x=g,C=_,I=T,L=e,R=y,z=v,B=h;return m(),o(`div`,E,[i(`div`,D,[u[10]||=i(`label`,{class:`cui-label`},`Title`,-1),p(b,{"model-value":f.data.title,placeholder:`Notification title`,"onUpdate:modelValue":u[0]||=e=>Y(`title`,e)},null,8,[`model-value`]),p(w,{variables:n(K),onSelect:u[1]||=e=>J(`title`,e)},null,8,[`variables`])]),i(`div`,O,[u[11]||=i(`label`,{class:`cui-label`},`Body`,-1),p(x,{"model-value":f.data.body,placeholder:`Notification body`,rows:`3`,class:`w-full`,"onUpdate:modelValue":u[2]||=e=>Y(`body`,e)},null,8,[`model-value`]),p(w,{variables:n(K),onSelect:u[3]||=e=>J(`body`,e)},null,8,[`variables`])]),i(`div`,k,[u[12]||=i(`label`,{class:`cui-label`},`Severity`,-1),p(C,{"model-value":f.data.severity??`info`,options:U,"option-label":`label`,"option-value":`value`,class:`w-full`,"onUpdate:modelValue":u[4]||=e=>Y(`severity`,e)},null,8,[`model-value`])]),i(`div`,A,[u[14]||=i(`label`,{class:`cui-label`},`Image`,-1),i(`div`,j,[p(S,{"model-value":f.data.image??``,"node-id":f.nodeId,placeholder:`{{snapshot}} or https://…`,class:`flex-1`,"onUpdate:modelValue":u[5]||=e=>Y(`image`,e)},null,8,[`model-value`,`node-id`]),l((m(),a(L,{severity:`secondary`,outlined:``,class:`shrink-0 h-[42px] w-[42px] p-0`,onClick:X},{icon:s(()=>[p(I,{class:`w-4 h-4`})]),_:1})),[[B,`Upload image`,void 0,{top:!0}]]),i(`input`,{ref_key:`fileInput`,ref:W,type:`file`,accept:`image/*`,class:`hidden`,onChange:Z},null,544)]),p(w,{variables:n(K),onSelect:u[6]||=e=>Y(`image`,(f.data.image??``)+e)},null,8,[`variables`]),p(R,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:s(()=>[...u[13]||=[d(`Reference an upstream image variable, paste a URL or upload directly. Leave empty for text-only.`,-1)]]),_:1}),n(q)?(m(),o(`div`,M,[i(`img`,{src:n(q),class:`w-full max-h-32 object-cover`},null,8,N)])):c(``,!0)]),i(`div`,P,[u[15]||=i(`label`,{class:`cui-label`},`Deep link`,-1),p(b,{"model-value":f.data.deepLink,placeholder:`/cameras/cam-1`,"onUpdate:modelValue":u[7]||=e=>Y(`deepLink`,e)},null,8,[`model-value`]),p(w,{variables:n(K),onSelect:u[8]||=e=>J(`deepLink`,e)},null,8,[`variables`])]),i(`div`,F,[u[16]||=i(`label`,{class:`cui-label`},`Targets`,-1),u[17]||=i(`span`,{class:`text-xs text-muted-color`},`Pick which devices receive this notification. Leave empty to send to all registered devices.`,-1),p(z,{"model-value":f.data.targets??[],options:n(G),"option-label":`label`,"option-value":`id`,loading:n(H),placeholder:`All devices`,display:`chip`,filter:``,class:`w-full`,"onUpdate:modelValue":u[9]||=e=>Y(`targets`,e)},null,8,[`model-value`,`options`,`loading`])])])}}});export{I as default};
|
package/dist/interface/assets/{ConfigActionPlugin-BgKKvqAy.js → ConfigActionPlugin-B7YAbFlf.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ut as e,fi as t}from"./vendor-cameraui-DgSMexWY.js";import{$n as n,Er as r,Sr as i,Vn as a,_r as o,dn as s,mn as c,mr as l,on as u,pn as d,un as f,xn as p,yn as m,zn as h}from"./vendor-DoIl6acN.js";import{U as g,j as _}from"./vendor-primevue-7iEzPOvf.js";import{t as v}from"./CuiSchema-
|
|
1
|
+
import{Ut as e,fi as t}from"./vendor-cameraui-DgSMexWY.js";import{$n as n,Er as r,Sr as i,Vn as a,_r as o,dn as s,mn as c,mr as l,on as u,pn as d,un as f,xn as p,yn as m,zn as h}from"./vendor-DoIl6acN.js";import{U as g,j as _}from"./vendor-primevue-7iEzPOvf.js";import{t as v}from"./CuiSchema-CfqOJmDH.js";import{t as y}from"./plugins-NVAodP6s.js";import{n as ee,t as b}from"./VariableInput-CFs-kzqd.js";import{t as x}from"./automations-C309DNNg.js";import{t as S}from"./VariableSuggestions-PEzupqiE.js";import{t as C}from"./automations-E7vwN3kw.js";var w={class:`flex flex-col gap-4`},te={class:`flex flex-col field-gap`},T={class:`cui-label`},E={class:`flex flex-col field-gap`},D={class:`cui-label`},O={class:`flex flex-col field-gap`},k={class:`cui-label`},A={class:`cui-label`},j={class:`flex flex-col gap-3`},M={class:`text-xs font-semibold text-muted uppercase`},N=p({__name:`ConfigActionPlugin`,props:{data:{},nodeId:{}},emits:[`update:data`],setup(p,{emit:N}){let P=new y,F=new C,I=p,L=N,{t:R}=t(),{plugin:z}=e(f(()=>I.data.pluginName)),B=x(),{data:V,isBusy:H}=P.getPluginsQuery({page:1,pageSize:-1}),{data:U}=F.getPluginMethodsQuery(),W=o(),G=l(!1),K=f(()=>ee(B.draft,I.nodeId)),q=f(()=>V.value?.result?V.value.result.filter(e=>e.contract?.interfaces?.length).map(e=>({label:e.pluginName,value:e.pluginName})):[]),J=f(()=>{if(!(!I.data.pluginName||!V.value?.result))return V.value.result.find(e=>e.pluginName===I.data.pluginName)}),Y=f(()=>(J.value?.contract?.interfaces??[]).filter(e=>Q(e).length>0).map(e=>({label:e.replace(/([A-Z])/g,` $1`).trim(),value:e}))),X=f(()=>I.data.pluginInterface?Q(I.data.pluginInterface).map(e=>({label:R(e.labelKey),value:e.id})):[]),Z=f(()=>{if(!(!I.data.pluginInterface||!I.data.method))return Q(I.data.pluginInterface).find(e=>e.id===I.data.method)});function Q(e){return U.value?.[e]??[]}async function ne(){let e=Z.value?.settingsMethod;if(!e||!z.value){W.value=void 0;return}G.value=!0;try{let t=z.value[e];W.value=t?await t():void 0}catch{W.value=void 0}finally{G.value=!1}}function re(e){L(`update:data`,{pluginName:e,pluginInterface:``,method:``,params:{},config:{}})}function ie(e){L(`update:data`,{pluginInterface:e,method:``,params:{},config:{}})}function ae(e){L(`update:data`,{method:e,params:{},config:{}})}function $(e,t){L(`update:data`,{params:{...I.data.params,[e]:t}})}function oe(e){L(`update:data`,{config:{...I.data.config,...e}})}return n([Z,z],()=>ne(),{immediate:!0}),(e,t)=>{let n=_,o=g,l=v;return h(),c(`div`,w,[s(`div`,te,[s(`label`,T,r(i(R)(`components.automation_nodes.plugin_name`)),1),m(n,{"model-value":p.data.pluginName,options:i(q),"option-label":`label`,"option-value":`value`,placeholder:i(R)(`components.automation_nodes.plugin_name_placeholder`),class:`w-full`,loading:i(H),"onUpdate:modelValue":re},null,8,[`model-value`,`options`,`placeholder`,`loading`])]),s(`div`,E,[s(`label`,D,r(i(R)(`components.automation_nodes.plugin_interface`)),1),m(n,{"model-value":p.data.pluginInterface,options:i(Y),"option-label":`label`,"option-value":`value`,placeholder:i(R)(`components.automation_nodes.plugin_interface_placeholder`),class:`w-full`,disabled:!p.data.pluginName,"onUpdate:modelValue":ie},null,8,[`model-value`,`options`,`placeholder`,`disabled`])]),s(`div`,O,[s(`label`,k,r(i(R)(`components.automation_nodes.plugin_method`)),1),m(n,{"model-value":p.data.method,options:i(X),"option-label":`label`,"option-value":`value`,placeholder:i(R)(`components.automation_nodes.plugin_method_placeholder`),class:`w-full`,disabled:!p.data.pluginInterface,"onUpdate:modelValue":ae},null,8,[`model-value`,`options`,`placeholder`,`disabled`])]),i(Z)?(h(!0),c(u,{key:0},a(i(Z).params,e=>(h(),c(`div`,{key:e.name,class:`flex flex-col field-gap`},[s(`label`,A,r(i(R)(e.labelKey)),1),m(b,{"model-value":p.data.params[e.name]??``,"node-id":p.nodeId,placeholder:e.placeholder,"onUpdate:modelValue":t=>$(e.name,String(t??``))},null,8,[`model-value`,`node-id`,`placeholder`,`onUpdate:modelValue`]),m(S,{variables:i(K),onSelect:t=>$(e.name,(p.data.params[e.name]??``)+t)},null,8,[`variables`,`onSelect`])]))),128)):d(``,!0),i(Z)?.settingsMethod&&i(W)?.length?(h(),c(u,{key:1},[m(o),s(`div`,j,[s(`span`,M,r(i(R)(`components.automation_nodes.plugin_settings`)),1),m(l,{"schema-form":{schema:i(W),config:p.data.config??{}},loading:i(G),"save-button-label":i(R)(`components.automation_nodes.plugin_apply_settings`),"show-button":``,onOnFormSubmit:oe},null,8,[`schema-form`,`loading`,`save-button-label`])])],64)):d(``,!0)])}}});export{N as default};
|
package/dist/interface/assets/{ConfigActionSensor-Du072tTI.js → ConfigActionSensor-D_Dt1qtt.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Dn as e,En as t,fi as n,tt as r}from"./vendor-cameraui-DgSMexWY.js";import{Er as i,Sr as a,Vn as o,dn as s,fn as c,mn as l,on as u,pn as d,un as f,xn as p,yn as m,zn as h}from"./vendor-DoIl6acN.js";import{C as g,j as _}from"./vendor-primevue-7iEzPOvf.js";import{t as v}from"./useCameraOptions-
|
|
1
|
+
import{Dn as e,En as t,fi as n,tt as r}from"./vendor-cameraui-DgSMexWY.js";import{Er as i,Sr as a,Vn as o,dn as s,fn as c,mn as l,on as u,pn as d,un as f,xn as p,yn as m,zn as h}from"./vendor-DoIl6acN.js";import{C as g,j as _}from"./vendor-primevue-7iEzPOvf.js";import{t as v}from"./useCameraOptions-CO1HD_gL.js";var y={class:`flex flex-col gap-4`},b={class:`flex flex-col field-gap`},x={class:`flex flex-col field-gap`},S={class:`cui-label`},C={key:0,class:`flex flex-col field-gap`},w={class:`cui-label`},T={key:1,class:`flex flex-col gap-3`},E={class:`cui-label`},D={class:`flex items-center gap-2`},O={class:`text-sm font-medium`},k=p({__name:`ConfigActionSensor`,props:{data:{}},emits:[`update:data`],setup(p,{emit:k}){let A=p,j=k,{t:M}=n(),{cameraOptions:N,getSensorTypes:P,useSensorInstances:F,getPropertiesForSensor:I}=v(),L=f(()=>A.data.cameraId?P(A.data.cameraId).filter(e=>e.meta.category===t.Control).map(e=>({label:M(`components.camera_options.sensor_type_${e.value}`),value:e.value})):[]),{instanceOptions:R,isLoading:z}=F(f(()=>A.data.cameraId||void 0),f(()=>A.data.sensorType||e.Light)),B=f(()=>!A.data.sensorName||!A.data.sensorPluginId?``:`${A.data.sensorName}::${A.data.sensorPluginId}`),V=f(()=>R.value.map(e=>({label:e.label,value:`${e.sensorName}::${e.pluginId}`}))),H=f(()=>A.data.sensorType?I(A.data.sensorType):[]),U=f(()=>{let e=new Map;for(let t of A.data.properties??[])e.set(t.property,t.value);return e});function W(e){return U.value.has(e)}function G(e){return U.value.get(e)??``}function K(e,t){let n=[...A.data.properties??[]];if(t)n.some(t=>t.property===e)||n.push({property:e,value:``});else{let t=n.findIndex(t=>t.property===e);t>=0&&n.splice(t,1)}j(`update:data`,{properties:n})}function q(e,t){let n=[...A.data.properties??[]],r=n.find(t=>t.property===e);r?r.value=t:n.push({property:e,value:t}),j(`update:data`,{properties:n})}function J(e){j(`update:data`,{cameraId:e,sensorType:``,sensorName:``,sensorPluginId:``,properties:[]})}function Y(e){j(`update:data`,{sensorType:e,sensorName:``,sensorPluginId:``,properties:[]})}function X(e){let[t,n]=String(e).split(`::`);j(`update:data`,{sensorName:t,sensorPluginId:n,properties:[]})}return(e,t)=>{let n=_,f=g,v=r;return h(),l(`div`,y,[s(`div`,b,[t[0]||=s(`label`,{class:`cui-label`},`Camera`,-1),m(n,{"model-value":p.data.cameraId,options:a(N),"option-label":`label`,"option-value":`value`,placeholder:`Select camera`,class:`w-full`,"onUpdate:modelValue":J},null,8,[`model-value`,`options`])]),s(`div`,x,[s(`label`,S,i(a(M)(`components.automation_nodes.sensor_type_label`)),1),m(n,{"model-value":p.data.sensorType,options:a(L),"option-label":`label`,"option-value":`value`,placeholder:`Select sensor type`,class:`w-full`,disabled:!p.data.cameraId,"onUpdate:modelValue":Y},null,8,[`model-value`,`options`,`disabled`])]),p.data.sensorType?(h(),l(`div`,C,[s(`label`,w,i(a(M)(`components.automation_nodes.sensor_instance`)),1),m(n,{"model-value":a(B),options:a(V),"option-label":`label`,"option-value":`value`,placeholder:`Select sensor`,class:`w-full`,loading:a(z),"onUpdate:modelValue":X},null,8,[`model-value`,`options`,`loading`])])):d(``,!0),p.data.sensorName&&a(H).length?(h(),l(`div`,T,[s(`label`,E,i(a(M)(`components.automation_nodes.sensor_properties`)),1),(h(!0),l(u,null,o(a(H),e=>(h(),l(`div`,{key:e.value,class:`flex flex-col gap-1.5 p-2 rounded-md border-color`},[s(`div`,D,[m(f,{"model-value":W(e.value),binary:``,"onUpdate:modelValue":t=>K(e.value,t)},null,8,[`model-value`,`onUpdate:modelValue`]),s(`span`,O,i(e.label),1)]),W(e.value)?(h(),c(v,{key:0,"model-value":G(e.value),placeholder:a(M)(`components.automation_nodes.condition_value_placeholder`),class:`w-full`,"onUpdate:modelValue":t=>q(e.value,String(t??``))},null,8,[`model-value`,`placeholder`,`onUpdate:modelValue`])):d(``,!0)]))),128))])):d(``,!0)])}}});export{k as default};
|
package/dist/interface/assets/{ConfigActionSnapshot-9aGopbuJ.js → ConfigActionSnapshot-ClyCQuB3.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fi as e}from"./vendor-cameraui-DgSMexWY.js";import{Er as t,Sr as n,dn as r,mn as i,nr as a,vn as o,xn as s,yn as c,zn as l}from"./vendor-DoIl6acN.js";import{K as u,j as d,z as f}from"./vendor-primevue-7iEzPOvf.js";import{t as p}from"./useCameraOptions-
|
|
1
|
+
import{fi as e}from"./vendor-cameraui-DgSMexWY.js";import{Er as t,Sr as n,dn as r,mn as i,nr as a,vn as o,xn as s,yn as c,zn as l}from"./vendor-DoIl6acN.js";import{K as u,j as d,z as f}from"./vendor-primevue-7iEzPOvf.js";import{t as p}from"./useCameraOptions-CO1HD_gL.js";var m={class:`flex flex-col gap-4`},h={class:`flex flex-col field-gap`},g={class:`cui-toggle-switch`},_={class:`flex items-center gap-4`},v={class:`flex flex-col field-switch-gap`},y={class:`cui-label-switch`},b=s({__name:`ConfigActionSnapshot`,props:{data:{}},emits:[`update:data`],setup(s,{emit:b}){let x=b,{t:S}=e(),{cameraOptions:C}=p();function w(e,t){x(`update:data`,{[e]:t})}return(e,p)=>{let b=d,x=f,T=u;return l(),i(`div`,m,[r(`div`,h,[p[2]||=r(`label`,{class:`cui-label`},`Camera`,-1),c(b,{"model-value":s.data.cameraId,options:n(C),"option-label":`label`,"option-value":`value`,placeholder:`Select camera`,class:`w-full`,"onUpdate:modelValue":p[0]||=e=>w(`cameraId`,e)},null,8,[`model-value`,`options`])]),r(`div`,g,[r(`div`,_,[r(`div`,v,[r(`label`,y,t(n(S)(`components.automation_nodes.snapshot_force_new`)),1),c(x,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:a(()=>[o(t(n(S)(`components.automation_nodes.snapshot_force_new_hint`)),1)]),_:1})]),c(T,{"model-value":s.data.forceNew,class:`ml-auto shrink-0`,"onUpdate:modelValue":p[1]||=e=>w(`forceNew`,e)},null,8,[`model-value`])])])])}}});export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Dn as e,Hn as t,Z as n,fi as r,tt as i}from"./vendor-cameraui-DgSMexWY.js";import{Er as a,Sr as o,Vn as s,dn as c,fn as l,mn as u,nr as d,on as f,pn as p,un as m,xn as h,yn as g,zn as _}from"./vendor-DoIl6acN.js";import{t as v}from"./close-DuwOOM-P.js";import{j as y}from"./vendor-primevue-7iEzPOvf.js";import{t as b}from"./useCameraOptions-
|
|
1
|
+
import{Dn as e,Hn as t,Z as n,fi as r,tt as i}from"./vendor-cameraui-DgSMexWY.js";import{Er as a,Sr as o,Vn as s,dn as c,fn as l,mn as u,nr as d,on as f,pn as p,un as m,xn as h,yn as g,zn as _}from"./vendor-DoIl6acN.js";import{t as v}from"./close-DuwOOM-P.js";import{j as y}from"./vendor-primevue-7iEzPOvf.js";import{t as b}from"./useCameraOptions-CO1HD_gL.js";var x={class:`flex flex-col gap-4`},S={class:`flex flex-col field-gap`},C={class:`flex flex-col field-gap`},w={class:`cui-label`},T={key:0,class:`flex flex-col field-gap`},E={class:`cui-label`},D={key:1,class:`flex items-center gap-2`},O={class:`text-xs text-muted`},k={key:2,class:`flex flex-col gap-3`},A={class:`flex items-center gap-2`},j=h({__name:`ConfigConditionSensorState`,props:{data:{},nodeId:{}},emits:[`update:data`],setup(h,{emit:j}){let M=h,N=j,{t:P}=r(),{cameraOptions:F,getSensorTypes:I,useSensorInstances:L,getPropertiesForSensor:R}=b(),z=[{label:`AND`,value:`AND`},{label:`OR`,value:`OR`}],B=m(()=>M.data.cameraId?I(M.data.cameraId).map(e=>({label:P(`components.camera_options.sensor_type_${e.value}`),value:e.value})):[]),{instanceOptions:V,isLoading:H}=L(m(()=>M.data.cameraId||void 0),m(()=>M.data.sensorType||e.Contact)),U=m(()=>!M.data.sensorName||!M.data.sensorPluginId?``:`${M.data.sensorName}::${M.data.sensorPluginId}`),W=m(()=>V.value.map(e=>({label:e.label,value:`${e.sensorName}::${e.pluginId}`}))),G=m(()=>M.data.sensorType?R(M.data.sensorType):[]),K=m(()=>M.data.conditions??[]);function q(){N(`update:data`,{conditions:[...K.value,{property:``,expectedValue:``}]})}function J(e){let t=[...K.value];t.splice(e,1),N(`update:data`,{conditions:t})}function Y(e,t,n){let r=[...K.value];r[e]={...r[e],[t]:n},N(`update:data`,{conditions:r})}function X(e){N(`update:data`,{cameraId:e,sensorType:``,sensorName:``,sensorPluginId:``,conditions:[],logic:`AND`})}function Z(e){N(`update:data`,{sensorType:e,sensorName:``,sensorPluginId:``,conditions:[],logic:`AND`})}function Q(e){let[t,n]=String(e).split(`::`);N(`update:data`,{sensorName:t,sensorPluginId:n,conditions:[{property:``,expectedValue:``}]})}function $(e,t){N(`update:data`,{[e]:t})}return(e,r)=>{let m=y,b=n,j=v,M=t,N=i;return _(),u(`div`,x,[c(`div`,S,[r[1]||=c(`label`,{class:`cui-label`},`Camera`,-1),g(m,{"model-value":h.data.cameraId,options:o(F),"option-label":`label`,"option-value":`value`,placeholder:`Select camera`,class:`w-full`,"onUpdate:modelValue":X},null,8,[`model-value`,`options`])]),c(`div`,C,[c(`label`,w,a(o(P)(`components.automation_nodes.sensor_type_label`)),1),g(m,{"model-value":h.data.sensorType,options:o(B),"option-label":`label`,"option-value":`value`,placeholder:`Select sensor type`,class:`w-full`,disabled:!h.data.cameraId,"onUpdate:modelValue":Z},null,8,[`model-value`,`options`,`disabled`])]),h.data.sensorType?(_(),u(`div`,T,[c(`label`,E,a(o(P)(`components.automation_nodes.sensor_instance`)),1),g(m,{"model-value":o(U),options:o(W),"option-label":`label`,"option-value":`value`,placeholder:`Select sensor`,class:`w-full`,loading:o(H),"onUpdate:modelValue":Q},null,8,[`model-value`,`options`,`loading`])])):p(``,!0),o(K).length>1?(_(),u(`div`,D,[c(`span`,O,a(o(P)(`components.automation_nodes.condition_logic`)),1),g(b,{"model-value":h.data.logic,options:z,"option-label":`label`,"option-value":`value`,"allow-empty":!1,class:`cui-select-button-small`,"onUpdate:modelValue":r[0]||=e=>$(`logic`,e)},null,8,[`model-value`])])):p(``,!0),h.data.sensorName?(_(),u(`div`,k,[(_(!0),u(f,null,s(o(K),(e,t)=>(_(),u(`div`,{key:t,class:`flex flex-col gap-1.5 p-2 rounded-md border-color`},[c(`div`,A,[g(m,{"model-value":e.property,options:o(G),"option-label":`label`,"option-value":`value`,placeholder:`Property`,class:`flex-1`,"onUpdate:modelValue":e=>Y(t,`property`,e)},null,8,[`model-value`,`options`,`onUpdate:modelValue`]),o(K).length>1?(_(),l(M,{key:0,severity:`danger`,text:``,rounded:``,class:`shrink-0 cui-icon-sm`,onClick:e=>J(t)},{icon:d(()=>[g(j,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])):p(``,!0)]),g(N,{"model-value":e.expectedValue,placeholder:o(P)(`components.automation_nodes.condition_value_placeholder`),class:`w-full`,disabled:!e.property,"onUpdate:modelValue":e=>Y(t,`expectedValue`,String(e??``))},null,8,[`model-value`,`placeholder`,`disabled`,`onUpdate:modelValue`])]))),128)),g(M,{severity:`secondary`,outlined:``,label:o(P)(`components.automation_nodes.condition_add`),class:`cui-button-small self-start`,onClick:q},null,8,[`label`])])):p(``,!0)])}}});export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{X as e,fi as t}from"./vendor-cameraui-DgSMexWY.js";import{Er as n,Sr as r,dn as i,mn as a,nr as o,vn as s,xn as c,yn as l,zn as u}from"./vendor-DoIl6acN.js";import{j as d,u as f,w as p,z as m}from"./vendor-primevue-7iEzPOvf.js";import{t as h}from"./useCameraOptions-
|
|
1
|
+
import{X as e,fi as t}from"./vendor-cameraui-DgSMexWY.js";import{Er as n,Sr as r,dn as i,mn as a,nr as o,vn as s,xn as c,yn as l,zn as u}from"./vendor-DoIl6acN.js";import{j as d,u as f,w as p,z as m}from"./vendor-primevue-7iEzPOvf.js";import{t as h}from"./useCameraOptions-CO1HD_gL.js";var g={class:`flex flex-col gap-4`},_={class:`flex flex-col field-gap`},v={class:`flex flex-col field-gap`},y={class:`cui-label`},b={class:`flex flex-col field-gap`},x={class:`cui-label`},S={class:`flex flex-col field-gap`},C={class:`cui-label`},w={class:`flex items-center gap-3`},T={class:`text-sm text-muted w-10 text-right`},E={class:`flex flex-col field-gap`},D={class:`cui-label`},O={class:`flex flex-col field-gap`},k={class:`cui-label`},A={class:`flex flex-col field-gap`},j={class:`cui-label`},M=c({__name:`ConfigTriggerDetection`,props:{data:{}},emits:[`update:data`],setup(c,{emit:M}){let N=M,{t:P}=t(),{cameraOptions:F}=h(),I=[{label:P(`components.automation_nodes.event_phase_start`),value:`start`},{label:P(`components.automation_nodes.event_phase_update`),value:`update`},{label:P(`components.automation_nodes.event_phase_end`),value:`end`},{label:P(`components.automation_nodes.event_phase_segment_start`),value:`segment-start`},{label:P(`components.automation_nodes.event_phase_segment_update`),value:`segment-update`},{label:P(`components.automation_nodes.event_phase_segment_end`),value:`segment-end`}],L=[{label:P(`components.automation_nodes.label_motion`),value:`motion`},{label:P(`components.automation_nodes.label_person`),value:`person`},{label:P(`components.automation_nodes.label_vehicle`),value:`vehicle`},{label:P(`components.automation_nodes.label_animal`),value:`animal`},{label:P(`components.automation_nodes.label_package`),value:`package`},{label:P(`components.automation_nodes.label_audio`),value:`audio`}],R=[{label:P(`components.automation_nodes.audio_doorbell`),value:`doorbell`},{label:P(`components.automation_nodes.audio_glass_break`),value:`glass_break`},{label:P(`components.automation_nodes.audio_scream`),value:`scream`},{label:P(`components.automation_nodes.audio_gunshot`),value:`gunshot`},{label:P(`components.automation_nodes.audio_dog_bark`),value:`dog_bark`},{label:P(`components.automation_nodes.audio_baby_cry`),value:`baby_cry`},{label:P(`components.automation_nodes.audio_alarm`),value:`alarm`},{label:P(`components.automation_nodes.audio_car_alarm`),value:`car_alarm`},{label:P(`components.automation_nodes.audio_smoke_alarm`),value:`smoke_alarm`},{label:P(`components.automation_nodes.audio_siren`),value:`siren`},{label:P(`components.automation_nodes.audio_speaking`),value:`speaking`},{label:P(`components.automation_nodes.audio_cat`),value:`cat`}];function z(e){N(`update:data`,{cameraId:e,detectionLabels:[],faceFilter:[],licensePlateFilter:[]})}function B(e,t){N(`update:data`,{[e]:t})}return(t,h)=>{let M=d,N=f,V=m,H=e,U=p;return u(),a(`div`,g,[i(`div`,_,[h[6]||=i(`label`,{class:`cui-label`},`Camera`,-1),l(M,{"model-value":c.data.cameraId,options:r(F),"option-label":`label`,"option-value":`value`,placeholder:`Select camera`,class:`w-full`,"onUpdate:modelValue":z},null,8,[`model-value`,`options`])]),i(`div`,v,[i(`label`,y,n(r(P)(`components.automation_nodes.event_phase`)),1),l(N,{"model-value":c.data.eventPhase,options:I,"option-label":`label`,"option-value":`value`,placeholder:r(P)(`components.automation_nodes.event_phase_placeholder`),class:`w-full`,"onUpdate:modelValue":h[0]||=e=>B(`eventPhase`,e)},null,8,[`model-value`,`placeholder`]),l(V,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:o(()=>[s(n(r(P)(`components.automation_nodes.event_phase_multi_hint`)),1)]),_:1})]),i(`div`,b,[i(`label`,x,n(r(P)(`components.automation_nodes.detection_labels`)),1),l(N,{"model-value":c.data.detectionLabels,options:L,"option-label":`label`,"option-value":`value`,placeholder:r(P)(`components.automation_nodes.detection_labels_placeholder`),class:`w-full`,"onUpdate:modelValue":h[1]||=e=>B(`detectionLabels`,e)},null,8,[`model-value`,`placeholder`]),l(V,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:o(()=>[s(n(r(P)(`components.automation_nodes.detection_labels_hint`)),1)]),_:1})]),i(`div`,S,[i(`label`,C,n(r(P)(`components.automation_nodes.confidence`)),1),i(`div`,w,[l(H,{"model-value":c.data.confidenceThreshold*100,min:0,max:100,class:`flex-1`,"onUpdate:modelValue":h[2]||=e=>B(`confidenceThreshold`,(Number(e)||0)/100)},null,8,[`model-value`]),i(`span`,T,n(Math.round(c.data.confidenceThreshold*100))+`%`,1)]),l(V,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:o(()=>[s(n(r(P)(`components.automation_nodes.confidence_hint`)),1)]),_:1})]),i(`div`,E,[i(`label`,D,n(r(P)(`components.automation_nodes.audio_labels`)),1),l(N,{"model-value":c.data.audioLabels,options:R,"option-label":`label`,"option-value":`value`,placeholder:r(P)(`components.automation_nodes.audio_labels_placeholder`),class:`w-full`,"onUpdate:modelValue":h[3]||=e=>B(`audioLabels`,e)},null,8,[`model-value`,`placeholder`]),l(V,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:o(()=>[s(n(r(P)(`components.automation_nodes.audio_labels_hint`)),1)]),_:1})]),i(`div`,O,[i(`label`,k,n(r(P)(`components.automation_nodes.face_filter`)),1),l(U,{"model-value":c.data.faceFilter,multiple:``,typeahead:!1,placeholder:r(P)(`components.automation_nodes.face_filter_placeholder`),"onUpdate:modelValue":h[4]||=e=>B(`faceFilter`,e)},null,8,[`model-value`,`placeholder`]),l(V,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:o(()=>[s(n(r(P)(`components.automation_nodes.face_filter_hint`)),1)]),_:1})]),i(`div`,A,[i(`label`,j,n(r(P)(`components.automation_nodes.license_plate_filter`)),1),l(U,{"model-value":c.data.licensePlateFilter,multiple:``,typeahead:!1,placeholder:r(P)(`components.automation_nodes.license_plate_filter_placeholder`),"onUpdate:modelValue":h[5]||=e=>B(`licensePlateFilter`,e)},null,8,[`model-value`,`placeholder`]),l(V,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:o(()=>[s(n(r(P)(`components.automation_nodes.license_plate_filter_hint`)),1)]),_:1})])])}}});export{M as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{Hn as t,X as n,fi as ee,tt as te}from"./vendor-cameraui-DgSMexWY.js";import{T as r}from"./api-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{Hn as t,X as n,fi as ee,tt as te}from"./vendor-cameraui-DgSMexWY.js";import{T as r}from"./api-aSYFKxo6.js";import{$n as i,Er as a,Pn as o,Sr as s,Vn as ne,Zn as c,dn as l,mn as u,nr as d,on as re,un as f,ur as p,vn as m,xn as h,yn as g,zn as _}from"./vendor-DoIl6acN.js";import{L as ie,R as ae,g as oe,j as se,u as ce,z as le}from"./vendor-primevue-7iEzPOvf.js";import{t as ue}from"./CuiActionButton-Bl7gqhIV.js";import{t as de}from"./information-outline-ChTb2u7w.js";import{i as v,n as y,r as b,t as x}from"./vendor-leaflet-_2Z0GiOD.js";import{t as S}from"./copy-DcVDLQlM.js";import{t as C}from"./useUserOptions-CPkl1O0A.js";var w={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function T(e,t){return _(),u(`svg`,w,[...t[0]||=[l(`path`,{fill:`currentColor`,d:`M12 8a4 4 0 0 1 4 4a4 4 0 0 1-4 4a4 4 0 0 1-4-4a4 4 0 0 1 4-4m-8.95 5H1v-2h2.05C3.5 6.83 6.83 3.5 11 3.05V1h2v2.05c4.17.45 7.5 3.78 7.95 7.95H23v2h-2.05c-.45 4.17-3.78 7.5-7.95 7.95V23h-2v-2.05C6.83 20.5 3.5 17.17 3.05 13M12 5a7 7 0 0 0-7 7a7 7 0 0 0 7 7a7 7 0 0 0 7-7a7 7 0 0 0-7-7`},null,-1)]])}var fe=p({name:`mdi-crosshairs-gps`,render:T}),E=e(v(),1);function D(){return{getCurrentPosition:async()=>new Promise((e,t)=>{if(!navigator.geolocation){t(Error(`geolocation unavailable`));return}navigator.geolocation.getCurrentPosition(t=>e({latitude:t.coords.latitude,longitude:t.coords.longitude}),e=>t(e),{enableHighAccuracy:!0,timeout:1e4})})}}var O={class:`flex flex-col gap-4`},k={class:`flex flex-col field-gap`},A={class:`cui-label`},j={class:`flex flex-col field-gap`},M={class:`cui-label`},N={class:`flex flex-col field-gap`},P={class:`cui-label`},F={class:`flex flex-col field-gap`},I={class:`cui-label`},L={class:`flex flex-col gap-3`},R={class:`cui-label`},z={class:`flex flex-col field-gap`},B={class:`cui-label`},V={class:`flex flex-col field-gap`},pe={class:`cui-label`},me={class:`flex flex-col field-gap`},he={class:`cui-label`},ge={key:0,class:`flex flex-col field-gap`},_e={class:`cui-label`},ve={class:`text-xs text-muted font-medium`},ye={key:1,class:`cui-banner cui-banner-warn`},H=h({__name:`ConfigTriggerGeofence`,props:{data:{}},emits:[`update:data`],setup(e,{emit:p}){let h=e,v=p,{t:w}=ee(),T=r(),{userOptions:H}=C(),{getCurrentPosition:be}=D(),xe=[{label:w(`components.automation_nodes.geofence_event_enter`),value:`enter`},{label:w(`components.automation_nodes.geofence_event_leave`),value:`leave`},{label:w(`components.automation_nodes.geofence_event_both`),value:`both`}],U=c(`mapContainerRef`),W=null,G=null,K=null,q=f(()=>`${window.location.origin}/api/automations/location/${h.data.geofenceId||`...`}`),J=f(()=>Object.entries(h.data.geofenceUserSecrets??{}));function Se(){if(!U.value)return;let e=h.data.latitude||51.505,t=h.data.longitude||-.09;W=E.map(U.value).setView([e,t],15),E.tileLayer(`https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png`,{attribution:`© OpenStreetMap`}).addTo(W);let n=E.icon({iconRetinaUrl:b,iconUrl:y,shadowUrl:x,iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]});G=E.marker([e,t],{draggable:!0,icon:n}).addTo(W),K=E.circle([e,t],{radius:h.data.radius||200,color:`#3b82f6`,fillOpacity:.15,weight:2}).addTo(W),G.on(`dragend`,()=>{let e=G.getLatLng();v(`update:data`,{latitude:e.lat,longitude:e.lng}),K.setLatLng(e)})}function Y(e,t,n){W&&(W.setView([e,t],n??W.getZoom()),G?.setLatLng([e,t]),K?.setLatLng([e,t]))}function Ce(e){e!=null&&(v(`update:data`,{latitude:e}),Y(e,h.data.longitude))}function we(e){e!=null&&(v(`update:data`,{longitude:e}),Y(h.data.latitude,e))}function X(e){e!=null&&($(`radius`,e),K?.setRadius(e))}function Te(){T.add({severity:`error`,summary:w(`components.toast.title_error`),detail:w(`components.automation_nodes.geofence_location_error`),life:4e3})}async function Z(){try{let{latitude:e,longitude:t}=await be();v(`update:data`,{latitude:e,longitude:t}),Y(e,t,16)}catch{Te()}}function Q(e){window.navigator.clipboard.writeText(e)}function $(e,t){v(`update:data`,{[e]:t})}return i(U,e=>{e&&!W&&Se()}),o(()=>{W?.remove(),W=null,G=null,K=null}),(ee,r)=>{let i=te,o=fe,c=t,f=oe,p=n,h=se,v=ce,y=le,b=ue,x=ie,C=ae,T=de;return _(),u(`div`,O,[l(`div`,k,[l(`label`,A,a(s(w)(`components.automation_nodes.geofence_zone_name`)),1),g(i,{"model-value":e.data.zoneName,placeholder:s(w)(`components.automation_nodes.geofence_zone_name_placeholder`),class:`w-full`,"onUpdate:modelValue":r[0]||=e=>$(`zoneName`,e)},null,8,[`model-value`,`placeholder`])]),l(`div`,j,[l(`label`,M,a(s(w)(`components.automation_nodes.geofence_map_hint`)),1),l(`div`,{ref_key:`mapContainerRef`,ref:U,class:`rounded-lg overflow-hidden border-[1px] border-color`,style:{height:`220px`}},null,512),g(c,{severity:`secondary`,outlined:``,label:s(w)(`components.automation_nodes.geofence_use_my_location`),class:`cui-button-small w-full`,onClick:Z},{icon:d(()=>[g(o,{class:`w-4 h-4`})]),_:1},8,[`label`])]),l(`div`,N,[l(`label`,P,a(s(w)(`components.automation_nodes.geofence_latitude`)),1),g(f,{"model-value":e.data.latitude,"min-fraction-digits":4,"max-fraction-digits":6,class:`w-full`,"onUpdate:modelValue":Ce},null,8,[`model-value`])]),l(`div`,F,[l(`label`,I,a(s(w)(`components.automation_nodes.geofence_longitude`)),1),g(f,{"model-value":e.data.longitude,"min-fraction-digits":4,"max-fraction-digits":6,class:`w-full`,"onUpdate:modelValue":we},null,8,[`model-value`])]),l(`div`,L,[l(`label`,R,a(s(w)(`components.automation_nodes.geofence_radius`)),1),g(p,{"model-value":e.data.radius||200,min:50,max:5e3,step:50,class:`w-full`,"onUpdate:modelValue":r[1]||=e=>X(Array.isArray(e)?e[0]:e)},null,8,[`model-value`]),g(f,{"model-value":e.data.radius||200,min:50,max:5e3,suffix:` m`,class:`w-full`,"onUpdate:modelValue":X},null,8,[`model-value`])]),l(`div`,z,[l(`label`,B,a(s(w)(`components.automation_nodes.geofence_event`)),1),g(h,{"model-value":e.data.event||`both`,options:xe,"option-label":`label`,"option-value":`value`,class:`w-full`,"onUpdate:modelValue":r[2]||=e=>$(`event`,e)},null,8,[`model-value`])]),l(`div`,V,[l(`label`,pe,a(s(w)(`components.automation_nodes.geofence_users`)),1),g(v,{"model-value":e.data.users,options:s(H),"option-label":`label`,"option-value":`value`,placeholder:s(w)(`components.automation_nodes.geofence_users_placeholder`),class:`w-full`,"onUpdate:modelValue":r[3]||=e=>$(`users`,e)},null,8,[`model-value`,`options`,`placeholder`]),g(y,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:d(()=>[m(a(s(w)(`components.automation_nodes.geofence_users_hint`)),1)]),_:1})]),l(`div`,me,[l(`label`,he,a(s(w)(`components.automation_nodes.geofence_url`)),1),g(C,null,{default:d(()=>[g(i,{"model-value":s(q),readonly:``,class:`font-mono text-xs`},null,8,[`model-value`]),g(x,null,{default:d(()=>[g(b,{"action-text":s(w)(`components.automation_nodes.webhook_secret_copied`),icon:s(S),"button-props":{severity:`secondary`,text:!0},onAction:r[4]||=e=>Q(s(q))},null,8,[`action-text`,`icon`])]),_:1})]),_:1}),g(y,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:d(()=>[m(a(s(w)(`components.automation_nodes.geofence_url_hint`)),1)]),_:1})]),s(J).length?(_(),u(`div`,ge,[l(`label`,_e,a(s(w)(`components.automation_nodes.geofence_secret`)),1),(_(!0),u(re,null,ne(s(J),([e,t])=>(_(),u(`div`,{key:e,class:`flex flex-col gap-1`},[l(`span`,ve,a(e),1),g(C,null,{default:d(()=>[g(i,{"model-value":t,readonly:``,class:`font-mono text-xs`},null,8,[`model-value`]),g(x,null,{default:d(()=>[g(b,{"action-text":s(w)(`components.automation_nodes.webhook_secret_copied`),icon:s(S),"button-props":{severity:`secondary`,text:!0},onAction:e=>Q(t)},null,8,[`action-text`,`icon`,`onAction`])]),_:2},1024)]),_:2},1024)]))),128)),g(y,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:d(()=>[m(a(s(w)(`components.automation_nodes.geofence_secret_hint`)),1)]),_:1})])):(_(),u(`div`,ye,[g(T,{class:`w-5 h-5 shrink-0`}),l(`span`,null,a(s(w)(`components.automation_nodes.geofence_secret_save_hint`)),1)]))])}}});export{H as default};
|