@camera.ui/server 2.2.2 → 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/dist/interface/assets/{404-bSMSPWcp.js → 404-D0S6IGok.js} +1 -1
  2. package/dist/interface/assets/{About-DqMxC4AO.js → About-DAw9u8ZY.js} +1 -1
  3. package/dist/interface/assets/{Assistant-CIHF-bHs.js → Assistant-Gi6_YkEY.js} +1 -1
  4. package/dist/interface/assets/{Automation-CUDypjZw.js → Automation-6eFKPJPu.js} +3 -3
  5. package/dist/interface/assets/{AutomationImport-Cr14tF-Q.js → AutomationImport-95PfbPvG.js} +2 -2
  6. package/dist/interface/assets/{AutomationStore-BnZgfI9i.js → AutomationStore-BHxzzx7a.js} +2 -2
  7. package/dist/interface/assets/AutomationStoreDetail-DEVlRllt.js +2 -0
  8. package/dist/interface/assets/Automations-DEivoiS1.js +2 -0
  9. package/dist/interface/assets/Camera-B5l_gv7t.js +2 -0
  10. package/dist/interface/assets/{CameraConsole-BK8TqHgA.js → CameraConsole-B8bBYQzk.js} +1 -1
  11. package/dist/interface/assets/Cameras-HblWPGCv.js +651 -0
  12. package/dist/interface/assets/Camview-DEKrbg5R.js +1 -0
  13. package/dist/interface/assets/{CertificateUpload-PfgVZa4M.js → CertificateUpload-CC6YtX7h.js} +1 -1
  14. package/dist/interface/assets/{Config-DapgreIX.js → Config-DQEaOnaN.js} +1 -1
  15. package/dist/interface/assets/{ConfigActionAssistant-v0w4E-mE.js → ConfigActionAssistant-C_XRnBzo.js} +1 -1
  16. package/dist/interface/assets/{ConfigActionCameraControl-fdrsnRyE.js → ConfigActionCameraControl-oRzM9rjX.js} +1 -1
  17. package/dist/interface/assets/{ConfigActionDelay-C_dq3ozL.js → ConfigActionDelay-Dc-NZS5L.js} +1 -1
  18. package/dist/interface/assets/{ConfigActionHttp-1hDI-38w.js → ConfigActionHttp-Nw0wt-JZ.js} +1 -1
  19. package/dist/interface/assets/{ConfigActionImageInput-DCF8qeg9.js → ConfigActionImageInput-Do60Upqm.js} +1 -1
  20. package/dist/interface/assets/{ConfigActionMqtt-XpVD7lFg.js → ConfigActionMqtt-BeQVgaGX.js} +1 -1
  21. package/dist/interface/assets/{ConfigActionNotification-CB1ymMRz.js → ConfigActionNotification-BA0FjOWs.js} +1 -1
  22. package/dist/interface/assets/{ConfigActionNotificationControl-BfDtLS5h.js → ConfigActionNotificationControl-Ce3Kd_Xv.js} +1 -1
  23. package/dist/interface/assets/{ConfigActionOutput-CMfXI1b3.js → ConfigActionOutput-ChiOMWDy.js} +1 -1
  24. package/dist/interface/assets/{ConfigActionPlugin-CZo6SudQ.js → ConfigActionPlugin-Cn3r0glk.js} +1 -1
  25. package/dist/interface/assets/{ConfigActionSensor-CetFuASa.js → ConfigActionSensor-DkdBCu-6.js} +1 -1
  26. package/dist/interface/assets/{ConfigActionSnapshot-BpPhHpIk.js → ConfigActionSnapshot-CLlaDFUV.js} +1 -1
  27. package/dist/interface/assets/{ConfigActionVariable-SJomTISn.js → ConfigActionVariable-D4x3Luxl.js} +1 -1
  28. package/dist/interface/assets/{ConfigConditionIfElse-ClTxvZJz.js → ConfigConditionIfElse-BpL8KZ5X.js} +1 -1
  29. package/dist/interface/assets/{ConfigConditionSensorState-FbLmmHyP.js → ConfigConditionSensorState-CSQexUF_.js} +1 -1
  30. package/dist/interface/assets/{ConfigConditionSwitch--qAHkOdE.js → ConfigConditionSwitch-CB2J_5kr.js} +1 -1
  31. package/dist/interface/assets/{ConfigConditionTime-BqjDUPVR.js → ConfigConditionTime-X9fsNsYu.js} +1 -1
  32. package/dist/interface/assets/{ConfigSensorValueInput-B1dLcmSO.js → ConfigSensorValueInput-VPhPxrQl.js} +1 -1
  33. package/dist/interface/assets/{ConfigTriggerDetection-CMZyEWui.js → ConfigTriggerDetection-Dhzng4X5.js} +1 -1
  34. package/dist/interface/assets/{ConfigTriggerGeofence-B9JPVvhP.js → ConfigTriggerGeofence-Cm0CLNf5.js} +1 -1
  35. package/dist/interface/assets/{ConfigTriggerManual-CSdF69jM.js → ConfigTriggerManual-CRi3rsgG.js} +1 -1
  36. package/dist/interface/assets/{ConfigTriggerMqtt-BzN7_xVm.js → ConfigTriggerMqtt-Ck__CWck.js} +1 -1
  37. package/dist/interface/assets/{ConfigTriggerSchedule-BK_Ogvxn.js → ConfigTriggerSchedule-C1PZrHEu.js} +1 -1
  38. package/dist/interface/assets/{ConfigTriggerSensor-BaQklhHP.js → ConfigTriggerSensor-9xVgCtkn.js} +1 -1
  39. package/dist/interface/assets/{ConfigTriggerSystem-DIX95l0X.js → ConfigTriggerSystem-Denf1gkO.js} +1 -1
  40. package/dist/interface/assets/{ConfigTriggerWebhook-_EOJAgNk.js → ConfigTriggerWebhook-im24LkCn.js} +1 -1
  41. package/dist/interface/assets/Console-Q1HpmyO_.js +1 -0
  42. package/dist/interface/assets/CuiAssistantConversation-BxJf9sdu.js +5 -0
  43. package/dist/interface/assets/{CuiAssistantConversation-CWCLLi3b.css → CuiAssistantConversation-DmSdiv1b.css} +1 -1
  44. package/dist/interface/assets/{CuiAutomationRunsDialog-DpskKeEe.js → CuiAutomationRunsDialog-B3tJ-Cma.js} +1 -1
  45. package/dist/interface/assets/CuiBottomSheet-C37blNu-.js +1 -0
  46. package/dist/interface/assets/{CuiBottomSheet-Bg_AIuGY.js → CuiBottomSheet-kvvLw1MQ.js} +1 -1
  47. package/dist/interface/assets/CuiCameraPipCard-TVAf5ZYQ.js +1 -0
  48. package/dist/interface/assets/CuiCameraRecordings-C26rX8dh.css +1 -0
  49. package/dist/interface/assets/CuiCameraRecordings-IHg1dNf4.js +1 -0
  50. package/dist/interface/assets/CuiCameraShares-B5ghuJS-.js +1 -0
  51. package/dist/interface/assets/{CuiCameraTable-CyAYYPvd.js → CuiCameraTable-Y5XUkU7w.js} +2 -2
  52. package/dist/interface/assets/CuiCameraTable-xDZz7Wpe.js +1 -0
  53. package/dist/interface/assets/{CuiChartTable-BklHSjRr.js → CuiChartTable-CXdupaj5.js} +1 -1
  54. package/dist/interface/assets/CuiChartTable-DXY7rY3O.css +1 -0
  55. package/dist/interface/assets/{CuiConsole-4rDfDj0a.js → CuiConsole-5KgXSOS5.js} +2 -2
  56. package/dist/interface/assets/CuiDataTable-DPIbKnvU.css +1 -0
  57. package/dist/interface/assets/CuiDataTable-hArZWV9B.js +1 -0
  58. package/dist/interface/assets/CuiLightControl-MRpR0XIZ.js +1 -0
  59. package/dist/interface/assets/{CuiList-BafzuN0H.js → CuiList-D-l4HrBP.js} +1 -1
  60. package/dist/interface/assets/CuiPluginCard-whoQ5YHn.js +2 -0
  61. package/dist/interface/assets/{CuiPluginCategoryChip-B4w2DH_j.js → CuiPluginCategoryChip-CH53zk2o.js} +1 -1
  62. package/dist/interface/assets/{CuiPluginOAuthButton-C_jxPrPQ.js → CuiPluginOAuthButton-BBA0AzVO.js} +2 -2
  63. package/dist/interface/assets/{CuiPluginTrustBadge-pLnF2Ggn.js → CuiPluginTrustBadge-C0EX5aCI.js} +1 -1
  64. package/dist/interface/assets/{CuiQRCode-8Q6cFdfs.js → CuiQRCode-BRT0NO5c.js} +1 -1
  65. package/dist/interface/assets/CuiSchema-DBY1x1BT.js +1 -0
  66. package/dist/interface/assets/{CuiTopNavbarItem-BZXzuV42.js → CuiTopNavbarItem-CpMT8_0r.js} +1 -1
  67. package/dist/interface/assets/Faces-Dqi30qs9.js +1 -0
  68. package/dist/interface/assets/{FirstSteps-BNcAFp2c.js → FirstSteps-B8n4fGK3.js} +1 -1
  69. package/dist/interface/assets/Floorplan-ZHXNaZA8.js +1 -0
  70. package/dist/interface/assets/{Instances-DUWWy-El.js → Instances-DEj3gs6H.js} +1 -1
  71. package/dist/interface/assets/{Logs-7CxXc2Re.js → Logs-CwHvSKd6.js} +2 -2
  72. package/dist/interface/assets/Menu-C4BxUV0P.js +1 -0
  73. package/dist/interface/assets/Metrics-BCOE-rcw.js +9 -0
  74. package/dist/interface/assets/OAuthDeviceFlow-D6bjZOYS.js +1 -0
  75. package/dist/interface/assets/Plugin-ppCvxkl4.js +1 -0
  76. package/dist/interface/assets/{PluginConsole-BOaU7Ey0.js → PluginConsole-BP42Qpee.js} +1 -1
  77. package/dist/interface/assets/PluginDetail-BnX5lZGz.js +2 -0
  78. package/dist/interface/assets/{PluginSchema-BWlRMPo6.js → PluginSchema-uVKXzfo6.js} +1 -1
  79. package/dist/interface/assets/PluginSearch-C4MvWyLb.js +1 -0
  80. package/dist/interface/assets/PluginSearch-no79fTuf.js +2 -0
  81. package/dist/interface/assets/{PluginUpdateProgress-DFg14vV8.js → PluginUpdateProgress-73jprYHA.js} +1 -1
  82. package/dist/interface/assets/Plugins-DtEqS6_j.js +1 -0
  83. package/dist/interface/assets/{RecentEventsFilter-B6Ph-pxb.js → RecentEventsFilter-CtyCbt6Z.js} +1 -1
  84. package/dist/interface/assets/Recordings-DrcOsRLn.js +1 -0
  85. package/dist/interface/assets/{SensorEdit-DEenjJ8S.js → SensorEdit-D4-mMg8S.js} +1 -1
  86. package/dist/interface/assets/{SensorHistory-CU1Uwf5f.js → SensorHistory-C-X7VI-f.js} +1 -1
  87. package/dist/interface/assets/{Sensors-LnVLPDWf.js → Sensors-BJh8BkCR.js} +2 -2
  88. package/dist/interface/assets/{Settings-uk3RVXCS.js → Settings-B9CZvA-d.js} +1 -1
  89. package/dist/interface/assets/SettingsAccount-CkvScQmF.js +1 -0
  90. package/dist/interface/assets/SettingsAccount-D3zF2kLc.js +1 -0
  91. package/dist/interface/assets/{SettingsAppearance-CRYcal9v.js → SettingsAppearance-CbG8M38w.js} +1 -1
  92. package/dist/interface/assets/SettingsAppearance-ZHqNXXIL.js +1 -0
  93. package/dist/interface/assets/SettingsAssistant-BESab92C.css +1 -0
  94. package/dist/interface/assets/SettingsAssistant-DxYPnbms.js +1 -0
  95. package/dist/interface/assets/{SettingsBackup-CSvGqsru.js → SettingsBackup-DZBzUyQm.js} +1 -1
  96. package/dist/interface/assets/{SettingsList-BQR6jnP-.js → SettingsList-DFg8g7IM.js} +1 -1
  97. package/dist/interface/assets/SettingsMqtt-BeujOZkh.js +1 -0
  98. package/dist/interface/assets/{SettingsNotifications-8sSoP-8S.js → SettingsNotifications-DtSTE76r.js} +1 -1
  99. package/dist/interface/assets/{SettingsPermissions-D7kYdjfw.js → SettingsPermissions-CPOAefv0.js} +1 -1
  100. package/dist/interface/assets/{SettingsRecordings-DjLYqbKo.js → SettingsRecordings-ClAtT4Bh.js} +1 -1
  101. package/dist/interface/assets/SettingsRemote-58S4Thfp.js +2 -0
  102. package/dist/interface/assets/{SettingsSystem-BxQNJc8n.js → SettingsSystem-tTGpuiRW.js} +2 -2
  103. package/dist/interface/assets/SettingsUsers-D8b7I5c2.js +1 -0
  104. package/dist/interface/assets/{Terminal-Bsnvs8gs.js → Terminal-1_Fi0VW-.js} +2 -2
  105. package/dist/interface/assets/Training-CQHfQjUP.css +1 -0
  106. package/dist/interface/assets/Training-DfOqDTHJ.js +1 -0
  107. package/dist/interface/assets/{Updates-Dsn_fJ-N.js → Updates-BW0p7Wc5.js} +1 -1
  108. package/dist/interface/assets/{VariableInput-DCWiIgaZ.js → VariableInput-sqnLuk6S.js} +1 -1
  109. package/dist/interface/assets/{VariableSuggestions-BhIlXJ6r.js → VariableSuggestions-3pbnxhyT.js} +1 -1
  110. package/dist/interface/assets/{VersionsHandler-DM_Jf4EA.js → VersionsHandler-CWmjDygB.js} +1 -1
  111. package/dist/interface/assets/{VirtualSensorCreate-Q4kd0dfE.js → VirtualSensorCreate-BzmFlvYD.js} +1 -1
  112. package/dist/interface/assets/Workers-Dm9o2wMo.js +2 -0
  113. package/dist/interface/assets/{api-BKiE8A_V.css → api-B6TtU9Ew.css} +1 -1
  114. package/dist/interface/assets/{api-LjAY3aa3.js → api-CQ-3I3-i.js} +1 -1
  115. package/dist/interface/assets/api-DPgKdIQZ.js +4 -0
  116. package/dist/interface/assets/{assistant-BFc44oq-.js → assistant-0UymvpMy.js} +1 -1
  117. package/dist/interface/assets/{auth-CUPvHARA.js → auth-C0jhqNaz.js} +1 -1
  118. package/dist/interface/assets/{automations-Dw4L5sT0.js → automations-Bj30nb8s.js} +1 -1
  119. package/dist/interface/assets/{cameraSources-CzENFiZx.js → cameraSources-CiMjIjsh.js} +1 -1
  120. package/dist/interface/assets/cloudHandoff-Cxljjl7N.js +1 -0
  121. package/dist/interface/assets/{config-EBcNBZkb.js → config-D-uVfwYp.js} +1 -1
  122. package/dist/interface/assets/{flowSchema-CdzBw69a.js → flowSchema-D3nNJVLL.js} +1 -1
  123. package/dist/interface/assets/{intercomService-DIfdcsXc.js → intercomService-BeoNs-09.js} +1 -1
  124. package/dist/interface/assets/main-BrNGfemk.js +3 -0
  125. package/dist/interface/assets/{mqtt-D_wH18eJ.js → mqtt-D7jRwifB.js} +1 -1
  126. package/dist/interface/assets/{notifications-wLsrlI9N.js → notifications-BpRVoerg.js} +1 -1
  127. package/dist/interface/assets/pause-B7ud2O8d.js +1 -0
  128. package/dist/interface/assets/{plugins-DwmkpOPJ.js → plugins-wZ4RDxCb.js} +1 -1
  129. package/dist/interface/assets/rooms-CFcu2dU1.js +1 -0
  130. package/dist/interface/assets/{sensorIcons-BY853M0u.js → sensorIcons-B117n8l2.js} +1 -1
  131. package/dist/interface/assets/{sensorSlots-DnRJdaTG.js → sensorSlots-CAr3prFc.js} +1 -1
  132. package/dist/interface/assets/{sensors-B9etOqBI.js → sensors-oriEG3KR.js} +1 -1
  133. package/dist/interface/assets/{server-BTKgKMye.js → server-Ce6ou2NV.js} +1 -1
  134. package/dist/interface/assets/{theme-CbtGvohq.js → theme-CBTC6-Lp.js} +1 -1
  135. package/dist/interface/assets/{types-CEhVWRYD.js → types-C-amdBz6.js} +1 -1
  136. package/dist/interface/assets/{types-COlvVtDn.js → types-CjU6-JvD.js} +1 -1
  137. package/dist/interface/assets/types-CzjppLwt.js +1 -0
  138. package/dist/interface/assets/{ungrouped-Dbr16vFt.css → ungrouped-AYNBKz52.css} +1 -1
  139. package/dist/interface/assets/ungrouped-BQzKp2PT.js +1 -0
  140. package/dist/interface/assets/{updates-BQ6Ugcup.js → updates-Cohtc6vb.js} +1 -1
  141. package/dist/interface/assets/{useAppVersion-BO-3jbup.js → useAppVersion-xxi6fR7J.js} +1 -1
  142. package/dist/interface/assets/{useAssistantActions-CRVHZw4o.js → useAssistantActions-BkRK1FBg.js} +1 -1
  143. package/dist/interface/assets/useBackupRestore-BGvhSqJB.js +1 -0
  144. package/dist/interface/assets/{useCameraOptions-C7tgceJ1.js → useCameraOptions-ophs2V4p.js} +1 -1
  145. package/dist/interface/assets/{useKeyboardInset-yu3BVnj7.js → useKeyboardInset-Cpz6Hs5c.js} +1 -1
  146. package/dist/interface/assets/{useLogsSocket-B4wTnSno.js → useLogsSocket-CB07yhv4.js} +1 -1
  147. package/dist/interface/assets/{useNavLayout-Z61-OsIG.js → useNavLayout-BYEejBpb.js} +1 -1
  148. package/dist/interface/assets/{usePermissions-Bjx4t0x3.js → usePermissions-yWhjYMcr.js} +1 -1
  149. package/dist/interface/assets/{usePluginUpdates-Dv3_XJTK.js → usePluginUpdates-9rvsWfdJ.js} +1 -1
  150. package/dist/interface/assets/{usePushRegistration-CHNMZ94f.js → usePushRegistration-b5owOzjH.js} +1 -1
  151. package/dist/interface/assets/{useServerRestart-C-AsOdJP.js → useServerRestart-yRXDWnH_.js} +1 -1
  152. package/dist/interface/assets/{useStreamStatus-BJoJF68x.js → useStreamStatus-BHyWrAHu.js} +1 -1
  153. package/dist/interface/assets/{useTabSwipe-b_K3BIkW.js → useTabSwipe-Dr9HYP1J.js} +1 -1
  154. package/dist/interface/assets/{useUpdateChannel-Cc4IrrDy.js → useUpdateChannel-IVj0XKlN.js} +1 -1
  155. package/dist/interface/assets/{useUpdatesSocket-Cz9lN4Bc.js → useUpdatesSocket-CuPHbSF7.js} +1 -1
  156. package/dist/interface/assets/{useUserOptions-DrNB17kY.js → useUserOptions-zIfrMDiG.js} +1 -1
  157. package/dist/interface/assets/{vendor-cameraui-CqKq4Yeo.js → vendor-cameraui-Dhg7MEnt.js} +2 -2
  158. package/dist/interface/assets/{vendor-core-BTkC8NzR.js → vendor-core-CQ2HVu0L.js} +1 -1
  159. package/dist/interface/assets/{vendor-primevue-DQz5Qnqu.js → vendor-primevue-CeWNZxSE.js} +1 -1
  160. package/dist/interface/assets/{vendor-zod-BigRv4ty.js → vendor-zod-CBbC1rE7.js} +2 -2
  161. package/dist/interface/ha/{404-Bg2Vlt5S.js → 404-B70KNhsW.js} +1 -1
  162. package/dist/interface/ha/{About-C6u2wgUi.js → About-DLNqqctZ.js} +6 -6
  163. package/dist/interface/ha/{Assistant-BCyiVnwD.js → Assistant-Duvvoz2B.js} +334 -319
  164. package/dist/interface/ha/{Automation-DU_qv5xD.js → Automation-DZ8zvsvo.js} +189 -189
  165. package/dist/interface/ha/{AutomationImport-BpDyhabF.js → AutomationImport-DOCdim5O.js} +6 -6
  166. package/dist/interface/ha/{AutomationStore-DPQsunpH.js → AutomationStore-Bjoubp-m.js} +7 -7
  167. package/dist/interface/ha/{AutomationStoreDetail-CASMQ-mD.js → AutomationStoreDetail-H-RWNpwm.js} +13 -13
  168. package/dist/interface/ha/{Automations-DSHVzwX4.js → Automations-GyofQfo7.js} +99 -112
  169. package/dist/interface/ha/{Camera-ESmteicm.js → Camera-Bo5nMQaU.js} +27 -27
  170. package/dist/interface/ha/{CameraConsole-BE_jl4Co.js → CameraConsole-BmDQ3rcS.js} +5 -5
  171. package/dist/interface/ha/{Cameras-otaj2xZO.js → Cameras-BfHoFjpC.js} +242 -242
  172. package/dist/interface/ha/{Camview-BU1027if.js → Camview-DVoIdM3o.js} +520 -520
  173. package/dist/interface/ha/{Config-BlEvHYVP.js → Config-CC8tQiOy.js} +110 -110
  174. package/dist/interface/ha/{ConfigActionAssistant-uDf5fgoJ.js → ConfigActionAssistant-hfsz38an.js} +4 -4
  175. package/dist/interface/ha/{ConfigActionCameraControl-BAQsXVLz.js → ConfigActionCameraControl-C0-wxlAS.js} +3 -3
  176. package/dist/interface/ha/{ConfigActionHttp-Dy2MZHSm.js → ConfigActionHttp-CM_3bIUq.js} +2 -2
  177. package/dist/interface/ha/{ConfigActionImageInput-B5kyV3Un.js → ConfigActionImageInput-B5306Z_7.js} +1 -1
  178. package/dist/interface/ha/{ConfigActionMqtt-DHCgh1xx.js → ConfigActionMqtt-DLiM83Kz.js} +4 -4
  179. package/dist/interface/ha/{ConfigActionNotification-mbA5PfcJ.js → ConfigActionNotification-36VBlfim.js} +3 -3
  180. package/dist/interface/ha/{ConfigActionNotificationControl-TLaL7tYm.js → ConfigActionNotificationControl-DRjDvA1H.js} +2 -2
  181. package/dist/interface/ha/{ConfigActionOutput-CJ40Fniw.js → ConfigActionOutput-BkGHERoJ.js} +1 -1
  182. package/dist/interface/ha/{ConfigActionPlugin-BwTd-mdQ.js → ConfigActionPlugin-Ds1_Pow7.js} +5 -5
  183. package/dist/interface/ha/{ConfigActionSensor-BI438ihg.js → ConfigActionSensor-22uKE0d0.js} +5 -5
  184. package/dist/interface/ha/{ConfigActionSnapshot-DJ4zI2a0.js → ConfigActionSnapshot-uTTsTfo2.js} +2 -2
  185. package/dist/interface/ha/{ConfigActionVariable-Bhy5jf_w.js → ConfigActionVariable-DNMJBiQV.js} +1 -1
  186. package/dist/interface/ha/{ConfigConditionIfElse-I7Qq8nfN.js → ConfigConditionIfElse-BVzmIDKK.js} +3 -3
  187. package/dist/interface/ha/{ConfigConditionSensorState-CTLP3ppx.js → ConfigConditionSensorState-Di7Ic1xI.js} +4 -4
  188. package/dist/interface/ha/{ConfigConditionSwitch-UUupXf1b.js → ConfigConditionSwitch-D8CcTHJ1.js} +5 -5
  189. package/dist/interface/ha/{ConfigSensorValueInput-CoHheDT0.js → ConfigSensorValueInput-DthsOthT.js} +4 -4
  190. package/dist/interface/ha/{ConfigTriggerDetection-Cg_jKNed.js → ConfigTriggerDetection-BDYanDEV.js} +2 -2
  191. package/dist/interface/ha/{ConfigTriggerGeofence-WlJbu3sC.js → ConfigTriggerGeofence-Binp0lYx.js} +5 -5
  192. package/dist/interface/ha/{ConfigTriggerMqtt-BeRJoceK.js → ConfigTriggerMqtt-BaPzSHbK.js} +1 -1
  193. package/dist/interface/ha/{ConfigTriggerSensor-k58gVKdG.js → ConfigTriggerSensor-DiTaTZXm.js} +1 -1
  194. package/dist/interface/ha/{ConfigTriggerSystem-Ckm5yoUm.js → ConfigTriggerSystem-CsdWiz-S.js} +2 -2
  195. package/dist/interface/ha/{ConfigTriggerWebhook-D425z-p1.js → ConfigTriggerWebhook-Ca0PsUmU.js} +6 -6
  196. package/dist/interface/ha/{Console-C1Ub4Rji.js → Console-0amlIoZR.js} +10 -10
  197. package/dist/interface/ha/{CuiAutomationRunsDialog-opy5qXwE.js → CuiAutomationRunsDialog-DNBuwkgL.js} +2 -2
  198. package/dist/interface/ha/{CuiBottomSheet-DbCwVXl1.js → CuiBottomSheet-CdXBYz4P.js} +1 -1
  199. package/dist/interface/ha/{CuiCameraRecordings-CifJLj7G.js → CuiCameraRecordings-D4ZB56nd.js} +14 -15
  200. package/dist/interface/ha/{CuiCameraShares-Xty8LRcn.js → CuiCameraShares-YmzZusZR.js} +7 -7
  201. package/dist/interface/ha/{CuiCameraTable-CqfxX0Yn.js → CuiCameraTable-DFzhCO3J.js} +9 -9
  202. package/dist/interface/ha/{CuiChartTable-ABHnLdR0.js → CuiChartTable-BvfJbFNS.js} +46 -44
  203. package/dist/interface/ha/{CuiConsole-3JwbeUYD.js → CuiConsole-DtxyD6Sd.js} +1 -1
  204. package/dist/interface/ha/{CuiDataTable-BwE7D2h5.js → CuiDataTable-CHvx6ALQ.js} +16 -10
  205. package/dist/interface/ha/{CuiPluginCard-bzxiy1yb.js → CuiPluginCard-B3vU57eD.js} +77 -77
  206. package/dist/interface/ha/{CuiPluginOAuthButton-DSxrzDmg.js → CuiPluginOAuthButton-DgOFfP5e.js} +6 -6
  207. package/dist/interface/ha/{CuiPluginTrustBadge-g0XkvDt8.js → CuiPluginTrustBadge-udmtgGHt.js} +1 -1
  208. package/dist/interface/ha/{CuiQRCode-uyRFbzd6.js → CuiQRCode-8yDZMC3o.js} +6 -6
  209. package/dist/interface/ha/{CuiSchema-DZIrlY8R.js → CuiSchema-0Hikg2mm.js} +138 -138
  210. package/dist/interface/ha/{CuiTopNavbarItem-C3a5NA7u.js → CuiTopNavbarItem-B139fVxP.js} +1 -1
  211. package/dist/interface/ha/{Faces-D2eca8MN.js → Faces-YdAf9USr.js} +107 -107
  212. package/dist/interface/ha/{FirstSteps-CdTE1cvw.js → FirstSteps-Dts6TJ6O.js} +7 -7
  213. package/dist/interface/ha/{Floorplan-BrEC2Au5.js → Floorplan-D6XXe8ni.js} +193 -193
  214. package/dist/interface/ha/{Instances-ClOsPOi8.js → Instances-DsIsonqp.js} +68 -68
  215. package/dist/interface/ha/{Logs-DnY1gTnb.js → Logs-Cyo3LC94.js} +11 -11
  216. package/dist/interface/ha/{Menu-cLDE76XZ.js → Menu-yh_sI9d9.js} +15 -20
  217. package/dist/interface/ha/{Metrics-pMQX_0m1.js → Metrics-VehQmsmN.js} +64 -64
  218. package/dist/interface/ha/{OAuthDeviceFlow-D1PGQ8r9.js → OAuthDeviceFlow-CXp9NvbY.js} +9 -9
  219. package/dist/interface/ha/{Plugin-DiC23P97.js → Plugin-BqvlXx43.js} +97 -97
  220. package/dist/interface/ha/{PluginConsole-B-lX5KJu.js → PluginConsole-Dx84BNoO.js} +4 -4
  221. package/dist/interface/ha/{PluginDetail-B_tVJf6y.js → PluginDetail-DUpDS2nD.js} +6 -6
  222. package/dist/interface/ha/{PluginSearch-n8nfjx9q.js → PluginSearch-Cvh0P9VB.js} +124 -124
  223. package/dist/interface/ha/{PluginUpdateProgress-BjsYyrRk.js → PluginUpdateProgress-CfyI2Qdp.js} +3 -3
  224. package/dist/interface/ha/{Plugins-CFhOUaqq.js → Plugins-DXreIUwr.js} +173 -173
  225. package/dist/interface/ha/{Recordings-B07eUJwH.js → Recordings-Cb8ifRcB.js} +225 -227
  226. package/dist/interface/ha/{SensorEdit-DFPiBXQD.js → SensorEdit-CsNXxcdj.js} +58 -58
  227. package/dist/interface/ha/{SensorHistory-B2FOK4Qa.js → SensorHistory-DToDalOm.js} +2 -2
  228. package/dist/interface/ha/{Sensors-DtzmTc-L.js → Sensors-B6giaowJ.js} +434 -434
  229. package/dist/interface/ha/{Settings-ClqSoFjT.js → Settings-CVed7MM_.js} +22 -22
  230. package/dist/interface/ha/{SettingsAccount-Bh8FfH7J.js → SettingsAccount-CvvsLPoT.js} +31 -31
  231. package/dist/interface/ha/{SettingsAppearance--FJgY8cj.js → SettingsAppearance-BDJeNGTd.js} +6 -6
  232. package/dist/interface/ha/{SettingsAssistant-ClDfxd_d.js → SettingsAssistant-B168p5HB.js} +615 -508
  233. package/dist/interface/ha/{SettingsBackup-BYM55pQ7.js → SettingsBackup-Bz_9xJ61.js} +14 -14
  234. package/dist/interface/ha/{SettingsList-CMSEKVCD.js → SettingsList-B42rajJc.js} +1 -1
  235. package/dist/interface/ha/{SettingsMqtt-CFpgJ-E5.js → SettingsMqtt-B5Qy6bxD.js} +148 -148
  236. package/dist/interface/ha/SettingsNotifications-C59UxYic.js +529 -0
  237. package/dist/interface/ha/{SettingsRecordings-Bz686yU7.js → SettingsRecordings-CkJGOiyQ.js} +7 -7
  238. package/dist/interface/ha/{SettingsRemote-DT4ZMjJO.js → SettingsRemote-Cc-qt3si.js} +231 -231
  239. package/dist/interface/ha/{SettingsSystem-CHctt06D.js → SettingsSystem-Cco2XXsS.js} +9 -9
  240. package/dist/interface/ha/{SettingsUsers-C_hvntON.js → SettingsUsers-BDh-3saR.js} +33 -33
  241. package/dist/interface/ha/{Terminal-B5FXq4-Z.js → Terminal-D2U-kFPW.js} +8 -8
  242. package/dist/interface/ha/Training-DWcaCI-3.js +1499 -0
  243. package/dist/interface/ha/{Updates-D0osNjqS.js → Updates-DGHNcvO9.js} +13 -13
  244. package/dist/interface/ha/{VariableInput-BK0qqMc7.js → VariableInput-Bujz1T1I.js} +1 -1
  245. package/dist/interface/ha/{VersionsHandler-B-vpKHJN.js → VersionsHandler-CXvbeKbl.js} +10 -10
  246. package/dist/interface/ha/{VirtualSensorCreate-Bp2201iM.js → VirtualSensorCreate-DOYONbgu.js} +2 -2
  247. package/dist/interface/ha/{Workers-BQ_luGWk.js → Workers-tQbC3WS6.js} +90 -90
  248. package/dist/interface/ha/{api-JPS8NpNG.js → api-BI6_Fcag.js} +8979 -8895
  249. package/dist/interface/ha/{api-BufZW7-A.js → api-DfJZj7ht.js} +1 -1
  250. package/dist/interface/ha/{assistant-BXVGCw2q.js → assistant-BqSg4N8v.js} +25 -25
  251. package/dist/interface/ha/{auth-CJC9G9BA.js → auth-BFoSqfzS.js} +34 -34
  252. package/dist/interface/ha/{automationBlueprint-DWuBiu_Q.js → automationBlueprint-Q0yt2MdH.js} +3 -3
  253. package/dist/interface/ha/cameraui-cards.js +1 -1
  254. package/dist/interface/ha/{cards-CGP6dWjy.js → cards-BW9I5B5Z.js} +114 -114
  255. package/dist/interface/ha/{config-BVURO_DZ.js → config-CeNHEP9A.js} +9 -9
  256. package/dist/interface/ha/{dist-Ca4K4HIm.js → dist-BV3OfApt.js} +1 -1
  257. package/dist/interface/ha/{mqtt-DY6EvMC9.js → mqtt-BkYa2CXH.js} +7 -7
  258. package/dist/interface/ha/{notifications-BdIqgnrC.js → notifications-E3WSCGpc.js} +12 -12
  259. package/dist/interface/ha/pause-Ch6v65wA.js +19 -0
  260. package/dist/interface/ha/{pinia-CqffEnzx.js → pinia-DoDLbPZ3.js} +11 -7
  261. package/dist/interface/ha/{plugins-Bnq2Iw00.js → plugins-2jjU7TfW.js} +30 -30
  262. package/dist/interface/ha/{rooms-AiJ5Tfir.js → rooms-BkEw1ev-.js} +1 -1
  263. package/dist/interface/ha/{server-BHhFn2RZ.js → server-CuK4o2fS.js} +15 -15
  264. package/dist/interface/ha/{types-7oMK8VO-.js → types-BRHWeX0a.js} +36 -22
  265. package/dist/interface/ha/{ungrouped-hib17Nvu.js → ungrouped-BDwep3kg.js} +195 -213
  266. package/dist/interface/ha/{updates-DvnEEUsx.js → updates-R4xTxour.js} +24 -24
  267. package/dist/interface/ha/{useAppVersion-BmWXr96y.js → useAppVersion-uaFjqUpx.js} +1 -1
  268. package/dist/interface/ha/{useLogsSocket-BKlJKGCB.js → useLogsSocket-BZq9GXfy.js} +1 -1
  269. package/dist/interface/ha/{useNavLayout-Dt0NH-G5.js → useNavLayout-BJdDE__R.js} +2 -2
  270. package/dist/interface/ha/{useServerRestart-DWs2dqQc.js → useServerRestart-DDCKnE6c.js} +1 -1
  271. package/dist/interface/ha/{useTabSwipe-vX79p6V_.js → useTabSwipe-CEH6ltIZ.js} +1 -1
  272. package/dist/interface/ha/{useUpdateChannel-CHlRp8uj.js → useUpdateChannel-CHt1il2V.js} +2 -2
  273. package/dist/interface/ha/{useUpdatesSocket-B40Cx-2L.js → useUpdatesSocket-BnVaNioY.js} +1 -1
  274. package/dist/interface/ha/{useUserOptions-hXz79rIV.js → useUserOptions-C7cQ1P3Q.js} +1 -1
  275. package/dist/interface/index.html +34 -34
  276. package/dist/interface/sw.js +1 -1
  277. package/dist/server/package.json +6 -7
  278. package/dist/server/requirements.txt +1 -1
  279. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/__init__.py +2 -0
  280. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/__init__.py +2 -0
  281. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/frames.py +9 -5
  282. package/dist/server/src/api/controllers/assistant.controller.js +2 -1
  283. package/dist/server/src/api/controllers/assistant.controller.js.map +1 -1
  284. package/dist/server/src/api/controllers/plugins.controller.js +3 -3
  285. package/dist/server/src/api/controllers/plugins.controller.js.map +1 -1
  286. package/dist/server/src/api/database/index.d.ts +1 -1
  287. package/dist/server/src/api/database/index.js +1 -1
  288. package/dist/server/src/api/database/index.js.map +1 -1
  289. package/dist/server/src/api/database/migrations/v2-2-3.d.ts +3 -0
  290. package/dist/server/src/api/database/migrations/v2-2-3.js +22 -0
  291. package/dist/server/src/api/database/migrations/v2-2-3.js.map +1 -0
  292. package/dist/server/src/api/schemas/cameras.schema.d.ts +32 -16
  293. package/dist/server/src/api/schemas/cameras.schema.js +5 -5
  294. package/dist/server/src/api/schemas/cameras.schema.js.map +1 -1
  295. package/dist/server/src/api/websocket/nsp/logs.d.ts +5 -2
  296. package/dist/server/src/api/websocket/nsp/logs.js +20 -5
  297. package/dist/server/src/api/websocket/nsp/logs.js.map +1 -1
  298. package/dist/server/src/api/websocket/nsp/training.d.ts +1 -1
  299. package/dist/server/src/api/websocket/nsp/training.js +3 -2
  300. package/dist/server/src/api/websocket/nsp/training.js.map +1 -1
  301. package/dist/server/src/assistant/manager.d.ts +1 -0
  302. package/dist/server/src/assistant/manager.js +24 -2
  303. package/dist/server/src/assistant/manager.js.map +1 -1
  304. package/dist/server/src/assistant/reasoning.d.ts +1 -1
  305. package/dist/server/src/assistant/reasoning.js +6 -3
  306. package/dist/server/src/assistant/reasoning.js.map +1 -1
  307. package/dist/server/src/assistant/retry.d.ts +4 -0
  308. package/dist/server/src/assistant/retry.js +3 -0
  309. package/dist/server/src/assistant/retry.js.map +1 -1
  310. package/dist/server/src/assistant/tool-names.d.ts +2 -0
  311. package/dist/server/src/assistant/tool-names.js +23 -0
  312. package/dist/server/src/assistant/tool-names.js.map +1 -0
  313. package/dist/server/src/assistant/tools/api.js +2 -0
  314. package/dist/server/src/assistant/tools/api.js.map +1 -1
  315. package/dist/server/src/assistant/tools/docs.js +1 -0
  316. package/dist/server/src/assistant/tools/docs.js.map +1 -1
  317. package/dist/server/src/assistant/tools/memory.js +1 -0
  318. package/dist/server/src/assistant/tools/memory.js.map +1 -1
  319. package/dist/server/src/assistant/tools/settings.js +1 -0
  320. package/dist/server/src/assistant/tools/settings.js.map +1 -1
  321. package/dist/server/src/automations/utilities/imageInput.js +4 -2
  322. package/dist/server/src/automations/utilities/imageInput.js.map +1 -1
  323. package/dist/server/src/camera/controller.d.ts +3 -0
  324. package/dist/server/src/camera/controller.js +41 -28
  325. package/dist/server/src/camera/controller.js.map +1 -1
  326. package/dist/server/src/camera/index.d.ts +1 -7
  327. package/dist/server/src/camera/index.js +0 -13
  328. package/dist/server/src/camera/index.js.map +1 -1
  329. package/dist/server/src/camera/privacy/snapshot.js +4 -2
  330. package/dist/server/src/camera/privacy/snapshot.js.map +1 -1
  331. package/dist/server/src/camera/snapshot-store.d.ts +22 -0
  332. package/dist/server/src/camera/snapshot-store.js +78 -0
  333. package/dist/server/src/camera/snapshot-store.js.map +1 -0
  334. package/dist/server/src/camera/streaming/fmp4-session.d.ts +2 -1
  335. package/dist/server/src/camera/streaming/fmp4-session.js +4 -0
  336. package/dist/server/src/camera/streaming/fmp4-session.js.map +1 -1
  337. package/dist/server/src/camera/streaming/rtp-session.js +1 -0
  338. package/dist/server/src/camera/streaming/rtp-session.js.map +1 -1
  339. package/dist/server/src/manager/trainingCandidateManager.js +17 -13
  340. package/dist/server/src/manager/trainingCandidateManager.js.map +1 -1
  341. package/dist/server/src/manager/types.d.ts +4 -0
  342. package/dist/server/src/rpc/interfaces/device.d.ts +1 -0
  343. package/dist/server/src/sensors/registry.js +2 -2
  344. package/dist/server/src/sensors/registry.js.map +1 -1
  345. package/dist/server/src/utils/image.d.ts +1 -0
  346. package/dist/server/src/utils/image.js +95 -0
  347. package/dist/server/src/utils/image.js.map +1 -0
  348. package/package.json +6 -7
  349. package/dist/interface/assets/AutomationStoreDetail-btcIglkw.js +0 -2
  350. package/dist/interface/assets/Automations-CKpwXTyc.js +0 -2
  351. package/dist/interface/assets/Camera-BEP_HAQm.js +0 -2
  352. package/dist/interface/assets/Cameras-DJreIgtW.js +0 -651
  353. package/dist/interface/assets/Camview-D4VNMv_l.js +0 -1
  354. package/dist/interface/assets/Console-Y1IutnkC.js +0 -1
  355. package/dist/interface/assets/CuiAssistantConversation-C4RYcMAM.js +0 -5
  356. package/dist/interface/assets/CuiBottomSheet-S8bM23jj.js +0 -1
  357. package/dist/interface/assets/CuiCameraPipCard-HTjvF3yG.js +0 -1
  358. package/dist/interface/assets/CuiCameraRecordings-B7BhgPpP.css +0 -1
  359. package/dist/interface/assets/CuiCameraRecordings-Cx6FYz3Y.js +0 -1
  360. package/dist/interface/assets/CuiCameraShares-J728G9wF.js +0 -1
  361. package/dist/interface/assets/CuiCameraTable-CKur0qLE.js +0 -1
  362. package/dist/interface/assets/CuiChartTable-DCGY-zVy.css +0 -1
  363. package/dist/interface/assets/CuiDataTable-BLyeEEAp.js +0 -1
  364. package/dist/interface/assets/CuiDataTable-DbkFXZeg.css +0 -1
  365. package/dist/interface/assets/CuiLightControl-C1YSJSWd.js +0 -1
  366. package/dist/interface/assets/CuiPluginCard-enc00hbc.js +0 -2
  367. package/dist/interface/assets/CuiSchema-CRHUMY0B.js +0 -1
  368. package/dist/interface/assets/Faces-fMMd6-PY.js +0 -1
  369. package/dist/interface/assets/Floorplan-BQbOWCCf.js +0 -1
  370. package/dist/interface/assets/Menu-B3VA0LMx.js +0 -1
  371. package/dist/interface/assets/Metrics-C0q2BdKH.js +0 -9
  372. package/dist/interface/assets/OAuthDeviceFlow-ZiCl4400.js +0 -1
  373. package/dist/interface/assets/Plugin-C0CPlt4f.js +0 -1
  374. package/dist/interface/assets/PluginDetail-DDh6PfMd.js +0 -2
  375. package/dist/interface/assets/PluginSearch-BR_ei8Pa.js +0 -1
  376. package/dist/interface/assets/PluginSearch-C2AXz2KG.js +0 -2
  377. package/dist/interface/assets/Plugins-CN1YIfNk.js +0 -1
  378. package/dist/interface/assets/Recordings-jhxwdrQY.js +0 -1
  379. package/dist/interface/assets/SettingsAccount-CJ_fPrT-.js +0 -1
  380. package/dist/interface/assets/SettingsAccount-CYn81m0Z.js +0 -1
  381. package/dist/interface/assets/SettingsAppearance-DFe8JsT5.js +0 -1
  382. package/dist/interface/assets/SettingsAssistant-CDyI6fee.css +0 -1
  383. package/dist/interface/assets/SettingsAssistant-Dm4oINqB.js +0 -1
  384. package/dist/interface/assets/SettingsMqtt-ByQYIRkm.js +0 -1
  385. package/dist/interface/assets/SettingsRemote-7iDccnV9.js +0 -2
  386. package/dist/interface/assets/SettingsUsers-yYobKcPv.js +0 -1
  387. package/dist/interface/assets/Training-BUhrkDzA.css +0 -1
  388. package/dist/interface/assets/Training-SOWa6Ay1.js +0 -1
  389. package/dist/interface/assets/Workers-D7mXpfvC.js +0 -2
  390. package/dist/interface/assets/api-Cl7JjXOQ.js +0 -4
  391. package/dist/interface/assets/cloudHandoff-CGMLCwMb.js +0 -1
  392. package/dist/interface/assets/main-W8WcKa2g.js +0 -3
  393. package/dist/interface/assets/rooms-D_7As09p.js +0 -1
  394. package/dist/interface/assets/types-BEy4uGJ0.js +0 -1
  395. package/dist/interface/assets/ungrouped-BJyBDv5e.js +0 -1
  396. package/dist/interface/assets/useBackupRestore-D305pYHT.js +0 -1
  397. package/dist/interface/ha/SettingsNotifications-CzgsBNtW.js +0 -529
  398. package/dist/interface/ha/Training-BgvpsKPM.js +0 -1469
@@ -0,0 +1,1499 @@
1
+ import { m as e } from "./ripple-B_itunQV.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 _, p as v, qt as y, r as b, rt as x, u as S, ut as C, v as w, x as T, xt as E, y as D, yt as O } from "./runtime-core.esm-bundler-DCktklpY.js";
3
+ import { t as te } from "./tooltip-X5MY9FoG.js";
4
+ import { t as ne } from "./chevron-down-CN3LNAsG.js";
5
+ import { t as re } from "./tag-Bko2QYOK.js";
6
+ import { B as ie, Dt as ae, En as oe, Er as se, Et as ce, J as k, Li as A, Or as le, Ot as ue, R as de, Tr as fe, V as pe, W as me, Xi as j, Zr as he, _i as M, ar as ge, bi as N, c as _e, d as P, ht as ve, m as ye, mn as be, or as F, qt as I, sa as L, st as xe, ui as R, vr as Se, yi as Ce, yr as we, z } from "./api-BI6_Fcag.js";
7
+ import { S as Te, _ as Ee, b as De, i as Oe, w as ke } from "./intercomService-Dwd0bhSN.js";
8
+ import { n as Ae } from "./vue-i18n-BBObX4QY.js";
9
+ import { t as je } from "./button-DJDZxmKj.js";
10
+ import { n as Me, t as B } from "./inputicon-BPVltPdr.js";
11
+ import { t as Ne } from "./inputtext-vdcrNX6K.js";
12
+ import { t as Pe } from "./checkbox-D012nd17.js";
13
+ import { t as Fe } from "./close-C_ajB9j7.js";
14
+ import { t as Ie } from "./progressbar-C2663Zd7.js";
15
+ import { t as Le } from "./ring-resize-11TaovpK.js";
16
+ import { t as Re } from "./search-DMJuYUDF.js";
17
+ import { n as ze, t as Be } from "./cloud-check-gKe6M70h.js";
18
+ import { t as Ve } from "./trash-can-outline-XdMf3dMc.js";
19
+ import { t as He } from "./back-filled-B-jI6Dqb.js";
20
+ import { t as Ue } from "./help-circle-outline-Du1jH6xY.js";
21
+ import { t as We } from "./settings-DkoB1zyf.js";
22
+ //#region ~icons/mdi/cloud-check-outline
23
+ var V = {
24
+ viewBox: "0 0 24 24",
25
+ width: "1.2em",
26
+ height: "1.2em"
27
+ };
28
+ function Ge(e, t) {
29
+ return r(), v("svg", V, [...t[0] ||= [S("path", {
30
+ fill: "currentColor",
31
+ 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"
32
+ }, null, -1)]]);
33
+ }
34
+ var H = l({
35
+ name: "mdi-cloud-check-outline",
36
+ render: Ge
37
+ }), Ke = {
38
+ viewBox: "0 0 24 24",
39
+ width: "1.2em",
40
+ height: "1.2em"
41
+ };
42
+ function qe(e, t) {
43
+ return r(), v("svg", Ke, [...t[0] ||= [S("path", {
44
+ fill: "currentColor",
45
+ 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"
46
+ }, null, -1)]]);
47
+ }
48
+ var Je = l({
49
+ name: "mdi-cloud-upload-outline",
50
+ render: qe
51
+ }), U = 200;
52
+ async function W(e = {}, { signal: t } = {}) {
53
+ return (await j.get("/training/candidates", {
54
+ params: e,
55
+ signal: t
56
+ })).data;
57
+ }
58
+ async function G(e, t) {
59
+ return (await j.patch(`/training/candidates/${e}`, t)).data;
60
+ }
61
+ async function K(e) {
62
+ await j.delete(`/training/candidates/${e}`);
63
+ }
64
+ async function Ye(e) {
65
+ let t = 0;
66
+ for (let n = 0; n < e.length; n += U) {
67
+ let r = await j.post("/training/candidates/submit", { ids: e.slice(n, n + U) });
68
+ t += r.data.queued;
69
+ }
70
+ return { queued: t };
71
+ }
72
+ async function Xe({ cursor: e, signal: t } = {}) {
73
+ return (await j.get("/training/submissions", {
74
+ params: e ? { cursor: e } : void 0,
75
+ signal: t
76
+ })).data;
77
+ }
78
+ async function q(e) {
79
+ await j.delete(`/training/submissions/${e}`);
80
+ }
81
+ async function Ze({ signal: e } = {}) {
82
+ return (await j.get("/training/settings", { signal: e })).data;
83
+ }
84
+ async function Qe(e) {
85
+ return (await j.patch("/training/settings", e)).data;
86
+ }
87
+ var $e = class {
88
+ queryClient = A();
89
+ getCandidatesQuery() {
90
+ return M({
91
+ queryKey: ["training-candidates"],
92
+ queryFn: ({ signal: e }) => W({}, { signal: e }),
93
+ staleTime: 5e3
94
+ });
95
+ }
96
+ getSettingsQuery() {
97
+ return M({
98
+ queryKey: ["training-settings"],
99
+ queryFn: ({ signal: e }) => Ze({ signal: e }),
100
+ staleTime: 3e4
101
+ });
102
+ }
103
+ patchCandidateMutation() {
104
+ return N({
105
+ mutationFn: ({ id: e, patch: t }) => G(e, t),
106
+ onSuccess: async () => {
107
+ await this.queryClient.refetchQueries({
108
+ queryKey: ["training-candidates"],
109
+ exact: !0
110
+ });
111
+ }
112
+ });
113
+ }
114
+ deleteCandidateMutation() {
115
+ return N({
116
+ mutationFn: K,
117
+ onSuccess: async () => {
118
+ await this.queryClient.refetchQueries({
119
+ queryKey: ["training-candidates"],
120
+ exact: !0
121
+ });
122
+ }
123
+ });
124
+ }
125
+ deleteSubmissionMutation() {
126
+ return N({ mutationFn: q });
127
+ }
128
+ submitCandidatesMutation() {
129
+ return N({
130
+ mutationFn: Ye,
131
+ onSuccess: async () => {
132
+ await this.queryClient.refetchQueries({
133
+ queryKey: ["training-candidates"],
134
+ exact: !0
135
+ });
136
+ }
137
+ });
138
+ }
139
+ patchSettingsMutation() {
140
+ return N({
141
+ mutationFn: Qe,
142
+ onSuccess: async () => {
143
+ await this.queryClient.refetchQueries({
144
+ queryKey: ["training-settings"],
145
+ exact: !0
146
+ });
147
+ }
148
+ });
149
+ }
150
+ }, et = [
151
+ "person",
152
+ "vehicle",
153
+ "animal",
154
+ "package",
155
+ "face",
156
+ "license_plate"
157
+ ], J = { desktop: {
158
+ maxWidth: "1280px",
159
+ width: "85vw"
160
+ } }, Y = O({ progress: null }), tt = null, X = null, Z = /* @__PURE__ */ new Set(), nt = /* @__PURE__ */ new Set();
161
+ function Q(e, t) {
162
+ for (let n of e) try {
163
+ n(t);
164
+ } catch {}
165
+ }
166
+ async function rt() {
167
+ if (X?.ready.value) try {
168
+ let e = await X.request("get-submit-progress");
169
+ e.active ? Y.progress = e : Y.progress?.active && (Y.progress = null);
170
+ } catch {}
171
+ }
172
+ function it() {
173
+ rt(), Q(Z, {}), Q(nt, void 0);
174
+ }
175
+ function at() {
176
+ return X || (tt = f(!0), tt.run(() => {
177
+ let e = R("/training");
178
+ X = e, e.on("candidates-changed", (e) => Q(Z, e ?? {})), e.on("submit-progress", (e) => {
179
+ Y.progress = e, Q(Z, {});
180
+ }), e.onReady(it);
181
+ }), X);
182
+ }
183
+ function ot() {
184
+ function e() {
185
+ at();
186
+ }
187
+ function t(e) {
188
+ return Z.add(e), () => Z.delete(e);
189
+ }
190
+ function n(e) {
191
+ return nt.add(e), () => nt.delete(e);
192
+ }
193
+ function r() {
194
+ Y.progress = null;
195
+ }
196
+ return {
197
+ submitProgress: h(() => Y.progress),
198
+ connect: e,
199
+ onCandidatesChanged: t,
200
+ onResync: n,
201
+ dismissProgress: r
202
+ };
203
+ }
204
+ //#endregion
205
+ //#region src/components/CuiDialog/templates/TrainingBoxEditor/TrainingBoxEditor.vue?vue&type=script&setup=true&lang.ts
206
+ var st = { class: "flex items-center justify-between gap-2 text-sm" }, ct = { class: "min-w-0 flex items-center gap-2" }, lt = { class: "font-medium truncate" }, ut = { class: "text-muted shrink-0" }, dt = { class: "text-muted tabular-nums shrink-0" }, ft = ["data-stage-zoom"], pt = ["src"], mt = [
207
+ "x",
208
+ "y",
209
+ "width",
210
+ "height",
211
+ "stroke",
212
+ "fill",
213
+ "fill-opacity",
214
+ "stroke-width",
215
+ "onPointerdown"
216
+ ], ht = ["onPointerdown"], gt = ["cx", "cy"], _t = [
217
+ "cx",
218
+ "cy",
219
+ "fill"
220
+ ], vt = [
221
+ "x",
222
+ "y",
223
+ "width",
224
+ "height",
225
+ "stroke",
226
+ "fill"
227
+ ], yt = ["data-box-label", "onPointerdown"], bt = { class: "bbox-label-text" }, xt = {
228
+ key: 0,
229
+ class: "bbox-label-confidence"
230
+ }, St = {
231
+ key: 1,
232
+ class: "bbox-label-confidence"
233
+ }, Ct = ["src"], wt = { class: "absolute inset-0 w-full h-full" }, Tt = [
234
+ "x",
235
+ "y",
236
+ "width",
237
+ "height",
238
+ "stroke",
239
+ "fill"
240
+ ], Et = [
241
+ "x",
242
+ "y",
243
+ "width",
244
+ "height",
245
+ "stroke",
246
+ "fill"
247
+ ], Dt = {
248
+ key: 2,
249
+ class: "absolute left-2 top-1/2 -translate-y-1/2 z-[5] dark-mode"
250
+ }, Ot = {
251
+ key: 3,
252
+ class: "absolute right-2 top-1/2 -translate-y-1/2 z-[5] dark-mode"
253
+ }, kt = {
254
+ key: 0,
255
+ class: "flex items-center justify-center gap-2"
256
+ }, At = {
257
+ class: "text-muted text-sm",
258
+ for: "plate-text"
259
+ }, jt = { class: "flex items-center justify-center gap-1.5" }, Mt = { class: "text-muted text-sm text-center" }, Nt = {
260
+ key: 1,
261
+ class: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 justify-center mx-auto text-sm text-muted"
262
+ }, Pt = .01, Ft = .006, It = 26, Lt = 60, Rt = 400, zt = 110, Bt = 2, Vt = 80, Ht = 50, Ut = .003, Wt = /*#__PURE__*/ we(/* @__PURE__ */ T({
263
+ __name: "TrainingBoxEditor",
264
+ props: {
265
+ candidates: {},
266
+ startId: {},
267
+ cameraName: { type: Function },
268
+ imageUrl: { type: Function },
269
+ onSave: { type: Function },
270
+ onDelete: { type: Function }
271
+ },
272
+ setup(l, { expose: f }) {
273
+ let C = l, T = t("dialogRef"), { t: te, te: ne } = Ae(), ie = Ce(), ae = ot(), se = [
274
+ "nw",
275
+ "ne",
276
+ "sw",
277
+ "se"
278
+ ], ce = /* @__PURE__ */ new Map(), k = O(/* @__PURE__ */ new Set()), A = O(/* @__PURE__ */ new Set()), le = o(/* @__PURE__ */ new Map()), de = 0, fe = Math.max(0, C.candidates.findIndex((e) => e.id === C.startId)), pe = ye(), me = x("rootRef"), j = x("labelMenuRef"), he = x("stageRef"), M = x("frameRef"), N = x("svgRef"), P = E(C.candidates[fe]?.boxes.map((e) => ({ ...e })) ?? []), ve = E({
279
+ w: 16,
280
+ h: 9
281
+ }), I = E(null), L = E(null), R = E(-1), Se = E(!1), we = ke("(any-pointer: fine)"), z = E(null), Te = null, Oe = E(-1), Me = E("person"), B = E(fe), { zoom: Pe, pan: Fe, constraining: Ie, minimapStyle: Le, minimapBoxStyle: Re, onZoomPan: ze, onDoubleClick: Be, onTouchStart: He, onTouchEnd: We, reset: V } = xe(he, M), { height: Ge } = Ee(M), H = h(() => C.candidates[B.value]), Ke = h(() => C.candidates.slice(0, B.value + 1).filter((e) => !k.has(e.id)).length), qe = h(() => C.candidates.filter((e) => !k.has(e.id)).length), Je = h(() => C.candidates.slice(0, B.value).some((e) => !k.has(e.id))), U = h(() => C.candidates.slice(B.value + 1).some((e) => !k.has(e.id))), W = h(() => A.has(H.value.id) ? "verified" : H.value.status), G = h(() => P.value.map((e, t) => ({
282
+ box: e,
283
+ i: t
284
+ })).sort((e, t) => Qe(e) - Qe(t))), K = h(() => P.value[R.value]), Ye = h(() => {
285
+ let e = P.value[R.value];
286
+ return e?.label === "license_plate" ? e : null;
287
+ }), Xe = h(() => [...et.map((e) => ({
288
+ key: e,
289
+ label: $e(e),
290
+ icon: be(e).icon,
291
+ iconProps: { style: { color: be(e).color } },
292
+ active: P.value[Oe.value]?.label === e,
293
+ onClick: () => tn(e)
294
+ })), {
295
+ key: "remove",
296
+ label: te("components.training_editor.remove_box"),
297
+ icon: Ve,
298
+ iconProps: { class: "text-red-500" },
299
+ labelProps: { class: "text-red-500" },
300
+ onClick: () => rn(Oe.value)
301
+ }]), q = h(() => (e) => {
302
+ let t = Ge.value || 360;
303
+ return e.y * t >= It ? "above" : t - (e.y + e.height) * t >= It ? "below" : "inside";
304
+ }), Ze = h(() => (e) => e.x > .7);
305
+ function Qe({ box: e, i: t }) {
306
+ return t === R.value ? 2 ** 53 - 1 : le.get(s(e)) ?? t;
307
+ }
308
+ function $e(e) {
309
+ let t = `components.training_editor.labels.${e}`;
310
+ return ne(t) ? te(t) : e;
311
+ }
312
+ function J(e) {
313
+ return be(e);
314
+ }
315
+ function Y(e) {
316
+ return `${e * 100}%`;
317
+ }
318
+ function tt(e, t) {
319
+ return Y(t === "nw" || t === "sw" ? e.x : e.x + e.width);
320
+ }
321
+ function X(e, t) {
322
+ return Y(t === "nw" || t === "ne" ? e.y : e.y + e.height);
323
+ }
324
+ function Z(e) {
325
+ let t = { backgroundColor: J(e.label).color };
326
+ Ze.value(e) ? t.right = Y(1 - e.x - e.width) : t.left = Y(e.x);
327
+ let n = q.value(e);
328
+ return t.top = n === "above" ? Y(e.y) : n === "below" ? Y(e.y + e.height) : `calc(${Y(e.y)} + 2px)`, t;
329
+ }
330
+ function nt(e) {
331
+ let t = e.target;
332
+ t.naturalWidth && t.naturalHeight && (ve.value = {
333
+ w: t.naturalWidth,
334
+ h: t.naturalHeight
335
+ });
336
+ }
337
+ function Q(e) {
338
+ let t = N.value?.getBoundingClientRect();
339
+ return !t || t.width === 0 || t.height === 0 ? {
340
+ x: 0,
341
+ y: 0
342
+ } : {
343
+ x: Math.min(1, Math.max(0, (e.clientX - t.left) / t.width)),
344
+ y: Math.min(1, Math.max(0, (e.clientY - t.top) / t.height))
345
+ };
346
+ }
347
+ function rt(e, t) {
348
+ I.value = {
349
+ ...t,
350
+ moved: !1
351
+ }, N.value?.setPointerCapture(e.pointerId);
352
+ }
353
+ function it(e) {
354
+ if (j.value?.hide(), Pe.value > 1 || !e.isPrimary) return;
355
+ let { x: t, y: n } = Q(e);
356
+ rt(e, {
357
+ mode: "draw",
358
+ index: -1,
359
+ startX: t,
360
+ startY: n,
361
+ origin: {
362
+ label: Me.value,
363
+ confidence: 1,
364
+ x: t,
365
+ y: n,
366
+ width: 0,
367
+ height: 0
368
+ }
369
+ });
370
+ }
371
+ function at(e, t) {
372
+ if (!t.isPrimary) return;
373
+ let { x: n, y: r } = Q(t);
374
+ R.value = e, rt(t, {
375
+ mode: "move",
376
+ index: e,
377
+ startX: n,
378
+ startY: r,
379
+ origin: { ...P.value[e] }
380
+ });
381
+ }
382
+ function Wt(e, t, n) {
383
+ if (!n.isPrimary) return;
384
+ j.value?.hide();
385
+ let { x: r, y: i } = Q(n);
386
+ R.value = e, rt(n, {
387
+ mode: "resize",
388
+ index: e,
389
+ corner: t,
390
+ startX: r,
391
+ startY: i,
392
+ origin: { ...P.value[e] }
393
+ });
394
+ }
395
+ function Gt(e) {
396
+ e.touches.length > 1 && I.value && (I.value = null, L.value = null, z.value = null), He(e);
397
+ }
398
+ function Kt(e) {
399
+ let t = I.value;
400
+ if (!t) return;
401
+ let { x: n, y: r } = Q(e);
402
+ if (Math.hypot(n - t.startX, r - t.startY) > Ft && (t.moved = !0), e.pointerType === "touch" && t.moved && (Jt(t) ? Yt(e) : z.value = null), t.mode === "draw") {
403
+ if (t.moved) {
404
+ let e = $t(t.startX, t.startY, n, r);
405
+ L.value = e.width >= Pt && e.height >= Pt ? {
406
+ label: Me.value,
407
+ confidence: 1,
408
+ ...e
409
+ } : null;
410
+ }
411
+ return;
412
+ }
413
+ if (t.mode === "move") {
414
+ if (!t.moved) return;
415
+ let e = P.value[t.index];
416
+ 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)));
417
+ return;
418
+ }
419
+ 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;
420
+ Object.assign(P.value[t.index], $t(i, a, n, r));
421
+ }
422
+ function qt(e) {
423
+ let t = I.value;
424
+ if (I.value = null, z.value = null, t) {
425
+ if (t.mode === "draw") {
426
+ L.value && L.value.width >= Pt && L.value.height >= Pt ? (P.value.push({ ...L.value }), R.value = P.value.length - 1) : t.moved || (R.value = -1), L.value = null;
427
+ return;
428
+ }
429
+ t.mode === "move" && !t.moved && en(t.index, e);
430
+ }
431
+ }
432
+ function Jt(e) {
433
+ let t = N.value?.getBoundingClientRect();
434
+ if (!t || t.width === 0) return !1;
435
+ let n = e.mode === "draw" ? L.value : P.value[e.index];
436
+ return !n || Math.max(n.width * t.width, n.height * t.height) <= Ht;
437
+ }
438
+ function Yt(e) {
439
+ let t = M.value?.getBoundingClientRect(), n = he.value?.getBoundingClientRect();
440
+ if (!t || !n || t.width === 0 || t.height === 0) {
441
+ z.value = null;
442
+ return;
443
+ }
444
+ let r = zt / 2, i = Math.min(Math.max(e.clientX - n.left, 59), n.width - r - 4), a = e.clientY - n.top - Vt;
445
+ a - r < 4 && (a = e.clientY - n.top + Vt), z.value = {
446
+ x: i,
447
+ y: a,
448
+ frameW: t.width,
449
+ frameH: t.height,
450
+ tx: r - (e.clientX - t.left) * Bt,
451
+ ty: r - (e.clientY - t.top) * Bt
452
+ };
453
+ }
454
+ function Xt(e) {
455
+ let t = e instanceof HTMLElement || e instanceof SVGElement ? e : null;
456
+ if (!t || he.value?.contains(t) || t.closest(".p-dialog-header") || t.closest("button")) return !1;
457
+ let n = me.value?.closest(".p-dialog-content")?.lastElementChild;
458
+ return !(n && n !== me.value && n.contains(t));
459
+ }
460
+ function Zt(e) {
461
+ if (Te = null, e.touches.length !== 1 || !Xt(e.target)) return;
462
+ let t = e.touches[0];
463
+ Te = {
464
+ x: t.clientX,
465
+ y: t.clientY,
466
+ at: Date.now()
467
+ };
468
+ }
469
+ function Qt(e) {
470
+ let t = Te;
471
+ if (Te = null, !t || e.changedTouches.length !== 1) return;
472
+ let n = e.changedTouches[0], r = n.clientX - t.x, i = n.clientY - t.y;
473
+ Date.now() - t.at <= Rt && Math.abs(r) >= Lt && Math.abs(r) > 2 * Math.abs(i) && $(r < 0 ? 1 : -1);
474
+ }
475
+ function $t(e, t, n, r) {
476
+ return {
477
+ x: Math.min(e, n),
478
+ y: Math.min(t, r),
479
+ width: Math.abs(n - e),
480
+ height: Math.abs(r - t)
481
+ };
482
+ }
483
+ function en(e, t) {
484
+ Oe.value = e;
485
+ let n = M.value?.querySelector(`[data-box-label="${e}"]`);
486
+ j.value?.toggleMenu(t, n ?? void 0);
487
+ }
488
+ function tn(e) {
489
+ let t = P.value[Oe.value];
490
+ t && (t.label = e, t.confidence = 1, Me.value = e);
491
+ }
492
+ function nn(e) {
493
+ let t = P.value[R.value];
494
+ t && (t.text = (e ?? "").toUpperCase().replace(/[^A-Z0-9ÄÖÜ\- ]/g, "") || void 0);
495
+ }
496
+ function rn(e) {
497
+ e < 0 || e >= P.value.length || (P.value.splice(e, 1), R.value = -1);
498
+ }
499
+ function an(e, t = !0) {
500
+ e < 0 || e >= C.candidates.length || (t && ce.set(H.value.id, P.value.map((e) => ({ ...e }))), B.value = e, P.value = (ce.get(H.value.id) ?? H.value.boxes).map((e) => ({ ...e })), L.value = null, I.value = null, z.value = null, R.value = -1, Oe.value = -1, le.clear(), j.value?.hide(), V());
501
+ }
502
+ async function on(e) {
503
+ return await C.onSave(H.value.id, P.value.map((e) => ({ ...e })), e), ce.set(H.value.id, P.value.map((e) => ({ ...e }))), e === "verified" && A.add(H.value.id), $(1, !1) ? null : void 0;
504
+ }
505
+ function $(e, t = !0) {
506
+ let n = B.value + e;
507
+ for (; n >= 0 && n < C.candidates.length && k.has(C.candidates[n].id);) n += e;
508
+ return n < 0 || n >= C.candidates.length ? !1 : (an(n, t), !0);
509
+ }
510
+ async function sn() {
511
+ let e = H.value.id;
512
+ return await C.onDelete(e), ce.delete(e), k.add(e), $(1, !1) || $(-1, !1) ? null : void 0;
513
+ }
514
+ function cn(e) {
515
+ let t = !1;
516
+ for (let n of e) !k.has(n) && C.candidates.some((e) => e.id === n) && (k.add(n), ce.delete(n), n === H.value.id && (t = !0));
517
+ t && (ie.add({
518
+ severity: "warn",
519
+ detail: te("components.training_editor.removed_meanwhile"),
520
+ life: 4e3
521
+ }), !$(1, !1) && !$(-1, !1) && T.value.close({ status: "cancel" }));
522
+ }
523
+ function ln() {
524
+ for (let e of [1, -1]) {
525
+ let t = B.value + e;
526
+ for (; t >= 0 && t < C.candidates.length && k.has(C.candidates[t].id);) t += e;
527
+ let n = C.candidates[t];
528
+ n && (new Image().src = C.imageUrl(n.id));
529
+ }
530
+ }
531
+ function un(e) {
532
+ P.value.length && (R.value = (R.value + e + P.value.length) % P.value.length);
533
+ }
534
+ function dn(e) {
535
+ let t = P.value[R.value];
536
+ if (!t) return;
537
+ let n = et, r = n[(n.indexOf(t.label) + e + n.length) % n.length];
538
+ t.label = r, t.confidence = 1, Me.value = r;
539
+ }
540
+ function fn(e, t, n) {
541
+ let r = P.value[R.value];
542
+ r && (n ? (r.width = Math.min(1 - r.x, Math.max(Pt, r.width + e)), r.height = Math.min(1 - r.y, Math.max(Pt, 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))));
543
+ }
544
+ async function pn() {
545
+ let e = await on("verified");
546
+ e !== null && T.value.close({
547
+ status: "confirm",
548
+ data: e
549
+ });
550
+ }
551
+ _(B, ln, { immediate: !0 }), _(K, (e, t) => {
552
+ t && t !== e && P.value.includes(t) && le.set(s(t), --de);
553
+ }), De(window, "keydown", (e) => {
554
+ if (e.target?.closest?.("input, textarea")) return;
555
+ let t = {
556
+ ArrowLeft: [-.003, 0],
557
+ ArrowRight: [Ut, 0],
558
+ ArrowUp: [0, -.003],
559
+ ArrowDown: [0, Ut]
560
+ };
561
+ if (t[e.key]) {
562
+ if (R.value >= 0) {
563
+ e.preventDefault();
564
+ let [n, r] = t[e.key];
565
+ fn(n, r, e.shiftKey);
566
+ } else !e.repeat && e.key === "ArrowLeft" ? $(-1) : !e.repeat && e.key === "ArrowRight" && $(1);
567
+ return;
568
+ }
569
+ e.repeat || (e.key === "Tab" ? (e.preventDefault(), un(e.shiftKey ? -1 : 1)) : e.key === "Escape" ? (R.value = -1, j.value?.hide()) : (e.key === "Delete" || e.key === "Backspace") && R.value >= 0 ? rn(R.value) : e.key === "s" || e.key === "S" ? dn(e.shiftKey ? -1 : 1) : e.key === " " && !j.value?.isOpen && (e.preventDefault(), pn()));
570
+ }), De(() => me.value?.closest(".p-dialog-content") ?? void 0, "touchstart", Zt, { passive: !0 }), De(() => me.value?.closest(".p-dialog-content") ?? void 0, "touchend", Qt, { passive: !0 }), ae.connect();
571
+ let mn = ae.onCandidatesChanged((e) => {
572
+ e.removed?.length && cn(e.removed);
573
+ });
574
+ return i(() => {
575
+ mn();
576
+ }), f({
577
+ onConfirm: () => on("verified"),
578
+ onCancel: () => sn()
579
+ }), (t, i) => {
580
+ let o = re, s = ge, f = je, h = F, _ = Ne, x = Ue;
581
+ return r(), v("div", {
582
+ ref_key: "rootRef",
583
+ ref: me,
584
+ class: "flex flex-col gap-3 h-full min-h-0"
585
+ }, [
586
+ S("div", st, [S("div", ct, [
587
+ D(o, {
588
+ severity: m(W) === "verified" ? "success" : "info",
589
+ value: t.$t(`views.training.status_${m(W)}`),
590
+ class: "shrink-0"
591
+ }, null, 8, ["severity", "value"]),
592
+ S("span", lt, a(l.cameraName(m(H).cameraId)), 1),
593
+ S("span", ut, a(m(_e)(m(H).createdAt)), 1)
594
+ ]), S("span", dt, a(m(Ke)) + " / " + a(m(qe)), 1)]),
595
+ S("div", {
596
+ ref_key: "stageRef",
597
+ ref: he,
598
+ class: "stage relative w-full bg-black rounded-lg shrink-0 overflow-hidden select-none"
599
+ }, [
600
+ D(m(ue), {
601
+ pan: m(Fe),
602
+ "onUpdate:pan": i[6] ||= (e) => p(Fe) ? Fe.value = e : null,
603
+ zoom: m(Pe),
604
+ "onUpdate:zoom": i[7] ||= (e) => p(Pe) ? Pe.value = e : null,
605
+ "pan-enabled": m(Pe) > 1 && !m(I),
606
+ "enable-control-button": !1,
607
+ "dbl-click-enabled": !1,
608
+ "min-zoom": 1,
609
+ "max-zoom": m(5),
610
+ selector: `[data-stage-zoom='${m(pe)}']`,
611
+ "zoom-origin": "pointer",
612
+ class: ee(["absolute inset-0 flex items-center justify-center", { "zoom-constraining": m(Ie) }]),
613
+ onPanned: m(ze),
614
+ onZoom: m(ze),
615
+ onDblclick: m(Be),
616
+ onTouchstart: Gt,
617
+ onTouchend: m(We)
618
+ }, {
619
+ default: g(() => [S("div", {
620
+ ref_key: "frameRef",
621
+ ref: M,
622
+ "data-stage-zoom": m(pe),
623
+ class: "frame relative",
624
+ style: y({
625
+ "--ar-w": m(ve).w,
626
+ "--ar-h": m(ve).h
627
+ })
628
+ }, [
629
+ S("img", {
630
+ src: l.imageUrl(m(H).id),
631
+ class: "absolute inset-0 w-full h-full",
632
+ draggable: "false",
633
+ onLoad: nt
634
+ }, null, 40, pt),
635
+ (r(), v("svg", {
636
+ ref_key: "svgRef",
637
+ ref: N,
638
+ class: ee(["absolute inset-0 w-full h-full touch-none", m(Pe) > 1 ? "cursor-grab" : "cursor-crosshair"]),
639
+ onPointerdown: it,
640
+ onPointermove: Kt,
641
+ onPointerup: qt,
642
+ onPointercancel: qt
643
+ }, [(r(!0), v(b, null, n(m(G), ({ box: t, i: a }) => (r(), v("g", { key: a }, [S("rect", {
644
+ x: Y(t.x),
645
+ y: Y(t.y),
646
+ width: Y(t.width),
647
+ height: Y(t.height),
648
+ stroke: J(t.label).color,
649
+ fill: J(t.label).color,
650
+ "fill-opacity": a === m(R) ? .22 : .12,
651
+ "stroke-width": a === m(R) ? 3.5 : 2,
652
+ "vector-effect": "non-scaling-stroke",
653
+ class: "cursor-move",
654
+ onPointerdown: e((e) => at(a, e), ["stop"]),
655
+ onTouchstart: i[0] ||= e(() => {}, ["stop"]),
656
+ onMousedown: i[1] ||= e(() => {}, ["stop"])
657
+ }, null, 40, mt), (r(), v(b, null, n(se, (n) => S("g", {
658
+ key: n,
659
+ class: "cursor-nwse-resize",
660
+ onPointerdown: e((e) => Wt(a, n, e), ["stop"]),
661
+ onTouchstart: i[2] ||= e(() => {}, ["stop"]),
662
+ onMousedown: i[3] ||= e(() => {}, ["stop"])
663
+ }, [S("circle", {
664
+ cx: tt(t, n),
665
+ cy: X(t, n),
666
+ r: "14",
667
+ fill: "transparent"
668
+ }, null, 8, gt), S("circle", {
669
+ cx: tt(t, n),
670
+ cy: X(t, n),
671
+ r: "4.5",
672
+ fill: J(t.label).color
673
+ }, null, 8, _t)], 40, ht)), 64))]))), 128)), m(L) ? (r(), v("rect", {
674
+ key: 0,
675
+ x: Y(m(L).x),
676
+ y: Y(m(L).y),
677
+ width: Y(m(L).width),
678
+ height: Y(m(L).height),
679
+ stroke: J(m(L).label).color,
680
+ fill: J(m(L).label).color,
681
+ "fill-opacity": "0.1",
682
+ "stroke-dasharray": "6 4",
683
+ "stroke-width": "2",
684
+ "vector-effect": "non-scaling-stroke"
685
+ }, null, 8, vt)) : d("", !0)], 34)),
686
+ (r(!0), v(b, null, n(m(G), ({ box: t, i: n }) => (r(), v("div", {
687
+ key: `label-${n}`,
688
+ class: ee(["bbox-label cursor-move", {
689
+ "label-bottom": m(q)(t) === "below",
690
+ "label-inside": m(q)(t) === "inside",
691
+ "label-right": m(Ze)(t)
692
+ }]),
693
+ "data-box-label": n,
694
+ onPointerdown: e((e) => at(n, e), ["stop"]),
695
+ onTouchstart: i[4] ||= e(() => {}, ["stop"]),
696
+ onMousedown: i[5] ||= e(() => {}, ["stop"]),
697
+ style: y(Z(t))
698
+ }, [
699
+ (r(), u(c(J(t.label).icon), { class: "bbox-label-icon" })),
700
+ S("span", bt, a($e(t.label)), 1),
701
+ t.text ? (r(), v("span", xt, a(t.text), 1)) : t.confidence < 1 ? (r(), v("span", St, a(Math.round(t.confidence * 100)) + "%", 1)) : d("", !0)
702
+ ], 46, yt))), 128))
703
+ ], 12, ft)]),
704
+ _: 1
705
+ }, 8, [
706
+ "pan",
707
+ "zoom",
708
+ "pan-enabled",
709
+ "max-zoom",
710
+ "selector",
711
+ "class",
712
+ "onPanned",
713
+ "onZoom",
714
+ "onDblclick",
715
+ "onTouchend"
716
+ ]),
717
+ m(Le) ? (r(), v("div", {
718
+ key: 0,
719
+ class: "zoom-minimap",
720
+ style: y(m(Re) ?? void 0)
721
+ }, [S("div", {
722
+ class: "zoom-minimap-viewport",
723
+ style: y(m(Le))
724
+ }, null, 4)], 4)) : d("", !0),
725
+ m(z) ? (r(), v("div", {
726
+ key: 1,
727
+ class: "loupe",
728
+ style: y({
729
+ left: `${m(z).x}px`,
730
+ top: `${m(z).y}px`
731
+ })
732
+ }, [S("div", {
733
+ class: "loupe-content",
734
+ style: y({
735
+ width: `${m(z).frameW}px`,
736
+ height: `${m(z).frameH}px`,
737
+ transform: `translate(${m(z).tx}px, ${m(z).ty}px) scale(${Bt})`
738
+ })
739
+ }, [S("img", {
740
+ src: l.imageUrl(m(H).id),
741
+ class: "absolute inset-0 w-full h-full",
742
+ draggable: "false"
743
+ }, null, 8, Ct), (r(), v("svg", wt, [(r(!0), v(b, null, n(m(P), (e, t) => (r(), v("rect", {
744
+ key: t,
745
+ x: Y(e.x),
746
+ y: Y(e.y),
747
+ width: Y(e.width),
748
+ height: Y(e.height),
749
+ stroke: J(e.label).color,
750
+ fill: J(e.label).color,
751
+ "fill-opacity": "0.1",
752
+ "stroke-width": "1.5"
753
+ }, null, 8, Tt))), 128)), m(L) ? (r(), v("rect", {
754
+ key: 0,
755
+ x: Y(m(L).x),
756
+ y: Y(m(L).y),
757
+ width: Y(m(L).width),
758
+ height: Y(m(L).height),
759
+ stroke: J(m(L).label).color,
760
+ fill: J(m(L).label).color,
761
+ "fill-opacity": "0.1",
762
+ "stroke-dasharray": "4 3",
763
+ "stroke-width": "1.5"
764
+ }, null, 8, Et)) : d("", !0)]))], 4), i[11] ||= S("div", { class: "loupe-crosshair" }, null, -1)], 4)) : d("", !0),
765
+ m(Je) ? (r(), v("div", Dt, [D(f, {
766
+ severity: "secondary",
767
+ rounded: "",
768
+ class: "cui-icon-md opacity-60 hover:opacity-100",
769
+ onClick: i[8] ||= e((e) => $(-1), ["stop"])
770
+ }, {
771
+ icon: g(() => [D(s, {
772
+ width: "100%",
773
+ height: "100%"
774
+ })]),
775
+ _: 1
776
+ })])) : d("", !0),
777
+ m(U) ? (r(), v("div", Ot, [D(f, {
778
+ severity: "secondary",
779
+ rounded: "",
780
+ class: "cui-icon-md opacity-60 hover:opacity-100",
781
+ onClick: i[9] ||= e((e) => $(1), ["stop"])
782
+ }, {
783
+ icon: g(() => [D(h, {
784
+ width: "100%",
785
+ height: "100%"
786
+ })]),
787
+ _: 1
788
+ })])) : d("", !0)
789
+ ], 512),
790
+ m(Ye) ? (r(), v("div", kt, [S("label", At, a(t.$t("components.training_editor.plate_text")), 1), D(_, {
791
+ id: "plate-text",
792
+ "model-value": m(Ye).text ?? "",
793
+ size: "small",
794
+ maxlength: "12",
795
+ class: "w-40 uppercase",
796
+ placeholder: "ABC 1234",
797
+ "onUpdate:modelValue": nn
798
+ }, null, 8, ["model-value"])])) : d("", !0),
799
+ S("div", jt, [S("span", Mt, a(t.$t("components.training_editor.hint")), 1), m(we) ? (r(), u(f, {
800
+ key: 0,
801
+ severity: "secondary",
802
+ text: "",
803
+ rounded: "",
804
+ class: "cui-icon-sm shrink-0",
805
+ onClick: i[10] ||= (e) => Se.value = !m(Se)
806
+ }, {
807
+ icon: g(() => [D(x, { class: "w-4 h-4" })]),
808
+ _: 1
809
+ })) : d("", !0)]),
810
+ m(we) && m(Se) ? (r(), v("div", Nt, [
811
+ i[12] ||= S("span", null, [S("kbd", null, "Tab")], -1),
812
+ S("span", null, a(t.$t("components.training_editor.sc_select")), 1),
813
+ i[13] ||= w(),
814
+ i[14] ||= S("span", null, [S("kbd", null, "←↑→↓")], -1),
815
+ S("span", null, a(t.$t("components.training_editor.sc_move")), 1),
816
+ i[15] ||= w(),
817
+ i[16] ||= S("span", null, [
818
+ S("kbd", null, "Shift"),
819
+ w(" + "),
820
+ S("kbd", null, "←↑→↓")
821
+ ], -1),
822
+ S("span", null, a(t.$t("components.training_editor.sc_resize")), 1),
823
+ i[17] ||= w(),
824
+ i[18] ||= S("span", null, [S("kbd", null, "S")], -1),
825
+ S("span", null, a(t.$t("components.training_editor.sc_label")), 1),
826
+ i[19] ||= w(),
827
+ i[20] ||= S("span", null, [S("kbd", null, "Del")], -1),
828
+ S("span", null, a(t.$t("components.training_editor.sc_delete")), 1),
829
+ i[21] ||= w(),
830
+ i[22] ||= S("span", null, [S("kbd", null, "Esc")], -1),
831
+ S("span", null, a(t.$t("components.training_editor.sc_deselect")), 1),
832
+ i[23] ||= w(),
833
+ i[24] ||= S("span", null, [S("kbd", null, "Space")], -1),
834
+ S("span", null, a(t.$t("components.training_editor.sc_verify")), 1),
835
+ i[25] ||= w(),
836
+ i[26] ||= S("span", null, [
837
+ S("kbd", null, "←"),
838
+ w(" / "),
839
+ S("kbd", null, "→")
840
+ ], -1),
841
+ S("span", null, a(t.$t("components.training_editor.sc_nav")), 1)
842
+ ])) : d("", !0),
843
+ D(oe, {
844
+ ref_key: "labelMenuRef",
845
+ ref: j,
846
+ items: m(Xe),
847
+ popover: { pt: { content: { class: "p-0! rounded-xl! overflow-hidden!" } } }
848
+ }, null, 8, ["items"])
849
+ ], 512);
850
+ };
851
+ }
852
+ }), [["__scopeId", "data-v-fec261db"]]), Gt = { class: "flex flex-col gap-3" }, Kt = {
853
+ key: 0,
854
+ class: "flex flex-col gap-2"
855
+ }, qt = {
856
+ key: 1,
857
+ class: "flex flex-col items-center gap-3 py-10"
858
+ }, Jt = { class: "text-muted text-sm text-center max-w-sm" }, Yt = {
859
+ key: 2,
860
+ class: "flex flex-col items-center gap-3 py-10"
861
+ }, Xt = { class: "text-muted text-sm text-center max-w-sm" }, Zt = { class: "text-muted text-sm" }, Qt = { class: "w-24 aspect-video rounded-lg overflow-hidden bg-black/5 dark:bg-black/30 shrink-0" }, $t = { class: "flex-1 min-w-0" }, en = { class: "flex flex-wrap items-center gap-1" }, tn = { class: "text-xs text-muted mt-1" }, nn = {
862
+ key: 0,
863
+ class: "flex justify-center py-2"
864
+ }, rn = /* @__PURE__ */ T({
865
+ __name: "TrainingSubmissions",
866
+ setup(e) {
867
+ let t = new $e(), { t: o, te: s } = Ae(), ee = Ce(), c = ot(), l = t.deleteSubmissionMutation(), f = E(""), p = E([]), h = E(0), w = E(), T = E(!0), O = E(!1), ne = E(!1), ie = x("loadMoreRef");
868
+ function ae(e) {
869
+ let t = {};
870
+ for (let n of e.labels) t[n.label] = (t[n.label] ?? 0) + 1;
871
+ return t;
872
+ }
873
+ function oe(e) {
874
+ let t = `components.training_editor.labels.${e}`;
875
+ return s(t) ? o(t) : e;
876
+ }
877
+ async function se() {
878
+ T.value = p.value.length === 0;
879
+ try {
880
+ let e = await Xe();
881
+ p.value = e.items, h.value = e.total ?? e.items.length, w.value = e.nextCursor, ne.value = !1;
882
+ } catch {
883
+ ne.value = !0;
884
+ } finally {
885
+ T.value = !1;
886
+ }
887
+ }
888
+ async function ce() {
889
+ let e = w.value;
890
+ if (e && !O.value) {
891
+ O.value = !0;
892
+ try {
893
+ let t = await Xe({ cursor: e }), n = new Set(p.value.map((e) => e.id));
894
+ p.value.push(...t.items.filter((e) => !n.has(e.id))), w.value = t.nextCursor;
895
+ } catch (e) {
896
+ ee.add({
897
+ severity: "error",
898
+ detail: e?.message ?? String(e),
899
+ life: 5e3
900
+ });
901
+ } finally {
902
+ O.value = !1;
903
+ }
904
+ }
905
+ }
906
+ async function k(e) {
907
+ f.value = e;
908
+ try {
909
+ await l.mutateAsync(e), p.value = p.value.filter((t) => t.id !== e), h.value = Math.max(0, h.value - 1);
910
+ } catch (e) {
911
+ ee.add({
912
+ severity: "error",
913
+ detail: e?.message ?? String(e),
914
+ life: 5e3
915
+ });
916
+ } finally {
917
+ f.value = "";
918
+ }
919
+ }
920
+ Te(ie, ([e]) => {
921
+ e?.isIntersecting && ce();
922
+ }), _(() => c.submitProgress.value?.active, (e, t) => {
923
+ t && !e && se();
924
+ });
925
+ let A = c.onResync(() => {
926
+ se();
927
+ });
928
+ return i(() => {
929
+ A();
930
+ }), se(), (e, t) => {
931
+ let i = L, o = ze, s = de, ee = Se, c = re, _ = Ve, x = je, E = Le, se = te;
932
+ return r(), v("div", Gt, [m(T) ? (r(), v("div", Kt, [(r(), v(b, null, n(4, (e) => D(i, {
933
+ key: e,
934
+ height: "72px",
935
+ "border-radius": "12px"
936
+ })), 64))])) : m(ne) ? (r(), v("div", qt, [D(o, { class: "w-10 h-10 text-muted" }), S("span", Jt, a(e.$t("components.training_submissions.load_failed")), 1)])) : m(p).length ? (r(), v(b, { key: 3 }, [
937
+ S("span", Zt, a(e.$t("components.training_submissions.count", m(h))), 1),
938
+ (r(!0), v(b, null, n(m(p), (t) => (r(), v("div", {
939
+ key: t.id,
940
+ class: "cui-card h-auto! shrink-0 p-2 flex items-center gap-3"
941
+ }, [
942
+ S("div", Qt, [D(ee, {
943
+ src: t.imageUrl,
944
+ "image-container-class": "w-full h-full",
945
+ "image-style": { objectFit: "cover" }
946
+ }, null, 8, ["src"])]),
947
+ S("div", $t, [S("div", en, [(r(!0), v(b, null, n(ae(t), (e, t) => (r(), v("span", {
948
+ key: t,
949
+ class: "px-1.5 py-0.5 rounded text-xs font-medium text-white",
950
+ style: y({ backgroundColor: m(be)(String(t)).color })
951
+ }, a(oe(String(t))) + " ×" + a(e), 5))), 128))]), S("div", tn, a(m(_e)(new Date(t.createdAt).getTime())), 1)]),
952
+ D(c, {
953
+ severity: t.usedInWave ? "success" : "info",
954
+ value: t.usedInWave ? e.$t("components.training_submissions.status_trained") : e.$t("components.training_submissions.status_pool"),
955
+ class: "shrink-0"
956
+ }, null, 8, ["severity", "value"]),
957
+ C((r(), u(x, {
958
+ severity: "danger",
959
+ text: "",
960
+ rounded: "",
961
+ class: "cui-icon-sm shrink-0",
962
+ loading: m(l).isPending.value && m(f) === t.id,
963
+ onClick: (e) => k(t.id)
964
+ }, {
965
+ icon: g(() => [D(_, {
966
+ width: "100%",
967
+ height: "100%"
968
+ })]),
969
+ _: 1
970
+ }, 8, ["loading", "onClick"])), [[
971
+ se,
972
+ e.$t("components.training_submissions.delete"),
973
+ void 0,
974
+ { left: !0 }
975
+ ]])
976
+ ]))), 128)),
977
+ m(O) ? (r(), v("div", nn, [D(E, { class: "w-5 h-5 text-primary" })])) : m(w) ? (r(), v("div", {
978
+ key: 1,
979
+ ref_key: "loadMoreRef",
980
+ ref: ie,
981
+ class: "h-px"
982
+ }, null, 512)) : d("", !0)
983
+ ], 64)) : (r(), v("div", Yt, [D(s, { class: "w-10 h-10 text-muted" }), S("span", Xt, a(e.$t("components.training_submissions.empty")), 1)]))]);
984
+ };
985
+ }
986
+ }), an = { desktop: {
987
+ maxWidth: "720px",
988
+ width: "90vw"
989
+ } }, on = { class: "flex flex-col" }, $ = {
990
+ key: 0,
991
+ class: "page-title"
992
+ }, sn = { class: "font-semibold text-xl truncate" }, cn = { class: "flex gap-2 mb-4" }, ln = {
993
+ key: 1,
994
+ class: "cui-card h-auto! shrink-0 px-3 py-2 mb-4 flex items-center gap-3"
995
+ }, un = { class: "flex-1 min-w-0" }, dn = { class: "text-sm" }, fn = { class: "flex-1 text-sm" }, pn = { class: "p-3" }, mn = {
996
+ key: 3,
997
+ class: "flex flex-1 min-h-0 flex-col items-center justify-center w-full gap-4 py-16"
998
+ }, hn = { class: "text-muted text-sm text-center max-w-md" }, gn = { class: "relative flex-1 min-h-0 overflow-hidden bg-black/5 dark:bg-black/30" }, _n = { class: "absolute top-1.5 left-1.5 flex flex-wrap gap-1" }, vn = {
999
+ key: 0,
1000
+ class: "absolute bottom-1.5 left-1.5"
1001
+ }, yn = {
1002
+ key: 1,
1003
+ class: "absolute top-1.5 right-1.5 dark-mode"
1004
+ }, bn = { class: "flex items-center justify-between gap-2" }, xn = { class: "flex items-center gap-2 min-w-0" }, Sn = { class: "min-w-0" }, Cn = { class: "font-medium truncate" }, wn = { class: "text-xs text-muted" }, Tn = 40, En = /*#__PURE__*/ we(/* @__PURE__ */ T({
1005
+ __name: "Training",
1006
+ setup(t) {
1007
+ let o = new I(), s = new $e(), { t: c, te: l } = Ae(), f = ve(), T = Ce(), { smBreakpoint: O } = le(), A = s.getCandidatesQuery(), ue = s.getSettingsQuery(), de = s.patchCandidateMutation(), j = s.deleteCandidateMutation(), M = s.patchSettingsMutation(), ge = s.submitCandidatesMutation(), N = ot(), { data: ye } = o.getCamerasQuery({
1008
+ page: 1,
1009
+ pageSize: -1
1010
+ }), F = E(""), xe = E(Tn), R = x("cameraMenuRef"), we = x("settingsMenuRef"), Ee = x("loadMoreRef"), De = h(() => ({ gridTemplateColumns: `repeat(auto-fill, minmax(${O.value ? "220px" : "260px"}, 1fr))` })), ke = h(() => {
1011
+ let e = [...new Set((A.data.value ?? []).map((e) => X(e.cameraId)))].sort((e, t) => e.localeCompare(t));
1012
+ return [{
1013
+ key: "all",
1014
+ label: c("views.training.all_cameras"),
1015
+ active: F.value === "",
1016
+ onClick: () => {
1017
+ F.value = "";
1018
+ }
1019
+ }, ...e.map((e) => ({
1020
+ key: e,
1021
+ label: e,
1022
+ active: F.value === e,
1023
+ onClick: () => {
1024
+ F.value = e;
1025
+ }
1026
+ }))];
1027
+ }), Ue = h(() => [{
1028
+ key: "collect",
1029
+ label: c("views.training.collection_enabled"),
1030
+ description: c("views.training.collection_hint"),
1031
+ toggle: !0,
1032
+ toggleState: ue.data.value?.enabled ?? !0,
1033
+ onClick: () => {
1034
+ ft(!(ue.data.value?.enabled ?? !0));
1035
+ }
1036
+ }]), V = h(() => {
1037
+ let e = F.value.trim().toLowerCase();
1038
+ return e ? (A.data.value ?? []).filter((t) => X(t.cameraId).toLowerCase().includes(e)) : A.data.value ?? [];
1039
+ }), Ge = h(() => V.value.slice(0, xe.value)), Ke = h(() => V.value.length > Ge.value.length), qe = h(() => (A.data.value ?? []).filter((e) => G(e)).length), U = h(() => N.submitProgress.value ? N.submitProgress.value : qe.value > 0 ? {
1040
+ active: !0,
1041
+ total: qe.value,
1042
+ done: 0,
1043
+ failed: 0
1044
+ } : null), W = h(() => V.value.filter((e) => !G(e)));
1045
+ function G(e) {
1046
+ return e.upload === "queued" || e.upload === "uploading";
1047
+ }
1048
+ let { selectionMode: K, selectedIds: Ye, allSelected: Xe, bulkBusy: q, enterSelectionMode: Ze, exitSelectionMode: Qe, toggleSelectAll: et, toggleSelection: Y } = z(W, (e) => e.id), tt = h(() => [...Ye.value].filter((e) => A.data.value?.find((t) => t.id === e)?.status === "verified"));
1049
+ function X(e) {
1050
+ return ye.value?.result?.find((t) => t._id === e)?.name ?? e;
1051
+ }
1052
+ function Z(e) {
1053
+ return P(`/api/training/candidates/${e}/image`) ?? "";
1054
+ }
1055
+ function nt(e) {
1056
+ let t = `components.training_editor.labels.${e}`;
1057
+ return l(t) ? c(t) : e;
1058
+ }
1059
+ function Q(e) {
1060
+ let t = {};
1061
+ for (let n of e.boxes) t[n.label] = (t[n.label] ?? 0) + 1;
1062
+ return t;
1063
+ }
1064
+ function rt(e) {
1065
+ return e === "verified" ? "success" : "info";
1066
+ }
1067
+ function it() {
1068
+ xe.value += Tn;
1069
+ }
1070
+ function at(e) {
1071
+ if (!G(e)) {
1072
+ if (K.value) {
1073
+ Y(e.id);
1074
+ return;
1075
+ }
1076
+ st(e);
1077
+ }
1078
+ }
1079
+ function st(e) {
1080
+ f.openComponentDialog(Wt, {
1081
+ data: {
1082
+ title: c("views.training.title"),
1083
+ cancelText: c("components.form.button.remove"),
1084
+ confirmText: c("components.training_editor.verify"),
1085
+ cancelButtonProps: { severity: "danger" },
1086
+ contentProps: {
1087
+ candidates: V.value.map((e) => ({ ...e })),
1088
+ startId: e.id,
1089
+ cameraName: X,
1090
+ imageUrl: Z,
1091
+ onSave: async (e, t, n) => {
1092
+ await de.mutateAsync({
1093
+ id: e,
1094
+ patch: {
1095
+ boxes: t,
1096
+ status: n
1097
+ }
1098
+ });
1099
+ },
1100
+ onDelete: async (e) => {
1101
+ await j.mutateAsync(e);
1102
+ }
1103
+ }
1104
+ },
1105
+ dialogSize: J
1106
+ });
1107
+ }
1108
+ function ct() {
1109
+ f.openComponentDialog(rn, {
1110
+ data: {
1111
+ title: c("views.training.submissions"),
1112
+ hideConfirmButton: !0,
1113
+ cancelText: c("components.form.button.close"),
1114
+ contentProps: {}
1115
+ },
1116
+ dialogSize: an
1117
+ });
1118
+ }
1119
+ function lt() {
1120
+ let e = tt.value;
1121
+ e.length && !ge.isPending.value && f.openTextDialog({
1122
+ data: {
1123
+ title: c("components.dialog.title.confirm"),
1124
+ contentText: c("views.training.submit_confirm", { count: e.length }),
1125
+ confirmText: c("views.training.submit")
1126
+ },
1127
+ onConfirm: async () => {
1128
+ try {
1129
+ await ge.mutateAsync(e), Qe();
1130
+ } catch (e) {
1131
+ T.add({
1132
+ severity: "error",
1133
+ detail: e?.message ?? String(e),
1134
+ life: 8e3
1135
+ });
1136
+ }
1137
+ }
1138
+ });
1139
+ }
1140
+ function ut() {
1141
+ let e = [...Ye.value];
1142
+ e.length && !q.value && f.openTextDialog({
1143
+ data: {
1144
+ title: c("components.dialog.title.confirm"),
1145
+ contentText: c("views.training.delete_selected_confirm", { count: e.length }),
1146
+ confirmText: c("components.form.button.remove"),
1147
+ confirmButtonProps: { severity: "danger" }
1148
+ },
1149
+ onConfirm: async () => {
1150
+ q.value = !0;
1151
+ try {
1152
+ for (let t of e) await j.mutateAsync(t);
1153
+ Qe(), T.add({
1154
+ severity: "success",
1155
+ detail: c("views.training.delete_selected_done", { count: e.length }),
1156
+ life: 5e3
1157
+ });
1158
+ } catch (e) {
1159
+ T.add({
1160
+ severity: "error",
1161
+ detail: e?.message ?? String(e),
1162
+ life: 5e3
1163
+ });
1164
+ } finally {
1165
+ q.value = !1;
1166
+ }
1167
+ }
1168
+ });
1169
+ }
1170
+ async function dt(e) {
1171
+ await j.mutateAsync(e.id);
1172
+ }
1173
+ async function ft(e) {
1174
+ await M.mutateAsync({ enabled: e });
1175
+ }
1176
+ _(F, () => {
1177
+ xe.value = Tn;
1178
+ }), Te(Ee, ([e]) => {
1179
+ e?.isIntersecting && it();
1180
+ }), N.connect();
1181
+ let pt = N.onCandidatesChanged(() => {
1182
+ A.refetch();
1183
+ });
1184
+ return i(() => {
1185
+ pt();
1186
+ }), (t, i) => {
1187
+ let o = He, s = je, l = k, f = Re, h = B, _ = Ne, x = Me, T = ne, E = ce, le = ae, ue = H, de = We, j = Le, M = Ie, P = ze, ve = Be, ye = Fe, I = L, xe = he, Ce = Se, z = re, Te = Ve, Ae = Pe, qe = Oe, W = fe, $e = se, J = te;
1188
+ return r(), v("div", on, [
1189
+ m(O) ? d("", !0) : (r(), v("h1", $, a(t.$t("views.training.title")), 1)),
1190
+ D(l, { position: "left" }, {
1191
+ default: g(() => [D(s, {
1192
+ severity: "secondary",
1193
+ text: "",
1194
+ class: "cui-button p-2 text-color non-draggable-region",
1195
+ onClick: i[0] ||= (e) => t.$router.push("/menu")
1196
+ }, {
1197
+ icon: g(() => [D(o, { class: "w-6 h-6" })]),
1198
+ _: 1
1199
+ })]),
1200
+ _: 1
1201
+ }),
1202
+ D(l, { position: "center" }, {
1203
+ default: g(() => [S("span", sn, a(t.$t("views.training.title")), 1)]),
1204
+ _: 1
1205
+ }),
1206
+ S("div", cn, [
1207
+ D(le, { class: "flex-1" }, {
1208
+ default: g(() => [D(x, { class: "flex-1" }, {
1209
+ default: g(() => [D(h, null, {
1210
+ default: g(() => [D(f, { class: "w-4 h-4" })]),
1211
+ _: 1
1212
+ }), D(_, {
1213
+ modelValue: m(F),
1214
+ "onUpdate:modelValue": i[1] ||= (e) => p(F) ? F.value = e : null,
1215
+ placeholder: m(c)("views.training.search"),
1216
+ class: "w-full"
1217
+ }, null, 8, ["modelValue", "placeholder"])]),
1218
+ _: 1
1219
+ }), D(E, null, {
1220
+ default: g(() => [D(s, {
1221
+ severity: "secondary",
1222
+ text: "",
1223
+ class: "text-color",
1224
+ onClick: i[2] ||= (e) => m(R)?.toggleMenu(e)
1225
+ }, {
1226
+ icon: g(() => [D(T, { class: ee(["w-4 h-4 transform transition-transform duration-300", { "rotate-180": m(R)?.isOpen }]) }, null, 8, ["class"])]),
1227
+ _: 1
1228
+ })]),
1229
+ _: 1
1230
+ })]),
1231
+ _: 1
1232
+ }),
1233
+ C((r(), u(s, {
1234
+ severity: "secondary",
1235
+ outlined: "",
1236
+ class: "cui-button shrink-0",
1237
+ onClick: ct
1238
+ }, {
1239
+ icon: g(() => [D(ue, { class: "w-4.5 h-4.5" })]),
1240
+ _: 1
1241
+ })), [[
1242
+ J,
1243
+ { value: t.$t("views.training.submissions") },
1244
+ void 0,
1245
+ { left: !0 }
1246
+ ]]),
1247
+ C((r(), u(s, {
1248
+ severity: "secondary",
1249
+ outlined: "",
1250
+ class: "cui-button shrink-0",
1251
+ onClick: i[3] ||= (e) => m(we)?.toggleMenu(e)
1252
+ }, {
1253
+ icon: g(() => [D(de, { class: "w-4.5 h-4.5" })]),
1254
+ _: 1
1255
+ })), [[
1256
+ J,
1257
+ { value: t.$t("views.training.collection") },
1258
+ void 0,
1259
+ { left: !0 }
1260
+ ]])
1261
+ ]),
1262
+ m(U) ? (r(), v("div", ln, [m(U).active ? (r(), v(b, { key: 0 }, [D(j, { class: "w-4 h-4 text-primary shrink-0" }), S("div", un, [S("div", dn, a(t.$t("views.training.upload_progress", {
1263
+ done: m(U).done + m(U).failed,
1264
+ total: m(U).total
1265
+ })), 1), D(M, {
1266
+ value: m(U).total ? Math.round((m(U).done + m(U).failed) / m(U).total * 100) : 0,
1267
+ "show-value": !1,
1268
+ style: { height: "6px" },
1269
+ class: "mt-1.5"
1270
+ }, null, 8, ["value"])])], 64)) : (r(), v(b, { key: 1 }, [
1271
+ m(U).failed ? (r(), u(P, {
1272
+ key: 0,
1273
+ class: "w-5 h-5 text-red-500 shrink-0"
1274
+ })) : (r(), u(ve, {
1275
+ key: 1,
1276
+ class: "w-5 h-5 text-green-500 shrink-0"
1277
+ })),
1278
+ S("span", fn, [w(a(t.$t("views.training.submit_done", m(U).done)), 1), m(U).failed ? (r(), v(b, { key: 0 }, [w(" · " + a(t.$t("views.training.upload_failed_summary", { count: m(U).failed })), 1)], 64)) : d("", !0)]),
1279
+ D(s, {
1280
+ severity: "secondary",
1281
+ text: "",
1282
+ rounded: "",
1283
+ class: "cui-icon-sm shrink-0",
1284
+ onClick: i[4] ||= (e) => m(N).dismissProgress()
1285
+ }, {
1286
+ icon: g(() => [D(ye, { class: "w-4 h-4" })]),
1287
+ _: 1
1288
+ })
1289
+ ], 64))])) : d("", !0),
1290
+ m(A).isLoading.value && !m(A).data.value ? (r(), v("div", {
1291
+ key: 2,
1292
+ class: "grid w-full gap-3 p-px",
1293
+ style: y(m(De))
1294
+ }, [(r(), v(b, null, n(8, (e) => S("div", {
1295
+ key: e,
1296
+ class: "cui-card overflow-hidden"
1297
+ }, [D(I, {
1298
+ class: "aspect-video",
1299
+ width: "100%",
1300
+ height: "100%"
1301
+ }), S("div", pn, [D(I, {
1302
+ height: "14px",
1303
+ width: "70%",
1304
+ class: "mb-1"
1305
+ }), D(I, {
1306
+ height: "12px",
1307
+ width: "40%"
1308
+ })])])), 64))], 4)) : m(V).length === 0 ? (r(), v("div", mn, [D(xe, { class: "w-12 h-12 text-muted" }), S("span", hn, a(t.$t("views.training.no_candidates")), 1)])) : (r(), v(b, { key: 4 }, [S("div", {
1309
+ class: "grid w-full gap-3 p-px",
1310
+ style: y(m(De))
1311
+ }, [(r(!0), v(b, null, n(m(Ge), (o) => (r(), u(qe, {
1312
+ key: o.id,
1313
+ class: "cui-card cui-training-card overflow-hidden transition-shadow cursor-pointer hover:shadow-md aspect-[1.17] flex flex-col",
1314
+ pt: {
1315
+ header: { class: "flex-1 min-h-0 flex" },
1316
+ body: {
1317
+ class: "shrink-0",
1318
+ style: "height: auto"
1319
+ }
1320
+ },
1321
+ onClick: (e) => at(o)
1322
+ }, {
1323
+ header: g(() => [S("div", gn, [
1324
+ D(Ce, {
1325
+ class: "absolute inset-0",
1326
+ src: Z(o.id),
1327
+ alt: X(o.cameraId),
1328
+ "image-container-class": "w-full h-full",
1329
+ "image-style": { objectFit: "cover" }
1330
+ }, null, 8, ["src", "alt"]),
1331
+ S("div", _n, [(r(!0), v(b, null, n(Q(o), (e, t) => (r(), v("span", {
1332
+ key: t,
1333
+ class: "px-1.5 py-0.5 rounded text-xs font-medium text-white",
1334
+ style: y({ backgroundColor: m(be)(String(t)).color })
1335
+ }, a(nt(String(t))) + " ×" + a(e), 5))), 128))]),
1336
+ o.upload ? (r(), v("div", vn, [o.upload === "failed" ? C((r(), u(z, {
1337
+ key: 0,
1338
+ severity: "danger",
1339
+ value: t.$t("views.training.upload_failed")
1340
+ }, null, 8, ["value"])), [[
1341
+ J,
1342
+ o.uploadError,
1343
+ void 0,
1344
+ { top: !0 }
1345
+ ]]) : o.upload === "uploading" ? (r(), u(z, {
1346
+ key: 1,
1347
+ severity: "info",
1348
+ value: t.$t("views.training.upload_uploading")
1349
+ }, null, 8, ["value"])) : (r(), u(z, {
1350
+ key: 2,
1351
+ severity: "secondary",
1352
+ value: t.$t("views.training.upload_queued")
1353
+ }, null, 8, ["value"]))])) : d("", !0),
1354
+ !m(K) && !G(o) ? (r(), v("div", yn, [C((r(), u(s, {
1355
+ severity: "secondary",
1356
+ rounded: "",
1357
+ size: "small",
1358
+ class: "cui-icon-sm text-white",
1359
+ onClick: e((e) => dt(o), ["stop"])
1360
+ }, {
1361
+ icon: g(() => [D(Te, {
1362
+ width: "100%",
1363
+ height: "100%"
1364
+ })]),
1365
+ _: 1
1366
+ }, 8, ["onClick"])), [[
1367
+ J,
1368
+ t.$t("views.training.delete_candidate"),
1369
+ void 0,
1370
+ { top: !0 }
1371
+ ]])])) : d("", !0)
1372
+ ])]),
1373
+ content: g(() => [S("div", bn, [S("div", xn, [m(K) && !G(o) ? (r(), u(Ae, {
1374
+ key: 0,
1375
+ "model-value": m(Ye).has(o.id),
1376
+ binary: "",
1377
+ size: "small",
1378
+ onClick: i[5] ||= e(() => {}, ["stop"]),
1379
+ "onUpdate:modelValue": (e) => m(Y)(o.id)
1380
+ }, null, 8, ["model-value", "onUpdate:modelValue"])) : d("", !0), S("div", Sn, [S("div", Cn, a(X(o.cameraId)), 1), S("div", wn, a(m(_e)(o.createdAt)), 1)])]), D(z, {
1381
+ severity: rt(o.status),
1382
+ value: t.$t(`views.training.status_${o.status}`)
1383
+ }, null, 8, ["severity", "value"])])]),
1384
+ _: 2
1385
+ }, 1032, ["onClick"]))), 128))], 4), m(Ke) ? (r(), v("div", {
1386
+ key: 0,
1387
+ ref_key: "loadMoreRef",
1388
+ ref: Ee,
1389
+ class: "h-px"
1390
+ }, null, 512)) : d("", !0)], 64)),
1391
+ m(V).length || m(K) ? (r(), u($e, {
1392
+ key: 5,
1393
+ "force-visible": m(K)
1394
+ }, {
1395
+ default: g(() => [m(K) ? (r(), v(b, { key: 1 }, [
1396
+ D(W, {
1397
+ grouped: "",
1398
+ "tooltip-props": { value: t.$t("components.form.tooltip.cancel_selection") },
1399
+ "button-props": { severity: "secondary" },
1400
+ icon: m(Fe),
1401
+ "icon-props": {
1402
+ width: "100%",
1403
+ height: "100%"
1404
+ },
1405
+ onClick: m(Qe)
1406
+ }, null, 8, [
1407
+ "tooltip-props",
1408
+ "icon",
1409
+ "onClick"
1410
+ ]),
1411
+ D(W, {
1412
+ grouped: "",
1413
+ "tooltip-props": { value: m(Xe) ? t.$t("views.training.deselect_all") : t.$t("views.training.select_all") },
1414
+ "button-props": { severity: m(Xe) ? "primary" : "secondary" },
1415
+ icon: m(me),
1416
+ "icon-props": {
1417
+ width: "100%",
1418
+ height: "100%"
1419
+ },
1420
+ onClick: m(et)
1421
+ }, null, 8, [
1422
+ "tooltip-props",
1423
+ "button-props",
1424
+ "icon",
1425
+ "onClick"
1426
+ ]),
1427
+ D(W, {
1428
+ grouped: "",
1429
+ "tooltip-props": { value: t.$t("views.training.submit_selected") },
1430
+ "button-props": { disabled: !m(tt).length || m(ge).isPending.value },
1431
+ icon: m(Je),
1432
+ "icon-props": {
1433
+ width: "100%",
1434
+ height: "100%"
1435
+ },
1436
+ onClick: lt
1437
+ }, null, 8, [
1438
+ "tooltip-props",
1439
+ "button-props",
1440
+ "icon"
1441
+ ]),
1442
+ D(W, {
1443
+ grouped: "",
1444
+ "tooltip-props": { value: t.$t("views.training.delete_selected") },
1445
+ "button-props": {
1446
+ severity: "danger",
1447
+ disabled: !m(Ye).size || m(q)
1448
+ },
1449
+ icon: m(pe),
1450
+ "icon-props": {
1451
+ width: "100%",
1452
+ height: "100%"
1453
+ },
1454
+ onClick: ut
1455
+ }, null, 8, [
1456
+ "tooltip-props",
1457
+ "button-props",
1458
+ "icon"
1459
+ ])
1460
+ ], 64)) : (r(), u(W, {
1461
+ key: 0,
1462
+ grouped: "",
1463
+ "tooltip-props": { value: t.$t("views.training.select") },
1464
+ "button-props": { severity: "secondary" },
1465
+ icon: m(ie),
1466
+ "icon-props": {
1467
+ width: "100%",
1468
+ height: "100%"
1469
+ },
1470
+ onClick: m(Ze)
1471
+ }, null, 8, [
1472
+ "tooltip-props",
1473
+ "icon",
1474
+ "onClick"
1475
+ ]))]),
1476
+ _: 1
1477
+ }, 8, ["force-visible"])) : d("", !0),
1478
+ D(oe, {
1479
+ ref_key: "cameraMenuRef",
1480
+ ref: R,
1481
+ items: m(ke),
1482
+ popover: { pt: { content: { class: "p-0! rounded-xl! overflow-hidden!" } } }
1483
+ }, null, 8, ["items"]),
1484
+ D(oe, {
1485
+ ref_key: "settingsMenuRef",
1486
+ ref: we,
1487
+ items: m(Ue),
1488
+ "auto-hide": !1,
1489
+ popover: { pt: {
1490
+ root: { class: "w-[22rem]" },
1491
+ content: { class: "p-0! rounded-xl! overflow-hidden!" }
1492
+ } }
1493
+ }, null, 8, ["items"])
1494
+ ]);
1495
+ };
1496
+ }
1497
+ }), [["__scopeId", "data-v-84e470e7"]]);
1498
+ //#endregion
1499
+ export { En as default };