@camera.ui/server 2.2.6 → 2.2.7

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 (338) hide show
  1. package/dist/interface/assets/{404-BLVuKvLk.js → 404-C8EoOtBl.js} +1 -1
  2. package/dist/interface/assets/{About-C-AJ0jfI.js → About-Q7ZmOGgl.js} +1 -1
  3. package/dist/interface/assets/Assistant-DFLgklVe.js +1 -0
  4. package/dist/interface/assets/{Automation-C95DzuZb.js → Automation-D__qvx8c.js} +3 -3
  5. package/dist/interface/assets/{AutomationImport-C8VYjDzf.js → AutomationImport-CLQSdqg9.js} +2 -2
  6. package/dist/interface/assets/{AutomationStore-CE4PKRGd.js → AutomationStore-Dt6yTQDb.js} +2 -2
  7. package/dist/interface/assets/{AutomationStoreDetail-DavWfjLv.js → AutomationStoreDetail-DqBrBhUI.js} +2 -2
  8. package/dist/interface/assets/Automations-BH_7lYR7.js +2 -0
  9. package/dist/interface/assets/Camera-aquPHFwb.js +2 -0
  10. package/dist/interface/assets/{CameraConsole-C4AmtcrM.js → CameraConsole-rhle_cfW.js} +1 -1
  11. package/dist/interface/assets/{Cameras-DR577Bno.js → Cameras-Bzy3P0xN.js} +2 -2
  12. package/dist/interface/assets/Camview-CjcQbtTl.js +1 -0
  13. package/dist/interface/assets/{CertificateUpload-BYFKZCP9.js → CertificateUpload-CWVu_52v.js} +1 -1
  14. package/dist/interface/assets/Config-Dc1zKIPq.js +2 -0
  15. package/dist/interface/assets/{ConfigActionAssistant-YtCVI8LZ.js → ConfigActionAssistant-AfQfSqHZ.js} +1 -1
  16. package/dist/interface/assets/{ConfigActionCameraControl-Dg_1zOYt.js → ConfigActionCameraControl-BKQdHxqe.js} +1 -1
  17. package/dist/interface/assets/{ConfigActionDelay-_EqbfWgo.js → ConfigActionDelay-B52HeJGb.js} +1 -1
  18. package/dist/interface/assets/{ConfigActionHttp-BzwLv2tn.js → ConfigActionHttp-BP5gvpQc.js} +1 -1
  19. package/dist/interface/assets/{ConfigActionImageInput-CLdY2sV4.js → ConfigActionImageInput-DE2mSost.js} +1 -1
  20. package/dist/interface/assets/{ConfigActionMqtt-lGqYshl3.js → ConfigActionMqtt-CYgnZjAE.js} +1 -1
  21. package/dist/interface/assets/{ConfigActionNotification-D5Dj3EoU.js → ConfigActionNotification-C3q53I4n.js} +1 -1
  22. package/dist/interface/assets/{ConfigActionNotificationControl-Dy5fKamr.js → ConfigActionNotificationControl-eDJ8r5ao.js} +1 -1
  23. package/dist/interface/assets/{ConfigActionOutput-DzsQ31L0.js → ConfigActionOutput-DgYSYvy-.js} +1 -1
  24. package/dist/interface/assets/{ConfigActionPlugin-BFrBcXvL.js → ConfigActionPlugin-utolgAXk.js} +1 -1
  25. package/dist/interface/assets/{ConfigActionSensor-CX8ePlan.js → ConfigActionSensor-CmEKQPqs.js} +1 -1
  26. package/dist/interface/assets/{ConfigActionSnapshot-BATLRmh6.js → ConfigActionSnapshot-D7XucxVV.js} +1 -1
  27. package/dist/interface/assets/{ConfigActionVariable-Dgn5jvaR.js → ConfigActionVariable-C-Mjm3gr.js} +1 -1
  28. package/dist/interface/assets/{ConfigConditionIfElse-D5IIBjyk.js → ConfigConditionIfElse-B24Rqb8y.js} +1 -1
  29. package/dist/interface/assets/{ConfigConditionSensorState-C0JxBWdG.js → ConfigConditionSensorState-42-yFDmK.js} +1 -1
  30. package/dist/interface/assets/{ConfigConditionSwitch-Brlgd0XP.js → ConfigConditionSwitch-DezH_nwm.js} +1 -1
  31. package/dist/interface/assets/{ConfigConditionTime-CM4bSMyU.js → ConfigConditionTime-Cg2Lwznd.js} +1 -1
  32. package/dist/interface/assets/{ConfigSensorValueInput-CtuH8dCa.js → ConfigSensorValueInput-YHBDCTZm.js} +1 -1
  33. package/dist/interface/assets/{ConfigTriggerDetection-DsL7lLQl.js → ConfigTriggerDetection-DxEpodjG.js} +1 -1
  34. package/dist/interface/assets/{ConfigTriggerGeofence-CAGIk1_W.js → ConfigTriggerGeofence-Bye8syxc.js} +1 -1
  35. package/dist/interface/assets/{ConfigTriggerManual-DgkR-GWy.js → ConfigTriggerManual-s_lEDTV9.js} +1 -1
  36. package/dist/interface/assets/{ConfigTriggerMqtt-B_iFalAQ.js → ConfigTriggerMqtt-DqdZj7TU.js} +1 -1
  37. package/dist/interface/assets/{ConfigTriggerSchedule-E_QWfNKy.js → ConfigTriggerSchedule-Q559hn6g.js} +1 -1
  38. package/dist/interface/assets/{ConfigTriggerSensor-hYNbLXUu.js → ConfigTriggerSensor-DIKkdbTF.js} +1 -1
  39. package/dist/interface/assets/{ConfigTriggerSystem-DR1EFpE9.js → ConfigTriggerSystem-CwNZ4xEg.js} +1 -1
  40. package/dist/interface/assets/{ConfigTriggerWebhook-C-B5GGFH.js → ConfigTriggerWebhook-9ZC6X4mK.js} +1 -1
  41. package/dist/interface/assets/Console-BqIDZ5vq.js +1 -0
  42. package/dist/interface/assets/{CuiAssistantConversation-BmshW6Vc.css → CuiAssistantConversation-BmBhwrNh.css} +1 -1
  43. package/dist/interface/assets/CuiAssistantConversation-CM7KdaX2.js +5 -0
  44. package/dist/interface/assets/CuiAutomationRunsDialog-CVjCLiVW.js +1 -0
  45. package/dist/interface/assets/CuiBottomSheet-CFohFiO2.js +1 -0
  46. package/dist/interface/assets/{CuiBottomSheet-C2sM2E3M.js → CuiBottomSheet-D75L0Zny.js} +1 -1
  47. package/dist/interface/assets/{CuiCameraPipCard-wdK7xir-.js → CuiCameraPipCard-eiJjYZ5W.js} +1 -1
  48. package/dist/interface/assets/CuiCameraRecordings-DdEWkJrO.js +1 -0
  49. package/dist/interface/assets/{CuiCameraShares-B6jdUBVm.js → CuiCameraShares-8mtgFsQ_.js} +1 -1
  50. package/dist/interface/assets/{CuiCameraTable-CpBo25Qc.js → CuiCameraTable-CmCT-XQF.js} +2 -2
  51. package/dist/interface/assets/CuiCameraTable-DHrKoD9s.js +1 -0
  52. package/dist/interface/assets/CuiChartTable-DCr_AsSw.css +1 -0
  53. package/dist/interface/assets/CuiChartTable-v8sGY6PD.js +1 -0
  54. package/dist/interface/assets/{CuiConsole-BGptpT6r.js → CuiConsole-DYV-FUE0.js} +2 -2
  55. package/dist/interface/assets/{CuiDataTable-CQmp5mAy.js → CuiDataTable-C0gsYYpg.js} +1 -1
  56. package/dist/interface/assets/{CuiLightControl-wbZi3fA1.js → CuiLightControl-CFIwBj3C.js} +1 -1
  57. package/dist/interface/assets/{CuiList-Dsu5m0TA.js → CuiList-9TVV8SB6.js} +1 -1
  58. package/dist/interface/assets/{CuiPluginCard-BjIc7It9.js → CuiPluginCard-DEfqwUhQ.js} +2 -2
  59. package/dist/interface/assets/{CuiPluginCategoryChip-BtJ_6_gN.js → CuiPluginCategoryChip-DhnIBJHa.js} +1 -1
  60. package/dist/interface/assets/{CuiPluginOAuthButton-Duf35I8K.js → CuiPluginOAuthButton-DAuzNRAA.js} +2 -2
  61. package/dist/interface/assets/{CuiPluginTrustBadge-jxXeRTH2.js → CuiPluginTrustBadge-Bz710WwC.js} +1 -1
  62. package/dist/interface/assets/{CuiQRCode-BNchrpoB.js → CuiQRCode-B8-4GHSY.js} +1 -1
  63. package/dist/interface/assets/{CuiSchema-DGTMkVSe.js → CuiSchema-C_CHuKuf.js} +1 -1
  64. package/dist/interface/assets/{CuiTopNavbarItem-CHtLvn53.js → CuiTopNavbarItem-CNEnOPSh.js} +1 -1
  65. package/dist/interface/assets/Faces-DRHMrrxh.js +1 -0
  66. package/dist/interface/assets/{FirstSteps-HzaBMDbH.js → FirstSteps-Ci2Iqbe2.js} +1 -1
  67. package/dist/interface/assets/Floorplan-CqWIbDbh.js +1 -0
  68. package/dist/interface/assets/{Instances-Dl-6rL5O.js → Instances-gzKFKB1l.js} +1 -1
  69. package/dist/interface/assets/{Logs-DsJkuQFq.js → Logs-DL1yw_Pe.js} +2 -2
  70. package/dist/interface/assets/{Menu-D_woMkjL.js → Menu-C0GQ63aj.js} +1 -1
  71. package/dist/interface/assets/Metrics-BYnnb7M0.js +12 -0
  72. package/dist/interface/assets/Metrics-DsHBab6t.css +1 -0
  73. package/dist/interface/assets/{OAuthDeviceFlow-CXfILAE1.js → OAuthDeviceFlow-Zd6r9IHU.js} +1 -1
  74. package/dist/interface/assets/Plugin-DJIrYUnZ.js +1 -0
  75. package/dist/interface/assets/{PluginConsole-C96m5zKy.js → PluginConsole-ag0jPZQ_.js} +1 -1
  76. package/dist/interface/assets/{PluginDetail-CnfaI1vh.js → PluginDetail-DmElwUuV.js} +2 -2
  77. package/dist/interface/assets/{PluginSchema-u1bqXU29.js → PluginSchema-CxUujnVs.js} +1 -1
  78. package/dist/interface/assets/PluginSearch-B-2zH2Xy.js +1 -0
  79. package/dist/interface/assets/PluginSearch-BqzngVRL.js +2 -0
  80. package/dist/interface/assets/{PluginUpdateProgress-BT4lN9HT.js → PluginUpdateProgress-CFut0RAe.js} +1 -1
  81. package/dist/interface/assets/Plugins-ZFcB_j6v.js +1 -0
  82. package/dist/interface/assets/{RecentEventsFilter-Kp_lTOuG.js → RecentEventsFilter-CqeHhECT.js} +1 -1
  83. package/dist/interface/assets/Recordings-BJrtW9eG.js +1 -0
  84. package/dist/interface/assets/SensorEdit-Bi0gg-CL.js +1 -0
  85. package/dist/interface/assets/{SensorHistory-Cet35_RO.js → SensorHistory-q0UR3qMG.js} +1 -1
  86. package/dist/interface/assets/Sensors-C_InhcHA.js +2 -0
  87. package/dist/interface/assets/{Settings-C-LCDIbK.js → Settings-Cv38rGWn.js} +1 -1
  88. package/dist/interface/assets/SettingsAccount-B05739dn.js +1 -0
  89. package/dist/interface/assets/SettingsAccount-gm28wtbl.js +1 -0
  90. package/dist/interface/assets/{SettingsAppearance-BS4EQNjH.js → SettingsAppearance-DdyYUgmV.js} +1 -1
  91. package/dist/interface/assets/SettingsAppearance-DwUknDPV.js +1 -0
  92. package/dist/interface/assets/SettingsAssistant-ChHfkUKk.js +1 -0
  93. package/dist/interface/assets/{SettingsBackup-DBlV1gej.js → SettingsBackup-DKwlPQhD.js} +1 -1
  94. package/dist/interface/assets/{SettingsList-D8eSwbBY.js → SettingsList-D6hqnvUo.js} +1 -1
  95. package/dist/interface/assets/SettingsMqtt-C01fgLY0.js +1 -0
  96. package/dist/interface/assets/SettingsNotifications-D47cIquQ.js +1 -0
  97. package/dist/interface/assets/{SettingsPermissions-CJiz0Z7B.js → SettingsPermissions-BeTCTrAf.js} +1 -1
  98. package/dist/interface/assets/{SettingsRecordings-CLz9Zp47.js → SettingsRecordings-mwL6Dalr.js} +1 -1
  99. package/dist/interface/assets/SettingsRemote-MhaShPIf.js +2 -0
  100. package/dist/interface/assets/{SettingsSystem-txTFGomQ.js → SettingsSystem-BXnzXgqm.js} +2 -2
  101. package/dist/interface/assets/{SettingsUsers-CUp6vQPc.js → SettingsUsers-D2mVlJin.js} +1 -1
  102. package/dist/interface/assets/Terminal-C1UoXDRK.js +4 -0
  103. package/dist/interface/assets/Training-A5ynOv_l.js +1 -0
  104. package/dist/interface/assets/{Training-Bkn52mPJ.css → Training-C-ToeAl4.css} +1 -1
  105. package/dist/interface/assets/Updates-kS_Tm8HD.js +2 -0
  106. package/dist/interface/assets/{VariableInput-183LygmK.js → VariableInput-D9PfI8Ut.js} +1 -1
  107. package/dist/interface/assets/{VariableSuggestions-DwLtlzVz.js → VariableSuggestions-DArWzQuE.js} +1 -1
  108. package/dist/interface/assets/{VersionsHandler-DkbkcypK.js → VersionsHandler-BZVMpB2v.js} +1 -1
  109. package/dist/interface/assets/{VirtualSensorCreate-Bn4tgdxA.js → VirtualSensorCreate-Cz-QFo4R.js} +1 -1
  110. package/dist/interface/assets/Workers-2sc4VMi9.js +2 -0
  111. package/dist/interface/assets/api-CGfJbsTz.css +2 -0
  112. package/dist/interface/assets/{api-h4HRB3ef.js → api-CzwdnGAH.js} +1 -1
  113. package/dist/interface/assets/api-DOpXVpef.js +4 -0
  114. package/dist/interface/assets/{assistant-4hYyIu6D.js → assistant-hGCAgv-f.js} +1 -1
  115. package/dist/interface/assets/{auth-DFesRtwI.js → auth-By-S-WEr.js} +1 -1
  116. package/dist/interface/assets/{automations-D2bnX8uw.js → automations-vwIwb2PQ.js} +1 -1
  117. package/dist/interface/assets/{cameraSources-DmVZWs4-.js → cameraSources-BMhXvtFt.js} +1 -1
  118. package/dist/interface/assets/cloudHandoff-BnzjCpJ2.js +1 -0
  119. package/dist/interface/assets/{config-DDaCrMSU.js → config-BQxEwrK6.js} +1 -1
  120. package/dist/interface/assets/{flowSchema-YJtAu9gB.js → flowSchema-BPq6iHks.js} +1 -1
  121. package/dist/interface/assets/{intercomService-CjoJaOZ7.js → intercomService-CXcjcPa9.js} +1 -1
  122. package/dist/interface/assets/main-By4L33Im.js +3 -0
  123. package/dist/interface/assets/mqtt-DE1KQ8Td.js +1 -0
  124. package/dist/interface/assets/{notifications-5yeK345h.js → notifications-BCyiD-TP.js} +1 -1
  125. package/dist/interface/assets/{plugins-BTOdE_zv.js → plugins-BJPCV1YL.js} +1 -1
  126. package/dist/interface/assets/rooms-Dr4yiakO.js +1 -0
  127. package/dist/interface/assets/{sensorIcons-5Ynqwo3e.js → sensorIcons-DofElQ3w.js} +1 -1
  128. package/dist/interface/assets/{sensorSlots-BF70tpV7.js → sensorSlots-D2KJGvPw.js} +1 -1
  129. package/dist/interface/assets/{sensors-CeFEEz8r.js → sensors-3llrL7s3.js} +1 -1
  130. package/dist/interface/assets/server-Dw5DD473.js +1 -0
  131. package/dist/interface/assets/{theme-DF_XA58O.js → theme-C85LJhOY.js} +1 -1
  132. package/dist/interface/assets/{types-CklFkUXk.js → types-CPhy0Ovw.js} +1 -1
  133. package/dist/interface/assets/{types-ArGM5-5O.js → types-DYKmSGl4.js} +1 -1
  134. package/dist/interface/assets/{types-BcAxmlqC.js → types-i1kTodPP.js} +1 -1
  135. package/dist/interface/assets/ungrouped-BlheTJCh.css +1 -0
  136. package/dist/interface/assets/ungrouped-C2CWO39a.js +1 -0
  137. package/dist/interface/assets/{updates-D3x_kPMM.js → updates-C2LhMkNR.js} +1 -1
  138. package/dist/interface/assets/{useAppVersion-Dcvu95bZ.js → useAppVersion-DkazK9Vu.js} +1 -1
  139. package/dist/interface/assets/{useAssistantActions-Cc_O6M9_.js → useAssistantActions-BZP6NL18.js} +1 -1
  140. package/dist/interface/assets/useBackupRestore-DMQW_CVC.js +1 -0
  141. package/dist/interface/assets/{useCameraOptions-8I4MTDgj.js → useCameraOptions-DnI0xLrX.js} +1 -1
  142. package/dist/interface/assets/useKeyboardInset-Cr7SxKGN.js +1 -0
  143. package/dist/interface/assets/{useLogsSocket-bpOiLgWT.js → useLogsSocket-C3Y8S0Ar.js} +1 -1
  144. package/dist/interface/assets/{useNavLayout-Cjf6Da2u.js → useNavLayout-C9pcDuVP.js} +1 -1
  145. package/dist/interface/assets/{usePermissions-BXTw4tII.js → usePermissions-CCTxwXF0.js} +1 -1
  146. package/dist/interface/assets/{usePluginUpdates-bOMj-IvL.js → usePluginUpdates-DBhLWAua.js} +1 -1
  147. package/dist/interface/assets/{usePushRegistration-HOvLuUVP.js → usePushRegistration-CPRVdLAx.js} +1 -1
  148. package/dist/interface/assets/{useServerRestart-CQN4cdHJ.js → useServerRestart-bScBLJ9r.js} +1 -1
  149. package/dist/interface/assets/{useStreamStatus-Da7c2Wme.js → useStreamStatus-Bfh-WmLH.js} +1 -1
  150. package/dist/interface/assets/{useTabSwipe-fFuyJJBQ.js → useTabSwipe-C_QOrvSW.js} +1 -1
  151. package/dist/interface/assets/{useUpdateChannel-Ca1RX32u.js → useUpdateChannel-g0h_4c55.js} +1 -1
  152. package/dist/interface/assets/{useUpdatesSocket-DHZNpLQX.js → useUpdatesSocket-CxrLRETs.js} +1 -1
  153. package/dist/interface/assets/{useUserOptions-BQdOB-Dp.js → useUserOptions-DN0t3gBr.js} +1 -1
  154. package/dist/interface/assets/vendor-cameraui-B28aGJJD.js +2326 -0
  155. package/dist/interface/assets/{vendor-core-B-Q4es-f.js → vendor-core-DIa0tPNH.js} +1 -1
  156. package/dist/interface/assets/{vendor-primevue-Cmp3VjIC.js → vendor-primevue-CZKUAkMA.js} +77 -77
  157. package/dist/interface/ha/{404-C0mWQGWl.js → 404-tl2VQ3qy.js} +1 -1
  158. package/dist/interface/ha/{About-ByE7XErJ.js → About-Cn7KOblU.js} +3 -3
  159. package/dist/interface/ha/{Assistant-Z3FTR868.js → Assistant-DG2GGda0.js} +1225 -1203
  160. package/dist/interface/ha/{Automation-COQqTFNw.js → Automation-D0_WpXx4.js} +27 -27
  161. package/dist/interface/ha/{AutomationImport-ueWqMBX9.js → AutomationImport-DdC3dEaC.js} +6 -6
  162. package/dist/interface/ha/{AutomationStore-DBO4aZqy.js → AutomationStore-BrLn4oBx.js} +4 -4
  163. package/dist/interface/ha/{AutomationStoreDetail-DMnYu7hf.js → AutomationStoreDetail-DoppNsNc.js} +6 -6
  164. package/dist/interface/ha/{Automations-CMdbidc0.js → Automations-BaUJ9pVq.js} +3 -3
  165. package/dist/interface/ha/{Camera-C28q_3pu.js → Camera-Cj5ImvZG.js} +12 -12
  166. package/dist/interface/ha/{CameraConsole-oMNZfKE6.js → CameraConsole-7MhlS2VK.js} +3 -3
  167. package/dist/interface/ha/{Cameras-CsqrLx97.js → Cameras-vHYz8uSO.js} +6 -6
  168. package/dist/interface/ha/{Camview-Br0LUakz.js → Camview-BEglAx26.js} +452 -452
  169. package/dist/interface/ha/{Config-Y5eUNSW7.js → Config-CHiK--zP.js} +6 -6
  170. package/dist/interface/ha/{ConfigActionAssistant-hl-6ZACj.js → ConfigActionAssistant-DynduZYV.js} +4 -4
  171. package/dist/interface/ha/{ConfigActionCameraControl-DnXlVFWD.js → ConfigActionCameraControl-BEYePssz.js} +3 -3
  172. package/dist/interface/ha/{ConfigActionHttp-BkpkMmRd.js → ConfigActionHttp-h0vRWqZ5.js} +2 -2
  173. package/dist/interface/ha/{ConfigActionImageInput-Dp78_QS_.js → ConfigActionImageInput-B9GMZYAR.js} +1 -1
  174. package/dist/interface/ha/{ConfigActionMqtt-DA_UWb5j.js → ConfigActionMqtt-BEQpHBgf.js} +4 -4
  175. package/dist/interface/ha/{ConfigActionNotification-CQ4Ses3a.js → ConfigActionNotification-BYsz8_aS.js} +3 -3
  176. package/dist/interface/ha/{ConfigActionNotificationControl-Cb5PNGz-.js → ConfigActionNotificationControl-BxmIWVE8.js} +2 -2
  177. package/dist/interface/ha/{ConfigActionOutput-DLuNHwRb.js → ConfigActionOutput-DTOQSa1S.js} +1 -1
  178. package/dist/interface/ha/{ConfigActionPlugin-ChKFCNaj.js → ConfigActionPlugin-NOsUs3QI.js} +5 -5
  179. package/dist/interface/ha/{ConfigActionSensor-DOutFalW.js → ConfigActionSensor-YWnsH_LV.js} +4 -4
  180. package/dist/interface/ha/{ConfigActionSnapshot-GWgY6YIN.js → ConfigActionSnapshot-DHJnTvin.js} +2 -2
  181. package/dist/interface/ha/{ConfigActionVariable-bu-9VYTG.js → ConfigActionVariable-C7UFnvW0.js} +1 -1
  182. package/dist/interface/ha/{ConfigConditionIfElse-iNp8tlZV.js → ConfigConditionIfElse-CAHbuhH3.js} +3 -3
  183. package/dist/interface/ha/{ConfigConditionSensorState-Dn7kcHpJ.js → ConfigConditionSensorState-CE6okUeb.js} +4 -4
  184. package/dist/interface/ha/{ConfigConditionSwitch-DaUlDgo0.js → ConfigConditionSwitch-D5FULaTy.js} +4 -4
  185. package/dist/interface/ha/{ConfigSensorValueInput-D6m6suqJ.js → ConfigSensorValueInput-mo6Gs_aZ.js} +3 -3
  186. package/dist/interface/ha/{ConfigTriggerDetection-C5B_DC_L.js → ConfigTriggerDetection-Bt-OhHtM.js} +11 -11
  187. package/dist/interface/ha/{ConfigTriggerGeofence-B4WVNcK5.js → ConfigTriggerGeofence-Cw3jV5qD.js} +2 -2
  188. package/dist/interface/ha/{ConfigTriggerMqtt-wnMfk_Un.js → ConfigTriggerMqtt-BXeV82UG.js} +1 -1
  189. package/dist/interface/ha/{ConfigTriggerSensor-xFpI5KPu.js → ConfigTriggerSensor-Baqq--nJ.js} +1 -1
  190. package/dist/interface/ha/{ConfigTriggerSystem-YI9WYYVM.js → ConfigTriggerSystem-braUVGzW.js} +2 -2
  191. package/dist/interface/ha/{ConfigTriggerWebhook-58c2KgUe.js → ConfigTriggerWebhook-Dm45r-1C.js} +1 -1
  192. package/dist/interface/ha/{Console-Coiqh32K.js → Console-q3TCsxYo.js} +2 -2
  193. package/dist/interface/ha/{CuiAutomationRunsDialog-CJ2MGfEY.js → CuiAutomationRunsDialog-DO6h5Tc4.js} +2 -2
  194. package/dist/interface/ha/{CuiBottomSheet-BlG9Pl9j.js → CuiBottomSheet-B7ldz0xi.js} +1 -1
  195. package/dist/interface/ha/{CuiCameraRecordings-DLXEB4Q7.js → CuiCameraRecordings-Dq1Vh3qA.js} +6 -6
  196. package/dist/interface/ha/{CuiCameraShares-BCIeaM6u.js → CuiCameraShares-DBqcpevG.js} +2 -2
  197. package/dist/interface/ha/{CuiCameraTable-PYYC7sOu.js → CuiCameraTable-kL8rK-Uv.js} +2 -2
  198. package/dist/interface/ha/{CuiChartTable-FQ2iR5Hd.js → CuiChartTable-BrFyiSt_.js} +81 -66
  199. package/dist/interface/ha/{CuiConsole-C77k5q_-.js → CuiConsole-DpeXZmJd.js} +1 -1
  200. package/dist/interface/ha/{CuiDataTable-CIKQLseG.js → CuiDataTable-BtqzIz0o.js} +1 -1
  201. package/dist/interface/ha/{CuiPluginCard-DZNXKP_P.js → CuiPluginCard-lBLypaN4.js} +6 -6
  202. package/dist/interface/ha/{CuiPluginOAuthButton-DVf52_Zc.js → CuiPluginOAuthButton-CuGauZJA.js} +3 -3
  203. package/dist/interface/ha/{CuiPluginTrustBadge-CPljYiM8.js → CuiPluginTrustBadge-BofBmRYc.js} +1 -1
  204. package/dist/interface/ha/{CuiQRCode-oe8PLnLj.js → CuiQRCode-CdK9bwKb.js} +2 -2
  205. package/dist/interface/ha/{CuiSchema-CQy94ZTs.js → CuiSchema-DqkCLv9Y.js} +2 -2
  206. package/dist/interface/ha/{CuiTopNavbarItem-D6OHZLQY.js → CuiTopNavbarItem-C2VZB7WV.js} +1 -1
  207. package/dist/interface/ha/{Faces-DxAPvemO.js → Faces-Crfi-75Z.js} +239 -239
  208. package/dist/interface/ha/{FirstSteps-ZINTSaeL.js → FirstSteps-CKVG86pf.js} +4 -4
  209. package/dist/interface/ha/{Floorplan-DkbL8ppT.js → Floorplan-CH9_-6hk.js} +5 -5
  210. package/dist/interface/ha/{Instances-totWtqd7.js → Instances-5gZdPPDA.js} +1 -1
  211. package/dist/interface/ha/{Logs-CzabIFja.js → Logs-BkzEM70F.js} +6 -6
  212. package/dist/interface/ha/{Menu-DcVBOQfw.js → Menu-BuT3_Ggx.js} +2 -2
  213. package/dist/interface/ha/{Metrics-B_SN5hbp.js → Metrics-BGrzu0bu.js} +288 -286
  214. package/dist/interface/ha/{OAuthDeviceFlow-B28TPsTQ.js → OAuthDeviceFlow-BEJtegqy.js} +3 -3
  215. package/dist/interface/ha/{Plugin-B2PbbB8d.js → Plugin-Bnp2jiC2.js} +6 -6
  216. package/dist/interface/ha/{PluginConsole-_KeG4FvO.js → PluginConsole-CmsuPVMz.js} +4 -4
  217. package/dist/interface/ha/{PluginDetail-GK_Fx14e.js → PluginDetail-BCNx7vHr.js} +6 -6
  218. package/dist/interface/ha/{PluginSearch-qSy4aqAW.js → PluginSearch-DOdhuxgM.js} +4 -4
  219. package/dist/interface/ha/{PluginUpdateProgress-C4Q2j6VO.js → PluginUpdateProgress-CwkKc8Tr.js} +3 -3
  220. package/dist/interface/ha/{Plugins-D0tvZHie.js → Plugins-BrFowCdC.js} +7 -7
  221. package/dist/interface/ha/{Recordings-CpxJYaAa.js → Recordings-BZhf39pJ.js} +168 -166
  222. package/dist/interface/ha/{SensorEdit-8KtqLXEu.js → SensorEdit-Ds6WbN4A.js} +3 -3
  223. package/dist/interface/ha/{SensorHistory-CPTTsdjM.js → SensorHistory-CoTIYTJx.js} +2 -2
  224. package/dist/interface/ha/{Sensors-DJt_Hnn2.js → Sensors-DZ2MKdlh.js} +4 -4
  225. package/dist/interface/ha/{Settings-B-OdG5pG.js → Settings-D3JKr430.js} +2 -2
  226. package/dist/interface/ha/{SettingsAccount-Ba2-2Lbi.js → SettingsAccount-cvtlSKZw.js} +4 -4
  227. package/dist/interface/ha/{SettingsAppearance-D56HjSuQ.js → SettingsAppearance-CaKuOHRu.js} +3 -3
  228. package/dist/interface/ha/{SettingsAssistant-DglU0auc.js → SettingsAssistant-vWVjAUqQ.js} +4 -4
  229. package/dist/interface/ha/{SettingsBackup-DZx4McDz.js → SettingsBackup-CvzL_bVf.js} +2 -2
  230. package/dist/interface/ha/{SettingsList-D9nIGkbE.js → SettingsList-C0Ec8x-H.js} +1 -1
  231. package/dist/interface/ha/{SettingsMqtt-BOszh--k.js → SettingsMqtt-COnq-QM5.js} +2 -2
  232. package/dist/interface/ha/{SettingsNotifications-DBVpZfp0.js → SettingsNotifications-BZ68bQzO.js} +3 -3
  233. package/dist/interface/ha/{SettingsRecordings-D3oJnizu.js → SettingsRecordings-BPtNNpDa.js} +4 -4
  234. package/dist/interface/ha/{SettingsRemote-BOotvcOT.js → SettingsRemote-BXG8IYjf.js} +4 -4
  235. package/dist/interface/ha/{SettingsSystem-Bg11qoQX.js → SettingsSystem-_jHBUhws.js} +7 -7
  236. package/dist/interface/ha/{SettingsUsers-KpLs9Jnh.js → SettingsUsers-CzGj_RJN.js} +3 -3
  237. package/dist/interface/ha/{Terminal-D6opTHYI.js → Terminal-BP3b8IBP.js} +4 -4
  238. package/dist/interface/ha/Training-C2-6DgY0.js +1699 -0
  239. package/dist/interface/ha/{Updates-C_OvXJjd.js → Updates-BMZsEhmy.js} +4 -4
  240. package/dist/interface/ha/{VariableInput-CfaDp67S.js → VariableInput-DmI7skCD.js} +1 -1
  241. package/dist/interface/ha/{VersionsHandler-D1FVeYUZ.js → VersionsHandler-DJd4NqtD.js} +8 -8
  242. package/dist/interface/ha/{VirtualSensorCreate-DJIgMVrt.js → VirtualSensorCreate-DmtGYvAn.js} +1 -1
  243. package/dist/interface/ha/{Workers-cJMI4mYX.js → Workers-2HTPHgKV.js} +6 -6
  244. package/dist/interface/ha/{api-D2VzV4is.js → api-BelbnLQO.js} +7110 -7058
  245. package/dist/interface/ha/{api-CDawdL4p.js → api-sy4rqV2N.js} +1 -1
  246. package/dist/interface/ha/{assistant-BmDAfChm.js → assistant-C6KYXJfi.js} +1 -1
  247. package/dist/interface/ha/{auth-CvLz9C4w.js → auth-Da66mVEd.js} +1 -1
  248. package/dist/interface/ha/{automationBlueprint-BhNaeOZ1.js → automationBlueprint-hlqqM17r.js} +2 -2
  249. package/dist/interface/ha/cameraui-cards.js +1 -1
  250. package/dist/interface/ha/{cards-MQrnU0T8.js → cards-BFRRfuM7.js} +67 -67
  251. package/dist/interface/ha/{config-t_oAKFkJ.js → config-Cd7JNMpD.js} +1 -1
  252. package/dist/interface/ha/{dist-oFWkn6pD.js → dist-BybVYMVs.js} +19 -19
  253. package/dist/interface/ha/{mqtt-C20h1uze.js → mqtt-UZfptWJl.js} +1 -1
  254. package/dist/interface/ha/{notifications-Cy9DKiEn.js → notifications-DTHM8fS-.js} +1 -1
  255. package/dist/interface/ha/{plugins-jozYyBhV.js → plugins-Bwp_GfaX.js} +1 -1
  256. package/dist/interface/ha/{rooms-DyfT3cXp.js → rooms-BvaD0r0q.js} +1 -1
  257. package/dist/interface/ha/{server-hCCjQjZE.js → server-OWdtITVa.js} +2 -2
  258. package/dist/interface/ha/{types-RG0SckNR.js → types-BFJjyMZe.js} +1 -1
  259. package/dist/interface/ha/{ungrouped-BbyfoCQp.js → ungrouped-x00DHNHO.js} +219 -196
  260. package/dist/interface/ha/{updates-hUgVDgoD.js → updates-C03Qf3Il.js} +5 -5
  261. package/dist/interface/ha/{useAppVersion-wNhZDuvR.js → useAppVersion-CrMd9CC9.js} +1 -1
  262. package/dist/interface/ha/{useKeyboardInset-Cmbvb_W3.js → useKeyboardInset-DwUQCWHC.js} +1 -1
  263. package/dist/interface/ha/{useLogsSocket-y9Aex3tJ.js → useLogsSocket-C6k217mW.js} +1 -1
  264. package/dist/interface/ha/{useNavLayout-Ehb0t34k.js → useNavLayout-DhuQE024.js} +1 -1
  265. package/dist/interface/ha/{useServerRestart-CRSVcz3z.js → useServerRestart-CYaen2r6.js} +1 -1
  266. package/dist/interface/ha/{useTabSwipe-B_bseZkI.js → useTabSwipe-DAmCFlgg.js} +1 -1
  267. package/dist/interface/ha/{useUpdateChannel-C_GU6lj6.js → useUpdateChannel-Dr1EoU2X.js} +2 -2
  268. package/dist/interface/ha/{useUpdatesSocket-CYgHb7UX.js → useUpdatesSocket-C8Gmhemh.js} +1 -1
  269. package/dist/interface/ha/{useUserOptions-pVYr-s3O.js → useUserOptions-BB5wk3Bq.js} +1 -1
  270. package/dist/interface/index.html +32 -32
  271. package/dist/interface/sw.js +1 -1
  272. package/dist/server/package.json +3 -3
  273. package/dist/server/requirements.txt +1 -1
  274. package/dist/server/src/api/controllers/api.controller.js +1 -1
  275. package/dist/server/src/api/controllers/api.controller.js.map +1 -1
  276. package/dist/server/src/api/websocket/nsp/notifications.d.ts +1 -0
  277. package/dist/server/src/api/websocket/nsp/notifications.js +7 -0
  278. package/dist/server/src/api/websocket/nsp/notifications.js.map +1 -1
  279. package/dist/server/src/assistant/automation-catalog.js +12 -2
  280. package/dist/server/src/assistant/automation-catalog.js.map +1 -1
  281. package/dist/server/src/manager/notificationManager.d.ts +1 -0
  282. package/dist/server/src/manager/notificationManager.js +11 -0
  283. package/dist/server/src/manager/notificationManager.js.map +1 -1
  284. package/dist/server/src/services/config/index.d.ts +1 -0
  285. package/dist/server/src/services/config/index.js +12 -1
  286. package/dist/server/src/services/config/index.js.map +1 -1
  287. package/dist/server/src/utils/ipc.js +23 -17
  288. package/dist/server/src/utils/ipc.js.map +1 -1
  289. package/npm-shrinkwrap.json +10 -10
  290. package/package.json +3 -3
  291. package/dist/interface/assets/Assistant-BJKGIvVo.js +0 -1
  292. package/dist/interface/assets/Automations-BOP_17Ri.js +0 -2
  293. package/dist/interface/assets/Camera-C5S7eI9a.js +0 -2
  294. package/dist/interface/assets/Camview-CHxKB41T.js +0 -1
  295. package/dist/interface/assets/Config-BrDDGWpr.js +0 -2
  296. package/dist/interface/assets/Console-cIr6lYux.js +0 -1
  297. package/dist/interface/assets/CuiAssistantConversation-Bigl43Ph.js +0 -5
  298. package/dist/interface/assets/CuiAutomationRunsDialog-Ci7SWAml.js +0 -1
  299. package/dist/interface/assets/CuiBottomSheet-ViBOgklN.js +0 -1
  300. package/dist/interface/assets/CuiCameraRecordings-BB7bF67B.js +0 -1
  301. package/dist/interface/assets/CuiCameraTable-CHnQFkce.js +0 -1
  302. package/dist/interface/assets/CuiChartTable-DXY7rY3O.css +0 -1
  303. package/dist/interface/assets/CuiChartTable-dIcxGtfl.js +0 -1
  304. package/dist/interface/assets/Faces-p18jNfXl.js +0 -1
  305. package/dist/interface/assets/Floorplan-DYyEx7WO.js +0 -1
  306. package/dist/interface/assets/Metrics-ChVnC6f6.css +0 -1
  307. package/dist/interface/assets/Metrics-l3UwykCM.js +0 -12
  308. package/dist/interface/assets/Plugin-Ldj3HygQ.js +0 -1
  309. package/dist/interface/assets/PluginSearch-BiXG3Xk2.js +0 -2
  310. package/dist/interface/assets/PluginSearch-BuE7we1T.js +0 -1
  311. package/dist/interface/assets/Plugins-Csx6AXaW.js +0 -1
  312. package/dist/interface/assets/Recordings-D0KTY5cI.js +0 -1
  313. package/dist/interface/assets/SensorEdit-zs-f_o1N.js +0 -1
  314. package/dist/interface/assets/Sensors-BLAoalEt.js +0 -2
  315. package/dist/interface/assets/SettingsAccount-BsN7jGmo.js +0 -1
  316. package/dist/interface/assets/SettingsAccount-DuVyCSE-.js +0 -1
  317. package/dist/interface/assets/SettingsAppearance-DQcGbYbV.js +0 -1
  318. package/dist/interface/assets/SettingsAssistant-DViJklFd.js +0 -1
  319. package/dist/interface/assets/SettingsMqtt-JoszJJgV.js +0 -1
  320. package/dist/interface/assets/SettingsNotifications-3veSrxa_.js +0 -1
  321. package/dist/interface/assets/SettingsRemote-DUyl8k7I.js +0 -2
  322. package/dist/interface/assets/Terminal-hln2UuSR.js +0 -4
  323. package/dist/interface/assets/Training-D6lhvUf-.js +0 -1
  324. package/dist/interface/assets/Updates-BwSWt9w7.js +0 -2
  325. package/dist/interface/assets/Workers-B6b15izn.js +0 -2
  326. package/dist/interface/assets/api-C9mnOxie.js +0 -4
  327. package/dist/interface/assets/api-Cj9a6qPu.css +0 -2
  328. package/dist/interface/assets/cloudHandoff-Ba98bzeq.js +0 -1
  329. package/dist/interface/assets/main-C796FmqQ.js +0 -3
  330. package/dist/interface/assets/mqtt-DGBPptzB.js +0 -1
  331. package/dist/interface/assets/rooms-BCdm6IAx.js +0 -1
  332. package/dist/interface/assets/server-bhW2Mw4D.js +0 -1
  333. package/dist/interface/assets/ungrouped-BnQIcSQd.css +0 -1
  334. package/dist/interface/assets/ungrouped-CkIlDUwl.js +0 -1
  335. package/dist/interface/assets/useBackupRestore-xp5KhKVn.js +0 -1
  336. package/dist/interface/assets/useKeyboardInset-C0Lp0UcX.js +0 -1
  337. package/dist/interface/assets/vendor-cameraui-CK4yHsJi.js +0 -2326
  338. package/dist/interface/ha/Training-OB2KOQ7L.js +0 -1694
@@ -1,1694 +0,0 @@
1
- import { m as e } from "./ripple-ZDATPc2w.js";
2
- import { D as t, G as n, H as r, I as i, Jt as a, St as o, Tt as s, Wt as ee, Y as c, _t as l, d as u, f as d, ft as f, gt as p, kt as m, l as h, lt as g, ot as te, p as _, qt as v, r as y, rt as b, u as x, ut as ne, v as S, wt as C, x as w, xt as T, y as E, yt as D } from "./runtime-core.esm-bundler-_TfE0DWz.js";
3
- import { t as re } from "./tooltip-BDrlgLof.js";
4
- import { t as ie } from "./chevron-down-BNj8w2js.js";
5
- import { t as ae } from "./tag-mchuCAPR.js";
6
- import { $i as O, $r as oe, Ar as se, B as ce, Bi as le, Ci as k, Dn as ue, Dr as A, Dt as de, Er as fe, Jt as pe, L as me, Or as he, Ot as ge, R as j, Si as _e, Tr as ve, U as ye, bi as M, c as be, d as N, et as xe, fi as P, gt as F, hn as Se, kt as I, lr as L, m as Ce, q as R, st as we, ua as Te, ur as Ee, z as De } from "./api-D2VzV4is.js";
7
- import { C as Oe, M as z, S as ke, _ as Ae, b as je, i as Me, w as Ne } from "./intercomService-B7HkLs6z.js";
8
- import { n as Pe } from "./vue-i18n-D5EAy78K.js";
9
- import { t as Fe } from "./button-BouAFgf5.js";
10
- import { n as Ie, t as B } from "./inputicon-1w06U-Jl.js";
11
- import { t as Le } from "./inputtext-C_ygnPrC.js";
12
- import { t as Re } from "./checkbox-CAKzZcqk.js";
13
- import { t as V } from "./close-CxFbonhd.js";
14
- import { t as ze } from "./progressbar-CaUaM8Bt.js";
15
- import { t as Be } from "./information-outline-DSSRyysT.js";
16
- import { t as Ve } from "./search-BViwEHdF.js";
17
- import { n as He, t as Ue } from "./cloud-check-aaxn1VZr.js";
18
- import { u as We } from "./cards-MQrnU0T8.js";
19
- import { t as Ge } from "./trash-can-outline-CBwv40Ck.js";
20
- import { t as Ke } from "./back-filled-CaxrZv0Q.js";
21
- import { t as qe } from "./help-circle-outline-BniRuJRv.js";
22
- import { t as Je } from "./settings-lWJfHaif.js";
23
- //#region ~icons/mdi/cloud-check-outline
24
- var Ye = {
25
- viewBox: "0 0 24 24",
26
- width: "1.2em",
27
- height: "1.2em"
28
- };
29
- function Xe(e, t) {
30
- return r(), _("svg", Ye, [...t[0] ||= [x("path", {
31
- fill: "currentColor",
32
- d: "M13 19c0 .34.04.67.09 1H6.5c-1.5 0-2.81-.5-3.89-1.57C1.54 17.38 1 16.09 1 14.58q0-1.95 1.17-3.48C3.34 9.57 4 9.43 5.25 9.15c.42-1.53 1.25-2.77 2.5-3.72S10.42 4 12 4c1.95 0 3.6.68 4.96 2.04S19 9.05 19 11c1.15.13 2.1.63 2.86 1.5c.51.57.84 1.21 1 1.92A5.9 5.9 0 0 0 19 13h-2v-2c0-1.38-.5-2.56-1.46-3.54C14.56 6.5 13.38 6 12 6s-2.56.5-3.54 1.46C7.5 8.44 7 9.62 7 11h-.5c-.97 0-1.79.34-2.47 1.03c-.69.68-1.03 1.5-1.03 2.47s.34 1.79 1.03 2.5c.68.66 1.5 1 2.47 1h6.59c-.05.33-.09.66-.09 1m4.75.43l-1.59-1.59L15 19l2.75 3l4.75-4.75l-1.16-1.41z"
33
- }, null, -1)]]);
34
- }
35
- var Ze = l({
36
- name: "mdi-cloud-check-outline",
37
- render: Xe
38
- }), H = {
39
- viewBox: "0 0 24 24",
40
- width: "1.2em",
41
- height: "1.2em"
42
- };
43
- function U(e, t) {
44
- return r(), _("svg", H, [...t[0] ||= [x("path", {
45
- fill: "currentColor",
46
- d: "M6 13h12v-2H6M3 6v2h18V6M10 18h4v-2h-4z"
47
- }, null, -1)]]);
48
- }
49
- var Qe = l({
50
- name: "mdi-filter-variant",
51
- render: U
52
- }), $e = {
53
- viewBox: "0 0 24 24",
54
- width: "1.2em",
55
- height: "1.2em"
56
- };
57
- function et(e, t) {
58
- return r(), _("svg", $e, [...t[0] ||= [x("path", {
59
- fill: "currentColor",
60
- d: "M6.5 20q-2.28 0-3.89-1.57Q1 16.85 1 14.58q0-1.95 1.17-3.48q1.18-1.53 3.08-1.95q.63-2.3 2.5-3.72Q9.63 4 12 4q2.93 0 4.96 2.04Q19 8.07 19 11q1.73.2 2.86 1.5q1.14 1.28 1.14 3q0 1.88-1.31 3.19T18.5 20H13q-.82 0-1.41-.59Q11 18.83 11 18v-5.15L9.4 14.4L8 13l4-4l4 4l-1.4 1.4l-1.6-1.55V18h5.5q1.05 0 1.77-.73q.73-.72.73-1.77t-.73-1.77Q19.55 13 18.5 13H17v-2q0-2.07-1.46-3.54Q14.08 6 12 6Q9.93 6 8.46 7.46Q7 8.93 7 11h-.5q-1.45 0-2.47 1.03Q3 13.05 3 14.5T4.03 17q1.02 1 2.47 1H9v2m3-7"
61
- }, null, -1)]]);
62
- }
63
- var tt = l({
64
- name: "mdi-cloud-upload-outline",
65
- render: et
66
- }), nt = 200;
67
- async function rt(e = {}, { signal: t } = {}) {
68
- return (await O.get("/training/candidates", {
69
- params: e,
70
- signal: t
71
- })).data;
72
- }
73
- async function it(e, t) {
74
- return (await O.patch(`/training/candidates/${e}`, t)).data;
75
- }
76
- async function W(e) {
77
- await O.delete(`/training/candidates/${e}`);
78
- }
79
- async function G(e) {
80
- let t = 0;
81
- for (let n = 0; n < e.length; n += nt) {
82
- let r = await O.post("/training/candidates/submit", { ids: e.slice(n, n + nt) });
83
- t += r.data.queued;
84
- }
85
- return { queued: t };
86
- }
87
- async function at({ cursor: e, signal: t } = {}) {
88
- return (await O.get("/training/submissions", {
89
- params: e ? { cursor: e } : void 0,
90
- signal: t
91
- })).data;
92
- }
93
- async function K(e) {
94
- await O.delete(`/training/submissions/${e}`);
95
- }
96
- async function q({ signal: e } = {}) {
97
- return (await O.get("/training/settings", { signal: e })).data;
98
- }
99
- async function ot(e) {
100
- return (await O.patch("/training/settings", e)).data;
101
- }
102
- var st = class {
103
- queryClient = le();
104
- getCandidatesQuery() {
105
- return M({
106
- queryKey: ["training-candidates"],
107
- queryFn: ({ signal: e }) => rt({}, { signal: e }),
108
- staleTime: 5e3
109
- });
110
- }
111
- getSettingsQuery() {
112
- return M({
113
- queryKey: ["training-settings"],
114
- queryFn: ({ signal: e }) => q({ signal: e }),
115
- staleTime: 3e4
116
- });
117
- }
118
- patchCandidateMutation() {
119
- return k({
120
- mutationFn: ({ id: e, patch: t }) => it(e, t),
121
- onSuccess: async () => {
122
- await this.queryClient.refetchQueries({
123
- queryKey: ["training-candidates"],
124
- exact: !0
125
- });
126
- }
127
- });
128
- }
129
- deleteCandidateMutation() {
130
- return k({
131
- mutationFn: W,
132
- onSuccess: async () => {
133
- await this.queryClient.refetchQueries({
134
- queryKey: ["training-candidates"],
135
- exact: !0
136
- });
137
- }
138
- });
139
- }
140
- deleteSubmissionMutation() {
141
- return k({ mutationFn: K });
142
- }
143
- submitCandidatesMutation() {
144
- return k({
145
- mutationFn: G,
146
- onSuccess: async () => {
147
- await this.queryClient.refetchQueries({
148
- queryKey: ["training-candidates"],
149
- exact: !0
150
- });
151
- }
152
- });
153
- }
154
- patchSettingsMutation() {
155
- return k({
156
- mutationFn: ot,
157
- onSuccess: async () => {
158
- await this.queryClient.refetchQueries({
159
- queryKey: ["training-settings"],
160
- exact: !0
161
- });
162
- }
163
- });
164
- }
165
- }, ct = {
166
- viewBox: "0 0 24 24",
167
- width: "1.2em",
168
- height: "1.2em"
169
- };
170
- function J(e, t) {
171
- return r(), _("svg", ct, [...t[0] ||= [x("path", {
172
- fill: "currentColor",
173
- d: "M17 14h2v3h3v2h-3v3h-2v-3h-3v-2h3zm-6 2L2 9l9-7l9 7zm0 2.54l1-.79V18c0 .71.12 1.39.35 2L11 21.07l-9-7l1.62-1.26z"
174
- }, null, -1)]]);
175
- }
176
- var lt = l({
177
- name: "mdi-layers-plus",
178
- render: J
179
- }), ut = [
180
- "person",
181
- "vehicle",
182
- "animal",
183
- "package",
184
- "face",
185
- "license_plate"
186
- ], Y = { desktop: {
187
- maxWidth: "1280px",
188
- width: "85vw"
189
- } }, X = D({ progress: null }), dt = null, ft = null, Z = /* @__PURE__ */ new Set(), Q = /* @__PURE__ */ new Set();
190
- function pt(e, t) {
191
- for (let n of e) try {
192
- n(t);
193
- } catch {}
194
- }
195
- async function mt() {
196
- if (ft?.ready.value) try {
197
- let e = await ft.request("get-submit-progress");
198
- e.active ? X.progress = e : X.progress?.active && (X.progress = null);
199
- } catch {}
200
- }
201
- function ht() {
202
- mt(), pt(Z, {}), pt(Q, void 0);
203
- }
204
- function gt() {
205
- return ft || (dt = f(!0), dt.run(() => {
206
- let e = P("/training");
207
- ft = e, e.on("candidates-changed", (e) => pt(Z, e ?? {})), e.on("submit-progress", (e) => {
208
- X.progress = e, pt(Z, {});
209
- }), e.onReady(ht);
210
- }), ft);
211
- }
212
- function _t() {
213
- function e() {
214
- gt();
215
- }
216
- function t(e) {
217
- return Z.add(e), () => Z.delete(e);
218
- }
219
- function n(e) {
220
- return Q.add(e), () => Q.delete(e);
221
- }
222
- function r() {
223
- X.progress = null;
224
- }
225
- return {
226
- submitProgress: h(() => X.progress),
227
- connect: e,
228
- onCandidatesChanged: t,
229
- onResync: n,
230
- dismissProgress: r
231
- };
232
- }
233
- //#endregion
234
- //#region src/components/CuiDialog/templates/TrainingBoxEditor/TrainingBoxEditor.vue?vue&type=script&setup=true&lang.ts
235
- var vt = { class: "flex items-center justify-between gap-2 text-sm" }, yt = { class: "min-w-0 flex items-center gap-2" }, bt = { class: "font-medium truncate" }, xt = { class: "text-muted shrink-0" }, St = { class: "flex items-center gap-1.5 shrink-0" }, Ct = { class: "text-muted tabular-nums" }, wt = ["data-stage-zoom"], Tt = ["src"], Et = [
236
- "x",
237
- "y",
238
- "width",
239
- "height",
240
- "stroke",
241
- "fill",
242
- "fill-opacity",
243
- "stroke-width",
244
- "onPointerdown"
245
- ], Dt = ["onPointerdown"], Ot = ["cx", "cy"], kt = [
246
- "cx",
247
- "cy",
248
- "fill"
249
- ], At = [
250
- "x",
251
- "y",
252
- "width",
253
- "height",
254
- "stroke"
255
- ], jt = [
256
- "x",
257
- "y",
258
- "width",
259
- "height",
260
- "stroke",
261
- "fill"
262
- ], Mt = ["onClick"], Nt = ["data-box-label", "onPointerdown"], Pt = { class: "bbox-label-text" }, Ft = {
263
- key: 0,
264
- class: "bbox-label-confidence"
265
- }, It = {
266
- key: 1,
267
- class: "bbox-label-confidence"
268
- }, Lt = ["src"], Rt = { class: "absolute inset-0 w-full h-full" }, zt = [
269
- "x",
270
- "y",
271
- "width",
272
- "height",
273
- "stroke",
274
- "fill"
275
- ], Bt = [
276
- "x",
277
- "y",
278
- "width",
279
- "height",
280
- "stroke",
281
- "fill"
282
- ], Vt = {
283
- key: 2,
284
- class: "absolute left-2 top-1/2 -translate-y-1/2 z-[5] dark-mode"
285
- }, Ht = {
286
- key: 3,
287
- class: "absolute right-2 top-1/2 -translate-y-1/2 z-[5] dark-mode"
288
- }, Ut = {
289
- key: 0,
290
- class: "flex items-center justify-center gap-2"
291
- }, Wt = {
292
- class: "text-muted text-sm",
293
- for: "plate-text"
294
- }, Gt = { class: "flex flex-col items-center gap-0.5" }, Kt = { class: "flex items-center justify-center gap-1.5" }, qt = { class: "text-muted text-sm text-center" }, Jt = { class: "text-muted text-sm text-center" }, Yt = {
295
- key: 1,
296
- class: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 justify-center mx-auto text-sm text-muted"
297
- }, Xt = .01, Zt = .006, Qt = 26, $t = 60, en = 400, tn = 110, nn = 2, rn = 80, an = 50, on = .003, sn = .5, cn = /*#__PURE__*/ fe(/* @__PURE__ */ w({
298
- __name: "TrainingBoxEditor",
299
- props: {
300
- candidates: {},
301
- startId: {},
302
- cameraName: { type: Function },
303
- imageUrl: { type: Function },
304
- onSave: { type: Function },
305
- onDelete: { type: Function }
306
- },
307
- setup(l, { expose: f }) {
308
- let w = l, ie = t("dialogRef"), { t: O, te: oe } = Pe(), se = _e(), ce = _t(), le = [
309
- "nw",
310
- "ne",
311
- "sw",
312
- "se"
313
- ], k = /* @__PURE__ */ new Map(), A = D(/* @__PURE__ */ new Set()), de = D(/* @__PURE__ */ new Set()), fe = o(/* @__PURE__ */ new Map()), pe = 0, me = Math.max(0, w.candidates.findIndex((e) => e.id === w.startId)), he = Ce(), ge = b("rootRef"), j = b("labelMenuRef"), ve = b("stageRef"), ye = b("frameRef"), M = b("svgRef"), N = T(w.candidates[me]?.boxes.map((e) => ({ ...e })) ?? []), xe = T({
314
- w: 16,
315
- h: 9
316
- }), P = T(null), F = T(null), R = T(-1), Te = T(!1), De = T(!1), Oe = Ne("(any-pointer: fine)"), z = T(null), ke = null, Me = T(-1), Ie = T("person"), B = T(me), Re = C([]), V = T(!1), { zoom: ze, pan: Be, constraining: Ve, minimapStyle: He, minimapBoxStyle: Ue, onZoomPan: Ke, onDoubleClick: Je, onTouchStart: Ye, onTouchEnd: Xe, reset: Ze } = we(ve, ye), { height: H } = Ae(ye), U = h(() => w.candidates[B.value]), Qe = h(() => w.candidates.slice(0, B.value + 1).filter((e) => !A.has(e.id)).length), $e = h(() => w.candidates.filter((e) => !A.has(e.id)).length), et = h(() => w.candidates.slice(0, B.value).some((e) => !A.has(e.id))), tt = h(() => w.candidates.slice(B.value + 1).some((e) => !A.has(e.id))), nt = h(() => de.has(U.value.id) ? "verified" : U.value.status), rt = h(() => N.value.map((e, t) => ({
317
- box: e,
318
- i: t
319
- })).sort((e, t) => st(e) - st(t))), it = h(() => new Map(rt.value.map(({ i: e }, t) => [e, t + 1]))), W = h(() => N.value[R.value]), G = h(() => {
320
- let e = N.value[R.value];
321
- return e?.label === "license_plate" ? e : null;
322
- }), at = h(() => V.value ? Re.value.filter((e) => !N.value.some((t) => Z(t, e) >= sn)) : []), K = h(() => [...ut.map((e) => ({
323
- key: e,
324
- label: ct(e),
325
- icon: Se(e).icon,
326
- iconProps: { style: { color: Se(e).color } },
327
- active: N.value[Me.value]?.label === e,
328
- onClick: () => Sn(e)
329
- })), {
330
- key: "remove",
331
- label: O("components.training_editor.remove_box"),
332
- icon: Ge,
333
- iconProps: { class: "text-red-500" },
334
- labelProps: { class: "text-red-500" },
335
- onClick: () => wn(Me.value)
336
- }]), q = h(() => (e) => {
337
- let t = H.value || 360;
338
- return e.y * t >= Qt ? "above" : t - (e.y + e.height) * t >= Qt ? "below" : "inside";
339
- }), ot = h(() => (e) => e.x > .7);
340
- function st({ box: e, i: t }) {
341
- return t === R.value ? 2 ** 53 - 1 : fe.get(s(e)) ?? t;
342
- }
343
- function ct(e) {
344
- let t = `components.training_editor.labels.${e}`;
345
- return oe(t) ? O(t) : e;
346
- }
347
- function J(e) {
348
- return Se(e);
349
- }
350
- function Y(e) {
351
- return `${e * 100}%`;
352
- }
353
- function X(e, t) {
354
- return Y(t === "nw" || t === "sw" ? e.x : e.x + e.width);
355
- }
356
- function dt(e, t) {
357
- return Y(t === "nw" || t === "ne" ? e.y : e.y + e.height);
358
- }
359
- function ft(e) {
360
- let t = { backgroundColor: J(e.label).color };
361
- ot.value(e) ? t.right = Y(1 - e.x - e.width) : t.left = Y(e.x);
362
- let n = q.value(e);
363
- return t.top = n === "above" ? Y(e.y) : n === "below" ? Y(e.y + e.height) : `calc(${Y(e.y)} + 2px)`, t;
364
- }
365
- function Z(e, t) {
366
- let n = Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x), r = Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y);
367
- if (n <= 0 || r <= 0) return 0;
368
- let i = n * r;
369
- return i / (e.width * e.height + t.width * t.height - i);
370
- }
371
- function Q(e) {
372
- return {
373
- left: Y(e.x + e.width),
374
- top: Y(e.y + e.height),
375
- borderColor: J(e.label).color
376
- };
377
- }
378
- function pt(e) {
379
- N.value.push({
380
- ...e,
381
- confidence: 1
382
- }), R.value = N.value.length - 1;
383
- }
384
- function mt() {
385
- for (let e of at.value) N.value.push({
386
- ...e,
387
- confidence: 1
388
- });
389
- }
390
- function ht(e) {
391
- let t = e.target;
392
- t.naturalWidth && t.naturalHeight && (xe.value = {
393
- w: t.naturalWidth,
394
- h: t.naturalHeight
395
- });
396
- }
397
- function gt(e) {
398
- let t = M.value?.getBoundingClientRect();
399
- return !t || t.width === 0 || t.height === 0 ? {
400
- x: 0,
401
- y: 0
402
- } : {
403
- x: Math.min(1, Math.max(0, (e.clientX - t.left) / t.width)),
404
- y: Math.min(1, Math.max(0, (e.clientY - t.top) / t.height))
405
- };
406
- }
407
- function cn(e, t) {
408
- P.value = {
409
- ...t,
410
- moved: !1
411
- }, M.value?.setPointerCapture(e.pointerId);
412
- }
413
- function ln(e) {
414
- if (j.value?.hide(), ze.value > 1 || !e.isPrimary) return;
415
- let { x: t, y: n } = gt(e);
416
- cn(e, {
417
- mode: "draw",
418
- index: -1,
419
- startX: t,
420
- startY: n,
421
- origin: {
422
- label: Ie.value,
423
- confidence: 1,
424
- x: t,
425
- y: n,
426
- width: 0,
427
- height: 0
428
- }
429
- });
430
- }
431
- function un(e, t) {
432
- if (!t.isPrimary) return;
433
- let { x: n, y: r } = gt(t);
434
- R.value = e, cn(t, {
435
- mode: "move",
436
- index: e,
437
- startX: n,
438
- startY: r,
439
- origin: { ...N.value[e] }
440
- });
441
- }
442
- function dn(e, t, n) {
443
- if (!n.isPrimary) return;
444
- j.value?.hide();
445
- let { x: r, y: i } = gt(n);
446
- R.value = e, cn(n, {
447
- mode: "resize",
448
- index: e,
449
- corner: t,
450
- startX: r,
451
- startY: i,
452
- origin: { ...N.value[e] }
453
- });
454
- }
455
- function fn(e) {
456
- e.touches.length > 1 && P.value && (P.value = null, F.value = null, z.value = null), Ye(e);
457
- }
458
- function pn(e) {
459
- let t = P.value;
460
- if (!t) return;
461
- let { x: n, y: r } = gt(e);
462
- if (Math.hypot(n - t.startX, r - t.startY) > Zt && (t.moved = !0), e.pointerType === "touch" && t.moved && (hn(t) ? gn(e) : z.value = null), t.mode === "draw") {
463
- if (t.moved) {
464
- let e = bn(t.startX, t.startY, n, r);
465
- F.value = e.width >= Xt && e.height >= Xt ? {
466
- label: Ie.value,
467
- confidence: 1,
468
- ...e
469
- } : null;
470
- }
471
- return;
472
- }
473
- if (t.mode === "move") {
474
- if (!t.moved) return;
475
- let e = N.value[t.index];
476
- e.x = Math.min(1 - t.origin.width, Math.max(0, t.origin.x + (n - t.startX))), e.y = Math.min(1 - t.origin.height, Math.max(0, t.origin.y + (r - t.startY)));
477
- return;
478
- }
479
- let i = t.corner === "nw" || t.corner === "sw" ? t.origin.x + t.origin.width : t.origin.x, a = t.corner === "nw" || t.corner === "ne" ? t.origin.y + t.origin.height : t.origin.y;
480
- Object.assign(N.value[t.index], bn(i, a, n, r));
481
- }
482
- function mn(e) {
483
- let t = P.value;
484
- if (P.value = null, z.value = null, t) {
485
- if (t.mode === "draw") {
486
- F.value && F.value.width >= Xt && F.value.height >= Xt ? (N.value.push({ ...F.value }), R.value = N.value.length - 1) : t.moved || (R.value = -1), F.value = null;
487
- return;
488
- }
489
- t.mode === "move" && !t.moved && xn(t.index, e);
490
- }
491
- }
492
- function hn(e) {
493
- let t = M.value?.getBoundingClientRect();
494
- if (!t || t.width === 0) return !1;
495
- let n = e.mode === "draw" ? F.value : N.value[e.index];
496
- return !n || Math.max(n.width * t.width, n.height * t.height) <= an;
497
- }
498
- function gn(e) {
499
- let t = ye.value?.getBoundingClientRect(), n = ve.value?.getBoundingClientRect();
500
- if (!t || !n || t.width === 0 || t.height === 0) {
501
- z.value = null;
502
- return;
503
- }
504
- let r = tn / 2, i = Math.min(Math.max(e.clientX - n.left, 59), n.width - r - 4), a = e.clientY - n.top - rn;
505
- a - r < 4 && (a = e.clientY - n.top + rn), z.value = {
506
- x: i,
507
- y: a,
508
- frameW: t.width,
509
- frameH: t.height,
510
- tx: r - (e.clientX - t.left) * nn,
511
- ty: r - (e.clientY - t.top) * nn
512
- };
513
- }
514
- function _n(e) {
515
- let t = e instanceof HTMLElement || e instanceof SVGElement ? e : null;
516
- if (!t || ve.value?.contains(t) || t.closest(".p-dialog-header") || t.closest("button")) return !1;
517
- let n = ge.value?.closest(".p-dialog-content")?.lastElementChild;
518
- return !(n && n !== ge.value && n.contains(t));
519
- }
520
- function vn(e) {
521
- if (ke = null, e.touches.length !== 1 || !_n(e.target)) return;
522
- let t = e.touches[0];
523
- ke = {
524
- x: t.clientX,
525
- y: t.clientY,
526
- at: Date.now()
527
- };
528
- }
529
- function yn(e) {
530
- let t = ke;
531
- if (ke = null, !t || e.changedTouches.length !== 1) return;
532
- let n = e.changedTouches[0], r = n.clientX - t.x, i = n.clientY - t.y;
533
- Date.now() - t.at <= en && Math.abs(r) >= $t && Math.abs(r) > 2 * Math.abs(i) && $(r < 0 ? 1 : -1);
534
- }
535
- function bn(e, t, n, r) {
536
- return {
537
- x: Math.min(e, n),
538
- y: Math.min(t, r),
539
- width: Math.abs(n - e),
540
- height: Math.abs(r - t)
541
- };
542
- }
543
- function xn(e, t) {
544
- Me.value = e;
545
- let n = ye.value?.querySelector(`[data-box-label="${e}"]`), r = { currentTarget: ye.value ?? t.currentTarget };
546
- j.value?.toggleMenu(r, n ?? void 0);
547
- }
548
- function Sn(e) {
549
- let t = N.value[Me.value];
550
- t && (t.label = e, t.confidence = 1, Ie.value = e);
551
- }
552
- function Cn(e) {
553
- let t = N.value[R.value];
554
- t && (t.text = (e ?? "").toUpperCase().replace(/[^A-Z0-9ÄÖÜ\- ]/g, "") || void 0);
555
- }
556
- function wn(e) {
557
- e < 0 || e >= N.value.length || (N.value.splice(e, 1), R.value = -1, Me.value = -1, j.value?.hide());
558
- }
559
- function Tn(e, t = !0) {
560
- e < 0 || e >= w.candidates.length || (t && k.set(U.value.id, N.value.map((e) => ({ ...e }))), Re.value = N.value.map((e) => ({ ...e })), B.value = e, N.value = (k.get(U.value.id) ?? U.value.boxes).map((e) => ({ ...e })), F.value = null, P.value = null, z.value = null, R.value = -1, Me.value = -1, fe.clear(), j.value?.hide(), Ze());
561
- }
562
- async function En(e) {
563
- return await w.onSave(U.value.id, N.value.map((e) => ({ ...e })), e), k.set(U.value.id, N.value.map((e) => ({ ...e }))), e === "verified" && de.add(U.value.id), $(1, !1) ? null : void 0;
564
- }
565
- function $(e, t = !0) {
566
- let n = B.value + e;
567
- for (; n >= 0 && n < w.candidates.length && A.has(w.candidates[n].id);) n += e;
568
- return n < 0 || n >= w.candidates.length ? !1 : (Tn(n, t), !0);
569
- }
570
- async function Dn() {
571
- let e = U.value.id;
572
- A.add(e);
573
- try {
574
- await w.onDelete(e);
575
- } catch (t) {
576
- throw A.delete(e), t;
577
- }
578
- return k.delete(e), $(1, !1) || $(-1, !1) ? null : void 0;
579
- }
580
- function On(e) {
581
- let t = !1;
582
- for (let n of e) !A.has(n) && w.candidates.some((e) => e.id === n) && (A.add(n), k.delete(n), n === U.value.id && (t = !0));
583
- t && (se.add({
584
- severity: "warn",
585
- detail: O("components.training_editor.removed_meanwhile"),
586
- life: 4e3
587
- }), !$(1, !1) && !$(-1, !1) && ie.value.close({ status: "cancel" }));
588
- }
589
- function kn() {
590
- for (let e of [1, -1]) {
591
- let t = B.value + e;
592
- for (; t >= 0 && t < w.candidates.length && A.has(w.candidates[t].id);) t += e;
593
- let n = w.candidates[t];
594
- n && (new Image().src = w.imageUrl(n.id));
595
- }
596
- }
597
- function An(e) {
598
- N.value.length && (R.value = (R.value + e + N.value.length) % N.value.length);
599
- }
600
- function jn(e) {
601
- let t = N.value[R.value];
602
- if (!t) return;
603
- let n = ut, r = n[(n.indexOf(t.label) + e + n.length) % n.length];
604
- t.label = r, t.confidence = 1, Ie.value = r;
605
- }
606
- function Mn(e, t, n) {
607
- let r = N.value[R.value];
608
- r && (n ? (r.width = Math.min(1 - r.x, Math.max(Xt, r.width + e)), r.height = Math.min(1 - r.y, Math.max(Xt, r.height + t))) : (r.x = Math.min(1 - r.width, Math.max(0, r.x + e)), r.y = Math.min(1 - r.height, Math.max(0, r.y + t))));
609
- }
610
- async function Nn() {
611
- if (!De.value) {
612
- De.value = !0;
613
- try {
614
- let e = await En("verified");
615
- e !== null && ie.value.close({
616
- status: "confirm",
617
- data: e
618
- });
619
- } finally {
620
- De.value = !1;
621
- }
622
- }
623
- }
624
- te(B, kn, { immediate: !0 }), te(W, (e, t) => {
625
- t && t !== e && N.value.includes(t) && fe.set(s(t), --pe);
626
- }), je(window, "keydown", (e) => {
627
- if (e.target?.closest?.("input, textarea")) return;
628
- let t = {
629
- ArrowLeft: [-.003, 0],
630
- ArrowRight: [on, 0],
631
- ArrowUp: [0, -.003],
632
- ArrowDown: [0, on]
633
- };
634
- if (t[e.key]) {
635
- if (R.value >= 0) {
636
- e.preventDefault();
637
- let [n, r] = t[e.key];
638
- Mn(n, r, e.shiftKey);
639
- } else !e.repeat && e.key === "ArrowLeft" ? $(-1) : !e.repeat && e.key === "ArrowRight" && $(1);
640
- return;
641
- }
642
- e.repeat || (e.key === "Tab" ? (e.preventDefault(), An(e.shiftKey ? -1 : 1)) : e.key === "Escape" ? (R.value = -1, j.value?.hide()) : (e.key === "Delete" || e.key === "Backspace") && R.value >= 0 ? wn(R.value) : e.key === "v" || e.key === "V" ? e.shiftKey ? mt() : Re.value.length > 0 && (V.value = !V.value) : e.key === "s" || e.key === "S" ? jn(e.shiftKey ? -1 : 1) : e.key === " " && !j.value?.isOpen && (e.preventDefault(), Nn()));
643
- }), je(() => ge.value?.closest(".p-dialog-content") ?? void 0, "touchstart", vn, { passive: !0 }), je(() => ge.value?.closest(".p-dialog-content") ?? void 0, "touchend", yn, { passive: !0 }), ce.connect();
644
- let Pn = ce.onCandidatesChanged((e) => {
645
- e.removed?.length && On(e.removed);
646
- });
647
- return i(() => {
648
- Pn();
649
- }), f({
650
- isLoading: De,
651
- onConfirm: () => En("verified"),
652
- onCancel: () => Dn()
653
- }), (t, i) => {
654
- let o = ae, s = lt, f = Fe, h = We, te = L, b = Ee, C = Le, w = qe, T = re;
655
- return r(), _("div", {
656
- ref_key: "rootRef",
657
- ref: ge,
658
- class: "flex flex-col gap-3 h-full min-h-0"
659
- }, [
660
- x("div", vt, [x("div", yt, [
661
- E(o, {
662
- severity: m(nt) === "verified" ? "success" : "info",
663
- value: t.$t(`views.training.status_${m(nt)}`),
664
- class: "shrink-0"
665
- }, null, 8, ["severity", "value"]),
666
- x("span", bt, a(l.cameraName(m(U).cameraId)), 1),
667
- x("span", xt, a(m(be)(m(U).createdAt)), 1)
668
- ]), x("div", St, [m(Re).length > 0 ? ne((r(), u(f, {
669
- key: 0,
670
- severity: m(V) ? "primary" : "secondary",
671
- text: "",
672
- rounded: "",
673
- class: "cui-icon-sm",
674
- onClick: i[0] ||= (e) => V.value = !m(V)
675
- }, {
676
- icon: g(() => [E(s, { class: "w-4 h-4" })]),
677
- _: 1
678
- }, 8, ["severity"])), [[
679
- T,
680
- t.$t("components.training_editor.ghosts_toggle"),
681
- void 0,
682
- { bottom: !0 }
683
- ]]) : d("", !0), x("span", Ct, a(m(Qe)) + " / " + a(m($e)), 1)])]),
684
- x("div", {
685
- ref_key: "stageRef",
686
- ref: ve,
687
- class: "stage relative w-full bg-black rounded-lg shrink-0 overflow-hidden select-none"
688
- }, [
689
- E(m(I), {
690
- pan: m(Be),
691
- "onUpdate:pan": i[10] ||= (e) => p(Be) ? Be.value = e : null,
692
- zoom: m(ze),
693
- "onUpdate:zoom": i[11] ||= (e) => p(ze) ? ze.value = e : null,
694
- "pan-enabled": m(ze) > 1 && !m(P),
695
- "enable-control-button": !1,
696
- "dbl-click-enabled": !1,
697
- "min-zoom": 1,
698
- "max-zoom": m(5),
699
- selector: `[data-stage-zoom='${m(he)}']`,
700
- "zoom-origin": "pointer",
701
- class: ee(["absolute inset-0 flex items-center justify-center", { "zoom-constraining": m(Ve) }]),
702
- onPanned: m(Ke),
703
- onZoom: m(Ke),
704
- onDblclick: m(Je),
705
- onTouchstart: fn,
706
- onTouchend: m(Xe)
707
- }, {
708
- default: g(() => [x("div", {
709
- ref_key: "frameRef",
710
- ref: ye,
711
- "data-stage-zoom": m(he),
712
- class: "frame relative",
713
- style: v({
714
- "--ar-w": m(xe).w,
715
- "--ar-h": m(xe).h
716
- })
717
- }, [
718
- x("img", {
719
- src: l.imageUrl(m(U).id),
720
- class: "absolute inset-0 w-full h-full",
721
- draggable: "false",
722
- onLoad: ht
723
- }, null, 40, Tt),
724
- (r(), _("svg", {
725
- ref_key: "svgRef",
726
- ref: M,
727
- class: ee(["absolute inset-0 w-full h-full touch-none", m(ze) > 1 ? "cursor-grab" : "cursor-crosshair"]),
728
- onPointerdown: ln,
729
- onPointermove: pn,
730
- onPointerup: mn,
731
- onPointercancel: mn
732
- }, [
733
- (r(!0), _(y, null, n(m(rt), ({ box: t, i: a }) => (r(), _("g", { key: a }, [x("rect", {
734
- x: Y(t.x),
735
- y: Y(t.y),
736
- width: Y(t.width),
737
- height: Y(t.height),
738
- stroke: J(t.label).color,
739
- fill: J(t.label).color,
740
- "fill-opacity": a === m(R) ? .22 : .12,
741
- "stroke-width": a === m(R) ? 3.5 : 2,
742
- "vector-effect": "non-scaling-stroke",
743
- class: "cursor-move",
744
- onPointerdown: e((e) => un(a, e), ["stop"]),
745
- onTouchstart: i[1] ||= e(() => {}, ["stop"]),
746
- onMousedown: i[2] ||= e(() => {}, ["stop"])
747
- }, null, 40, Et), (r(), _(y, null, n(le, (n) => x("g", {
748
- key: n,
749
- class: "cursor-nwse-resize",
750
- onPointerdown: e((e) => dn(a, n, e), ["stop"]),
751
- onTouchstart: i[3] ||= e(() => {}, ["stop"]),
752
- onMousedown: i[4] ||= e(() => {}, ["stop"])
753
- }, [x("circle", {
754
- cx: X(t, n),
755
- cy: dt(t, n),
756
- r: "14",
757
- fill: "transparent"
758
- }, null, 8, Ot), x("circle", {
759
- cx: X(t, n),
760
- cy: dt(t, n),
761
- r: "4.5",
762
- fill: J(t.label).color
763
- }, null, 8, kt)], 40, Dt)), 64))]))), 128)),
764
- (r(!0), _(y, null, n(m(at), (e, t) => (r(), _("rect", {
765
- key: `ghost-${t}`,
766
- x: Y(e.x),
767
- y: Y(e.y),
768
- width: Y(e.width),
769
- height: Y(e.height),
770
- stroke: J(e.label).color,
771
- fill: "none",
772
- "stroke-opacity": "0.75",
773
- "stroke-dasharray": "3 5",
774
- "stroke-width": "1.5",
775
- "vector-effect": "non-scaling-stroke",
776
- class: "pointer-events-none"
777
- }, null, 8, At))), 128)),
778
- m(F) ? (r(), _("rect", {
779
- key: 0,
780
- x: Y(m(F).x),
781
- y: Y(m(F).y),
782
- width: Y(m(F).width),
783
- height: Y(m(F).height),
784
- stroke: J(m(F).label).color,
785
- fill: J(m(F).label).color,
786
- "fill-opacity": "0.1",
787
- "stroke-dasharray": "6 4",
788
- "stroke-width": "2",
789
- "vector-effect": "non-scaling-stroke"
790
- }, null, 8, jt)) : d("", !0)
791
- ], 34)),
792
- (r(!0), _(y, null, n(m(at), (n, a) => ne((r(), _("button", {
793
- key: `ghost-chip-${a}`,
794
- type: "button",
795
- class: "ghost-chip",
796
- style: v(Q(n)),
797
- onPointerdown: i[5] ||= e(() => {}, ["stop"]),
798
- onTouchstart: i[6] ||= e(() => {}, ["stop"]),
799
- onMousedown: i[7] ||= e(() => {}, ["stop"]),
800
- onClick: e((e) => pt(n), ["stop"])
801
- }, [E(h, { class: "w-3.5 h-3.5 shrink-0" }), (r(), u(c(J(n.label).icon), { class: "bbox-label-icon" }))], 44, Mt)), [[
802
- T,
803
- t.$t("components.training_editor.ghost_take"),
804
- void 0,
805
- { top: !0 }
806
- ]])), 128)),
807
- (r(!0), _(y, null, n(m(N), (t, n) => (r(), _("div", {
808
- key: `label-${n}`,
809
- class: ee(["bbox-label cursor-move", {
810
- "label-bottom": m(q)(t) === "below",
811
- "label-inside": m(q)(t) === "inside",
812
- "label-right": m(ot)(t)
813
- }]),
814
- "data-box-label": n,
815
- onPointerdown: e((e) => un(n, e), ["stop"]),
816
- onTouchstart: i[8] ||= e(() => {}, ["stop"]),
817
- onMousedown: i[9] ||= e(() => {}, ["stop"]),
818
- style: v([ft(t), { zIndex: m(it).get(n) }])
819
- }, [
820
- (r(), u(c(J(t.label).icon), { class: "bbox-label-icon" })),
821
- x("span", Pt, a(ct(t.label)), 1),
822
- t.text ? (r(), _("span", Ft, a(t.text), 1)) : t.confidence < 1 ? (r(), _("span", It, a(Math.round(t.confidence * 100)) + "%", 1)) : d("", !0)
823
- ], 46, Nt))), 128))
824
- ], 12, wt)]),
825
- _: 1
826
- }, 8, [
827
- "pan",
828
- "zoom",
829
- "pan-enabled",
830
- "max-zoom",
831
- "selector",
832
- "class",
833
- "onPanned",
834
- "onZoom",
835
- "onDblclick",
836
- "onTouchend"
837
- ]),
838
- m(He) ? (r(), _("div", {
839
- key: 0,
840
- class: "zoom-minimap",
841
- style: v(m(Ue) ?? void 0)
842
- }, [x("div", {
843
- class: "zoom-minimap-viewport",
844
- style: v(m(He))
845
- }, null, 4)], 4)) : d("", !0),
846
- m(z) ? (r(), _("div", {
847
- key: 1,
848
- class: "loupe",
849
- style: v({
850
- left: `${m(z).x}px`,
851
- top: `${m(z).y}px`
852
- })
853
- }, [x("div", {
854
- class: "loupe-content",
855
- style: v({
856
- width: `${m(z).frameW}px`,
857
- height: `${m(z).frameH}px`,
858
- transform: `translate(${m(z).tx}px, ${m(z).ty}px) scale(${nn})`
859
- })
860
- }, [x("img", {
861
- src: l.imageUrl(m(U).id),
862
- class: "absolute inset-0 w-full h-full",
863
- draggable: "false"
864
- }, null, 8, Lt), (r(), _("svg", Rt, [(r(!0), _(y, null, n(m(N), (e, t) => (r(), _("rect", {
865
- key: t,
866
- x: Y(e.x),
867
- y: Y(e.y),
868
- width: Y(e.width),
869
- height: Y(e.height),
870
- stroke: J(e.label).color,
871
- fill: J(e.label).color,
872
- "fill-opacity": "0.1",
873
- "stroke-width": "1.5"
874
- }, null, 8, zt))), 128)), m(F) ? (r(), _("rect", {
875
- key: 0,
876
- x: Y(m(F).x),
877
- y: Y(m(F).y),
878
- width: Y(m(F).width),
879
- height: Y(m(F).height),
880
- stroke: J(m(F).label).color,
881
- fill: J(m(F).label).color,
882
- "fill-opacity": "0.1",
883
- "stroke-dasharray": "4 3",
884
- "stroke-width": "1.5"
885
- }, null, 8, Bt)) : d("", !0)]))], 4), i[15] ||= x("div", { class: "loupe-crosshair" }, null, -1)], 4)) : d("", !0),
886
- m(et) ? (r(), _("div", Vt, [E(f, {
887
- severity: "secondary",
888
- rounded: "",
889
- class: "cui-icon-md opacity-60 hover:opacity-100",
890
- onClick: i[12] ||= e((e) => $(-1), ["stop"])
891
- }, {
892
- icon: g(() => [E(te, {
893
- width: "100%",
894
- height: "100%"
895
- })]),
896
- _: 1
897
- })])) : d("", !0),
898
- m(tt) ? (r(), _("div", Ht, [E(f, {
899
- severity: "secondary",
900
- rounded: "",
901
- class: "cui-icon-md opacity-60 hover:opacity-100",
902
- onClick: i[13] ||= e((e) => $(1), ["stop"])
903
- }, {
904
- icon: g(() => [E(b, {
905
- width: "100%",
906
- height: "100%"
907
- })]),
908
- _: 1
909
- })])) : d("", !0)
910
- ], 512),
911
- m(G) ? (r(), _("div", Ut, [x("label", Wt, a(t.$t("components.training_editor.plate_text")), 1), E(C, {
912
- id: "plate-text",
913
- "model-value": m(G).text ?? "",
914
- size: "small",
915
- maxlength: "12",
916
- class: "w-40 uppercase",
917
- placeholder: "ABC 1234",
918
- "onUpdate:modelValue": Cn
919
- }, null, 8, ["model-value"])])) : d("", !0),
920
- x("div", Gt, [x("div", Kt, [x("span", qt, a(t.$t("components.training_editor.hint")), 1), m(Oe) ? (r(), u(f, {
921
- key: 0,
922
- severity: "secondary",
923
- text: "",
924
- rounded: "",
925
- class: "cui-icon-sm shrink-0",
926
- onClick: i[14] ||= (e) => Te.value = !m(Te)
927
- }, {
928
- icon: g(() => [E(w, { class: "w-4 h-4" })]),
929
- _: 1
930
- })) : d("", !0)]), x("span", Jt, a(t.$t("components.training_editor.hint_wrong")), 1)]),
931
- m(Oe) && m(Te) ? (r(), _("div", Yt, [
932
- i[16] ||= x("span", null, [x("kbd", null, "Tab")], -1),
933
- x("span", null, a(t.$t("components.training_editor.sc_select")), 1),
934
- i[17] ||= S(),
935
- i[18] ||= x("span", null, [x("kbd", null, "←↑→↓")], -1),
936
- x("span", null, a(t.$t("components.training_editor.sc_move")), 1),
937
- i[19] ||= S(),
938
- i[20] ||= x("span", null, [
939
- x("kbd", null, "Shift"),
940
- S(" + "),
941
- x("kbd", null, "←↑→↓")
942
- ], -1),
943
- x("span", null, a(t.$t("components.training_editor.sc_resize")), 1),
944
- i[21] ||= S(),
945
- i[22] ||= x("span", null, [x("kbd", null, "S")], -1),
946
- x("span", null, a(t.$t("components.training_editor.sc_label")), 1),
947
- i[23] ||= S(),
948
- i[24] ||= x("span", null, [x("kbd", null, "Del")], -1),
949
- x("span", null, a(t.$t("components.training_editor.sc_delete")), 1),
950
- i[25] ||= S(),
951
- i[26] ||= x("span", null, [x("kbd", null, "V")], -1),
952
- x("span", null, a(t.$t("components.training_editor.sc_ghosts")), 1),
953
- i[27] ||= S(),
954
- i[28] ||= x("span", null, [
955
- x("kbd", null, "Shift"),
956
- S(" + "),
957
- x("kbd", null, "V")
958
- ], -1),
959
- x("span", null, a(t.$t("components.training_editor.sc_ghosts_all")), 1),
960
- i[29] ||= S(),
961
- i[30] ||= x("span", null, [x("kbd", null, "Esc")], -1),
962
- x("span", null, a(t.$t("components.training_editor.sc_deselect")), 1),
963
- i[31] ||= S(),
964
- i[32] ||= x("span", null, [x("kbd", null, "Space")], -1),
965
- x("span", null, a(t.$t("components.training_editor.sc_verify")), 1),
966
- i[33] ||= S(),
967
- i[34] ||= x("span", null, [
968
- x("kbd", null, "←"),
969
- S(" / "),
970
- x("kbd", null, "→")
971
- ], -1),
972
- x("span", null, a(t.$t("components.training_editor.sc_nav")), 1)
973
- ])) : d("", !0),
974
- E(ue, {
975
- ref_key: "labelMenuRef",
976
- ref: j,
977
- items: m(K),
978
- popover: { pt: { content: { class: "p-0! rounded-xl! overflow-hidden!" } } }
979
- }, null, 8, ["items"])
980
- ], 512);
981
- };
982
- }
983
- }), [["__scopeId", "data-v-9718b254"]]), ln = { class: "flex flex-col gap-3" }, un = {
984
- key: 0,
985
- class: "flex flex-col gap-2"
986
- }, dn = {
987
- key: 1,
988
- class: "flex flex-col items-center gap-3 py-10"
989
- }, fn = { class: "text-muted text-sm text-center max-w-sm" }, pn = {
990
- key: 2,
991
- class: "flex flex-col items-center gap-3 py-10"
992
- }, mn = { class: "text-muted text-sm text-center max-w-sm" }, hn = { class: "text-muted text-sm" }, gn = { class: "w-24 aspect-video rounded-lg overflow-hidden bg-black/5 dark:bg-black/30 shrink-0" }, _n = { class: "flex-1 min-w-0" }, vn = { class: "flex flex-wrap items-center gap-1" }, yn = { class: "text-xs text-muted mt-1" }, bn = {
993
- key: 0,
994
- class: "flex justify-center py-2"
995
- }, xn = /* @__PURE__ */ w({
996
- __name: "TrainingSubmissions",
997
- setup(e) {
998
- let t = new st(), { t: o, te: s } = Pe(), ee = _e(), c = _t(), l = t.deleteSubmissionMutation(), f = T(""), p = T([]), h = T(0), S = T(), C = T(!0), w = T(!1), D = T(!1), ie = b("loadMoreRef");
999
- function O(e) {
1000
- let t = {};
1001
- for (let n of e.labels) t[n.label] = (t[n.label] ?? 0) + 1;
1002
- return t;
1003
- }
1004
- function oe(e) {
1005
- let t = `components.training_editor.labels.${e}`;
1006
- return s(t) ? o(t) : e;
1007
- }
1008
- async function se() {
1009
- C.value = p.value.length === 0;
1010
- try {
1011
- let e = await at();
1012
- p.value = e.items, h.value = e.total ?? e.items.length, S.value = e.nextCursor, D.value = !1;
1013
- } catch {
1014
- D.value = !0;
1015
- } finally {
1016
- C.value = !1;
1017
- }
1018
- }
1019
- async function ce() {
1020
- let e = S.value;
1021
- if (e && !w.value) {
1022
- w.value = !0;
1023
- try {
1024
- let t = await at({ cursor: e }), n = new Set(p.value.map((e) => e.id));
1025
- p.value.push(...t.items.filter((e) => !n.has(e.id))), S.value = t.nextCursor;
1026
- } catch (e) {
1027
- ee.add({
1028
- severity: "error",
1029
- detail: e?.message ?? String(e),
1030
- life: 5e3
1031
- });
1032
- } finally {
1033
- w.value = !1;
1034
- }
1035
- }
1036
- }
1037
- async function le(e) {
1038
- f.value = e;
1039
- try {
1040
- await l.mutateAsync(e), p.value = p.value.filter((t) => t.id !== e), h.value = Math.max(0, h.value - 1);
1041
- } catch (e) {
1042
- ee.add({
1043
- severity: "error",
1044
- detail: e?.message ?? String(e),
1045
- life: 5e3
1046
- });
1047
- } finally {
1048
- f.value = "";
1049
- }
1050
- }
1051
- ke(ie, ([e]) => {
1052
- e?.isIntersecting && ce();
1053
- }), te(() => c.submitProgress.value?.active, (e, t) => {
1054
- t && !e && se();
1055
- });
1056
- let k = c.onResync(() => {
1057
- se();
1058
- });
1059
- return i(() => {
1060
- k();
1061
- }), se(), (e, t) => {
1062
- let i = Te, o = He, s = me, ee = ve, c = ae, te = Ge, b = Fe, T = xe, se = re;
1063
- return r(), _("div", ln, [m(C) ? (r(), _("div", un, [(r(), _(y, null, n(4, (e) => E(i, {
1064
- key: e,
1065
- height: "72px",
1066
- "border-radius": "12px"
1067
- })), 64))])) : m(D) ? (r(), _("div", dn, [E(o, { class: "w-10 h-10 text-muted" }), x("span", fn, a(e.$t("components.training_submissions.load_failed")), 1)])) : m(p).length ? (r(), _(y, { key: 3 }, [
1068
- x("span", hn, a(e.$t("components.training_submissions.count", m(h))), 1),
1069
- (r(!0), _(y, null, n(m(p), (t) => (r(), _("div", {
1070
- key: t.id,
1071
- class: "cui-card h-auto! shrink-0 p-2 flex items-center gap-3"
1072
- }, [
1073
- x("div", gn, [E(ee, {
1074
- src: t.imageUrl,
1075
- "image-container-class": "w-full h-full",
1076
- "image-style": { objectFit: "cover" }
1077
- }, null, 8, ["src"])]),
1078
- x("div", _n, [x("div", vn, [(r(!0), _(y, null, n(O(t), (e, t) => (r(), _("span", {
1079
- key: t,
1080
- class: "px-1.5 py-0.5 rounded text-xs font-medium text-white",
1081
- style: v({ backgroundColor: m(Se)(String(t)).color })
1082
- }, a(oe(String(t))) + " ×" + a(e), 5))), 128))]), x("div", yn, a(m(be)(new Date(t.createdAt).getTime())), 1)]),
1083
- E(c, {
1084
- severity: t.usedInWave ? "success" : "info",
1085
- value: t.usedInWave ? e.$t("components.training_submissions.status_trained") : e.$t("components.training_submissions.status_pool"),
1086
- class: "shrink-0"
1087
- }, null, 8, ["severity", "value"]),
1088
- ne((r(), u(b, {
1089
- severity: "danger",
1090
- text: "",
1091
- rounded: "",
1092
- class: "cui-icon-sm shrink-0",
1093
- loading: m(l).isPending.value && m(f) === t.id,
1094
- onClick: (e) => le(t.id)
1095
- }, {
1096
- icon: g(() => [E(te, {
1097
- width: "100%",
1098
- height: "100%"
1099
- })]),
1100
- _: 1
1101
- }, 8, ["loading", "onClick"])), [[
1102
- se,
1103
- e.$t("components.training_submissions.delete"),
1104
- void 0,
1105
- { left: !0 }
1106
- ]])
1107
- ]))), 128)),
1108
- m(w) ? (r(), _("div", bn, [E(T, { class: "w-5 h-5 text-primary" })])) : m(S) ? (r(), _("div", {
1109
- key: 1,
1110
- ref_key: "loadMoreRef",
1111
- ref: ie,
1112
- class: "h-px"
1113
- }, null, 512)) : d("", !0)
1114
- ], 64)) : (r(), _("div", pn, [E(s, { class: "w-10 h-10 text-muted" }), x("span", mn, a(e.$t("components.training_submissions.empty")), 1)]))]);
1115
- };
1116
- }
1117
- }), Sn = { desktop: {
1118
- maxWidth: "720px",
1119
- width: "90vw"
1120
- } }, Cn = { class: "flex flex-col h-full min-h-0" }, wn = {
1121
- key: 0,
1122
- class: "page-title"
1123
- }, Tn = { class: "font-semibold text-xl truncate" }, En = { class: "flex gap-2 mb-4" }, $ = {
1124
- key: 1,
1125
- class: "cui-card h-auto! shrink-0 px-3 py-2 mb-4 flex items-center gap-3"
1126
- }, Dn = { class: "flex-1 min-w-0" }, On = { class: "text-sm" }, kn = { class: "flex-1 text-sm" }, An = {
1127
- key: 2,
1128
- class: "cui-card h-auto! shrink-0 px-3 py-2 mb-4 flex items-center gap-3"
1129
- }, jn = { class: "flex-1 text-sm" }, Mn = { class: "p-3" }, Nn = {
1130
- key: 1,
1131
- class: "flex h-full flex-col items-center justify-center w-full gap-4 py-16"
1132
- }, Pn = { class: "text-muted text-sm text-center max-w-md" }, Fn = { class: "relative flex-1 min-h-0 overflow-hidden bg-black/5 dark:bg-black/30" }, In = { class: "absolute top-1.5 left-1.5 flex flex-wrap gap-1" }, Ln = {
1133
- key: 0,
1134
- class: "absolute bottom-1.5 left-1.5"
1135
- }, Rn = {
1136
- key: 1,
1137
- class: "absolute top-1.5 right-1.5 dark-mode"
1138
- }, zn = { class: "flex items-center justify-between gap-2" }, Bn = { class: "flex items-center gap-2 min-w-0" }, Vn = { class: "min-w-0" }, Hn = { class: "font-medium truncate" }, Un = { class: "text-xs text-muted" }, Wn = 40, Gn = /*#__PURE__*/ fe(/* @__PURE__ */ w({
1139
- __name: "Training",
1140
- setup(t) {
1141
- let o = new pe(), s = new st(), { t: c, te: l } = Pe(), f = F(), C = _e(), { smBreakpoint: w } = se(), D = s.getCandidatesQuery(), O = s.getSettingsQuery(), le = s.patchCandidateMutation(), k = s.deleteCandidateMutation(), fe = s.patchSettingsMutation(), me = s.submitCandidatesMutation(), M = _t(), { data: P } = o.getCamerasQuery({
1142
- page: 1,
1143
- pageSize: -1
1144
- }), I = T(""), L = Oe("cui-training-status-filter", "all"), Ce = T(Wn), we = b("statusMenuRef"), Ee = b("cameraMenuRef"), Ae = b("settingsMenuRef"), je = b("loadMoreRef"), Ne = b("scrollRef"), { y: We } = z(Ne), qe = h(() => ({ gridTemplateColumns: `repeat(auto-fill, minmax(${w.value ? "220px" : "260px"}, 1fr))` })), Ye = h(() => {
1145
- let e = [...new Set((D.data.value ?? []).map((e) => Q(e.cameraId)))].sort((e, t) => e.localeCompare(t));
1146
- return [{
1147
- key: "all",
1148
- label: c("views.training.all_cameras"),
1149
- active: I.value === "",
1150
- onClick: () => {
1151
- I.value = "";
1152
- }
1153
- }, ...e.map((e) => ({
1154
- key: e,
1155
- label: e,
1156
- active: I.value === e,
1157
- onClick: () => {
1158
- I.value = e;
1159
- }
1160
- }))];
1161
- }), Xe = h(() => [{
1162
- key: "collect",
1163
- label: c("views.training.collection_enabled"),
1164
- description: c("views.training.collection_hint"),
1165
- toggle: !0,
1166
- toggleState: O.data.value?.enabled ?? !0,
1167
- onClick: () => {
1168
- Tt(!(O.data.value?.enabled ?? !0));
1169
- }
1170
- }]), H = h(() => {
1171
- let e = I.value.trim().toLowerCase();
1172
- return e ? (D.data.value ?? []).filter((t) => Q(t.cameraId).toLowerCase().includes(e)) : D.data.value ?? [];
1173
- }), U = h(() => L.value === "all" ? H.value : H.value.filter((e) => e.status === L.value)), $e = h(() => {
1174
- let e = {
1175
- all: H.value.length,
1176
- new: 0,
1177
- verified: 0
1178
- };
1179
- for (let t of H.value) e[t.status]++;
1180
- return e;
1181
- }), et = h(() => [
1182
- "all",
1183
- "new",
1184
- "verified"
1185
- ].map((e) => ({
1186
- key: e,
1187
- label: c(`views.training.status_${e}`),
1188
- badge: String($e.value[e]),
1189
- active: L.value === e,
1190
- onClick: () => {
1191
- L.value = e;
1192
- }
1193
- }))), nt = h(() => L.value !== "all" || I.value.trim() !== ""), rt = h(() => U.value.slice(0, Ce.value)), it = h(() => U.value.length > rt.value.length), W = h(() => (D.data.value ?? []).filter((e) => K(e)).length), G = h(() => M.submitProgress.value ? M.submitProgress.value : W.value > 0 ? {
1194
- active: !0,
1195
- total: W.value,
1196
- done: 0,
1197
- failed: 0
1198
- } : null), at = h(() => U.value.filter((e) => !K(e)));
1199
- function K(e) {
1200
- return e.upload === "queued" || e.upload === "uploading";
1201
- }
1202
- let { selectionMode: q, selectedIds: ot, allSelected: ct, bulkBusy: J, enterSelectionMode: lt, exitSelectionMode: ut, toggleSelectAll: X, toggleSelection: dt } = j(at, (e) => e.id), ft = h(() => [...ot.value].filter((e) => D.data.value?.find((t) => t.id === e)?.status === "verified")), Z = h(() => H.value.filter((e) => e.status === "verified" && !K(e)).map((e) => e.id));
1203
- function Q(e) {
1204
- return P.value?.result?.find((t) => t._id === e)?.name ?? e;
1205
- }
1206
- function pt(e) {
1207
- return N(`/api/training/candidates/${e}/image`) ?? "";
1208
- }
1209
- function mt(e) {
1210
- let t = `components.training_editor.labels.${e}`;
1211
- return l(t) ? c(t) : e;
1212
- }
1213
- function ht(e) {
1214
- let t = {};
1215
- for (let n of e.boxes) t[n.label] = (t[n.label] ?? 0) + 1;
1216
- return t;
1217
- }
1218
- function gt(e) {
1219
- return e === "verified" ? "success" : "info";
1220
- }
1221
- function vt() {
1222
- Ce.value += Wn;
1223
- }
1224
- function yt(e) {
1225
- if (!K(e)) {
1226
- if (q.value) {
1227
- dt(e.id);
1228
- return;
1229
- }
1230
- bt(e);
1231
- }
1232
- }
1233
- function bt(e) {
1234
- f.openComponentDialog(cn, {
1235
- data: {
1236
- title: c("views.training.title"),
1237
- cancelText: c("components.form.button.remove"),
1238
- confirmText: c("components.training_editor.verify"),
1239
- cancelButtonProps: { severity: "danger" },
1240
- contentProps: {
1241
- candidates: U.value.map((e) => ({ ...e })),
1242
- startId: e.id,
1243
- cameraName: Q,
1244
- imageUrl: pt,
1245
- onSave: async (e, t, n) => {
1246
- await le.mutateAsync({
1247
- id: e,
1248
- patch: {
1249
- boxes: t,
1250
- status: n
1251
- }
1252
- });
1253
- },
1254
- onDelete: async (e) => {
1255
- await k.mutateAsync(e);
1256
- }
1257
- }
1258
- },
1259
- dialogSize: Y
1260
- });
1261
- }
1262
- function xt() {
1263
- f.openComponentDialog(xn, {
1264
- data: {
1265
- title: c("views.training.submissions"),
1266
- hideConfirmButton: !0,
1267
- cancelText: c("components.form.button.close"),
1268
- contentProps: {}
1269
- },
1270
- dialogSize: Sn
1271
- });
1272
- }
1273
- function St(e) {
1274
- e.length && !me.isPending.value && f.openTextDialog({
1275
- data: {
1276
- title: c("components.dialog.title.confirm"),
1277
- contentText: c("views.training.submit_confirm", { count: e.length }),
1278
- confirmText: c("views.training.submit")
1279
- },
1280
- onConfirm: async () => {
1281
- try {
1282
- await me.mutateAsync(e), ut();
1283
- } catch (e) {
1284
- C.add({
1285
- severity: "error",
1286
- detail: e?.message ?? String(e),
1287
- life: 8e3
1288
- });
1289
- }
1290
- }
1291
- });
1292
- }
1293
- function Ct() {
1294
- let e = [...ot.value];
1295
- e.length && !J.value && f.openTextDialog({
1296
- data: {
1297
- title: c("components.dialog.title.confirm"),
1298
- contentText: c("views.training.delete_selected_confirm", { count: e.length }),
1299
- confirmText: c("components.form.button.remove"),
1300
- confirmButtonProps: { severity: "danger" }
1301
- },
1302
- onConfirm: async () => {
1303
- J.value = !0;
1304
- try {
1305
- for (let t of e) await k.mutateAsync(t);
1306
- ut(), C.add({
1307
- severity: "success",
1308
- detail: c("views.training.delete_selected_done", { count: e.length }),
1309
- life: 5e3
1310
- });
1311
- } catch (e) {
1312
- C.add({
1313
- severity: "error",
1314
- detail: e?.message ?? String(e),
1315
- life: 5e3
1316
- });
1317
- } finally {
1318
- J.value = !1;
1319
- }
1320
- }
1321
- });
1322
- }
1323
- async function wt(e) {
1324
- await k.mutateAsync(e.id);
1325
- }
1326
- async function Tt(e) {
1327
- await fe.mutateAsync({ enabled: e });
1328
- }
1329
- te([I, L], () => {
1330
- Ce.value = Wn;
1331
- }), ke(je, ([e]) => {
1332
- e?.isIntersecting && vt();
1333
- }), M.connect();
1334
- let Et = M.onCandidatesChanged(() => {
1335
- D.refetch();
1336
- });
1337
- return i(() => {
1338
- Et();
1339
- }), (t, i) => {
1340
- let o = Ke, s = Fe, l = R, f = Ve, h = B, te = Le, b = Ie, C = Qe, T = de, O = ie, se = ge, le = Ze, k = Je, fe = xe, pe = ze, j = He, _e = Ue, N = V, P = Be, F = Te, Ce = oe, Oe = ve, z = ae, ke = Ge, Pe = Re, $e = Me, W = A, at = he, st = re;
1341
- return r(), _("div", Cn, [
1342
- m(w) ? d("", !0) : (r(), _("h1", wn, a(t.$t("views.training.title")), 1)),
1343
- E(l, { position: "left" }, {
1344
- default: g(() => [E(s, {
1345
- severity: "secondary",
1346
- text: "",
1347
- class: "cui-button p-2 text-color non-draggable-region",
1348
- onClick: i[0] ||= (e) => t.$router.push("/menu")
1349
- }, {
1350
- icon: g(() => [E(o, { class: "w-6 h-6" })]),
1351
- _: 1
1352
- })]),
1353
- _: 1
1354
- }),
1355
- E(l, { position: "center" }, {
1356
- default: g(() => [x("span", Tn, a(t.$t("views.training.title")), 1)]),
1357
- _: 1
1358
- }),
1359
- x("div", En, [
1360
- E(se, { class: "flex-1" }, {
1361
- default: g(() => [
1362
- E(b, { class: "flex-1" }, {
1363
- default: g(() => [E(h, null, {
1364
- default: g(() => [E(f, { class: "w-4 h-4" })]),
1365
- _: 1
1366
- }), E(te, {
1367
- modelValue: m(I),
1368
- "onUpdate:modelValue": i[1] ||= (e) => p(I) ? I.value = e : null,
1369
- placeholder: m(c)("views.training.search"),
1370
- class: "w-full"
1371
- }, null, 8, ["modelValue", "placeholder"])]),
1372
- _: 1
1373
- }),
1374
- E(T, null, {
1375
- default: g(() => [E(s, {
1376
- severity: "secondary",
1377
- text: "",
1378
- class: ee(m(L) === "all" ? "text-color" : "text-primary"),
1379
- onClick: i[2] ||= (e) => m(we)?.toggleMenu(e)
1380
- }, {
1381
- icon: g(() => [E(C, { class: "w-4 h-4" })]),
1382
- _: 1
1383
- }, 8, ["class"])]),
1384
- _: 1
1385
- }),
1386
- E(T, null, {
1387
- default: g(() => [E(s, {
1388
- severity: "secondary",
1389
- text: "",
1390
- class: "text-color",
1391
- onClick: i[3] ||= (e) => m(Ee)?.toggleMenu(e)
1392
- }, {
1393
- icon: g(() => [E(O, { class: ee(["w-4 h-4 transform transition-transform duration-300", { "rotate-180": m(Ee)?.isOpen }]) }, null, 8, ["class"])]),
1394
- _: 1
1395
- })]),
1396
- _: 1
1397
- })
1398
- ]),
1399
- _: 1
1400
- }),
1401
- ne((r(), u(s, {
1402
- severity: "secondary",
1403
- outlined: "",
1404
- class: "cui-button shrink-0",
1405
- onClick: xt
1406
- }, {
1407
- icon: g(() => [E(le, { class: "w-4.5 h-4.5" })]),
1408
- _: 1
1409
- })), [[
1410
- st,
1411
- { value: t.$t("views.training.submissions") },
1412
- void 0,
1413
- { left: !0 }
1414
- ]]),
1415
- ne((r(), u(s, {
1416
- severity: "secondary",
1417
- outlined: "",
1418
- class: "cui-button shrink-0",
1419
- onClick: i[4] ||= (e) => m(Ae)?.toggleMenu(e)
1420
- }, {
1421
- icon: g(() => [E(k, { class: "w-4.5 h-4.5" })]),
1422
- _: 1
1423
- })), [[
1424
- st,
1425
- { value: t.$t("views.training.collection") },
1426
- void 0,
1427
- { left: !0 }
1428
- ]])
1429
- ]),
1430
- m(G) ? (r(), _("div", $, [m(G).active ? (r(), _(y, { key: 0 }, [E(fe, { class: "w-4 h-4 text-primary shrink-0" }), x("div", Dn, [x("div", On, a(t.$t("views.training.upload_progress", {
1431
- done: m(G).done + m(G).failed,
1432
- total: m(G).total
1433
- })), 1), E(pe, {
1434
- value: m(G).total ? Math.round((m(G).done + m(G).failed) / m(G).total * 100) : 0,
1435
- "show-value": !1,
1436
- style: { height: "6px" },
1437
- class: "mt-1.5"
1438
- }, null, 8, ["value"])])], 64)) : (r(), _(y, { key: 1 }, [
1439
- m(G).failed ? (r(), u(j, {
1440
- key: 0,
1441
- class: "w-5 h-5 text-red-500 shrink-0"
1442
- })) : (r(), u(_e, {
1443
- key: 1,
1444
- class: "w-5 h-5 text-green-500 shrink-0"
1445
- })),
1446
- x("span", kn, [S(a(t.$t("views.training.submit_done", m(G).done)), 1), m(G).failed ? (r(), _(y, { key: 0 }, [S(" · " + a(t.$t("views.training.upload_failed_summary", { count: m(G).failed })), 1)], 64)) : d("", !0)]),
1447
- E(s, {
1448
- severity: "secondary",
1449
- text: "",
1450
- rounded: "",
1451
- class: "cui-icon-sm shrink-0",
1452
- onClick: i[5] ||= (e) => m(M).dismissProgress()
1453
- }, {
1454
- icon: g(() => [E(N, { class: "w-4 h-4" })]),
1455
- _: 1
1456
- })
1457
- ], 64))])) : m(H).length && !m(Z).length ? (r(), _("div", An, [E(P, { class: "w-5 h-5 text-primary shrink-0" }), x("span", jn, a(t.$t("views.training.verify_hint")), 1)])) : d("", !0),
1458
- x("div", {
1459
- ref_key: "scrollRef",
1460
- ref: Ne,
1461
- class: "flex-1 min-h-0 overflow-y-auto overscroll-contain"
1462
- }, [m(D).isLoading.value && !m(D).data.value ? (r(), _("div", {
1463
- key: 0,
1464
- class: "grid w-full gap-3 p-px",
1465
- style: v(m(qe))
1466
- }, [(r(), _(y, null, n(8, (e) => x("div", {
1467
- key: e,
1468
- class: "cui-card overflow-hidden"
1469
- }, [E(F, {
1470
- class: "aspect-video",
1471
- width: "100%",
1472
- height: "100%"
1473
- }), x("div", Mn, [E(F, {
1474
- height: "14px",
1475
- width: "70%",
1476
- class: "mb-1"
1477
- }), E(F, {
1478
- height: "12px",
1479
- width: "40%"
1480
- })])])), 64))], 4)) : m(U).length === 0 ? (r(), _("div", Nn, [E(Ce, { class: "w-12 h-12 text-muted" }), x("span", Pn, a(t.$t(m(nt) ? "views.training.no_matches" : "views.training.no_candidates")), 1)])) : (r(), _(y, { key: 2 }, [x("div", {
1481
- class: "grid w-full gap-3 p-px",
1482
- style: v(m(qe))
1483
- }, [(r(!0), _(y, null, n(m(rt), (o) => (r(), u($e, {
1484
- key: o.id,
1485
- class: "cui-card cui-training-card overflow-hidden transition-shadow cursor-pointer hover:shadow-md aspect-[1.17] flex flex-col",
1486
- pt: {
1487
- header: { class: "flex-1 min-h-0 flex" },
1488
- body: {
1489
- class: "shrink-0",
1490
- style: "height: auto"
1491
- }
1492
- },
1493
- onClick: (e) => yt(o)
1494
- }, {
1495
- header: g(() => [x("div", Fn, [
1496
- E(Oe, {
1497
- class: "absolute inset-0",
1498
- src: pt(o.id),
1499
- alt: Q(o.cameraId),
1500
- "image-container-class": "w-full h-full",
1501
- "image-style": { objectFit: "cover" }
1502
- }, null, 8, ["src", "alt"]),
1503
- x("div", In, [(r(!0), _(y, null, n(ht(o), (e, t) => (r(), _("span", {
1504
- key: t,
1505
- class: "px-1.5 py-0.5 rounded text-xs font-medium text-white",
1506
- style: v({ backgroundColor: m(Se)(String(t)).color })
1507
- }, a(mt(String(t))) + " ×" + a(e), 5))), 128))]),
1508
- o.upload ? (r(), _("div", Ln, [o.upload === "failed" ? ne((r(), u(z, {
1509
- key: 0,
1510
- severity: "danger",
1511
- value: t.$t("views.training.upload_failed")
1512
- }, null, 8, ["value"])), [[
1513
- st,
1514
- o.uploadError,
1515
- void 0,
1516
- { top: !0 }
1517
- ]]) : o.upload === "uploading" ? (r(), u(z, {
1518
- key: 1,
1519
- severity: "info",
1520
- value: t.$t("views.training.upload_uploading")
1521
- }, null, 8, ["value"])) : (r(), u(z, {
1522
- key: 2,
1523
- severity: "secondary",
1524
- value: t.$t("views.training.upload_queued")
1525
- }, null, 8, ["value"]))])) : d("", !0),
1526
- !m(q) && !K(o) ? (r(), _("div", Rn, [ne((r(), u(s, {
1527
- severity: "secondary",
1528
- rounded: "",
1529
- size: "small",
1530
- class: "cui-icon-sm text-white",
1531
- onClick: e((e) => wt(o), ["stop"])
1532
- }, {
1533
- icon: g(() => [E(ke, {
1534
- width: "100%",
1535
- height: "100%"
1536
- })]),
1537
- _: 1
1538
- }, 8, ["onClick"])), [[
1539
- st,
1540
- t.$t("views.training.delete_candidate"),
1541
- void 0,
1542
- { top: !0 }
1543
- ]])])) : d("", !0)
1544
- ])]),
1545
- content: g(() => [x("div", zn, [x("div", Bn, [m(q) && !K(o) ? (r(), u(Pe, {
1546
- key: 0,
1547
- "model-value": m(ot).has(o.id),
1548
- binary: "",
1549
- size: "small",
1550
- onClick: i[6] ||= e(() => {}, ["stop"]),
1551
- "onUpdate:modelValue": (e) => m(dt)(o.id)
1552
- }, null, 8, ["model-value", "onUpdate:modelValue"])) : d("", !0), x("div", Vn, [x("div", Hn, a(Q(o.cameraId)), 1), x("div", Un, a(m(be)(o.createdAt)), 1)])]), E(z, {
1553
- severity: gt(o.status),
1554
- value: t.$t(`views.training.status_${o.status}`)
1555
- }, null, 8, ["severity", "value"])])]),
1556
- _: 2
1557
- }, 1032, ["onClick"]))), 128))], 4), m(it) ? (r(), _("div", {
1558
- key: 0,
1559
- ref_key: "loadMoreRef",
1560
- ref: je,
1561
- class: "h-px"
1562
- }, null, 512)) : d("", !0)], 64))], 512),
1563
- m(U).length || m(q) ? (r(), u(at, {
1564
- key: 3,
1565
- "force-visible": m(q),
1566
- "scroll-y": m(We)
1567
- }, {
1568
- default: g(() => [m(q) ? (r(), _(y, { key: 1 }, [
1569
- E(W, {
1570
- grouped: "",
1571
- "tooltip-props": { value: t.$t("components.form.tooltip.cancel_selection") },
1572
- "button-props": { severity: "secondary" },
1573
- icon: m(V),
1574
- "icon-props": {
1575
- width: "100%",
1576
- height: "100%"
1577
- },
1578
- onClick: m(ut)
1579
- }, null, 8, [
1580
- "tooltip-props",
1581
- "icon",
1582
- "onClick"
1583
- ]),
1584
- E(W, {
1585
- grouped: "",
1586
- "tooltip-props": { value: m(ct) ? t.$t("views.training.deselect_all") : t.$t("views.training.select_all") },
1587
- "button-props": { severity: m(ct) ? "primary" : "secondary" },
1588
- icon: m(ye),
1589
- "icon-props": {
1590
- width: "100%",
1591
- height: "100%"
1592
- },
1593
- onClick: m(X)
1594
- }, null, 8, [
1595
- "tooltip-props",
1596
- "button-props",
1597
- "icon",
1598
- "onClick"
1599
- ]),
1600
- E(W, {
1601
- grouped: "",
1602
- "tooltip-props": { value: t.$t("views.training.submit_selected") },
1603
- "button-props": { disabled: !m(ft).length || m(me).isPending.value },
1604
- icon: m(tt),
1605
- "icon-props": {
1606
- width: "100%",
1607
- height: "100%"
1608
- },
1609
- onClick: i[8] ||= (e) => St(m(ft))
1610
- }, null, 8, [
1611
- "tooltip-props",
1612
- "button-props",
1613
- "icon"
1614
- ]),
1615
- E(W, {
1616
- grouped: "",
1617
- "tooltip-props": { value: t.$t("views.training.delete_selected") },
1618
- "button-props": {
1619
- severity: "danger",
1620
- disabled: !m(ot).size || m(J)
1621
- },
1622
- icon: m(ce),
1623
- "icon-props": {
1624
- width: "100%",
1625
- height: "100%"
1626
- },
1627
- onClick: Ct
1628
- }, null, 8, [
1629
- "tooltip-props",
1630
- "button-props",
1631
- "icon"
1632
- ])
1633
- ], 64)) : (r(), _(y, { key: 0 }, [E(W, {
1634
- grouped: "",
1635
- "tooltip-props": { value: t.$t("views.training.select") },
1636
- "button-props": { severity: "secondary" },
1637
- icon: m(De),
1638
- "icon-props": {
1639
- width: "100%",
1640
- height: "100%"
1641
- },
1642
- onClick: m(lt)
1643
- }, null, 8, [
1644
- "tooltip-props",
1645
- "icon",
1646
- "onClick"
1647
- ]), E(W, {
1648
- grouped: "",
1649
- "tooltip-props": { value: m(Z).length ? t.$t("views.training.submit_ready", m(Z).length) : t.$t("views.training.submit_disabled") },
1650
- "button-props": {
1651
- class: "text-white",
1652
- disabled: !m(Z).length || m(me).isPending.value
1653
- },
1654
- icon: m(tt),
1655
- "icon-props": {
1656
- width: "26px",
1657
- height: "26px"
1658
- },
1659
- onClick: i[7] ||= (e) => St(m(Z))
1660
- }, null, 8, [
1661
- "tooltip-props",
1662
- "button-props",
1663
- "icon"
1664
- ])], 64))]),
1665
- _: 1
1666
- }, 8, ["force-visible", "scroll-y"])) : d("", !0),
1667
- E(ue, {
1668
- ref_key: "statusMenuRef",
1669
- ref: we,
1670
- items: m(et),
1671
- popover: { pt: { content: { class: "p-0! rounded-xl! overflow-hidden!" } } }
1672
- }, null, 8, ["items"]),
1673
- E(ue, {
1674
- ref_key: "cameraMenuRef",
1675
- ref: Ee,
1676
- items: m(Ye),
1677
- popover: { pt: { content: { class: "p-0! rounded-xl! overflow-hidden!" } } }
1678
- }, null, 8, ["items"]),
1679
- E(ue, {
1680
- ref_key: "settingsMenuRef",
1681
- ref: Ae,
1682
- items: m(Xe),
1683
- "auto-hide": !1,
1684
- popover: { pt: {
1685
- root: { class: "w-[22rem]" },
1686
- content: { class: "p-0! rounded-xl! overflow-hidden!" }
1687
- } }
1688
- }, null, 8, ["items"])
1689
- ]);
1690
- };
1691
- }
1692
- }), [["__scopeId", "data-v-5b04f6ed"]]);
1693
- //#endregion
1694
- export { Gn as default };