@camera.ui/server 2.1.12 → 2.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (627) hide show
  1. package/dist/interface/assets/{404-BDi1TzED.js → 404-CVkDpT0X.js} +1 -1
  2. package/dist/interface/assets/{About-DeHiJp3n.js → About-CUgIR2xi.js} +1 -1
  3. package/dist/interface/assets/Automation-BYRKp0AC.js +3 -0
  4. package/dist/interface/assets/{AutomationImport-B3bCE-yS.js → AutomationImport-L_OzZZgi.js} +2 -2
  5. package/dist/interface/assets/{AutomationStore-BoWd7IW9.js → AutomationStore-DaNQqJoT.js} +2 -2
  6. package/dist/interface/assets/AutomationStoreDetail-Seor4Ohh.js +2 -0
  7. package/dist/interface/assets/Automations-BMQIkpUa.js +2 -0
  8. package/dist/interface/assets/Camera-3umh2Xjc.js +2 -0
  9. package/dist/interface/assets/{CameraConsole-C8XSUr7X.js → CameraConsole-BLlgkKDp.js} +2 -2
  10. package/dist/interface/assets/Cameras-DvK8E1Vk.js +651 -0
  11. package/dist/interface/assets/{Camview-Lp3QU0de.css → Camview-DIEa8IRE.css} +1 -1
  12. package/dist/interface/assets/Camview-DSO2lWxT.js +1 -0
  13. package/dist/interface/assets/{CertificateUpload-Cg89m_cM.js → CertificateUpload-BsnlaxRS.js} +1 -1
  14. package/dist/interface/assets/{Config-BDa4dy1w.js → Config-BXj83-No.js} +1 -1
  15. package/dist/interface/assets/{ConfigActionCameraControl-DNmRpuPG.js → ConfigActionCameraControl-BGfvT6ME.js} +1 -1
  16. package/dist/interface/assets/{ConfigActionDelay-Reg_tEG_.js → ConfigActionDelay-D10_C6yo.js} +1 -1
  17. package/dist/interface/assets/{ConfigActionHttp-CqRBOSa3.js → ConfigActionHttp-DL4jh9Wz.js} +1 -1
  18. package/dist/interface/assets/{ConfigActionImageInput-GWECLY4I.js → ConfigActionImageInput-DVvMUzrT.js} +1 -1
  19. package/dist/interface/assets/{ConfigActionMqtt-Di4ZTig8.js → ConfigActionMqtt-BqK3q4cC.js} +1 -1
  20. package/dist/interface/assets/ConfigActionNotification-D_H5Q68D.js +1 -0
  21. package/dist/interface/assets/{ConfigActionNotificationControl-B_p8dnc4.js → ConfigActionNotificationControl-BnTJl4dr.js} +1 -1
  22. package/dist/interface/assets/{ConfigActionOutput-B31cj20h.js → ConfigActionOutput-udY95_rH.js} +1 -1
  23. package/dist/interface/assets/{ConfigActionPlugin-DCUhDIiJ.js → ConfigActionPlugin-C51LrkZb.js} +1 -1
  24. package/dist/interface/assets/{ConfigActionSensor-De63wYQU.js → ConfigActionSensor-B2tFf8x6.js} +1 -1
  25. package/dist/interface/assets/{ConfigActionSnapshot-DZJDjOMT.js → ConfigActionSnapshot-BzmeByH3.js} +1 -1
  26. package/dist/interface/assets/{ConfigActionVariable-Q3QXVMbR.js → ConfigActionVariable-BagC3lj5.js} +1 -1
  27. package/dist/interface/assets/{ConfigConditionIfElse-DKonPxli.js → ConfigConditionIfElse-CQOZJ19Y.js} +1 -1
  28. package/dist/interface/assets/{ConfigConditionSensorState-C_J6ERzt.js → ConfigConditionSensorState-SGYpkNP5.js} +1 -1
  29. package/dist/interface/assets/ConfigConditionSwitch-BXR6xUN8.js +1 -0
  30. package/dist/interface/assets/{ConfigConditionTime-CRDI58_P.js → ConfigConditionTime-BrEhw1R9.js} +1 -1
  31. package/dist/interface/assets/{ConfigSensorValueInput-C3ep90ds.js → ConfigSensorValueInput-DezTWtbA.js} +1 -1
  32. package/dist/interface/assets/{ConfigTriggerDetection-CbVFlyI8.js → ConfigTriggerDetection-xo0imE_3.js} +1 -1
  33. package/dist/interface/assets/ConfigTriggerGeofence-BmJpP4Ew.js +1 -0
  34. package/dist/interface/assets/{ConfigTriggerManual-7kAukUgk.js → ConfigTriggerManual-CmAdnZQK.js} +1 -1
  35. package/dist/interface/assets/{ConfigTriggerMqtt-DUCZZt2j.js → ConfigTriggerMqtt-F19dhVm1.js} +1 -1
  36. package/dist/interface/assets/{ConfigTriggerSchedule-lAiLdu1W.js → ConfigTriggerSchedule-BGci3Aed.js} +1 -1
  37. package/dist/interface/assets/{ConfigTriggerSensor-DIhCfhcN.js → ConfigTriggerSensor-DSEDGB2X.js} +1 -1
  38. package/dist/interface/assets/{ConfigTriggerSystem-DZu6Fp2j.js → ConfigTriggerSystem-DPy8Zir4.js} +1 -1
  39. package/dist/interface/assets/{ConfigTriggerWebhook-D3a5f6vl.js → ConfigTriggerWebhook-Dv0Kmwg8.js} +1 -1
  40. package/dist/interface/assets/Console-Cuh-Vc4u.js +1 -0
  41. package/dist/interface/assets/{CuiAutomationRunsDialog-CgzW_s6M.js → CuiAutomationRunsDialog-B1UeVC6Q.js} +1 -1
  42. package/dist/interface/assets/{CuiBottomSheet-C7UdIQu1.js → CuiBottomSheet-BjkDE7_9.js} +1 -1
  43. package/dist/interface/assets/CuiBottomSheet-C9G-NoMU.js +1 -0
  44. package/dist/interface/assets/CuiCameraPipCard-nrln9zp-.js +1 -0
  45. package/dist/interface/assets/CuiCameraRecordings-B7BhgPpP.css +1 -0
  46. package/dist/interface/assets/CuiCameraRecordings-HKwhFpea.js +1 -0
  47. package/dist/interface/assets/{CuiCameraShares-D3fAJNWF.js → CuiCameraShares-D-fhJCro.js} +1 -1
  48. package/dist/interface/assets/{CuiCameraTable-ApLSxeO4.js → CuiCameraTable-BTVfK-HY.js} +2 -2
  49. package/dist/interface/assets/CuiCameraTable-DGg4_c_u.js +1 -0
  50. package/dist/interface/assets/{CuiChartTable-BeEij8SL.js → CuiChartTable-DAUYP-EW.js} +1 -1
  51. package/dist/interface/assets/{CuiConsole-CMxpzZ51.js → CuiConsole-C7aZj4wK.js} +2 -2
  52. package/dist/interface/assets/{CuiDataTable-f_QVzRqq.js → CuiDataTable-1B8aaZQO.js} +1 -1
  53. package/dist/interface/assets/CuiLightControl-CSA1PYc8.js +1 -0
  54. package/dist/interface/assets/{CuiList-C3oJKyJC.js → CuiList-D-hOSNou.js} +1 -1
  55. package/dist/interface/assets/CuiPluginCard-D1Hkyiy4.js +2 -0
  56. package/dist/interface/assets/{CuiPluginCategoryChip-EJhup0nM.js → CuiPluginCategoryChip-qnn-HD6g.js} +1 -1
  57. package/dist/interface/assets/{CuiPluginOAuthButton-CbPU8trR.js → CuiPluginOAuthButton-CXextmBv.js} +2 -2
  58. package/dist/interface/assets/{CuiPluginTrustBadge-B4bxBl3A.js → CuiPluginTrustBadge-C-8MN2Qc.js} +1 -1
  59. package/dist/interface/assets/{CuiQRCode-CycvR5wz.js → CuiQRCode-D1qmU4qU.js} +1 -1
  60. package/dist/interface/assets/CuiSchema-DnHOpBg4.js +1 -0
  61. package/dist/interface/assets/{CuiTopNavbarItem-D4qP-WpK.js → CuiTopNavbarItem-Csb3O1-n.js} +1 -1
  62. package/dist/interface/assets/Faces-C0QpQxuF.js +1 -0
  63. package/dist/interface/assets/FirstSteps-BqZQovY7.js +1 -0
  64. package/dist/interface/assets/{Floorplan-Da5gt435.css → Floorplan-Bxhdg4C2.css} +1 -1
  65. package/dist/interface/assets/Floorplan-CW-W5ZkV.js +1 -0
  66. package/dist/interface/assets/Instances-VSkiqKKf.js +1 -0
  67. package/dist/interface/assets/{Logs-BBZMBN6a.js → Logs-DQFS2AUi.js} +2 -2
  68. package/dist/interface/assets/{Menu-CRLIo98F.js → Menu-COvvZ_vz.js} +1 -1
  69. package/dist/interface/assets/Metrics-cvbQzChA.js +9 -0
  70. package/dist/interface/assets/OAuthDeviceFlow-3ZC2QCAs.js +1 -0
  71. package/dist/interface/assets/Plugin-DjQd3Y9J.js +1 -0
  72. package/dist/interface/assets/{PluginConsole-D2SUwFDo.js → PluginConsole-BaUkghQD.js} +2 -2
  73. package/dist/interface/assets/PluginDetail-Ofj1hk2q.js +2 -0
  74. package/dist/interface/assets/{PluginSchema-U4q4c9ak.js → PluginSchema-f-ER7hlx.js} +1 -1
  75. package/dist/interface/assets/PluginSearch-Ce3S1HDv.js +1 -0
  76. package/dist/interface/assets/PluginSearch-D5eQsj5p.js +2 -0
  77. package/dist/interface/assets/{PluginUpdateProgress-DWcs6NlJ.js → PluginUpdateProgress-BfYNLvVX.js} +1 -1
  78. package/dist/interface/assets/Plugins-DtDN9z0k.js +1 -0
  79. package/dist/interface/assets/Recordings-CQGnTZFt.js +1 -0
  80. package/dist/interface/assets/SensorEdit-BZtiJyoI.js +1 -0
  81. package/dist/interface/assets/{SensorHistory-B16b4-Um.js → SensorHistory-BFkT3teu.js} +1 -1
  82. package/dist/interface/assets/{Sensors-BsLHVGqk.css → Sensors-CaKl4PQY.css} +1 -1
  83. package/dist/interface/assets/Sensors-DSR-AUqb.js +2 -0
  84. package/dist/interface/assets/{Settings-BOd4EPix.js → Settings-DV3JZFjc.js} +1 -1
  85. package/dist/interface/assets/SettingsAccount-Cd5JPsv2.js +1 -0
  86. package/dist/interface/assets/SettingsAccount-D4ib7Asi.js +1 -0
  87. package/dist/interface/assets/SettingsAppearance-BYsQmdyo.js +1 -0
  88. package/dist/interface/assets/{SettingsAppearance-DZGa_aiI.js → SettingsAppearance-CC6StMAi.js} +1 -1
  89. package/dist/interface/assets/{SettingsBackup-DyblUiF8.js → SettingsBackup-BcVFCbhB.js} +1 -1
  90. package/dist/interface/assets/{SettingsList-DM0yAFkS.js → SettingsList-04HiM3OT.js} +1 -1
  91. package/dist/interface/assets/SettingsMqtt-XaJdsYPn.js +1 -0
  92. package/dist/interface/assets/SettingsNotifications-CUoYMHwr.js +1 -0
  93. package/dist/interface/assets/{SettingsPermissions-w2ptf4wy.js → SettingsPermissions-gFDNSlTh.js} +1 -1
  94. package/dist/interface/assets/SettingsRecordings-Bw64UZWe.js +1 -0
  95. package/dist/interface/assets/SettingsRemote-BnFW-uT-.js +2 -0
  96. package/dist/interface/assets/{SettingsSystem-BsXkYsRC.js → SettingsSystem-Cdjg5GNY.js} +2 -2
  97. package/dist/interface/assets/{SettingsUsers-BSsmo6T0.js → SettingsUsers-DphPL78H.js} +1 -1
  98. package/dist/interface/assets/{Terminal-cU-8dVL_.js → Terminal-CrNjqzTs.js} +2 -2
  99. package/dist/interface/assets/{Updates-dw0MwgsN.js → Updates-V5B9LSD-.js} +1 -1
  100. package/dist/interface/assets/{VariableInput-JSpyezJa.js → VariableInput-n0TxKRqq.js} +1 -1
  101. package/dist/interface/assets/{VariableSuggestions-DZbWgsck.js → VariableSuggestions-C4LmaCAo.js} +1 -1
  102. package/dist/interface/assets/{VersionsHandler-C_mzsgfj.js → VersionsHandler-BPocJcb0.js} +2 -2
  103. package/dist/interface/assets/{VirtualSensorCreate-3mJ8c6Tl.js → VirtualSensorCreate-BPvbrzGS.js} +1 -1
  104. package/dist/interface/assets/Workers-DEvQNzUi.js +2 -0
  105. package/dist/interface/assets/{lightbulb-outline-BtraGBwO.js → alert-outline-DtiCgufF.js} +1 -1
  106. package/dist/interface/assets/{api-COPnjVh2.js → api-BXmkXIE8.js} +1 -1
  107. package/dist/interface/assets/api-DO5wBndX.css +2 -0
  108. package/dist/interface/assets/api-x8zXlvtm.js +4 -0
  109. package/dist/interface/assets/{auth-owqLfbdn.js → auth-BKJnreuu.js} +1 -1
  110. package/dist/interface/assets/{automations-Bql07EFx.js → automations-CVuIXlAQ.js} +1 -1
  111. package/dist/interface/assets/cameraSources-C3cl6FVD.js +1 -0
  112. package/dist/interface/assets/cloudHandoff-BZvvihwX.js +1 -0
  113. package/dist/interface/assets/{config-soN-D-nC.js → config-Sw94rZxF.js} +1 -1
  114. package/dist/interface/assets/{flowSchema-BFZ6n5Su.js → flowSchema-BOrDqdeG.js} +1 -1
  115. package/dist/interface/assets/{intercomService-Bjn0OsVT.js → intercomService-CfCIMUlA.js} +1 -1
  116. package/dist/interface/assets/main-Jl93jEZK.js +3 -0
  117. package/dist/interface/assets/{main-BF8Mg561.css → main-Qqk3RyYP.css} +1 -1
  118. package/dist/interface/assets/{mqtt-CMdU36uB.js → mqtt-BaCMJJk_.js} +1 -1
  119. package/dist/interface/assets/nodeDefinitions-a8iyp3yk.js +1 -0
  120. package/dist/interface/assets/{notifications-C_CbT9aA.js → notifications-l-x8vA4D.js} +1 -1
  121. package/dist/interface/assets/{plugins-CGDE1O2F.js → plugins-GA9v-eQx.js} +1 -1
  122. package/dist/interface/assets/{rooms-BnJo8QbU.js → rooms-DX7PBdpP.js} +1 -1
  123. package/dist/interface/assets/sensorIcons-BTgouEmX.js +1 -0
  124. package/dist/interface/assets/{sensors-Bshdwbki.js → sensors-LJkBCaMk.js} +1 -1
  125. package/dist/interface/assets/{server-CaRDiFTF.js → server-dOx3q8o1.js} +1 -1
  126. package/dist/interface/assets/theme-DgrclY58.js +1 -0
  127. package/dist/interface/assets/types-CSWXRySW.js +1 -0
  128. package/dist/interface/assets/{types-Dwu7_YVv.js → types-D19FOdYo.js} +1 -1
  129. package/dist/interface/assets/types-Yq0FH8fa.js +1 -0
  130. package/dist/interface/assets/ungrouped-B_u9a5wm.js +1 -0
  131. package/dist/interface/assets/{ungrouped-uv64nr5n.css → ungrouped-DTYy_Pud.css} +1 -1
  132. package/dist/interface/assets/{updates-DelnBMM3.js → updates-BVN6uGXy.js} +1 -1
  133. package/dist/interface/assets/{useAppVersion-DeQeb6UF.js → useAppVersion-BUDIkitU.js} +1 -1
  134. package/dist/interface/assets/useBackupRestore-CnSZNCC8.js +1 -0
  135. package/dist/interface/assets/{useCameraOptions-DgMpN00_.js → useCameraOptions-Cgb4eV2d.js} +1 -1
  136. package/dist/interface/assets/{useLogsSocket-BKPqNCOv.js → useLogsSocket-CGKtL049.js} +1 -1
  137. package/dist/interface/assets/{useNavLayout-BJhl8UVM.js → useNavLayout-Dcngcb73.js} +1 -1
  138. package/dist/interface/assets/{usePermissions-Eyt2t6_8.js → usePermissions-zJF4LCPm.js} +1 -1
  139. package/dist/interface/assets/{usePluginUpdates-wfckuNy_.js → usePluginUpdates-DP--lRxm.js} +1 -1
  140. package/dist/interface/assets/{usePushRegistration-jcfB8ujf.js → usePushRegistration-BhPBp28J.js} +1 -1
  141. package/dist/interface/assets/{useServerRestart-XnqHaTb7.js → useServerRestart-BpCDYbPH.js} +1 -1
  142. package/dist/interface/assets/{useStreamStatus-8bE5h_fQ.js → useStreamStatus-BoVMk6KT.js} +1 -1
  143. package/dist/interface/assets/{useTabSwipe-DxZfseQO.js → useTabSwipe--t-Qqa31.js} +1 -1
  144. package/dist/interface/assets/{useUpdateChannel-CjxdE3h1.js → useUpdateChannel-DAuhU-__.js} +1 -1
  145. package/dist/interface/assets/{useUpdatesSocket-DFt7_yr8.js → useUpdatesSocket-C-j3b3tU.js} +1 -1
  146. package/dist/interface/assets/{useUserOptions-DStio0f5.js → useUserOptions-CcLVC73O.js} +1 -1
  147. package/dist/interface/assets/vendor-cameraui-phsC2Mmi.js +2326 -0
  148. package/dist/interface/assets/vendor-core-C0ZWoGJD.js +1 -0
  149. package/dist/interface/assets/{vendor-primevue-DXXRO7Z5.js → vendor-primevue-nPess0JU.js} +76 -76
  150. package/dist/interface/assets/vendor-zod-CJ7LAMqQ.js +99 -0
  151. package/dist/interface/ha/404-PedrGUiq.js +60 -0
  152. package/dist/interface/ha/About-l5fkBqG7.js +55 -0
  153. package/dist/interface/ha/Automation-CaSlGjT4.js +2015 -0
  154. package/dist/interface/ha/AutomationImport-BNavtjDq.js +206 -0
  155. package/dist/interface/ha/AutomationStore-BVSW8TVt.js +335 -0
  156. package/dist/interface/ha/AutomationStoreDetail-DHZwlpz0.js +122 -0
  157. package/dist/interface/ha/Automations-CZ2jvH6d.js +437 -0
  158. package/dist/interface/ha/Camera-CggUrrPm.js +625 -0
  159. package/dist/interface/ha/CameraConsole-DpzF48TF.js +52 -0
  160. package/dist/interface/ha/Cameras-K-kQF5tG.js +1970 -0
  161. package/dist/interface/ha/Camview-zJVP7JwZ.js +1337 -0
  162. package/dist/interface/ha/CertificateUpload-DbBQ87OT.js +117 -0
  163. package/dist/interface/ha/Config-Bsud2DYI.js +356 -0
  164. package/dist/interface/ha/ConfigActionCameraControl-Czkfw_NO.js +152 -0
  165. package/dist/interface/ha/ConfigActionDelay-BHug57u7.js +61 -0
  166. package/dist/interface/ha/ConfigActionHttp-LfbxbfgG.js +134 -0
  167. package/dist/interface/ha/ConfigActionImageInput-Ce2GJzCm.js +171 -0
  168. package/dist/interface/ha/ConfigActionMqtt-KmCGcNZb.js +81 -0
  169. package/dist/interface/ha/ConfigActionNotification-DUMY_3IT.js +199 -0
  170. package/dist/interface/ha/ConfigActionNotificationControl-B9Z2i5WR.js +111 -0
  171. package/dist/interface/ha/ConfigActionOutput-CX-ZQjcs.js +98 -0
  172. package/dist/interface/ha/ConfigActionPlugin-y5PuPwdk.js +172 -0
  173. package/dist/interface/ha/ConfigActionSensor-CC39Rpxi.js +139 -0
  174. package/dist/interface/ha/ConfigActionSnapshot-CWyhx6rk.js +48 -0
  175. package/dist/interface/ha/ConfigActionVariable-BNRLCthd.js +88 -0
  176. package/dist/interface/ha/ConfigConditionIfElse-BayS5_Dr.js +124 -0
  177. package/dist/interface/ha/ConfigConditionSensorState-DLXNqL-R.js +192 -0
  178. package/dist/interface/ha/ConfigConditionSwitch-BBesQgWi.js +128 -0
  179. package/dist/interface/ha/ConfigConditionTime-aD8mk2aa.js +95 -0
  180. package/dist/interface/ha/ConfigSensorValueInput-5JzesEuD.js +169 -0
  181. package/dist/interface/ha/ConfigTriggerDetection--BcjPuyh.js +241 -0
  182. package/dist/interface/ha/ConfigTriggerGeofence-BZi5a2Yv.js +4896 -0
  183. package/dist/interface/ha/ConfigTriggerManual-ConxhgNx.js +14 -0
  184. package/dist/interface/ha/ConfigTriggerMqtt-B6C9injX.js +134 -0
  185. package/dist/interface/ha/ConfigTriggerSchedule-Vv5iNKL3.js +72 -0
  186. package/dist/interface/ha/ConfigTriggerSensor-beixHfSD.js +73 -0
  187. package/dist/interface/ha/ConfigTriggerSystem-BHDpn485.js +188 -0
  188. package/dist/interface/ha/ConfigTriggerWebhook-D9cuCU_p.js +94 -0
  189. package/dist/interface/ha/Console-CbQnrt6X.js +348 -0
  190. package/dist/interface/ha/CuiAutomationRunsDialog-CckgCRNS.js +130 -0
  191. package/dist/interface/ha/CuiBottomSheet-juhGdTsO.js +270 -0
  192. package/dist/interface/ha/CuiCameraRecordings-CLzZiXhk.js +552 -0
  193. package/dist/interface/ha/CuiCameraShares-Dzx1jZGE.js +121 -0
  194. package/dist/interface/ha/CuiCameraTable-ug0ik9N-.js +153 -0
  195. package/dist/interface/ha/CuiChartTable-7EnAA-WG.js +6784 -0
  196. package/dist/interface/ha/CuiConsole-DOnyBSL7.js +244 -0
  197. package/dist/interface/ha/CuiDataTable-Cx9GBqsV.js +8725 -0
  198. package/dist/interface/ha/CuiList-C45psxFZ.js +57 -0
  199. package/dist/interface/ha/CuiMarkdownContent-D7sCtnNQ.js +4716 -0
  200. package/dist/interface/ha/CuiPluginCard-ChLIfOms.js +769 -0
  201. package/dist/interface/ha/CuiPluginOAuthButton-B6vPOEx2.js +105 -0
  202. package/dist/interface/ha/CuiPluginTrustBadge-BvPV93D0.js +123 -0
  203. package/dist/interface/ha/CuiQRCode-Djr3z54t.js +86 -0
  204. package/dist/interface/ha/CuiSchema-dl7TXv-k.js +963 -0
  205. package/dist/interface/ha/CuiTopNavbarItem-BXoda5eM.js +141 -0
  206. package/dist/interface/ha/Faces-DnqWMGWW.js +1281 -0
  207. package/dist/interface/ha/FirstSteps-CFawb017.js +251 -0
  208. package/dist/interface/ha/Floorplan-Mv-Ootly.js +3677 -0
  209. package/dist/interface/ha/Instances-DJjZ3btI.js +680 -0
  210. package/dist/interface/ha/Logs-CLFhW1xq.js +418 -0
  211. package/dist/interface/ha/Menu-D7QTRqMJ.js +161 -0
  212. package/dist/interface/ha/Metrics-CCvFtezL.js +1330 -0
  213. package/dist/interface/ha/OAuthDeviceFlow-4YupTNsK.js +112 -0
  214. package/dist/interface/ha/Plugin-BHU0yhBa.js +1404 -0
  215. package/dist/interface/ha/PluginConsole-CNrLuFQM.js +56 -0
  216. package/dist/interface/ha/PluginDetail-Bm3X-xN4.js +230 -0
  217. package/dist/interface/ha/PluginSearch-C0be8cYD.js +475 -0
  218. package/dist/interface/ha/PluginUpdateProgress-DVvgYMLG.js +34 -0
  219. package/dist/interface/ha/Plugins-R-uz0Se-.js +705 -0
  220. package/dist/interface/ha/Recordings-DAwbihs8.js +1463 -0
  221. package/dist/interface/ha/SensorEdit-BxE1cRLR.js +1460 -0
  222. package/dist/interface/ha/SensorHistory-DUGlH2pU.js +54 -0
  223. package/dist/interface/ha/Sensors-Cax5RlPH.js +1358 -0
  224. package/dist/interface/ha/Settings-DKtlCoyz.js +218 -0
  225. package/dist/interface/ha/SettingsAccount-2e_Vjpev.js +970 -0
  226. package/dist/interface/ha/SettingsAppearance-DCm60FhX.js +220 -0
  227. package/dist/interface/ha/SettingsBackup-CiM_nNWt.js +556 -0
  228. package/dist/interface/ha/SettingsList-D4D3cmLo.js +40 -0
  229. package/dist/interface/ha/SettingsMqtt-CID4L0PD.js +526 -0
  230. package/dist/interface/ha/SettingsNotifications-DGJkhm8T.js +529 -0
  231. package/dist/interface/ha/SettingsPermissions-Cd0rtgli.js +84 -0
  232. package/dist/interface/ha/SettingsRecordings-pR4L0wgy.js +151 -0
  233. package/dist/interface/ha/SettingsRemote-CYg-LSQK.js +1810 -0
  234. package/dist/interface/ha/SettingsSystem-BeYJN1Ut.js +376 -0
  235. package/dist/interface/ha/SettingsUsers-F4CZggSR.js +379 -0
  236. package/dist/interface/ha/Terminal-iQahUx9P.js +631 -0
  237. package/dist/interface/ha/Updates-ClQ77p-o.js +356 -0
  238. package/dist/interface/ha/VariableInput-BOHBmNff.js +52 -0
  239. package/dist/interface/ha/VariableSuggestions-BE06z6SW.js +201 -0
  240. package/dist/interface/ha/VersionsHandler-Cx9u0oj8.js +211 -0
  241. package/dist/interface/ha/VirtualSensorCreate-CvSzLo4N.js +101 -0
  242. package/dist/interface/ha/Workers-CEJtdSu-.js +765 -0
  243. package/dist/interface/ha/accordion-BT2wHwK8.js +577 -0
  244. package/dist/interface/ha/account-B1xL2wxD.js +19 -0
  245. package/dist/interface/ha/ace-Dh61T4RV.js +13238 -0
  246. package/dist/interface/ha/ace.config-HyzcNHkM.js +1429 -0
  247. package/dist/interface/ha/alert-circle-CLRn5GAd.js +19 -0
  248. package/dist/interface/ha/alert-outline-CGTMAqXf.js +75 -0
  249. package/dist/interface/ha/api-BmNBy1ay.js +29 -0
  250. package/dist/interface/ha/api-CWJkvtnM.js +60866 -0
  251. package/dist/interface/ha/arrow-left-DkvcResi.js +19 -0
  252. package/dist/interface/ha/auth-X6tkVYJs.js +271 -0
  253. package/dist/interface/ha/autocomplete-L_jK3s3m.js +1373 -0
  254. package/dist/interface/ha/automationBlueprint-D1TiCF7R.js +249 -0
  255. package/dist/interface/ha/back-filled-Cxzg5vQg.js +20 -0
  256. package/dist/interface/ha/base-D_LAf3cS.js +26 -0
  257. package/dist/interface/ha/base-c1lsE5TW.js +125 -0
  258. package/dist/interface/ha/bell-ring-xrXdzNHW.js +19 -0
  259. package/dist/interface/ha/brain-DyOOk3m3.js +19 -0
  260. package/dist/interface/ha/browser-Bxx7joo_.js +1227 -0
  261. package/dist/interface/ha/browserconfig.xml +11 -0
  262. package/dist/interface/ha/button-BlYuI0Q7.js +406 -0
  263. package/dist/interface/ha/cameraui-cards.js +190 -0
  264. package/dist/interface/ha/cards-CNOyNWMA.js +13316 -0
  265. package/dist/interface/ha/cctv-Bz6BH0ns.js +19 -0
  266. package/dist/interface/ha/check-circle-D_wDxrLs.js +19 -0
  267. package/dist/interface/ha/chevron-down-P5MtUhJO.js +19 -0
  268. package/dist/interface/ha/chip-DxGABeun.js +149 -0
  269. package/dist/interface/ha/clock-outline-JxApewmA.js +19 -0
  270. package/dist/interface/ha/close-Eq3txTBS.js +19 -0
  271. package/dist/interface/ha/close-circle-C2nTtN_-.js +19 -0
  272. package/dist/interface/ha/config-E4Jkelkr.js +116 -0
  273. package/dist/interface/ha/content-copy-DpPXKtKE.js +19 -0
  274. package/dist/interface/ha/copy-C48Ur26H.js +22 -0
  275. package/dist/interface/ha/datepicker-BuvKhBWJ.js +3236 -0
  276. package/dist/interface/ha/definitions-E-sY7Cxg.js +23 -0
  277. package/dist/interface/ha/delete-D-m8mqly.js +19 -0
  278. package/dist/interface/ha/dist-B7lgvbyI.js +279 -0
  279. package/dist/interface/ha/dist-Ca9_5rzq.js +3457 -0
  280. package/dist/interface/ha/divider-jkWvVbPJ.js +110 -0
  281. package/dist/interface/ha/download-Cnr7IQKX.js +19 -0
  282. package/dist/interface/ha/esm-1sIZN4t7.js +6 -0
  283. package/dist/interface/ha/esm-6hnPZcZr.js +15 -0
  284. package/dist/interface/ha/esm-B72ViJ7F.js +5 -0
  285. package/dist/interface/ha/esm-BGlkcEes.js +156 -0
  286. package/dist/interface/ha/esm-BKPZuThK.js +5 -0
  287. package/dist/interface/ha/esm-BMx7MsZ_.js +15 -0
  288. package/dist/interface/ha/esm-CChFtwcx.js +21 -0
  289. package/dist/interface/ha/esm-CMTmAdHP.js +5 -0
  290. package/dist/interface/ha/esm-CkoEL9YX.js +7 -0
  291. package/dist/interface/ha/esm-CvxDASXR.js +23 -0
  292. package/dist/interface/ha/esm-Demxl4zQ.js +5 -0
  293. package/dist/interface/ha/esm-DiBhi9zp.js +5 -0
  294. package/dist/interface/ha/esm-XFPB9fYb.js +15 -0
  295. package/dist/interface/ha/eventLabels-B4C1_4vT.js +42 -0
  296. package/dist/interface/ha/eye-off-AdumIw0H.js +33 -0
  297. package/dist/interface/ha/eye-off-outline-DO3xfiua.js +19 -0
  298. package/dist/interface/ha/fonts/InterVariable.woff2 +0 -0
  299. package/dist/interface/ha/history-BoZc8mgf.js +19 -0
  300. package/dist/interface/ha/home-am0tRTsk.js +19 -0
  301. package/dist/interface/ha/information-outline-DIdNxPCN.js +19 -0
  302. package/dist/interface/ha/inputicon-6-vaPLbw.js +324 -0
  303. package/dist/interface/ha/inputnumber-B1Buq8Nc.js +1033 -0
  304. package/dist/interface/ha/inputtext-DGIESrd0.js +257 -0
  305. package/dist/interface/ha/intercomService-jB2mTgsn.js +1406 -0
  306. package/dist/interface/ha/message-C8U_kMBA.js +244 -0
  307. package/dist/interface/ha/minus-DKa9TXat.js +19 -0
  308. package/dist/interface/ha/minus-QyTgaT70.js +46 -0
  309. package/dist/interface/ha/mqtt-BmDCmG9h.js +56 -0
  310. package/dist/interface/ha/multiselect-BbgV_fPx.js +1492 -0
  311. package/dist/interface/ha/native-BaNeloQn.js +35 -0
  312. package/dist/interface/ha/native-C8PbNqsJ.js +29 -0
  313. package/dist/interface/ha/notifications-B51yvrGL.js +159 -0
  314. package/dist/interface/ha/og-share.png +0 -0
  315. package/dist/interface/ha/pencil-outline-BqfTDXIh.js +19 -0
  316. package/dist/interface/ha/pinia-3D39Do4a.js +6934 -0
  317. package/dist/interface/ha/platformLabels-C3d1PLg-.js +27 -0
  318. package/dist/interface/ha/plugin-DAGqBiG_.js +38 -0
  319. package/dist/interface/ha/plugins-dkWbXWVM.js +592 -0
  320. package/dist/interface/ha/plus-CNdrByQb.js +46 -0
  321. package/dist/interface/ha/plus-d_caPq5l.js +19 -0
  322. package/dist/interface/ha/progressbar-CIoPoMSe.js +95 -0
  323. package/dist/interface/ha/protocol-BB4jdtUC-K1r3LFCq.js +706 -0
  324. package/dist/interface/ha/pwa/apple-splash-landscape-dark-1136x640.png +0 -0
  325. package/dist/interface/ha/pwa/apple-splash-landscape-dark-1334x750.png +0 -0
  326. package/dist/interface/ha/pwa/apple-splash-landscape-dark-1792x828.png +0 -0
  327. package/dist/interface/ha/pwa/apple-splash-landscape-dark-2048x1536.png +0 -0
  328. package/dist/interface/ha/pwa/apple-splash-landscape-dark-2160x1620.png +0 -0
  329. package/dist/interface/ha/pwa/apple-splash-landscape-dark-2208x1242.png +0 -0
  330. package/dist/interface/ha/pwa/apple-splash-landscape-dark-2224x1668.png +0 -0
  331. package/dist/interface/ha/pwa/apple-splash-landscape-dark-2388x1668.png +0 -0
  332. package/dist/interface/ha/pwa/apple-splash-landscape-dark-2436x1125.png +0 -0
  333. package/dist/interface/ha/pwa/apple-splash-landscape-dark-2532x1170.png +0 -0
  334. package/dist/interface/ha/pwa/apple-splash-landscape-dark-2556x1179.png +0 -0
  335. package/dist/interface/ha/pwa/apple-splash-landscape-dark-2688x1242.png +0 -0
  336. package/dist/interface/ha/pwa/apple-splash-landscape-dark-2732x2048.png +0 -0
  337. package/dist/interface/ha/pwa/apple-splash-landscape-dark-2778x1284.png +0 -0
  338. package/dist/interface/ha/pwa/apple-splash-landscape-dark-2796x1290.png +0 -0
  339. package/dist/interface/ha/pwa/apple-splash-landscape-light-1136x640.png +0 -0
  340. package/dist/interface/ha/pwa/apple-splash-landscape-light-1334x750.png +0 -0
  341. package/dist/interface/ha/pwa/apple-splash-landscape-light-1792x828.png +0 -0
  342. package/dist/interface/ha/pwa/apple-splash-landscape-light-2048x1536.png +0 -0
  343. package/dist/interface/ha/pwa/apple-splash-landscape-light-2160x1620.png +0 -0
  344. package/dist/interface/ha/pwa/apple-splash-landscape-light-2208x1242.png +0 -0
  345. package/dist/interface/ha/pwa/apple-splash-landscape-light-2224x1668.png +0 -0
  346. package/dist/interface/ha/pwa/apple-splash-landscape-light-2388x1668.png +0 -0
  347. package/dist/interface/ha/pwa/apple-splash-landscape-light-2436x1125.png +0 -0
  348. package/dist/interface/ha/pwa/apple-splash-landscape-light-2532x1170.png +0 -0
  349. package/dist/interface/ha/pwa/apple-splash-landscape-light-2556x1179.png +0 -0
  350. package/dist/interface/ha/pwa/apple-splash-landscape-light-2688x1242.png +0 -0
  351. package/dist/interface/ha/pwa/apple-splash-landscape-light-2732x2048.png +0 -0
  352. package/dist/interface/ha/pwa/apple-splash-landscape-light-2778x1284.png +0 -0
  353. package/dist/interface/ha/pwa/apple-splash-landscape-light-2796x1290.png +0 -0
  354. package/dist/interface/ha/pwa/apple-splash-portrait-dark-1125x2436.png +0 -0
  355. package/dist/interface/ha/pwa/apple-splash-portrait-dark-1170x2532.png +0 -0
  356. package/dist/interface/ha/pwa/apple-splash-portrait-dark-1179x2556.png +0 -0
  357. package/dist/interface/ha/pwa/apple-splash-portrait-dark-1242x2208.png +0 -0
  358. package/dist/interface/ha/pwa/apple-splash-portrait-dark-1242x2688.png +0 -0
  359. package/dist/interface/ha/pwa/apple-splash-portrait-dark-1284x2778.png +0 -0
  360. package/dist/interface/ha/pwa/apple-splash-portrait-dark-1290x2796.png +0 -0
  361. package/dist/interface/ha/pwa/apple-splash-portrait-dark-1536x2048.png +0 -0
  362. package/dist/interface/ha/pwa/apple-splash-portrait-dark-1620x2160.png +0 -0
  363. package/dist/interface/ha/pwa/apple-splash-portrait-dark-1668x2224.png +0 -0
  364. package/dist/interface/ha/pwa/apple-splash-portrait-dark-1668x2388.png +0 -0
  365. package/dist/interface/ha/pwa/apple-splash-portrait-dark-2048x2732.png +0 -0
  366. package/dist/interface/ha/pwa/apple-splash-portrait-dark-640x1136.png +0 -0
  367. package/dist/interface/ha/pwa/apple-splash-portrait-dark-750x1334.png +0 -0
  368. package/dist/interface/ha/pwa/apple-splash-portrait-dark-828x1792.png +0 -0
  369. package/dist/interface/ha/pwa/apple-splash-portrait-light-1125x2436.png +0 -0
  370. package/dist/interface/ha/pwa/apple-splash-portrait-light-1170x2532.png +0 -0
  371. package/dist/interface/ha/pwa/apple-splash-portrait-light-1179x2556.png +0 -0
  372. package/dist/interface/ha/pwa/apple-splash-portrait-light-1242x2208.png +0 -0
  373. package/dist/interface/ha/pwa/apple-splash-portrait-light-1242x2688.png +0 -0
  374. package/dist/interface/ha/pwa/apple-splash-portrait-light-1284x2778.png +0 -0
  375. package/dist/interface/ha/pwa/apple-splash-portrait-light-1290x2796.png +0 -0
  376. package/dist/interface/ha/pwa/apple-splash-portrait-light-1536x2048.png +0 -0
  377. package/dist/interface/ha/pwa/apple-splash-portrait-light-1620x2160.png +0 -0
  378. package/dist/interface/ha/pwa/apple-splash-portrait-light-1668x2224.png +0 -0
  379. package/dist/interface/ha/pwa/apple-splash-portrait-light-1668x2388.png +0 -0
  380. package/dist/interface/ha/pwa/apple-splash-portrait-light-2048x2732.png +0 -0
  381. package/dist/interface/ha/pwa/apple-splash-portrait-light-640x1136.png +0 -0
  382. package/dist/interface/ha/pwa/apple-splash-portrait-light-750x1334.png +0 -0
  383. package/dist/interface/ha/pwa/apple-splash-portrait-light-828x1792.png +0 -0
  384. package/dist/interface/ha/pwa/apple-touch-icon-180x180.png +0 -0
  385. package/dist/interface/ha/pwa/favicon-16.ico +0 -0
  386. package/dist/interface/ha/pwa/favicon-32.ico +0 -0
  387. package/dist/interface/ha/pwa/favicon-48.ico +0 -0
  388. package/dist/interface/ha/pwa/favicon-64.ico +0 -0
  389. package/dist/interface/ha/pwa/logo.svg +1 -0
  390. package/dist/interface/ha/pwa/maskable-icon-1240x600.png +0 -0
  391. package/dist/interface/ha/pwa/maskable-icon-512x512.png +0 -0
  392. package/dist/interface/ha/pwa/maskable-icon-620x300.png +0 -0
  393. package/dist/interface/ha/pwa/pwa-1024x1024.png +0 -0
  394. package/dist/interface/ha/pwa/pwa-120x120.png +0 -0
  395. package/dist/interface/ha/pwa/pwa-144x144.png +0 -0
  396. package/dist/interface/ha/pwa/pwa-152x152.png +0 -0
  397. package/dist/interface/ha/pwa/pwa-167x167.png +0 -0
  398. package/dist/interface/ha/pwa/pwa-180x180.png +0 -0
  399. package/dist/interface/ha/pwa/pwa-192x192.png +0 -0
  400. package/dist/interface/ha/pwa/pwa-24x24.png +0 -0
  401. package/dist/interface/ha/pwa/pwa-300x300.png +0 -0
  402. package/dist/interface/ha/pwa/pwa-36x36.png +0 -0
  403. package/dist/interface/ha/pwa/pwa-48x48.png +0 -0
  404. package/dist/interface/ha/pwa/pwa-50x50.png +0 -0
  405. package/dist/interface/ha/pwa/pwa-64x64.png +0 -0
  406. package/dist/interface/ha/pwa/pwa-72x72.png +0 -0
  407. package/dist/interface/ha/pwa/pwa-88x88.png +0 -0
  408. package/dist/interface/ha/pwa/pwa-96x96.png +0 -0
  409. package/dist/interface/ha/radar-C7lI26j4.js +19 -0
  410. package/dist/interface/ha/refresh-BIhepekY.js +19 -0
  411. package/dist/interface/ha/ring-resize-VS4MSeBv.js +16 -0
  412. package/dist/interface/ha/ripple-BilzxWfY.js +2928 -0
  413. package/dist/interface/ha/robots.txt +2 -0
  414. package/dist/interface/ha/rolldown-runtime-CEFd7nDs.js +30 -0
  415. package/dist/interface/ha/rooms-B-FUXQ1p.js +45 -0
  416. package/dist/interface/ha/round-alt-arrow-left-bold-CWEg-ZLF.js +37 -0
  417. package/dist/interface/ha/runtime-core.esm-bundler-D8slQ3BU.js +3295 -0
  418. package/dist/interface/ha/search-CoOsbgeb.js +19 -0
  419. package/dist/interface/ha/select-DjWkRqsI.js +1382 -0
  420. package/dist/interface/ha/server-CKJKoFfg.js +239 -0
  421. package/dist/interface/ha/settings-EKkSQLzv.js +22 -0
  422. package/dist/interface/ha/source-branch-CZwSOrQA.js +19 -0
  423. package/dist/interface/ha/speeddial-Dv9txWte.js +682 -0
  424. package/dist/interface/ha/spinner-D6iUldg9.js +46 -0
  425. package/dist/interface/ha/synapse-CGrlyQDE.js +35 -0
  426. package/dist/interface/ha/tag-CXgC9OZ6.js +95 -0
  427. package/dist/interface/ha/textarea-DvLkfUX7.js +130 -0
  428. package/dist/interface/ha/tooltip-BIrD_hC8.js +277 -0
  429. package/dist/interface/ha/trash-2-C4zSCZfs.js +23 -0
  430. package/dist/interface/ha/trash-can-outline-DCqsCOd2.js +19 -0
  431. package/dist/interface/ha/trash-fill-BPsrwR8X.js +21 -0
  432. package/dist/interface/ha/types-C7MzwoQR.js +28 -0
  433. package/dist/interface/ha/types-J_J0HKlK.js +1032 -0
  434. package/dist/interface/ha/ungrouped-BpaM88Y-.js +1116 -0
  435. package/dist/interface/ha/updates-BdVmkKAa.js +341 -0
  436. package/dist/interface/ha/upload-2xJkVPZE.js +19 -0
  437. package/dist/interface/ha/upload-wQHBRZX_.js +23 -0
  438. package/dist/interface/ha/useAppVersion-DzDaOsKc.js +22 -0
  439. package/dist/interface/ha/useLogsSocket-CWUE-KXV.js +59 -0
  440. package/dist/interface/ha/useNavLayout-BqpyvD2F.js +125 -0
  441. package/dist/interface/ha/usePermissions-BIUeW4ef.js +72 -0
  442. package/dist/interface/ha/useServerRestart-0c4gA1fG.js +23 -0
  443. package/dist/interface/ha/useTabSwipe-C8LdKw23.js +45 -0
  444. package/dist/interface/ha/useUpdateChannel-CHVLthZB.js +22 -0
  445. package/dist/interface/ha/useUpdatesSocket-CaxEs511.js +34 -0
  446. package/dist/interface/ha/useUserOptions-Rk_71WAK.js +15 -0
  447. package/dist/interface/ha/utils-DYtBrGDz.js +7 -0
  448. package/dist/interface/ha/virtualscroller-s_gNqN5p.js +996 -0
  449. package/dist/interface/ha/vue-flow-background-B0Vu4-8M.js +6840 -0
  450. package/dist/interface/ha/vue-i18n-Dcb07o5U.js +2409 -0
  451. package/dist/interface/ha/web-0Kyq65na.js +78 -0
  452. package/dist/interface/ha/web-B7Dt2zZN.js +340 -0
  453. package/dist/interface/ha/web-BNdrPSpb.js +102 -0
  454. package/dist/interface/ha/web-BPBZBCtX.js +8 -0
  455. package/dist/interface/ha/web-BjKL51lK-qwJdIpM1.js +221 -0
  456. package/dist/interface/ha/web-C01i9qI1.js +57 -0
  457. package/dist/interface/ha/web-CH3JeXWa.js +211 -0
  458. package/dist/interface/ha/web-Cpm1-DVe.js +33 -0
  459. package/dist/interface/ha/web-DqRMXrnx.js +31 -0
  460. package/dist/interface/ha/web-DtVT7WYt.js +17 -0
  461. package/dist/interface/ha/web-DxJQZCiR.js +59 -0
  462. package/dist/interface/ha/web-I7Urp4AE.js +46 -0
  463. package/dist/interface/ha/web-aSaPk7kr.js +57 -0
  464. package/dist/interface/ha/web-pMey9p3Y.js +79 -0
  465. package/dist/interface/ha/xterm-B6xA6E5i.js +14833 -0
  466. package/dist/interface/ha/zoom-in-CNVB9H3D.js +41 -0
  467. package/dist/interface/index.html +29 -29
  468. package/dist/interface/sw.js +1 -1
  469. package/dist/server/package.json +8 -8
  470. package/dist/server/requirements.txt +3 -3
  471. package/dist/server/src/_camera_ui_tools/camera_ui_rpc/client.py +9 -6
  472. package/dist/server/src/_camera_ui_tools/camera_ui_rpc/types.py +2 -2
  473. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/__init__.py +4 -2
  474. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/config.py +8 -0
  475. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/device.py +4 -3
  476. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/internal/__init__.py +6 -0
  477. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/internal/sensor_rpc.py +17 -6
  478. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/manager/__init__.py +24 -70
  479. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/interfaces.py +46 -19
  480. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/__init__.py +2 -0
  481. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/base.py +65 -8
  482. package/dist/server/src/api/database/index.d.ts +1 -1
  483. package/dist/server/src/api/database/index.js +4 -32
  484. package/dist/server/src/api/database/index.js.map +1 -1
  485. package/dist/server/src/api/database/migrations/v2-1-18.d.ts +3 -0
  486. package/dist/server/src/api/database/migrations/v2-1-18.js +24 -0
  487. package/dist/server/src/api/database/migrations/v2-1-18.js.map +1 -0
  488. package/dist/server/src/api/database/record-schemas.d.ts +1 -0
  489. package/dist/server/src/api/database/types.d.ts +4 -3
  490. package/dist/server/src/api/schemas/cameras.schema.d.ts +53 -15
  491. package/dist/server/src/api/schemas/cameras.schema.js +5 -1
  492. package/dist/server/src/api/schemas/cameras.schema.js.map +1 -1
  493. package/dist/server/src/api/schemas/users.schema.d.ts +7 -0
  494. package/dist/server/src/api/schemas/users.schema.js +1 -1
  495. package/dist/server/src/api/schemas/users.schema.js.map +1 -1
  496. package/dist/server/src/api/services/cameras.service.js +14 -21
  497. package/dist/server/src/api/services/cameras.service.js.map +1 -1
  498. package/dist/server/src/api/services/sensors.service.d.ts +3 -3
  499. package/dist/server/src/api/services/sensors.service.js +3 -24
  500. package/dist/server/src/api/services/sensors.service.js.map +1 -1
  501. package/dist/server/src/api/utils/regex.d.ts +2 -0
  502. package/dist/server/src/api/utils/regex.js +2 -0
  503. package/dist/server/src/api/utils/regex.js.map +1 -1
  504. package/dist/server/src/api/websocket/nsp/sensors.d.ts +3 -1
  505. package/dist/server/src/api/websocket/nsp/sensors.js +13 -3
  506. package/dist/server/src/api/websocket/nsp/sensors.js.map +1 -1
  507. package/dist/server/src/camera/decoder/debug/detection-record.d.ts +3 -1
  508. package/dist/server/src/camera/decoder/debug/detection-record.js +6 -2
  509. package/dist/server/src/camera/decoder/debug/detection-record.js.map +1 -1
  510. package/dist/server/src/camera/decoder/detection-coordinator.d.ts +2 -0
  511. package/dist/server/src/camera/decoder/detection-coordinator.js +44 -25
  512. package/dist/server/src/camera/decoder/detection-coordinator.js.map +1 -1
  513. package/dist/server/src/camera/decoder/detection-pipeline.d.ts +3 -1
  514. package/dist/server/src/camera/decoder/detection-pipeline.js +3 -22
  515. package/dist/server/src/camera/decoder/detection-pipeline.js.map +1 -1
  516. package/dist/server/src/camera/decoder/event-manager.d.ts +4 -3
  517. package/dist/server/src/camera/decoder/event-manager.js +17 -5
  518. package/dist/server/src/camera/decoder/event-manager.js.map +1 -1
  519. package/dist/server/src/camera/decoder/event-thumbnailer.d.ts +3 -0
  520. package/dist/server/src/camera/decoder/event-thumbnailer.js +13 -8
  521. package/dist/server/src/camera/decoder/event-thumbnailer.js.map +1 -1
  522. package/dist/server/src/camera/decoder/event-trace.d.ts +58 -0
  523. package/dist/server/src/camera/decoder/event-trace.js +118 -0
  524. package/dist/server/src/camera/decoder/event-trace.js.map +1 -0
  525. package/dist/server/src/camera/decoder/nvr-sink.d.ts +2 -0
  526. package/dist/server/src/camera/decoder/nvr-sink.js.map +1 -1
  527. package/dist/server/src/camera/decoder/reconnect-backoff.js +1 -1
  528. package/dist/server/src/camera/decoder/reconnect-backoff.js.map +1 -1
  529. package/dist/server/src/camera/decoder/sources/analysis-source.d.ts +1 -0
  530. package/dist/server/src/camera/decoder/sources/buffered-source.d.ts +7 -1
  531. package/dist/server/src/camera/decoder/sources/buffered-source.js +27 -15
  532. package/dist/server/src/camera/decoder/sources/buffered-source.js.map +1 -1
  533. package/dist/server/src/camera/decoder/sources/frame-handle.d.ts +2 -1
  534. package/dist/server/src/camera/decoder/sources/frame-handle.js +5 -3
  535. package/dist/server/src/camera/decoder/sources/frame-handle.js.map +1 -1
  536. package/dist/server/src/camera/decoder/sources/frame-source.d.ts +1 -0
  537. package/dist/server/src/camera/decoder/sources/frame-source.js +7 -2
  538. package/dist/server/src/camera/decoder/sources/frame-source.js.map +1 -1
  539. package/dist/server/src/camera/decoder/sources/rtp-index.d.ts +9 -0
  540. package/dist/server/src/camera/decoder/sources/rtp-index.js +24 -0
  541. package/dist/server/src/camera/decoder/sources/rtp-index.js.map +1 -0
  542. package/dist/server/src/camera/decoder/worker.js +1 -0
  543. package/dist/server/src/camera/decoder/worker.js.map +1 -1
  544. package/dist/server/src/go2rtc/types.d.ts +1 -1
  545. package/dist/server/src/go2rtc/types.js +1 -1
  546. package/dist/server/src/go2rtc/types.js.map +1 -1
  547. package/dist/server/src/plugins/runtime/node/child.js +1 -0
  548. package/dist/server/src/plugins/runtime/node/child.js.map +1 -1
  549. package/dist/server/src/plugins/runtime/node/proxy/cameraDevice.js +3 -0
  550. package/dist/server/src/plugins/runtime/node/proxy/cameraDevice.js.map +1 -1
  551. package/dist/server/src/plugins/runtime/node/proxy/sensorManager.d.ts +2 -5
  552. package/dist/server/src/plugins/runtime/node/proxy/sensorManager.js +95 -24
  553. package/dist/server/src/plugins/runtime/node/proxy/sensorManager.js.map +1 -1
  554. package/dist/server/src/plugins/runtime/python/child.py +1 -0
  555. package/dist/server/src/plugins/runtime/python/proxy/camera_device.py +9 -0
  556. package/dist/server/src/plugins/runtime/python/proxy/sensor.py +2 -1
  557. package/dist/server/src/plugins/runtime/python/proxy/sensor_manager.py +185 -88
  558. package/dist/server/src/plugins/runtime/python/typings.py +18 -0
  559. package/dist/server/src/rpc/interfaces/sensor.d.ts +19 -4
  560. package/dist/server/src/sensors/discovery.d.ts +1 -1
  561. package/dist/server/src/sensors/discovery.js +10 -19
  562. package/dist/server/src/sensors/discovery.js.map +1 -1
  563. package/dist/server/src/sensors/registry.d.ts +6 -2
  564. package/dist/server/src/sensors/registry.js +75 -6
  565. package/dist/server/src/sensors/registry.js.map +1 -1
  566. package/dist/server/src/utils/camera.d.ts +12 -2
  567. package/dist/server/src/utils/camera.js +27 -1
  568. package/dist/server/src/utils/camera.js.map +1 -1
  569. package/dist/server/src/workers/pairing.js +17 -8
  570. package/dist/server/src/workers/pairing.js.map +1 -1
  571. package/package.json +8 -8
  572. package/dist/interface/assets/Automation-4HPAjq1i.js +0 -3
  573. package/dist/interface/assets/AutomationStoreDetail-C2ntfGP-.js +0 -2
  574. package/dist/interface/assets/Automations-CUUq9dxs.js +0 -2
  575. package/dist/interface/assets/Camera-DmrRrgqQ.js +0 -2
  576. package/dist/interface/assets/Cameras-B-aQUuPk.js +0 -652
  577. package/dist/interface/assets/Camview-B-W5jpCR.js +0 -1
  578. package/dist/interface/assets/ConfigActionNotification-Bq28CjsJ.js +0 -1
  579. package/dist/interface/assets/ConfigConditionSwitch-DYAlj5no.js +0 -1
  580. package/dist/interface/assets/ConfigTriggerGeofence-ClKyzb-x.js +0 -1
  581. package/dist/interface/assets/Console-ctbGFtCH.js +0 -1
  582. package/dist/interface/assets/CuiBottomSheet-Bo1wUyiN.js +0 -1
  583. package/dist/interface/assets/CuiCameraPipCard-BEAE44of.js +0 -1
  584. package/dist/interface/assets/CuiCameraRecordings-BzbwSK8-.css +0 -1
  585. package/dist/interface/assets/CuiCameraRecordings-C1evIMhc.js +0 -1
  586. package/dist/interface/assets/CuiCameraTable-BAjQ8h5H.js +0 -1
  587. package/dist/interface/assets/CuiLightControl-9OhT9YYt.js +0 -1
  588. package/dist/interface/assets/CuiPluginCard-DQgVasi7.js +0 -2
  589. package/dist/interface/assets/CuiSchema-juKEra_J.js +0 -1
  590. package/dist/interface/assets/Faces-Ce3mKYc7.js +0 -1
  591. package/dist/interface/assets/FirstSteps-BBLzX2bl.js +0 -1
  592. package/dist/interface/assets/Floorplan-B7BVj65t.js +0 -1
  593. package/dist/interface/assets/Instances-4VxGT2fm.js +0 -1
  594. package/dist/interface/assets/Metrics-DudHV8Ov.js +0 -9
  595. package/dist/interface/assets/OAuthDeviceFlow-Z3Cesvs9.js +0 -1
  596. package/dist/interface/assets/Plugin-DwadariU.js +0 -1
  597. package/dist/interface/assets/PluginDetail-C_XghvQz.js +0 -2
  598. package/dist/interface/assets/PluginSearch-11dsxfvW.js +0 -1
  599. package/dist/interface/assets/PluginSearch-DgQOryM2.js +0 -2
  600. package/dist/interface/assets/Plugins-QheVcYZB.js +0 -1
  601. package/dist/interface/assets/Recordings-DwPnYsd6.js +0 -1
  602. package/dist/interface/assets/SensorEdit-C9Ejdxaz.js +0 -1
  603. package/dist/interface/assets/Sensors-D4tY50d4.js +0 -2
  604. package/dist/interface/assets/SettingsAccount-DMvvar8D.js +0 -1
  605. package/dist/interface/assets/SettingsAccount-DYCCnjWY.js +0 -1
  606. package/dist/interface/assets/SettingsAppearance-vLBhLEag.js +0 -1
  607. package/dist/interface/assets/SettingsMqtt-Cj9ywnP2.js +0 -1
  608. package/dist/interface/assets/SettingsNotifications-flx3W4Uo.js +0 -1
  609. package/dist/interface/assets/SettingsRecordings-D3b6y2SX.js +0 -1
  610. package/dist/interface/assets/SettingsRemote-o01wgKPR.js +0 -2
  611. package/dist/interface/assets/Workers-CdaYj6Ap.js +0 -2
  612. package/dist/interface/assets/alert-outline-KxFvd3i6.js +0 -1
  613. package/dist/interface/assets/api-2VPaKkqc.js +0 -2
  614. package/dist/interface/assets/api-CEbDxsSY.css +0 -2
  615. package/dist/interface/assets/cameras.schema-CnSdfqqj.js +0 -1
  616. package/dist/interface/assets/cloudHandoff-B1z5dyPD.js +0 -1
  617. package/dist/interface/assets/main-BfL5CDS8.js +0 -3
  618. package/dist/interface/assets/nodeDefinitions-D6zhuw60.js +0 -1
  619. package/dist/interface/assets/sensorIcons-FPxm3pDg.js +0 -1
  620. package/dist/interface/assets/theme-CRQoJiuY.js +0 -1
  621. package/dist/interface/assets/types-BHgaZSm2.js +0 -1
  622. package/dist/interface/assets/types-CQpPteyx.js +0 -1
  623. package/dist/interface/assets/ungrouped-BbOtmmDD.js +0 -1
  624. package/dist/interface/assets/useBackupRestore-CT1PYJDW.js +0 -1
  625. package/dist/interface/assets/vendor-cameraui-ZyqPntQ7.js +0 -2326
  626. package/dist/interface/assets/vendor-core-DN-bpg68.js +0 -1
  627. package/dist/interface/assets/vendor-zod-B0ZFM2Pr.js +0 -127
@@ -0,0 +1,2015 @@
1
+ import { r as e } from "./rolldown-runtime-CEFd7nDs.js";
2
+ import { m as t } from "./ripple-BilzxWfY.js";
3
+ import { A as n, B as r, Et as i, G as a, H as o, Jt as s, K as c, M as l, Ot as u, Wt as d, Y as f, _t as p, d as m, f as h, g, gt as _, kt as v, l as y, lt as b, ot as x, p as S, qt as C, r as w, rt as T, u as E, ut as D, v as O, wt as k, x as A, xt as j, y as M, z as ee } from "./runtime-core.esm-bundler-D8slQ3BU.js";
4
+ import { t as N } from "./tooltip-BIrD_hC8.js";
5
+ import { t as te } from "./message-C8U_kMBA.js";
6
+ import { t as P } from "./history-BoZc8mgf.js";
7
+ import { Dn as ne, Dr as re, Er as ie, Fr as ae, Lr as oe, Rr as se, W as ce, _n as le, _t as F, dr as ue, f as de, gi as fe, gt as pe, kn as me, ui as he, vr as ge, yr as _e } from "./api-CWJkvtnM.js";
8
+ import { i as I } from "./intercomService-jB2mTgsn.js";
9
+ import { N as L, P as R, n as ve, r as ye } from "./pinia-3D39Do4a.js";
10
+ import { n as z } from "./vue-i18n-Dcb07o5U.js";
11
+ import { v as B } from "./dist-Ca9_5rzq.js";
12
+ import { t as be } from "./button-BlYuI0Q7.js";
13
+ import { t as V } from "./inputtext-DGIESrd0.js";
14
+ import { t as H } from "./close-Eq3txTBS.js";
15
+ import { i as U, n as xe, r as Se, t as Ce } from "./accordion-BT2wHwK8.js";
16
+ import { t as we } from "./inputnumber-B1Buq8Nc.js";
17
+ import { t as Te } from "./speeddial-Dv9txWte.js";
18
+ import { a as W, i as G, l as Ee, r as K } from "./types-J_J0HKlK.js";
19
+ import { a as q, i as De } from "./automationBlueprint-D1TiCF7R.js";
20
+ import { t as Oe } from "./CuiBottomSheet-juhGdTsO.js";
21
+ import { t as ke } from "./back-filled-Cxzg5vQg.js";
22
+ import { a as Ae, c as je, d as Me, f as Ne, i as Pe, l as Fe, n as Ie, o as J, p as Le, r as Y, s as X, t as Re, u as ze } from "./vue-flow-background-B0Vu4-8M.js";
23
+ import { t as Be } from "./plus-d_caPq5l.js";
24
+ import { t as Ve } from "./settings-EKkSQLzv.js";
25
+ //#region src/stores/automations.ts
26
+ var Z = ve("automations", () => {
27
+ let e = j(null), t = j(null), n = j(null), r = j(!1), i = j(null), a = j([]);
28
+ function o(e) {
29
+ if (!n.value) return;
30
+ let t = n.value.edges, r = n.value.nodes, i = t.filter((t) => t.target === e).map((e) => e.source);
31
+ return r.find((e) => i.includes(e.id));
32
+ }
33
+ return {
34
+ activeFlowId: e,
35
+ selectedNodeId: t,
36
+ draft: n,
37
+ draftDirty: r,
38
+ lastOutput: i,
39
+ validationIssues: a,
40
+ getDraftSourceNode: o
41
+ };
42
+ });
43
+ //#endregion
44
+ //#region src/components/CuiAutomation/config/flowSchema.ts
45
+ function He(e, t) {
46
+ if (!e) return [];
47
+ let n = [];
48
+ return Ke(e, t, n, /* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()), n;
49
+ }
50
+ function Ue(e, t, n) {
51
+ let r = (n ?? "").trim();
52
+ if (r) return He(e, t).find((e) => e.template === r);
53
+ }
54
+ function We(e) {
55
+ let t = Z(), { t: n } = z(), r = y(() => He(t.draft, u(e)));
56
+ return {
57
+ variables: r,
58
+ options: y(() => r.value.map((e) => ({
59
+ label: e.labelKey ? n(`components.automation_nodes.${e.labelKey}`) : e.label ?? e.template,
60
+ value: e.template
61
+ })))
62
+ };
63
+ }
64
+ function Ge(e, t) {
65
+ return e?.values ? e.values.map((e) => ({
66
+ label: e.labelKey ? `${t(`components.automation_nodes.${e.labelKey}`)} (${e.value})` : e.value,
67
+ value: e.value
68
+ })) : [];
69
+ }
70
+ function Ke(e, t, n, r, i) {
71
+ if (i.has(t)) return;
72
+ i.add(t);
73
+ let a = e.edges, o = e.nodes;
74
+ for (let s of a) {
75
+ if (s.target !== t) continue;
76
+ let a = o.find((e) => e.id === s.source);
77
+ if (!a?.type) continue;
78
+ let c = qe(a), l = typeof a.data?.alias == "string" ? a.data.alias : void 0;
79
+ for (let e of c) {
80
+ if (l) {
81
+ let t = {
82
+ ...e,
83
+ template: e.template.replace("{{", `{{${l}.`),
84
+ label: `${l}: ${e.label ?? ""}`.trim()
85
+ };
86
+ r.has(t.template) || (r.add(t.template), n.push(t));
87
+ }
88
+ r.has(e.template) || (r.add(e.template), n.push(e));
89
+ }
90
+ Ke(e, s.source, n, r, i);
91
+ }
92
+ }
93
+ function qe(e) {
94
+ let t = e.data ?? {}, n = [], r = (t, r, i, a, o) => {
95
+ n.push({
96
+ template: t,
97
+ valueType: r,
98
+ labelKey: i,
99
+ sourceNodeId: e.id,
100
+ sourceType: e.type ?? "",
101
+ ...a && a.length > 0 ? { values: a } : {},
102
+ ...o ? { label: o } : {}
103
+ });
104
+ };
105
+ switch (e.type) {
106
+ case "trigger-detection": {
107
+ let e = (t.detectionLabels ?? []).map((e) => ({ value: e }));
108
+ r("{{event.type}}", "enum", "variable_event_type", e), r("{{event.types}}", "string", "variable_event_types"), r("{{event.label}}", "string", "variable_event_label", e), r("{{event.confidence}}", "number", "variable_event_confidence"), r("{{event.state}}", "enum", "variable_event_state", [{
109
+ value: "active",
110
+ labelKey: "variable_value_active"
111
+ }, {
112
+ value: "ended",
113
+ labelKey: "variable_value_ended"
114
+ }]), r("{{event.cameraId}}", "string", "variable_event_camera"), r("{{event.faces}}", "string", "variable_event_faces", (t.faceFilter ?? []).map((e) => ({ value: e }))), r("{{event.plates}}", "string", "variable_event_plates", (t.licensePlateFilter ?? []).map((e) => ({ value: e }))), r("{{event.id}}", "string", "variable_event_id");
115
+ break;
116
+ }
117
+ case "trigger-sensor": {
118
+ let i = String(t.sensorType ?? ""), a = (t.properties ?? []).length > 0 ? t.properties : L(i), o = a.map((e) => R(i, e)).filter((e) => !!e);
119
+ r("{{sensor.value}}", Je(o), "variable_sensor_value", Ye(i, o)), r("{{sensor.previousValue}}", Je(o), "variable_sensor_previous_value");
120
+ for (let t of a) {
121
+ let r = R(i, t);
122
+ for (let i of r?.keys ?? []) n.push({
123
+ template: `{{sensor.value.${i}}}`,
124
+ valueType: "number",
125
+ label: `${t}.${i}`,
126
+ sourceNodeId: e.id,
127
+ sourceType: e.type
128
+ });
129
+ }
130
+ r("{{sensor.property}}", "enum", "variable_sensor_property", a.map((e) => ({
131
+ value: e,
132
+ labelKey: `sensor_property_${e}`
133
+ }))), r("{{sensor.sensorType}}", "string", "variable_sensor_type"), r("{{sensor.sensorId}}", "string", "variable_sensor_id"), r("{{sensor.assignedCameraIds}}", "string", "variable_sensor_cameras");
134
+ break;
135
+ }
136
+ case "trigger-webhook":
137
+ r("{{webhook.body}}", "string", "variable_webhook_body"), r("{{webhook.data}}", "string", "variable_webhook_data"), r("{{webhook.method}}", "enum", "variable_webhook_method", [
138
+ "GET",
139
+ "POST",
140
+ "PUT",
141
+ "PATCH",
142
+ "DELETE"
143
+ ].map((e) => ({ value: e }))), r("{{webhook.headers}}", "object", "variable_webhook_headers");
144
+ break;
145
+ case "trigger-mqtt":
146
+ r("{{mqtt.topic}}", "string", "variable_mqtt_topic", typeof t.topic == "string" && t.topic ? [{ value: t.topic }] : void 0), r("{{mqtt.payload}}", "string", "variable_mqtt_payload");
147
+ break;
148
+ case "trigger-geofence": {
149
+ let e = t.event ?? "both";
150
+ r("{{geo.event}}", "enum", "variable_geo_event", (e === "both" ? ["enter", "leave"] : [e]).map((e) => ({
151
+ value: e,
152
+ labelKey: `variable_value_${e}`
153
+ }))), r("{{geo.user}}", "enum", "variable_geo_user", (t.users ?? []).map((e) => ({ value: e }))), r("{{geo.zone}}", "string", "variable_geo_zone", typeof t.zoneName == "string" && t.zoneName ? [{ value: t.zoneName }] : void 0), r("{{geo.lat}}", "number", "variable_geo_lat"), r("{{geo.lon}}", "number", "variable_geo_lon"), r("{{geo.distance}}", "number", "variable_geo_distance");
154
+ break;
155
+ }
156
+ case "trigger-system":
157
+ r("{{system.eventType}}", "enum", "variable_system_event_type", typeof t.eventType == "string" && t.eventType ? [{ value: t.eventType }] : void 0), r("{{system.cameraId}}", "string", "variable_system_camera_id"), r("{{system.cameraName}}", "string", "variable_system_camera_name"), r("{{system.pluginName}}", "string", "variable_system_plugin_name"), r("{{system.pluginId}}", "string", "variable_system_plugin_id"), r("{{system.status}}", "string", "variable_system_status"), r("{{system.property}}", "string", "variable_system_property"), r("{{system.sensorId}}", "string", "variable_system_sensor_id"), r("{{system.sensorType}}", "string", "variable_system_sensor_type"), r("{{system.sensorName}}", "string", "variable_system_sensor_name");
158
+ break;
159
+ case "action-snapshot":
160
+ r("{{snapshot}}", "string", "variable_snapshot"), r("{{snapshot.base64}}", "string", "variable_snapshot_data_uri");
161
+ break;
162
+ case "action-http":
163
+ r("{{http.status}}", "number", "variable_http_status"), r("{{http.body}}", "string", "variable_http_body"), r("{{http.base64}}", "string", "variable_http_base64"), r("{{http.json}}", "object", "variable_http_json");
164
+ break;
165
+ case "action-plugin":
166
+ r("{{plugin.detected}}", "boolean", "variable_plugin_detected", [{ value: "true" }, { value: "false" }]), r("{{plugin.labels}}", "string", "variable_plugin_labels"), r("{{plugin.detections}}", "object", "variable_plugin_detections"), r("{{plugin.result}}", "object", "variable_plugin_result"), r("{{plugin.durationMs}}", "number", "variable_plugin_duration");
167
+ break;
168
+ case "action-camera-control":
169
+ r("{{camera.id}}", "string", "variable_camera_id"), r("{{camera.name}}", "string", "variable_camera_name");
170
+ break;
171
+ case "action-image-input": {
172
+ let r = typeof t.variableName == "string" && t.variableName ? t.variableName : "image";
173
+ n.push({
174
+ template: `{{${r}}}`,
175
+ valueType: "string",
176
+ label: r,
177
+ sourceNodeId: e.id,
178
+ sourceType: e.type
179
+ }), n.push({
180
+ template: `{{${r}.width}}`,
181
+ valueType: "number",
182
+ label: `${r}.width`,
183
+ sourceNodeId: e.id,
184
+ sourceType: e.type
185
+ }), n.push({
186
+ template: `{{${r}.height}}`,
187
+ valueType: "number",
188
+ label: `${r}.height`,
189
+ sourceNodeId: e.id,
190
+ sourceType: e.type
191
+ });
192
+ break;
193
+ }
194
+ case "action-variable": typeof t.variableName == "string" && t.variableName && n.push({
195
+ template: `{{${t.variableName}}}`,
196
+ valueType: "string",
197
+ label: t.variableName,
198
+ sourceNodeId: e.id,
199
+ sourceType: e.type
200
+ });
201
+ }
202
+ return typeof t.repeat == "number" && t.repeat > 1 && (typeof t.repeatConcurrency == "number" && t.repeatConcurrency > 1 || (r("{{repeat.index}}", "number", "variable_repeat_index"), r("{{repeat.iteration}}", "number", "variable_repeat_iteration")), r("{{repeat.total}}", "number", "variable_repeat_total"), r("{{repeat.totalCalls}}", "number", "variable_repeat_total_calls"), r("{{repeat.elapsedMs}}", "number", "variable_repeat_elapsed_ms"), r("{{repeat.elapsedSec}}", "number", "variable_repeat_elapsed_sec")), (e.type ?? "").startsWith("action-") && (r("{{previous.success}}", "boolean", "variable_previous_success", [{ value: "true" }, { value: "false" }]), r("{{previous.result}}", "string", "variable_previous_result")), n;
203
+ }
204
+ function Je(e) {
205
+ let t = new Set(e.map((e) => e.type));
206
+ return t.size === 1 ? [...t][0] : "string";
207
+ }
208
+ function Ye(e, t) {
209
+ let n = [], r = /* @__PURE__ */ new Set(), i = (e, t) => {
210
+ r.has(e) || (r.add(e), n.push({
211
+ value: e,
212
+ ...t ? { labelKey: t } : {}
213
+ }));
214
+ };
215
+ for (let n of t) if (n.type === "boolean") i("true"), i("false");
216
+ else if (n.type === "enum" && n.values) for (let [t, r] of Object.entries(n.values)) i(String(r), `${e}_state_${t}`);
217
+ return n;
218
+ }
219
+ //#endregion
220
+ //#region ~icons/carbon/share
221
+ var Xe = {
222
+ viewBox: "0 0 32 32",
223
+ width: "1.2em",
224
+ height: "1.2em"
225
+ };
226
+ function Ze(e, t) {
227
+ return o(), S("svg", Xe, [...t[0] ||= [E("path", {
228
+ fill: "currentColor",
229
+ d: "M23 20a5 5 0 0 0-3.89 1.89l-7.31-4.57a4.46 4.46 0 0 0 0-2.64l7.31-4.57A5 5 0 1 0 18 7a4.8 4.8 0 0 0 .2 1.32l-7.31 4.57a5 5 0 1 0 0 6.22l7.31 4.57A4.8 4.8 0 0 0 18 25a5 5 0 1 0 5-5m0-16a3 3 0 1 1-3 3a3 3 0 0 1 3-3M7 19a3 3 0 1 1 3-3a3 3 0 0 1-3 3m16 9a3 3 0 1 1 3-3a3 3 0 0 1-3 3"
230
+ }, null, -1)]]);
231
+ }
232
+ var Qe = p({
233
+ name: "carbon-share",
234
+ render: Ze
235
+ }), $e = {
236
+ viewBox: "0 0 32 32",
237
+ width: "1.2em",
238
+ height: "1.2em"
239
+ };
240
+ function et(e, t) {
241
+ return o(), S("svg", $e, [...t[0] ||= [E("path", {
242
+ fill: "currentColor",
243
+ d: "M12 12h2v12h-2zm6 0h2v12h-2z"
244
+ }, null, -1), E("path", {
245
+ fill: "currentColor",
246
+ d: "M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6Zm4 22V8h16v20Zm4-26h8v2h-8z"
247
+ }, null, -1)]]);
248
+ }
249
+ var tt = p({
250
+ name: "carbon-trash-can",
251
+ render: et
252
+ }), nt = {
253
+ name: "ControlButton",
254
+ compatConfig: { MODE: 3 }
255
+ }, rt = (e, t) => {
256
+ let n = e.__vccOpts || e;
257
+ for (let [e, r] of t) n[e] = r;
258
+ return n;
259
+ }, it = {
260
+ type: "button",
261
+ class: "vue-flow__controls-button"
262
+ };
263
+ function at(e, t, n, r, i, a) {
264
+ return o(), S("button", it, [c(e.$slots, "default")]);
265
+ }
266
+ var ot = /* @__PURE__ */ rt(nt, [["render", at]]), st = {
267
+ xmlns: "http://www.w3.org/2000/svg",
268
+ viewBox: "0 0 32 32"
269
+ }, ct = [/* @__PURE__ */ E("path", { d: "M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z" }, null, -1)];
270
+ function lt(e, t) {
271
+ return o(), S("svg", st, ct);
272
+ }
273
+ var ut = { render: lt }, dt = {
274
+ xmlns: "http://www.w3.org/2000/svg",
275
+ viewBox: "0 0 32 5"
276
+ }, ft = [/* @__PURE__ */ E("path", { d: "M0 0h32v4.2H0z" }, null, -1)];
277
+ function pt(e, t) {
278
+ return o(), S("svg", dt, ft);
279
+ }
280
+ var mt = { render: pt }, ht = {
281
+ xmlns: "http://www.w3.org/2000/svg",
282
+ viewBox: "0 0 32 30"
283
+ }, gt = [/* @__PURE__ */ E("path", { d: "M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z" }, null, -1)];
284
+ function _t(e, t) {
285
+ return o(), S("svg", ht, gt);
286
+ }
287
+ var vt = { render: _t }, yt = {
288
+ xmlns: "http://www.w3.org/2000/svg",
289
+ viewBox: "0 0 25 32"
290
+ }, bt = [/* @__PURE__ */ E("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z" }, null, -1)];
291
+ function xt(e, t) {
292
+ return o(), S("svg", yt, bt);
293
+ }
294
+ var St = { render: xt }, Ct = {
295
+ xmlns: "http://www.w3.org/2000/svg",
296
+ viewBox: "0 0 25 32"
297
+ }, wt = [/* @__PURE__ */ E("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z" }, null, -1)];
298
+ function Tt(e, t) {
299
+ return o(), S("svg", Ct, wt);
300
+ }
301
+ var Et = { render: Tt }, Dt = /* @__PURE__ */ A({
302
+ name: "Controls",
303
+ compatConfig: { MODE: 3 },
304
+ props: {
305
+ showZoom: {
306
+ type: Boolean,
307
+ default: !0
308
+ },
309
+ showFitView: {
310
+ type: Boolean,
311
+ default: !0
312
+ },
313
+ showInteractive: {
314
+ type: Boolean,
315
+ default: !0
316
+ },
317
+ fitViewParams: {},
318
+ position: { default: () => Ie.BottomLeft }
319
+ },
320
+ emits: [
321
+ "zoomIn",
322
+ "zoomOut",
323
+ "fitView",
324
+ "interactionChange"
325
+ ],
326
+ setup(e, { emit: t }) {
327
+ let { nodesDraggable: n, nodesConnectable: r, elementsSelectable: a, setInteractive: s, zoomIn: l, zoomOut: u, fitView: d, viewport: p, minZoom: g, maxZoom: _ } = Fe(), y = i(() => n.value || r.value || a.value), x = i(() => p.value.zoom <= g.value), C = i(() => p.value.zoom >= _.value);
328
+ function T() {
329
+ l(), t("zoomIn");
330
+ }
331
+ function E() {
332
+ u(), t("zoomOut");
333
+ }
334
+ function D() {
335
+ d(e.fitViewParams), t("fitView");
336
+ }
337
+ function O() {
338
+ s(!y.value), t("interactionChange", !y.value);
339
+ }
340
+ return (e, t) => (o(), m(v(Pe), {
341
+ class: "vue-flow__controls",
342
+ position: e.position
343
+ }, {
344
+ default: b(() => [
345
+ c(e.$slots, "top"),
346
+ e.showZoom ? (o(), S(w, { key: 0 }, [c(e.$slots, "control-zoom-in", {}, () => [M(ot, {
347
+ class: "vue-flow__controls-zoomin",
348
+ disabled: C.value,
349
+ onClick: T
350
+ }, {
351
+ default: b(() => [c(e.$slots, "icon-zoom-in", {}, () => [(o(), m(f(v(ut))))])]),
352
+ _: 3
353
+ }, 8, ["disabled"])]), c(e.$slots, "control-zoom-out", {}, () => [M(ot, {
354
+ class: "vue-flow__controls-zoomout",
355
+ disabled: x.value,
356
+ onClick: E
357
+ }, {
358
+ default: b(() => [c(e.$slots, "icon-zoom-out", {}, () => [(o(), m(f(v(mt))))])]),
359
+ _: 3
360
+ }, 8, ["disabled"])])], 64)) : h("", !0),
361
+ e.showFitView ? c(e.$slots, "control-fit-view", { key: 1 }, () => [M(ot, {
362
+ class: "vue-flow__controls-fitview",
363
+ onClick: D
364
+ }, {
365
+ default: b(() => [c(e.$slots, "icon-fit-view", {}, () => [(o(), m(f(v(vt))))])]),
366
+ _: 3
367
+ })]) : h("", !0),
368
+ e.showInteractive ? c(e.$slots, "control-interactive", { key: 2 }, () => [e.showInteractive ? (o(), m(ot, {
369
+ key: 0,
370
+ class: "vue-flow__controls-interactive",
371
+ onClick: O
372
+ }, {
373
+ default: b(() => [y.value ? c(e.$slots, "icon-unlock", { key: 0 }, () => [(o(), m(f(v(Et))))]) : h("", !0), y.value ? h("", !0) : c(e.$slots, "icon-lock", { key: 1 }, () => [(o(), m(f(v(St))))])]),
374
+ _: 3
375
+ })) : h("", !0)]) : h("", !0),
376
+ c(e.$slots, "default")
377
+ ]),
378
+ _: 3
379
+ }, 8, ["position"]));
380
+ }
381
+ });
382
+ //#endregion
383
+ //#region src/components/CuiAutomation/caseHandle.ts
384
+ function Ot(e) {
385
+ return `case-${encodeURIComponent(e)}`;
386
+ }
387
+ //#endregion
388
+ //#region src/components/CuiAutomation/edges/DeletableEdge.vue?vue&type=script&setup=true&lang.ts
389
+ var kt = ["id", "d"], At = 24, jt = /* @__PURE__ */ A({
390
+ __name: "DeletableEdge",
391
+ props: {
392
+ id: {},
393
+ sourceNode: {},
394
+ targetNode: {},
395
+ source: {},
396
+ target: {},
397
+ type: {},
398
+ label: { type: [
399
+ String,
400
+ Object,
401
+ Function
402
+ ] },
403
+ style: {},
404
+ selected: { type: Boolean },
405
+ sourcePosition: {},
406
+ targetPosition: {},
407
+ sourceHandleId: {},
408
+ targetHandleId: {},
409
+ animated: { type: Boolean },
410
+ updatable: { type: Boolean },
411
+ markerStart: {},
412
+ markerEnd: {},
413
+ curvature: {},
414
+ interactionWidth: {},
415
+ data: {},
416
+ events: {},
417
+ labelStyle: {},
418
+ labelShowBg: { type: Boolean },
419
+ labelBgStyle: {},
420
+ labelBgPadding: {},
421
+ labelBgBorderRadius: {},
422
+ sourceX: {},
423
+ sourceY: {},
424
+ targetX: {},
425
+ targetY: {}
426
+ },
427
+ setup(e) {
428
+ let n = e, { removeEdges: r } = Fe(), i = y(() => je({
429
+ sourceX: n.sourceX,
430
+ sourceY: n.sourceY,
431
+ sourcePosition: n.sourcePosition,
432
+ targetX: n.targetX,
433
+ targetY: n.targetY,
434
+ targetPosition: n.targetPosition
435
+ })), a = y(() => i.value[0]), s = y(() => i.value[1]), c = y(() => i.value[2]), l = y(() => {
436
+ let e = document.createElementNS("http://www.w3.org/2000/svg", "path");
437
+ return e.setAttribute("d", a.value), e.getTotalLength();
438
+ }), u = y(() => {
439
+ let e = l.value;
440
+ if (e <= 0) return {
441
+ stroke: "var(--text-muted-color)",
442
+ strokeWidth: 2,
443
+ fill: "none"
444
+ };
445
+ let t = e / 2, n = At / 2;
446
+ return {
447
+ stroke: "var(--text-muted-color)",
448
+ strokeWidth: 2,
449
+ fill: "none",
450
+ strokeDasharray: `${Math.max(0, t - n)} ${At} ${Math.max(0, e - t - n)}`
451
+ };
452
+ });
453
+ function d() {
454
+ r([n.id]);
455
+ }
456
+ return (n, r) => {
457
+ let i = H;
458
+ return o(), S(w, null, [E("path", {
459
+ id: e.id,
460
+ d: v(a),
461
+ style: C(v(u)),
462
+ class: "vue-flow__edge-path"
463
+ }, null, 12, kt), M(v(J), null, {
464
+ default: b(() => [E("div", {
465
+ class: "automation-edge-button nodrag nopan",
466
+ style: C({
467
+ pointerEvents: "all",
468
+ position: "absolute",
469
+ transform: `translate(-50%, -50%) translate(${v(s)}px, ${v(c)}px)`
470
+ })
471
+ }, [E("button", {
472
+ class: "automation-edge-delete",
473
+ onClick: t(d, ["stop"])
474
+ }, [M(i, { class: "w-3 h-3" })])], 4)]),
475
+ _: 1
476
+ })], 64);
477
+ };
478
+ }
479
+ }), Mt = {
480
+ "trigger-detection": ["cameraId"],
481
+ "trigger-sensor": ["sensorId"],
482
+ "trigger-schedule": ["cron"],
483
+ "trigger-mqtt": ["topic"],
484
+ "trigger-system": ["eventType"],
485
+ "condition-switch": ["variable"],
486
+ "condition-ifelse": ["leftOperand", "operator"],
487
+ "condition-sensorstate": ["sensorId"],
488
+ "condition-time": ["startTime", "endTime"],
489
+ "action-snapshot": ["cameraId"],
490
+ "action-sensor": ["sensorId"],
491
+ "action-notification": ["title"],
492
+ "action-http": ["url"],
493
+ "action-mqtt": ["topic"],
494
+ "action-variable": ["variableName"],
495
+ "action-plugin": ["pluginName", "method"],
496
+ "action-camera-control": ["cameraId"],
497
+ "action-image-input": ["source"]
498
+ }, Nt = /* @__PURE__ */ new Set([
499
+ "http",
500
+ "mqtt",
501
+ "webhook",
502
+ "sensor",
503
+ "system",
504
+ "repeat",
505
+ "previous",
506
+ "plugin",
507
+ "camera",
508
+ "geo",
509
+ "event"
510
+ ]), Pt = /* @__PURE__ */ new Set([
511
+ "time.now",
512
+ "flow.startMs",
513
+ "snapshot",
514
+ "snapshot.base64",
515
+ "output"
516
+ ]);
517
+ function Ft(e) {
518
+ if (!e) return [];
519
+ let t = [], n = e.nodes, r = e.edges, i = n.filter((e) => e.type?.startsWith("trigger-"));
520
+ i.length === 0 && t.push({ messageKey: "validation_no_trigger" });
521
+ let a = new Set(i.map((e) => e.id)), o = !0;
522
+ for (; o;) {
523
+ o = !1;
524
+ for (let e of r) a.has(e.source) && !a.has(e.target) && (a.add(e.target), o = !0);
525
+ }
526
+ for (let r of n) {
527
+ if (!r.type) continue;
528
+ let n = r.data ?? {};
529
+ !r.type.startsWith("trigger-") && !a.has(r.id) && t.push({
530
+ nodeId: r.id,
531
+ messageKey: "validation_unreachable"
532
+ });
533
+ for (let e of Mt[r.type] ?? []) {
534
+ let i = n[e];
535
+ if (i == null || i === "") {
536
+ t.push({
537
+ nodeId: r.id,
538
+ messageKey: "validation_missing_fields"
539
+ });
540
+ break;
541
+ }
542
+ }
543
+ r.type === "condition-switch" && (!Array.isArray(n.cases) || n.cases.length === 0) && t.push({
544
+ nodeId: r.id,
545
+ messageKey: "validation_no_cases"
546
+ }), r.type === "trigger-schedule" && typeof n.cron == "string" && n.cron && n.cron.trim().split(/\s+/).length !== 5 && t.push({
547
+ nodeId: r.id,
548
+ messageKey: "validation_invalid_cron"
549
+ }), r.type === "action-variable" && typeof n.variableName == "string" && n.variableName && !/^\w+(?:\.\w+)*$/.test(n.variableName) && t.push({
550
+ nodeId: r.id,
551
+ messageKey: "validation_invalid_variable_name"
552
+ }), t.push(...It(e, r));
553
+ }
554
+ return t;
555
+ }
556
+ function It(e, t) {
557
+ let n = [], r = new Set(He(e, t.id).map((e) => e.template.slice(2, -2))), i = new Set([...r].map((e) => e.split(".")[0])), a = Lt(e), o = [];
558
+ Rt(t.data ?? {}, o);
559
+ let s = /* @__PURE__ */ new Set();
560
+ for (let e of o) for (let o of e.matchAll(/\{\{(\w+(?:\.\w+)*)\}\}/g)) {
561
+ let e = o[1];
562
+ if (r.has(e) || Pt.has(e) || a.has(e) || s.has(e)) continue;
563
+ let c = e.split(".")[0];
564
+ Nt.has(c) && i.has(c) || a.has(c) || (s.add(e), n.push({
565
+ nodeId: t.id,
566
+ messageKey: "validation_unknown_variable",
567
+ params: { name: e }
568
+ }));
569
+ }
570
+ return n;
571
+ }
572
+ function Lt(e) {
573
+ let t = /* @__PURE__ */ new Set();
574
+ for (let n of e.nodes) {
575
+ let e = n.data ?? {};
576
+ n.type === "action-variable" && typeof e.variableName == "string" && e.variableName && t.add(e.variableName), n.type === "action-image-input" && t.add(typeof e.variableName == "string" && e.variableName ? e.variableName : "image"), typeof e.alias == "string" && e.alias && t.add(e.alias);
577
+ }
578
+ return t;
579
+ }
580
+ function Rt(e, t) {
581
+ if (typeof e == "string") {
582
+ e.includes("{{") && t.push(e);
583
+ return;
584
+ }
585
+ if (Array.isArray(e)) {
586
+ for (let n of e) Rt(n, t);
587
+ return;
588
+ }
589
+ if (e && typeof e == "object") for (let n of Object.values(e)) Rt(n, t);
590
+ }
591
+ function zt(e) {
592
+ let t = Z(), { t: n } = z();
593
+ return y(() => {
594
+ let r = t.validationIssues.filter((t) => t.nodeId === u(e));
595
+ if (r.length !== 0) return r.map((e) => n(`components.automation_nodes.${e.messageKey}`, e.params ?? {})).join("\n");
596
+ });
597
+ }
598
+ //#endregion
599
+ //#region src/components/CuiAutomation/utils.ts
600
+ var Bt = [
601
+ "cameraId",
602
+ "sensorId",
603
+ "sensorType"
604
+ ];
605
+ function Vt(e, t) {
606
+ if (!e || !t) return null;
607
+ let n = {}, r = e, i = t;
608
+ for (let e of Bt) r[e] && e in i && !i[e] && (n[e] = r[e]);
609
+ return Object.keys(n).length > 0 ? n : null;
610
+ }
611
+ function Ht(e) {
612
+ return e.type === "trigger-webhook" && !e.webhookId ? {
613
+ ...e,
614
+ webhookId: he()
615
+ } : e.type === "trigger-geofence" && !e.geofenceId ? {
616
+ ...e,
617
+ geofenceId: he()
618
+ } : e;
619
+ }
620
+ function Ut(e, t, n) {
621
+ if (!e) return;
622
+ let r = (e) => e ? t?.(e) ?? e : void 0, i = (e, t) => e ? n?.(e) ?? t ?? e : void 0;
623
+ switch (e.type) {
624
+ case "trigger-detection": return r(e.cameraId);
625
+ case "trigger-sensor": return i(e.sensorId, e.sensorType);
626
+ case "trigger-schedule": return e.cron || void 0;
627
+ case "trigger-webhook": return e.webhookId ? `...${e.webhookId.slice(-8)}` : void 0;
628
+ case "trigger-system": return e.eventType ? `${e.category}: ${e.eventType.split(":").pop()}` : void 0;
629
+ case "trigger-manual": return;
630
+ case "trigger-geofence": return e.zoneName || void 0;
631
+ case "trigger-mqtt": return e.topic || void 0;
632
+ case "condition-ifelse": return e.leftOperand && e.operator ? `${e.leftOperand} ${e.operator} ${e.rightOperand}` : void 0;
633
+ case "condition-switch": return e.variable || void 0;
634
+ case "condition-sensorstate": return i(e.sensorId, e.sensorType);
635
+ case "condition-time": return e.startTime && e.endTime ? `${e.startTime} - ${e.endTime}` : void 0;
636
+ case "action-snapshot": return r(e.cameraId);
637
+ case "action-camera-control": return r(e.cameraId);
638
+ case "action-sensor": return i(e.sensorId, e.sensorType);
639
+ case "action-notification": return e.title || void 0;
640
+ case "action-notification-control": return `${e.mode} · ${e.scope}`;
641
+ case "action-http": return e.url ? `${e.method} ${e.url}` : void 0;
642
+ case "action-mqtt": return e.topic || void 0;
643
+ case "action-delay": return `${e.duration} ${e.unit}`;
644
+ case "action-variable": return e.variableName || void 0;
645
+ case "action-plugin": return [e.pluginName, e.method].filter(Boolean).join(": ") || void 0;
646
+ default: return;
647
+ }
648
+ }
649
+ //#endregion
650
+ //#region ~icons/mdi/exclamation-thick
651
+ var Wt = {
652
+ viewBox: "0 0 24 24",
653
+ width: "1.2em",
654
+ height: "1.2em"
655
+ };
656
+ function Gt(e, t) {
657
+ return o(), S("svg", Wt, [...t[0] ||= [E("path", {
658
+ fill: "currentColor",
659
+ d: "M10 3h4v11h-4zm0 18v-4h4v4z"
660
+ }, null, -1)]]);
661
+ }
662
+ var Kt = p({
663
+ name: "mdi-exclamation-thick",
664
+ render: Gt
665
+ }), qt = { maxInputs: Infinity }, Jt = {
666
+ key: 0,
667
+ class: "absolute -top-2 -right-2 z-10 flex items-center justify-center w-5 h-5 rounded-full bg-amber-500 text-white"
668
+ }, Yt = { class: "flex items-center gap-2 px-3 py-2.5" }, Xt = { class: "flex-1 min-w-0" }, Zt = { class: "text-xs font-semibold truncate text-color" }, Qt = {
669
+ key: 0,
670
+ class: "text-[10px] text-muted truncate mt-0.5"
671
+ }, $t = /*#__PURE__*/ ge(/* @__PURE__ */ A({
672
+ __name: "BaseNode",
673
+ props: /*@__PURE__*/ n({
674
+ icon: {},
675
+ label: {},
676
+ subtitle: {},
677
+ color: {},
678
+ selected: { type: Boolean },
679
+ showInput: { type: Boolean },
680
+ showOutput: { type: Boolean },
681
+ maxInputs: {},
682
+ warning: {}
683
+ }, qt),
684
+ setup(e) {
685
+ let t = {
686
+ backgroundColor: "var(--text-muted-color)",
687
+ borderColor: "var(--card-background)"
688
+ };
689
+ return (n, r) => {
690
+ let i = Kt, a = N;
691
+ return o(), S("div", {
692
+ class: d(["automation-node relative card-background rounded-lg border-2 shadow-lg min-w-[180px] max-w-[220px] select-none", { "ring-2 ring-primary": e.selected }]),
693
+ style: C({ borderColor: e.color })
694
+ }, [
695
+ e.warning ? D((o(), S("div", Jt, [M(i, { class: "w-3.5 h-3.5" })])), [[
696
+ a,
697
+ e.warning,
698
+ void 0,
699
+ { top: !0 }
700
+ ]]) : h("", !0),
701
+ E("div", Yt, [E("div", {
702
+ class: "flex items-center justify-center w-8 h-8 rounded-md shrink-0",
703
+ style: C({
704
+ backgroundColor: `${e.color}20`,
705
+ color: e.color
706
+ })
707
+ }, [(o(), m(f(e.icon), { class: "w-4.5 h-4.5" }))], 4), E("div", Xt, [E("div", Zt, s(e.label), 1), e.subtitle ? (o(), S("div", Qt, s(e.subtitle), 1)) : h("", !0)])]),
708
+ e.showInput ? (o(), m(v(X), {
709
+ key: 1,
710
+ type: "target",
711
+ position: v(Y).Top,
712
+ connectable: e.maxInputs,
713
+ class: "!w-5 !h-5 !border-2",
714
+ style: t
715
+ }, null, 8, ["position", "connectable"])) : h("", !0),
716
+ c(n.$slots, "handles", {}, () => [e.showOutput ? (o(), m(v(X), {
717
+ key: 0,
718
+ type: "source",
719
+ position: v(Y).Bottom,
720
+ class: "!w-5 !h-5 !border-2",
721
+ style: t
722
+ }, null, 8, ["position"])) : h("", !0)], !0)
723
+ ], 6);
724
+ };
725
+ }
726
+ }), [["__scopeId", "data-v-13cfb248"]]), en = { class: "text-muted font-medium truncate" }, tn = { class: "text-color font-semibold text-right" }, Q = /* @__PURE__ */ A({
727
+ __name: "ActionNode",
728
+ props: {
729
+ id: {},
730
+ type: {},
731
+ selected: { type: Boolean },
732
+ connectable: { type: [
733
+ Boolean,
734
+ Number,
735
+ String,
736
+ Function
737
+ ] },
738
+ position: {},
739
+ dimensions: {},
740
+ label: {},
741
+ isValidTargetPos: { type: Function },
742
+ isValidSourcePos: { type: Function },
743
+ parent: {},
744
+ parentNodeId: {},
745
+ dragging: { type: Boolean },
746
+ resizing: { type: Boolean },
747
+ zIndex: {},
748
+ targetPosition: {},
749
+ sourcePosition: {},
750
+ dragHandle: {},
751
+ data: {},
752
+ events: {}
753
+ },
754
+ setup(e) {
755
+ let t = e, { t: n } = z(), r = Z(), { lastOutput: i } = ye(r), c = zt(() => t.id), l = y(() => G(t.type)), u = y(() => l.value ? n(l.value.labelKey) : t.type), { cameraName: f } = q(), { sensors: p } = B(), g = y(() => {
756
+ let e = t.data, n = e.alias, r = Ut(t.data, f, x);
757
+ return e.type === "action-plugin" && e.repeat && e.repeat > 1 && (r = r ? `${r} (${e.repeat}x)` : `${e.repeat}x`), n && r ? `[${n}] ${r}` : n ? `[${n}]` : r;
758
+ }), _ = y(() => t.type !== "action-output" || !i.value ? [] : Object.entries(i.value));
759
+ function x(e) {
760
+ let t = p.value.find((t) => t.id === e);
761
+ return t ? t.displayName.value || t.name : void 0;
762
+ }
763
+ return (t, n) => {
764
+ let r = I;
765
+ return o(), S("div", null, [M($t, {
766
+ icon: v(l).icon,
767
+ label: v(u),
768
+ subtitle: v(g),
769
+ color: v(l)?.color ?? "#3b82f6",
770
+ selected: e.selected,
771
+ warning: v(c),
772
+ "show-input": !0,
773
+ "show-output": !0
774
+ }, null, 8, [
775
+ "icon",
776
+ "label",
777
+ "subtitle",
778
+ "color",
779
+ "selected",
780
+ "warning"
781
+ ]), e.type === "action-output" && v(_).length ? (o(), m(r, {
782
+ key: 0,
783
+ class: "cui-card mt-1",
784
+ pt: { body: { class: "p-0" } },
785
+ style: { "min-width": "180px" }
786
+ }, {
787
+ content: b(() => [(o(!0), S(w, null, a(v(_), (e, t) => (o(), S("div", {
788
+ key: t,
789
+ class: d(["flex justify-between gap-3 px-3 py-1.5 text-[11px]", { "border-t border-surface-100 dark:border-surface-800": t > 0 }])
790
+ }, [E("span", en, s(e[0]), 1), E("span", tn, s(e[1]), 1)], 2))), 128))]),
791
+ _: 1
792
+ })) : h("", !0)]);
793
+ };
794
+ }
795
+ }), nn = /* @__PURE__ */ A({
796
+ __name: "ConditionNode",
797
+ props: {
798
+ id: {},
799
+ type: {},
800
+ selected: { type: Boolean },
801
+ connectable: { type: [
802
+ Boolean,
803
+ Number,
804
+ String,
805
+ Function
806
+ ] },
807
+ position: {},
808
+ dimensions: {},
809
+ label: {},
810
+ isValidTargetPos: { type: Function },
811
+ isValidSourcePos: { type: Function },
812
+ parent: {},
813
+ parentNodeId: {},
814
+ dragging: { type: Boolean },
815
+ resizing: { type: Boolean },
816
+ zIndex: {},
817
+ targetPosition: {},
818
+ sourcePosition: {},
819
+ dragHandle: {},
820
+ data: {},
821
+ events: {}
822
+ },
823
+ setup(e) {
824
+ let t = e, { t: n } = z(), r = { borderColor: "var(--card-background)" }, i = zt(() => t.id), a = y(() => G(t.type)), s = y(() => a.value ? n(a.value.labelKey) : t.type), { cameraName: c } = q(), { sensors: l } = B(), u = y(() => Ut(t.data, c, d));
825
+ function d(e) {
826
+ let t = l.value.find((t) => t.id === e);
827
+ return t ? t.displayName.value || t.name : void 0;
828
+ }
829
+ return (t, n) => (o(), m($t, {
830
+ icon: v(a).icon,
831
+ label: v(s),
832
+ subtitle: v(u),
833
+ color: v(a)?.color ?? "#f59e0b",
834
+ selected: e.selected,
835
+ warning: v(i),
836
+ "show-input": !0,
837
+ "show-output": !1,
838
+ "max-inputs": 1
839
+ }, {
840
+ handles: b(() => [M(v(X), {
841
+ type: "source",
842
+ position: v(Y).Bottom,
843
+ id: "true",
844
+ class: "!w-5 !h-5 !border-2",
845
+ style: C({
846
+ ...r,
847
+ backgroundColor: "var(--text-success-color)",
848
+ left: "30%"
849
+ })
850
+ }, null, 8, ["position", "style"]), M(v(X), {
851
+ type: "source",
852
+ position: v(Y).Bottom,
853
+ id: "false",
854
+ class: "!w-5 !h-5 !border-2",
855
+ style: C({
856
+ ...r,
857
+ backgroundColor: "var(--text-danger-color)",
858
+ left: "70%"
859
+ })
860
+ }, null, 8, ["position", "style"])]),
861
+ _: 1
862
+ }, 8, [
863
+ "icon",
864
+ "label",
865
+ "subtitle",
866
+ "color",
867
+ "selected",
868
+ "warning"
869
+ ]));
870
+ }
871
+ }), rn = { class: "absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-muted whitespace-nowrap pointer-events-none" }, an = /* @__PURE__ */ A({
872
+ __name: "SwitchNode",
873
+ props: {
874
+ id: {},
875
+ type: {},
876
+ selected: { type: Boolean },
877
+ connectable: { type: [
878
+ Boolean,
879
+ Number,
880
+ String,
881
+ Function
882
+ ] },
883
+ position: {},
884
+ dimensions: {},
885
+ label: {},
886
+ isValidTargetPos: { type: Function },
887
+ isValidSourcePos: { type: Function },
888
+ parent: {},
889
+ parentNodeId: {},
890
+ dragging: { type: Boolean },
891
+ resizing: { type: Boolean },
892
+ zIndex: {},
893
+ targetPosition: {},
894
+ sourcePosition: {},
895
+ dragHandle: {},
896
+ data: {},
897
+ events: {}
898
+ },
899
+ setup(e) {
900
+ let t = e, { t: n } = z(), r = {
901
+ backgroundColor: "#f59e0b",
902
+ borderColor: "var(--card-background)"
903
+ }, i = zt(() => t.id), c = y(() => G(t.type)), l = y(() => c.value ? n(c.value.labelKey) : t.type), u = y(() => t.data.type === "condition-switch" && Array.isArray(t.data.cases) ? t.data.cases : []), d = y(() => t.data.type === "condition-switch" && t.data.variable ? t.data.variable : void 0);
904
+ return (t, n) => (o(), m($t, {
905
+ icon: v(c).icon,
906
+ label: v(l),
907
+ subtitle: v(d),
908
+ color: v(c)?.color ?? "#f59e0b",
909
+ selected: e.selected,
910
+ warning: v(i),
911
+ "show-input": !0,
912
+ "show-output": !1,
913
+ "max-inputs": 1
914
+ }, {
915
+ handles: b(() => [(o(!0), S(w, null, a(v(u), (e, t) => (o(), m(v(X), {
916
+ id: v(Ot)(e),
917
+ key: v(Ot)(e),
918
+ type: "source",
919
+ position: v(Y).Bottom,
920
+ class: "!w-5 !h-5 !border-2",
921
+ style: C({
922
+ ...r,
923
+ left: `${(t + 1) / (v(u).length + 1) * 100}%`
924
+ })
925
+ }, {
926
+ default: b(() => [E("div", rn, s(e), 1)]),
927
+ _: 2
928
+ }, 1032, [
929
+ "id",
930
+ "position",
931
+ "style"
932
+ ]))), 128))]),
933
+ _: 1
934
+ }, 8, [
935
+ "icon",
936
+ "label",
937
+ "subtitle",
938
+ "color",
939
+ "selected",
940
+ "warning"
941
+ ]));
942
+ }
943
+ }), $ = /* @__PURE__ */ A({
944
+ __name: "TriggerNode",
945
+ props: {
946
+ id: {},
947
+ type: {},
948
+ selected: { type: Boolean },
949
+ connectable: { type: [
950
+ Boolean,
951
+ Number,
952
+ String,
953
+ Function
954
+ ] },
955
+ position: {},
956
+ dimensions: {},
957
+ label: {},
958
+ isValidTargetPos: { type: Function },
959
+ isValidSourcePos: { type: Function },
960
+ parent: {},
961
+ parentNodeId: {},
962
+ dragging: { type: Boolean },
963
+ resizing: { type: Boolean },
964
+ zIndex: {},
965
+ targetPosition: {},
966
+ sourcePosition: {},
967
+ dragHandle: {},
968
+ data: {},
969
+ events: {}
970
+ },
971
+ setup(e) {
972
+ let t = e, { t: n } = z(), { cameraName: r } = q(), { sensors: i } = B(), a = zt(() => t.id), s = y(() => G(t.type)), c = y(() => s.value ? n(s.value.labelKey) : t.type), l = y(() => Ut(t.data, r, u));
973
+ function u(e) {
974
+ let t = i.value.find((t) => t.id === e);
975
+ return t ? t.displayName.value || t.name : void 0;
976
+ }
977
+ return (t, n) => (o(), m($t, {
978
+ icon: v(s).icon,
979
+ label: v(c),
980
+ subtitle: v(l),
981
+ color: v(s)?.color ?? "#22c55e",
982
+ selected: e.selected,
983
+ warning: v(a),
984
+ "show-input": !1,
985
+ "show-output": !0
986
+ }, null, 8, [
987
+ "icon",
988
+ "label",
989
+ "subtitle",
990
+ "color",
991
+ "selected",
992
+ "warning"
993
+ ]));
994
+ }
995
+ }), on = 50;
996
+ function sn() {
997
+ let e = k([]), t = k([]);
998
+ function n(e, t) {
999
+ return JSON.stringify({
1000
+ nodes: e,
1001
+ edges: t
1002
+ });
1003
+ }
1004
+ function r(e) {
1005
+ return JSON.parse(e);
1006
+ }
1007
+ function i(r, i) {
1008
+ let a = [...e.value, n(r, i)];
1009
+ a.length > on && a.shift(), e.value = a, t.value = [];
1010
+ }
1011
+ function a(i, a) {
1012
+ let o = [...e.value], s = o.pop();
1013
+ if (s) return e.value = o, t.value = [...t.value, n(i, a)], r(s);
1014
+ }
1015
+ function o(i, a) {
1016
+ let o = [...t.value], s = o.pop();
1017
+ if (s) return t.value = o, e.value = [...e.value, n(i, a)], r(s);
1018
+ }
1019
+ function s() {
1020
+ e.value = [], t.value = [];
1021
+ }
1022
+ return {
1023
+ push: i,
1024
+ undo: a,
1025
+ redo: o,
1026
+ clear: s,
1027
+ canUndo: y(() => e.value.length > 0),
1028
+ canRedo: y(() => t.value.length > 0)
1029
+ };
1030
+ }
1031
+ //#endregion
1032
+ //#region src/components/CuiAutomation/CuiAutomationCanvas.vue?vue&type=script&setup=true&lang.ts
1033
+ var cn = { class: "absolute inset-0 flex items-center justify-center pointer-events-none" }, ln = { class: "text-muted text-sm" }, un = /* @__PURE__ */ A({
1034
+ __name: "CuiAutomationCanvas",
1035
+ props: {
1036
+ flow: {},
1037
+ mobile: { type: Boolean }
1038
+ },
1039
+ emits: ["node-select", "change"],
1040
+ setup(e, { expose: n, emit: i }) {
1041
+ let a = e, c = i, { t: l } = z(), { smBreakpoint: u } = ie(), { screenToFlowCoordinate: f, getViewport: m, dimensions: h } = Fe(), y = sn(), C = {
1042
+ "trigger-detection": p($),
1043
+ "trigger-sensor": p($),
1044
+ "trigger-schedule": p($),
1045
+ "trigger-webhook": p($),
1046
+ "trigger-system": p($),
1047
+ "trigger-manual": p($),
1048
+ "trigger-geofence": p($),
1049
+ "trigger-mqtt": p($),
1050
+ "condition-ifelse": p(nn),
1051
+ "condition-switch": p(an),
1052
+ "condition-sensorstate": p(nn),
1053
+ "condition-time": p(nn),
1054
+ "action-snapshot": p(Q),
1055
+ "action-sensor": p(Q),
1056
+ "action-notification": p(Q),
1057
+ "action-notification-control": p(Q),
1058
+ "action-http": p(Q),
1059
+ "action-mqtt": p(Q),
1060
+ "action-delay": p(Q),
1061
+ "action-variable": p(Q),
1062
+ "action-plugin": p(Q),
1063
+ "action-camera-control": p(Q),
1064
+ "action-image-input": p(Q),
1065
+ "action-output": p(Q)
1066
+ }, w = { default: p(jt) }, T = j([...a.flow.nodes]), D = j([...a.flow.edges]);
1067
+ function O() {
1068
+ y.push(T.value, D.value);
1069
+ }
1070
+ function k() {
1071
+ let e = y.undo(T.value, D.value);
1072
+ e && (T.value = e.nodes, D.value = e.edges, c("node-select", null), c("change"));
1073
+ }
1074
+ function A() {
1075
+ let e = y.redo(T.value, D.value);
1076
+ e && (T.value = e.nodes, D.value = e.edges, c("node-select", null), c("change"));
1077
+ }
1078
+ function N(e) {
1079
+ c("node-select", e.node.id);
1080
+ }
1081
+ function te() {
1082
+ c("node-select", null);
1083
+ }
1084
+ function P(e) {
1085
+ let t = T.value.find((t) => t.id === e.source), n = T.value.find((t) => t.id === e.target);
1086
+ return !(!t || !n || e.source === e.target || n.type?.startsWith("trigger-"));
1087
+ }
1088
+ function ne(e) {
1089
+ if (!P(e)) return;
1090
+ O();
1091
+ let t = e.targetHandle ?? void 0, n = T.value.find((t) => t.id === e.target);
1092
+ if (n?.type?.startsWith("condition-")) {
1093
+ let n = D.value.find((n) => n.target === e.target && (n.targetHandle ?? void 0) === t);
1094
+ n && (D.value = D.value.filter((e) => e.id !== n.id));
1095
+ }
1096
+ let r = {
1097
+ id: `e-${e.source}-${e.sourceHandle ?? "out"}-${e.target}`,
1098
+ source: e.source,
1099
+ target: e.target,
1100
+ sourceHandle: e.sourceHandle ?? void 0,
1101
+ targetHandle: t
1102
+ };
1103
+ D.value.push(r);
1104
+ let i = Vt(T.value.find((t) => t.id === e.source)?.data, n?.data);
1105
+ i && n?.data && Object.assign(n.data, i), c("change");
1106
+ }
1107
+ function re(e) {
1108
+ e.some((e) => e.type === "remove") && (O(), c("node-select", null), c("change"));
1109
+ }
1110
+ function ae(e) {
1111
+ let t = e.dataTransfer?.getData("application/automationnode");
1112
+ if (!t) return;
1113
+ let n = G(t);
1114
+ if (!n) return;
1115
+ O();
1116
+ let r = f({
1117
+ x: e.clientX,
1118
+ y: e.clientY
1119
+ }), i = {
1120
+ id: de(12),
1121
+ type: t,
1122
+ position: r,
1123
+ data: Ht({ ...n.defaults })
1124
+ };
1125
+ T.value = [...T.value, i], c("change");
1126
+ }
1127
+ function oe(e) {
1128
+ let t = G(e);
1129
+ if (!t) return;
1130
+ O();
1131
+ let { x: n, y: r, zoom: i } = m(), { width: a, height: o } = h.value, s = (-n + a / 2) / i, l = (-r + o / 2) / i, u = () => (Math.random() - .5) * 80, d = {
1132
+ id: de(12),
1133
+ type: e,
1134
+ position: {
1135
+ x: s + u(),
1136
+ y: l + u()
1137
+ },
1138
+ data: Ht({ ...t.defaults })
1139
+ };
1140
+ return T.value = [...T.value, d], c("change"), d;
1141
+ }
1142
+ function se(e) {
1143
+ O(), T.value = T.value.filter((t) => t.id !== e), D.value = D.value.filter((t) => t.source !== e && t.target !== e), c("change");
1144
+ }
1145
+ function ce() {
1146
+ O(), T.value = [], D.value = [], c("change");
1147
+ }
1148
+ function le() {
1149
+ return [...T.value];
1150
+ }
1151
+ function F() {
1152
+ return [...D.value];
1153
+ }
1154
+ function ue(e, t) {
1155
+ let n = T.value.find((t) => t.id === e);
1156
+ if (n && (n.data = t, n.type === "condition-switch" && Array.isArray(t.cases))) {
1157
+ let n = new Set(t.cases.map(Ot));
1158
+ D.value = D.value.filter((t) => t.source !== e || !t.sourceHandle?.startsWith("case-") || n.has(t.sourceHandle));
1159
+ }
1160
+ }
1161
+ function fe(e) {
1162
+ let t = e.metaKey || e.ctrlKey;
1163
+ t && e.key === "z" && !e.shiftKey ? (e.preventDefault(), k()) : (t && e.key === "z" && e.shiftKey || t && e.key === "y") && (e.preventDefault(), A());
1164
+ }
1165
+ return x(() => a.flow._id, () => {
1166
+ T.value = [...a.flow.nodes], D.value = [...a.flow.edges], y.clear();
1167
+ }), ee(() => window.addEventListener("keydown", fe)), r(() => window.removeEventListener("keydown", fe)), n({
1168
+ removeNode: se,
1169
+ addNodeAtCenter: oe,
1170
+ clearAll: ce,
1171
+ getNodes: le,
1172
+ getEdges: F,
1173
+ updateNodeData: ue,
1174
+ undo: k,
1175
+ redo: A,
1176
+ canUndo: y.canUndo,
1177
+ canRedo: y.canRedo
1178
+ }), (n, r) => (o(), S("div", {
1179
+ ref: "canvasRef",
1180
+ class: d(["h-full w-full border-left-color border-bottom-color border-right-color rounded-b-xl overflow-hidden", { "rounded-none! border-0!": v(u) }]),
1181
+ onDrop: ae,
1182
+ onDragover: r[2] ||= t(() => {}, ["prevent"]),
1183
+ onDragenter: r[3] ||= t(() => {}, ["prevent"])
1184
+ }, [M(v(Ae), {
1185
+ nodes: v(T),
1186
+ "onUpdate:nodes": r[0] ||= (e) => _(T) ? T.value = e : null,
1187
+ edges: v(D),
1188
+ "onUpdate:edges": r[1] ||= (e) => _(D) ? D.value = e : null,
1189
+ "node-types": C,
1190
+ "edge-types": w,
1191
+ "default-viewport": {
1192
+ zoom: e.mobile ? .7 : .9,
1193
+ x: 0,
1194
+ y: 0
1195
+ },
1196
+ "snap-to-grid": !0,
1197
+ "snap-grid": [16, 16],
1198
+ "is-valid-connection": P,
1199
+ class: "automation-canvas",
1200
+ onNodeClick: N,
1201
+ onPaneClick: te,
1202
+ onConnect: ne,
1203
+ onNodesChange: re
1204
+ }, g({
1205
+ default: b(() => [M(v(Re), { gap: 16 }), M(v(Dt))]),
1206
+ _: 2
1207
+ }, [v(T).length ? void 0 : {
1208
+ name: "default",
1209
+ fn: b(() => [E("div", cn, [E("span", ln, s(e.mobile ? v(l)("views.automation.no_nodes_mobile") : v(l)("views.automation.no_nodes")), 1)])]),
1210
+ key: "0"
1211
+ }]), 1032, [
1212
+ "nodes",
1213
+ "edges",
1214
+ "default-viewport"
1215
+ ])], 34));
1216
+ }
1217
+ }), dn = {
1218
+ "trigger-detection": F(() => import("./ConfigTriggerDetection--BcjPuyh.js")),
1219
+ "trigger-sensor": F(() => import("./ConfigTriggerSensor-beixHfSD.js")),
1220
+ "trigger-schedule": F(() => import("./ConfigTriggerSchedule-Vv5iNKL3.js")),
1221
+ "trigger-webhook": F(() => import("./ConfigTriggerWebhook-D9cuCU_p.js")),
1222
+ "trigger-mqtt": F(() => import("./ConfigTriggerMqtt-B6C9injX.js")),
1223
+ "trigger-system": F(() => import("./ConfigTriggerSystem-BHDpn485.js")),
1224
+ "trigger-manual": F(() => import("./ConfigTriggerManual-ConxhgNx.js")),
1225
+ "trigger-geofence": F(() => import("./ConfigTriggerGeofence-BZi5a2Yv.js")),
1226
+ "action-snapshot": F(() => import("./ConfigActionSnapshot-CWyhx6rk.js")),
1227
+ "action-sensor": F(() => import("./ConfigActionSensor-CC39Rpxi.js")),
1228
+ "action-notification": F(() => import("./ConfigActionNotification-DUMY_3IT.js")),
1229
+ "action-notification-control": F(() => import("./ConfigActionNotificationControl-B9Z2i5WR.js")),
1230
+ "action-http": F(() => import("./ConfigActionHttp-LfbxbfgG.js")),
1231
+ "action-mqtt": F(() => import("./ConfigActionMqtt-KmCGcNZb.js")),
1232
+ "action-delay": F(() => import("./ConfigActionDelay-BHug57u7.js")),
1233
+ "action-variable": F(() => import("./ConfigActionVariable-BNRLCthd.js")),
1234
+ "action-plugin": F(() => import("./ConfigActionPlugin-y5PuPwdk.js")),
1235
+ "action-image-input": F(() => import("./ConfigActionImageInput-Ce2GJzCm.js")),
1236
+ "action-output": F(() => import("./ConfigActionOutput-CX-ZQjcs.js")),
1237
+ "action-camera-control": F(() => import("./ConfigActionCameraControl-Czkfw_NO.js")),
1238
+ "condition-ifelse": F(() => import("./ConfigConditionIfElse-BayS5_Dr.js")),
1239
+ "condition-switch": F(() => import("./ConfigConditionSwitch-BBesQgWi.js")),
1240
+ "condition-sensorstate": F(() => import("./ConfigConditionSensorState-DLXNqL-R.js")),
1241
+ "condition-time": F(() => import("./ConfigConditionTime-aD8mk2aa.js"))
1242
+ }, fn = { class: "h-full overflow-y-auto flex flex-col" }, pn = { class: "flex items-center gap-2 px-4 py-3 border-bottom-color" }, mn = { class: "flex-1 min-w-0" }, hn = { class: "text-sm font-semibold truncate text-color" }, gn = { class: "text-xs text-muted" }, _n = { class: "flex-1 overflow-y-auto" }, vn = { class: "text-color font-normal text-sm" }, yn = { class: "flex flex-col field-gap" }, bn = { class: "text-color font-normal text-sm" }, xn = { class: "text-color font-normal text-sm" }, Sn = { class: "flex flex-col gap-3" }, Cn = { class: "flex flex-col field-gap" }, wn = { class: "cui-label" }, Tn = {
1243
+ key: 0,
1244
+ class: "flex flex-col field-gap"
1245
+ }, En = { class: "cui-label" }, Dn = {
1246
+ key: 1,
1247
+ class: "flex flex-col field-gap"
1248
+ }, On = { class: "cui-label" }, kn = { class: "p-4 border-top-color" }, An = /* @__PURE__ */ A({
1249
+ __name: "CuiAutomationNodeConfig",
1250
+ props: { node: {} },
1251
+ emits: [
1252
+ "close",
1253
+ "update:data",
1254
+ "delete"
1255
+ ],
1256
+ setup(e, { emit: t }) {
1257
+ let n = e, r = t, { t: i } = z(), a = y(() => n.node.type ? G(n.node.type) : void 0), c = y(() => n.node.type?.startsWith("action-")), l = y(() => {
1258
+ if (n.node.type) return dn[n.node.type];
1259
+ }), u = y(() => {
1260
+ let e = ["config"];
1261
+ return c.value && n.node.data.alias && e.push("alias"), a.value?.supportsRepeat && n.node.data.repeat > 1 && e.push("repeat"), e;
1262
+ });
1263
+ function d(e) {
1264
+ r("update:data", e);
1265
+ }
1266
+ return (t, n) => {
1267
+ let r = H, p = be, g = Se, _ = V, y = te, x = U, w = xe, T = we, D = Ce;
1268
+ return o(), S("div", fn, [
1269
+ E("div", pn, [
1270
+ E("div", {
1271
+ class: "flex items-center justify-center w-8 h-8 rounded-md shrink-0",
1272
+ style: C({
1273
+ backgroundColor: `${v(a)?.color}20`,
1274
+ color: v(a)?.color
1275
+ })
1276
+ }, [(o(), m(f(v(a)?.icon), { class: "w-4 h-4" }))], 4),
1277
+ E("div", mn, [E("div", hn, s(v(a) ? v(i)(v(a).labelKey) : e.node.type), 1), E("div", gn, s(v(i)("views.automation.node_config")), 1)]),
1278
+ M(p, {
1279
+ severity: "secondary",
1280
+ text: "",
1281
+ rounded: "",
1282
+ class: "shrink-0 cui-icon-sm",
1283
+ onClick: n[0] ||= (e) => t.$emit("close")
1284
+ }, {
1285
+ icon: b(() => [M(r, {
1286
+ width: "100%",
1287
+ height: "100%"
1288
+ })]),
1289
+ _: 1
1290
+ })
1291
+ ]),
1292
+ E("div", _n, [M(D, {
1293
+ multiple: "",
1294
+ value: v(u),
1295
+ class: "w-[300px]"
1296
+ }, {
1297
+ default: b(() => [
1298
+ v(c) ? (o(), m(w, {
1299
+ key: 0,
1300
+ value: "alias"
1301
+ }, {
1302
+ default: b(() => [M(g, { class: "px-4 rounded-none!" }, {
1303
+ default: b(() => [E("span", vn, s(v(i)("components.automation_nodes.alias")), 1)]),
1304
+ _: 1
1305
+ }), M(x, { pt: { content: { class: "px-4 w-[300px]" } } }, {
1306
+ default: b(() => [E("div", yn, [M(_, {
1307
+ "model-value": e.node.data.alias ?? "",
1308
+ placeholder: v(i)("components.automation_nodes.alias_placeholder"),
1309
+ "onUpdate:modelValue": n[1] ||= (e) => d({ alias: e || void 0 })
1310
+ }, null, 8, ["model-value", "placeholder"]), M(y, {
1311
+ severity: "secondary",
1312
+ variant: "simple",
1313
+ size: "small",
1314
+ class: "cui-input-hint"
1315
+ }, {
1316
+ default: b(() => [O(s(v(i)("components.automation_nodes.alias_hint")), 1)]),
1317
+ _: 1
1318
+ })])]),
1319
+ _: 1
1320
+ })]),
1321
+ _: 1
1322
+ })) : h("", !0),
1323
+ v(l) ? (o(), m(w, {
1324
+ key: 1,
1325
+ value: "config"
1326
+ }, {
1327
+ default: b(() => [M(g, { class: "px-4 rounded-none!" }, {
1328
+ default: b(() => [E("span", bn, s(v(i)("views.automation.node_config")), 1)]),
1329
+ _: 1
1330
+ }), M(x, { pt: { content: { class: "px-4 w-[300px]" } } }, {
1331
+ default: b(() => [E("div", null, [(o(), m(f(v(l)), {
1332
+ data: e.node.data,
1333
+ "node-id": e.node.id,
1334
+ "onUpdate:data": d
1335
+ }, null, 40, ["data", "node-id"]))])]),
1336
+ _: 1
1337
+ })]),
1338
+ _: 1
1339
+ })) : h("", !0),
1340
+ v(a)?.supportsRepeat ? (o(), m(w, {
1341
+ key: 2,
1342
+ value: "repeat"
1343
+ }, {
1344
+ default: b(() => [M(g, { class: "px-4 rounded-none!" }, {
1345
+ default: b(() => [E("span", xn, s(v(i)("components.automation_nodes.repeat")), 1)]),
1346
+ _: 1
1347
+ }), M(x, { pt: { content: { class: "px-4 w-[300px]" } } }, {
1348
+ default: b(() => [E("div", Sn, [
1349
+ E("div", Cn, [E("label", wn, s(v(i)("components.automation_nodes.repeat_count")), 1), M(T, {
1350
+ "model-value": e.node.data.repeat ?? 1,
1351
+ min: 1,
1352
+ max: 1e5,
1353
+ class: "w-full",
1354
+ "onUpdate:modelValue": n[2] ||= (e) => d({ repeat: e })
1355
+ }, null, 8, ["model-value"])]),
1356
+ e.node.data.repeat > 1 ? (o(), S("div", Tn, [
1357
+ E("label", En, s(v(i)("components.automation_nodes.repeat_concurrency")), 1),
1358
+ M(T, {
1359
+ "model-value": e.node.data.repeatConcurrency ?? 1,
1360
+ min: 1,
1361
+ max: 64,
1362
+ class: "w-full",
1363
+ "onUpdate:modelValue": n[3] ||= (e) => d({ repeatConcurrency: e })
1364
+ }, null, 8, ["model-value"]),
1365
+ M(y, {
1366
+ severity: "secondary",
1367
+ variant: "simple",
1368
+ size: "small",
1369
+ class: "cui-input-hint"
1370
+ }, {
1371
+ default: b(() => [O(s(v(i)("components.automation_nodes.repeat_concurrency_hint")), 1)]),
1372
+ _: 1
1373
+ })
1374
+ ])) : h("", !0),
1375
+ e.node.data.repeat > 1 ? (o(), S("div", Dn, [E("label", On, s(v(i)("components.automation_nodes.repeat_delay")), 1), M(T, {
1376
+ "model-value": e.node.data.repeatDelayMs ?? 0,
1377
+ min: 0,
1378
+ max: 6e4,
1379
+ suffix: " ms",
1380
+ class: "w-full",
1381
+ "onUpdate:modelValue": n[4] ||= (e) => d({ repeatDelayMs: e })
1382
+ }, null, 8, ["model-value"])])) : h("", !0)
1383
+ ])]),
1384
+ _: 1
1385
+ })]),
1386
+ _: 1
1387
+ })) : h("", !0)
1388
+ ]),
1389
+ _: 1
1390
+ }, 8, ["value"])]),
1391
+ E("div", kn, [M(p, {
1392
+ severity: "danger",
1393
+ fluid: "",
1394
+ class: "w-full cui-button-medium",
1395
+ label: v(i)("views.automation.delete_node"),
1396
+ onClick: n[5] ||= (e) => t.$emit("delete")
1397
+ }, null, 8, ["label"])])
1398
+ ]);
1399
+ };
1400
+ }
1401
+ }), jn = {
1402
+ key: 0,
1403
+ class: "text-xs font-semibold text-muted uppercase tracking-wider mb-3"
1404
+ }, Mn = { class: "text-xs font-medium text-muted mb-2" }, Nn = { class: "flex flex-col gap-1.5" }, Pn = [
1405
+ "draggable",
1406
+ "onDragstart",
1407
+ "onClick"
1408
+ ], Fn = { class: "flex items-center gap-2.5 flex-1 min-w-0 px-3 py-2.5" }, In = { class: "flex-1 min-w-0" }, Ln = { class: "text-[13px] font-medium truncate text-color block leading-tight" }, Rn = {
1409
+ key: 0,
1410
+ class: "text-[11px] text-muted block truncate mt-0.5 leading-tight"
1411
+ }, zn = /*#__PURE__*/ ge(/* @__PURE__ */ A({
1412
+ __name: "CuiAutomationNodePalette",
1413
+ props: /*@__PURE__*/ n({ mode: {} }, K),
1414
+ emits: ["node-click"],
1415
+ setup(e) {
1416
+ let { t } = z(), n = [
1417
+ {
1418
+ key: "trigger",
1419
+ labelKey: "components.automation_nodes.category_triggers",
1420
+ nodes: W("trigger")
1421
+ },
1422
+ {
1423
+ key: "condition",
1424
+ labelKey: "components.automation_nodes.category_conditions",
1425
+ nodes: W("condition")
1426
+ },
1427
+ {
1428
+ key: "utility",
1429
+ labelKey: "components.automation_nodes.category_utilities",
1430
+ nodes: W("utility")
1431
+ },
1432
+ {
1433
+ key: "action",
1434
+ labelKey: "components.automation_nodes.category_actions",
1435
+ nodes: W("action")
1436
+ }
1437
+ ];
1438
+ function r(e, t) {
1439
+ e.dataTransfer && (e.dataTransfer.setData("application/automationnode", t), e.dataTransfer.effectAllowed = "move");
1440
+ }
1441
+ return (i, c) => (o(), S("div", { class: d(["overflow-y-auto p-3", e.mode === "drag" ? "h-full" : ""]) }, [e.mode === "drag" ? (o(), S("div", jn, s(v(t)("views.automation.node_palette")), 1)) : h("", !0), (o(), S(w, null, a(n, (n) => E("div", {
1442
+ key: n.key,
1443
+ class: "mb-4"
1444
+ }, [E("div", Mn, s(v(t)(n.labelKey)), 1), E("div", Nn, [(o(!0), S(w, null, a(n.nodes, (n) => (o(), S("div", {
1445
+ key: n.type,
1446
+ class: d(["automation-palette-node", e.mode === "drag" ? "cursor-grab active:cursor-grabbing" : "cursor-pointer"]),
1447
+ draggable: e.mode === "drag",
1448
+ onDragstart: (t) => e.mode === "drag" ? r(t, n.type) : void 0,
1449
+ onClick: (t) => e.mode === "click" ? i.$emit("node-click", n.type) : void 0
1450
+ }, [E("div", {
1451
+ class: "automation-palette-node__accent",
1452
+ style: C({ backgroundColor: n.color })
1453
+ }, null, 4), E("div", Fn, [E("div", {
1454
+ class: "flex items-center justify-center w-8 h-8 rounded-lg shrink-0",
1455
+ style: C({
1456
+ backgroundColor: `${n.color}15`,
1457
+ color: n.color
1458
+ })
1459
+ }, [(o(), m(f(n.icon), { class: "w-4.5 h-4.5" }))], 4), E("div", In, [E("span", Ln, s(v(t)(n.labelKey)), 1), e.mode === "click" ? (o(), S("span", Rn, s(v(t)(n.descriptionKey)), 1)) : h("", !0)])])], 42, Pn))), 128))])])), 64))], 2));
1460
+ }
1461
+ }), [["__scopeId", "data-v-08caad7f"]]), Bn = { class: "flex items-center gap-2 px-3 py-2 border-bottom-color card-background min-h-[48px]" }, Vn = /* @__PURE__ */ A({
1462
+ __name: "CuiAutomationToolbar",
1463
+ props: {
1464
+ flow: {},
1465
+ showHistory: { type: Boolean }
1466
+ },
1467
+ emits: [
1468
+ "update:name",
1469
+ "toggle-enabled",
1470
+ "toggle-suppress-duplicates",
1471
+ "toggle-single-execution",
1472
+ "show-history"
1473
+ ],
1474
+ setup(e, { emit: t }) {
1475
+ let n = e, r = t, { t: i } = z(), { smBreakpoint: a } = ie(), s = T("menuRef"), c = y(() => [{
1476
+ key: "suppressDuplicates",
1477
+ label: i("views.automation.suppress_duplicates"),
1478
+ description: i("views.automation.suppress_duplicates_hint"),
1479
+ toggle: !0,
1480
+ toggleState: n.flow.suppressDuplicates,
1481
+ onClick: () => r("toggle-suppress-duplicates")
1482
+ }, {
1483
+ key: "singleExecution",
1484
+ label: i("views.automation.single_execution"),
1485
+ description: i("views.automation.single_execution_hint"),
1486
+ toggle: !0,
1487
+ toggleState: n.flow.singleExecution,
1488
+ onClick: () => r("toggle-single-execution")
1489
+ }]);
1490
+ return (t, n) => {
1491
+ let r = ke, l = be, u = V, f = me, p = P, g = Ve, _ = ne, y = N;
1492
+ return o(), S("div", Bn, [
1493
+ v(a) ? h("", !0) : (o(), m(l, {
1494
+ key: 0,
1495
+ severity: "secondary",
1496
+ text: "",
1497
+ rounded: "",
1498
+ class: "cui-icon-md shrink-0",
1499
+ onClick: n[0] ||= (e) => t.$router.push("/automations")
1500
+ }, {
1501
+ icon: b(() => [M(r, {
1502
+ width: "100%",
1503
+ height: "100%"
1504
+ })]),
1505
+ _: 1
1506
+ })),
1507
+ M(u, {
1508
+ "model-value": e.flow.name,
1509
+ class: d(["font-medium text-sm min-w-0 flex-1", { "max-w-[300px]": !v(a) }]),
1510
+ placeholder: v(i)("views.automations.flow_name_placeholder"),
1511
+ "onUpdate:modelValue": n[1] ||= (e) => t.$emit("update:name", String(e ?? ""))
1512
+ }, null, 8, [
1513
+ "model-value",
1514
+ "class",
1515
+ "placeholder"
1516
+ ]),
1517
+ n[5] ||= E("div", { class: "flex-1" }, null, -1),
1518
+ M(f, {
1519
+ "model-value": e.flow.enabled,
1520
+ class: "shrink-0",
1521
+ "onUpdate:modelValue": n[2] ||= (e) => t.$emit("toggle-enabled")
1522
+ }, null, 8, ["model-value"]),
1523
+ e.showHistory ? D((o(), m(l, {
1524
+ key: 1,
1525
+ severity: "secondary",
1526
+ text: "",
1527
+ rounded: "",
1528
+ class: "cui-icon-md shrink-0",
1529
+ onClick: n[3] ||= (e) => t.$emit("show-history")
1530
+ }, {
1531
+ icon: b(() => [M(p, {
1532
+ width: "100%",
1533
+ height: "100%"
1534
+ })]),
1535
+ _: 1
1536
+ })), [[
1537
+ y,
1538
+ { value: v(i)("views.automations.run_history") },
1539
+ void 0,
1540
+ { bottom: !0 }
1541
+ ]]) : h("", !0),
1542
+ M(l, {
1543
+ severity: "secondary",
1544
+ text: "",
1545
+ rounded: "",
1546
+ class: "cui-icon-md shrink-0",
1547
+ onClick: n[4] ||= (e) => v(s)?.toggleMenu(e)
1548
+ }, {
1549
+ icon: b(() => [M(g, {
1550
+ width: "100%",
1551
+ height: "100%"
1552
+ })]),
1553
+ _: 1
1554
+ }),
1555
+ M(_, {
1556
+ ref_key: "menuRef",
1557
+ ref: s,
1558
+ items: v(c),
1559
+ "auto-hide": !1,
1560
+ popover: { pt: {
1561
+ root: { class: "w-[18rem]" },
1562
+ content: { class: "p-0! rounded-xl! overflow-hidden!" }
1563
+ } }
1564
+ }, null, 8, ["items"])
1565
+ ]);
1566
+ };
1567
+ }
1568
+ }), Hn = { class: "flex flex-col gap-4 w-full" }, Un = {
1569
+ key: 1,
1570
+ class: "text-sm text-muted"
1571
+ }, Wn = /* @__PURE__ */ A({
1572
+ __name: "CuiAutomationMobileNodeConfig",
1573
+ props: { node: {} },
1574
+ setup(e, { expose: t }) {
1575
+ let n = e, { t: r } = z(), i = Z(), a = y(() => {
1576
+ if (n.node.type) return dn[n.node.type];
1577
+ });
1578
+ function c(e) {
1579
+ if (!i.draft) return;
1580
+ let t = i.draft.nodes.find((e) => e.id === n.node.id);
1581
+ t?.data && (Object.assign(t.data, e), i.draftDirty = !0);
1582
+ }
1583
+ return t({ onConfirm: async () => {
1584
+ if (i.draft) {
1585
+ let e = n.node.id;
1586
+ i.draft.nodes = i.draft.nodes.filter((t) => t.id !== e), i.draft.edges = i.draft.edges.filter((t) => t.source !== e && t.target !== e);
1587
+ }
1588
+ } }), (t, n) => (o(), S("div", Hn, [v(a) ? (o(), m(f(v(a)), {
1589
+ key: 0,
1590
+ data: e.node.data,
1591
+ "node-id": e.node.id,
1592
+ "onUpdate:data": c
1593
+ }, null, 40, ["data", "node-id"])) : (o(), S("div", Un, s(v(r)("views.automation.no_node_selected")), 1))]));
1594
+ }
1595
+ }), Gn = { class: "h-full w-full relative overflow-hidden flex flex-col" }, Kn = { class: "flex flex-1 min-h-0" }, qn = { class: "relative w-6 h-6" }, Jn = {
1596
+ key: 1,
1597
+ class: "flex flex-1 items-center justify-center"
1598
+ }, Yn = {
1599
+ key: 2,
1600
+ class: "flex flex-1 items-center justify-center"
1601
+ }, Xn = { class: "text-muted" }, Zn = /*@__PURE__*/ A({
1602
+ __name: "Automation",
1603
+ setup(e) {
1604
+ let t = F(() => import("./CuiAutomationRunsDialog-CckgCRNS.js")), n = new Ee(), r = oe(), i = se(), { t: a } = z(), { smBreakpoint: c } = ie(), { bottombarHeight: u } = re(), p = pe(), g = fe(), O = Z(), k = y(() => r.params.id), A = y(() => k.value === "new"), ee = y(() => ue(void 0, "admin")), { data: te, isBusy: P } = n.getAutomationQuery(k), { mutateAsync: ne } = n.createAutomationQuery(), { mutateAsync: me } = n.patchAutomationQuery(), { mutateAsync: he } = n.deleteAutomationQuery(), { mutateAsync: ge } = n.triggerAutomationQuery(), I = T("canvasRef"), L = j(!1), R = j(!1), ve = j(!1), ye = j(!1), B = !1, V, H = y({
1605
+ get: () => O.draft,
1606
+ set: (e) => {
1607
+ O.draft = e;
1608
+ }
1609
+ }), U = y(() => {
1610
+ if (!(!H.value || !O.selectedNodeId)) return H.value.nodes.find((e) => e.id === O.selectedNodeId);
1611
+ }), xe = y(() => {
1612
+ if (!(c.value || !U.value)) return "calc(300px + 1.25rem + env(safe-area-inset-right, 0px))";
1613
+ }), Se = y(() => [
1614
+ ...H.value?.nodes.some((e) => e.type === "trigger-manual") ?? !1 ? [{
1615
+ label: a("views.automation.run"),
1616
+ icon: le,
1617
+ buttonProps: { disabled: A.value || R.value },
1618
+ command: () => Ve()
1619
+ }] : [],
1620
+ {
1621
+ label: a("views.automation.undo"),
1622
+ icon: ze,
1623
+ buttonProps: { disabled: !ve.value },
1624
+ command: () => {
1625
+ I.value?.undo(), K();
1626
+ }
1627
+ },
1628
+ {
1629
+ label: a("views.automation.redo"),
1630
+ icon: Ne,
1631
+ buttonProps: { disabled: !ye.value },
1632
+ command: () => {
1633
+ I.value?.redo(), K();
1634
+ }
1635
+ },
1636
+ {
1637
+ label: a("views.automation.export_blueprint"),
1638
+ icon: Qe,
1639
+ command: () => He()
1640
+ },
1641
+ {
1642
+ label: a("views.automation.clear"),
1643
+ icon: Le,
1644
+ command: () => Ue()
1645
+ },
1646
+ {
1647
+ label: a("views.automations.delete"),
1648
+ icon: tt,
1649
+ buttonProps: { severity: "danger" },
1650
+ command: () => We()
1651
+ }
1652
+ ]);
1653
+ function Ce() {
1654
+ ve.value = I.value?.canUndo ?? !1, ye.value = I.value?.canRedo ?? !1;
1655
+ }
1656
+ function we() {
1657
+ H.value = {
1658
+ _id: de(12),
1659
+ name: a("views.automation.untitled"),
1660
+ enabled: !1,
1661
+ nodes: [],
1662
+ edges: [],
1663
+ suppressDuplicates: !1,
1664
+ singleExecution: !1,
1665
+ createdAt: Date.now(),
1666
+ updatedAt: Date.now()
1667
+ }, O.selectedNodeId = null;
1668
+ }
1669
+ function W() {
1670
+ clearTimeout(V), V = setTimeout(() => {
1671
+ J(), O.validationIssues = Ft(H.value);
1672
+ }, 300);
1673
+ }
1674
+ function K() {
1675
+ R.value = !0, Ce(), W();
1676
+ }
1677
+ function q() {
1678
+ p.openComponentDialog(t, { data: {
1679
+ title: a("views.automations.run_history"),
1680
+ contentProps: { flowId: k.value },
1681
+ hideConfirmButton: !0
1682
+ } });
1683
+ }
1684
+ function Ae() {
1685
+ J(), K();
1686
+ }
1687
+ function je(e) {
1688
+ H.value && (H.value.name = e, K());
1689
+ }
1690
+ function Pe(e, t) {
1691
+ if (!H.value) return;
1692
+ let n = H.value.nodes.find((t) => t.id === e);
1693
+ if (n?.data) {
1694
+ if (!Object.entries(t).some(([e, t]) => n.data[e] !== t)) return;
1695
+ Object.assign(n.data, t), I.value?.updateNodeData(e, { ...n.data }), K();
1696
+ }
1697
+ }
1698
+ function Fe() {
1699
+ if (!H.value) return {};
1700
+ let e = I.value?.getNodes?.() ?? H.value.nodes, t = I.value?.getEdges?.() ?? H.value.edges;
1701
+ return {
1702
+ name: H.value.name,
1703
+ enabled: H.value.enabled,
1704
+ suppressDuplicates: H.value.suppressDuplicates,
1705
+ singleExecution: H.value.singleExecution,
1706
+ nodes: e.map((e) => ({
1707
+ id: e.id,
1708
+ type: e.type ?? "",
1709
+ position: e.position,
1710
+ data: e.data ?? {}
1711
+ })),
1712
+ edges: t.map((e) => ({
1713
+ id: e.id,
1714
+ source: e.source,
1715
+ target: e.target,
1716
+ sourceHandle: e.sourceHandle ?? void 0,
1717
+ targetHandle: e.targetHandle ?? void 0
1718
+ }))
1719
+ };
1720
+ }
1721
+ async function Ie() {
1722
+ if (!H.value) return;
1723
+ J();
1724
+ let e = Fe();
1725
+ try {
1726
+ if (A.value) {
1727
+ let t = await ne({ data: e });
1728
+ R.value = !1, i.replace(`/automations/${t._id}`);
1729
+ } else {
1730
+ let t = await me({
1731
+ id: H.value._id,
1732
+ data: e
1733
+ });
1734
+ if (R.value = !1, t?.nodes && H.value) for (let e of t.nodes) {
1735
+ let t = H.value.nodes.find((t) => t.id === e.id);
1736
+ t?.data && e.data && Object.assign(t.data, e.data);
1737
+ }
1738
+ g.add({
1739
+ severity: "success",
1740
+ detail: a("views.automation.saved"),
1741
+ life: 3e3
1742
+ });
1743
+ }
1744
+ } catch {
1745
+ g.add({
1746
+ severity: "error",
1747
+ detail: a("views.automation.save_failed"),
1748
+ life: 3e3
1749
+ });
1750
+ }
1751
+ }
1752
+ function J() {
1753
+ if (!H.value) return;
1754
+ let e = I.value?.getNodes(), t = I.value?.getEdges();
1755
+ e && (H.value.nodes = e), t && (H.value.edges = t);
1756
+ }
1757
+ function Y(e) {
1758
+ if (O.selectedNodeId = e, c.value && e) {
1759
+ J();
1760
+ let t = H.value?.nodes.find((t) => t.id === e);
1761
+ if (!t) return;
1762
+ let n = t.type ? G(t.type) : void 0, r = n ? a(n.labelKey) : "Node", i = t.id;
1763
+ p.openComponentDialog(Wn, {
1764
+ data: {
1765
+ title: r,
1766
+ confirmText: a("views.automation.delete_node"),
1767
+ confirmButtonProps: { severity: "danger" },
1768
+ contentProps: { node: {
1769
+ id: t.id,
1770
+ type: t.type,
1771
+ data: t.data
1772
+ } }
1773
+ },
1774
+ onSettled: () => {
1775
+ H.value?.nodes.some((e) => e.id === i) || (I.value?.removeNode(i), K());
1776
+ }
1777
+ });
1778
+ }
1779
+ }
1780
+ function X(e) {
1781
+ L.value = !1, I.value?.addNodeAtCenter(e), K();
1782
+ }
1783
+ function Re() {
1784
+ O.selectedNodeId && (I.value?.removeNode(O.selectedNodeId), H.value && (H.value.nodes = H.value.nodes.filter((e) => e.id !== O.selectedNodeId), H.value.edges = H.value.edges.filter((e) => e.source !== O.selectedNodeId && e.target !== O.selectedNodeId)), O.selectedNodeId = null, O.lastOutput = null, K());
1785
+ }
1786
+ async function Ve() {
1787
+ if (!(!H.value || A.value)) try {
1788
+ O.lastOutput = null;
1789
+ let e = await ge({ id: H.value._id });
1790
+ e?.output && Object.keys(e.output).length > 0 && (O.lastOutput = e.output), g.add({
1791
+ severity: "success",
1792
+ detail: a("views.automation.triggered"),
1793
+ life: 3e3
1794
+ });
1795
+ } catch {
1796
+ g.add({
1797
+ severity: "error",
1798
+ detail: a("views.automation.trigger_failed"),
1799
+ life: 3e3
1800
+ });
1801
+ }
1802
+ }
1803
+ function He() {
1804
+ if (!H.value) return;
1805
+ Ie();
1806
+ let e = {
1807
+ version: 1,
1808
+ name: H.value.name,
1809
+ nodes: De(H.value.nodes),
1810
+ edges: H.value.edges
1811
+ }, t = JSON.stringify(e, null, 2), n = new Blob([t], { type: "application/json" }), r = URL.createObjectURL(n), i = document.createElement("a");
1812
+ i.href = r, i.download = `${H.value.name.replace(/\s+/g, "_").toLowerCase()}.blueprint.json`, i.click(), URL.revokeObjectURL(r);
1813
+ }
1814
+ function Ue() {
1815
+ p.openTextDialog({
1816
+ data: {
1817
+ title: a("views.automation.clear"),
1818
+ contentText: a("views.automation.clear_confirm"),
1819
+ confirmText: a("views.automation.clear")
1820
+ },
1821
+ onConfirm: async () => {
1822
+ I.value?.clearAll(), H.value && (H.value.nodes = [], H.value.edges = []), O.selectedNodeId = null, K();
1823
+ }
1824
+ });
1825
+ }
1826
+ function We() {
1827
+ if (!H.value) return;
1828
+ let e = H.value._id;
1829
+ p.openTextDialog({
1830
+ data: {
1831
+ title: a("views.automations.delete"),
1832
+ contentText: a("views.automations.delete_confirm"),
1833
+ confirmText: a("views.automations.delete")
1834
+ },
1835
+ onConfirm: async () => {
1836
+ await he({ id: e }), i.push("/automations");
1837
+ }
1838
+ });
1839
+ }
1840
+ function Ge() {
1841
+ i.push("/automations");
1842
+ }
1843
+ return x(k, (e) => {
1844
+ O.activeFlowId = e === "new" ? null : e ?? null, O.selectedNodeId = null, O.lastOutput = null, R.value = !1, e === "new" ? we() : H.value = null;
1845
+ }, { immediate: !0 }), x(te, (e) => {
1846
+ e && !R.value && (H.value = JSON.parse(JSON.stringify(e)), O.validationIssues = Ft(H.value));
1847
+ }, { immediate: !0 }), x(() => O.draftDirty, (e) => {
1848
+ e && (O.draftDirty = !1, K());
1849
+ }), ae((e) => !R.value || B ? !0 : (p.openTextDialog({
1850
+ data: {
1851
+ title: a("views.automation.unsaved_title"),
1852
+ contentText: a("views.automation.unsaved_message"),
1853
+ confirmText: a("views.automation.discard")
1854
+ },
1855
+ onConfirm: async () => {
1856
+ B = !0, i.push(e.fullPath);
1857
+ }
1858
+ }), !1)), (e, t) => {
1859
+ let n = ke, r = be, i = ce, p = Te, g = Oe, y = _e, x = N;
1860
+ return o(), S("div", Gn, [M(i, { position: "left" }, {
1861
+ default: b(() => [M(r, {
1862
+ severity: "secondary",
1863
+ text: "",
1864
+ class: "cui-button p-2 text-color non-draggable-region",
1865
+ onClick: Ge
1866
+ }, {
1867
+ icon: b(() => [M(n, { class: "w-6 h-6" })]),
1868
+ _: 1
1869
+ })]),
1870
+ _: 1
1871
+ }), v(H) ? (o(), S(w, { key: 0 }, [
1872
+ M(Vn, {
1873
+ flow: v(H),
1874
+ "show-history": !v(A) && v(ee),
1875
+ onShowHistory: q,
1876
+ "onUpdate:name": je,
1877
+ onToggleEnabled: t[0] ||= (e) => {
1878
+ v(H).enabled = !v(H).enabled, K();
1879
+ },
1880
+ onToggleSuppressDuplicates: t[1] ||= (e) => {
1881
+ v(H).suppressDuplicates = !v(H).suppressDuplicates, K();
1882
+ },
1883
+ onToggleSingleExecution: t[2] ||= (e) => {
1884
+ v(H).singleExecution = !v(H).singleExecution, K();
1885
+ }
1886
+ }, null, 8, ["flow", "show-history"]),
1887
+ E("div", Kn, [
1888
+ v(c) ? h("", !0) : (o(), m(zn, {
1889
+ key: 0,
1890
+ class: "w-[240px] shrink-0"
1891
+ })),
1892
+ M(un, {
1893
+ ref_key: "canvasRef",
1894
+ ref: I,
1895
+ flow: v(H),
1896
+ mobile: v(c),
1897
+ class: "flex-1 min-w-0",
1898
+ onNodeSelect: Y,
1899
+ onChange: Ae
1900
+ }, null, 8, ["flow", "mobile"]),
1901
+ v(c) ? h("", !0) : (o(), S("div", {
1902
+ key: 1,
1903
+ class: "shrink-0 overflow-hidden transition-[width] duration-200 ease-in-out",
1904
+ style: C({ width: v(U) ? "300px" : "0px" })
1905
+ }, [v(U) ? (o(), m(An, {
1906
+ key: 0,
1907
+ node: v(U),
1908
+ class: "w-[300px]",
1909
+ onClose: t[3] ||= (e) => v(O).selectedNodeId = null,
1910
+ "onUpdate:data": t[4] ||= (e) => Pe(v(O).selectedNodeId, e),
1911
+ onDelete: Re
1912
+ }, null, 8, ["node"])) : h("", !0)], 4))
1913
+ ]),
1914
+ M(p, {
1915
+ model: v(Se),
1916
+ direction: "up",
1917
+ "transition-delay": 80,
1918
+ "tooltip-options": {
1919
+ position: "left",
1920
+ event: void 0
1921
+ },
1922
+ style: C({
1923
+ position: "fixed",
1924
+ zIndex: 15,
1925
+ bottom: `calc(${v(u)}px + ${v(R) ? "4.25rem" : "1.25rem"} + env(safe-area-inset-bottom, 0px))`,
1926
+ right: v(xe) || "calc(1.25rem + env(safe-area-inset-right, 0px))",
1927
+ transition: "right 0.2s ease-in-out, bottom 0.2s ease-in-out"
1928
+ }),
1929
+ pt: { root: { style: "pointer-events: none" } }
1930
+ }, {
1931
+ button: b(({ visible: e, toggleCallback: t }) => [M(r, {
1932
+ rounded: "",
1933
+ severity: "secondary",
1934
+ class: "pointer-events-auto",
1935
+ onClick: t
1936
+ }, {
1937
+ icon: b(() => [E("div", qn, [
1938
+ E("div", {
1939
+ class: d(["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 }]),
1940
+ style: { backgroundColor: "var(--text-color)" }
1941
+ }, null, 2),
1942
+ E("div", {
1943
+ class: d(["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 }]),
1944
+ style: { backgroundColor: "var(--text-color)" }
1945
+ }, null, 2),
1946
+ E("div", {
1947
+ class: d(["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 }]),
1948
+ style: { backgroundColor: "var(--text-color)" }
1949
+ }, null, 2)
1950
+ ])]),
1951
+ _: 2
1952
+ }, 1032, ["onClick"])]),
1953
+ item: b(({ item: e, toggleCallback: t }) => [D((o(), m(r, l({ severity: "secondary" }, e.buttonProps, {
1954
+ rounded: "",
1955
+ class: "pointer-events-auto",
1956
+ onClick: t
1957
+ }), {
1958
+ icon: b(() => [(o(), m(f(e.icon)))]),
1959
+ _: 2
1960
+ }, 1040, ["onClick"])), [[x, { value: e.label }]])]),
1961
+ _: 1
1962
+ }, 8, ["model", "style"]),
1963
+ v(c) ? D((o(), m(r, {
1964
+ key: 0,
1965
+ rounded: "",
1966
+ class: "pointer-events-auto text-white",
1967
+ style: C({
1968
+ position: "fixed",
1969
+ zIndex: 15,
1970
+ bottom: `calc(${v(u)}px + 1.25rem + env(safe-area-inset-bottom, 0px))`,
1971
+ right: "calc(4.75rem + env(safe-area-inset-right, 0px))"
1972
+ }),
1973
+ onClick: t[5] ||= (e) => L.value = !0
1974
+ }, {
1975
+ icon: b(() => [M(v(Be), { class: "w-5 h-5" })]),
1976
+ _: 1
1977
+ }, 8, ["style"])), [[x, { value: v(a)("views.automation.add_step") }]]) : h("", !0),
1978
+ v(R) ? D((o(), m(r, {
1979
+ key: 1,
1980
+ rounded: "",
1981
+ severity: "success",
1982
+ class: "pointer-events-auto text-white",
1983
+ style: C({
1984
+ position: "fixed",
1985
+ zIndex: 15,
1986
+ bottom: `calc(${v(u)}px + 1.25rem + env(safe-area-inset-bottom, 0px))`,
1987
+ right: v(xe) || "calc(1.25rem + env(safe-area-inset-right, 0px))",
1988
+ transition: "right 0.2s ease-in-out"
1989
+ }),
1990
+ onClick: Ie
1991
+ }, {
1992
+ icon: b(() => [M(v(Me), { class: "w-5 h-5" })]),
1993
+ _: 1
1994
+ }, 8, ["style"])), [[x, { value: v(a)("views.automation.save") }]]) : h("", !0),
1995
+ M(g, {
1996
+ modelValue: v(L),
1997
+ "onUpdate:modelValue": t[6] ||= (e) => _(L) ? L.value = e : null,
1998
+ title: v(a)("views.automation.add_step"),
1999
+ "max-height": "70vh"
2000
+ }, {
2001
+ default: b(() => [M(zn, {
2002
+ mode: "click",
2003
+ onNodeClick: X
2004
+ })]),
2005
+ _: 1
2006
+ }, 8, ["modelValue", "title"])
2007
+ ], 64)) : v(P) ? (o(), S("div", Jn, [M(y, {
2008
+ class: "!w-8 !h-8",
2009
+ "stroke-width": "5"
2010
+ })])) : (o(), S("div", Yn, [E("span", Xn, s(v(a)("views.automations.no_automations")), 1)]))]);
2011
+ };
2012
+ }
2013
+ }), Qn = /* @__PURE__ */ e({ default: () => $n }), $n = Zn;
2014
+ //#endregion
2015
+ export { Z as a, $n as default, We as i, Ue as n, Ge as r, Qn as t };