@camera.ui/server 2.2.5-beta.2 → 2.2.5-beta.4

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 (420) hide show
  1. package/dist/interface/assets/{404-BDvtK1qR.js → 404-YZOLos9r.js} +1 -1
  2. package/dist/interface/assets/{About-B4A35rRx.js → About-HtxMc8JZ.js} +1 -1
  3. package/dist/interface/assets/Assistant-bB8RBo-m.js +1 -0
  4. package/dist/interface/assets/Automation-D3DcUyui.js +3 -0
  5. package/dist/interface/assets/{AutomationImport-CEJdhE_d.js → AutomationImport-Dp_hT6hQ.js} +2 -2
  6. package/dist/interface/assets/AutomationStore-BKR7GXMk.js +2 -0
  7. package/dist/interface/assets/{AutomationStoreDetail-BenRMMtV.js → AutomationStoreDetail-B9yh51WQ.js} +2 -2
  8. package/dist/interface/assets/Automations-BdZZW2eN.js +2 -0
  9. package/dist/interface/assets/Camera-Ct7ndOxr.js +2 -0
  10. package/dist/interface/assets/{CameraConsole-D24yXOQn.js → CameraConsole-BI93OaRt.js} +2 -2
  11. package/dist/interface/assets/Cameras-Ctub8sVt.js +651 -0
  12. package/dist/interface/assets/Camview-BjQdTHNh.js +1 -0
  13. package/dist/interface/assets/{CertificateUpload-26LAL4MY.js → CertificateUpload-xW55NA1Q.js} +1 -1
  14. package/dist/interface/assets/Config-CBTbYd5v.js +2 -0
  15. package/dist/interface/assets/{ConfigActionAssistant-Cl_kr3hp.js → ConfigActionAssistant-B488rOp5.js} +1 -1
  16. package/dist/interface/assets/{ConfigActionCameraControl-CL4vXcNe.js → ConfigActionCameraControl-ZMUuBxOs.js} +1 -1
  17. package/dist/interface/assets/{ConfigActionDelay-DtPgmqWh.js → ConfigActionDelay-BJ11xvOW.js} +1 -1
  18. package/dist/interface/assets/{ConfigActionHttp-DnkZTP5l.js → ConfigActionHttp-DOUo69OR.js} +1 -1
  19. package/dist/interface/assets/{ConfigActionImageInput-3svn6YP9.js → ConfigActionImageInput-BMzuVZW9.js} +1 -1
  20. package/dist/interface/assets/{ConfigActionMqtt-BTsFTLgm.js → ConfigActionMqtt-Co_uksca.js} +1 -1
  21. package/dist/interface/assets/{ConfigActionNotification-Cr4xJrZp.js → ConfigActionNotification-CcZkstYx.js} +1 -1
  22. package/dist/interface/assets/{ConfigActionNotificationControl-Cxkb_g8p.js → ConfigActionNotificationControl--VeucoTw.js} +1 -1
  23. package/dist/interface/assets/{ConfigActionOutput-WTr7FGf_.js → ConfigActionOutput-CyDa1LGA.js} +1 -1
  24. package/dist/interface/assets/{ConfigActionPlugin-BpcJepbD.js → ConfigActionPlugin-Kfg3ZEQF.js} +1 -1
  25. package/dist/interface/assets/{ConfigActionSensor-BgD_F-hD.js → ConfigActionSensor-DhAF0HPw.js} +1 -1
  26. package/dist/interface/assets/{ConfigActionSnapshot-DjR-Z08N.js → ConfigActionSnapshot-zMe3SPvW.js} +1 -1
  27. package/dist/interface/assets/{ConfigActionVariable-gPuPbjpm.js → ConfigActionVariable-BE5q3NwY.js} +1 -1
  28. package/dist/interface/assets/{ConfigConditionIfElse-CUHKJmPx.js → ConfigConditionIfElse-BNIRtSVD.js} +1 -1
  29. package/dist/interface/assets/{ConfigConditionSensorState-D-gPRqMu.js → ConfigConditionSensorState-DTNd-SzI.js} +1 -1
  30. package/dist/interface/assets/{ConfigConditionSwitch-BRf1T5tJ.js → ConfigConditionSwitch-BU5wWMU1.js} +1 -1
  31. package/dist/interface/assets/{ConfigConditionTime-BC0n6sWO.js → ConfigConditionTime-KXTCIVIV.js} +1 -1
  32. package/dist/interface/assets/{ConfigSensorValueInput-BUHapx4M.js → ConfigSensorValueInput-BC1FpMm-.js} +1 -1
  33. package/dist/interface/assets/{ConfigTriggerDetection-Byd6SLGg.js → ConfigTriggerDetection-hIN1hi53.js} +1 -1
  34. package/dist/interface/assets/ConfigTriggerGeofence-Bl2ZacbY.js +1 -0
  35. package/dist/interface/assets/{ConfigTriggerManual-B2dWcFrl.js → ConfigTriggerManual-C5vwxS-e.js} +1 -1
  36. package/dist/interface/assets/{ConfigTriggerMqtt-B_aUDBu4.js → ConfigTriggerMqtt-B4PtWC3E.js} +1 -1
  37. package/dist/interface/assets/{ConfigTriggerSchedule-DAZo1PLj.js → ConfigTriggerSchedule-BZzUdGBa.js} +1 -1
  38. package/dist/interface/assets/{ConfigTriggerSensor-BCqAiPu4.js → ConfigTriggerSensor-D18nwMsj.js} +1 -1
  39. package/dist/interface/assets/{ConfigTriggerSystem-DuBydCiq.js → ConfigTriggerSystem-BhygWLB4.js} +1 -1
  40. package/dist/interface/assets/{ConfigTriggerWebhook-DDsnpwJr.js → ConfigTriggerWebhook-yyuBuhLD.js} +1 -1
  41. package/dist/interface/assets/Console-Cfk9MA9m.js +1 -0
  42. package/dist/interface/assets/CuiAssistantConversation-BHK_i56I.js +5 -0
  43. package/dist/interface/assets/CuiAssistantConversation-lkpZg3ML.css +1 -0
  44. package/dist/interface/assets/{CuiAutomationRunsDialog-C_sMg7E1.js → CuiAutomationRunsDialog-B0ohEHw0.js} +1 -1
  45. package/dist/interface/assets/{CuiBottomSheet-D_0LrjA_.js → CuiBottomSheet-DWefGWK2.js} +1 -1
  46. package/dist/interface/assets/CuiBottomSheet-NgX7VFao.js +1 -0
  47. package/dist/interface/assets/CuiCameraPipCard-C2qaGJlH.js +1 -0
  48. package/dist/interface/assets/CuiCameraRecordings-BTD-CQAg.js +1 -0
  49. package/dist/interface/assets/{CuiCameraShares-BIUB1xMa.js → CuiCameraShares-DcqOcePX.js} +1 -1
  50. package/dist/interface/assets/{CuiCameraTable-D-UhqHk4.js → CuiCameraTable-BOkfp_5M.js} +2 -2
  51. package/dist/interface/assets/CuiCameraTable-KPk46Xcl.js +1 -0
  52. package/dist/interface/assets/{CuiChartTable-CSK4Mzn3.js → CuiChartTable-DP38uBwK.js} +1 -1
  53. package/dist/interface/assets/{CuiConsole-DAbJXJBq.js → CuiConsole-C7xE_nQg.js} +2 -2
  54. package/dist/interface/assets/{CuiDataTable-DgcJsG-K.js → CuiDataTable-CsqH-RB1.js} +1 -1
  55. package/dist/interface/assets/CuiLightControl-ChGYpQAK.js +1 -0
  56. package/dist/interface/assets/{CuiLightControl-DFrZm_sv.css → CuiLightControl-D9sm8NZb.css} +1 -1
  57. package/dist/interface/assets/{CuiList-HdsA9vV1.js → CuiList-DJp0__mV.js} +1 -1
  58. package/dist/interface/assets/CuiPluginCard-CWImTZ6l.js +2 -0
  59. package/dist/interface/assets/{CuiPluginCategoryChip-C7R1jP7r.js → CuiPluginCategoryChip-Ch_upS6Y.js} +1 -1
  60. package/dist/interface/assets/{CuiPluginOAuthButton-BJJw0IaC.js → CuiPluginOAuthButton-DEQ9xILN.js} +2 -2
  61. package/dist/interface/assets/{CuiPluginTrustBadge-Bmm1qYdC.js → CuiPluginTrustBadge-sVWdvHcM.js} +1 -1
  62. package/dist/interface/assets/{CuiQRCode-DTSEFMBt.js → CuiQRCode-DqSF4SkD.js} +1 -1
  63. package/dist/interface/assets/CuiSchema-ytExUVhI.js +1 -0
  64. package/dist/interface/assets/CuiTopNavbarItem-B_KWykgq.js +1 -0
  65. package/dist/interface/assets/Faces-Cb6XMxDC.js +1 -0
  66. package/dist/interface/assets/FirstSteps-QNYTkEJo.js +1 -0
  67. package/dist/interface/assets/Floorplan-DbqADtN1.js +1 -0
  68. package/dist/interface/assets/Instances-DrMzPD65.js +1 -0
  69. package/dist/interface/assets/{Logs-BjcfuMQV.js → Logs-BSPT80vP.js} +2 -2
  70. package/dist/interface/assets/{Menu-BjjnSgdP.js → Menu-HHtuhIS2.js} +1 -1
  71. package/dist/interface/assets/Metrics-CqhUnVRA.js +12 -0
  72. package/dist/interface/assets/{OAuthDeviceFlow-9v-Czy_u.js → OAuthDeviceFlow-Bn1nlWNa.js} +1 -1
  73. package/dist/interface/assets/Plugin-DyOg_fbg.js +1 -0
  74. package/dist/interface/assets/{PluginConsole-C7sO42RG.js → PluginConsole-Cv-uhnPY.js} +2 -2
  75. package/dist/interface/assets/PluginDetail-cpOz7FkA.js +2 -0
  76. package/dist/interface/assets/{PluginSchema-D0eL9H-b.js → PluginSchema-DW3TGeTM.js} +1 -1
  77. package/dist/interface/assets/PluginSearch-BgecD9Ob.js +2 -0
  78. package/dist/interface/assets/PluginSearch-C8xHKikH.js +1 -0
  79. package/dist/interface/assets/{PluginUpdateProgress--MM9D8hs.js → PluginUpdateProgress-n6q6vzyd.js} +1 -1
  80. package/dist/interface/assets/Plugins-CuujWEtM.js +1 -0
  81. package/dist/interface/assets/{RecentEventsFilter-CvIJS8Se.js → RecentEventsFilter-CTR5JK_P.js} +1 -1
  82. package/dist/interface/assets/Recordings-ths9khZr.js +1 -0
  83. package/dist/interface/assets/SensorEdit-BzoIH7QC.js +1 -0
  84. package/dist/interface/assets/{SensorHistory-Efw0bZ-X.js → SensorHistory-9CdOpCPs.js} +1 -1
  85. package/dist/interface/assets/Sensors-CK5uExfU.js +2 -0
  86. package/dist/interface/assets/Settings-DN5hFtw_.js +1 -0
  87. package/dist/interface/assets/SettingsAccount-BCrmon5O.js +1 -0
  88. package/dist/interface/assets/SettingsAccount-CSy1BAIH.js +1 -0
  89. package/dist/interface/assets/{SettingsAccount-si-6gWl5.css → SettingsAccount-CY8YE_cy.css} +1 -1
  90. package/dist/interface/assets/SettingsAppearance-BY1xQMx4.js +1 -0
  91. package/dist/interface/assets/SettingsAppearance-h_XPZfQl.js +1 -0
  92. package/dist/interface/assets/SettingsAssistant-D8FmVbUL.js +1 -0
  93. package/dist/interface/assets/{SettingsBackup-BqKBKis5.js → SettingsBackup-D_weokqu.js} +1 -1
  94. package/dist/interface/assets/{SettingsList-BU191rmt.js → SettingsList-Bq24WTDU.js} +1 -1
  95. package/dist/interface/assets/SettingsMqtt-DCkLIYpF.js +1 -0
  96. package/dist/interface/assets/SettingsNotifications-8TZOUxg2.js +1 -0
  97. package/dist/interface/assets/{SettingsPermissions-sI64FPZG.js → SettingsPermissions-M8u_jrN0.js} +1 -1
  98. package/dist/interface/assets/{SettingsRecordings-CghrKErw.js → SettingsRecordings-C1Kp5xW_.js} +1 -1
  99. package/dist/interface/assets/SettingsRemote-DXlQKwlT.js +2 -0
  100. package/dist/interface/assets/{SettingsSystem-DP1p1Xns.js → SettingsSystem-Cetu2faJ.js} +2 -2
  101. package/dist/interface/assets/{SettingsUsers-Dpej-he1.js → SettingsUsers-CDwtQLdV.js} +1 -1
  102. package/dist/interface/assets/{Terminal-DPRPXCSt.js → Terminal-Dl-aAZME.js} +2 -2
  103. package/dist/interface/assets/{Training-Dwf5rXyC.css → Training-B1oQjAr8.css} +1 -1
  104. package/dist/interface/assets/Training-DdZjXgt1.js +1 -0
  105. package/dist/interface/assets/{Updates-QTvCp1aS.js → Updates-CkB1lXuo.js} +1 -1
  106. package/dist/interface/assets/{VariableInput-DhusSZPw.js → VariableInput-BxPj5wo6.js} +1 -1
  107. package/dist/interface/assets/{VariableSuggestions-Bkzz4Mv3.js → VariableSuggestions-CbizvAkz.js} +1 -1
  108. package/dist/interface/assets/{VersionsHandler-DjNSpSYy.js → VersionsHandler-CePyEUVO.js} +2 -2
  109. package/dist/interface/assets/{VirtualSensorCreate-soGT6h2c.js → VirtualSensorCreate-D_GVoeL7.js} +1 -1
  110. package/dist/interface/assets/Workers-7yiebNkl.js +2 -0
  111. package/dist/interface/assets/api-DK2Bav9D.js +4 -0
  112. package/dist/interface/assets/api-DTCqDA-h.css +2 -0
  113. package/dist/interface/assets/{api-CK2tonlH.js → api-DW2niHRN.js} +1 -1
  114. package/dist/interface/assets/{assistant-BEe1ExZL.js → assistant-BJ6xKcw_.js} +1 -1
  115. package/dist/interface/assets/{auth-QEpUGkWd.js → auth-Dc8bUpc-.js} +1 -1
  116. package/dist/interface/assets/{automations-BBIBV4Uu.js → automations-DXrjbArj.js} +1 -1
  117. package/dist/interface/assets/{cameraSources-Cm18cW9L.js → cameraSources-QJfUDOQJ.js} +1 -1
  118. package/dist/interface/assets/cloudHandoff-DtlquYGZ.js +1 -0
  119. package/dist/interface/assets/{config-vwkU8aqP.js → config-CiQDwB4t.js} +1 -1
  120. package/dist/interface/assets/{flowSchema-rzBroL0H.js → flowSchema-BRTZHQ1w.js} +1 -1
  121. package/dist/interface/assets/{intercomService-Du8V_HxF.js → intercomService-BnA-FQ0Q.js} +1 -1
  122. package/dist/interface/assets/{main-XHFrBKKz.css → main-BoGhBedC.css} +1 -1
  123. package/dist/interface/assets/main-D74mRIxc.js +3 -0
  124. package/dist/interface/assets/mqtt-iD9XHYO_.js +1 -0
  125. package/dist/interface/assets/{notifications-CN6eTJb_.js → notifications-CbAJX7RF.js} +1 -1
  126. package/dist/interface/assets/{plugins-DKtX7zQp.js → plugins-eIUrXNeM.js} +1 -1
  127. package/dist/interface/assets/rooms-BqPyo8jc.js +1 -0
  128. package/dist/interface/assets/{sensorIcons-ztqlMLDc.js → sensorIcons-DQVgryYP.js} +1 -1
  129. package/dist/interface/assets/{sensorSlots-D-uxjuv3.js → sensorSlots-BZCXtnb6.js} +1 -1
  130. package/dist/interface/assets/{sensors-DV2Z0IJt.js → sensors-DttBNEEt.js} +1 -1
  131. package/dist/interface/assets/{server-CfZnIVzn.js → server-DUFhf2c_.js} +1 -1
  132. package/dist/interface/assets/{theme-Bi7qdjBK.js → theme-BMmjtQ4w.js} +1 -1
  133. package/dist/interface/assets/{types-CNLAvgyw.js → types-5rE8Tz0_.js} +1 -1
  134. package/dist/interface/assets/{types-DwbeYXvn.js → types-CXw7CEzu.js} +1 -1
  135. package/dist/interface/assets/{types-DuwD8xp5.js → types-DWTSNJ79.js} +1 -1
  136. package/dist/interface/assets/ungrouped-D56FGIrg.js +1 -0
  137. package/dist/interface/assets/ungrouped-DHMJ9Rg1.css +1 -0
  138. package/dist/interface/assets/{updates-BqCH6Vr8.js → updates-TIPWXKzL.js} +1 -1
  139. package/dist/interface/assets/{useAppVersion-B-rmq3Bb.js → useAppVersion-BIz44Bg4.js} +1 -1
  140. package/dist/interface/assets/{useAssistantActions-Kf-5ijVf.js → useAssistantActions-CLkkw9kB.js} +1 -1
  141. package/dist/interface/assets/useBackupRestore-Crfd592q.js +1 -0
  142. package/dist/interface/assets/{useCameraOptions-Dt2J8sP_.js → useCameraOptions-A97teAIr.js} +1 -1
  143. package/dist/interface/assets/{useKeyboardInset-DtD3I2WC.js → useKeyboardInset-DXVi1dLG.js} +1 -1
  144. package/dist/interface/assets/{useLogsSocket-CEhUQdiY.js → useLogsSocket-BlFxVXjF.js} +1 -1
  145. package/dist/interface/assets/{useNavLayout-CtpYjS5W.js → useNavLayout-C5obaCNv.js} +1 -1
  146. package/dist/interface/assets/{usePermissions-CJzuagwD.js → usePermissions-C8hB_pG1.js} +1 -1
  147. package/dist/interface/assets/{usePluginUpdates-BwoWN5yb.js → usePluginUpdates-DO0-Gk4Q.js} +1 -1
  148. package/dist/interface/assets/{usePushRegistration-ANx4BS6_.js → usePushRegistration-BUttCraQ.js} +1 -1
  149. package/dist/interface/assets/{useServerRestart-7edyD8M0.js → useServerRestart-Cz9eVHUE.js} +1 -1
  150. package/dist/interface/assets/{useStreamStatus-DCSWHdbW.js → useStreamStatus-BhS_MCCB.js} +1 -1
  151. package/dist/interface/assets/{useTabSwipe-DfS3R3uP.js → useTabSwipe-D4k8lm1M.js} +1 -1
  152. package/dist/interface/assets/{useUpdateChannel-Cr9mSIRC.js → useUpdateChannel-D9lhfW0y.js} +1 -1
  153. package/dist/interface/assets/{useUpdatesSocket-B5Rm9syb.js → useUpdatesSocket-DnH9sON5.js} +1 -1
  154. package/dist/interface/assets/{useUserOptions-CJjImz8V.js → useUserOptions-BTRBUuE2.js} +1 -1
  155. package/dist/interface/assets/{vendor-cameraui-BbGOMenD.js → vendor-cameraui-QXD8jkcj.js} +26 -26
  156. package/dist/interface/assets/{vendor-core-tgH2YubJ.js → vendor-core-CnhnyKDl.js} +1 -1
  157. package/dist/interface/assets/{vendor-primevue-DNJJiEZl.js → vendor-primevue-CCUqY55W.js} +207 -207
  158. package/dist/interface/ha/{404-Dl6JtQWv.js → 404-DLhJqxRl.js} +1 -1
  159. package/dist/interface/ha/{About-wjv4kCO3.js → About-DC0i1iE4.js} +3 -3
  160. package/dist/interface/ha/{Assistant-Dpb4IsDC.js → Assistant-BmazMPIg.js} +821 -825
  161. package/dist/interface/ha/{Automation-CqTPjCUh.js → Automation-gabF9YzQ.js} +336 -336
  162. package/dist/interface/ha/{AutomationImport-CvdeneoU.js → AutomationImport-DaqZNs9s.js} +8 -8
  163. package/dist/interface/ha/{AutomationStore-bVPE68io.js → AutomationStore-DzM4huo5.js} +54 -54
  164. package/dist/interface/ha/{AutomationStoreDetail-BYaNUjoH.js → AutomationStoreDetail-CpzQMt_D.js} +7 -7
  165. package/dist/interface/ha/{Automations-BfsYh2A_.js → Automations-Dcm4Us50.js} +81 -81
  166. package/dist/interface/ha/{Camera-C70onr_O.js → Camera-CNK3QR7l.js} +198 -198
  167. package/dist/interface/ha/{CameraConsole-Dg3lV-wq.js → CameraConsole-CpcF0411.js} +5 -5
  168. package/dist/interface/ha/{Cameras-DpM6gt3G.js → Cameras-Cf9rwRyf.js} +293 -294
  169. package/dist/interface/ha/{Camview-CO_bHntH.js → Camview-BFKR2t6C.js} +87 -87
  170. package/dist/interface/ha/{Config-D-cpocuH.js → Config-1XH3zfr2.js} +11 -11
  171. package/dist/interface/ha/{ConfigActionAssistant-DVVVfVvT.js → ConfigActionAssistant-C0-NFoTB.js} +5 -5
  172. package/dist/interface/ha/{ConfigActionCameraControl-BPpzE9-F.js → ConfigActionCameraControl-DNSKZPSZ.js} +5 -5
  173. package/dist/interface/ha/{ConfigActionDelay-zU6H75hY.js → ConfigActionDelay-iZ3lPGzw.js} +1 -1
  174. package/dist/interface/ha/{ConfigActionHttp-BsNy03j4.js → ConfigActionHttp-DVJAcGkl.js} +3 -3
  175. package/dist/interface/ha/{ConfigActionImageInput-JUvNYn0w.js → ConfigActionImageInput-VVbHHHZs.js} +3 -3
  176. package/dist/interface/ha/{ConfigActionMqtt-PZqAKfTo.js → ConfigActionMqtt-N5OUJDzM.js} +4 -4
  177. package/dist/interface/ha/{ConfigActionNotification-DIL7abEm.js → ConfigActionNotification-s142tQoU.js} +6 -6
  178. package/dist/interface/ha/{ConfigActionNotificationControl-BQ2w5yeg.js → ConfigActionNotificationControl-Dh7kaKVP.js} +3 -3
  179. package/dist/interface/ha/{ConfigActionOutput-DVilKhPV.js → ConfigActionOutput-B4HHTg5C.js} +1 -1
  180. package/dist/interface/ha/{ConfigActionPlugin-BUfTEJQ_.js → ConfigActionPlugin-D20G2Dqf.js} +5 -5
  181. package/dist/interface/ha/{ConfigActionSensor-Dzp16VyX.js → ConfigActionSensor-BS3jrFaG.js} +6 -6
  182. package/dist/interface/ha/{ConfigActionSnapshot-CRjD5AMC.js → ConfigActionSnapshot-CInLAcwK.js} +3 -3
  183. package/dist/interface/ha/{ConfigActionVariable-CR8g7gEh.js → ConfigActionVariable-C5vADGNF.js} +2 -2
  184. package/dist/interface/ha/{ConfigConditionIfElse-CHoSgzXF.js → ConfigConditionIfElse-CPeWDD31.js} +4 -4
  185. package/dist/interface/ha/{ConfigConditionSensorState-Dn8_OhQe.js → ConfigConditionSensorState-BM5GmpN6.js} +6 -6
  186. package/dist/interface/ha/{ConfigConditionSwitch-Ds-nqWeU.js → ConfigConditionSwitch-Dmz9FduJ.js} +4 -4
  187. package/dist/interface/ha/{ConfigConditionTime-DWNfEluj.js → ConfigConditionTime-DF6llIJq.js} +2 -2
  188. package/dist/interface/ha/{ConfigSensorValueInput-DwXM9wP1.js → ConfigSensorValueInput-Ch5njvtv.js} +7 -7
  189. package/dist/interface/ha/{ConfigTriggerDetection-D37OkR_u.js → ConfigTriggerDetection-BR2QWNyO.js} +5 -5
  190. package/dist/interface/ha/{ConfigTriggerGeofence-EbXy_y3Q.js → ConfigTriggerGeofence-CaImOjyW.js} +9 -9
  191. package/dist/interface/ha/{ConfigTriggerMqtt-BX6uNEZy.js → ConfigTriggerMqtt-DWz1XwZQ.js} +2 -2
  192. package/dist/interface/ha/{ConfigTriggerSensor-BFGEtBVF.js → ConfigTriggerSensor-lfnhz0im.js} +3 -3
  193. package/dist/interface/ha/{ConfigTriggerSystem-fRnAgUGR.js → ConfigTriggerSystem-CwUhyFAj.js} +3 -3
  194. package/dist/interface/ha/{ConfigTriggerWebhook-DegifRdj.js → ConfigTriggerWebhook-J6Xts7GQ.js} +2 -2
  195. package/dist/interface/ha/{Console-Bo6S5psN.js → Console-BSdKFm6Y.js} +8 -8
  196. package/dist/interface/ha/{CuiAutomationRunsDialog-DXpNJqDE.js → CuiAutomationRunsDialog-BU8sympp.js} +3 -3
  197. package/dist/interface/ha/{CuiBottomSheet-DLkC2OmT.js → CuiBottomSheet-Bnp7ta7V.js} +1 -1
  198. package/dist/interface/ha/{CuiCameraRecordings-9tdkxXiT.js → CuiCameraRecordings-E-mMqKSs.js} +18 -19
  199. package/dist/interface/ha/{CuiCameraShares-BbqY_2b7.js → CuiCameraShares-DcNwd2OC.js} +8 -8
  200. package/dist/interface/ha/{CuiCameraTable-BmH1yAgl.js → CuiCameraTable-DNW9Vm_A.js} +6 -6
  201. package/dist/interface/ha/{CuiChartTable-BjBBI7Fo.js → CuiChartTable-muC7jL2H.js} +6 -6
  202. package/dist/interface/ha/{CuiConsole-By3m4UbE.js → CuiConsole-ND8bcuTg.js} +2 -2
  203. package/dist/interface/ha/{CuiDataTable-C_ndu5My.js → CuiDataTable-CN4T8DgP.js} +13 -13
  204. package/dist/interface/ha/{CuiPluginCard-BLQ1galy.js → CuiPluginCard-nIQiyQvH.js} +31 -31
  205. package/dist/interface/ha/{CuiPluginOAuthButton-BDghklSy.js → CuiPluginOAuthButton-FJ49NfUh.js} +3 -3
  206. package/dist/interface/ha/{CuiPluginTrustBadge-DolANNao.js → CuiPluginTrustBadge-D6eanMyI.js} +2 -2
  207. package/dist/interface/ha/{CuiQRCode-CcjPngXI.js → CuiQRCode-BdJzeeoE.js} +2 -2
  208. package/dist/interface/ha/{CuiSchema-D9JFf0dp.js → CuiSchema-DY0V-8xP.js} +67 -67
  209. package/dist/interface/ha/{CuiTopNavbarItem-DcUEq-4e.js → CuiTopNavbarItem-DT5pAKHp.js} +7 -8
  210. package/dist/interface/ha/{Faces-DjXHzr77.js → Faces-C_svyTrr.js} +92 -92
  211. package/dist/interface/ha/{FirstSteps-CQAP9Siw.js → FirstSteps-yS2M2cor.js} +9 -9
  212. package/dist/interface/ha/{Floorplan-DyaPzlQO.js → Floorplan-DSOeScjI.js} +194 -194
  213. package/dist/interface/ha/{Instances-DWjaU5gj.js → Instances-B4h5EKpF.js} +20 -20
  214. package/dist/interface/ha/{Logs-Dlx-X1NS.js → Logs-BH0Lxvs6.js} +12 -12
  215. package/dist/interface/ha/{Menu-iqEe01qO.js → Menu-COH7QXuE.js} +13 -13
  216. package/dist/interface/ha/{Metrics-Br2Dyvzh.js → Metrics-BtnRqL_I.js} +136 -136
  217. package/dist/interface/ha/{OAuthDeviceFlow-CIGk92FD.js → OAuthDeviceFlow-D2QJ9MnP.js} +8 -8
  218. package/dist/interface/ha/{Plugin-DklIr7j2.js → Plugin-EfUSqwyh.js} +85 -85
  219. package/dist/interface/ha/{PluginConsole-DCfxPtGU.js → PluginConsole-hh_o15f7.js} +4 -4
  220. package/dist/interface/ha/PluginDetail-DFiXGkrY.js +805 -0
  221. package/dist/interface/ha/{PluginSearch-BTKBnjxb.js → PluginSearch-Cdrfubrj.js} +54 -54
  222. package/dist/interface/ha/{PluginUpdateProgress-Dej5AcCt.js → PluginUpdateProgress-BD2g2kVj.js} +3 -3
  223. package/dist/interface/ha/{Plugins-C2fONspm.js → Plugins-qFiHW-Nk.js} +45 -45
  224. package/dist/interface/ha/{RecentEventsFilter-ylgjiDo8.js → RecentEventsFilter-UWrXnvfq.js} +1 -1
  225. package/dist/interface/ha/{Recordings-w39I43cc.js → Recordings-BzeC6tOz.js} +437 -419
  226. package/dist/interface/ha/{SensorEdit-BkKi1l-A.js → SensorEdit-BSgy7lkZ.js} +360 -360
  227. package/dist/interface/ha/{SensorHistory-BGJjMlc3.js → SensorHistory-IDvP8LKH.js} +2 -2
  228. package/dist/interface/ha/{Sensors-D_Wi9XPa.js → Sensors-Diqp4oZ0.js} +96 -97
  229. package/dist/interface/ha/{Settings-Bn7WLWf0.js → Settings-BgDsxAlx.js} +11 -11
  230. package/dist/interface/ha/{SettingsAccount-CRTex-1j.js → SettingsAccount-DBXMQPYk.js} +159 -159
  231. package/dist/interface/ha/{SettingsAppearance-B1qmJnYk.js → SettingsAppearance-VmbjnT3o.js} +6 -6
  232. package/dist/interface/ha/{SettingsAssistant-DDd1X0BC.js → SettingsAssistant-C2R4ZetE.js} +133 -133
  233. package/dist/interface/ha/{SettingsBackup-DZbhSB13.js → SettingsBackup-BqY9TwYn.js} +20 -20
  234. package/dist/interface/ha/{SettingsList-BQdyPe0H.js → SettingsList-CzHcfo2N.js} +4 -4
  235. package/dist/interface/ha/{SettingsMqtt-CSZcY6ht.js → SettingsMqtt-DqV3h3Ow.js} +149 -149
  236. package/dist/interface/ha/{SettingsNotifications-CfEhl0-y.js → SettingsNotifications-yn5fIR_7.js} +6 -6
  237. package/dist/interface/ha/{SettingsRecordings-BnAGDvcH.js → SettingsRecordings-DDs1lyfY.js} +8 -8
  238. package/dist/interface/ha/{SettingsRemote-w86TQVUA.js → SettingsRemote-jBw3l5E0.js} +172 -172
  239. package/dist/interface/ha/{SettingsSystem-CENjHL3k.js → SettingsSystem-BOv9hNlk.js} +9 -9
  240. package/dist/interface/ha/{SettingsUsers-CqSHRklV.js → SettingsUsers-Biv-2F4C.js} +90 -90
  241. package/dist/interface/ha/{Terminal-WsuxG3k-.js → Terminal-CmcrGEV0.js} +4 -4
  242. package/dist/interface/ha/Training-BEzPiXZg.js +1512 -0
  243. package/dist/interface/ha/{Updates-Dl_lLLR2.js → Updates-DJAcmDQJ.js} +12 -12
  244. package/dist/interface/ha/{VariableInput-C8Q81GUt.js → VariableInput-DlYg7t0m.js} +2 -2
  245. package/dist/interface/ha/{VersionsHandler-BOvjesvp.js → VersionsHandler-UnrAWn-b.js} +11 -11
  246. package/dist/interface/ha/{VirtualSensorCreate-sgwATaky.js → VirtualSensorCreate-CssxeaCC.js} +2 -2
  247. package/dist/interface/ha/{Workers-CkDuQ9NG.js → Workers-CLpqLugC.js} +14 -14
  248. package/dist/interface/ha/{accordion-Xem2SzgR.js → accordion-BylV-jUK.js} +2 -2
  249. package/dist/interface/ha/{api-BmYisoxj.js → api-BP7mlzjP.js} +11181 -11736
  250. package/dist/interface/ha/{api-oqpIZTkx.js → api-B_tDa73J.js} +1 -1
  251. package/dist/interface/ha/{assistant-0jE4C19U.js → assistant-Cb6ACguQ.js} +1 -1
  252. package/dist/interface/ha/{auth-B4Msg7R-.js → auth-DOYDRgFm.js} +1 -1
  253. package/dist/interface/ha/{autocomplete-B94Amei3.js → autocomplete-Cp3u2Ywa.js} +4 -4
  254. package/dist/interface/ha/{automationBlueprint-C-12Yjl7.js → automationBlueprint-CbbG_ku4.js} +1 -1
  255. package/dist/interface/ha/cameraui-cards.js +1 -1
  256. package/dist/interface/ha/{cards-BrOcoiQJ.js → cards-BpBP1zVW.js} +1206 -1198
  257. package/dist/interface/ha/{config-IG56wp6m.js → config-DroY1HBs.js} +1 -1
  258. package/dist/interface/ha/{datepicker-B4Azs5zr.js → datepicker-DXk97lTw.js} +4 -4
  259. package/dist/interface/ha/{mqtt-pl13wSmG.js → mqtt-NJTVdd53.js} +1 -1
  260. package/dist/interface/ha/{multiselect-Dp4XDBRR.js → multiselect-BOb4ScAZ.js} +4 -4
  261. package/dist/interface/ha/{notifications-B6wxSmou.js → notifications-BPTvvgvv.js} +1 -1
  262. package/dist/interface/ha/{plugins-BwwaWxye.js → plugins-B29K3nQP.js} +1 -1
  263. package/dist/interface/ha/{rooms-NIzjFYAd.js → rooms-DLw0WUy_.js} +1 -1
  264. package/dist/interface/ha/{select-UR3ZRDew.js → select-DV7p2EDj.js} +4 -4
  265. package/dist/interface/ha/{server-YOLwDVAW.js → server-B4b5_Ecu.js} +1 -1
  266. package/dist/interface/ha/{speeddial-LCbl5g8p.js → speeddial-B5p0fuqL.js} +1 -1
  267. package/dist/interface/ha/{tooltip-Z7VN-E1u.js → tooltip-BDrlgLof.js} +1 -1
  268. package/dist/interface/ha/{types-B8B9MqK0.js → types-DJHHL7nn.js} +1 -1
  269. package/dist/interface/ha/{ungrouped-DttNEB62.js → ungrouped-xyK1QrsM.js} +344 -376
  270. package/dist/interface/ha/{updates-DVhiQhMM.js → updates-XFSu9Tfm.js} +5 -5
  271. package/dist/interface/ha/{useAppVersion-CG4D44Aa.js → useAppVersion-BH3rU1zz.js} +1 -1
  272. package/dist/interface/ha/{useLogsSocket-PKsRDttg.js → useLogsSocket-CaTRzvgU.js} +1 -1
  273. package/dist/interface/ha/{useNavLayout-DoEcPx9Z.js → useNavLayout-DV0_OQx0.js} +1 -1
  274. package/dist/interface/ha/{useServerRestart-CMl589qX.js → useServerRestart-C8tynLUf.js} +1 -1
  275. package/dist/interface/ha/{useTabSwipe-Cmqdn0J5.js → useTabSwipe-CFoLDp3j.js} +1 -1
  276. package/dist/interface/ha/{useUpdateChannel-BBW2EX7N.js → useUpdateChannel-DSG2RTPe.js} +2 -2
  277. package/dist/interface/ha/{useUpdatesSocket-B6ICpKKC.js → useUpdatesSocket-CSQ0g7-6.js} +1 -1
  278. package/dist/interface/ha/{useUserOptions-CzclRfar.js → useUserOptions-CFaCy6L1.js} +1 -1
  279. package/dist/interface/ha/{virtualscroller-C5j7FXj4.js → virtualscroller-B-UQZDMJ.js} +88 -88
  280. package/dist/interface/index.html +34 -34
  281. package/dist/interface/sw.js +1 -1
  282. package/dist/server/package.json +22 -20
  283. package/dist/server/requirements.txt +1 -1
  284. package/dist/server/src/api/controllers/auth.controller.js +5 -6
  285. package/dist/server/src/api/controllers/auth.controller.js.map +1 -1
  286. package/dist/server/src/api/controllers/plugins.controller.js +5 -5
  287. package/dist/server/src/api/controllers/plugins.controller.js.map +1 -1
  288. package/dist/server/src/api/database/checks.js +20 -8
  289. package/dist/server/src/api/database/checks.js.map +1 -1
  290. package/dist/server/src/api/database/selfcheck.js +2 -2
  291. package/dist/server/src/api/database/selfcheck.js.map +1 -1
  292. package/dist/server/src/api/index.js +8 -6
  293. package/dist/server/src/api/index.js.map +1 -1
  294. package/dist/server/src/api/plugins/logger.plugin.js +11 -11
  295. package/dist/server/src/api/plugins/logger.plugin.js.map +1 -1
  296. package/dist/server/src/api/services/twoFactor.service.d.ts +4 -5
  297. package/dist/server/src/api/services/twoFactor.service.js +16 -17
  298. package/dist/server/src/api/services/twoFactor.service.js.map +1 -1
  299. package/dist/server/src/api/types/index.d.ts +0 -1
  300. package/dist/server/src/api/utils/cert.js +128 -135
  301. package/dist/server/src/api/utils/cert.js.map +1 -1
  302. package/dist/server/src/api/utils/form-body.d.ts +2 -0
  303. package/dist/server/src/api/utils/form-body.js +22 -0
  304. package/dist/server/src/api/utils/form-body.js.map +1 -0
  305. package/dist/server/src/api/utils/install-logger.js +12 -12
  306. package/dist/server/src/api/utils/install-logger.js.map +1 -1
  307. package/dist/server/src/api/websocket/nsp/logs.d.ts +7 -3
  308. package/dist/server/src/api/websocket/nsp/logs.js +79 -65
  309. package/dist/server/src/api/websocket/nsp/logs.js.map +1 -1
  310. package/dist/server/src/assistant/history.d.ts +2 -0
  311. package/dist/server/src/assistant/history.js +46 -0
  312. package/dist/server/src/assistant/history.js.map +1 -0
  313. package/dist/server/src/assistant/manager.js +2 -1
  314. package/dist/server/src/assistant/manager.js.map +1 -1
  315. package/dist/server/src/camera/controller.d.ts +1 -0
  316. package/dist/server/src/camera/controller.js +23 -18
  317. package/dist/server/src/camera/controller.js.map +1 -1
  318. package/dist/server/src/camera/decoder/worker.d.ts +3 -0
  319. package/dist/server/src/camera/decoder/worker.js +42 -5
  320. package/dist/server/src/camera/decoder/worker.js.map +1 -1
  321. package/dist/server/src/go2rtc/index.js +2 -2
  322. package/dist/server/src/go2rtc/index.js.map +1 -1
  323. package/dist/server/src/main.js +5 -5
  324. package/dist/server/src/main.js.map +1 -1
  325. package/dist/server/src/manager/discoveryManager.js +2 -2
  326. package/dist/server/src/manager/discoveryManager.js.map +1 -1
  327. package/dist/server/src/remote/services/cloudflare-managed.js +6 -3
  328. package/dist/server/src/remote/services/cloudflare-managed.js.map +1 -1
  329. package/dist/server/src/remote/services/cloudflare.d.ts +0 -1
  330. package/dist/server/src/remote/services/cloudflare.js +9 -20
  331. package/dist/server/src/remote/services/cloudflare.js.map +1 -1
  332. package/dist/server/src/remote/services/cloudflaredBinary.d.ts +3 -2
  333. package/dist/server/src/remote/services/cloudflaredBinary.js +9 -16
  334. package/dist/server/src/remote/services/cloudflaredBinary.js.map +1 -1
  335. package/dist/server/src/rpc/server.js +2 -2
  336. package/dist/server/src/rpc/server.js.map +1 -1
  337. package/dist/server/src/utils/automation-registry/index.js +3 -3
  338. package/dist/server/src/utils/automation-registry/index.js.map +1 -1
  339. package/dist/server/src/utils/colors.d.ts +2 -0
  340. package/dist/server/src/utils/colors.js +8 -0
  341. package/dist/server/src/utils/colors.js.map +1 -0
  342. package/dist/server/src/utils/npm/auth.d.ts +3 -2
  343. package/dist/server/src/utils/npm/auth.js +1 -1
  344. package/dist/server/src/utils/npm/auth.js.map +1 -1
  345. package/dist/server/src/utils/npm/index.d.ts +3 -15
  346. package/dist/server/src/utils/npm/index.js +26 -17
  347. package/dist/server/src/utils/npm/index.js.map +1 -1
  348. package/dist/server/src/utils/npm/registry.d.ts +69 -0
  349. package/dist/server/src/utils/npm/registry.js +240 -0
  350. package/dist/server/src/utils/npm/registry.js.map +1 -0
  351. package/dist/server/src/utils/plugin-registry/index.js +3 -3
  352. package/dist/server/src/utils/plugin-registry/index.js.map +1 -1
  353. package/dist/server/src/utils/process.d.ts +10 -0
  354. package/dist/server/src/utils/process.js +112 -0
  355. package/dist/server/src/utils/process.js.map +1 -0
  356. package/dist/server/src/utils/totp.d.ts +12 -0
  357. package/dist/server/src/utils/totp.js +71 -0
  358. package/dist/server/src/utils/totp.js.map +1 -0
  359. package/dist/server/src/utils/ttl-cache.d.ts +20 -0
  360. package/dist/server/src/utils/ttl-cache.js +63 -0
  361. package/dist/server/src/utils/ttl-cache.js.map +1 -0
  362. package/npm-shrinkwrap.json +6427 -0
  363. package/package.json +22 -20
  364. package/dist/interface/assets/Assistant-BKxssfw-.js +0 -1
  365. package/dist/interface/assets/Automation-CP59cgP7.js +0 -3
  366. package/dist/interface/assets/AutomationStore-BZGR_5Xl.js +0 -2
  367. package/dist/interface/assets/Automations-BpXorYAS.js +0 -2
  368. package/dist/interface/assets/Camera-UBUfaR5a.js +0 -2
  369. package/dist/interface/assets/Cameras-B21Y8MdQ.js +0 -651
  370. package/dist/interface/assets/Camview-BySyPtU5.js +0 -1
  371. package/dist/interface/assets/Config-BGyGmukb.js +0 -2
  372. package/dist/interface/assets/ConfigTriggerGeofence-CkzTFEZn.js +0 -1
  373. package/dist/interface/assets/Console-HXmKYaK_.js +0 -1
  374. package/dist/interface/assets/CuiAssistantConversation-2qrRCsgw.js +0 -5
  375. package/dist/interface/assets/CuiAssistantConversation-DmSdiv1b.css +0 -1
  376. package/dist/interface/assets/CuiBottomSheet-CTr-KHC8.js +0 -1
  377. package/dist/interface/assets/CuiCameraPipCard-BZCayhy_.js +0 -1
  378. package/dist/interface/assets/CuiCameraRecordings-BbaEL2ST.js +0 -1
  379. package/dist/interface/assets/CuiCameraTable-C5tQHs63.js +0 -1
  380. package/dist/interface/assets/CuiLightControl-v6k9hVGl.js +0 -1
  381. package/dist/interface/assets/CuiPluginCard-5MRYJcF2.js +0 -2
  382. package/dist/interface/assets/CuiSchema-BDXeXora.js +0 -1
  383. package/dist/interface/assets/CuiTopNavbarItem-BVknLbRO.js +0 -1
  384. package/dist/interface/assets/Faces-BEpYvbB0.js +0 -1
  385. package/dist/interface/assets/FirstSteps-U93RDOcP.js +0 -1
  386. package/dist/interface/assets/Floorplan-D8XoCNOB.js +0 -1
  387. package/dist/interface/assets/Instances-CFwZotvU.js +0 -1
  388. package/dist/interface/assets/Metrics-Ca_d5CbP.js +0 -12
  389. package/dist/interface/assets/Plugin-BjLw46Sw.js +0 -1
  390. package/dist/interface/assets/PluginDetail-BuLW4lkN.js +0 -2
  391. package/dist/interface/assets/PluginSearch--LLMEeyx.js +0 -2
  392. package/dist/interface/assets/PluginSearch-0akjE0ef.js +0 -1
  393. package/dist/interface/assets/Plugins-26O511gf.js +0 -1
  394. package/dist/interface/assets/Recordings-DQOGeSFm.js +0 -1
  395. package/dist/interface/assets/SensorEdit-DEW5D80x.js +0 -1
  396. package/dist/interface/assets/Sensors-C8yOyAwo.js +0 -2
  397. package/dist/interface/assets/Settings-B-RgMeVm.js +0 -1
  398. package/dist/interface/assets/SettingsAccount-B6aXFx3F.js +0 -1
  399. package/dist/interface/assets/SettingsAccount-_0ccrXYU.js +0 -1
  400. package/dist/interface/assets/SettingsAppearance-CkDwzx6f.js +0 -1
  401. package/dist/interface/assets/SettingsAppearance-DBFE3uVH.js +0 -1
  402. package/dist/interface/assets/SettingsAssistant-DN5OUJqt.js +0 -1
  403. package/dist/interface/assets/SettingsMqtt-hsKZkU-o.js +0 -1
  404. package/dist/interface/assets/SettingsNotifications-DIeiUEAk.js +0 -1
  405. package/dist/interface/assets/SettingsRemote-Doa0aBMC.js +0 -2
  406. package/dist/interface/assets/Training-DYlefOX1.js +0 -1
  407. package/dist/interface/assets/Workers-CUVvTuts.js +0 -2
  408. package/dist/interface/assets/api-B0wYDGQj.css +0 -2
  409. package/dist/interface/assets/api-BNrZVfeD.js +0 -4
  410. package/dist/interface/assets/cloudHandoff-Dnndt2el.js +0 -1
  411. package/dist/interface/assets/main-CRlC4FBY.js +0 -3
  412. package/dist/interface/assets/mqtt-BY6-Hrbv.js +0 -1
  413. package/dist/interface/assets/ring-resize-DyqCo2UN.js +0 -1
  414. package/dist/interface/assets/rooms-BHP4q6yf.js +0 -1
  415. package/dist/interface/assets/ungrouped-DBRZ-Ori.css +0 -1
  416. package/dist/interface/assets/ungrouped-DHLAmt__.js +0 -1
  417. package/dist/interface/assets/useBackupRestore-Dj-ZXODq.js +0 -1
  418. package/dist/interface/ha/PluginDetail-BFfRnkdG.js +0 -230
  419. package/dist/interface/ha/Training-hu_XOYBk.js +0 -1505
  420. package/dist/interface/ha/ring-resize-Dr2PxWIg.js +0 -16
@@ -0,0 +1,1512 @@
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 S, v 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 ne } from "./tooltip-BDrlgLof.js";
4
+ import { t as re } from "./chevron-down-BNj8w2js.js";
5
+ import { t as ie } from "./tag-mchuCAPR.js";
6
+ import { At as O, B as ae, Cr as oe, Er as se, J as k, On as ce, Or as A, Ot as le, R as ue, Ri as de, Tr as fe, V as pe, W as me, Yt as j, Zi as M, Zr as he, _t as ge, bi as _e, c as ve, ca as N, ct as ye, d as be, gn as xe, kt as P, lr as Se, m as Ce, tt as F, ui as I, ur as L, vi as R, wr as z, xi as B, z as V } from "./api-BP7mlzjP.js";
7
+ import { S as we, _ as Te, b as Ee, i as De, w as Oe } from "./intercomService-B7HkLs6z.js";
8
+ import { n as ke } from "./vue-i18n-D5EAy78K.js";
9
+ import { t as Ae } from "./button-BouAFgf5.js";
10
+ import { n as je, t as H } from "./inputicon-1w06U-Jl.js";
11
+ import { t as Me } from "./inputtext-C_ygnPrC.js";
12
+ import { t as Ne } from "./checkbox-CAKzZcqk.js";
13
+ import { t as Pe } from "./close-CxFbonhd.js";
14
+ import { t as Fe } from "./progressbar-CaUaM8Bt.js";
15
+ import { t as Ie } from "./search-BViwEHdF.js";
16
+ import { n as Le, t as Re } from "./cloud-check-aaxn1VZr.js";
17
+ import { t as ze } from "./trash-can-outline-CBwv40Ck.js";
18
+ import { t as Be } from "./back-filled-CaxrZv0Q.js";
19
+ import { t as Ve } from "./help-circle-outline-BniRuJRv.js";
20
+ import { t as He } from "./settings-lWJfHaif.js";
21
+ //#region ~icons/mdi/cloud-check-outline
22
+ var U = {
23
+ viewBox: "0 0 24 24",
24
+ width: "1.2em",
25
+ height: "1.2em"
26
+ };
27
+ function Ue(e, t) {
28
+ return r(), _("svg", U, [...t[0] ||= [x("path", {
29
+ fill: "currentColor",
30
+ 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"
31
+ }, null, -1)]]);
32
+ }
33
+ var We = l({
34
+ name: "mdi-cloud-check-outline",
35
+ render: Ue
36
+ }), W = {
37
+ viewBox: "0 0 24 24",
38
+ width: "1.2em",
39
+ height: "1.2em"
40
+ };
41
+ function Ge(e, t) {
42
+ return r(), _("svg", W, [...t[0] ||= [x("path", {
43
+ fill: "currentColor",
44
+ 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"
45
+ }, null, -1)]]);
46
+ }
47
+ var Ke = l({
48
+ name: "mdi-cloud-upload-outline",
49
+ render: Ge
50
+ }), G = 200;
51
+ async function K(e = {}, { signal: t } = {}) {
52
+ return (await M.get("/training/candidates", {
53
+ params: e,
54
+ signal: t
55
+ })).data;
56
+ }
57
+ async function q(e, t) {
58
+ return (await M.patch(`/training/candidates/${e}`, t)).data;
59
+ }
60
+ async function J(e) {
61
+ await M.delete(`/training/candidates/${e}`);
62
+ }
63
+ async function qe(e) {
64
+ let t = 0;
65
+ for (let n = 0; n < e.length; n += G) {
66
+ let r = await M.post("/training/candidates/submit", { ids: e.slice(n, n + G) });
67
+ t += r.data.queued;
68
+ }
69
+ return { queued: t };
70
+ }
71
+ async function Je({ cursor: e, signal: t } = {}) {
72
+ return (await M.get("/training/submissions", {
73
+ params: e ? { cursor: e } : void 0,
74
+ signal: t
75
+ })).data;
76
+ }
77
+ async function Ye(e) {
78
+ await M.delete(`/training/submissions/${e}`);
79
+ }
80
+ async function Xe({ signal: e } = {}) {
81
+ return (await M.get("/training/settings", { signal: e })).data;
82
+ }
83
+ async function Ze(e) {
84
+ return (await M.patch("/training/settings", e)).data;
85
+ }
86
+ var Qe = class {
87
+ queryClient = de();
88
+ getCandidatesQuery() {
89
+ return R({
90
+ queryKey: ["training-candidates"],
91
+ queryFn: ({ signal: e }) => K({}, { signal: e }),
92
+ staleTime: 5e3
93
+ });
94
+ }
95
+ getSettingsQuery() {
96
+ return R({
97
+ queryKey: ["training-settings"],
98
+ queryFn: ({ signal: e }) => Xe({ signal: e }),
99
+ staleTime: 3e4
100
+ });
101
+ }
102
+ patchCandidateMutation() {
103
+ return B({
104
+ mutationFn: ({ id: e, patch: t }) => q(e, t),
105
+ onSuccess: async () => {
106
+ await this.queryClient.refetchQueries({
107
+ queryKey: ["training-candidates"],
108
+ exact: !0
109
+ });
110
+ }
111
+ });
112
+ }
113
+ deleteCandidateMutation() {
114
+ return B({
115
+ mutationFn: J,
116
+ onSuccess: async () => {
117
+ await this.queryClient.refetchQueries({
118
+ queryKey: ["training-candidates"],
119
+ exact: !0
120
+ });
121
+ }
122
+ });
123
+ }
124
+ deleteSubmissionMutation() {
125
+ return B({ mutationFn: Ye });
126
+ }
127
+ submitCandidatesMutation() {
128
+ return B({
129
+ mutationFn: qe,
130
+ onSuccess: async () => {
131
+ await this.queryClient.refetchQueries({
132
+ queryKey: ["training-candidates"],
133
+ exact: !0
134
+ });
135
+ }
136
+ });
137
+ }
138
+ patchSettingsMutation() {
139
+ return B({
140
+ mutationFn: Ze,
141
+ onSuccess: async () => {
142
+ await this.queryClient.refetchQueries({
143
+ queryKey: ["training-settings"],
144
+ exact: !0
145
+ });
146
+ }
147
+ });
148
+ }
149
+ }, $e = [
150
+ "person",
151
+ "vehicle",
152
+ "animal",
153
+ "package",
154
+ "face",
155
+ "license_plate"
156
+ ], et = { desktop: {
157
+ maxWidth: "1280px",
158
+ width: "85vw"
159
+ } }, Y = D({ progress: null }), X = null, Z = null, Q = /* @__PURE__ */ new Set(), tt = /* @__PURE__ */ new Set();
160
+ function nt(e, t) {
161
+ for (let n of e) try {
162
+ n(t);
163
+ } catch {}
164
+ }
165
+ async function rt() {
166
+ if (Z?.ready.value) try {
167
+ let e = await Z.request("get-submit-progress");
168
+ e.active ? Y.progress = e : Y.progress?.active && (Y.progress = null);
169
+ } catch {}
170
+ }
171
+ function it() {
172
+ rt(), nt(Q, {}), nt(tt, void 0);
173
+ }
174
+ function at() {
175
+ return Z || (X = f(!0), X.run(() => {
176
+ let e = I("/training");
177
+ Z = e, e.on("candidates-changed", (e) => nt(Q, e ?? {})), e.on("submit-progress", (e) => {
178
+ Y.progress = e, nt(Q, {});
179
+ }), e.onReady(it);
180
+ }), Z);
181
+ }
182
+ function ot() {
183
+ function e() {
184
+ at();
185
+ }
186
+ function t(e) {
187
+ return Q.add(e), () => Q.delete(e);
188
+ }
189
+ function n(e) {
190
+ return tt.add(e), () => tt.delete(e);
191
+ }
192
+ function r() {
193
+ Y.progress = null;
194
+ }
195
+ return {
196
+ submitProgress: h(() => Y.progress),
197
+ connect: e,
198
+ onCandidatesChanged: t,
199
+ onResync: n,
200
+ dismissProgress: r
201
+ };
202
+ }
203
+ //#endregion
204
+ //#region src/components/CuiDialog/templates/TrainingBoxEditor/TrainingBoxEditor.vue?vue&type=script&setup=true&lang.ts
205
+ 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 = [
206
+ "x",
207
+ "y",
208
+ "width",
209
+ "height",
210
+ "stroke",
211
+ "fill",
212
+ "fill-opacity",
213
+ "stroke-width",
214
+ "onPointerdown"
215
+ ], ht = ["onPointerdown"], gt = ["cx", "cy"], _t = [
216
+ "cx",
217
+ "cy",
218
+ "fill"
219
+ ], vt = [
220
+ "x",
221
+ "y",
222
+ "width",
223
+ "height",
224
+ "stroke",
225
+ "fill"
226
+ ], yt = ["data-box-label", "onPointerdown"], bt = { class: "bbox-label-text" }, xt = {
227
+ key: 0,
228
+ class: "bbox-label-confidence"
229
+ }, St = {
230
+ key: 1,
231
+ class: "bbox-label-confidence"
232
+ }, Ct = ["src"], wt = { class: "absolute inset-0 w-full h-full" }, Tt = [
233
+ "x",
234
+ "y",
235
+ "width",
236
+ "height",
237
+ "stroke",
238
+ "fill"
239
+ ], Et = [
240
+ "x",
241
+ "y",
242
+ "width",
243
+ "height",
244
+ "stroke",
245
+ "fill"
246
+ ], Dt = {
247
+ key: 2,
248
+ class: "absolute left-2 top-1/2 -translate-y-1/2 z-[5] dark-mode"
249
+ }, Ot = {
250
+ key: 3,
251
+ class: "absolute right-2 top-1/2 -translate-y-1/2 z-[5] dark-mode"
252
+ }, kt = {
253
+ key: 0,
254
+ class: "flex items-center justify-center gap-2"
255
+ }, At = {
256
+ class: "text-muted text-sm",
257
+ for: "plate-text"
258
+ }, jt = { class: "flex flex-col items-center gap-0.5" }, Mt = { class: "flex items-center justify-center gap-1.5" }, Nt = { class: "text-muted text-sm text-center" }, Pt = { class: "text-muted text-sm text-center" }, Ft = {
259
+ key: 1,
260
+ class: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 justify-center mx-auto text-sm text-muted"
261
+ }, It = .01, Lt = .006, Rt = 26, zt = 60, Bt = 400, Vt = 110, Ht = 2, Ut = 80, Wt = 50, Gt = .003, Kt = /*#__PURE__*/ z(/* @__PURE__ */ w({
262
+ __name: "TrainingBoxEditor",
263
+ props: {
264
+ candidates: {},
265
+ startId: {},
266
+ cameraName: { type: Function },
267
+ imageUrl: { type: Function },
268
+ onSave: { type: Function },
269
+ onDelete: { type: Function }
270
+ },
271
+ setup(l, { expose: f }) {
272
+ let S = l, w = t("dialogRef"), { t: ne, te: re } = ke(), ae = _e(), oe = ot(), se = [
273
+ "nw",
274
+ "ne",
275
+ "sw",
276
+ "se"
277
+ ], k = /* @__PURE__ */ new Map(), A = D(/* @__PURE__ */ new Set()), le = D(/* @__PURE__ */ new Set()), ue = o(/* @__PURE__ */ new Map()), de = 0, fe = Math.max(0, S.candidates.findIndex((e) => e.id === S.startId)), pe = Ce(), me = b("rootRef"), j = b("labelMenuRef"), M = b("stageRef"), he = b("frameRef"), ge = b("svgRef"), N = T(S.candidates[fe]?.boxes.map((e) => ({ ...e })) ?? []), be = T({
278
+ w: 16,
279
+ h: 9
280
+ }), P = T(null), F = T(null), I = T(-1), R = T(!1), z = T(!1), B = Oe("(any-pointer: fine)"), V = T(null), we = null, De = T(-1), je = T("person"), H = T(fe), { zoom: Ne, pan: Pe, constraining: Fe, minimapStyle: Ie, minimapBoxStyle: Le, onZoomPan: Re, onDoubleClick: Be, onTouchStart: He, onTouchEnd: U, reset: Ue } = ye(M, he), { height: We } = Te(he), W = h(() => S.candidates[H.value]), Ge = h(() => S.candidates.slice(0, H.value + 1).filter((e) => !A.has(e.id)).length), Ke = h(() => S.candidates.filter((e) => !A.has(e.id)).length), G = h(() => S.candidates.slice(0, H.value).some((e) => !A.has(e.id))), K = h(() => S.candidates.slice(H.value + 1).some((e) => !A.has(e.id))), q = h(() => le.has(W.value.id) ? "verified" : W.value.status), J = h(() => N.value.map((e, t) => ({
281
+ box: e,
282
+ i: t
283
+ })).sort((e, t) => et(e) - et(t))), qe = h(() => new Map(J.value.map(({ i: e }, t) => [e, t + 1]))), Je = h(() => N.value[I.value]), Ye = h(() => {
284
+ let e = N.value[I.value];
285
+ return e?.label === "license_plate" ? e : null;
286
+ }), Xe = h(() => [...$e.map((e) => ({
287
+ key: e,
288
+ label: Y(e),
289
+ icon: xe(e).icon,
290
+ iconProps: { style: { color: xe(e).color } },
291
+ active: N.value[De.value]?.label === e,
292
+ onClick: () => on(e)
293
+ })), {
294
+ key: "remove",
295
+ label: ne("components.training_editor.remove_box"),
296
+ icon: ze,
297
+ iconProps: { class: "text-red-500" },
298
+ labelProps: { class: "text-red-500" },
299
+ onClick: () => cn(De.value)
300
+ }]), Ze = h(() => (e) => {
301
+ let t = We.value || 360;
302
+ return e.y * t >= Rt ? "above" : t - (e.y + e.height) * t >= Rt ? "below" : "inside";
303
+ }), Qe = h(() => (e) => e.x > .7);
304
+ function et({ box: e, i: t }) {
305
+ return t === I.value ? 2 ** 53 - 1 : ue.get(s(e)) ?? t;
306
+ }
307
+ function Y(e) {
308
+ let t = `components.training_editor.labels.${e}`;
309
+ return re(t) ? ne(t) : e;
310
+ }
311
+ function X(e) {
312
+ return xe(e);
313
+ }
314
+ function Z(e) {
315
+ return `${e * 100}%`;
316
+ }
317
+ function Q(e, t) {
318
+ return Z(t === "nw" || t === "sw" ? e.x : e.x + e.width);
319
+ }
320
+ function tt(e, t) {
321
+ return Z(t === "nw" || t === "ne" ? e.y : e.y + e.height);
322
+ }
323
+ function nt(e) {
324
+ let t = { backgroundColor: X(e.label).color };
325
+ Qe.value(e) ? t.right = Z(1 - e.x - e.width) : t.left = Z(e.x);
326
+ let n = Ze.value(e);
327
+ return t.top = n === "above" ? Z(e.y) : n === "below" ? Z(e.y + e.height) : `calc(${Z(e.y)} + 2px)`, t;
328
+ }
329
+ function rt(e) {
330
+ let t = e.target;
331
+ t.naturalWidth && t.naturalHeight && (be.value = {
332
+ w: t.naturalWidth,
333
+ h: t.naturalHeight
334
+ });
335
+ }
336
+ function it(e) {
337
+ let t = ge.value?.getBoundingClientRect();
338
+ return !t || t.width === 0 || t.height === 0 ? {
339
+ x: 0,
340
+ y: 0
341
+ } : {
342
+ x: Math.min(1, Math.max(0, (e.clientX - t.left) / t.width)),
343
+ y: Math.min(1, Math.max(0, (e.clientY - t.top) / t.height))
344
+ };
345
+ }
346
+ function at(e, t) {
347
+ P.value = {
348
+ ...t,
349
+ moved: !1
350
+ }, ge.value?.setPointerCapture(e.pointerId);
351
+ }
352
+ function Kt(e) {
353
+ if (j.value?.hide(), Ne.value > 1 || !e.isPrimary) return;
354
+ let { x: t, y: n } = it(e);
355
+ at(e, {
356
+ mode: "draw",
357
+ index: -1,
358
+ startX: t,
359
+ startY: n,
360
+ origin: {
361
+ label: je.value,
362
+ confidence: 1,
363
+ x: t,
364
+ y: n,
365
+ width: 0,
366
+ height: 0
367
+ }
368
+ });
369
+ }
370
+ function qt(e, t) {
371
+ if (!t.isPrimary) return;
372
+ let { x: n, y: r } = it(t);
373
+ I.value = e, at(t, {
374
+ mode: "move",
375
+ index: e,
376
+ startX: n,
377
+ startY: r,
378
+ origin: { ...N.value[e] }
379
+ });
380
+ }
381
+ function Jt(e, t, n) {
382
+ if (!n.isPrimary) return;
383
+ j.value?.hide();
384
+ let { x: r, y: i } = it(n);
385
+ I.value = e, at(n, {
386
+ mode: "resize",
387
+ index: e,
388
+ corner: t,
389
+ startX: r,
390
+ startY: i,
391
+ origin: { ...N.value[e] }
392
+ });
393
+ }
394
+ function Yt(e) {
395
+ e.touches.length > 1 && P.value && (P.value = null, F.value = null, V.value = null), He(e);
396
+ }
397
+ function Xt(e) {
398
+ let t = P.value;
399
+ if (!t) return;
400
+ let { x: n, y: r } = it(e);
401
+ if (Math.hypot(n - t.startX, r - t.startY) > Lt && (t.moved = !0), e.pointerType === "touch" && t.moved && (Qt(t) ? $t(e) : V.value = null), t.mode === "draw") {
402
+ if (t.moved) {
403
+ let e = rn(t.startX, t.startY, n, r);
404
+ F.value = e.width >= It && e.height >= It ? {
405
+ label: je.value,
406
+ confidence: 1,
407
+ ...e
408
+ } : null;
409
+ }
410
+ return;
411
+ }
412
+ if (t.mode === "move") {
413
+ if (!t.moved) return;
414
+ let e = N.value[t.index];
415
+ 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)));
416
+ return;
417
+ }
418
+ 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;
419
+ Object.assign(N.value[t.index], rn(i, a, n, r));
420
+ }
421
+ function Zt(e) {
422
+ let t = P.value;
423
+ if (P.value = null, V.value = null, t) {
424
+ if (t.mode === "draw") {
425
+ F.value && F.value.width >= It && F.value.height >= It ? (N.value.push({ ...F.value }), I.value = N.value.length - 1) : t.moved || (I.value = -1), F.value = null;
426
+ return;
427
+ }
428
+ t.mode === "move" && !t.moved && an(t.index, e);
429
+ }
430
+ }
431
+ function Qt(e) {
432
+ let t = ge.value?.getBoundingClientRect();
433
+ if (!t || t.width === 0) return !1;
434
+ let n = e.mode === "draw" ? F.value : N.value[e.index];
435
+ return !n || Math.max(n.width * t.width, n.height * t.height) <= Wt;
436
+ }
437
+ function $t(e) {
438
+ let t = he.value?.getBoundingClientRect(), n = M.value?.getBoundingClientRect();
439
+ if (!t || !n || t.width === 0 || t.height === 0) {
440
+ V.value = null;
441
+ return;
442
+ }
443
+ let r = Vt / 2, i = Math.min(Math.max(e.clientX - n.left, 59), n.width - r - 4), a = e.clientY - n.top - Ut;
444
+ a - r < 4 && (a = e.clientY - n.top + Ut), V.value = {
445
+ x: i,
446
+ y: a,
447
+ frameW: t.width,
448
+ frameH: t.height,
449
+ tx: r - (e.clientX - t.left) * Ht,
450
+ ty: r - (e.clientY - t.top) * Ht
451
+ };
452
+ }
453
+ function en(e) {
454
+ let t = e instanceof HTMLElement || e instanceof SVGElement ? e : null;
455
+ if (!t || M.value?.contains(t) || t.closest(".p-dialog-header") || t.closest("button")) return !1;
456
+ let n = me.value?.closest(".p-dialog-content")?.lastElementChild;
457
+ return !(n && n !== me.value && n.contains(t));
458
+ }
459
+ function tn(e) {
460
+ if (we = null, e.touches.length !== 1 || !en(e.target)) return;
461
+ let t = e.touches[0];
462
+ we = {
463
+ x: t.clientX,
464
+ y: t.clientY,
465
+ at: Date.now()
466
+ };
467
+ }
468
+ function nn(e) {
469
+ let t = we;
470
+ if (we = null, !t || e.changedTouches.length !== 1) return;
471
+ let n = e.changedTouches[0], r = n.clientX - t.x, i = n.clientY - t.y;
472
+ Date.now() - t.at <= Bt && Math.abs(r) >= zt && Math.abs(r) > 2 * Math.abs(i) && $(r < 0 ? 1 : -1);
473
+ }
474
+ function rn(e, t, n, r) {
475
+ return {
476
+ x: Math.min(e, n),
477
+ y: Math.min(t, r),
478
+ width: Math.abs(n - e),
479
+ height: Math.abs(r - t)
480
+ };
481
+ }
482
+ function an(e, t) {
483
+ De.value = e;
484
+ let n = he.value?.querySelector(`[data-box-label="${e}"]`), r = { currentTarget: he.value ?? t.currentTarget };
485
+ j.value?.toggleMenu(r, n ?? void 0);
486
+ }
487
+ function on(e) {
488
+ let t = N.value[De.value];
489
+ t && (t.label = e, t.confidence = 1, je.value = e);
490
+ }
491
+ function sn(e) {
492
+ let t = N.value[I.value];
493
+ t && (t.text = (e ?? "").toUpperCase().replace(/[^A-Z0-9ÄÖÜ\- ]/g, "") || void 0);
494
+ }
495
+ function cn(e) {
496
+ e < 0 || e >= N.value.length || (N.value.splice(e, 1), I.value = -1);
497
+ }
498
+ function ln(e, t = !0) {
499
+ e < 0 || e >= S.candidates.length || (t && k.set(W.value.id, N.value.map((e) => ({ ...e }))), H.value = e, N.value = (k.get(W.value.id) ?? W.value.boxes).map((e) => ({ ...e })), F.value = null, P.value = null, V.value = null, I.value = -1, De.value = -1, ue.clear(), j.value?.hide(), Ue());
500
+ }
501
+ async function un(e) {
502
+ return await S.onSave(W.value.id, N.value.map((e) => ({ ...e })), e), k.set(W.value.id, N.value.map((e) => ({ ...e }))), e === "verified" && le.add(W.value.id), $(1, !1) ? null : void 0;
503
+ }
504
+ function $(e, t = !0) {
505
+ let n = H.value + e;
506
+ for (; n >= 0 && n < S.candidates.length && A.has(S.candidates[n].id);) n += e;
507
+ return n < 0 || n >= S.candidates.length ? !1 : (ln(n, t), !0);
508
+ }
509
+ async function dn() {
510
+ let e = W.value.id;
511
+ A.add(e);
512
+ try {
513
+ await S.onDelete(e);
514
+ } catch (t) {
515
+ throw A.delete(e), t;
516
+ }
517
+ return k.delete(e), $(1, !1) || $(-1, !1) ? null : void 0;
518
+ }
519
+ function fn(e) {
520
+ let t = !1;
521
+ for (let n of e) !A.has(n) && S.candidates.some((e) => e.id === n) && (A.add(n), k.delete(n), n === W.value.id && (t = !0));
522
+ t && (ae.add({
523
+ severity: "warn",
524
+ detail: ne("components.training_editor.removed_meanwhile"),
525
+ life: 4e3
526
+ }), !$(1, !1) && !$(-1, !1) && w.value.close({ status: "cancel" }));
527
+ }
528
+ function pn() {
529
+ for (let e of [1, -1]) {
530
+ let t = H.value + e;
531
+ for (; t >= 0 && t < S.candidates.length && A.has(S.candidates[t].id);) t += e;
532
+ let n = S.candidates[t];
533
+ n && (new Image().src = S.imageUrl(n.id));
534
+ }
535
+ }
536
+ function mn(e) {
537
+ N.value.length && (I.value = (I.value + e + N.value.length) % N.value.length);
538
+ }
539
+ function hn(e) {
540
+ let t = N.value[I.value];
541
+ if (!t) return;
542
+ let n = $e, r = n[(n.indexOf(t.label) + e + n.length) % n.length];
543
+ t.label = r, t.confidence = 1, je.value = r;
544
+ }
545
+ function gn(e, t, n) {
546
+ let r = N.value[I.value];
547
+ r && (n ? (r.width = Math.min(1 - r.x, Math.max(It, r.width + e)), r.height = Math.min(1 - r.y, Math.max(It, 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))));
548
+ }
549
+ async function _n() {
550
+ if (!z.value) {
551
+ z.value = !0;
552
+ try {
553
+ let e = await un("verified");
554
+ e !== null && w.value.close({
555
+ status: "confirm",
556
+ data: e
557
+ });
558
+ } finally {
559
+ z.value = !1;
560
+ }
561
+ }
562
+ }
563
+ te(H, pn, { immediate: !0 }), te(Je, (e, t) => {
564
+ t && t !== e && N.value.includes(t) && ue.set(s(t), --de);
565
+ }), Ee(window, "keydown", (e) => {
566
+ if (e.target?.closest?.("input, textarea")) return;
567
+ let t = {
568
+ ArrowLeft: [-.003, 0],
569
+ ArrowRight: [Gt, 0],
570
+ ArrowUp: [0, -.003],
571
+ ArrowDown: [0, Gt]
572
+ };
573
+ if (t[e.key]) {
574
+ if (I.value >= 0) {
575
+ e.preventDefault();
576
+ let [n, r] = t[e.key];
577
+ gn(n, r, e.shiftKey);
578
+ } else !e.repeat && e.key === "ArrowLeft" ? $(-1) : !e.repeat && e.key === "ArrowRight" && $(1);
579
+ return;
580
+ }
581
+ e.repeat || (e.key === "Tab" ? (e.preventDefault(), mn(e.shiftKey ? -1 : 1)) : e.key === "Escape" ? (I.value = -1, j.value?.hide()) : (e.key === "Delete" || e.key === "Backspace") && I.value >= 0 ? cn(I.value) : e.key === "s" || e.key === "S" ? hn(e.shiftKey ? -1 : 1) : e.key === " " && !j.value?.isOpen && (e.preventDefault(), _n()));
582
+ }), Ee(() => me.value?.closest(".p-dialog-content") ?? void 0, "touchstart", tn, { passive: !0 }), Ee(() => me.value?.closest(".p-dialog-content") ?? void 0, "touchend", nn, { passive: !0 }), oe.connect();
583
+ let vn = oe.onCandidatesChanged((e) => {
584
+ e.removed?.length && fn(e.removed);
585
+ });
586
+ return i(() => {
587
+ vn();
588
+ }), f({
589
+ isLoading: z,
590
+ onConfirm: () => un("verified"),
591
+ onCancel: () => dn()
592
+ }), (t, i) => {
593
+ let o = ie, s = Se, f = Ae, h = L, te = Me, b = Ve;
594
+ return r(), _("div", {
595
+ ref_key: "rootRef",
596
+ ref: me,
597
+ class: "flex flex-col gap-3 h-full min-h-0"
598
+ }, [
599
+ x("div", st, [x("div", ct, [
600
+ E(o, {
601
+ severity: m(q) === "verified" ? "success" : "info",
602
+ value: t.$t(`views.training.status_${m(q)}`),
603
+ class: "shrink-0"
604
+ }, null, 8, ["severity", "value"]),
605
+ x("span", lt, a(l.cameraName(m(W).cameraId)), 1),
606
+ x("span", ut, a(m(ve)(m(W).createdAt)), 1)
607
+ ]), x("span", dt, a(m(Ge)) + " / " + a(m(Ke)), 1)]),
608
+ x("div", {
609
+ ref_key: "stageRef",
610
+ ref: M,
611
+ class: "stage relative w-full bg-black rounded-lg shrink-0 overflow-hidden select-none"
612
+ }, [
613
+ E(m(O), {
614
+ pan: m(Pe),
615
+ "onUpdate:pan": i[6] ||= (e) => p(Pe) ? Pe.value = e : null,
616
+ zoom: m(Ne),
617
+ "onUpdate:zoom": i[7] ||= (e) => p(Ne) ? Ne.value = e : null,
618
+ "pan-enabled": m(Ne) > 1 && !m(P),
619
+ "enable-control-button": !1,
620
+ "dbl-click-enabled": !1,
621
+ "min-zoom": 1,
622
+ "max-zoom": m(5),
623
+ selector: `[data-stage-zoom='${m(pe)}']`,
624
+ "zoom-origin": "pointer",
625
+ class: ee(["absolute inset-0 flex items-center justify-center", { "zoom-constraining": m(Fe) }]),
626
+ onPanned: m(Re),
627
+ onZoom: m(Re),
628
+ onDblclick: m(Be),
629
+ onTouchstart: Yt,
630
+ onTouchend: m(U)
631
+ }, {
632
+ default: g(() => [x("div", {
633
+ ref_key: "frameRef",
634
+ ref: he,
635
+ "data-stage-zoom": m(pe),
636
+ class: "frame relative",
637
+ style: v({
638
+ "--ar-w": m(be).w,
639
+ "--ar-h": m(be).h
640
+ })
641
+ }, [
642
+ x("img", {
643
+ src: l.imageUrl(m(W).id),
644
+ class: "absolute inset-0 w-full h-full",
645
+ draggable: "false",
646
+ onLoad: rt
647
+ }, null, 40, pt),
648
+ (r(), _("svg", {
649
+ ref_key: "svgRef",
650
+ ref: ge,
651
+ class: ee(["absolute inset-0 w-full h-full touch-none", m(Ne) > 1 ? "cursor-grab" : "cursor-crosshair"]),
652
+ onPointerdown: Kt,
653
+ onPointermove: Xt,
654
+ onPointerup: Zt,
655
+ onPointercancel: Zt
656
+ }, [(r(!0), _(y, null, n(m(J), ({ box: t, i: a }) => (r(), _("g", { key: a }, [x("rect", {
657
+ x: Z(t.x),
658
+ y: Z(t.y),
659
+ width: Z(t.width),
660
+ height: Z(t.height),
661
+ stroke: X(t.label).color,
662
+ fill: X(t.label).color,
663
+ "fill-opacity": a === m(I) ? .22 : .12,
664
+ "stroke-width": a === m(I) ? 3.5 : 2,
665
+ "vector-effect": "non-scaling-stroke",
666
+ class: "cursor-move",
667
+ onPointerdown: e((e) => qt(a, e), ["stop"]),
668
+ onTouchstart: i[0] ||= e(() => {}, ["stop"]),
669
+ onMousedown: i[1] ||= e(() => {}, ["stop"])
670
+ }, null, 40, mt), (r(), _(y, null, n(se, (n) => x("g", {
671
+ key: n,
672
+ class: "cursor-nwse-resize",
673
+ onPointerdown: e((e) => Jt(a, n, e), ["stop"]),
674
+ onTouchstart: i[2] ||= e(() => {}, ["stop"]),
675
+ onMousedown: i[3] ||= e(() => {}, ["stop"])
676
+ }, [x("circle", {
677
+ cx: Q(t, n),
678
+ cy: tt(t, n),
679
+ r: "14",
680
+ fill: "transparent"
681
+ }, null, 8, gt), x("circle", {
682
+ cx: Q(t, n),
683
+ cy: tt(t, n),
684
+ r: "4.5",
685
+ fill: X(t.label).color
686
+ }, null, 8, _t)], 40, ht)), 64))]))), 128)), m(F) ? (r(), _("rect", {
687
+ key: 0,
688
+ x: Z(m(F).x),
689
+ y: Z(m(F).y),
690
+ width: Z(m(F).width),
691
+ height: Z(m(F).height),
692
+ stroke: X(m(F).label).color,
693
+ fill: X(m(F).label).color,
694
+ "fill-opacity": "0.1",
695
+ "stroke-dasharray": "6 4",
696
+ "stroke-width": "2",
697
+ "vector-effect": "non-scaling-stroke"
698
+ }, null, 8, vt)) : d("", !0)], 34)),
699
+ (r(!0), _(y, null, n(m(N), (t, n) => (r(), _("div", {
700
+ key: `label-${n}`,
701
+ class: ee(["bbox-label cursor-move", {
702
+ "label-bottom": m(Ze)(t) === "below",
703
+ "label-inside": m(Ze)(t) === "inside",
704
+ "label-right": m(Qe)(t)
705
+ }]),
706
+ "data-box-label": n,
707
+ onPointerdown: e((e) => qt(n, e), ["stop"]),
708
+ onTouchstart: i[4] ||= e(() => {}, ["stop"]),
709
+ onMousedown: i[5] ||= e(() => {}, ["stop"]),
710
+ style: v([nt(t), { zIndex: m(qe).get(n) }])
711
+ }, [
712
+ (r(), u(c(X(t.label).icon), { class: "bbox-label-icon" })),
713
+ x("span", bt, a(Y(t.label)), 1),
714
+ t.text ? (r(), _("span", xt, a(t.text), 1)) : t.confidence < 1 ? (r(), _("span", St, a(Math.round(t.confidence * 100)) + "%", 1)) : d("", !0)
715
+ ], 46, yt))), 128))
716
+ ], 12, ft)]),
717
+ _: 1
718
+ }, 8, [
719
+ "pan",
720
+ "zoom",
721
+ "pan-enabled",
722
+ "max-zoom",
723
+ "selector",
724
+ "class",
725
+ "onPanned",
726
+ "onZoom",
727
+ "onDblclick",
728
+ "onTouchend"
729
+ ]),
730
+ m(Ie) ? (r(), _("div", {
731
+ key: 0,
732
+ class: "zoom-minimap",
733
+ style: v(m(Le) ?? void 0)
734
+ }, [x("div", {
735
+ class: "zoom-minimap-viewport",
736
+ style: v(m(Ie))
737
+ }, null, 4)], 4)) : d("", !0),
738
+ m(V) ? (r(), _("div", {
739
+ key: 1,
740
+ class: "loupe",
741
+ style: v({
742
+ left: `${m(V).x}px`,
743
+ top: `${m(V).y}px`
744
+ })
745
+ }, [x("div", {
746
+ class: "loupe-content",
747
+ style: v({
748
+ width: `${m(V).frameW}px`,
749
+ height: `${m(V).frameH}px`,
750
+ transform: `translate(${m(V).tx}px, ${m(V).ty}px) scale(${Ht})`
751
+ })
752
+ }, [x("img", {
753
+ src: l.imageUrl(m(W).id),
754
+ class: "absolute inset-0 w-full h-full",
755
+ draggable: "false"
756
+ }, null, 8, Ct), (r(), _("svg", wt, [(r(!0), _(y, null, n(m(N), (e, t) => (r(), _("rect", {
757
+ key: t,
758
+ x: Z(e.x),
759
+ y: Z(e.y),
760
+ width: Z(e.width),
761
+ height: Z(e.height),
762
+ stroke: X(e.label).color,
763
+ fill: X(e.label).color,
764
+ "fill-opacity": "0.1",
765
+ "stroke-width": "1.5"
766
+ }, null, 8, Tt))), 128)), m(F) ? (r(), _("rect", {
767
+ key: 0,
768
+ x: Z(m(F).x),
769
+ y: Z(m(F).y),
770
+ width: Z(m(F).width),
771
+ height: Z(m(F).height),
772
+ stroke: X(m(F).label).color,
773
+ fill: X(m(F).label).color,
774
+ "fill-opacity": "0.1",
775
+ "stroke-dasharray": "4 3",
776
+ "stroke-width": "1.5"
777
+ }, null, 8, Et)) : d("", !0)]))], 4), i[11] ||= x("div", { class: "loupe-crosshair" }, null, -1)], 4)) : d("", !0),
778
+ m(G) ? (r(), _("div", Dt, [E(f, {
779
+ severity: "secondary",
780
+ rounded: "",
781
+ class: "cui-icon-md opacity-60 hover:opacity-100",
782
+ onClick: i[8] ||= e((e) => $(-1), ["stop"])
783
+ }, {
784
+ icon: g(() => [E(s, {
785
+ width: "100%",
786
+ height: "100%"
787
+ })]),
788
+ _: 1
789
+ })])) : d("", !0),
790
+ m(K) ? (r(), _("div", Ot, [E(f, {
791
+ severity: "secondary",
792
+ rounded: "",
793
+ class: "cui-icon-md opacity-60 hover:opacity-100",
794
+ onClick: i[9] ||= e((e) => $(1), ["stop"])
795
+ }, {
796
+ icon: g(() => [E(h, {
797
+ width: "100%",
798
+ height: "100%"
799
+ })]),
800
+ _: 1
801
+ })])) : d("", !0)
802
+ ], 512),
803
+ m(Ye) ? (r(), _("div", kt, [x("label", At, a(t.$t("components.training_editor.plate_text")), 1), E(te, {
804
+ id: "plate-text",
805
+ "model-value": m(Ye).text ?? "",
806
+ size: "small",
807
+ maxlength: "12",
808
+ class: "w-40 uppercase",
809
+ placeholder: "ABC 1234",
810
+ "onUpdate:modelValue": sn
811
+ }, null, 8, ["model-value"])])) : d("", !0),
812
+ x("div", jt, [x("div", Mt, [x("span", Nt, a(t.$t("components.training_editor.hint")), 1), m(B) ? (r(), u(f, {
813
+ key: 0,
814
+ severity: "secondary",
815
+ text: "",
816
+ rounded: "",
817
+ class: "cui-icon-sm shrink-0",
818
+ onClick: i[10] ||= (e) => R.value = !m(R)
819
+ }, {
820
+ icon: g(() => [E(b, { class: "w-4 h-4" })]),
821
+ _: 1
822
+ })) : d("", !0)]), x("span", Pt, a(t.$t("components.training_editor.hint_wrong")), 1)]),
823
+ m(B) && m(R) ? (r(), _("div", Ft, [
824
+ i[12] ||= x("span", null, [x("kbd", null, "Tab")], -1),
825
+ x("span", null, a(t.$t("components.training_editor.sc_select")), 1),
826
+ i[13] ||= C(),
827
+ i[14] ||= x("span", null, [x("kbd", null, "←↑→↓")], -1),
828
+ x("span", null, a(t.$t("components.training_editor.sc_move")), 1),
829
+ i[15] ||= C(),
830
+ i[16] ||= x("span", null, [
831
+ x("kbd", null, "Shift"),
832
+ C(" + "),
833
+ x("kbd", null, "←↑→↓")
834
+ ], -1),
835
+ x("span", null, a(t.$t("components.training_editor.sc_resize")), 1),
836
+ i[17] ||= C(),
837
+ i[18] ||= x("span", null, [x("kbd", null, "S")], -1),
838
+ x("span", null, a(t.$t("components.training_editor.sc_label")), 1),
839
+ i[19] ||= C(),
840
+ i[20] ||= x("span", null, [x("kbd", null, "Del")], -1),
841
+ x("span", null, a(t.$t("components.training_editor.sc_delete")), 1),
842
+ i[21] ||= C(),
843
+ i[22] ||= x("span", null, [x("kbd", null, "Esc")], -1),
844
+ x("span", null, a(t.$t("components.training_editor.sc_deselect")), 1),
845
+ i[23] ||= C(),
846
+ i[24] ||= x("span", null, [x("kbd", null, "Space")], -1),
847
+ x("span", null, a(t.$t("components.training_editor.sc_verify")), 1),
848
+ i[25] ||= C(),
849
+ i[26] ||= x("span", null, [
850
+ x("kbd", null, "←"),
851
+ C(" / "),
852
+ x("kbd", null, "→")
853
+ ], -1),
854
+ x("span", null, a(t.$t("components.training_editor.sc_nav")), 1)
855
+ ])) : d("", !0),
856
+ E(ce, {
857
+ ref_key: "labelMenuRef",
858
+ ref: j,
859
+ items: m(Xe),
860
+ popover: { pt: { content: { class: "p-0! rounded-xl! overflow-hidden!" } } }
861
+ }, null, 8, ["items"])
862
+ ], 512);
863
+ };
864
+ }
865
+ }), [["__scopeId", "data-v-0e304b72"]]), qt = { class: "flex flex-col gap-3" }, Jt = {
866
+ key: 0,
867
+ class: "flex flex-col gap-2"
868
+ }, Yt = {
869
+ key: 1,
870
+ class: "flex flex-col items-center gap-3 py-10"
871
+ }, Xt = { class: "text-muted text-sm text-center max-w-sm" }, Zt = {
872
+ key: 2,
873
+ class: "flex flex-col items-center gap-3 py-10"
874
+ }, Qt = { class: "text-muted text-sm text-center max-w-sm" }, $t = { class: "text-muted text-sm" }, en = { class: "w-24 aspect-video rounded-lg overflow-hidden bg-black/5 dark:bg-black/30 shrink-0" }, tn = { class: "flex-1 min-w-0" }, nn = { class: "flex flex-wrap items-center gap-1" }, rn = { class: "text-xs text-muted mt-1" }, an = {
875
+ key: 0,
876
+ class: "flex justify-center py-2"
877
+ }, on = /* @__PURE__ */ w({
878
+ __name: "TrainingSubmissions",
879
+ setup(e) {
880
+ let t = new Qe(), { t: o, te: s } = ke(), ee = _e(), c = ot(), l = t.deleteSubmissionMutation(), f = T(""), p = T([]), h = T(0), C = T(), w = T(!0), D = T(!1), re = T(!1), O = b("loadMoreRef");
881
+ function ae(e) {
882
+ let t = {};
883
+ for (let n of e.labels) t[n.label] = (t[n.label] ?? 0) + 1;
884
+ return t;
885
+ }
886
+ function se(e) {
887
+ let t = `components.training_editor.labels.${e}`;
888
+ return s(t) ? o(t) : e;
889
+ }
890
+ async function k() {
891
+ w.value = p.value.length === 0;
892
+ try {
893
+ let e = await Je();
894
+ p.value = e.items, h.value = e.total ?? e.items.length, C.value = e.nextCursor, re.value = !1;
895
+ } catch {
896
+ re.value = !0;
897
+ } finally {
898
+ w.value = !1;
899
+ }
900
+ }
901
+ async function ce() {
902
+ let e = C.value;
903
+ if (e && !D.value) {
904
+ D.value = !0;
905
+ try {
906
+ let t = await Je({ cursor: e }), n = new Set(p.value.map((e) => e.id));
907
+ p.value.push(...t.items.filter((e) => !n.has(e.id))), C.value = t.nextCursor;
908
+ } catch (e) {
909
+ ee.add({
910
+ severity: "error",
911
+ detail: e?.message ?? String(e),
912
+ life: 5e3
913
+ });
914
+ } finally {
915
+ D.value = !1;
916
+ }
917
+ }
918
+ }
919
+ async function A(e) {
920
+ f.value = e;
921
+ try {
922
+ await l.mutateAsync(e), p.value = p.value.filter((t) => t.id !== e), h.value = Math.max(0, h.value - 1);
923
+ } catch (e) {
924
+ ee.add({
925
+ severity: "error",
926
+ detail: e?.message ?? String(e),
927
+ life: 5e3
928
+ });
929
+ } finally {
930
+ f.value = "";
931
+ }
932
+ }
933
+ we(O, ([e]) => {
934
+ e?.isIntersecting && ce();
935
+ }), te(() => c.submitProgress.value?.active, (e, t) => {
936
+ t && !e && k();
937
+ });
938
+ let le = c.onResync(() => {
939
+ k();
940
+ });
941
+ return i(() => {
942
+ le();
943
+ }), k(), (e, t) => {
944
+ let i = N, o = Le, s = ue, ee = oe, c = ie, te = ze, b = Ae, T = F, k = ne;
945
+ return r(), _("div", qt, [m(w) ? (r(), _("div", Jt, [(r(), _(y, null, n(4, (e) => E(i, {
946
+ key: e,
947
+ height: "72px",
948
+ "border-radius": "12px"
949
+ })), 64))])) : m(re) ? (r(), _("div", Yt, [E(o, { class: "w-10 h-10 text-muted" }), x("span", Xt, a(e.$t("components.training_submissions.load_failed")), 1)])) : m(p).length ? (r(), _(y, { key: 3 }, [
950
+ x("span", $t, a(e.$t("components.training_submissions.count", m(h))), 1),
951
+ (r(!0), _(y, null, n(m(p), (t) => (r(), _("div", {
952
+ key: t.id,
953
+ class: "cui-card h-auto! shrink-0 p-2 flex items-center gap-3"
954
+ }, [
955
+ x("div", en, [E(ee, {
956
+ src: t.imageUrl,
957
+ "image-container-class": "w-full h-full",
958
+ "image-style": { objectFit: "cover" }
959
+ }, null, 8, ["src"])]),
960
+ x("div", tn, [x("div", nn, [(r(!0), _(y, null, n(ae(t), (e, t) => (r(), _("span", {
961
+ key: t,
962
+ class: "px-1.5 py-0.5 rounded text-xs font-medium text-white",
963
+ style: v({ backgroundColor: m(xe)(String(t)).color })
964
+ }, a(se(String(t))) + " ×" + a(e), 5))), 128))]), x("div", rn, a(m(ve)(new Date(t.createdAt).getTime())), 1)]),
965
+ E(c, {
966
+ severity: t.usedInWave ? "success" : "info",
967
+ value: t.usedInWave ? e.$t("components.training_submissions.status_trained") : e.$t("components.training_submissions.status_pool"),
968
+ class: "shrink-0"
969
+ }, null, 8, ["severity", "value"]),
970
+ S((r(), u(b, {
971
+ severity: "danger",
972
+ text: "",
973
+ rounded: "",
974
+ class: "cui-icon-sm shrink-0",
975
+ loading: m(l).isPending.value && m(f) === t.id,
976
+ onClick: (e) => A(t.id)
977
+ }, {
978
+ icon: g(() => [E(te, {
979
+ width: "100%",
980
+ height: "100%"
981
+ })]),
982
+ _: 1
983
+ }, 8, ["loading", "onClick"])), [[
984
+ k,
985
+ e.$t("components.training_submissions.delete"),
986
+ void 0,
987
+ { left: !0 }
988
+ ]])
989
+ ]))), 128)),
990
+ m(D) ? (r(), _("div", an, [E(T, { class: "w-5 h-5 text-primary" })])) : m(C) ? (r(), _("div", {
991
+ key: 1,
992
+ ref_key: "loadMoreRef",
993
+ ref: O,
994
+ class: "h-px"
995
+ }, null, 512)) : d("", !0)
996
+ ], 64)) : (r(), _("div", Zt, [E(s, { class: "w-10 h-10 text-muted" }), x("span", Qt, a(e.$t("components.training_submissions.empty")), 1)]))]);
997
+ };
998
+ }
999
+ }), sn = { desktop: {
1000
+ maxWidth: "720px",
1001
+ width: "90vw"
1002
+ } }, cn = { class: "flex flex-col" }, ln = {
1003
+ key: 0,
1004
+ class: "page-title"
1005
+ }, un = { class: "font-semibold text-xl truncate" }, $ = { class: "flex gap-2 mb-4" }, dn = {
1006
+ key: 1,
1007
+ class: "cui-card h-auto! shrink-0 px-3 py-2 mb-4 flex items-center gap-3"
1008
+ }, fn = { class: "flex-1 min-w-0" }, pn = { class: "text-sm" }, mn = { class: "flex-1 text-sm" }, hn = { class: "p-3" }, gn = {
1009
+ key: 3,
1010
+ class: "flex flex-1 min-h-0 flex-col items-center justify-center w-full gap-4 py-16"
1011
+ }, _n = { class: "text-muted text-sm text-center max-w-md" }, vn = { class: "relative flex-1 min-h-0 overflow-hidden bg-black/5 dark:bg-black/30" }, yn = { class: "absolute top-1.5 left-1.5 flex flex-wrap gap-1" }, bn = {
1012
+ key: 0,
1013
+ class: "absolute bottom-1.5 left-1.5"
1014
+ }, xn = {
1015
+ key: 1,
1016
+ class: "absolute top-1.5 right-1.5 dark-mode"
1017
+ }, Sn = { class: "flex items-center justify-between gap-2" }, Cn = { class: "flex items-center gap-2 min-w-0" }, wn = { class: "min-w-0" }, Tn = { class: "font-medium truncate" }, En = { class: "text-xs text-muted" }, Dn = 40, On = /*#__PURE__*/ z(/* @__PURE__ */ w({
1018
+ __name: "Training",
1019
+ setup(t) {
1020
+ let o = new j(), s = new Qe(), { t: c, te: l } = ke(), f = ge(), w = _e(), { smBreakpoint: D } = A(), O = s.getCandidatesQuery(), ue = s.getSettingsQuery(), de = s.patchCandidateMutation(), M = s.deleteCandidateMutation(), ye = s.patchSettingsMutation(), Se = s.submitCandidatesMutation(), Ce = ot(), { data: I } = o.getCamerasQuery({
1021
+ page: 1,
1022
+ pageSize: -1
1023
+ }), L = T(""), R = T(Dn), z = b("cameraMenuRef"), B = b("settingsMenuRef"), Te = b("loadMoreRef"), Ee = h(() => ({ gridTemplateColumns: `repeat(auto-fill, minmax(${D.value ? "220px" : "260px"}, 1fr))` })), Oe = h(() => {
1024
+ let e = [...new Set((O.data.value ?? []).map((e) => Z(e.cameraId)))].sort((e, t) => e.localeCompare(t));
1025
+ return [{
1026
+ key: "all",
1027
+ label: c("views.training.all_cameras"),
1028
+ active: L.value === "",
1029
+ onClick: () => {
1030
+ L.value = "";
1031
+ }
1032
+ }, ...e.map((e) => ({
1033
+ key: e,
1034
+ label: e,
1035
+ active: L.value === e,
1036
+ onClick: () => {
1037
+ L.value = e;
1038
+ }
1039
+ }))];
1040
+ }), Ve = h(() => [{
1041
+ key: "collect",
1042
+ label: c("views.training.collection_enabled"),
1043
+ description: c("views.training.collection_hint"),
1044
+ toggle: !0,
1045
+ toggleState: ue.data.value?.enabled ?? !0,
1046
+ onClick: () => {
1047
+ ft(!(ue.data.value?.enabled ?? !0));
1048
+ }
1049
+ }]), U = h(() => {
1050
+ let e = L.value.trim().toLowerCase();
1051
+ return e ? (O.data.value ?? []).filter((t) => Z(t.cameraId).toLowerCase().includes(e)) : O.data.value ?? [];
1052
+ }), Ue = h(() => U.value.slice(0, R.value)), W = h(() => U.value.length > Ue.value.length), Ge = h(() => (O.data.value ?? []).filter((e) => q(e)).length), G = h(() => Ce.submitProgress.value ? Ce.submitProgress.value : Ge.value > 0 ? {
1053
+ active: !0,
1054
+ total: Ge.value,
1055
+ done: 0,
1056
+ failed: 0
1057
+ } : null), K = h(() => U.value.filter((e) => !q(e)));
1058
+ function q(e) {
1059
+ return e.upload === "queued" || e.upload === "uploading";
1060
+ }
1061
+ let { selectionMode: J, selectedIds: qe, allSelected: Je, bulkBusy: Ye, enterSelectionMode: Xe, exitSelectionMode: Ze, toggleSelectAll: $e, toggleSelection: Y } = V(K, (e) => e.id), X = h(() => [...qe.value].filter((e) => O.data.value?.find((t) => t.id === e)?.status === "verified"));
1062
+ function Z(e) {
1063
+ return I.value?.result?.find((t) => t._id === e)?.name ?? e;
1064
+ }
1065
+ function Q(e) {
1066
+ return be(`/api/training/candidates/${e}/image`) ?? "";
1067
+ }
1068
+ function tt(e) {
1069
+ let t = `components.training_editor.labels.${e}`;
1070
+ return l(t) ? c(t) : e;
1071
+ }
1072
+ function nt(e) {
1073
+ let t = {};
1074
+ for (let n of e.boxes) t[n.label] = (t[n.label] ?? 0) + 1;
1075
+ return t;
1076
+ }
1077
+ function rt(e) {
1078
+ return e === "verified" ? "success" : "info";
1079
+ }
1080
+ function it() {
1081
+ R.value += Dn;
1082
+ }
1083
+ function at(e) {
1084
+ if (!q(e)) {
1085
+ if (J.value) {
1086
+ Y(e.id);
1087
+ return;
1088
+ }
1089
+ st(e);
1090
+ }
1091
+ }
1092
+ function st(e) {
1093
+ f.openComponentDialog(Kt, {
1094
+ data: {
1095
+ title: c("views.training.title"),
1096
+ cancelText: c("components.form.button.remove"),
1097
+ confirmText: c("components.training_editor.verify"),
1098
+ cancelButtonProps: { severity: "danger" },
1099
+ contentProps: {
1100
+ candidates: U.value.map((e) => ({ ...e })),
1101
+ startId: e.id,
1102
+ cameraName: Z,
1103
+ imageUrl: Q,
1104
+ onSave: async (e, t, n) => {
1105
+ await de.mutateAsync({
1106
+ id: e,
1107
+ patch: {
1108
+ boxes: t,
1109
+ status: n
1110
+ }
1111
+ });
1112
+ },
1113
+ onDelete: async (e) => {
1114
+ await M.mutateAsync(e);
1115
+ }
1116
+ }
1117
+ },
1118
+ dialogSize: et
1119
+ });
1120
+ }
1121
+ function ct() {
1122
+ f.openComponentDialog(on, {
1123
+ data: {
1124
+ title: c("views.training.submissions"),
1125
+ hideConfirmButton: !0,
1126
+ cancelText: c("components.form.button.close"),
1127
+ contentProps: {}
1128
+ },
1129
+ dialogSize: sn
1130
+ });
1131
+ }
1132
+ function lt() {
1133
+ let e = X.value;
1134
+ e.length && !Se.isPending.value && f.openTextDialog({
1135
+ data: {
1136
+ title: c("components.dialog.title.confirm"),
1137
+ contentText: c("views.training.submit_confirm", { count: e.length }),
1138
+ confirmText: c("views.training.submit")
1139
+ },
1140
+ onConfirm: async () => {
1141
+ try {
1142
+ await Se.mutateAsync(e), Ze();
1143
+ } catch (e) {
1144
+ w.add({
1145
+ severity: "error",
1146
+ detail: e?.message ?? String(e),
1147
+ life: 8e3
1148
+ });
1149
+ }
1150
+ }
1151
+ });
1152
+ }
1153
+ function ut() {
1154
+ let e = [...qe.value];
1155
+ e.length && !Ye.value && f.openTextDialog({
1156
+ data: {
1157
+ title: c("components.dialog.title.confirm"),
1158
+ contentText: c("views.training.delete_selected_confirm", { count: e.length }),
1159
+ confirmText: c("components.form.button.remove"),
1160
+ confirmButtonProps: { severity: "danger" }
1161
+ },
1162
+ onConfirm: async () => {
1163
+ Ye.value = !0;
1164
+ try {
1165
+ for (let t of e) await M.mutateAsync(t);
1166
+ Ze(), w.add({
1167
+ severity: "success",
1168
+ detail: c("views.training.delete_selected_done", { count: e.length }),
1169
+ life: 5e3
1170
+ });
1171
+ } catch (e) {
1172
+ w.add({
1173
+ severity: "error",
1174
+ detail: e?.message ?? String(e),
1175
+ life: 5e3
1176
+ });
1177
+ } finally {
1178
+ Ye.value = !1;
1179
+ }
1180
+ }
1181
+ });
1182
+ }
1183
+ async function dt(e) {
1184
+ await M.mutateAsync(e.id);
1185
+ }
1186
+ async function ft(e) {
1187
+ await ye.mutateAsync({ enabled: e });
1188
+ }
1189
+ te(L, () => {
1190
+ R.value = Dn;
1191
+ }), we(Te, ([e]) => {
1192
+ e?.isIntersecting && it();
1193
+ }), Ce.connect();
1194
+ let pt = Ce.onCandidatesChanged(() => {
1195
+ O.refetch();
1196
+ });
1197
+ return i(() => {
1198
+ pt();
1199
+ }), (t, i) => {
1200
+ let o = Be, s = Ae, l = k, f = Ie, h = H, te = Me, b = je, w = re, T = le, A = P, ue = We, de = He, j = F, M = Fe, ge = Le, _e = Re, ye = Pe, be = N, I = he, R = oe, V = ie, we = ze, ke = Ne, Ge = De, K = fe, Qe = se, et = ne;
1201
+ return r(), _("div", cn, [
1202
+ m(D) ? d("", !0) : (r(), _("h1", ln, a(t.$t("views.training.title")), 1)),
1203
+ E(l, { position: "left" }, {
1204
+ default: g(() => [E(s, {
1205
+ severity: "secondary",
1206
+ text: "",
1207
+ class: "cui-button p-2 text-color non-draggable-region",
1208
+ onClick: i[0] ||= (e) => t.$router.push("/menu")
1209
+ }, {
1210
+ icon: g(() => [E(o, { class: "w-6 h-6" })]),
1211
+ _: 1
1212
+ })]),
1213
+ _: 1
1214
+ }),
1215
+ E(l, { position: "center" }, {
1216
+ default: g(() => [x("span", un, a(t.$t("views.training.title")), 1)]),
1217
+ _: 1
1218
+ }),
1219
+ x("div", $, [
1220
+ E(A, { class: "flex-1" }, {
1221
+ default: g(() => [E(b, { class: "flex-1" }, {
1222
+ default: g(() => [E(h, null, {
1223
+ default: g(() => [E(f, { class: "w-4 h-4" })]),
1224
+ _: 1
1225
+ }), E(te, {
1226
+ modelValue: m(L),
1227
+ "onUpdate:modelValue": i[1] ||= (e) => p(L) ? L.value = e : null,
1228
+ placeholder: m(c)("views.training.search"),
1229
+ class: "w-full"
1230
+ }, null, 8, ["modelValue", "placeholder"])]),
1231
+ _: 1
1232
+ }), E(T, null, {
1233
+ default: g(() => [E(s, {
1234
+ severity: "secondary",
1235
+ text: "",
1236
+ class: "text-color",
1237
+ onClick: i[2] ||= (e) => m(z)?.toggleMenu(e)
1238
+ }, {
1239
+ icon: g(() => [E(w, { class: ee(["w-4 h-4 transform transition-transform duration-300", { "rotate-180": m(z)?.isOpen }]) }, null, 8, ["class"])]),
1240
+ _: 1
1241
+ })]),
1242
+ _: 1
1243
+ })]),
1244
+ _: 1
1245
+ }),
1246
+ S((r(), u(s, {
1247
+ severity: "secondary",
1248
+ outlined: "",
1249
+ class: "cui-button shrink-0",
1250
+ onClick: ct
1251
+ }, {
1252
+ icon: g(() => [E(ue, { class: "w-4.5 h-4.5" })]),
1253
+ _: 1
1254
+ })), [[
1255
+ et,
1256
+ { value: t.$t("views.training.submissions") },
1257
+ void 0,
1258
+ { left: !0 }
1259
+ ]]),
1260
+ S((r(), u(s, {
1261
+ severity: "secondary",
1262
+ outlined: "",
1263
+ class: "cui-button shrink-0",
1264
+ onClick: i[3] ||= (e) => m(B)?.toggleMenu(e)
1265
+ }, {
1266
+ icon: g(() => [E(de, { class: "w-4.5 h-4.5" })]),
1267
+ _: 1
1268
+ })), [[
1269
+ et,
1270
+ { value: t.$t("views.training.collection") },
1271
+ void 0,
1272
+ { left: !0 }
1273
+ ]])
1274
+ ]),
1275
+ m(G) ? (r(), _("div", dn, [m(G).active ? (r(), _(y, { key: 0 }, [E(j, { class: "w-4 h-4 text-primary shrink-0" }), x("div", fn, [x("div", pn, a(t.$t("views.training.upload_progress", {
1276
+ done: m(G).done + m(G).failed,
1277
+ total: m(G).total
1278
+ })), 1), E(M, {
1279
+ value: m(G).total ? Math.round((m(G).done + m(G).failed) / m(G).total * 100) : 0,
1280
+ "show-value": !1,
1281
+ style: { height: "6px" },
1282
+ class: "mt-1.5"
1283
+ }, null, 8, ["value"])])], 64)) : (r(), _(y, { key: 1 }, [
1284
+ m(G).failed ? (r(), u(ge, {
1285
+ key: 0,
1286
+ class: "w-5 h-5 text-red-500 shrink-0"
1287
+ })) : (r(), u(_e, {
1288
+ key: 1,
1289
+ class: "w-5 h-5 text-green-500 shrink-0"
1290
+ })),
1291
+ x("span", mn, [C(a(t.$t("views.training.submit_done", m(G).done)), 1), m(G).failed ? (r(), _(y, { key: 0 }, [C(" · " + a(t.$t("views.training.upload_failed_summary", { count: m(G).failed })), 1)], 64)) : d("", !0)]),
1292
+ E(s, {
1293
+ severity: "secondary",
1294
+ text: "",
1295
+ rounded: "",
1296
+ class: "cui-icon-sm shrink-0",
1297
+ onClick: i[4] ||= (e) => m(Ce).dismissProgress()
1298
+ }, {
1299
+ icon: g(() => [E(ye, { class: "w-4 h-4" })]),
1300
+ _: 1
1301
+ })
1302
+ ], 64))])) : d("", !0),
1303
+ m(O).isLoading.value && !m(O).data.value ? (r(), _("div", {
1304
+ key: 2,
1305
+ class: "grid w-full gap-3 p-px",
1306
+ style: v(m(Ee))
1307
+ }, [(r(), _(y, null, n(8, (e) => x("div", {
1308
+ key: e,
1309
+ class: "cui-card overflow-hidden"
1310
+ }, [E(be, {
1311
+ class: "aspect-video",
1312
+ width: "100%",
1313
+ height: "100%"
1314
+ }), x("div", hn, [E(be, {
1315
+ height: "14px",
1316
+ width: "70%",
1317
+ class: "mb-1"
1318
+ }), E(be, {
1319
+ height: "12px",
1320
+ width: "40%"
1321
+ })])])), 64))], 4)) : m(U).length === 0 ? (r(), _("div", gn, [E(I, { class: "w-12 h-12 text-muted" }), x("span", _n, a(t.$t("views.training.no_candidates")), 1)])) : (r(), _(y, { key: 4 }, [x("div", {
1322
+ class: "grid w-full gap-3 p-px",
1323
+ style: v(m(Ee))
1324
+ }, [(r(!0), _(y, null, n(m(Ue), (o) => (r(), u(Ge, {
1325
+ key: o.id,
1326
+ class: "cui-card cui-training-card overflow-hidden transition-shadow cursor-pointer hover:shadow-md aspect-[1.17] flex flex-col",
1327
+ pt: {
1328
+ header: { class: "flex-1 min-h-0 flex" },
1329
+ body: {
1330
+ class: "shrink-0",
1331
+ style: "height: auto"
1332
+ }
1333
+ },
1334
+ onClick: (e) => at(o)
1335
+ }, {
1336
+ header: g(() => [x("div", vn, [
1337
+ E(R, {
1338
+ class: "absolute inset-0",
1339
+ src: Q(o.id),
1340
+ alt: Z(o.cameraId),
1341
+ "image-container-class": "w-full h-full",
1342
+ "image-style": { objectFit: "cover" }
1343
+ }, null, 8, ["src", "alt"]),
1344
+ x("div", yn, [(r(!0), _(y, null, n(nt(o), (e, t) => (r(), _("span", {
1345
+ key: t,
1346
+ class: "px-1.5 py-0.5 rounded text-xs font-medium text-white",
1347
+ style: v({ backgroundColor: m(xe)(String(t)).color })
1348
+ }, a(tt(String(t))) + " ×" + a(e), 5))), 128))]),
1349
+ o.upload ? (r(), _("div", bn, [o.upload === "failed" ? S((r(), u(V, {
1350
+ key: 0,
1351
+ severity: "danger",
1352
+ value: t.$t("views.training.upload_failed")
1353
+ }, null, 8, ["value"])), [[
1354
+ et,
1355
+ o.uploadError,
1356
+ void 0,
1357
+ { top: !0 }
1358
+ ]]) : o.upload === "uploading" ? (r(), u(V, {
1359
+ key: 1,
1360
+ severity: "info",
1361
+ value: t.$t("views.training.upload_uploading")
1362
+ }, null, 8, ["value"])) : (r(), u(V, {
1363
+ key: 2,
1364
+ severity: "secondary",
1365
+ value: t.$t("views.training.upload_queued")
1366
+ }, null, 8, ["value"]))])) : d("", !0),
1367
+ !m(J) && !q(o) ? (r(), _("div", xn, [S((r(), u(s, {
1368
+ severity: "secondary",
1369
+ rounded: "",
1370
+ size: "small",
1371
+ class: "cui-icon-sm text-white",
1372
+ onClick: e((e) => dt(o), ["stop"])
1373
+ }, {
1374
+ icon: g(() => [E(we, {
1375
+ width: "100%",
1376
+ height: "100%"
1377
+ })]),
1378
+ _: 1
1379
+ }, 8, ["onClick"])), [[
1380
+ et,
1381
+ t.$t("views.training.delete_candidate"),
1382
+ void 0,
1383
+ { top: !0 }
1384
+ ]])])) : d("", !0)
1385
+ ])]),
1386
+ content: g(() => [x("div", Sn, [x("div", Cn, [m(J) && !q(o) ? (r(), u(ke, {
1387
+ key: 0,
1388
+ "model-value": m(qe).has(o.id),
1389
+ binary: "",
1390
+ size: "small",
1391
+ onClick: i[5] ||= e(() => {}, ["stop"]),
1392
+ "onUpdate:modelValue": (e) => m(Y)(o.id)
1393
+ }, null, 8, ["model-value", "onUpdate:modelValue"])) : d("", !0), x("div", wn, [x("div", Tn, a(Z(o.cameraId)), 1), x("div", En, a(m(ve)(o.createdAt)), 1)])]), E(V, {
1394
+ severity: rt(o.status),
1395
+ value: t.$t(`views.training.status_${o.status}`)
1396
+ }, null, 8, ["severity", "value"])])]),
1397
+ _: 2
1398
+ }, 1032, ["onClick"]))), 128))], 4), m(W) ? (r(), _("div", {
1399
+ key: 0,
1400
+ ref_key: "loadMoreRef",
1401
+ ref: Te,
1402
+ class: "h-px"
1403
+ }, null, 512)) : d("", !0)], 64)),
1404
+ m(U).length || m(J) ? (r(), u(Qe, {
1405
+ key: 5,
1406
+ "force-visible": m(J)
1407
+ }, {
1408
+ default: g(() => [m(J) ? (r(), _(y, { key: 1 }, [
1409
+ E(K, {
1410
+ grouped: "",
1411
+ "tooltip-props": { value: t.$t("components.form.tooltip.cancel_selection") },
1412
+ "button-props": { severity: "secondary" },
1413
+ icon: m(Pe),
1414
+ "icon-props": {
1415
+ width: "100%",
1416
+ height: "100%"
1417
+ },
1418
+ onClick: m(Ze)
1419
+ }, null, 8, [
1420
+ "tooltip-props",
1421
+ "icon",
1422
+ "onClick"
1423
+ ]),
1424
+ E(K, {
1425
+ grouped: "",
1426
+ "tooltip-props": { value: m(Je) ? t.$t("views.training.deselect_all") : t.$t("views.training.select_all") },
1427
+ "button-props": { severity: m(Je) ? "primary" : "secondary" },
1428
+ icon: m(me),
1429
+ "icon-props": {
1430
+ width: "100%",
1431
+ height: "100%"
1432
+ },
1433
+ onClick: m($e)
1434
+ }, null, 8, [
1435
+ "tooltip-props",
1436
+ "button-props",
1437
+ "icon",
1438
+ "onClick"
1439
+ ]),
1440
+ E(K, {
1441
+ grouped: "",
1442
+ "tooltip-props": { value: t.$t("views.training.submit_selected") },
1443
+ "button-props": { disabled: !m(X).length || m(Se).isPending.value },
1444
+ icon: m(Ke),
1445
+ "icon-props": {
1446
+ width: "100%",
1447
+ height: "100%"
1448
+ },
1449
+ onClick: lt
1450
+ }, null, 8, [
1451
+ "tooltip-props",
1452
+ "button-props",
1453
+ "icon"
1454
+ ]),
1455
+ E(K, {
1456
+ grouped: "",
1457
+ "tooltip-props": { value: t.$t("views.training.delete_selected") },
1458
+ "button-props": {
1459
+ severity: "danger",
1460
+ disabled: !m(qe).size || m(Ye)
1461
+ },
1462
+ icon: m(pe),
1463
+ "icon-props": {
1464
+ width: "100%",
1465
+ height: "100%"
1466
+ },
1467
+ onClick: ut
1468
+ }, null, 8, [
1469
+ "tooltip-props",
1470
+ "button-props",
1471
+ "icon"
1472
+ ])
1473
+ ], 64)) : (r(), u(K, {
1474
+ key: 0,
1475
+ grouped: "",
1476
+ "tooltip-props": { value: t.$t("views.training.select") },
1477
+ "button-props": { severity: "secondary" },
1478
+ icon: m(ae),
1479
+ "icon-props": {
1480
+ width: "100%",
1481
+ height: "100%"
1482
+ },
1483
+ onClick: m(Xe)
1484
+ }, null, 8, [
1485
+ "tooltip-props",
1486
+ "icon",
1487
+ "onClick"
1488
+ ]))]),
1489
+ _: 1
1490
+ }, 8, ["force-visible"])) : d("", !0),
1491
+ E(ce, {
1492
+ ref_key: "cameraMenuRef",
1493
+ ref: z,
1494
+ items: m(Oe),
1495
+ popover: { pt: { content: { class: "p-0! rounded-xl! overflow-hidden!" } } }
1496
+ }, null, 8, ["items"]),
1497
+ E(ce, {
1498
+ ref_key: "settingsMenuRef",
1499
+ ref: B,
1500
+ items: m(Ve),
1501
+ "auto-hide": !1,
1502
+ popover: { pt: {
1503
+ root: { class: "w-[22rem]" },
1504
+ content: { class: "p-0! rounded-xl! overflow-hidden!" }
1505
+ } }
1506
+ }, null, 8, ["items"])
1507
+ ]);
1508
+ };
1509
+ }
1510
+ }), [["__scopeId", "data-v-84e470e7"]]);
1511
+ //#endregion
1512
+ export { On as default };