@camera.ui/server 2.1.16 → 2.1.17

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 (345) hide show
  1. package/dist/interface/assets/{404-CqZDSHs_.js → 404-Cg1J2LX8.js} +1 -1
  2. package/dist/interface/assets/{About-Dk4SUTxo.js → About-CW7G6onF.js} +1 -1
  3. package/dist/interface/assets/Automation-CIwBJK1Y.js +3 -0
  4. package/dist/interface/assets/{AutomationImport-DDywNuRK.js → AutomationImport-CHkNv7C-.js} +2 -2
  5. package/dist/interface/assets/{AutomationStore-o0JYwGRr.js → AutomationStore-5bTym-Gl.js} +2 -2
  6. package/dist/interface/assets/{AutomationStoreDetail-DeAGahaF.js → AutomationStoreDetail-BF8UoG_l.js} +2 -2
  7. package/dist/interface/assets/Automations-CaX2fHhJ.js +2 -0
  8. package/dist/interface/assets/Camera-1zdmJnP-.js +2 -0
  9. package/dist/interface/assets/Camera-DSyI4J5-.css +1 -0
  10. package/dist/interface/assets/{CameraConsole-32WtMX1a.js → CameraConsole-CB1HEFKJ.js} +2 -2
  11. package/dist/interface/assets/{Cameras-zffI0fD9.js → Cameras-CyCY0rW9.js} +2 -2
  12. package/dist/interface/assets/Camview-Dia7G1u_.js +1 -0
  13. package/dist/interface/assets/{CertificateUpload-Dg0V9Hei.js → CertificateUpload-jP-JIxmY.js} +1 -1
  14. package/dist/interface/assets/{Config-CKrqFe-g.js → Config-DOa7WHyQ.js} +1 -1
  15. package/dist/interface/assets/{ConfigActionCameraControl-sbvBJQr3.js → ConfigActionCameraControl-BmCE3XLC.js} +1 -1
  16. package/dist/interface/assets/{ConfigActionDelay-CiPxydTn.js → ConfigActionDelay-CfHCZ0uf.js} +1 -1
  17. package/dist/interface/assets/{ConfigActionHttp-UqiZm0kq.js → ConfigActionHttp-DdM7gEb0.js} +1 -1
  18. package/dist/interface/assets/{ConfigActionImageInput-DkGVZ-ti.js → ConfigActionImageInput-CrPPNT4K.js} +1 -1
  19. package/dist/interface/assets/{ConfigActionMqtt-DQu5H4bY.js → ConfigActionMqtt-D7-u4zri.js} +1 -1
  20. package/dist/interface/assets/ConfigActionNotification-BSuUI2FP.js +1 -0
  21. package/dist/interface/assets/{ConfigActionNotificationControl-B_EpM5m9.js → ConfigActionNotificationControl-DfvAxKnx.js} +1 -1
  22. package/dist/interface/assets/{ConfigActionOutput-DeOsk0T1.js → ConfigActionOutput-DPplSpm_.js} +1 -1
  23. package/dist/interface/assets/{ConfigActionPlugin-CSZHcNQ6.js → ConfigActionPlugin-BnRn_p26.js} +1 -1
  24. package/dist/interface/assets/{ConfigActionSensor-Dx7DcDVr.js → ConfigActionSensor-CoEoqFAY.js} +1 -1
  25. package/dist/interface/assets/{ConfigActionSnapshot-Baj-r4Cd.js → ConfigActionSnapshot-wXdFiyU-.js} +1 -1
  26. package/dist/interface/assets/{ConfigActionVariable-Ccu___aS.js → ConfigActionVariable-BqJvOOHH.js} +1 -1
  27. package/dist/interface/assets/{ConfigConditionIfElse-0hU7UW8q.js → ConfigConditionIfElse-DG2Kgqn5.js} +1 -1
  28. package/dist/interface/assets/{ConfigConditionSensorState-BX19KYLJ.js → ConfigConditionSensorState-BytECo6r.js} +1 -1
  29. package/dist/interface/assets/{ConfigConditionSwitch-D-XUhwcE.js → ConfigConditionSwitch-DaSt9uZE.js} +1 -1
  30. package/dist/interface/assets/{ConfigConditionTime-B6OO8cmh.js → ConfigConditionTime-D42OsshU.js} +1 -1
  31. package/dist/interface/assets/{ConfigSensorValueInput-DZHYQez8.js → ConfigSensorValueInput-BtEmtZSm.js} +1 -1
  32. package/dist/interface/assets/{ConfigTriggerDetection-BNyR5aOG.js → ConfigTriggerDetection-CDH2fzsu.js} +1 -1
  33. package/dist/interface/assets/ConfigTriggerGeofence-Dopegic5.js +1 -0
  34. package/dist/interface/assets/{ConfigTriggerManual-DFSTAuUt.js → ConfigTriggerManual-DAtWfH0-.js} +1 -1
  35. package/dist/interface/assets/{ConfigTriggerMqtt-D_O8RyrQ.js → ConfigTriggerMqtt-CB3_PxqD.js} +1 -1
  36. package/dist/interface/assets/{ConfigTriggerSchedule-BFZnBfCM.js → ConfigTriggerSchedule-BUzOrF23.js} +1 -1
  37. package/dist/interface/assets/{ConfigTriggerSensor-D1Tst2wQ.js → ConfigTriggerSensor-D5kRIb7I.js} +1 -1
  38. package/dist/interface/assets/{ConfigTriggerSystem-BNfatCp8.js → ConfigTriggerSystem-Cud77VMR.js} +1 -1
  39. package/dist/interface/assets/{ConfigTriggerWebhook--nEO_Odl.js → ConfigTriggerWebhook-CeG5R3kV.js} +1 -1
  40. package/dist/interface/assets/Console-DdOD6Pd5.js +1 -0
  41. package/dist/interface/assets/{CuiAutomationRunsDialog-CkMRT1C8.js → CuiAutomationRunsDialog-Cym6xMVJ.js} +1 -1
  42. package/dist/interface/assets/CuiBottomSheet-B3QSHp4-.js +1 -0
  43. package/dist/interface/assets/{CuiBottomSheet-mKu68LHd.js → CuiBottomSheet-BSoMhymR.js} +1 -1
  44. package/dist/interface/assets/{CuiCameraPipCard-Djp8qBvZ.js → CuiCameraPipCard-DGgrxZJd.js} +1 -1
  45. package/dist/interface/assets/CuiCameraRecordings-Bu68AFdM.js +1 -0
  46. package/dist/interface/assets/{CuiCameraShares-B73pWIFh.js → CuiCameraShares-BOhfTcxQ.js} +1 -1
  47. package/dist/interface/assets/CuiCameraTable-C1CHYnda.js +1 -0
  48. package/dist/interface/assets/{CuiCameraTable-DripFD6D.js → CuiCameraTable-D0lc0VAJ.js} +2 -2
  49. package/dist/interface/assets/{CuiChartTable-DyyQV7mt.js → CuiChartTable-DcrFI8tT.js} +1 -1
  50. package/dist/interface/assets/{CuiConsole-UxJwQqNG.js → CuiConsole-ICLBq4Q-.js} +2 -2
  51. package/dist/interface/assets/{CuiDataTable-DZm0I8k7.js → CuiDataTable-BooFPsGH.js} +1 -1
  52. package/dist/interface/assets/{CuiLightControl-CB3l0ZLj.js → CuiLightControl-D1ih2hO-.js} +1 -1
  53. package/dist/interface/assets/{CuiList-DMQgYqaU.js → CuiList-ChI82KjI.js} +1 -1
  54. package/dist/interface/assets/{CuiPluginCard-HpQMNND1.js → CuiPluginCard-DqdSWrwb.js} +2 -2
  55. package/dist/interface/assets/{CuiPluginCategoryChip-C6aEP-ug.js → CuiPluginCategoryChip-DsRcMb72.js} +1 -1
  56. package/dist/interface/assets/{CuiPluginOAuthButton-DpGacvsa.js → CuiPluginOAuthButton-BSvRKUSY.js} +2 -2
  57. package/dist/interface/assets/{CuiPluginTrustBadge-Dl1PEsm6.js → CuiPluginTrustBadge-DXL7N1LC.js} +1 -1
  58. package/dist/interface/assets/CuiQRCode-DHln6Lo9.js +1 -0
  59. package/dist/interface/assets/CuiSchema-B7i2O3Fy.js +1 -0
  60. package/dist/interface/assets/{CuiTopNavbarItem-qPj6XwXr.js → CuiTopNavbarItem-TMfTyt8u.js} +1 -1
  61. package/dist/interface/assets/{Faces-DRWIPDfH.js → Faces-CyTkMqMW.js} +1 -1
  62. package/dist/interface/assets/FirstSteps-B4gb7Sgn.js +1 -0
  63. package/dist/interface/assets/Floorplan-DBwWnuys.js +1 -0
  64. package/dist/interface/assets/{Instances-VC4-anOF.js → Instances-D9fnwItz.js} +1 -1
  65. package/dist/interface/assets/{Logs-DROgZxLH.js → Logs-Brk6fJa0.js} +2 -2
  66. package/dist/interface/assets/{Menu-CmTk2or7.js → Menu-CrdBz1Er.js} +1 -1
  67. package/dist/interface/assets/Metrics-DXMgfNIL.js +9 -0
  68. package/dist/interface/assets/{OAuthDeviceFlow-BrdiDoCh.js → OAuthDeviceFlow-D5hSwHeO.js} +1 -1
  69. package/dist/interface/assets/Plugin-C65oNZ9N.js +1 -0
  70. package/dist/interface/assets/{PluginConsole-CxiW1w6K.js → PluginConsole-Bs3Z5u9-.js} +2 -2
  71. package/dist/interface/assets/PluginDetail-C3KUrHvq.js +2 -0
  72. package/dist/interface/assets/{PluginSchema-BgVZ_4if.js → PluginSchema-D22zRDkZ.js} +1 -1
  73. package/dist/interface/assets/PluginSearch-4ngDmZQ2.js +1 -0
  74. package/dist/interface/assets/PluginSearch-D7XYJzl4.js +2 -0
  75. package/dist/interface/assets/{PluginUpdateProgress-DEcle8-x.js → PluginUpdateProgress-MEdR7mID.js} +1 -1
  76. package/dist/interface/assets/Plugins-DQTlb12n.js +1 -0
  77. package/dist/interface/assets/Recordings-CqBwRvn-.js +1 -0
  78. package/dist/interface/assets/SensorEdit-BM2zHAM7.js +1 -0
  79. package/dist/interface/assets/{SensorHistory-H03yZia0.js → SensorHistory-Dbv2ODqn.js} +1 -1
  80. package/dist/interface/assets/Sensors-B4YzyU7R.js +2 -0
  81. package/dist/interface/assets/{Sensors-DzGV2Ngo.css → Sensors-DETviyjO.css} +1 -1
  82. package/dist/interface/assets/{Settings-9nC18KH8.js → Settings--wgPYOyK.js} +1 -1
  83. package/dist/interface/assets/{SettingsAccount-BTYvhCJP.js → SettingsAccount-BF6Cp8Rt.js} +1 -1
  84. package/dist/interface/assets/SettingsAccount-D7CHP0f1.js +1 -0
  85. package/dist/interface/assets/SettingsAppearance-Ba0jbbVW.js +1 -0
  86. package/dist/interface/assets/SettingsAppearance-BpXZwBjO.js +1 -0
  87. package/dist/interface/assets/{SettingsBackup-Bu48xw4v.js → SettingsBackup-qEYm-6De.js} +1 -1
  88. package/dist/interface/assets/{SettingsList-74c5OMQf.js → SettingsList-1brGZ2E_.js} +1 -1
  89. package/dist/interface/assets/{SettingsMqtt-81rJ4zV6.js → SettingsMqtt-Ds8YpoLA.js} +1 -1
  90. package/dist/interface/assets/SettingsNotifications-Diqpfbrh.js +1 -0
  91. package/dist/interface/assets/{SettingsPermissions-DqyVtVKE.js → SettingsPermissions-GmGacrLc.js} +1 -1
  92. package/dist/interface/assets/{SettingsRecordings-Bxn28Frz.js → SettingsRecordings-CtEm_7PE.js} +1 -1
  93. package/dist/interface/assets/SettingsRemote-CENHI51U.js +2 -0
  94. package/dist/interface/assets/SettingsSystem-YkigO2-V.js +2 -0
  95. package/dist/interface/assets/{SettingsUsers-DUOJN7uO.js → SettingsUsers-BNPa87gu.js} +1 -1
  96. package/dist/interface/assets/{Terminal-45QW5yPE.js → Terminal-uxOHZpUp.js} +3 -3
  97. package/dist/interface/assets/Training-BRZKDa8S.js +1 -0
  98. package/dist/interface/assets/Training-DMNjB3uX.css +1 -0
  99. package/dist/interface/assets/{Updates-B32Pra5E.js → Updates-CbscgL60.js} +1 -1
  100. package/dist/interface/assets/{VariableInput-CyTGQFtz.js → VariableInput-Dqg4sqBD.js} +1 -1
  101. package/dist/interface/assets/{VariableSuggestions-BLlD4F87.js → VariableSuggestions-DZCkPAVs.js} +1 -1
  102. package/dist/interface/assets/{VersionsHandler-CIq6v6lE.js → VersionsHandler-BYFshrhO.js} +2 -2
  103. package/dist/interface/assets/{VirtualSensorCreate-Di2IyYAg.js → VirtualSensorCreate-CQ-C4si3.js} +1 -1
  104. package/dist/interface/assets/{Workers-tb039NGc.js → Workers-DC77SjZQ.js} +2 -2
  105. package/dist/interface/assets/api-Cb8_C_se.js +4 -0
  106. package/dist/interface/assets/{api-4JRK8ya0.js → api-CbYNh0N1.js} +1 -1
  107. package/dist/interface/assets/api-DIyogyx5.css +2 -0
  108. package/dist/interface/assets/{auth-ISkWvJbZ.js → auth-Bev1OdHw.js} +1 -1
  109. package/dist/interface/assets/{automations-CeH81DN-.js → automations-DrpESBB_.js} +1 -1
  110. package/dist/interface/assets/cameraSources-QF2xqMxX.js +1 -0
  111. package/dist/interface/assets/cloudHandoff-BknPGUc0.js +1 -0
  112. package/dist/interface/assets/{config-DthCyQJv.js → config-DCK7k2P4.js} +1 -1
  113. package/dist/interface/assets/{flowSchema-DZ2bDhJt.js → flowSchema-D3Ddm5sW.js} +1 -1
  114. package/dist/interface/assets/{intercomService-Bd71KwsB.js → intercomService-DIwpkwG4.js} +1 -1
  115. package/dist/interface/assets/{main-ExPfCNlz.css → main-Cb5Z8N7b.css} +1 -1
  116. package/dist/interface/assets/main-DVwdxi04.js +3 -0
  117. package/dist/interface/assets/{mqtt-oPORDio9.js → mqtt-COWs_r7k.js} +1 -1
  118. package/dist/interface/assets/{notifications-BirFkpbF.js → notifications-sIv1-H85.js} +1 -1
  119. package/dist/interface/assets/{plugins-vyA7MMhx.js → plugins-CXQj6XQt.js} +1 -1
  120. package/dist/interface/assets/{rooms-MfPQPywT.js → rooms-DScX89Ks.js} +1 -1
  121. package/dist/interface/assets/{sensorIcons-B4H11BbT.js → sensorIcons-CvVtOgZB.js} +1 -1
  122. package/dist/interface/assets/sensorSlots-DsfKs8_k.js +1 -0
  123. package/dist/interface/assets/{sensors-xryx8Wvn.js → sensors-Bf_gYmB5.js} +1 -1
  124. package/dist/interface/assets/{server-BK9gwxH8.js → server-CahE6_Pv.js} +1 -1
  125. package/dist/interface/assets/{theme-DQeAzJ1v.js → theme-DmUc7UHl.js} +1 -1
  126. package/dist/interface/assets/{types-Bcj_K26s.js → types-D4kUDpid.js} +1 -1
  127. package/dist/interface/assets/{types-kN1Tn2Og.js → types-Dse8_nTX.js} +1 -1
  128. package/dist/interface/assets/{types-D626ASim.js → types-hwOSxlNg.js} +1 -1
  129. package/dist/interface/assets/ungrouped-Byxe4LNR.js +1 -0
  130. package/dist/interface/assets/ungrouped-n3OnGhCH.css +1 -0
  131. package/dist/interface/assets/{updates-Dzqxen12.js → updates-C4gAnNY6.js} +1 -1
  132. package/dist/interface/assets/{useAppVersion-JY7cdzlr.js → useAppVersion--b5Zj7tl.js} +1 -1
  133. package/dist/interface/assets/{useBackupRestore-CeShFVWy.js → useBackupRestore-Bx13MgrJ.js} +1 -1
  134. package/dist/interface/assets/{useCameraOptions-BeUNT5Rz.js → useCameraOptions-DN4gJjIl.js} +1 -1
  135. package/dist/interface/assets/{useLogsSocket-DDSuX00j.js → useLogsSocket-DqVa6Hky.js} +1 -1
  136. package/dist/interface/assets/{useNavLayout-DgAgRNq2.js → useNavLayout-CuQ9F9cj.js} +1 -1
  137. package/dist/interface/assets/{usePermissions-DFzwIs8L.js → usePermissions-C1L7m3Nc.js} +1 -1
  138. package/dist/interface/assets/{usePluginUpdates-Bb-LOOyL.js → usePluginUpdates-CvQPy02x.js} +1 -1
  139. package/dist/interface/assets/{usePushRegistration-iverdyzz.js → usePushRegistration-BKvefMFq.js} +1 -1
  140. package/dist/interface/assets/{useServerRestart-BchofDLe.js → useServerRestart-ByN6484v.js} +1 -1
  141. package/dist/interface/assets/{useStreamStatus-BOJt1v1c.js → useStreamStatus-BbtTnidZ.js} +1 -1
  142. package/dist/interface/assets/{useTabSwipe-v0Yet-YZ.js → useTabSwipe-D9udGzPx.js} +1 -1
  143. package/dist/interface/assets/{useUpdateChannel-K9ADk5yx.js → useUpdateChannel-8t3W9dNr.js} +1 -1
  144. package/dist/interface/assets/{useUpdatesSocket-sj1-DmFM.js → useUpdatesSocket-D9s_5T3l.js} +1 -1
  145. package/dist/interface/assets/{useUserOptions-BnF_qBdZ.js → useUserOptions-CEPYkuSm.js} +1 -1
  146. package/dist/interface/assets/{vendor-cameraui-BPX4wReW.js → vendor-cameraui-Dlzn4pyz.js} +26 -26
  147. package/dist/interface/assets/vendor-core-COMSlypG.js +1 -0
  148. package/dist/interface/assets/{vendor-primevue-iEFYdXsu.js → vendor-primevue-DF71EsUM.js} +55 -55
  149. package/dist/interface/ha/{404-DlQnv9jN.js → 404-Bm-oxxip.js} +1 -1
  150. package/dist/interface/ha/{About-BLQJmllv.js → About-CDcN0Q2J.js} +3 -3
  151. package/dist/interface/ha/{Automation-DLMPArOd.js → Automation-BQd4b0ym.js} +102 -102
  152. package/dist/interface/ha/{AutomationImport-Qzz3Ta4D.js → AutomationImport-CX1C76Wb.js} +6 -6
  153. package/dist/interface/ha/{AutomationStore-DNXC9s6h.js → AutomationStore-D4B0KpoW.js} +56 -56
  154. package/dist/interface/ha/{AutomationStoreDetail-CTqydRKj.js → AutomationStoreDetail-B53Giz4B.js} +6 -6
  155. package/dist/interface/ha/{Automations-DRxe1fli.js → Automations-BXlwOElS.js} +124 -124
  156. package/dist/interface/ha/{Camera-OrI4Wf4F.js → Camera-CauwMneE.js} +21 -19
  157. package/dist/interface/ha/{CameraConsole-6yGhoHmu.js → CameraConsole-CmsMjuIR.js} +5 -5
  158. package/dist/interface/ha/{Cameras-DpEaKKDG.js → Cameras-CyHDmgs0.js} +259 -259
  159. package/dist/interface/ha/{Camview-CnPz4cGs.js → Camview-BwwvU5k8.js} +70 -70
  160. package/dist/interface/ha/{Config-Bb2ERyAA.js → Config-C_Zuyeoc.js} +10 -10
  161. package/dist/interface/ha/{ConfigActionCameraControl-CC2tWFz2.js → ConfigActionCameraControl-C1_QyuX8.js} +3 -3
  162. package/dist/interface/ha/{ConfigActionHttp-DBsEL44i.js → ConfigActionHttp-C0d433mh.js} +2 -2
  163. package/dist/interface/ha/{ConfigActionImageInput-Rt3AOJ3I.js → ConfigActionImageInput-BYys2FwC.js} +1 -1
  164. package/dist/interface/ha/{ConfigActionMqtt-BYSSc954.js → ConfigActionMqtt-DznDfzze.js} +4 -4
  165. package/dist/interface/ha/{ConfigActionNotification-DKlIsZJd.js → ConfigActionNotification-CC2qfBLm.js} +3 -3
  166. package/dist/interface/ha/{ConfigActionNotificationControl-D5AVW2tR.js → ConfigActionNotificationControl-3jlm7_A4.js} +2 -2
  167. package/dist/interface/ha/{ConfigActionOutput-DIlu8Ujc.js → ConfigActionOutput-BEf1U3_l.js} +1 -1
  168. package/dist/interface/ha/{ConfigActionPlugin-o1YNBh-g.js → ConfigActionPlugin-C57BUrJD.js} +5 -5
  169. package/dist/interface/ha/{ConfigActionSensor-BEvwg0tf.js → ConfigActionSensor-BkoSPCUJ.js} +5 -5
  170. package/dist/interface/ha/{ConfigActionSnapshot-Bnw0JNNj.js → ConfigActionSnapshot-CC3EpmCq.js} +2 -2
  171. package/dist/interface/ha/{ConfigActionVariable-oGPagsvF.js → ConfigActionVariable-JDyDhSzZ.js} +1 -1
  172. package/dist/interface/ha/{ConfigConditionIfElse-7LCDNDvS.js → ConfigConditionIfElse-BVg-TUpv.js} +3 -3
  173. package/dist/interface/ha/{ConfigConditionSensorState-nO-s7wi6.js → ConfigConditionSensorState-YYeWly1H.js} +4 -4
  174. package/dist/interface/ha/{ConfigConditionSwitch-GrIKkY-P.js → ConfigConditionSwitch-DQHXX-4U.js} +5 -5
  175. package/dist/interface/ha/{ConfigSensorValueInput-Cthp3KXt.js → ConfigSensorValueInput-BuuzQ1nJ.js} +4 -4
  176. package/dist/interface/ha/{ConfigTriggerDetection-CJE9QFaK.js → ConfigTriggerDetection-CUvkAmpJ.js} +12 -12
  177. package/dist/interface/ha/{ConfigTriggerGeofence-Cyeu7Cit.js → ConfigTriggerGeofence-CCHELnfy.js} +7 -7
  178. package/dist/interface/ha/{ConfigTriggerMqtt-D5EoOztE.js → ConfigTriggerMqtt-BfLnCiWZ.js} +1 -1
  179. package/dist/interface/ha/{ConfigTriggerSensor-DYg_HRjO.js → ConfigTriggerSensor-Bi-Jld2G.js} +1 -1
  180. package/dist/interface/ha/{ConfigTriggerSystem-DzpajiyS.js → ConfigTriggerSystem-_HXrWjaJ.js} +2 -2
  181. package/dist/interface/ha/{ConfigTriggerWebhook-IE4PVb4O.js → ConfigTriggerWebhook-CFYsVF_r.js} +1 -1
  182. package/dist/interface/ha/{Console-BYgny5Dy.js → Console-CR95JZFd.js} +8 -8
  183. package/dist/interface/ha/{CuiAutomationRunsDialog-CoYgpbW0.js → CuiAutomationRunsDialog--mpkPFmw.js} +2 -2
  184. package/dist/interface/ha/{CuiBottomSheet-C4cK3fYK.js → CuiBottomSheet-DfFzwDjq.js} +1 -1
  185. package/dist/interface/ha/{CuiCameraRecordings-BAxchc71.js → CuiCameraRecordings-DCIFFbFk.js} +17 -18
  186. package/dist/interface/ha/{CuiCameraShares-CfQr1iyX.js → CuiCameraShares-Dwv_XtX4.js} +2 -2
  187. package/dist/interface/ha/{CuiCameraTable-B60mcEl_.js → CuiCameraTable-L6wd-VYz.js} +2 -2
  188. package/dist/interface/ha/{CuiChartTable-CbUVz-Cj.js → CuiChartTable-CxJR8u6U.js} +42 -42
  189. package/dist/interface/ha/{CuiConsole-DEjAQFwC.js → CuiConsole-CvL9TXZY.js} +20 -20
  190. package/dist/interface/ha/{CuiDataTable-005ptLsa.js → CuiDataTable-Bn80WJXi.js} +6 -6
  191. package/dist/interface/ha/{CuiPluginCard-BWwPLJ6m.js → CuiPluginCard-CtOzPAal.js} +18 -18
  192. package/dist/interface/ha/{CuiPluginOAuthButton-CgmDgRY9.js → CuiPluginOAuthButton-1LgNMLII.js} +3 -3
  193. package/dist/interface/ha/{CuiPluginTrustBadge-BWnP1whX.js → CuiPluginTrustBadge-mHuy3ab9.js} +1 -1
  194. package/dist/interface/ha/{CuiQRCode-ONkk6Wqy.js → CuiQRCode-CloepWte.js} +2 -2
  195. package/dist/interface/ha/{CuiSchema-C3uI1GwG.js → CuiSchema-CJsEWewj.js} +19 -19
  196. package/dist/interface/ha/{CuiTopNavbarItem-Bhws0XkE.js → CuiTopNavbarItem-B2EM-tmz.js} +1 -1
  197. package/dist/interface/ha/{Faces-DuxYlZGd.js → Faces-BMkZfxDm.js} +107 -107
  198. package/dist/interface/ha/{FirstSteps-BAlqShSK.js → FirstSteps-BH0mga3u.js} +11 -11
  199. package/dist/interface/ha/{Floorplan-BVwSNFd6.js → Floorplan-CyfIUI4Z.js} +275 -275
  200. package/dist/interface/ha/{Instances-BM9sRNSP.js → Instances-BwNXc91J.js} +70 -70
  201. package/dist/interface/ha/{Logs-KISz4BU-.js → Logs-CcSiN16r.js} +8 -8
  202. package/dist/interface/ha/{Menu-DYI6PeIn.js → Menu-qdN0OBb7.js} +10 -10
  203. package/dist/interface/ha/{Metrics-BjpKFunA.js → Metrics-ClM5lhvC.js} +89 -89
  204. package/dist/interface/ha/{OAuthDeviceFlow-DG-KUGZj.js → OAuthDeviceFlow-BBr-rER_.js} +3 -3
  205. package/dist/interface/ha/{Plugin-BjWyUUhe.js → Plugin-BBkSXygO.js} +50 -50
  206. package/dist/interface/ha/{PluginConsole-BK3cotea.js → PluginConsole-DqrBnXSX.js} +6 -6
  207. package/dist/interface/ha/{PluginDetail-BDzDeShX.js → PluginDetail-Clu6nv-B.js} +9 -9
  208. package/dist/interface/ha/{PluginSearch-DsFUuPC-.js → PluginSearch-Dn-24FLX.js} +32 -32
  209. package/dist/interface/ha/{PluginUpdateProgress-BMrdkjRq.js → PluginUpdateProgress-CzhHUKDg.js} +3 -3
  210. package/dist/interface/ha/{Plugins-3WPnsHXw.js → Plugins-qYJD5ioU.js} +16 -16
  211. package/dist/interface/ha/{Recordings-0wDF4ArK.js → Recordings-CBIt3vL7.js} +354 -355
  212. package/dist/interface/ha/{SensorEdit-B0L2zIha.js → SensorEdit-BbG6apZA.js} +349 -349
  213. package/dist/interface/ha/{SensorHistory-CQJEY1sW.js → SensorHistory-CqGsnQPW.js} +2 -2
  214. package/dist/interface/ha/{Sensors-BYdBTCLo.js → Sensors-mKWkCDF8.js} +474 -448
  215. package/dist/interface/ha/{Settings-BaqGiBCa.js → Settings-C5J4ubiA.js} +10 -10
  216. package/dist/interface/ha/{SettingsAccount-B0Sth0EF.js → SettingsAccount-tCyZsBxG.js} +39 -39
  217. package/dist/interface/ha/{SettingsAppearance-B_oylmTa.js → SettingsAppearance-DqJp4Clt.js} +6 -6
  218. package/dist/interface/ha/{SettingsBackup-BLmoV5AW.js → SettingsBackup-CHnCKYgz.js} +5 -5
  219. package/dist/interface/ha/{SettingsList-CMX7wMye.js → SettingsList-DsQOPeKW.js} +1 -1
  220. package/dist/interface/ha/{SettingsMqtt-C-sGwxOZ.js → SettingsMqtt-TPIsEcXe.js} +180 -180
  221. package/dist/interface/ha/{SettingsNotifications-tc9FCCUF.js → SettingsNotifications-DH3T_xyh.js} +3 -3
  222. package/dist/interface/ha/{SettingsRecordings-DDs16z2A.js → SettingsRecordings-Ay8lj8Lm.js} +4 -4
  223. package/dist/interface/ha/{SettingsRemote-0c0umjFJ.js → SettingsRemote-CHiBADuu.js} +314 -314
  224. package/dist/interface/ha/{SettingsSystem-DfXxWXQk.js → SettingsSystem-tqs40pUW.js} +8 -8
  225. package/dist/interface/ha/{SettingsUsers-CmjC0zsF.js → SettingsUsers-BUbC_Qc7.js} +39 -39
  226. package/dist/interface/ha/{Terminal-nbUX6PPZ.js → Terminal-f_b-089t.js} +4 -4
  227. package/dist/interface/ha/Training-Dcxo9PFi.js +1479 -0
  228. package/dist/interface/ha/{Updates-UaxBGn6D.js → Updates-aGl5hy8Q.js} +11 -11
  229. package/dist/interface/ha/{VariableInput-0bF2H1Bm.js → VariableInput-yJGbaZEo.js} +1 -1
  230. package/dist/interface/ha/{VersionsHandler-CnXVnfBl.js → VersionsHandler-Q4PfRpbs.js} +10 -10
  231. package/dist/interface/ha/{VirtualSensorCreate-BE60rAkJ.js → VirtualSensorCreate-Gbi6aJBh.js} +8 -8
  232. package/dist/interface/ha/{Workers-CaX3Z3w-.js → Workers-BbBqOc0H.js} +129 -129
  233. package/dist/interface/ha/{api-CmcbBFTx.js → api-DBu4gh4_.js} +8390 -8315
  234. package/dist/interface/ha/{api-S-NnjUWl.js → api-DY0z6Sp_.js} +3 -3
  235. package/dist/interface/ha/{auth-CqYE7s1-.js → auth-C2V-kpRp.js} +38 -38
  236. package/dist/interface/ha/{automationBlueprint-Dmp54JD1.js → automationBlueprint-MGUZJTFY.js} +4 -4
  237. package/dist/interface/ha/cameraui-cards.js +1 -1
  238. package/dist/interface/ha/{cards-MnCBmBIR.js → cards-BA6g_9R5.js} +566 -566
  239. package/dist/interface/ha/{config-C94KN4WM.js → config-BGlhgEOa.js} +15 -15
  240. package/dist/interface/ha/{dist-BQFunPaA.js → dist-BqTZri2H.js} +743 -725
  241. package/dist/interface/ha/{mqtt-HDLqlOJt.js → mqtt-BLKZNA-E.js} +15 -15
  242. package/dist/interface/ha/{notifications-C2_2_NRh.js → notifications-BW0RNMnG.js} +22 -22
  243. package/dist/interface/ha/{pinia-DLNUke3Q.js → pinia-DINxhtY-.js} +168 -165
  244. package/dist/interface/ha/{plugins-l2i4DgqO.js → plugins-Cj-B4Nwy.js} +68 -68
  245. package/dist/interface/ha/{rooms-Bp1ZVAzT.js → rooms-C32i51p-.js} +8 -8
  246. package/dist/interface/ha/{server-BsduJDAB.js → server-CfbE_0Z9.js} +32 -32
  247. package/dist/interface/ha/{types-iZUCCt1P.js → types-Ry6RjBNa.js} +17 -17
  248. package/dist/interface/ha/ungrouped-CO29-tSV.js +1320 -0
  249. package/dist/interface/ha/{updates-CDsPvhpo.js → updates-CZPI8XJ1.js} +37 -37
  250. package/dist/interface/ha/{useAppVersion-BJtSGn4X.js → useAppVersion-9jfqRo_z.js} +1 -1
  251. package/dist/interface/ha/{useLogsSocket-Ck-ZQpQD.js → useLogsSocket-B0E7a3ys.js} +1 -1
  252. package/dist/interface/ha/{useNavLayout-Bn6HYs-i.js → useNavLayout-B2wfeha-.js} +2 -2
  253. package/dist/interface/ha/{useServerRestart-fff_KK9Y.js → useServerRestart-CCH-yMWR.js} +1 -1
  254. package/dist/interface/ha/{useTabSwipe-B1CQZuyT.js → useTabSwipe-D2uqGEvR.js} +1 -1
  255. package/dist/interface/ha/{useUpdateChannel-DUBmGEDe.js → useUpdateChannel--SP3Wjym.js} +2 -2
  256. package/dist/interface/ha/{useUpdatesSocket-DoLb2kcJ.js → useUpdatesSocket-BBbUCMU-.js} +1 -1
  257. package/dist/interface/ha/{useUserOptions-D0kNSHFH.js → useUserOptions-Bh54UAkH.js} +1 -1
  258. package/dist/interface/index.html +28 -27
  259. package/dist/interface/sw.js +1 -1
  260. package/dist/server/package.json +1 -1
  261. package/dist/server/src/api/controllers/training.controller.d.ts +4 -2
  262. package/dist/server/src/api/controllers/training.controller.js +2 -2
  263. package/dist/server/src/api/controllers/training.controller.js.map +1 -1
  264. package/dist/server/src/api/database/record-schemas.d.ts +1 -0
  265. package/dist/server/src/api/database/record-schemas.js +1 -0
  266. package/dist/server/src/api/database/record-schemas.js.map +1 -1
  267. package/dist/server/src/api/routes/training.routes.js +3 -2
  268. package/dist/server/src/api/routes/training.routes.js.map +1 -1
  269. package/dist/server/src/api/schemas/training.schema.d.ts +4 -0
  270. package/dist/server/src/api/schemas/training.schema.js +3 -0
  271. package/dist/server/src/api/schemas/training.schema.js.map +1 -1
  272. package/dist/server/src/api/services/sensors.service.d.ts +1 -0
  273. package/dist/server/src/api/services/sensors.service.js +1 -0
  274. package/dist/server/src/api/services/sensors.service.js.map +1 -1
  275. package/dist/server/src/api/types/index.d.ts +2 -1
  276. package/dist/server/src/camera/decoder/detection-coordinator.js +23 -7
  277. package/dist/server/src/camera/decoder/detection-coordinator.js.map +1 -1
  278. package/dist/server/src/camera/decoder/detection-window.d.ts +5 -0
  279. package/dist/server/src/camera/decoder/detection-window.js +5 -5
  280. package/dist/server/src/camera/decoder/detection-window.js.map +1 -1
  281. package/dist/server/src/camera/decoder/event-manager.d.ts +5 -1
  282. package/dist/server/src/camera/decoder/event-manager.js +21 -14
  283. package/dist/server/src/camera/decoder/event-manager.js.map +1 -1
  284. package/dist/server/src/camera/decoder/training-sink.d.ts +14 -3
  285. package/dist/server/src/camera/decoder/training-sink.js +32 -17
  286. package/dist/server/src/camera/decoder/training-sink.js.map +1 -1
  287. package/dist/server/src/camera/decoder/types.d.ts +1 -1
  288. package/dist/server/src/camera/decoder/types.js +2 -6
  289. package/dist/server/src/camera/decoder/types.js.map +1 -1
  290. package/dist/server/src/manager/trainingCandidateManager.d.ts +2 -3
  291. package/dist/server/src/manager/trainingCandidateManager.js +17 -18
  292. package/dist/server/src/manager/trainingCandidateManager.js.map +1 -1
  293. package/dist/server/src/manager/types.d.ts +5 -0
  294. package/dist/server/src/remote/api/routes/train.d.ts +6 -1
  295. package/dist/server/src/remote/api/routes/train.js +6 -2
  296. package/dist/server/src/remote/api/routes/train.js.map +1 -1
  297. package/dist/server/src/sensors/registry.d.ts +1 -0
  298. package/dist/server/src/sensors/registry.js +10 -0
  299. package/dist/server/src/sensors/registry.js.map +1 -1
  300. package/package.json +1 -1
  301. package/dist/interface/assets/Automation-CDvt2MXN.js +0 -3
  302. package/dist/interface/assets/Automations-2K-7hZfK.js +0 -2
  303. package/dist/interface/assets/Camera-B72IU-UF.js +0 -2
  304. package/dist/interface/assets/Camera-Cm9I0H6c.css +0 -1
  305. package/dist/interface/assets/Camview-KzzN0Q1w.js +0 -1
  306. package/dist/interface/assets/ConfigActionNotification-C2uXIMpm.js +0 -1
  307. package/dist/interface/assets/ConfigTriggerGeofence-Cuq1SnOZ.js +0 -1
  308. package/dist/interface/assets/Console-DkylrXI4.js +0 -1
  309. package/dist/interface/assets/CuiBottomSheet-DILQuWKb.js +0 -1
  310. package/dist/interface/assets/CuiCameraRecordings-Bi0I7jeO.js +0 -1
  311. package/dist/interface/assets/CuiCameraTable-CUdAnRJP.js +0 -1
  312. package/dist/interface/assets/CuiQRCode-D04Onyhk.js +0 -1
  313. package/dist/interface/assets/CuiRecordingsGrid-BhATIjIf.css +0 -1
  314. package/dist/interface/assets/CuiRecordingsGrid-BzyJWpFt.js +0 -1
  315. package/dist/interface/assets/CuiSchema-thjfmEWw.js +0 -1
  316. package/dist/interface/assets/FirstSteps-C6GVpZVr.js +0 -1
  317. package/dist/interface/assets/Floorplan-Q-UYDnrE.js +0 -1
  318. package/dist/interface/assets/Metrics-CYZF-em9.js +0 -9
  319. package/dist/interface/assets/Plugin-DuPHiiYJ.js +0 -1
  320. package/dist/interface/assets/PluginDetail-DWP7_hNa.js +0 -2
  321. package/dist/interface/assets/PluginSearch-1djFQUjL.js +0 -1
  322. package/dist/interface/assets/PluginSearch-Ba-hQHxm.js +0 -2
  323. package/dist/interface/assets/Plugins-BZ3U4pcG.js +0 -1
  324. package/dist/interface/assets/Recordings-CI5MIFR-.js +0 -1
  325. package/dist/interface/assets/SensorEdit-B6s-VZ3F.js +0 -1
  326. package/dist/interface/assets/Sensors-DDPUwbb-.js +0 -2
  327. package/dist/interface/assets/SettingsAccount-CKi0z3Bm.js +0 -1
  328. package/dist/interface/assets/SettingsAppearance-CDbQnSvl.js +0 -1
  329. package/dist/interface/assets/SettingsAppearance-D9Y28zzz.js +0 -1
  330. package/dist/interface/assets/SettingsNotifications-xHV5KiZg.js +0 -1
  331. package/dist/interface/assets/SettingsRemote-7h2dKJlF.js +0 -2
  332. package/dist/interface/assets/SettingsSystem-D-MLhCdN.js +0 -2
  333. package/dist/interface/assets/Training-B5SzDUAC.css +0 -1
  334. package/dist/interface/assets/Training-DWrQVSS0.js +0 -1
  335. package/dist/interface/assets/api-CFf063x3.js +0 -4
  336. package/dist/interface/assets/api-eoOLTOnS.css +0 -2
  337. package/dist/interface/assets/cameraSources-CgAEmb37.js +0 -1
  338. package/dist/interface/assets/cloudHandoff-B_kCnm4R.js +0 -1
  339. package/dist/interface/assets/main--lW4P3A4.js +0 -3
  340. package/dist/interface/assets/ungrouped-C6pQb0X4.css +0 -1
  341. package/dist/interface/assets/ungrouped-C_gJm6d7.js +0 -1
  342. package/dist/interface/assets/vendor-core-D0ANiY7g.js +0 -1
  343. package/dist/interface/ha/CuiRecordingsGrid-D6HHyF1D.js +0 -735
  344. package/dist/interface/ha/Training-GMcD4Qg9.js +0 -1440
  345. package/dist/interface/ha/ungrouped-wz-KNJpA.js +0 -426
@@ -0,0 +1,1320 @@
1
+ import { Et as e, et as t, f as n, gt as r, i, m as a, rt as o } from "./ripple-BilzxWfY.js";
2
+ import { n as s } from "./virtualscroller-s_gNqN5p.js";
3
+ import { D as c, G as l, H as u, Jt as d, K as f, M as p, N as m, Wt as h, Y as g, _t as _, d as v, f as y, gt as b, kt as x, l as S, lt as C, ot as ee, p as w, q as T, qt as E, r as D, rt as O, u as k, ut as A, x as j, xt as M, y as N, z as te } from "./runtime-core.esm-bundler-D8slQ3BU.js";
4
+ import { t as ne } from "./tooltip-BIrD_hC8.js";
5
+ import { $ as P, Bn as re, Ci as ie, Cr as F, Hn as ae, Kn as oe, Mn as se, Q as ce, Rn as le, Sr as ue, Un as de, Vn as fe, X as pe, Xn as me, Y as he, Z as ge, _r as _e, _t as ve, br as ye, da as be, dr as xe, fr as Se, it as Ce, o as we, rr as Te, rt as Ee, ut as De, wr as Oe, zn as I } from "./api-DBu4gh4_.js";
6
+ import { _ as ke, o as Ae } from "./intercomService-jB2mTgsn.js";
7
+ import { n as je } from "./vue-i18n-Dcb07o5U.js";
8
+ import { M as Me } from "./dist-BqTZri2H.js";
9
+ import { t as Ne } from "./spinner-D6iUldg9.js";
10
+ import { t as Pe } from "./button-BlYuI0Q7.js";
11
+ import { t as Fe } from "./inputtext-DGIESrd0.js";
12
+ import { t as Ie } from "./select-DjWkRqsI.js";
13
+ import { t as L } from "./ring-resize-VS4MSeBv.js";
14
+ //#region ~icons/tabler/dots-vertical
15
+ var Le = {
16
+ viewBox: "0 0 24 24",
17
+ width: "1.2em",
18
+ height: "1.2em"
19
+ };
20
+ function R(e, t) {
21
+ return u(), w("svg", Le, [...t[0] ||= [k("path", {
22
+ fill: "none",
23
+ stroke: "currentColor",
24
+ "stroke-linecap": "round",
25
+ "stroke-linejoin": "round",
26
+ "stroke-width": "2",
27
+ d: "M11 12a1 1 0 1 0 2 0a1 1 0 1 0-2 0m0 7a1 1 0 1 0 2 0a1 1 0 1 0-2 0m0-14a1 1 0 1 0 2 0a1 1 0 1 0-2 0"
28
+ }, null, -1)]]);
29
+ }
30
+ var Re = _({
31
+ name: "tabler-dots-vertical",
32
+ render: R
33
+ }), z = {
34
+ viewBox: "0 0 24 24",
35
+ width: "1.2em",
36
+ height: "1.2em"
37
+ };
38
+ function B(e, t) {
39
+ return u(), w("svg", z, [...t[0] ||= [k("path", {
40
+ fill: "none",
41
+ stroke: "currentColor",
42
+ "stroke-linecap": "round",
43
+ "stroke-linejoin": "round",
44
+ "stroke-width": "2",
45
+ d: "M8 7a4 4 0 1 0 8 0a4 4 0 0 0-8 0M6 21v-2a4 4 0 0 1 4-4h3.5m4.92.61a2.1 2.1 0 0 1 2.97 2.97L18 22h-3v-3z"
46
+ }, null, -1)]]);
47
+ }
48
+ var ze = _({
49
+ name: "tabler-user-edit",
50
+ render: B
51
+ }), V = { class: "flex flex-col gap-4 w-full" }, H = {
52
+ key: 0,
53
+ class: "flex justify-center"
54
+ }, U = ["src", "alt"], W = { class: "flex flex-col gap-2 w-full" }, Be = { class: "cui-label" }, G = { class: "flex flex-col gap-2 w-full" }, K = {
55
+ for: "reassignTarget",
56
+ class: "cui-label"
57
+ }, Ve = /* @__PURE__ */ j({
58
+ __name: "FaceReassign",
59
+ props: {
60
+ cropUrl: {},
61
+ oldName: {}
62
+ },
63
+ setup(e, { expose: t }) {
64
+ let n = e, { t: r } = je(), { plugin: i } = Me("@camera.ui/camera-ui-nvr"), a = M(null), o = M([]), s = M(!0), c = S(() => n.oldName === "unknown" ? r("views.recordings.reassign_unknown_person") : n.oldName), l = S(() => {
65
+ let e = o.value.filter((e) => e !== n.oldName).map((e) => ({
66
+ label: e,
67
+ value: e
68
+ }));
69
+ return n.oldName !== "unknown" && e.push({
70
+ label: r("views.recordings.reassign_unknown"),
71
+ value: ""
72
+ }), e;
73
+ });
74
+ return te(async () => {
75
+ try {
76
+ let e = await i.value?.listKnownFaces?.();
77
+ o.value = (e ?? []).map((e) => e.name);
78
+ } catch {} finally {
79
+ s.value = !1;
80
+ }
81
+ }), t({ onConfirm: async () => a.value }), (e, t) => {
82
+ let r = Fe, i = Ie;
83
+ return u(), w("div", V, [
84
+ n.cropUrl ? (u(), w("div", H, [k("img", {
85
+ src: n.cropUrl,
86
+ alt: x(c),
87
+ class: "w-36 h-36 rounded-xl object-cover bg-neutral-900"
88
+ }, null, 8, U)])) : y("", !0),
89
+ k("div", W, [k("label", Be, d(e.$t("views.recordings.reassign_current")), 1), N(r, {
90
+ "model-value": x(c),
91
+ class: "w-full",
92
+ fluid: "",
93
+ disabled: ""
94
+ }, null, 8, ["model-value"])]),
95
+ k("div", G, [k("label", K, d(e.$t("views.recordings.reassign_new")), 1), N(i, {
96
+ id: "reassignTarget",
97
+ modelValue: x(a),
98
+ "onUpdate:modelValue": t[0] ||= (e) => b(a) ? a.value = e : null,
99
+ options: x(l),
100
+ "option-label": "label",
101
+ "option-value": "value",
102
+ class: "w-full",
103
+ fluid: "",
104
+ loading: x(s),
105
+ disabled: x(s),
106
+ placeholder: e.$t("views.faces.enter_or_pick_name")
107
+ }, null, 8, [
108
+ "modelValue",
109
+ "options",
110
+ "loading",
111
+ "disabled",
112
+ "placeholder"
113
+ ])])
114
+ ]);
115
+ };
116
+ }
117
+ }), He = ["src"], Ue = {
118
+ key: 2,
119
+ class: "w-full h-full flex items-center justify-center bg-neutral-800/80"
120
+ }, We = { class: "absolute top-0 left-0 right-0 p-2 bg-gradient-to-b from-black/80 to-transparent z-[3]" }, Ge = { class: "flex items-center gap-1.5" }, Ke = { class: "text-xs font-semibold text-white truncate min-w-0 flex-1" }, qe = {
121
+ key: 0,
122
+ class: "text-[10px] font-semibold text-white/80 bg-black/60 px-1.5 py-0.5 rounded-md shrink-0"
123
+ }, Je = { class: "text-[10px] text-white/70" }, Ye = { class: "block text-[11px] text-white font-medium truncate bg-black/50 rounded-md px-2 py-0.5" }, Xe = { class: "flex items-center gap-1 min-w-0" }, Ze = ["title"], Qe = {
124
+ key: 0,
125
+ class: "flex items-center gap-0.5 shrink-0 opacity-85 group-hover:opacity-100 transition-opacity duration-200"
126
+ }, $e = ["onClick"], et = ["src", "alt"], tt = {
127
+ key: 0,
128
+ class: "text-[10px] text-white/60 font-medium"
129
+ }, nt = {
130
+ key: 6,
131
+ class: "absolute inset-0 z-[4] flex items-center justify-center pointer-events-none"
132
+ }, rt = {
133
+ key: 7,
134
+ class: "absolute bottom-10 left-1/2 -translate-x-1/2 z-[4] pointer-events-none"
135
+ }, it = {
136
+ class: "text-[10px] font-semibold text-white bg-black/60 px-1.5 py-0.5 rounded-md whitespace-nowrap",
137
+ style: { "font-variant-numeric": "tabular-nums" }
138
+ }, at = 24, ot = 30, st = 22, ct = 28, lt = 8, q = /*#__PURE__*/ F(/* @__PURE__ */ j({
139
+ __name: "RecordingCard",
140
+ props: {
141
+ event: {},
142
+ cameraName: {},
143
+ camera: {},
144
+ loadThumbnails: { type: Function },
145
+ semanticScore: {},
146
+ segIndex: {},
147
+ hideSegmentBadge: { type: Boolean },
148
+ selectionMode: { type: Boolean },
149
+ selected: { type: Boolean },
150
+ siblingActive: { type: Boolean }
151
+ },
152
+ emits: [
153
+ "scrollToEvent",
154
+ "select",
155
+ "openTrace"
156
+ ],
157
+ setup(e, { emit: t }) {
158
+ let r = e, i = t, o = Ae(), s = ie(), { t: f } = je(), p = me("@camera.ui/camera-ui-nvr"), { plugin: m } = Me("@camera.ui/camera-ui-nvr"), _ = De(), { icons: b } = ve(), T = p.getCachedThumbnails(r.event.id), E = T ? I(T, r.event, "card", r.segIndex).url ? "loaded" : "empty" : "loading", j = c(ae, void 0), F = O("rootRef"), Ne = O("previewCanvasRef"), Fe = O("footerRef"), Ie = O("cardMenuRef"), L = M(!1), Le = ge(F, () => Pt(), () => $()), R = M(!1), z = M(T ?? null), B = M(E), V = M(!1), H = M(0), U = M(null), W = M(!1), { width: Be } = ke(Fe), G = S(() => U.value ?? r.event.favorite ?? !1), K = S(() => {
159
+ if (r.semanticScore == null) return;
160
+ let e = Math.max(0, Math.min(1, r.semanticScore));
161
+ return {
162
+ pct: e,
163
+ label: `${(e * 100).toFixed(0)}%`,
164
+ color: e >= .5 ? "bg-green-500/80" : e >= .25 ? "bg-yellow-500/80" : "bg-red-400/80"
165
+ };
166
+ }), q = S(() => z.value ? I(z.value, r.event, "card", r.segIndex) : null), ut = S(() => {
167
+ let e = r.segIndex ?? q.value?.segIndex;
168
+ return e === void 0 ? void 0 : r.event.segments?.[e];
169
+ }), dt = S(() => q.value?.url), ft = S(() => q.value?.label), pt = S(() => q.value?.type ?? r.event.types[0] ?? "motion"), mt = S(() => {
170
+ if (r.hideSegmentBadge) return;
171
+ let e = r.event.segments?.length ?? 0;
172
+ return r.segIndex !== void 0 && e > 1 ? `${r.segIndex + 1}/${e}` : void 0;
173
+ }), J = S(() => {
174
+ let e = z.value, t = q.value?.url;
175
+ if (!e || !t) return [];
176
+ let n = [{
177
+ url: t,
178
+ label: q.value?.label,
179
+ type: pt.value,
180
+ crop: !1
181
+ }];
182
+ for (let t of re(e, r.segIndex)) {
183
+ if (n.some((e) => e.url === t.url)) continue;
184
+ let e = t.key.split(":")[0];
185
+ n.push({
186
+ url: t.url,
187
+ label: t.label,
188
+ type: t.type,
189
+ crop: !0,
190
+ faceSeg: /^\d+$/.test(e) ? Number(e) : -1
191
+ });
192
+ }
193
+ if (r.segIndex === void 0) for (let t of Object.keys(e.cards ?? e.strips ?? {}).sort((e, t) => Number(e) - Number(t))) {
194
+ let i = de(e.cards?.[t] ?? e.strips?.[t]);
195
+ if (!i || n.some((e) => e.url === i)) continue;
196
+ let a = P(r.event, t);
197
+ n.push({
198
+ url: i,
199
+ label: a,
200
+ type: a,
201
+ crop: !1
202
+ });
203
+ }
204
+ return n.length > 1 ? n : [];
205
+ }), Y = S(() => J.value.length > 1), X = S(() => J.value.length ? Math.min(H.value, J.value.length - 1) : 0), Z = S(() => Y.value ? J.value[X.value] : void 0), ht = S(() => !!Z.value?.crop), gt = S(() => Z.value?.url ?? dt.value), _t = S(() => Z.value?.label ?? ft.value), Q = S(() => {
206
+ let e = ut.value;
207
+ return (e ? oe(r.event, e) : [...new Set(r.event.types)]).filter((e) => e !== "motion" && e !== "audio");
208
+ }), vt = S(() => r.cameraName ?? r.event.cameraId), yt = S(() => J.value.map((e) => ({
209
+ url: e.url,
210
+ type: e.type
211
+ }))), bt = S(() => Q.value.slice(0, xt.value.icons)), xt = S(() => {
212
+ let e = Be.value;
213
+ if (!e) return {
214
+ icons: 2,
215
+ tiles: 2
216
+ };
217
+ let t = e - lt;
218
+ r.selectionMode && (t -= ct);
219
+ let n = yt.value.length > 0 ? 52 : 0, i = At(Q.value.length, Math.max(0, t - n), at), a = Q.value.length > 0 ? Math.max(1, i) : 0, o = a * at + (a < Q.value.length ? st : 0);
220
+ return {
221
+ icons: a,
222
+ tiles: At(yt.value.length, Math.max(0, t - o), ot)
223
+ };
224
+ }), St = S(() => Q.value.slice(xt.value.icons)), Ct = S(() => yt.value.slice(0, xt.value.tiles)), wt = S(() => yt.value.length - xt.value.tiles), Tt = S(() => {
225
+ let e = r.segIndex === void 0 ? void 0 : r.event.segments?.[r.segIndex]?.firstSeen, t = new Date(e ?? r.event.thumbnailAt ?? r.event.startTime), n = /* @__PURE__ */ new Date(), i = t.toDateString() === n.toDateString(), a = t.toLocaleTimeString([], {
226
+ hour: "2-digit",
227
+ minute: "2-digit"
228
+ });
229
+ return i ? a : `${t.toLocaleDateString([], {
230
+ month: "short",
231
+ day: "numeric"
232
+ })} ${a}`;
233
+ }), Et = S(() => !!(m.value && r.event.endTime && r.event.hasRecording !== !1)), Dt = S(() => j ? L.value ? f("views.recordings.no_preview") : R.value ? j.status.value === "unavailable" ? f("views.recordings.no_preview") : j.status.value === "playing" && j.previewTimeMs.value ? Nt(j.previewTimeMs.value) : "" : "" : ""), Ot = S(() => {
234
+ let e = Z.value;
235
+ if (!(!e || e.type !== "face")) return e.label ? e.label : "unknown";
236
+ }), kt = S(() => {
237
+ let e = [];
238
+ return Ot.value !== void 0 && e.push({
239
+ key: "reassign",
240
+ label: f("views.recordings.reassign_face"),
241
+ icon: ze,
242
+ loading: W.value,
243
+ onClick: () => Bt()
244
+ }), r.camera && e.push({
245
+ key: "trace",
246
+ label: f("views.recordings.open_trace"),
247
+ icon: Ee,
248
+ onClick: () => i("openTrace")
249
+ }), Et.value && e.push({
250
+ key: "download",
251
+ label: f("views.recordings.download"),
252
+ icon: Ce,
253
+ loading: V.value,
254
+ onClick: () => Ut()
255
+ }), e;
256
+ });
257
+ function At(e, t, n) {
258
+ return e === 0 || t < n ? 0 : e * n <= t ? e : Math.max(0, Math.floor((t - st) / n));
259
+ }
260
+ function jt(e) {
261
+ let t = J.value.length;
262
+ t && ($(), H.value = (X.value + e + t) % t);
263
+ }
264
+ function Mt(e, t) {
265
+ Y.value && (t.stopPropagation(), $(), H.value = e);
266
+ }
267
+ function $() {
268
+ L.value = !1, !(!j || !R.value) && (R.value = !1, j.onHoverEnd());
269
+ }
270
+ function Nt(e) {
271
+ let t = new Date(e);
272
+ return `${String(t.getHours()).padStart(2, "0")}:${String(t.getMinutes()).padStart(2, "0")}:${String(t.getSeconds()).padStart(2, "0")}`;
273
+ }
274
+ function Pt() {
275
+ if (!j || X.value > 0) return;
276
+ let e = Ne.value;
277
+ if (!e) return;
278
+ let t = Te(r.event);
279
+ if (r.event.hasRecording === !1 || !t) {
280
+ L.value = !0;
281
+ return;
282
+ }
283
+ R.value = !0, j.onHoverStart(e, r.event.cameraId, r.event.id, r.event.startTime, t, r.camera?.zones?.privacy, fe(r.event));
284
+ }
285
+ function Ft() {
286
+ Le.blocksMouseEnter() || Pt();
287
+ }
288
+ function It() {
289
+ L.value = !1, j && (R.value = !1, j.onHoverEnd());
290
+ }
291
+ async function Lt(e = 2) {
292
+ let t = await r.loadThumbnails(r.event.id, r.event.startTime);
293
+ if (t) {
294
+ z.value = t;
295
+ let e = I(t, r.event, "card");
296
+ B.value = e.url ? "loaded" : "empty";
297
+ } else if (e > 0) return await new Promise((e) => setTimeout(e, 500)), Lt(e - 1);
298
+ else B.value = r.event.state === "active" ? "loading" : "empty";
299
+ }
300
+ function Rt() {
301
+ if (!Le.consumesClick()) {
302
+ if (r.selectionMode) {
303
+ i("select");
304
+ return;
305
+ }
306
+ i("scrollToEvent", ut.value?.firstSeen ?? ce(r.event));
307
+ }
308
+ }
309
+ function zt(e) {
310
+ $(), Ie.value?.toggleMenu(e);
311
+ }
312
+ function Bt() {
313
+ let e = Ot.value;
314
+ e !== void 0 && _.openComponentDialog(Ve, {
315
+ data: {
316
+ title: f("views.recordings.reassign_face"),
317
+ confirmText: f("components.form.button.save"),
318
+ contentProps: {
319
+ cropUrl: Z.value?.url,
320
+ oldName: e
321
+ }
322
+ },
323
+ onConfirm: (e) => Vt(e)
324
+ });
325
+ }
326
+ async function Vt(e) {
327
+ let t = Ot.value;
328
+ if (t === void 0 || W.value) return;
329
+ let n = Z.value?.faceSeg ?? -1, i = m.value;
330
+ if (i?.reassignEventFace) {
331
+ W.value = !0;
332
+ try {
333
+ await i.reassignEventFace(r.event.id, n, t, e) > 0 && le(r.event.id), s.add({
334
+ severity: "success",
335
+ detail: f("views.recordings.reassign_done"),
336
+ life: 3e3
337
+ });
338
+ } catch (e) {
339
+ s.add({
340
+ severity: "error",
341
+ detail: we(e),
342
+ life: 5e3
343
+ });
344
+ } finally {
345
+ W.value = !1;
346
+ }
347
+ }
348
+ }
349
+ async function Ht() {
350
+ let e = !G.value;
351
+ U.value = e;
352
+ try {
353
+ await p.setEventFavorite(r.event.id, e);
354
+ } catch (e) {
355
+ U.value = null, s.add({
356
+ severity: "error",
357
+ detail: we(e),
358
+ life: 5e3
359
+ });
360
+ }
361
+ }
362
+ async function Ut() {
363
+ if (V.value) return;
364
+ let e = m.value;
365
+ if (!(!e?.nvrExport || !r.event.endTime)) {
366
+ V.value = !0;
367
+ try {
368
+ let t = await e.nvrExport(r.event.cameraId, r.event.startTime * 1e3, r.event.endTime * 1e3);
369
+ await ye({
370
+ url: t.url,
371
+ filename: t.filename
372
+ });
373
+ } catch (e) {
374
+ o.error("Download failed:", e), s.add({
375
+ severity: "error",
376
+ summary: f("views.recordings.download_failed"),
377
+ detail: we(e),
378
+ life: 5e3
379
+ });
380
+ } finally {
381
+ V.value = !1;
382
+ }
383
+ }
384
+ }
385
+ return ee(() => p.storeVersion.value, () => {
386
+ let e = p.getCachedThumbnails(r.event.id);
387
+ if (!e) {
388
+ z.value && Lt();
389
+ return;
390
+ }
391
+ z.value = e, I(e, r.event, "card").url && (B.value = "loaded");
392
+ }), te(() => {
393
+ E === "loading" && Lt();
394
+ }), (t, r) => {
395
+ let i = be, o = ue, s = he, c = pe, f = Pe, p = Re, m = xe, _ = Se, S = _e, ee = Oe, T = ne;
396
+ return u(), w("div", {
397
+ ref_key: "rootRef",
398
+ ref: F,
399
+ class: "recording-card relative group cursor-pointer",
400
+ onClick: Rt,
401
+ onMouseenter: Ft,
402
+ onMouseleave: It
403
+ }, [k("div", {
404
+ class: h(["bg-neutral-900 w-full rounded-xl overflow-hidden relative transition-shadow duration-200", { "ring-2 ring-inset ring-primary/70": e.siblingActive }]),
405
+ style: { "aspect-ratio": "1/1" }
406
+ }, [
407
+ x(B) === "loading" ? (u(), v(i, {
408
+ key: 0,
409
+ width: "100%",
410
+ height: "100%",
411
+ class: "rounded-xl"
412
+ })) : x(gt) ? (u(), w(D, { key: 1 }, [x(ht) ? (u(), w("img", {
413
+ key: 0,
414
+ src: x(gt),
415
+ "aria-hidden": "true",
416
+ class: "absolute inset-0 w-full h-full object-cover blur-xl scale-110 opacity-50 pointer-events-none"
417
+ }, null, 8, He)) : y("", !0), N(o, {
418
+ src: x(gt),
419
+ alt: x(vt),
420
+ class: "pointer-events-none w-full h-full transition-transform duration-300 group-hover:scale-105",
421
+ "image-style": { objectFit: x(ht) ? "contain" : "cover" },
422
+ "image-container-class": "w-full h-full"
423
+ }, null, 8, [
424
+ "src",
425
+ "alt",
426
+ "image-style"
427
+ ])], 64)) : (u(), w("div", Ue, [(u(), v(g(x(b)[x(pt)] ?? x(b).motion), { class: "w-10 h-10 text-white/20" }))])),
428
+ x(j) ? A((u(), w("canvas", {
429
+ key: 3,
430
+ ref_key: "previewCanvasRef",
431
+ ref: Ne,
432
+ class: "absolute inset-0 w-full h-full object-cover pointer-events-none z-[1]"
433
+ }, null, 512)), [[n, x(R)]]) : y("", !0),
434
+ r[2] ||= k("div", { class: "absolute inset-0 bg-transparent group-hover:bg-black/30 pointer-events-none transition-colors duration-200 z-[2]" }, null, -1),
435
+ k("div", We, [k("div", Ge, [
436
+ k("p", Ke, d(x(vt)), 1),
437
+ x(mt) ? (u(), w("span", qe, d(x(mt)), 1)) : y("", !0),
438
+ x(K) ? (u(), w("span", {
439
+ key: 1,
440
+ class: h(["text-[10px] font-bold text-white px-1.5 py-0.5 rounded-md shrink-0", x(K).color])
441
+ }, d(x(K).label), 3)) : y("", !0),
442
+ e.selectionMode ? y("", !0) : A((u(), v(f, {
443
+ key: 2,
444
+ rounded: "",
445
+ text: "",
446
+ severity: "secondary",
447
+ class: "!w-5 !h-5 !p-0 shrink-0 bg-black/60 hover:!bg-black/80",
448
+ onClick: a(Ht, ["stop"]),
449
+ onMouseenter: $
450
+ }, {
451
+ icon: C(() => [x(G) ? (u(), v(s, {
452
+ key: 0,
453
+ class: "w-3 h-3 text-yellow-400"
454
+ })) : (u(), v(c, {
455
+ key: 1,
456
+ class: "w-3 h-3 text-white"
457
+ }))]),
458
+ _: 1
459
+ })), [[
460
+ T,
461
+ { value: x(G) ? t.$t("views.recordings.unfavorite") : t.$t("views.recordings.favorite") },
462
+ void 0,
463
+ { left: !0 }
464
+ ]]),
465
+ x(kt).length > 0 && !e.selectionMode ? A((u(), v(f, {
466
+ key: 3,
467
+ rounded: "",
468
+ text: "",
469
+ severity: "secondary",
470
+ loading: x(V) || x(W),
471
+ class: "!w-5 !h-5 !p-0 shrink-0 bg-black/60 hover:!bg-black/80",
472
+ onClick: a(zt, ["stop"]),
473
+ onMouseenter: $
474
+ }, {
475
+ icon: C(() => [N(p, { class: "w-3 h-3 text-white" })]),
476
+ _: 1
477
+ }, 8, ["loading"])), [[
478
+ T,
479
+ { value: t.$t("views.recordings.more_actions") },
480
+ void 0,
481
+ { left: !0 }
482
+ ]]) : y("", !0)
483
+ ]), k("p", Je, d(x(Tt)), 1)]),
484
+ x(J).length > 1 ? (u(), w(D, { key: 4 }, [N(f, {
485
+ rounded: "",
486
+ text: "",
487
+ severity: "secondary",
488
+ class: "carousel-nav !absolute left-1 top-1/2 -translate-y-1/2 z-[3] !w-7 !h-7 !p-0 bg-black/40 hover:!bg-black/60 transition-opacity duration-200",
489
+ "aria-label": t.$t("views.recordings.prev_image"),
490
+ onClick: r[0] ||= a((e) => jt(-1), ["stop"]),
491
+ onMouseenter: $
492
+ }, {
493
+ icon: C(() => [N(m, { class: "w-5 h-5 text-white" })]),
494
+ _: 1
495
+ }, 8, ["aria-label"]), N(f, {
496
+ rounded: "",
497
+ text: "",
498
+ severity: "secondary",
499
+ class: "carousel-nav !absolute right-1 top-1/2 -translate-y-1/2 z-[3] !w-7 !h-7 !p-0 bg-black/40 hover:!bg-black/60 transition-opacity duration-200",
500
+ "aria-label": t.$t("views.recordings.next_image"),
501
+ onClick: r[1] ||= a((e) => jt(1), ["stop"]),
502
+ onMouseenter: $
503
+ }, {
504
+ icon: C(() => [N(_, { class: "w-5 h-5 text-white" })]),
505
+ _: 1
506
+ }, 8, ["aria-label"])], 64)) : y("", !0),
507
+ x(_t) ? (u(), w("div", {
508
+ key: 5,
509
+ class: h(["absolute left-1/2 -translate-x-1/2 z-[3] max-w-[85%] pointer-events-none transition-all duration-200", x(Dt) ? "bottom-16" : "bottom-10"])
510
+ }, [k("span", Ye, d(x(_t)), 1)], 2)) : y("", !0),
511
+ k("div", {
512
+ ref_key: "footerRef",
513
+ ref: Fe,
514
+ class: "absolute bottom-2 left-2 right-2 flex items-center justify-between gap-2 z-[3]"
515
+ }, [k("div", Xe, [
516
+ e.selectionMode ? (u(), w("div", {
517
+ key: 0,
518
+ class: h(["w-6 h-6 rounded-full border-2 flex items-center justify-center transition-colors shrink-0", e.selected ? "bg-primary border-primary" : "bg-black/40 border-white/80"])
519
+ }, [e.selected ? (u(), v(S, {
520
+ key: 0,
521
+ class: "w-4 h-4 text-white"
522
+ })) : y("", !0)], 2)) : y("", !0),
523
+ (u(!0), w(D, null, l(x(bt), (e) => (u(), w("div", {
524
+ key: e,
525
+ class: "flex items-center justify-center w-5 h-5 rounded-md bg-black/60 shrink-0"
526
+ }, [(u(), v(g(x(b)[e] ?? x(b).motion), { class: "w-3 h-3 text-white/80" }))]))), 128)),
527
+ x(St).length > 0 ? (u(), w("span", {
528
+ key: 1,
529
+ title: x(St).join(", "),
530
+ class: "text-[10px] text-white/60 font-medium shrink-0"
531
+ }, " +" + d(x(St).length), 9, Ze)) : y("", !0)
532
+ ]), x(Ct).length > 0 || x(wt) > 0 ? (u(), w("div", Qe, [(u(!0), w(D, null, l(x(Ct), (e, t) => (u(), w("div", {
533
+ key: t,
534
+ class: h(["w-7 h-7 rounded overflow-hidden border bg-neutral-800 cursor-pointer", t === x(X) ? "border-primary/80" : "border-white/20"]),
535
+ onClick: (e) => Mt(t, e)
536
+ }, [k("img", {
537
+ src: e.url,
538
+ alt: e.type,
539
+ decoding: "async",
540
+ loading: "lazy",
541
+ class: "w-full h-full object-cover"
542
+ }, null, 8, et)], 10, $e))), 128)), x(wt) > 0 ? (u(), w("span", tt, "+" + d(x(wt)), 1)) : y("", !0)])) : y("", !0)], 512),
543
+ x(j) && x(R) && x(j).isLoading.value ? (u(), w("div", nt, [N(ee, {
544
+ class: "w-[28px] h-[28px] m-0",
545
+ "stroke-width": "6"
546
+ })])) : y("", !0),
547
+ x(Dt) ? (u(), w("div", rt, [k("span", it, d(x(Dt)), 1)])) : y("", !0)
548
+ ], 2), N(se, {
549
+ ref_key: "cardMenuRef",
550
+ ref: Ie,
551
+ items: x(kt),
552
+ popover: { pt: { content: { class: "p-0! rounded-xl! overflow-hidden!" } } }
553
+ }, null, 8, ["items"])], 544);
554
+ };
555
+ }
556
+ }), [["__scopeId", "data-v-dfc29d48"]]), ut = {
557
+ name: "VirtualScroller",
558
+ components: { SpinnerIcon: Ne },
559
+ extends: {
560
+ name: "BaseVirtualScroller",
561
+ extends: i,
562
+ provide() {
563
+ return {
564
+ $pcVirtualScroller: this,
565
+ $parentInstance: this
566
+ };
567
+ },
568
+ props: {
569
+ id: {
570
+ type: String,
571
+ default: null
572
+ },
573
+ style: null,
574
+ class: null,
575
+ items: {
576
+ type: Array,
577
+ default: null
578
+ },
579
+ itemSize: {
580
+ type: [Number, Array],
581
+ default: 0
582
+ },
583
+ scrollHeight: null,
584
+ scrollWidth: null,
585
+ orientation: {
586
+ type: String,
587
+ default: "vertical"
588
+ },
589
+ rtl: {
590
+ type: Boolean,
591
+ default: !1
592
+ },
593
+ numToleratedItems: {
594
+ type: Number,
595
+ default: null
596
+ },
597
+ delay: {
598
+ type: Number,
599
+ default: 0
600
+ },
601
+ resizeDelay: {
602
+ type: Number,
603
+ default: 10
604
+ },
605
+ lazy: {
606
+ type: Boolean,
607
+ default: !1
608
+ },
609
+ disabled: {
610
+ type: Boolean,
611
+ default: !1
612
+ },
613
+ loaderDisabled: {
614
+ type: Boolean,
615
+ default: !1
616
+ },
617
+ columns: {
618
+ type: Array,
619
+ default: null
620
+ },
621
+ loading: {
622
+ type: Boolean,
623
+ default: !1
624
+ },
625
+ showSpacer: {
626
+ type: Boolean,
627
+ default: !0
628
+ },
629
+ showLoader: {
630
+ type: Boolean,
631
+ default: !1
632
+ },
633
+ tabindex: {
634
+ type: Number,
635
+ default: 0
636
+ },
637
+ inline: {
638
+ type: Boolean,
639
+ default: !1
640
+ },
641
+ step: {
642
+ type: Number,
643
+ default: 0
644
+ },
645
+ appendOnly: {
646
+ type: Boolean,
647
+ default: !1
648
+ },
649
+ autoSize: {
650
+ type: Boolean,
651
+ default: !1
652
+ },
653
+ itemKey: {
654
+ type: [String, Function],
655
+ default: null
656
+ }
657
+ },
658
+ style: s,
659
+ beforeMount() {
660
+ s.loadCSS({ nonce: this.$primevueConfig?.csp?.nonce });
661
+ }
662
+ },
663
+ inheritAttrs: !1,
664
+ emits: [
665
+ "update:numToleratedItems",
666
+ "scroll",
667
+ "scroll-index-change",
668
+ "lazy-load"
669
+ ],
670
+ data() {
671
+ let e = this.isBoth();
672
+ return {
673
+ first: e ? {
674
+ rows: 0,
675
+ cols: 0
676
+ } : 0,
677
+ last: e ? {
678
+ rows: 0,
679
+ cols: 0
680
+ } : 0,
681
+ page: e ? {
682
+ rows: 0,
683
+ cols: 0
684
+ } : 0,
685
+ numItemsInViewport: e ? {
686
+ rows: 0,
687
+ cols: 0
688
+ } : 0,
689
+ lastScrollPos: e ? {
690
+ top: 0,
691
+ left: 0
692
+ } : 0,
693
+ d_numToleratedItems: this.numToleratedItems,
694
+ d_loading: this.loading,
695
+ loaderArr: [],
696
+ spacerStyle: {},
697
+ contentStyle: {}
698
+ };
699
+ },
700
+ element: null,
701
+ content: null,
702
+ lastScrollPos: null,
703
+ scrollTimeout: null,
704
+ resizeTimeout: null,
705
+ defaultWidth: 0,
706
+ defaultHeight: 0,
707
+ defaultContentWidth: 0,
708
+ defaultContentHeight: 0,
709
+ isRangeChanged: !1,
710
+ lazyLoadState: {},
711
+ resizeListener: null,
712
+ initialized: !1,
713
+ computed: {
714
+ containerClass() {
715
+ return [
716
+ "p-virtualscroller",
717
+ this.class,
718
+ {
719
+ "p-virtualscroller-inline": this.inline,
720
+ "p-virtualscroller-both p-both-scroll": this.isBoth(),
721
+ "p-virtualscroller-horizontal p-horizontal-scroll": this.isHorizontal(),
722
+ "p-virtualscroller-rtl": this.rtl && this.isHorizontal()
723
+ }
724
+ ];
725
+ },
726
+ contentClass() {
727
+ return ["p-virtualscroller-content", { "p-virtualscroller-loading": this.d_loading }];
728
+ },
729
+ loaderClass() {
730
+ return ["p-virtualscroller-loader", { "p-virtualscroller-loader-mask": !this.$slots.loader }];
731
+ },
732
+ loadedItems() {
733
+ return this.items && !this.d_loading ? this.isBoth() ? this.items.slice(this.appendOnly ? 0 : this.first.rows, this.last.rows).map((e) => this.columns ? e : e.slice(this.appendOnly ? 0 : this.first.cols, this.last.cols)) : this.isHorizontal() && this.columns ? this.items : this.items.slice(this.appendOnly ? 0 : this.first, this.last) : [];
734
+ },
735
+ loadedRows() {
736
+ return this.d_loading ? this.loaderDisabled ? this.loaderArr : [] : this.loadedItems;
737
+ },
738
+ loadedColumns() {
739
+ if (this.columns) {
740
+ let e = this.isBoth(), t = this.isHorizontal();
741
+ if (e || t) return this.d_loading && this.loaderDisabled ? e ? this.loaderArr[0] : this.loaderArr : this.columns.slice(e ? this.first.cols : this.first, e ? this.last.cols : this.last);
742
+ }
743
+ return this.columns;
744
+ }
745
+ },
746
+ watch: {
747
+ numToleratedItems(e) {
748
+ this.d_numToleratedItems = e;
749
+ },
750
+ loading(e, t) {
751
+ this.lazy && e !== t && e !== this.d_loading && (this.d_loading = e);
752
+ },
753
+ items(e, t) {
754
+ (!t || t.length !== (e || []).length) && this.scheduleInit();
755
+ },
756
+ itemSize() {
757
+ this.scheduleInit();
758
+ },
759
+ orientation() {
760
+ this.lastScrollPos = this.isBoth() ? {
761
+ top: 0,
762
+ left: 0
763
+ } : 0;
764
+ },
765
+ scrollHeight() {
766
+ this.scheduleInit();
767
+ },
768
+ scrollWidth() {
769
+ this.scheduleInit();
770
+ }
771
+ },
772
+ mounted() {
773
+ this.viewInit(), this.lastScrollPos = this.isBoth() ? {
774
+ top: 0,
775
+ left: 0
776
+ } : 0, this.lazyLoadState = this.lazyLoadState || {};
777
+ },
778
+ updated() {
779
+ !this.initialized && this.viewInit();
780
+ },
781
+ unmounted() {
782
+ this.unbindResizeListener(), this.initialized = !1;
783
+ },
784
+ methods: {
785
+ resolveItemKey(e, t) {
786
+ let n = this.itemKey;
787
+ return typeof n == "function" ? n(e, t) ?? t : typeof n == "string" && typeof e == "object" && e ? e[n] ?? t : t;
788
+ },
789
+ viewInit() {
790
+ r(this.element) && (this.setContentEl(this.content), this.init(), this.calculateAutoSize(), this.bindResizeListener(), this.defaultWidth = t(this.element), this.defaultHeight = o(this.element), this.defaultContentWidth = t(this.content), this.defaultContentHeight = o(this.content), this.initialized = !0);
791
+ },
792
+ init() {
793
+ this.disabled || (this.setSize(), this.calculateOptions(), this.setSpacerSize());
794
+ },
795
+ scheduleInit() {
796
+ this._initScheduled || (this._initScheduled = !0, Promise.resolve().then(() => {
797
+ this._initScheduled = !1, this.init(), this.calculateAutoSize();
798
+ }));
799
+ },
800
+ isVertical() {
801
+ return this.orientation === "vertical";
802
+ },
803
+ isHorizontal() {
804
+ return this.orientation === "horizontal";
805
+ },
806
+ isBoth() {
807
+ return this.orientation === "both";
808
+ },
809
+ scrollTo(e) {
810
+ this.element && this.element.scrollTo(e);
811
+ },
812
+ scrollToIndex(e, t = "auto") {
813
+ let n = this.isBoth(), r = this.isHorizontal(), i = this.rtl && r;
814
+ if (n ? e.every((e) => e > -1) : e > -1) {
815
+ let a = this.first, { scrollTop: o = 0, scrollLeft: s = 0 } = this.element, { numToleratedItems: c } = this.calculateNumItems(), l = this.getContentPosition(), u = this.itemSize, d = (e = 0, t) => e <= t ? 0 : e, f = (e, t, n) => e * t + n, p = (e = 0, n = 0) => {
816
+ i && (e = this.element.scrollWidth - this.element.clientWidth - e), this.scrollTo({
817
+ left: e,
818
+ top: n,
819
+ behavior: t
820
+ });
821
+ }, m = n ? {
822
+ rows: 0,
823
+ cols: 0
824
+ } : 0, h = !1, g = !1;
825
+ n ? (m = {
826
+ rows: d(e[0], c[0]),
827
+ cols: d(e[1], c[1])
828
+ }, p(f(m.cols, u[1], l.left), f(m.rows, u[0], l.top)), g = this.lastScrollPos.top !== o || this.lastScrollPos.left !== s, h = m.rows !== a.rows || m.cols !== a.cols) : (m = d(e, c), r ? p(f(m, u, l.left), o) : p(s, f(m, u, l.top)), g = this.lastScrollPos !== (r ? s : o), h = m !== a), this.isRangeChanged = h, g && (this.first = m);
829
+ }
830
+ },
831
+ scrollInView(e, t, n = "auto") {
832
+ if (t) {
833
+ let r = this.isBoth(), i = this.isHorizontal();
834
+ if (r ? e.every((e) => e > -1) : e > -1) {
835
+ let { first: a, viewport: o } = this.getRenderedRange(), s = (e = 0, t = 0) => this.scrollTo({
836
+ left: e,
837
+ top: t,
838
+ behavior: n
839
+ }), c = t === "to-start", l = t === "to-end";
840
+ if (c) {
841
+ if (r) o.first.rows - a.rows > e[0] ? s(o.first.cols * this.itemSize[1], (o.first.rows - 1) * this.itemSize[0]) : o.first.cols - a.cols > e[1] && s((o.first.cols - 1) * this.itemSize[1], o.first.rows * this.itemSize[0]);
842
+ else if (o.first - a > e) {
843
+ let e = (o.first - 1) * this.itemSize;
844
+ i ? s(e, 0) : s(0, e);
845
+ }
846
+ } else if (l) {
847
+ if (r) o.last.rows - a.rows <= e[0] + 1 ? s(o.first.cols * this.itemSize[1], (o.first.rows + 1) * this.itemSize[0]) : o.last.cols - a.cols <= e[1] + 1 && s((o.first.cols + 1) * this.itemSize[1], o.first.rows * this.itemSize[0]);
848
+ else if (o.last - a <= e + 1) {
849
+ let e = (o.first + 1) * this.itemSize;
850
+ i ? s(e, 0) : s(0, e);
851
+ }
852
+ }
853
+ }
854
+ } else this.scrollToIndex(e, n);
855
+ },
856
+ getRenderedRange() {
857
+ let e = (e, t) => Math.floor(e / (t || e)), t = this.first, n = 0;
858
+ if (this.element) {
859
+ let r = this.isBoth(), i = this.isHorizontal(), { scrollTop: a, scrollLeft: o } = this.element;
860
+ r ? (t = {
861
+ rows: e(a, this.itemSize[0]),
862
+ cols: e(o, this.itemSize[1])
863
+ }, n = {
864
+ rows: t.rows + this.numItemsInViewport.rows,
865
+ cols: t.cols + this.numItemsInViewport.cols
866
+ }) : (t = e(i ? o : a, this.itemSize), n = t + this.numItemsInViewport);
867
+ }
868
+ return {
869
+ first: this.first,
870
+ last: this.last,
871
+ viewport: {
872
+ first: t,
873
+ last: n
874
+ }
875
+ };
876
+ },
877
+ calculateNumItems() {
878
+ let e = this.isBoth(), t = this.isHorizontal(), n = this.itemSize, r = this.getContentPosition(), i = this.element ? this.element.offsetWidth - r.left : 0, a = this.element ? this.element.offsetHeight - r.top : 0, o = (e, t) => Math.ceil(e / (t || e)), s = (e) => Math.ceil(e / 2), c = e ? {
879
+ rows: o(a, n[0]),
880
+ cols: o(i, n[1])
881
+ } : o(t ? i : a, n);
882
+ return {
883
+ numItemsInViewport: c,
884
+ numToleratedItems: this.d_numToleratedItems || (e ? [s(c.rows), s(c.cols)] : s(c))
885
+ };
886
+ },
887
+ calculateOptions() {
888
+ let e = this.isBoth(), t = this.first, { numItemsInViewport: n, numToleratedItems: r } = this.calculateNumItems(), i = (e, t, n, r = !1) => this.getLast(e + t + (e < n ? 2 : 3) * n, r), a = e ? {
889
+ rows: i(t.rows, n.rows, r[0]),
890
+ cols: i(t.cols, n.cols, r[1], !0)
891
+ } : i(t, n, r);
892
+ this.last = a, this.numItemsInViewport = n, this.d_numToleratedItems = r, this.$emit("update:numToleratedItems", this.d_numToleratedItems), this.showLoader && (this.loaderArr = e ? Array.from({ length: n.rows }).map(() => Array.from({ length: n.cols })) : Array.from({ length: n })), this.lazy && Promise.resolve().then(() => {
893
+ this.lazyLoadState = {
894
+ first: this.step ? e ? {
895
+ rows: 0,
896
+ cols: t.cols
897
+ } : 0 : t,
898
+ last: Math.min(this.step ? this.step : a, this.items?.length - 1 || 0)
899
+ }, this.$emit("lazy-load", this.lazyLoadState);
900
+ });
901
+ },
902
+ calculateAutoSize() {
903
+ this.autoSize && !this.d_loading && Promise.resolve().then(() => {
904
+ if (this.content) {
905
+ let e = this.isBoth(), n = this.isHorizontal(), r = this.isVertical();
906
+ this.content.style.minHeight = this.content.style.minWidth = "auto", this.content.style.position = "relative", this.element.style.contain = "none";
907
+ let [i, a] = [t(this.element), o(this.element)];
908
+ (e || n) && (this.element.style.width = i < this.defaultWidth ? i + "px" : this.scrollWidth || this.defaultWidth + "px"), (e || r) && (this.element.style.height = a < this.defaultHeight ? a + "px" : this.scrollHeight || this.defaultHeight + "px"), this.content.style.minHeight = this.content.style.minWidth = "", this.content.style.position = "", this.element.style.contain = "";
909
+ }
910
+ });
911
+ },
912
+ getLast(e = 0, t) {
913
+ return this.items ? Math.min(t ? (this.columns || this.items[0])?.length || 0 : this.items?.length || 0, e) : 0;
914
+ },
915
+ getContentPosition() {
916
+ if (this.content) {
917
+ let e = getComputedStyle(this.content), t = parseFloat(e.paddingLeft) + Math.max(parseFloat(e.left) || 0, 0), n = parseFloat(e.paddingRight) + Math.max(parseFloat(e.right) || 0, 0), r = parseFloat(e.paddingTop) + Math.max(parseFloat(e.top) || 0, 0), i = parseFloat(e.paddingBottom) + Math.max(parseFloat(e.bottom) || 0, 0);
918
+ return {
919
+ left: t,
920
+ right: n,
921
+ top: r,
922
+ bottom: i,
923
+ x: t + n,
924
+ y: r + i
925
+ };
926
+ }
927
+ return {
928
+ left: 0,
929
+ right: 0,
930
+ top: 0,
931
+ bottom: 0,
932
+ x: 0,
933
+ y: 0
934
+ };
935
+ },
936
+ setSize() {
937
+ if (this.element) {
938
+ let e = this.isBoth(), t = this.isHorizontal(), n = this.element.parentElement, r = this.scrollWidth || `${this.element.offsetWidth || n.offsetWidth}px`, i = this.scrollHeight || `${this.element.offsetHeight || n.offsetHeight}px`, a = (e, t) => this.element.style[e] = t;
939
+ e || t ? (a("height", i), a("width", r)) : a("height", i);
940
+ }
941
+ },
942
+ setSpacerSize() {
943
+ let e = this.items;
944
+ if (e) {
945
+ let t = this.isBoth(), n = this.isHorizontal(), r = this.getContentPosition(), i = (e, t, n, r = 0) => this.spacerStyle = {
946
+ ...this.spacerStyle,
947
+ [`${e}`]: (t || []).length * n + r + "px"
948
+ };
949
+ t ? (i("height", e, this.itemSize[0], r.y), i("width", this.columns || e[1], this.itemSize[1], r.x)) : n ? i("width", this.columns || e, this.itemSize, r.x) : i("height", e, this.itemSize, r.y);
950
+ }
951
+ },
952
+ setContentPosition(e) {
953
+ if (this.content && !this.appendOnly) {
954
+ let t = this.isBoth(), n = this.isHorizontal(), r = this.rtl && n, i = e ? e.first : this.first, a = (e, t) => e * t, o = (e = 0, t = 0) => {
955
+ let n = r ? -e : e;
956
+ this.contentStyle = {
957
+ ...this.contentStyle,
958
+ transform: `translate3d(${n}px, ${t}px, 0)`
959
+ };
960
+ };
961
+ if (t) {
962
+ let e = i.rows, t = i.cols, n = this.itemSize;
963
+ o(a(t, n[1]), a(e, n[0]));
964
+ } else {
965
+ let e = i, t = this.itemSize, r = a(e, t);
966
+ n ? o(r, 0) : o(0, r);
967
+ }
968
+ }
969
+ },
970
+ onScrollPositionChange(e) {
971
+ let t = e.target, n = this.isBoth(), r = this.isHorizontal(), i = this.rtl && r, a = this.getContentPosition(), o = (e, t) => e ? e > t ? e - t : e : 0, s = (e, t) => Math.floor(e / (t || e)), c = o(t.scrollTop, a.top), l = o(t.scrollLeft, a.left);
972
+ i && l < 0 && (l = Math.abs(l));
973
+ let u = n ? {
974
+ rows: 0,
975
+ cols: 0
976
+ } : 0, d = this.last, f = !1, p = this.lastScrollPos;
977
+ if (n) {
978
+ let e = this.lastScrollPos.top <= c, n = this.lastScrollPos.left <= l;
979
+ if (!this.appendOnly || this.appendOnly && (e || n)) {
980
+ let r = {
981
+ rows: s(c, this.itemSize[0]),
982
+ cols: s(l, this.itemSize[1])
983
+ }, i = {
984
+ rows: this.calculateTriggerIndex(r.rows, this.first.rows, this.last.rows, this.numItemsInViewport.rows, this.d_numToleratedItems[0], e),
985
+ cols: this.calculateTriggerIndex(r.cols, this.first.cols, this.last.cols, this.numItemsInViewport.cols, this.d_numToleratedItems[1], n)
986
+ };
987
+ u = {
988
+ rows: this.calculateFirst(r.rows, i.rows, this.first.rows, this.last.rows, this.numItemsInViewport.rows, this.d_numToleratedItems[0], e),
989
+ cols: this.calculateFirst(r.cols, i.cols, this.first.cols, this.last.cols, this.numItemsInViewport.cols, this.d_numToleratedItems[1], n, !0)
990
+ }, d = {
991
+ rows: this.calculateLast(r.rows, u.rows, this.last.rows, this.numItemsInViewport.rows, this.d_numToleratedItems[0]),
992
+ cols: this.calculateLast(r.cols, u.cols, this.last.cols, this.numItemsInViewport.cols, this.d_numToleratedItems[1], !0)
993
+ }, f = u.rows !== this.first.rows || d.rows !== this.last.rows || u.cols !== this.first.cols || d.cols !== this.last.cols || this.isRangeChanged, p = {
994
+ top: c,
995
+ left: t.scrollLeft
996
+ };
997
+ }
998
+ } else {
999
+ let e = r ? l : c, t = this.lastScrollPos <= e;
1000
+ if (!this.appendOnly || this.appendOnly && t) {
1001
+ let n = s(e, this.itemSize), r = this.calculateTriggerIndex(n, this.first, this.last, this.numItemsInViewport, this.d_numToleratedItems, t);
1002
+ u = this.calculateFirst(n, r, this.first, this.last, this.numItemsInViewport, this.d_numToleratedItems, t), d = this.calculateLast(n, u, this.last, this.numItemsInViewport, this.d_numToleratedItems), f = u !== this.first || d !== this.last || this.isRangeChanged, p = e;
1003
+ }
1004
+ }
1005
+ return {
1006
+ first: u,
1007
+ last: d,
1008
+ isRangeChanged: f,
1009
+ scrollPos: p
1010
+ };
1011
+ },
1012
+ calculateTriggerIndex(e, t, n, r, i, a) {
1013
+ return e <= i ? i : a ? n - r - i : t + i - 1;
1014
+ },
1015
+ calculateFirst(e, t, n, r, i, a, o, s = !1) {
1016
+ if (e <= a) return 0;
1017
+ let c = Math.max(0, o ? e < t ? n : e - a : e > t ? n : e - 2 * a), l = this.getLast(c, s);
1018
+ return c > l ? l - i : c;
1019
+ },
1020
+ calculateLast(e, t, n, r, i, a = !1) {
1021
+ let o = t + r + 2 * i;
1022
+ return e >= i && (o += i + 1), this.getLast(o, a);
1023
+ },
1024
+ onScrollChange(e) {
1025
+ let { first: t, last: n, isRangeChanged: r, scrollPos: i } = this.onScrollPositionChange(e);
1026
+ if (r) {
1027
+ let e = {
1028
+ first: t,
1029
+ last: n
1030
+ };
1031
+ if (this.setContentPosition(e), this.first = t, this.last = n, this.lastScrollPos = i, this.$emit("scroll-index-change", e), this.lazy && this.isPageChanged(t)) {
1032
+ let e = {
1033
+ first: this.step ? Math.min(this.getPageByFirst(t) * this.step, (this.items?.length || 0) - this.step) : t,
1034
+ last: Math.min(this.step ? (this.getPageByFirst(t) + 1) * this.step : n, this.items?.length - 1 || 0)
1035
+ };
1036
+ (this.lazyLoadState.first !== e.first || this.lazyLoadState.last !== e.last) && this.$emit("lazy-load", e), this.lazyLoadState = e;
1037
+ }
1038
+ }
1039
+ },
1040
+ onScroll(e) {
1041
+ if (this.$emit("scroll", e), this.delay) {
1042
+ if (this.scrollTimeout && clearTimeout(this.scrollTimeout), this.isPageChanged()) {
1043
+ if (!this.d_loading && this.showLoader) {
1044
+ let { isRangeChanged: t } = this.onScrollPositionChange(e);
1045
+ (t || this.step && this.isPageChanged()) && (this.d_loading = !0);
1046
+ }
1047
+ this.scrollTimeout = setTimeout(() => {
1048
+ this.onScrollChange(e), this.d_loading && this.showLoader && (!this.lazy || this.loading === void 0) && (this.d_loading = !1, this.page = this.getPageByFirst());
1049
+ }, this.delay);
1050
+ }
1051
+ } else this.onScrollChange(e);
1052
+ },
1053
+ onResize() {
1054
+ this.resizeTimeout && clearTimeout(this.resizeTimeout), this.resizeTimeout = setTimeout(() => {
1055
+ if (r(this.element)) {
1056
+ let e = this.isBoth(), n = this.isVertical(), r = this.isHorizontal(), [i, a] = [t(this.element), o(this.element)], [s, c] = [i !== this.defaultWidth, a !== this.defaultHeight];
1057
+ (e ? s || c : r ? s : n && c) && (this.d_numToleratedItems = this.numToleratedItems, this.defaultWidth = i, this.defaultHeight = a, this.defaultContentWidth = t(this.content), this.defaultContentHeight = o(this.content), this.init());
1058
+ }
1059
+ }, this.resizeDelay);
1060
+ },
1061
+ bindResizeListener() {
1062
+ this.resizeListener || (this.resizeListener = this.onResize.bind(this), window.addEventListener("resize", this.resizeListener), window.addEventListener("orientationchange", this.resizeListener));
1063
+ },
1064
+ unbindResizeListener() {
1065
+ this.resizeListener &&= (window.removeEventListener("resize", this.resizeListener), window.removeEventListener("orientationchange", this.resizeListener), null);
1066
+ },
1067
+ getOptions(e) {
1068
+ let t = (this.items || []).length, n = this.isBoth() ? this.first.rows + e : this.first + e;
1069
+ return {
1070
+ index: n,
1071
+ count: t,
1072
+ first: n === 0,
1073
+ last: n === t - 1,
1074
+ even: n % 2 == 0,
1075
+ odd: n % 2 != 0
1076
+ };
1077
+ },
1078
+ getLoaderOptions(e, t) {
1079
+ let n = this.loaderArr.length;
1080
+ return {
1081
+ index: e,
1082
+ count: n,
1083
+ first: e === 0,
1084
+ last: e === n - 1,
1085
+ even: e % 2 == 0,
1086
+ odd: e % 2 != 0,
1087
+ ...t
1088
+ };
1089
+ },
1090
+ getPageByFirst(e) {
1091
+ return Math.floor(((e ?? this.first) + this.d_numToleratedItems * 4) / (this.step || 1));
1092
+ },
1093
+ isPageChanged(e) {
1094
+ return this.step && !this.lazy ? this.page !== this.getPageByFirst(e ?? this.first) : !0;
1095
+ },
1096
+ setContentEl(t) {
1097
+ this.content = t || this.content || e(this.element, "[data-pc-section=\"content\"]");
1098
+ },
1099
+ elementRef(e) {
1100
+ this.element = e;
1101
+ },
1102
+ contentRef(e) {
1103
+ this.content = e;
1104
+ }
1105
+ }
1106
+ }, dt = ["tabindex"];
1107
+ function ft(e, t, n, r, i, a) {
1108
+ let o = T("SpinnerIcon");
1109
+ return e.disabled ? (u(), w(D, { key: 1 }, [f(e.$slots, "default"), f(e.$slots, "content", {
1110
+ items: e.items,
1111
+ rows: e.items,
1112
+ columns: a.loadedColumns
1113
+ })], 64)) : (u(), w("div", p({
1114
+ key: 0,
1115
+ ref: a.elementRef,
1116
+ class: a.containerClass,
1117
+ tabindex: e.tabindex,
1118
+ style: e.style
1119
+ }, e.ptmi("root"), { onScroll: t[0] ||= (...e) => a.onScroll && a.onScroll(...e) }), [
1120
+ f(e.$slots, "content", {
1121
+ styleClass: a.contentClass,
1122
+ items: a.loadedItems,
1123
+ getItemOptions: a.getOptions,
1124
+ loading: i.d_loading,
1125
+ getLoaderOptions: a.getLoaderOptions,
1126
+ itemSize: e.itemSize,
1127
+ rows: a.loadedRows,
1128
+ columns: a.loadedColumns,
1129
+ contentRef: a.contentRef,
1130
+ spacerStyle: i.spacerStyle,
1131
+ contentStyle: i.contentStyle,
1132
+ vertical: a.isVertical(),
1133
+ horizontal: a.isHorizontal(),
1134
+ both: a.isBoth()
1135
+ }, () => [k("div", p({
1136
+ ref: a.contentRef,
1137
+ class: a.contentClass,
1138
+ style: i.contentStyle
1139
+ }, e.ptm("content")), [(u(!0), w(D, null, l(a.loadedItems, (t, n) => f(e.$slots, "item", {
1140
+ item: t,
1141
+ options: a.getOptions(n)
1142
+ }, void 0, void 0, a.resolveItemKey(t, n))), 128))], 16)]),
1143
+ e.showSpacer ? (u(), w("div", p({
1144
+ key: 0,
1145
+ class: "p-virtualscroller-spacer",
1146
+ style: i.spacerStyle
1147
+ }, e.ptm("spacer")), null, 16)) : y("", !0),
1148
+ !e.loaderDisabled && e.showLoader && i.d_loading ? (u(), w("div", p({
1149
+ key: 1,
1150
+ class: a.loaderClass
1151
+ }, e.ptm("loader")), [e.$slots && e.$slots.loader ? (u(!0), w(D, { key: 0 }, l(i.loaderArr, (t, n) => f(e.$slots, "loader", { options: a.getLoaderOptions(n, a.isBoth() && { numCols: e.d_numItemsInViewport.cols }) }, void 0, void 0, n)), 128)) : y("", !0), f(e.$slots, "loadingicon", {}, () => [N(o, p({
1152
+ spin: "",
1153
+ class: "p-virtualscroller-loading-icon"
1154
+ }, e.ptm("loadingIcon")), null, 16)])], 16)) : y("", !0)
1155
+ ], 16, dt));
1156
+ }
1157
+ var pt = /*#__PURE__*/ F(ut, [["render", ft]]), mt = {
1158
+ key: 1,
1159
+ class: "pointer-events-none absolute bottom-2 left-1/2 -translate-x-1/2 z-10 rounded-full bg-black/60 p-1.5"
1160
+ }, J = /*#__PURE__*/ F(/* @__PURE__ */ j({
1161
+ __name: "CuiRecordingsGrid",
1162
+ props: {
1163
+ items: {},
1164
+ minItemWidth: {},
1165
+ aspectRatio: { default: 1 },
1166
+ gap: { default: 8 },
1167
+ hasMore: {
1168
+ type: Boolean,
1169
+ default: !1
1170
+ },
1171
+ loadMore: {
1172
+ type: Function,
1173
+ default: void 0
1174
+ },
1175
+ itemKey: {
1176
+ type: Function,
1177
+ default: void 0
1178
+ }
1179
+ },
1180
+ setup(e, { expose: t }) {
1181
+ let n = e, r = O("containerRef"), { width: i, height: a } = ke(r), o = S(() => a.value > 0 ? `${a.value}px` : void 0), s = S(() => {
1182
+ let e = i.value;
1183
+ if (!e) return 0;
1184
+ let t = n.gap;
1185
+ return Math.max(1, Math.floor((e + t) / (n.minItemWidth + t)));
1186
+ }), c = S(() => {
1187
+ let e = i.value, t = s.value;
1188
+ return !e || !t ? 0 : Math.floor((e - (t - 1) * n.gap) / t);
1189
+ }), d = S(() => c.value ? Math.floor(c.value / n.aspectRatio) : 0), p = S(() => d.value ? d.value + n.gap : 0), h = S(() => {
1190
+ let e = s.value;
1191
+ if (!e) return [];
1192
+ let t = [];
1193
+ for (let r = 0; r < n.items.length; r += e) t.push(n.items.slice(r, r + e));
1194
+ return t;
1195
+ });
1196
+ function g(e) {
1197
+ if (n.itemKey) return n.itemKey(e);
1198
+ let t = e;
1199
+ return t.id ?? t.key ?? JSON.stringify(e);
1200
+ }
1201
+ function _(e) {
1202
+ let t = e;
1203
+ if (!(!t || t.length === 0)) return g(t[0]);
1204
+ }
1205
+ let b = M(!1), T = null;
1206
+ async function A() {
1207
+ if (b.value || !n.hasMore || !n.loadMore || T !== null && n.items.length === T) return;
1208
+ b.value = !0;
1209
+ let e = n.items.length;
1210
+ try {
1211
+ await Promise.resolve(n.loadMore());
1212
+ } finally {
1213
+ b.value = !1, T = n.items.length === e ? e : null;
1214
+ }
1215
+ }
1216
+ let j = M(0);
1217
+ function te(e) {
1218
+ let t = e.target;
1219
+ if (!t) return;
1220
+ j.value = t.scrollTop;
1221
+ let n = p.value * 3;
1222
+ t.scrollTop + t.clientHeight >= t.scrollHeight - n && A();
1223
+ }
1224
+ function ne() {
1225
+ (r.value?.querySelector(".recordings-scroll"))?.scrollTo({
1226
+ top: 0,
1227
+ behavior: "smooth"
1228
+ });
1229
+ }
1230
+ let P = !1;
1231
+ return ee([
1232
+ () => n.items.length,
1233
+ a,
1234
+ p,
1235
+ () => n.hasMore
1236
+ ], () => {
1237
+ P || (P = !0, m(() => {
1238
+ if (P = !1, !n.hasMore) return;
1239
+ let e = a.value, t = h.value.length * p.value;
1240
+ e > 0 && p.value > 0 && t < e + p.value && A();
1241
+ }));
1242
+ }, { flush: "post" }), t({
1243
+ scrollToTop: ne,
1244
+ scrollY: j
1245
+ }), (t, n) => {
1246
+ let i = pt, a = L;
1247
+ return u(), w("div", {
1248
+ ref_key: "containerRef",
1249
+ ref: r,
1250
+ class: "recordings-grid-root relative"
1251
+ }, [x(h).length > 0 && x(c) > 0 ? (u(), v(i, {
1252
+ key: 0,
1253
+ items: x(h),
1254
+ "item-size": x(p),
1255
+ "scroll-height": x(o),
1256
+ orientation: "vertical",
1257
+ class: "recordings-scroll",
1258
+ "num-tolerated-items": 2,
1259
+ "item-key": _,
1260
+ onScroll: te
1261
+ }, {
1262
+ item: C(({ item: n }) => [k("div", {
1263
+ class: "recordings-row",
1264
+ style: E({
1265
+ height: `${x(p)}px`,
1266
+ gap: `${e.gap}px`
1267
+ })
1268
+ }, [(u(!0), w(D, null, l(n, (e) => (u(), w("div", {
1269
+ key: g(e),
1270
+ style: E({
1271
+ width: `${x(c)}px`,
1272
+ height: `${x(d)}px`
1273
+ })
1274
+ }, [f(t.$slots, "item", { item: e }, void 0, !0)], 4))), 128))], 4)]),
1275
+ _: 3
1276
+ }, 8, [
1277
+ "items",
1278
+ "item-size",
1279
+ "scroll-height"
1280
+ ])) : y("", !0), x(b) ? (u(), w("div", mt, [N(a, {
1281
+ width: "18px",
1282
+ height: "18px",
1283
+ class: "text-white"
1284
+ })])) : y("", !0)], 512);
1285
+ };
1286
+ }
1287
+ }), [["__scopeId", "data-v-57a2aa74"]]);
1288
+ //#endregion
1289
+ //#region src/components/CuiRecordings/ungrouped.ts
1290
+ function Y(e) {
1291
+ if (e.episode) return e.episode.endTime;
1292
+ if (e.segIndex !== void 0) {
1293
+ let t = e.event.segments?.[e.segIndex];
1294
+ if (t) return t.firstSeen;
1295
+ }
1296
+ return e.event.thumbnailAt ?? e.event.startTime;
1297
+ }
1298
+ function X(e) {
1299
+ let t = [];
1300
+ for (let n of e) {
1301
+ let e = n.segments ?? [];
1302
+ if (e.length <= 1) {
1303
+ t.push({
1304
+ event: n,
1305
+ key: n.id
1306
+ });
1307
+ continue;
1308
+ }
1309
+ e.forEach((e, r) => {
1310
+ e && t.push({
1311
+ event: n,
1312
+ key: `${n.id}:seg:${r}`,
1313
+ segIndex: r
1314
+ });
1315
+ });
1316
+ }
1317
+ return t.sort((e, t) => Y(t) - Y(e)), t;
1318
+ }
1319
+ //#endregion
1320
+ export { q as i, Y as n, J as r, X as t };