@northern.tech/store 0.2.0 → 0.3.0

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 (393) hide show
  1. package/dist/actions.cjs +1812 -0
  2. package/dist/actions.cjs.map +1 -0
  3. package/dist/actions.js +18 -1806
  4. package/dist/actions.js.map +1 -1
  5. package/dist/api/general-api.cjs +336 -0
  6. package/dist/api/general-api.cjs.map +1 -0
  7. package/dist/api/general-api.js +15 -1064
  8. package/dist/api/general-api.js.map +1 -1
  9. package/dist/api/users-api.cjs +342 -0
  10. package/dist/api/users-api.cjs.map +1 -0
  11. package/dist/api/users-api.js +12 -1088
  12. package/dist/api/users-api.js.map +1 -1
  13. package/dist/appSlice/constants.cjs +207 -0
  14. package/dist/appSlice/constants.cjs.map +1 -0
  15. package/dist/appSlice/{constants.d.mts → constants.d.cts} +12 -1
  16. package/dist/appSlice/constants.d.ts +12 -1
  17. package/dist/appSlice/constants.js +22 -202
  18. package/dist/appSlice/constants.js.map +1 -1
  19. package/dist/appSlice/index.cjs +393 -0
  20. package/dist/appSlice/index.cjs.map +1 -0
  21. package/dist/appSlice/index.js +14 -1125
  22. package/dist/appSlice/index.js.map +1 -1
  23. package/dist/appSlice/selectors.cjs +58 -0
  24. package/dist/appSlice/selectors.cjs.map +1 -0
  25. package/dist/appSlice/selectors.js +11 -82
  26. package/dist/appSlice/selectors.js.map +1 -1
  27. package/dist/appSlice/thunks.cjs +4670 -0
  28. package/dist/appSlice/thunks.cjs.map +1 -0
  29. package/dist/appSlice/thunks.js +39 -5728
  30. package/dist/appSlice/thunks.js.map +1 -1
  31. package/dist/auth.cjs +320 -0
  32. package/dist/auth.cjs.map +1 -0
  33. package/dist/auth.js +15 -1042
  34. package/dist/auth.js.map +1 -1
  35. package/dist/{chunk-BOSBROA3.mjs → chunk-25AKG5HH.js} +6 -8
  36. package/dist/chunk-25AKG5HH.js.map +1 -0
  37. package/dist/{chunk-OGAMVFPS.mjs → chunk-4B3IMP4I.js} +18 -17
  38. package/dist/chunk-4B3IMP4I.js.map +1 -0
  39. package/dist/{chunk-OWHFMKTA.mjs → chunk-7PVGDMNM.js} +19 -16
  40. package/dist/{chunk-OWHFMKTA.mjs.map → chunk-7PVGDMNM.js.map} +1 -1
  41. package/dist/{chunk-MQIKQKSW.mjs → chunk-A6CT6GTI.js} +37 -33
  42. package/dist/{chunk-MQIKQKSW.mjs.map → chunk-A6CT6GTI.js.map} +1 -1
  43. package/dist/{chunk-4C6IY46N.mjs → chunk-AMGWP7A4.js} +7 -11
  44. package/dist/{chunk-4C6IY46N.mjs.map → chunk-AMGWP7A4.js.map} +1 -1
  45. package/dist/{chunk-G4FGNSV3.mjs → chunk-CK6YE6AN.js} +1 -1
  46. package/dist/{chunk-NCI6JV5R.mjs → chunk-CYV6632F.js} +6 -12
  47. package/dist/{chunk-NCI6JV5R.mjs.map → chunk-CYV6632F.js.map} +1 -1
  48. package/dist/{chunk-Y47SYXII.mjs → chunk-DGD6FVWF.js} +33 -42
  49. package/dist/{chunk-Y47SYXII.mjs.map → chunk-DGD6FVWF.js.map} +1 -1
  50. package/dist/{chunk-UPMSYTWW.mjs → chunk-DQ4ZLUIU.js} +307 -648
  51. package/dist/chunk-DQ4ZLUIU.js.map +1 -0
  52. package/dist/{chunk-EM2HUGUY.mjs → chunk-E5LEU5PF.js} +37 -28
  53. package/dist/{chunk-EM2HUGUY.mjs.map → chunk-E5LEU5PF.js.map} +1 -1
  54. package/dist/{chunk-M4U5R7A4.mjs → chunk-FGKMJS3B.js} +2 -6
  55. package/dist/{chunk-M4U5R7A4.mjs.map → chunk-FGKMJS3B.js.map} +1 -1
  56. package/dist/{chunk-RWYS5MKN.mjs → chunk-GZ5VQMDM.js} +17 -24
  57. package/dist/chunk-GZ5VQMDM.js.map +1 -0
  58. package/dist/{chunk-ZLRZO4EY.mjs → chunk-H6DUEJFF.js} +53 -101
  59. package/dist/chunk-H6DUEJFF.js.map +1 -0
  60. package/dist/chunk-JAROCU6M.js +25 -0
  61. package/dist/{chunk-L4HIW3KB.mjs.map → chunk-JAROCU6M.js.map} +1 -1
  62. package/dist/{chunk-QBKCUIWO.mjs → chunk-JIS4PA3R.js} +1 -1
  63. package/dist/{chunk-4U4X4KAC.mjs → chunk-KAQJH2YL.js} +11 -17
  64. package/dist/{chunk-4U4X4KAC.mjs.map → chunk-KAQJH2YL.js.map} +1 -1
  65. package/dist/{chunk-C2YZYTJ6.mjs → chunk-LIJIIRON.js} +2 -11
  66. package/dist/{chunk-C2YZYTJ6.mjs.map → chunk-LIJIIRON.js.map} +1 -1
  67. package/dist/{chunk-IU4OXOPA.mjs → chunk-MRCFLG45.js} +1 -1
  68. package/dist/chunk-NMAXZ3ZY.js +1 -0
  69. package/dist/{chunk-2HCZYULZ.mjs → chunk-Q6M5TTDQ.js} +3 -6
  70. package/dist/{chunk-2HCZYULZ.mjs.map → chunk-Q6M5TTDQ.js.map} +1 -1
  71. package/dist/{chunk-BWFTQHNM.mjs → chunk-RX55KAKX.js} +3 -4
  72. package/dist/{chunk-BWFTQHNM.mjs.map → chunk-RX55KAKX.js.map} +1 -1
  73. package/dist/{chunk-ZZ6VIQ3U.mjs → chunk-UEP36GCI.js} +10 -12
  74. package/dist/{chunk-ZZ6VIQ3U.mjs.map → chunk-UEP36GCI.js.map} +1 -1
  75. package/dist/{chunk-MJW4632R.mjs → chunk-UVQX743T.js} +18 -22
  76. package/dist/{chunk-MJW4632R.mjs.map → chunk-UVQX743T.js.map} +1 -1
  77. package/dist/chunk-V4DKKRWS.js +41 -0
  78. package/dist/{chunk-ENLZPHTQ.mjs.map → chunk-V4DKKRWS.js.map} +1 -1
  79. package/dist/{chunk-XJNI62IP.mjs → chunk-VOCOFE4I.js} +4 -11
  80. package/dist/{chunk-XJNI62IP.mjs.map → chunk-VOCOFE4I.js.map} +1 -1
  81. package/dist/{chunk-WS3YYLTJ.mjs → chunk-XTRPX7JZ.js} +14 -13
  82. package/dist/{chunk-WS3YYLTJ.mjs.map → chunk-XTRPX7JZ.js.map} +1 -1
  83. package/dist/{chunk-QG4PT5WK.mjs → chunk-XXHONFSQ.js} +9 -21
  84. package/dist/{chunk-QG4PT5WK.mjs.map → chunk-XXHONFSQ.js.map} +1 -1
  85. package/dist/{chunk-U6YTBIDT.mjs → chunk-YETZPQFR.js} +25 -52
  86. package/dist/chunk-YETZPQFR.js.map +1 -0
  87. package/dist/{chunk-EFHEROXZ.mjs → chunk-YGBFDXXA.js} +30 -18
  88. package/dist/{chunk-EFHEROXZ.mjs.map → chunk-YGBFDXXA.js.map} +1 -1
  89. package/dist/{chunk-H2PQQMRY.mjs → chunk-YO22XLHI.js} +1 -1
  90. package/dist/{chunk-2P4VECEE.mjs → chunk-YT73QWCN.js} +6 -11
  91. package/dist/{chunk-2P4VECEE.mjs.map → chunk-YT73QWCN.js.map} +1 -1
  92. package/dist/{chunk-X65NMDPS.mjs → chunk-YTQUNAZP.js} +40 -30
  93. package/dist/{chunk-X65NMDPS.mjs.map → chunk-YTQUNAZP.js.map} +1 -1
  94. package/dist/commonConstants.cjs +285 -0
  95. package/dist/{chunk-OGAMVFPS.mjs.map → commonConstants.cjs.map} +1 -1
  96. package/dist/{commonConstants.d.mts → commonConstants.d.cts} +3 -3
  97. package/dist/commonConstants.d.ts +3 -3
  98. package/dist/commonConstants.js +21 -286
  99. package/dist/commonConstants.js.map +1 -1
  100. package/dist/commonSelectors.cjs +1487 -0
  101. package/dist/commonSelectors.cjs.map +1 -0
  102. package/dist/commonSelectors.js +36 -1545
  103. package/dist/commonSelectors.js.map +1 -1
  104. package/dist/constants.cjs +1297 -0
  105. package/dist/constants.cjs.map +1 -0
  106. package/dist/{constants.d.mts → constants.d.cts} +10 -10
  107. package/dist/constants.d.ts +1 -1
  108. package/dist/constants.js +117 -1203
  109. package/dist/constants.js.map +1 -1
  110. package/dist/deploymentdevicehook.cjs +4686 -0
  111. package/dist/deploymentdevicehook.cjs.map +1 -0
  112. package/dist/deploymentdevicehook.d.cts +3 -0
  113. package/dist/deploymentdevicehook.d.ts +3 -0
  114. package/dist/deploymentdevicehook.js +60 -0
  115. package/dist/deploymentdevicehook.js.map +1 -0
  116. package/dist/deploymentsSlice/constants.cjs +562 -0
  117. package/dist/deploymentsSlice/constants.cjs.map +1 -0
  118. package/dist/deploymentsSlice/constants.js +24 -1016
  119. package/dist/deploymentsSlice/constants.js.map +1 -1
  120. package/dist/deploymentsSlice/index.cjs +648 -0
  121. package/dist/deploymentsSlice/index.cjs.map +1 -0
  122. package/dist/deploymentsSlice/index.js +14 -1111
  123. package/dist/deploymentsSlice/index.js.map +1 -1
  124. package/dist/deploymentsSlice/selectors.cjs +561 -0
  125. package/dist/deploymentsSlice/selectors.cjs.map +1 -0
  126. package/dist/deploymentsSlice/selectors.js +16 -1025
  127. package/dist/deploymentsSlice/selectors.js.map +1 -1
  128. package/dist/deploymentsSlice/thunks.cjs +4686 -0
  129. package/dist/deploymentsSlice/thunks.cjs.map +1 -0
  130. package/dist/deploymentsSlice/thunks.js +48 -5735
  131. package/dist/deploymentsSlice/thunks.js.map +1 -1
  132. package/dist/devicesSlice/constants.cjs +435 -0
  133. package/dist/devicesSlice/constants.cjs.map +1 -0
  134. package/dist/devicesSlice/constants.js +23 -1017
  135. package/dist/devicesSlice/constants.js.map +1 -1
  136. package/dist/devicesSlice/index.cjs +586 -0
  137. package/dist/devicesSlice/index.cjs.map +1 -0
  138. package/dist/devicesSlice/index.js +14 -1167
  139. package/dist/devicesSlice/index.js.map +1 -1
  140. package/dist/devicesSlice/selectors.cjs +531 -0
  141. package/dist/devicesSlice/selectors.cjs.map +1 -0
  142. package/dist/devicesSlice/selectors.js +30 -1126
  143. package/dist/devicesSlice/selectors.js.map +1 -1
  144. package/dist/devicesSlice/thunks.cjs +4758 -0
  145. package/dist/devicesSlice/thunks.cjs.map +1 -0
  146. package/dist/devicesSlice/thunks.js +84 -5771
  147. package/dist/devicesSlice/thunks.js.map +1 -1
  148. package/dist/monitorSlice/constants.cjs +165 -0
  149. package/dist/monitorSlice/constants.cjs.map +1 -0
  150. package/dist/monitorSlice/constants.js +10 -980
  151. package/dist/monitorSlice/constants.js.map +1 -1
  152. package/dist/monitorSlice/index.cjs +435 -0
  153. package/dist/monitorSlice/index.cjs.map +1 -0
  154. package/dist/monitorSlice/index.js +14 -1029
  155. package/dist/monitorSlice/index.js.map +1 -1
  156. package/dist/monitorSlice/selectors.cjs +31 -0
  157. package/dist/monitorSlice/selectors.cjs.map +1 -0
  158. package/dist/monitorSlice/selectors.js +5 -29
  159. package/dist/monitorSlice/selectors.js.map +1 -1
  160. package/dist/monitorSlice/thunks.cjs +2623 -0
  161. package/dist/monitorSlice/thunks.cjs.map +1 -0
  162. package/dist/monitorSlice/thunks.js +37 -2603
  163. package/dist/monitorSlice/thunks.js.map +1 -1
  164. package/dist/onboardingSlice/constants.cjs +71 -0
  165. package/dist/onboardingSlice/constants.cjs.map +1 -0
  166. package/dist/onboardingSlice/constants.js +6 -68
  167. package/dist/onboardingSlice/constants.js.map +1 -1
  168. package/dist/onboardingSlice/index.cjs +80 -0
  169. package/dist/onboardingSlice/index.cjs.map +1 -0
  170. package/dist/onboardingSlice/index.js +9 -88
  171. package/dist/onboardingSlice/index.js.map +1 -1
  172. package/dist/onboardingSlice/selectors.cjs +31 -0
  173. package/dist/onboardingSlice/selectors.cjs.map +1 -0
  174. package/dist/onboardingSlice/selectors.js +5 -29
  175. package/dist/onboardingSlice/selectors.js.map +1 -1
  176. package/dist/onboardingSlice/thunks.cjs +4774 -0
  177. package/dist/onboardingSlice/thunks.cjs.map +1 -0
  178. package/dist/onboardingSlice/thunks.js +42 -5731
  179. package/dist/onboardingSlice/thunks.js.map +1 -1
  180. package/dist/organizationSlice/constants.cjs +830 -0
  181. package/dist/organizationSlice/constants.cjs.map +1 -0
  182. package/dist/organizationSlice/constants.js +21 -1024
  183. package/dist/organizationSlice/constants.js.map +1 -1
  184. package/dist/organizationSlice/index.cjs +505 -0
  185. package/dist/organizationSlice/index.cjs.map +1 -0
  186. package/dist/organizationSlice/index.js +14 -1071
  187. package/dist/organizationSlice/index.js.map +1 -1
  188. package/dist/organizationSlice/selectors.cjs +300 -0
  189. package/dist/organizationSlice/selectors.cjs.map +1 -0
  190. package/dist/organizationSlice/selectors.js +23 -1026
  191. package/dist/organizationSlice/selectors.js.map +1 -1
  192. package/dist/organizationSlice/thunks.cjs +5006 -0
  193. package/dist/organizationSlice/thunks.cjs.map +1 -0
  194. package/dist/organizationSlice/thunks.js +67 -5754
  195. package/dist/organizationSlice/thunks.js.map +1 -1
  196. package/dist/releasesSlice/constants.cjs +40 -0
  197. package/dist/releasesSlice/constants.cjs.map +1 -0
  198. package/dist/releasesSlice/constants.js +8 -35
  199. package/dist/releasesSlice/constants.js.map +1 -1
  200. package/dist/releasesSlice/index.cjs +355 -0
  201. package/dist/releasesSlice/index.cjs.map +1 -0
  202. package/dist/releasesSlice/index.js +14 -1092
  203. package/dist/releasesSlice/index.js.map +1 -1
  204. package/dist/releasesSlice/selectors.cjs +290 -0
  205. package/dist/releasesSlice/selectors.cjs.map +1 -0
  206. package/dist/releasesSlice/selectors.js +18 -1022
  207. package/dist/releasesSlice/selectors.js.map +1 -1
  208. package/dist/releasesSlice/thunks.cjs +2896 -0
  209. package/dist/releasesSlice/thunks.cjs.map +1 -0
  210. package/dist/releasesSlice/thunks.js +48 -2904
  211. package/dist/releasesSlice/thunks.js.map +1 -1
  212. package/dist/selectors.cjs +1641 -0
  213. package/dist/selectors.cjs.map +1 -0
  214. package/dist/{selectors.d.mts → selectors.d.cts} +9 -9
  215. package/dist/selectors.js +117 -1627
  216. package/dist/selectors.js.map +1 -1
  217. package/dist/store.cjs +1932 -0
  218. package/dist/store.cjs.map +1 -0
  219. package/dist/store.js +24 -1933
  220. package/dist/store.js.map +1 -1
  221. package/dist/storehooks.cjs +5565 -0
  222. package/dist/storehooks.cjs.map +1 -0
  223. package/dist/storehooks.js +125 -5784
  224. package/dist/storehooks.js.map +1 -1
  225. package/dist/thunks.cjs +5675 -0
  226. package/dist/thunks.cjs.map +1 -0
  227. package/dist/{thunks.d.mts → thunks.d.cts} +8 -8
  228. package/dist/thunks.js +199 -5888
  229. package/dist/thunks.js.map +1 -1
  230. package/dist/usersSlice/constants.cjs +798 -0
  231. package/dist/usersSlice/constants.cjs.map +1 -0
  232. package/dist/usersSlice/constants.js +26 -1015
  233. package/dist/usersSlice/constants.js.map +1 -1
  234. package/dist/usersSlice/index.cjs +890 -0
  235. package/dist/usersSlice/index.cjs.map +1 -0
  236. package/dist/usersSlice/index.js +14 -1112
  237. package/dist/usersSlice/index.js.map +1 -1
  238. package/dist/usersSlice/selectors.cjs +826 -0
  239. package/dist/usersSlice/selectors.cjs.map +1 -0
  240. package/dist/usersSlice/selectors.js +23 -1047
  241. package/dist/usersSlice/selectors.js.map +1 -1
  242. package/dist/usersSlice/thunks.cjs +4732 -0
  243. package/dist/usersSlice/thunks.cjs.map +1 -0
  244. package/dist/usersSlice/thunks.js +71 -5758
  245. package/dist/usersSlice/thunks.js.map +1 -1
  246. package/dist/utils.cjs +739 -0
  247. package/dist/utils.cjs.map +1 -0
  248. package/dist/{utils.d.mts → utils.d.cts} +1 -3
  249. package/dist/utils.d.ts +1 -3
  250. package/dist/utils.js +26 -1206
  251. package/dist/utils.js.map +1 -1
  252. package/package.json +96 -7
  253. package/dist/actions.mjs +0 -21
  254. package/dist/api/general-api.mjs +0 -18
  255. package/dist/api/general-api.mjs.map +0 -1
  256. package/dist/api/users-api.mjs +0 -15
  257. package/dist/api/users-api.mjs.map +0 -1
  258. package/dist/appSlice/constants.mjs +0 -42
  259. package/dist/appSlice/constants.mjs.map +0 -1
  260. package/dist/appSlice/index.mjs +0 -21
  261. package/dist/appSlice/index.mjs.map +0 -1
  262. package/dist/appSlice/selectors.mjs +0 -20
  263. package/dist/appSlice/selectors.mjs.map +0 -1
  264. package/dist/appSlice/thunks.mjs +0 -45
  265. package/dist/appSlice/thunks.mjs.map +0 -1
  266. package/dist/auth.mjs +0 -23
  267. package/dist/auth.mjs.map +0 -1
  268. package/dist/chunk-BOSBROA3.mjs.map +0 -1
  269. package/dist/chunk-ENLZPHTQ.mjs +0 -35
  270. package/dist/chunk-L4HIW3KB.mjs +0 -36
  271. package/dist/chunk-RWYS5MKN.mjs.map +0 -1
  272. package/dist/chunk-U6YTBIDT.mjs.map +0 -1
  273. package/dist/chunk-UPMSYTWW.mjs.map +0 -1
  274. package/dist/chunk-V32GTKOS.mjs +0 -1
  275. package/dist/chunk-V32GTKOS.mjs.map +0 -1
  276. package/dist/chunk-XWBD7VOK.mjs +0 -93
  277. package/dist/chunk-XWBD7VOK.mjs.map +0 -1
  278. package/dist/chunk-ZLRZO4EY.mjs.map +0 -1
  279. package/dist/commonConstants.mjs +0 -40
  280. package/dist/commonConstants.mjs.map +0 -1
  281. package/dist/commonSelectors.mjs +0 -56
  282. package/dist/commonSelectors.mjs.map +0 -1
  283. package/dist/constants.mjs +0 -223
  284. package/dist/constants.mjs.map +0 -1
  285. package/dist/deploymentsSlice/constants.mjs +0 -42
  286. package/dist/deploymentsSlice/constants.mjs.map +0 -1
  287. package/dist/deploymentsSlice/index.mjs +0 -21
  288. package/dist/deploymentsSlice/index.mjs.map +0 -1
  289. package/dist/deploymentsSlice/selectors.mjs +0 -25
  290. package/dist/deploymentsSlice/selectors.mjs.map +0 -1
  291. package/dist/deploymentsSlice/thunks.mjs +0 -63
  292. package/dist/deploymentsSlice/thunks.mjs.map +0 -1
  293. package/dist/devicesSlice/constants.mjs +0 -40
  294. package/dist/devicesSlice/constants.mjs.map +0 -1
  295. package/dist/devicesSlice/index.mjs +0 -21
  296. package/dist/devicesSlice/index.mjs.map +0 -1
  297. package/dist/devicesSlice/selectors.mjs +0 -53
  298. package/dist/devicesSlice/selectors.mjs.map +0 -1
  299. package/dist/devicesSlice/thunks.mjs +0 -135
  300. package/dist/devicesSlice/thunks.mjs.map +0 -1
  301. package/dist/monitorSlice/constants.mjs +0 -14
  302. package/dist/monitorSlice/constants.mjs.map +0 -1
  303. package/dist/monitorSlice/index.mjs +0 -21
  304. package/dist/monitorSlice/index.mjs.map +0 -1
  305. package/dist/monitorSlice/selectors.mjs +0 -8
  306. package/dist/monitorSlice/selectors.mjs.map +0 -1
  307. package/dist/monitorSlice/thunks.mjs +0 -44
  308. package/dist/monitorSlice/thunks.mjs.map +0 -1
  309. package/dist/onboardingSlice/constants.mjs +0 -10
  310. package/dist/onboardingSlice/constants.mjs.map +0 -1
  311. package/dist/onboardingSlice/index.mjs +0 -16
  312. package/dist/onboardingSlice/index.mjs.map +0 -1
  313. package/dist/onboardingSlice/selectors.mjs +0 -8
  314. package/dist/onboardingSlice/selectors.mjs.map +0 -1
  315. package/dist/onboardingSlice/thunks.mjs +0 -51
  316. package/dist/onboardingSlice/thunks.mjs.map +0 -1
  317. package/dist/organizationSlice/constants.mjs +0 -36
  318. package/dist/organizationSlice/constants.mjs.map +0 -1
  319. package/dist/organizationSlice/index.mjs +0 -21
  320. package/dist/organizationSlice/index.mjs.map +0 -1
  321. package/dist/organizationSlice/selectors.mjs +0 -39
  322. package/dist/organizationSlice/selectors.mjs.map +0 -1
  323. package/dist/organizationSlice/thunks.mjs +0 -101
  324. package/dist/organizationSlice/thunks.mjs.map +0 -1
  325. package/dist/releasesSlice/constants.mjs +0 -14
  326. package/dist/releasesSlice/constants.mjs.map +0 -1
  327. package/dist/releasesSlice/index.mjs +0 -21
  328. package/dist/releasesSlice/index.mjs.map +0 -1
  329. package/dist/releasesSlice/selectors.mjs +0 -28
  330. package/dist/releasesSlice/selectors.mjs.map +0 -1
  331. package/dist/releasesSlice/thunks.mjs +0 -66
  332. package/dist/releasesSlice/thunks.mjs.map +0 -1
  333. package/dist/selectors.mjs +0 -209
  334. package/dist/selectors.mjs.map +0 -1
  335. package/dist/store.mjs +0 -32
  336. package/dist/store.mjs.map +0 -1
  337. package/dist/storehooks.mjs +0 -285
  338. package/dist/storehooks.mjs.map +0 -1
  339. package/dist/thunks.mjs +0 -363
  340. package/dist/thunks.mjs.map +0 -1
  341. package/dist/usersSlice/constants.mjs +0 -45
  342. package/dist/usersSlice/constants.mjs.map +0 -1
  343. package/dist/usersSlice/index.mjs +0 -21
  344. package/dist/usersSlice/index.mjs.map +0 -1
  345. package/dist/usersSlice/selectors.mjs +0 -38
  346. package/dist/usersSlice/selectors.mjs.map +0 -1
  347. package/dist/usersSlice/thunks.mjs +0 -109
  348. package/dist/usersSlice/thunks.mjs.map +0 -1
  349. package/dist/utils.mjs +0 -49
  350. package/dist/utils.mjs.map +0 -1
  351. /package/dist/{actions.d.mts → actions.d.cts} +0 -0
  352. /package/dist/api/{general-api.d.mts → general-api.d.cts} +0 -0
  353. /package/dist/api/{users-api.d.mts → users-api.d.cts} +0 -0
  354. /package/dist/appSlice/{index.d.mts → index.d.cts} +0 -0
  355. /package/dist/appSlice/{selectors.d.mts → selectors.d.cts} +0 -0
  356. /package/dist/appSlice/{thunks.d.mts → thunks.d.cts} +0 -0
  357. /package/dist/{auth.d.mts → auth.d.cts} +0 -0
  358. /package/dist/{chunk-G4FGNSV3.mjs.map → chunk-CK6YE6AN.js.map} +0 -0
  359. /package/dist/{chunk-QBKCUIWO.mjs.map → chunk-JIS4PA3R.js.map} +0 -0
  360. /package/dist/{chunk-IU4OXOPA.mjs.map → chunk-MRCFLG45.js.map} +0 -0
  361. /package/dist/{actions.mjs.map → chunk-NMAXZ3ZY.js.map} +0 -0
  362. /package/dist/{chunk-H2PQQMRY.mjs.map → chunk-YO22XLHI.js.map} +0 -0
  363. /package/dist/{commonSelectors.d.mts → commonSelectors.d.cts} +0 -0
  364. /package/dist/deploymentsSlice/{constants.d.mts → constants.d.cts} +0 -0
  365. /package/dist/deploymentsSlice/{index.d.mts → index.d.cts} +0 -0
  366. /package/dist/deploymentsSlice/{selectors.d.mts → selectors.d.cts} +0 -0
  367. /package/dist/deploymentsSlice/{thunks.d.mts → thunks.d.cts} +0 -0
  368. /package/dist/devicesSlice/{constants.d.mts → constants.d.cts} +0 -0
  369. /package/dist/devicesSlice/{index.d.mts → index.d.cts} +0 -0
  370. /package/dist/devicesSlice/{selectors.d.mts → selectors.d.cts} +0 -0
  371. /package/dist/devicesSlice/{thunks.d.mts → thunks.d.cts} +0 -0
  372. /package/dist/monitorSlice/{constants.d.mts → constants.d.cts} +0 -0
  373. /package/dist/monitorSlice/{index.d.mts → index.d.cts} +0 -0
  374. /package/dist/monitorSlice/{selectors.d.mts → selectors.d.cts} +0 -0
  375. /package/dist/monitorSlice/{thunks.d.mts → thunks.d.cts} +0 -0
  376. /package/dist/onboardingSlice/{constants.d.mts → constants.d.cts} +0 -0
  377. /package/dist/onboardingSlice/{index.d.mts → index.d.cts} +0 -0
  378. /package/dist/onboardingSlice/{selectors.d.mts → selectors.d.cts} +0 -0
  379. /package/dist/onboardingSlice/{thunks.d.mts → thunks.d.cts} +0 -0
  380. /package/dist/organizationSlice/{constants.d.mts → constants.d.cts} +0 -0
  381. /package/dist/organizationSlice/{index.d.mts → index.d.cts} +0 -0
  382. /package/dist/organizationSlice/{selectors.d.mts → selectors.d.cts} +0 -0
  383. /package/dist/organizationSlice/{thunks.d.mts → thunks.d.cts} +0 -0
  384. /package/dist/releasesSlice/{constants.d.mts → constants.d.cts} +0 -0
  385. /package/dist/releasesSlice/{index.d.mts → index.d.cts} +0 -0
  386. /package/dist/releasesSlice/{selectors.d.mts → selectors.d.cts} +0 -0
  387. /package/dist/releasesSlice/{thunks.d.mts → thunks.d.cts} +0 -0
  388. /package/dist/{store.d.mts → store.d.cts} +0 -0
  389. /package/dist/{storehooks.d.mts → storehooks.d.cts} +0 -0
  390. /package/dist/usersSlice/{constants.d.mts → constants.d.cts} +0 -0
  391. /package/dist/usersSlice/{index.d.mts → index.d.cts} +0 -0
  392. /package/dist/usersSlice/{selectors.d.mts → selectors.d.cts} +0 -0
  393. /package/dist/usersSlice/{thunks.d.mts → thunks.d.cts} +0 -0
@@ -1,23 +1,20 @@
1
- import {
2
- v4_default
3
- } from "./chunk-ZLRZO4EY.mjs";
4
1
  import {
5
2
  getDeviceMonitorConfig,
6
3
  getLatestDeviceAlerts
7
- } from "./chunk-MJW4632R.mjs";
4
+ } from "./chunk-UVQX743T.js";
8
5
  import {
9
6
  users_api_default
10
- } from "./chunk-L4HIW3KB.mjs";
7
+ } from "./chunk-JAROCU6M.js";
11
8
  import {
12
9
  general_api_default
13
- } from "./chunk-2P4VECEE.mjs";
10
+ } from "./chunk-YT73QWCN.js";
14
11
  import {
15
12
  getAttrsEndpoint,
16
13
  getOnboardingState,
17
14
  getSearchEndpoint,
18
15
  getTenantCapabilities,
19
16
  getUserCapabilities
20
- } from "./chunk-Y47SYXII.mjs";
17
+ } from "./chunk-DGD6FVWF.js";
21
18
  import {
22
19
  getCurrentSession,
23
20
  getCurrentUser,
@@ -27,17 +24,17 @@ import {
27
24
  getRolesById,
28
25
  getTooltipsState,
29
26
  getUserSettings
30
- } from "./chunk-4U4X4KAC.mjs";
27
+ } from "./chunk-KAQJH2YL.js";
31
28
  import {
32
29
  getAuditlogState,
33
30
  getDeviceTwinIntegrations,
34
31
  getOrganization,
35
32
  getTenantsList
36
- } from "./chunk-2HCZYULZ.mjs";
33
+ } from "./chunk-Q6M5TTDQ.js";
37
34
  import {
38
35
  getDeploymentsById,
39
36
  getDeploymentsByStatus
40
- } from "./chunk-BWFTQHNM.mjs";
37
+ } from "./chunk-RX55KAKX.js";
41
38
  import {
42
39
  getDeviceById,
43
40
  getDeviceFilters,
@@ -46,60 +43,58 @@ import {
46
43
  getGroups,
47
44
  getGroupsById,
48
45
  getSelectedGroup
49
- } from "./chunk-QG4PT5WK.mjs";
46
+ } from "./chunk-XXHONFSQ.js";
47
+ import {
48
+ convertDeviceListStateToFilters,
49
+ filtersFilter,
50
+ getComparisonCompatibleVersion,
51
+ mapDeviceAttributes,
52
+ mapFiltersToTerms,
53
+ mapTermsToFilters,
54
+ mergePermissions,
55
+ progress
56
+ } from "./chunk-YETZPQFR.js";
50
57
  import {
51
58
  getFeatures,
52
59
  getSearchState
53
- } from "./chunk-C2YZYTJ6.mjs";
60
+ } from "./chunk-LIJIIRON.js";
54
61
  import {
55
62
  commonErrorFallback,
56
63
  commonErrorHandler
57
- } from "./chunk-RWYS5MKN.mjs";
64
+ } from "./chunk-GZ5VQMDM.js";
58
65
  import {
59
66
  actions_default
60
- } from "./chunk-ENLZPHTQ.mjs";
67
+ } from "./chunk-V4DKKRWS.js";
61
68
  import {
62
69
  actions as actions6,
63
70
  sliceName as sliceName6
64
- } from "./chunk-EFHEROXZ.mjs";
71
+ } from "./chunk-YGBFDXXA.js";
65
72
  import {
66
73
  actions as actions5,
67
74
  sliceName as sliceName5
68
- } from "./chunk-WS3YYLTJ.mjs";
75
+ } from "./chunk-XTRPX7JZ.js";
69
76
  import {
70
77
  actions as actions4,
71
78
  sliceName as sliceName4
72
- } from "./chunk-M4U5R7A4.mjs";
79
+ } from "./chunk-FGKMJS3B.js";
73
80
  import {
74
81
  actions as actions2,
75
82
  sliceName as sliceName2
76
- } from "./chunk-EM2HUGUY.mjs";
83
+ } from "./chunk-E5LEU5PF.js";
77
84
  import {
78
85
  actions as actions3,
79
86
  sliceName as sliceName3
80
- } from "./chunk-X65NMDPS.mjs";
87
+ } from "./chunk-YTQUNAZP.js";
81
88
  import {
82
89
  actions,
83
90
  sliceName
84
- } from "./chunk-OWHFMKTA.mjs";
91
+ } from "./chunk-7PVGDMNM.js";
85
92
  import {
86
93
  cleanUp,
87
94
  getSessionInfo,
88
95
  maxSessionAge,
89
96
  setSessionInfo
90
- } from "./chunk-4C6IY46N.mjs";
91
- import {
92
- convertDeviceListStateToFilters,
93
- extractErrorMessage,
94
- filtersFilter,
95
- getComparisonCompatibleVersion,
96
- mapDeviceAttributes,
97
- mapFiltersToTerms,
98
- mapTermsToFilters,
99
- mergePermissions,
100
- preformatWithRequestID,
101
- progress
102
- } from "./chunk-U6YTBIDT.mjs";
97
+ } from "./chunk-AMGWP7A4.js";
103
98
  import {
104
99
  ALL_DEVICE_STATES,
105
100
  DEPLOYMENT_ROUTES,
@@ -138,14 +133,14 @@ import {
138
133
  uiPermissionsById,
139
134
  useradmApiUrlv1,
140
135
  useradmApiUrlv2
141
- } from "./chunk-MQIKQKSW.mjs";
136
+ } from "./chunk-A6CT6GTI.js";
142
137
  import {
143
138
  rootfsImageVersion
144
- } from "./chunk-G4FGNSV3.mjs";
139
+ } from "./chunk-CK6YE6AN.js";
145
140
  import {
146
141
  onboardingSteps,
147
142
  orderedOnboardingSteps
148
- } from "./chunk-IU4OXOPA.mjs";
143
+ } from "./chunk-MRCFLG45.js";
149
144
  import {
150
145
  APPLICATION_JSON_CONTENT_TYPE,
151
146
  APPLICATION_JWT_CONTENT_TYPE,
@@ -153,7 +148,7 @@ import {
153
148
  defaultReports,
154
149
  headerNames,
155
150
  locations
156
- } from "./chunk-BOSBROA3.mjs";
151
+ } from "./chunk-25AKG5HH.js";
157
152
  import {
158
153
  ALL_DEVICES,
159
154
  ALL_RELEASES,
@@ -166,385 +161,26 @@ import {
166
161
  UNGROUPED_GROUP,
167
162
  emptyRole,
168
163
  emptyUiPermissions
169
- } from "./chunk-OGAMVFPS.mjs";
170
- import {
171
- __async,
172
- __commonJS,
173
- __objRest,
174
- __require,
175
- __spreadProps,
176
- __spreadValues,
177
- __toESM
178
- } from "./chunk-XWBD7VOK.mjs";
179
-
180
- // ../../node_modules/pluralize/pluralize.js
181
- var require_pluralize = __commonJS({
182
- "../../node_modules/pluralize/pluralize.js"(exports, module) {
183
- "use strict";
184
- (function(root, pluralize2) {
185
- if (typeof __require === "function" && typeof exports === "object" && typeof module === "object") {
186
- module.exports = pluralize2();
187
- } else if (typeof define === "function" && define.amd) {
188
- define(function() {
189
- return pluralize2();
190
- });
191
- } else {
192
- root.pluralize = pluralize2();
193
- }
194
- })(exports, function() {
195
- var pluralRules = [];
196
- var singularRules = [];
197
- var uncountables = {};
198
- var irregularPlurals = {};
199
- var irregularSingles = {};
200
- function sanitizeRule(rule) {
201
- if (typeof rule === "string") {
202
- return new RegExp("^" + rule + "$", "i");
203
- }
204
- return rule;
205
- }
206
- function restoreCase(word, token) {
207
- if (word === token) return token;
208
- if (word === word.toLowerCase()) return token.toLowerCase();
209
- if (word === word.toUpperCase()) return token.toUpperCase();
210
- if (word[0] === word[0].toUpperCase()) {
211
- return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase();
212
- }
213
- return token.toLowerCase();
214
- }
215
- function interpolate(str, args) {
216
- return str.replace(/\$(\d{1,2})/g, function(match, index) {
217
- return args[index] || "";
218
- });
219
- }
220
- function replace(word, rule) {
221
- return word.replace(rule[0], function(match, index) {
222
- var result = interpolate(rule[1], arguments);
223
- if (match === "") {
224
- return restoreCase(word[index - 1], result);
225
- }
226
- return restoreCase(match, result);
227
- });
228
- }
229
- function sanitizeWord(token, word, rules) {
230
- if (!token.length || uncountables.hasOwnProperty(token)) {
231
- return word;
232
- }
233
- var len = rules.length;
234
- while (len--) {
235
- var rule = rules[len];
236
- if (rule[0].test(word)) return replace(word, rule);
237
- }
238
- return word;
239
- }
240
- function replaceWord(replaceMap, keepMap, rules) {
241
- return function(word) {
242
- var token = word.toLowerCase();
243
- if (keepMap.hasOwnProperty(token)) {
244
- return restoreCase(word, token);
245
- }
246
- if (replaceMap.hasOwnProperty(token)) {
247
- return restoreCase(word, replaceMap[token]);
248
- }
249
- return sanitizeWord(token, word, rules);
250
- };
251
- }
252
- function checkWord(replaceMap, keepMap, rules, bool) {
253
- return function(word) {
254
- var token = word.toLowerCase();
255
- if (keepMap.hasOwnProperty(token)) return true;
256
- if (replaceMap.hasOwnProperty(token)) return false;
257
- return sanitizeWord(token, token, rules) === token;
258
- };
259
- }
260
- function pluralize2(word, count, inclusive) {
261
- var pluralized = count === 1 ? pluralize2.singular(word) : pluralize2.plural(word);
262
- return (inclusive ? count + " " : "") + pluralized;
263
- }
264
- pluralize2.plural = replaceWord(
265
- irregularSingles,
266
- irregularPlurals,
267
- pluralRules
268
- );
269
- pluralize2.isPlural = checkWord(
270
- irregularSingles,
271
- irregularPlurals,
272
- pluralRules
273
- );
274
- pluralize2.singular = replaceWord(
275
- irregularPlurals,
276
- irregularSingles,
277
- singularRules
278
- );
279
- pluralize2.isSingular = checkWord(
280
- irregularPlurals,
281
- irregularSingles,
282
- singularRules
283
- );
284
- pluralize2.addPluralRule = function(rule, replacement) {
285
- pluralRules.push([sanitizeRule(rule), replacement]);
286
- };
287
- pluralize2.addSingularRule = function(rule, replacement) {
288
- singularRules.push([sanitizeRule(rule), replacement]);
289
- };
290
- pluralize2.addUncountableRule = function(word) {
291
- if (typeof word === "string") {
292
- uncountables[word.toLowerCase()] = true;
293
- return;
294
- }
295
- pluralize2.addPluralRule(word, "$0");
296
- pluralize2.addSingularRule(word, "$0");
297
- };
298
- pluralize2.addIrregularRule = function(single, plural) {
299
- plural = plural.toLowerCase();
300
- single = single.toLowerCase();
301
- irregularSingles[single] = plural;
302
- irregularPlurals[plural] = single;
303
- };
304
- [
305
- // Pronouns.
306
- ["I", "we"],
307
- ["me", "us"],
308
- ["he", "they"],
309
- ["she", "they"],
310
- ["them", "them"],
311
- ["myself", "ourselves"],
312
- ["yourself", "yourselves"],
313
- ["itself", "themselves"],
314
- ["herself", "themselves"],
315
- ["himself", "themselves"],
316
- ["themself", "themselves"],
317
- ["is", "are"],
318
- ["was", "were"],
319
- ["has", "have"],
320
- ["this", "these"],
321
- ["that", "those"],
322
- // Words ending in with a consonant and `o`.
323
- ["echo", "echoes"],
324
- ["dingo", "dingoes"],
325
- ["volcano", "volcanoes"],
326
- ["tornado", "tornadoes"],
327
- ["torpedo", "torpedoes"],
328
- // Ends with `us`.
329
- ["genus", "genera"],
330
- ["viscus", "viscera"],
331
- // Ends with `ma`.
332
- ["stigma", "stigmata"],
333
- ["stoma", "stomata"],
334
- ["dogma", "dogmata"],
335
- ["lemma", "lemmata"],
336
- ["schema", "schemata"],
337
- ["anathema", "anathemata"],
338
- // Other irregular rules.
339
- ["ox", "oxen"],
340
- ["axe", "axes"],
341
- ["die", "dice"],
342
- ["yes", "yeses"],
343
- ["foot", "feet"],
344
- ["eave", "eaves"],
345
- ["goose", "geese"],
346
- ["tooth", "teeth"],
347
- ["quiz", "quizzes"],
348
- ["human", "humans"],
349
- ["proof", "proofs"],
350
- ["carve", "carves"],
351
- ["valve", "valves"],
352
- ["looey", "looies"],
353
- ["thief", "thieves"],
354
- ["groove", "grooves"],
355
- ["pickaxe", "pickaxes"],
356
- ["passerby", "passersby"]
357
- ].forEach(function(rule) {
358
- return pluralize2.addIrregularRule(rule[0], rule[1]);
359
- });
360
- [
361
- [/s?$/i, "s"],
362
- [/[^\u0000-\u007F]$/i, "$0"],
363
- [/([^aeiou]ese)$/i, "$1"],
364
- [/(ax|test)is$/i, "$1es"],
365
- [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, "$1es"],
366
- [/(e[mn]u)s?$/i, "$1s"],
367
- [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, "$1"],
368
- [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1i"],
369
- [/(alumn|alg|vertebr)(?:a|ae)$/i, "$1ae"],
370
- [/(seraph|cherub)(?:im)?$/i, "$1im"],
371
- [/(her|at|gr)o$/i, "$1oes"],
372
- [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, "$1a"],
373
- [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, "$1a"],
374
- [/sis$/i, "ses"],
375
- [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, "$1$2ves"],
376
- [/([^aeiouy]|qu)y$/i, "$1ies"],
377
- [/([^ch][ieo][ln])ey$/i, "$1ies"],
378
- [/(x|ch|ss|sh|zz)$/i, "$1es"],
379
- [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, "$1ices"],
380
- [/\b((?:tit)?m|l)(?:ice|ouse)$/i, "$1ice"],
381
- [/(pe)(?:rson|ople)$/i, "$1ople"],
382
- [/(child)(?:ren)?$/i, "$1ren"],
383
- [/eaux$/i, "$0"],
384
- [/m[ae]n$/i, "men"],
385
- ["thou", "you"]
386
- ].forEach(function(rule) {
387
- return pluralize2.addPluralRule(rule[0], rule[1]);
388
- });
389
- [
390
- [/s$/i, ""],
391
- [/(ss)$/i, "$1"],
392
- [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, "$1fe"],
393
- [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, "$1f"],
394
- [/ies$/i, "y"],
395
- [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, "$1ie"],
396
- [/\b(mon|smil)ies$/i, "$1ey"],
397
- [/\b((?:tit)?m|l)ice$/i, "$1ouse"],
398
- [/(seraph|cherub)im$/i, "$1"],
399
- [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, "$1"],
400
- [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, "$1sis"],
401
- [/(movie|twelve|abuse|e[mn]u)s$/i, "$1"],
402
- [/(test)(?:is|es)$/i, "$1is"],
403
- [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1us"],
404
- [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, "$1um"],
405
- [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, "$1on"],
406
- [/(alumn|alg|vertebr)ae$/i, "$1a"],
407
- [/(cod|mur|sil|vert|ind)ices$/i, "$1ex"],
408
- [/(matr|append)ices$/i, "$1ix"],
409
- [/(pe)(rson|ople)$/i, "$1rson"],
410
- [/(child)ren$/i, "$1"],
411
- [/(eau)x?$/i, "$1"],
412
- [/men$/i, "man"]
413
- ].forEach(function(rule) {
414
- return pluralize2.addSingularRule(rule[0], rule[1]);
415
- });
416
- [
417
- // Singular words with no plurals.
418
- "adulthood",
419
- "advice",
420
- "agenda",
421
- "aid",
422
- "aircraft",
423
- "alcohol",
424
- "ammo",
425
- "analytics",
426
- "anime",
427
- "athletics",
428
- "audio",
429
- "bison",
430
- "blood",
431
- "bream",
432
- "buffalo",
433
- "butter",
434
- "carp",
435
- "cash",
436
- "chassis",
437
- "chess",
438
- "clothing",
439
- "cod",
440
- "commerce",
441
- "cooperation",
442
- "corps",
443
- "debris",
444
- "diabetes",
445
- "digestion",
446
- "elk",
447
- "energy",
448
- "equipment",
449
- "excretion",
450
- "expertise",
451
- "firmware",
452
- "flounder",
453
- "fun",
454
- "gallows",
455
- "garbage",
456
- "graffiti",
457
- "hardware",
458
- "headquarters",
459
- "health",
460
- "herpes",
461
- "highjinks",
462
- "homework",
463
- "housework",
464
- "information",
465
- "jeans",
466
- "justice",
467
- "kudos",
468
- "labour",
469
- "literature",
470
- "machinery",
471
- "mackerel",
472
- "mail",
473
- "media",
474
- "mews",
475
- "moose",
476
- "music",
477
- "mud",
478
- "manga",
479
- "news",
480
- "only",
481
- "personnel",
482
- "pike",
483
- "plankton",
484
- "pliers",
485
- "police",
486
- "pollution",
487
- "premises",
488
- "rain",
489
- "research",
490
- "rice",
491
- "salmon",
492
- "scissors",
493
- "series",
494
- "sewage",
495
- "shambles",
496
- "shrimp",
497
- "software",
498
- "species",
499
- "staff",
500
- "swine",
501
- "tennis",
502
- "traffic",
503
- "transportation",
504
- "trout",
505
- "tuna",
506
- "wealth",
507
- "welfare",
508
- "whiting",
509
- "wildebeest",
510
- "wildlife",
511
- "you",
512
- /pok[eé]mon$/i,
513
- // Regexes.
514
- /[^aeiou]ese$/i,
515
- // "chinese", "japanese"
516
- /deer$/i,
517
- // "deer", "reindeer"
518
- /fish$/i,
519
- // "fish", "blowfish", "angelfish"
520
- /measles$/i,
521
- /o[iu]s$/i,
522
- // "carnivorous"
523
- /pox$/i,
524
- // "chickpox", "smallpox"
525
- /sheep$/i
526
- ].forEach(pluralize2.addUncountableRule);
527
- return pluralize2;
528
- });
529
- }
530
- });
164
+ } from "./chunk-4B3IMP4I.js";
531
165
 
532
166
  // src/deploymentsSlice/thunks.ts
533
167
  import { deepCompare, isEmpty, standardizePhases, startTimeSort } from "@northern.tech/utils/helpers";
534
168
  import { createAsyncThunk } from "@reduxjs/toolkit";
535
- import isUUID from "validator/lib/isUUID";
169
+ import { isUUID } from "validator";
536
170
  var { receivedDevice, setSnackbar } = actions_default;
537
171
  var { page: defaultPage, perPage: defaultPerPage } = DEVICE_LIST_DEFAULTS;
538
172
  var deriveDeploymentGroup = ({ filter = {}, group, groups = [], name }) => group || groups.length === 1 && !isUUID(name) ? groups[0] : filter.name;
539
173
  var transformDeployments = (deployments, deploymentsById) => deployments.sort(startTimeSort).reduce(
540
174
  (accu, item) => {
541
- var _a, _b;
542
- const filter = (_a = item.filter) != null ? _a : {};
543
- let deployment = __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, deploymentPrototype), deploymentsById[item.id]), item), {
544
- filter: item.filter ? __spreadProps(__spreadValues({}, filter), { name: (_b = filter.name) != null ? _b : filter.id, filters: mapTermsToFilters(filter.terms) }) : void 0,
175
+ const filter = item.filter ?? {};
176
+ let deployment = {
177
+ ...deploymentPrototype,
178
+ ...deploymentsById[item.id],
179
+ ...item,
180
+ filter: item.filter ? { ...filter, name: filter.name ?? filter.id, filters: mapTermsToFilters(filter.terms) } : void 0,
545
181
  name: decodeURIComponent(item.name)
546
- });
547
- deployment = __spreadProps(__spreadValues({}, deployment), { group: deriveDeploymentGroup(deployment) });
182
+ };
183
+ deployment = { ...deployment, group: deriveDeploymentGroup(deployment) };
548
184
  accu.deployments[item.id] = deployment;
549
185
  accu.deploymentIds.push(item.id);
550
186
  return accu;
@@ -598,11 +234,12 @@ var createDeployment = createAsyncThunk(`${sliceName2}/createDeployment`, ({ new
598
234
  return request.catch((err) => commonErrorHandler(err, "Error creating deployment.", dispatch)).then((data) => {
599
235
  const lastslashindex = data.headers.location.lastIndexOf("/");
600
236
  const deploymentId = data.headers.location.substring(lastslashindex + 1);
601
- const deployment = __spreadProps(__spreadValues({}, newDeployment), {
237
+ const deployment = {
238
+ ...newDeployment,
602
239
  id: deploymentId,
603
240
  devices: newDeployment.devices ? newDeployment.devices.map((id) => ({ id, status: "pending" })) : [],
604
241
  statistics: { status: {} }
605
- });
242
+ };
606
243
  let tasks = [
607
244
  dispatch(actions2.createdDeployment(deployment)),
608
245
  dispatch(getSingleDeployment(deploymentId)),
@@ -745,14 +382,23 @@ var updateDeploymentControlMap = createAsyncThunk(
745
382
  ({ deploymentId, updateControlMap }, { dispatch }) => general_api_default.patch(`${deploymentsApiUrl}/deployments/${deploymentId}`, { update_control_map: updateControlMap }).catch((err) => commonErrorHandler(err, "There was an error while updating the deployment status:", dispatch)).then(() => Promise.resolve(dispatch(getSingleDeployment(deploymentId))))
746
383
  );
747
384
  var setDeploymentsState = createAsyncThunk(`${sliceName2}/setDeploymentsState`, (selection, { dispatch, getState }) => {
748
- const _a = selection, { page, perPage } = _a, selectionState = __objRest(_a, ["page", "perPage"]);
385
+ const { page, perPage, ...selectionState } = selection;
749
386
  const currentState = getState().deployments.selectionState;
750
- let nextState = __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, currentState), selectionState), Object.keys(DEPLOYMENT_STATES).reduce((accu, item) => {
751
- accu[item] = __spreadValues(__spreadValues({}, currentState[item]), selectionState[item]);
752
- return accu;
753
- }, {})), {
754
- general: __spreadValues(__spreadValues({}, currentState.general), selectionState.general)
755
- });
387
+ let nextState = {
388
+ ...currentState,
389
+ ...selectionState,
390
+ ...Object.keys(DEPLOYMENT_STATES).reduce((accu, item) => {
391
+ accu[item] = {
392
+ ...currentState[item],
393
+ ...selectionState[item]
394
+ };
395
+ return accu;
396
+ }, {}),
397
+ general: {
398
+ ...currentState.general,
399
+ ...selectionState.general
400
+ }
401
+ };
756
402
  let tasks = [dispatch(actions2.setDeploymentsState(nextState))];
757
403
  if (nextState.selectedId && currentState.selectedId !== nextState.selectedId) {
758
404
  tasks.push(dispatch(getSingleDeployment(nextState.selectedId)));
@@ -782,15 +428,20 @@ var getDeploymentsConfig = createAsyncThunk(
782
428
  const { binary_delta = {}, binary_delta_limits = {} } = delta;
783
429
  const { xdelta_args = {}, timeout: timeoutConfig = oldConfig.binaryDelta.timeout } = binary_delta;
784
430
  const { xdelta_args_limits = {}, timeout: timeoutLimit = oldConfig.binaryDeltaLimits.timeout } = binary_delta_limits;
785
- const config = __spreadProps(__spreadValues({}, oldConfig), {
431
+ const config = {
432
+ ...oldConfig,
786
433
  hasDelta: Boolean(delta.enabled),
787
- binaryDelta: __spreadValues(__spreadProps(__spreadValues({}, oldConfig.binaryDelta), {
788
- timeout: timeoutConfig
789
- }), mapExternalDeltaConfig(xdelta_args)),
790
- binaryDeltaLimits: __spreadValues(__spreadProps(__spreadValues({}, oldConfig.binaryDeltaLimits), {
791
- timeout: timeoutLimit
792
- }), mapExternalDeltaConfig(xdelta_args_limits))
793
- });
434
+ binaryDelta: {
435
+ ...oldConfig.binaryDelta,
436
+ timeout: timeoutConfig,
437
+ ...mapExternalDeltaConfig(xdelta_args)
438
+ },
439
+ binaryDeltaLimits: {
440
+ ...oldConfig.binaryDeltaLimits,
441
+ timeout: timeoutLimit,
442
+ ...mapExternalDeltaConfig(xdelta_args_limits)
443
+ }
444
+ };
794
445
  return Promise.resolve(dispatch(actions2.setDeploymentsConfig(config)));
795
446
  })
796
447
  );
@@ -800,7 +451,7 @@ var deepClean = (source) => Object.entries(source).reduce((accu, [key, value]) =
800
451
  if (cleanedValue === void 0 || typeof cleanedValue === "object" && isEmpty(cleanedValue)) {
801
452
  return accu;
802
453
  }
803
- accu = __spreadProps(__spreadValues({}, accu != null ? accu : {}), { [key]: cleanedValue });
454
+ accu = { ...accu ?? {}, [key]: cleanedValue };
804
455
  }
805
456
  return accu;
806
457
  }, void 0);
@@ -820,20 +471,25 @@ var saveDeltaDeploymentsConfig = createAsyncThunk(`${sliceName2}/saveDeltaDeploy
820
471
  }
821
472
  return general_api_default.put(`${deploymentsApiUrl}/config/binary_delta`, result).catch((err) => commonErrorHandler(err, "There was a problem storing your delta artifact generation configuration.", dispatch)).then(() => {
822
473
  const oldConfig = getState().deployments.config;
823
- const newConfig = __spreadProps(__spreadValues({}, oldConfig), {
824
- binaryDelta: __spreadValues(__spreadValues({}, oldConfig.binaryDelta), config)
825
- });
474
+ const newConfig = {
475
+ ...oldConfig,
476
+ binaryDelta: {
477
+ ...oldConfig.binaryDelta,
478
+ ...config
479
+ }
480
+ };
826
481
  return Promise.all([dispatch(actions2.setDeploymentsConfig(newConfig)), dispatch(setSnackbar("Settings saved successfully"))]);
827
482
  });
828
483
  });
829
484
 
830
485
  // src/devicesSlice/thunks.tsx
831
- import React from "react";
832
486
  import { Link } from "react-router-dom";
833
- var import_pluralize = __toESM(require_pluralize());
834
- import { attributeDuplicateFilter, deepCompare as deepCompare2, getSnackbarMessage } from "@northern.tech/utils/helpers";
487
+ import { attributeDuplicateFilter, deepCompare as deepCompare2, extractErrorMessage, getSnackbarMessage } from "@northern.tech/utils/helpers";
835
488
  import { createAsyncThunk as createAsyncThunk2 } from "@reduxjs/toolkit";
836
489
  import { isCancel } from "axios";
490
+ import pluralize from "pluralize";
491
+ import { v4 as uuid } from "uuid";
492
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
837
493
  var { cleanUpUpload, initUpload, setSnackbar: setSnackbar2, uploadProgress } = actions_default;
838
494
  var { page: defaultPage2, perPage: defaultPerPage2 } = DEVICE_LIST_DEFAULTS;
839
495
  var defaultAttributes = [
@@ -855,14 +511,13 @@ var getGroups2 = createAsyncThunk2(
855
511
  (_, { dispatch, getState }) => general_api_default.get(`${inventoryApiUrl}/groups`).then((res) => {
856
512
  const state = getGroupsById(getState());
857
513
  const dynamicGroups = Object.entries(state).reduce((accu, [id, group]) => {
858
- var _a;
859
- if (group.id || ((_a = group.filters) == null ? void 0 : _a.length) && id !== UNGROUPED_GROUP.id) {
514
+ if (group.id || group.filters?.length && id !== UNGROUPED_GROUP.id) {
860
515
  accu[id] = group;
861
516
  }
862
517
  return accu;
863
518
  }, {});
864
519
  const groups = res.data.reduce((accu, group) => {
865
- accu[group] = __spreadValues({ deviceIds: [], filters: [], total: 0 }, state[group]);
520
+ accu[group] = { deviceIds: [], filters: [], total: 0, ...state[group] };
866
521
  return accu;
867
522
  }, dynamicGroups);
868
523
  const filters = [{ key: "group", value: res.data, operator: DEVICE_FILTERING_OPTIONS.$nin.key, scope: "system" }];
@@ -896,7 +551,7 @@ var removeDevicesFromGroup = createAsyncThunk2(
896
551
  ({ group, deviceIds }, { dispatch }) => general_api_default.delete(`${inventoryApiUrl}/groups/${group}/devices`, deviceIds).then(
897
552
  () => Promise.all([
898
553
  dispatch(actions3.removeFromGroup({ group, deviceIds })),
899
- dispatch(setSnackbar2(`The ${(0, import_pluralize.default)("devices", deviceIds.length)} ${(0, import_pluralize.default)("were", deviceIds.length)} removed from the group`, TIMEOUTS.fiveSeconds))
554
+ dispatch(setSnackbar2(`The ${pluralize("devices", deviceIds.length)} ${pluralize("were", deviceIds.length)} removed from the group`, TIMEOUTS.fiveSeconds))
900
555
  ])
901
556
  )
902
557
  );
@@ -906,7 +561,12 @@ var getGroupNotification = (newGroup, selectedGroup) => {
906
561
  return [successMessage, TIMEOUTS.fiveSeconds];
907
562
  }
908
563
  return [
909
- /* @__PURE__ */ React.createElement(React.Fragment, null, successMessage, " - ", /* @__PURE__ */ React.createElement(Link, { to: `/devices?inventory=group:eq:${newGroup}` }, "click here"), " to see it."),
564
+ /* @__PURE__ */ jsxs(Fragment, { children: [
565
+ successMessage,
566
+ " - ",
567
+ /* @__PURE__ */ jsx(Link, { to: `/devices?inventory=group:eq:${newGroup}`, children: "click here" }),
568
+ " to see it."
569
+ ] }),
910
570
  5e3,
911
571
  void 0,
912
572
  void 0,
@@ -920,7 +580,7 @@ var addStaticGroup = createAsyncThunk2(
920
580
  () => Promise.resolve(
921
581
  dispatch(
922
582
  actions3.addGroup({
923
- group: __spreadValues({ deviceIds: [], total: 0, filters: [] }, getState().devices.groups.byId[group]),
583
+ group: { deviceIds: [], total: 0, filters: [], ...getState().devices.groups.byId[group] },
924
584
  groupName: group
925
585
  })
926
586
  )
@@ -948,20 +608,19 @@ var getDynamicGroups = createAsyncThunk2(
948
608
  (_, { dispatch, getState }) => general_api_default.get(`${inventoryApiUrlV2}/filters?per_page=${MAX_PAGE_SIZE}`).then(({ data: filters }) => {
949
609
  const state = getGroupsById(getState());
950
610
  const staticGroups = Object.entries(state).reduce((accu, [id, group]) => {
951
- var _a;
952
- if (!(group.id || ((_a = group.filters) == null ? void 0 : _a.length))) {
611
+ if (!(group.id || group.filters?.length)) {
953
612
  accu[id] = group;
954
613
  }
955
614
  return accu;
956
615
  }, {});
957
616
  const groups = (filters || []).reduce((accu, filter) => {
958
- accu[filter.name] = __spreadProps(__spreadValues({
617
+ accu[filter.name] = {
959
618
  deviceIds: [],
960
- total: 0
961
- }, state[filter.name]), {
619
+ total: 0,
620
+ ...state[filter.name],
962
621
  id: filter.id,
963
622
  filters: mapTermsToFilters(filter.terms)
964
- });
623
+ };
965
624
  return accu;
966
625
  }, staticGroups);
967
626
  return Promise.resolve(dispatch(actions3.receivedGroups(groups)));
@@ -1001,10 +660,9 @@ var removeDynamicGroup = createAsyncThunk2(`${sliceName3}/removeDynamicGroup`, (
1001
660
  );
1002
661
  });
1003
662
  var getGroupFilters = (group, groupsState, filters = []) => {
1004
- var _a;
1005
663
  const groupName = group === UNGROUPED_GROUP.id || group === UNGROUPED_GROUP.name ? UNGROUPED_GROUP.id : group;
1006
664
  const selectedGroup = groupsState.byId[groupName];
1007
- const groupFilterLength = ((_a = selectedGroup == null ? void 0 : selectedGroup.filters) == null ? void 0 : _a.length) || 0;
665
+ const groupFilterLength = selectedGroup?.filters?.length || 0;
1008
666
  const cleanedFilters = groupFilterLength ? [...filters, ...selectedGroup.filters].filter(filtersFilter) : filters;
1009
667
  return { cleanedFilters, groupName, selectedGroup, groupFilterLength };
1010
668
  };
@@ -1027,7 +685,6 @@ var selectGroup = createAsyncThunk2(`${sliceName3}/selectGroup`, ({ group, filte
1027
685
  var getEarliestTs = (dateA = "", dateB = "") => !dateA || !dateB ? dateA || dateB : dateA < dateB ? dateA : dateB;
1028
686
  var reduceReceivedDevices = (devices, ids, state, status) => devices.reduce(
1029
687
  (accu, device) => {
1030
- var _a, _b, _c;
1031
688
  const stateDevice = getDeviceById(state, device.id);
1032
689
  const {
1033
690
  attributes: storedAttributes = {},
@@ -1037,29 +694,29 @@ var reduceReceivedDevices = (devices, ids, state, status) => devices.reduce(
1037
694
  group: storedGroup
1038
695
  } = stateDevice;
1039
696
  const { identity, inventory, monitor, system = {}, tags } = mapDeviceAttributes(device.attributes);
1040
- device.tags = __spreadValues(__spreadValues({}, storedTags), tags);
1041
- device.group = (_a = system.group) != null ? _a : storedGroup;
1042
- device.monitor = __spreadValues(__spreadValues({}, storedMonitor), monitor);
1043
- device.identity_data = __spreadValues(__spreadValues(__spreadValues({}, storedIdentity), identity), device.identity_data ? device.identity_data : {});
697
+ device.tags = { ...storedTags, ...tags };
698
+ device.group = system.group ?? storedGroup;
699
+ device.monitor = { ...storedMonitor, ...monitor };
700
+ device.identity_data = { ...storedIdentity, ...identity, ...device.identity_data ? device.identity_data : {} };
1044
701
  device.status = status ? status : device.status || identity.status;
1045
- device.check_in_time_rounded = (_b = system.check_in_time) != null ? _b : stateDevice.check_in_time_rounded;
1046
- device.check_in_time_exact = (_c = device.check_in_time) != null ? _c : stateDevice.check_in_time_exact;
702
+ device.check_in_time_rounded = system.check_in_time ?? stateDevice.check_in_time_rounded;
703
+ device.check_in_time_exact = device.check_in_time ?? stateDevice.check_in_time_exact;
1047
704
  device.created_ts = getEarliestTs(getEarliestTs(system.created_ts, device.created_ts), stateDevice.created_ts);
1048
705
  device.updated_ts = device.attributes ? device.updated_ts : stateDevice.updated_ts;
1049
706
  device.isNew = new Date(device.created_ts) > new Date(state.app.newThreshold);
1050
707
  device.isOffline = new Date(device.check_in_time_rounded) < new Date(state.app.offlineThreshold) || device.check_in_time_rounded === void 0;
1051
- device.attributes = device.attributes ? __spreadValues(__spreadValues({}, storedAttributes), inventory) : storedAttributes;
1052
- accu.devicesById[device.id] = __spreadValues(__spreadValues({}, stateDevice), device);
708
+ device.attributes = device.attributes ? { ...storedAttributes, ...inventory } : storedAttributes;
709
+ accu.devicesById[device.id] = { ...stateDevice, ...device };
1053
710
  accu.ids.push(device.id);
1054
711
  return accu;
1055
712
  },
1056
713
  { ids, devicesById: {} }
1057
714
  );
1058
715
  var getGroupDevices = createAsyncThunk2(`${sliceName3}/getGroupDevices`, (options, { dispatch, getState }) => {
1059
- const _a = options, { group, shouldIncludeAllStates } = _a, remainder = __objRest(_a, ["group", "shouldIncludeAllStates"]);
716
+ const { group, shouldIncludeAllStates, ...remainder } = options;
1060
717
  const { cleanedFilters: filterSelection } = getGroupFilters(group, getState().devices.groups);
1061
718
  return Promise.resolve(
1062
- dispatch(getDevicesByStatus(__spreadProps(__spreadValues({}, remainder), { filterSelection, group, status: shouldIncludeAllStates ? void 0 : DEVICE_STATES.accepted })))
719
+ dispatch(getDevicesByStatus({ ...remainder, filterSelection, group, status: shouldIncludeAllStates ? void 0 : DEVICE_STATES.accepted }))
1063
720
  ).unwrap().then((results) => {
1064
721
  if (!group) {
1065
722
  return Promise.resolve();
@@ -1073,7 +730,7 @@ var getGroupDevices = createAsyncThunk2(`${sliceName3}/getGroupDevices`, (option
1073
730
  dispatch(
1074
731
  actions3.addGroup({
1075
732
  group: {
1076
- deviceIds: deviceAccu.ids.length === total || deviceAccu.ids.length > (stateGroup == null ? void 0 : stateGroup.deviceIds) ? deviceAccu.ids : stateGroup.deviceIds,
733
+ deviceIds: deviceAccu.ids.length === total || deviceAccu.ids.length > stateGroup?.deviceIds ? deviceAccu.ids : stateGroup.deviceIds,
1077
734
  total
1078
735
  },
1079
736
  groupName: group
@@ -1222,27 +879,26 @@ var getDeviceLimit = createAsyncThunk2(
1222
879
  );
1223
880
  var setDeviceListState = createAsyncThunk2(
1224
881
  `${sliceName3}/setDeviceListState`,
1225
- (_a, { dispatch, getState }) => {
1226
- var _b = _a, { shouldSelectDevices = true, forceRefresh, fetchAuth = true } = _b, selectionState = __objRest(_b, ["shouldSelectDevices", "forceRefresh", "fetchAuth"]);
1227
- var _c;
882
+ ({ shouldSelectDevices = true, forceRefresh, fetchAuth = true, ...selectionState }, { dispatch, getState }) => {
1228
883
  const currentState = getDeviceListState(getState());
1229
884
  const refreshTrigger = forceRefresh ? !currentState.refreshTrigger : selectionState.refreshTrigger;
1230
- let nextState = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, currentState), {
885
+ let nextState = {
886
+ ...currentState,
1231
887
  setOnly: false,
1232
- refreshTrigger
1233
- }), selectionState), {
1234
- sort: __spreadValues(__spreadValues({}, currentState.sort), selectionState.sort)
1235
- });
888
+ refreshTrigger,
889
+ ...selectionState,
890
+ sort: { ...currentState.sort, ...selectionState.sort }
891
+ };
1236
892
  let tasks = [];
1237
- const _a2 = currentState, { isLoading: currentLoading, deviceIds: currentDevices, selection: currentSelection } = _a2, currentRequestState = __objRest(_a2, ["isLoading", "deviceIds", "selection"]);
1238
- const _b2 = nextState, { isLoading: nextLoading, deviceIds: nextDevices, selection: nextSelection } = _b2, nextRequestState = __objRest(_b2, ["isLoading", "deviceIds", "selection"]);
893
+ const { isLoading: currentLoading, deviceIds: currentDevices, selection: currentSelection, ...currentRequestState } = currentState;
894
+ const { isLoading: nextLoading, deviceIds: nextDevices, selection: nextSelection, ...nextRequestState } = nextState;
1239
895
  if (!nextState.setOnly && !deepCompare2(currentRequestState, nextRequestState)) {
1240
- const { direction: sortDown = SORTING_OPTIONS.desc, key: sortCol, scope: sortScope } = (_c = nextState.sort) != null ? _c : {};
896
+ const { direction: sortDown = SORTING_OPTIONS.desc, key: sortCol, scope: sortScope } = nextState.sort ?? {};
1241
897
  const sortBy = sortCol ? [{ attribute: sortCol, order: sortDown, scope: sortScope }] : void 0;
1242
898
  const applicableSelectedState = nextState.state === ALL_DEVICE_STATES ? void 0 : nextState.state;
1243
899
  nextState.isLoading = true;
1244
900
  tasks.push(
1245
- dispatch(getDevicesByStatus(__spreadProps(__spreadValues({}, nextState), { status: applicableSelectedState, sortOptions: sortBy, fetchAuth }))).unwrap().then((results) => {
901
+ dispatch(getDevicesByStatus({ ...nextState, status: applicableSelectedState, sortOptions: sortBy, fetchAuth })).unwrap().then((results) => {
1246
902
  const { deviceAccu, total } = results[results.length - 1];
1247
903
  const devicesState = shouldSelectDevices ? { deviceIds: deviceAccu.ids, total, isLoading: false } : { isLoading: false };
1248
904
  return Promise.resolve(dispatch(actions3.setDeviceListState(devicesState)));
@@ -1267,8 +923,8 @@ var getDevicesByStatus = createAsyncThunk2(`${sliceName3}/getDevicesByStatus`, (
1267
923
  } = options;
1268
924
  const state = getState();
1269
925
  const { applicableFilters, filterTerms } = convertDeviceListStateToFilters({
1270
- filters: filterSelection != null ? filterSelection : getDeviceFilters(state),
1271
- group: group != null ? group : getSelectedGroup(state),
926
+ filters: filterSelection ?? getDeviceFilters(state),
927
+ group: group ?? getSelectedGroup(state),
1272
928
  groups: state.devices.groups,
1273
929
  offlineThreshold: state.app.offlineThreshold,
1274
930
  selectedIssues,
@@ -1329,7 +985,7 @@ var getAllDevicesByStatus = createAsyncThunk2(`${sliceName3}/getAllDevicesByStat
1329
985
  });
1330
986
  var searchDevices = createAsyncThunk2(`${sliceName3}/searchDevices`, (passedOptions = {}, { dispatch, getState }) => {
1331
987
  const state = getState();
1332
- let options = __spreadValues(__spreadValues({}, state.app.searchState), passedOptions);
988
+ let options = { ...state.app.searchState, ...passedOptions };
1333
989
  const { page = defaultPage2, searchTerm, sortOptions = [] } = options;
1334
990
  const { columnSelection = [] } = getUserSettings(state);
1335
991
  const selectedAttributes = columnSelection.map((column) => ({ attribute: column.key, scope: column.scope }));
@@ -1464,8 +1120,7 @@ var getSessionDetails = createAsyncThunk2(`${sliceName3}/getSessionDetails`, ({
1464
1120
  ({ data: auditLogEntries }) => {
1465
1121
  const { start, end } = auditLogEntries.reduce(
1466
1122
  (accu, item) => {
1467
- var _a, _b;
1468
- if ((_b = (_a = item.meta) == null ? void 0 : _a.session_id) == null ? void 0 : _b.includes(sessionId)) {
1123
+ if (item.meta?.session_id?.includes(sessionId)) {
1469
1124
  accu.start = new Date(item.action.startsWith("open") ? item.time : accu.start);
1470
1125
  accu.end = new Date(item.action.startsWith("close") ? item.time : accu.end);
1471
1126
  }
@@ -1485,7 +1140,7 @@ var deviceFileUpload = createAsyncThunk2(`${sliceName3}/deviceFileUpload`, ({ de
1485
1140
  let formData = new FormData();
1486
1141
  formData.append("path", path);
1487
1142
  formData.append("file", file);
1488
- const uploadId = v4_default();
1143
+ const uploadId = uuid();
1489
1144
  const cancelSource = new AbortController();
1490
1145
  return Promise.all([
1491
1146
  dispatch(setSnackbar2("Uploading file")),
@@ -1572,8 +1227,7 @@ var decommissionDevice = createAsyncThunk2(
1572
1227
  var getDeviceConfig = createAsyncThunk2(
1573
1228
  `${sliceName3}/getDeviceConfig`,
1574
1229
  (deviceId, { dispatch }) => general_api_default.get(`${deviceConfig}/${deviceId}`).then(({ data }) => Promise.all([dispatch(actions3.receivedDevice({ id: deviceId, config: data })), Promise.resolve(data)])).catch((err) => {
1575
- var _a, _b;
1576
- if (((_b = (_a = err.response) == null ? void 0 : _a.data) == null ? void 0 : _b.error.status_code) !== 404) {
1230
+ if (err.response?.data?.error.status_code !== 404) {
1577
1231
  return commonErrorHandler(err, `There was an error retrieving the configuration for device ${deviceId}.`, dispatch, commonErrorFallback);
1578
1232
  }
1579
1233
  })
@@ -1585,15 +1239,14 @@ var setDeviceConfig = createAsyncThunk2(
1585
1239
  var applyDeviceConfig = createAsyncThunk2(
1586
1240
  `${sliceName3}/applyDeviceConfig`,
1587
1241
  ({ deviceId, configDeploymentConfiguration, isDefault, config }, { dispatch, getState }) => general_api_default.post(`${deviceConfig}/${deviceId}/deploy`, configDeploymentConfiguration).catch((err) => commonErrorHandler(err, `There was an error deploying the configuration to device ${deviceId}.`, dispatch, commonErrorFallback)).then(({ data }) => {
1588
- var _a;
1589
1242
  const device = getDeviceById(getState(), deviceId);
1590
1243
  const { canManageUsers } = getUserCapabilities(getState());
1591
1244
  let tasks = [
1592
- dispatch(actions3.receivedDevice(__spreadProps(__spreadValues({}, device), { config: __spreadProps(__spreadValues({}, device.config), { deployment_id: data.deployment_id }) }))),
1245
+ dispatch(actions3.receivedDevice({ ...device, config: { ...device.config, deployment_id: data.deployment_id } })),
1593
1246
  new Promise((resolve) => setTimeout(() => resolve(dispatch(getSingleDeployment(data.deployment_id))), TIMEOUTS.oneSecond))
1594
1247
  ];
1595
1248
  if (isDefault && canManageUsers) {
1596
- const { previous } = (_a = getGlobalSettings(getState()).defaultDeviceConfig) != null ? _a : {};
1249
+ const { previous } = getGlobalSettings(getState()).defaultDeviceConfig ?? {};
1597
1250
  tasks.push(dispatch(saveGlobalSettings({ defaultDeviceConfig: { current: config, previous } })));
1598
1251
  }
1599
1252
  return Promise.all(tasks);
@@ -1609,21 +1262,21 @@ var setDeviceTags = createAsyncThunk2(
1609
1262
  `${inventoryApiUrl}/devices/${deviceId}/tags`,
1610
1263
  Object.entries(tags).map(([name, value]) => ({ name, value })),
1611
1264
  { headers }
1612
- ).catch((err) => commonErrorHandler(err, `There was an error setting tags for device ${deviceId}.`, dispatch, "Please check your connection.")).then(() => Promise.all([dispatch(actions3.receivedDevice(__spreadProps(__spreadValues({}, device), { id: deviceId, tags }))), dispatch(setSnackbar2("Device name changed"))]));
1265
+ ).catch((err) => commonErrorHandler(err, `There was an error setting tags for device ${deviceId}.`, dispatch, "Please check your connection.")).then(() => Promise.all([dispatch(actions3.receivedDevice({ ...device, id: deviceId, tags })), dispatch(setSnackbar2("Device name changed"))]));
1613
1266
  })
1614
1267
  )
1615
1268
  );
1616
1269
  var getDeviceTwin = createAsyncThunk2(`${sliceName3}/getDeviceTwin`, ({ deviceId, integration }, { dispatch, getState }) => {
1617
1270
  let providerResult = {};
1618
1271
  return general_api_default.get(`${iotManagerBaseURL}/devices/${deviceId}/state`).then(({ data }) => {
1619
- providerResult = __spreadProps(__spreadValues({}, data), { twinError: "" });
1272
+ providerResult = { ...data, twinError: "" };
1620
1273
  }).catch((err) => {
1621
1274
  providerResult = {
1622
1275
  twinError: `There was an error getting the ${EXTERNAL_PROVIDER[integration.provider].twinTitle.toLowerCase()} for device ${deviceId}. ${err}`
1623
1276
  };
1624
1277
  }).finally(() => {
1625
1278
  const device = getDeviceById(getState(), deviceId);
1626
- Promise.resolve(dispatch(actions3.receivedDevice(__spreadProps(__spreadValues({}, device), { twinsByIntegration: __spreadValues(__spreadValues({}, device.twinsByIntegration), providerResult) }))));
1279
+ Promise.resolve(dispatch(actions3.receivedDevice({ ...device, twinsByIntegration: { ...device.twinsByIntegration, ...providerResult } })));
1627
1280
  });
1628
1281
  });
1629
1282
  var setDeviceTwin = createAsyncThunk2(
@@ -1639,7 +1292,7 @@ var setDeviceTwin = createAsyncThunk2(
1639
1292
  const { twinsByIntegration = {} } = device;
1640
1293
  const { [integration.id]: currentState = {} } = twinsByIntegration;
1641
1294
  return Promise.resolve(
1642
- dispatch(actions3.receivedDevice(__spreadProps(__spreadValues({}, device), { twinsByIntegration: __spreadProps(__spreadValues({}, twinsByIntegration), { [integration.id]: __spreadProps(__spreadValues({}, currentState), { desired: settings }) }) })))
1295
+ dispatch(actions3.receivedDevice({ ...device, twinsByIntegration: { ...twinsByIntegration, [integration.id]: { ...currentState, desired: settings } } }))
1643
1296
  );
1644
1297
  })
1645
1298
  );
@@ -1660,8 +1313,8 @@ var getSystemDevices = createAsyncThunk2(`${sliceName3}/getSystemDevices`, (opti
1660
1313
  const { attributes: deviceAttributes = {} } = getDeviceById(state, id);
1661
1314
  const { mender_gateway_system_id = "" } = deviceAttributes;
1662
1315
  const filters = [
1663
- __spreadProps(__spreadValues({}, emptyFilter), { key: "mender_is_gateway", operator: DEVICE_FILTERING_OPTIONS.$ne.key, value: "true", scope: "inventory" }),
1664
- __spreadProps(__spreadValues({}, emptyFilter), { key: "mender_gateway_system_id", value: mender_gateway_system_id, scope: "inventory" })
1316
+ { ...emptyFilter, key: "mender_is_gateway", operator: DEVICE_FILTERING_OPTIONS.$ne.key, value: "true", scope: "inventory" },
1317
+ { ...emptyFilter, key: "mender_gateway_system_id", value: mender_gateway_system_id, scope: "inventory" }
1665
1318
  ];
1666
1319
  const { attributes, filterTerms } = prepareSearchArguments({ filters, state });
1667
1320
  return general_api_default.post(getSearchEndpoint(getState()), {
@@ -1673,11 +1326,12 @@ var getSystemDevices = createAsyncThunk2(`${sliceName3}/getSystemDevices`, (opti
1673
1326
  }).catch((err) => commonErrorHandler(err, `There was an error getting system devices device ${id}.`, dispatch, "Please check your connection.")).then(({ data, headers }) => {
1674
1327
  const state2 = getState();
1675
1328
  const { devicesById, ids } = reduceReceivedDevices(data, [], state2);
1676
- const device = __spreadProps(__spreadValues({}, getDeviceById(state2, id)), {
1329
+ const device = {
1330
+ ...getDeviceById(state2, id),
1677
1331
  systemDeviceIds: ids,
1678
1332
  systemDeviceTotal: Number(headers[headerNames.total])
1679
- });
1680
- return Promise.resolve(dispatch(actions3.receivedDevices(__spreadProps(__spreadValues({}, devicesById), { [id]: device }))));
1333
+ };
1334
+ return Promise.resolve(dispatch(actions3.receivedDevices({ ...devicesById, [id]: device })));
1681
1335
  });
1682
1336
  });
1683
1337
  var getGatewayDevices = createAsyncThunk2(`${sliceName3}/getGatewayDevices`, (deviceId, { dispatch, getState }) => {
@@ -1685,9 +1339,9 @@ var getGatewayDevices = createAsyncThunk2(`${sliceName3}/getGatewayDevices`, (de
1685
1339
  const { attributes = {} } = getDeviceById(state, deviceId);
1686
1340
  const { mender_gateway_system_id = "" } = attributes;
1687
1341
  const filters = [
1688
- __spreadProps(__spreadValues({}, emptyFilter), { key: "id", operator: DEVICE_FILTERING_OPTIONS.$ne.key, value: deviceId, scope: "identity" }),
1689
- __spreadProps(__spreadValues({}, emptyFilter), { key: "mender_is_gateway", value: "true", scope: "inventory" }),
1690
- __spreadProps(__spreadValues({}, emptyFilter), { key: "mender_gateway_system_id", value: mender_gateway_system_id, scope: "inventory" })
1342
+ { ...emptyFilter, key: "id", operator: DEVICE_FILTERING_OPTIONS.$ne.key, value: deviceId, scope: "identity" },
1343
+ { ...emptyFilter, key: "mender_is_gateway", value: "true", scope: "inventory" },
1344
+ { ...emptyFilter, key: "mender_gateway_system_id", value: mender_gateway_system_id, scope: "inventory" }
1691
1345
  ];
1692
1346
  const { attributes: attributeSelection, filterTerms } = prepareSearchArguments({ filters, state });
1693
1347
  return general_api_default.post(getSearchEndpoint(getState()), {
@@ -1749,21 +1403,21 @@ var determineProgress = (acceptedDevices, pendingDevices, releases, pastDeployme
1749
1403
  return steps[progress2];
1750
1404
  };
1751
1405
  var deductOnboardingState = ({ devicesById, devicesByStatus, onboardingState, pastDeployments, releases, userCapabilities, userId }) => {
1752
- var _a;
1753
1406
  const { canDeploy, canManageDevices, canReadDeployments, canReadDevices, canReadReleases, canUploadReleases } = userCapabilities;
1754
1407
  const userCookie = cookies.get(`${userId}-onboarded`);
1755
1408
  const acceptedDevices = devicesByStatus[DEVICE_STATES.accepted].deviceIds;
1756
1409
  const pendingDevices = devicesByStatus[DEVICE_STATES.pending].deviceIds;
1757
- let deviceType = (_a = onboardingState.deviceType) != null ? _a : [];
1410
+ let deviceType = onboardingState.deviceType ?? [];
1758
1411
  deviceType = !deviceType.length && acceptedDevices.length && devicesById[acceptedDevices[0]].hasOwnProperty("attributes") ? devicesById[acceptedDevices[0]].attributes.device_type : deviceType;
1759
1412
  const progress2 = applyOnboardingFallbacks(onboardingState.progress || determineProgress(acceptedDevices, pendingDevices, releases, pastDeployments));
1760
- return __spreadProps(__spreadValues({}, onboardingState), {
1413
+ return {
1414
+ ...onboardingState,
1761
1415
  complete: !!(Boolean(userCookie) || onboardingState.complete || acceptedDevices.length > 1 && pendingDevices.length > 0 && releases.length > 1 && pastDeployments.length > 1 || acceptedDevices.length >= 1 && releases.length >= 2 && pastDeployments.length > 2 || acceptedDevices.length >= 1 && pendingDevices.length > 0 && releases.length >= 2 && pastDeployments.length >= 2 || orderedOnboardingSteps.findIndex((step) => step === progress2) >= orderedOnboardingSteps.length - 1 || onboardingState.disable || ![canDeploy, canManageDevices, canReadDeployments, canReadDevices, canReadReleases, canUploadReleases].every((i) => i)),
1762
1416
  showTips: onboardingState.showTips != null ? onboardingState.showTips : true,
1763
1417
  deviceType,
1764
1418
  approach: onboardingState.approach || (deviceType.some((type) => type.startsWith("qemu")) ? "virtual" : "physical"),
1765
1419
  progress: progress2
1766
- });
1420
+ };
1767
1421
  };
1768
1422
  var getOnboardingState2 = createAsyncThunk3(`${sliceName4}/getOnboardingState`, (_, { dispatch, getState }) => {
1769
1423
  const state = getState();
@@ -1821,7 +1475,7 @@ var advanceOnboarding = createAsyncThunk3(`${sliceName4}/advanceOnboarding`, (st
1821
1475
  return;
1822
1476
  }
1823
1477
  const madeProgress = steps[stepIndex + 1];
1824
- const state = __spreadProps(__spreadValues({}, getOnboardingState(getState())), { progress: madeProgress });
1478
+ const state = { ...getOnboardingState(getState()), progress: madeProgress };
1825
1479
  state.complete = stepIndex + 1 >= steps.findIndex((step) => step === onboardingSteps.DEPLOYMENTS_PAST_COMPLETED_FAILURE) ? true : state.complete;
1826
1480
  return Promise.all([dispatch(actions4.setOnboardingProgress(madeProgress)), dispatch(saveUserSettings({ onboarding: state }))]);
1827
1481
  });
@@ -1904,8 +1558,8 @@ var completeUpgrade = createAsyncThunk4(
1904
1558
  ({ tenantId, plan }, { dispatch }) => general_api_default.post(`${tenantadmApiUrlv2}/tenants/${tenantId}/upgrade/complete`, { plan }).catch((err) => commonErrorHandler(err, `There was an error upgrading your account:`, dispatch)).then(() => Promise.resolve(dispatch(getUserOrganization())))
1905
1559
  );
1906
1560
  var prepareAuditlogQuery = ({ startDate, endDate, user: userFilter, type, detail: detailFilter, sort = {} }) => {
1907
- const userId = (userFilter == null ? void 0 : userFilter.id) || userFilter;
1908
- const detail = (detailFilter == null ? void 0 : detailFilter.id) || detailFilter;
1561
+ const userId = userFilter?.id || userFilter;
1562
+ const detail = detailFilter?.id || detailFilter;
1909
1563
  const createdAfter = startDate ? `&created_after=${Math.round(Date.parse(startDate) / 1e3)}` : "";
1910
1564
  const createdBefore = endDate ? `&created_before=${Math.round(Date.parse(endDate) / 1e3)}` : "";
1911
1565
  const typeSearch = type ? `&object_type=${type.value}`.toLowerCase() : "";
@@ -1932,12 +1586,14 @@ var getAuditLogsCsvLink = createAsyncThunk4(
1932
1586
  );
1933
1587
  var setAuditlogsState = createAsyncThunk4(`${sliceName5}/setAuditlogsState`, (selectionState, { dispatch, getState }) => {
1934
1588
  const currentState = getAuditlogState(getState());
1935
- let nextState = __spreadProps(__spreadValues(__spreadValues({}, currentState), selectionState), {
1936
- sort: __spreadValues(__spreadValues({}, currentState.sort), selectionState.sort)
1937
- });
1589
+ let nextState = {
1590
+ ...currentState,
1591
+ ...selectionState,
1592
+ sort: { ...currentState.sort, ...selectionState.sort }
1593
+ };
1938
1594
  let tasks = [];
1939
- const _a = currentState, { isLoading: currentLoading, selectedIssue: currentIssue } = _a, currentRequestState = __objRest(_a, ["isLoading", "selectedIssue"]);
1940
- const _b = nextState, { isLoading: selectionLoading, selectedIssue: selectionIssue } = _b, selectionRequestState = __objRest(_b, ["isLoading", "selectedIssue"]);
1595
+ const { isLoading: currentLoading, selectedIssue: currentIssue, ...currentRequestState } = currentState;
1596
+ const { isLoading: selectionLoading, selectedIssue: selectionIssue, ...selectionRequestState } = nextState;
1941
1597
  if (!deepCompare3(currentRequestState, selectionRequestState)) {
1942
1598
  nextState.isLoading = true;
1943
1599
  tasks.push(dispatch(getAuditLogs(nextState)).finally(() => dispatch(actions5.setAuditLogState({ isLoading: false }))));
@@ -1949,27 +1605,30 @@ var tenantDataDivergedMessage = "The system detected there is a change in your p
1949
1605
  var addTenant = createAsyncThunk4(`${sliceName5}/createTenant`, (selectionState, { dispatch }) => {
1950
1606
  return general_api_default.post(`${tenantadmApiUrlv2}/tenants`, selectionState).then(() => Promise.all([dispatch(getTenants()), dispatch(setSnackbar3("Tenant was created successfully."))])).catch((err) => commonErrorHandler(err, "There was an error creating tenant", dispatch, commonErrorFallback));
1951
1607
  });
1952
- var tenantListRetrieval = (config) => __async(void 0, null, function* () {
1608
+ var tenantListRetrieval = async (config) => {
1953
1609
  const { page, perPage } = config;
1954
1610
  const params = new URLSearchParams({ page, per_page: perPage }).toString();
1955
- const tenantList = yield general_api_default.get(`${tenantadmApiUrlv2}/tenants?${params}`);
1611
+ const tenantList = await general_api_default.get(`${tenantadmApiUrlv2}/tenants?${params}`);
1956
1612
  const totalCount = tenantList.headers[headerNames.total] || TENANT_LIST_DEFAULT.perPage;
1957
1613
  return [tenantList.data, Number(totalCount)];
1958
- });
1959
- var getTenants = createAsyncThunk4(`${sliceName5}/getTenants`, (_0, _1) => __async(void 0, [_0, _1], function* (_, { dispatch, getState }) {
1614
+ };
1615
+ var getTenants = createAsyncThunk4(`${sliceName5}/getTenants`, async (_, { dispatch, getState }) => {
1960
1616
  const currentState = getTenantsList(getState());
1961
- const [tenants, pageCount] = yield tenantListRetrieval(currentState);
1962
- dispatch(actions5.setTenantListState(__spreadProps(__spreadValues({}, currentState), { total: pageCount, tenants })));
1963
- }));
1964
- var setTenantsListState = createAsyncThunk4(`${sliceName5}/setTenantsListState`, (_0, _1) => __async(void 0, [_0, _1], function* (selectionState, { dispatch, getState }) {
1617
+ const [tenants, pageCount] = await tenantListRetrieval(currentState);
1618
+ dispatch(actions5.setTenantListState({ ...currentState, total: pageCount, tenants }));
1619
+ });
1620
+ var setTenantsListState = createAsyncThunk4(`${sliceName5}/setTenantsListState`, async (selectionState, { dispatch, getState }) => {
1965
1621
  const currentState = getTenantsList(getState());
1966
- const nextState = __spreadValues(__spreadValues({}, currentState), selectionState);
1622
+ const nextState = {
1623
+ ...currentState,
1624
+ ...selectionState
1625
+ };
1967
1626
  if (!deepCompare3(currentState, selectionState)) {
1968
- const [tenants, pageCount] = yield tenantListRetrieval(nextState);
1969
- return dispatch(actions5.setTenantListState(__spreadProps(__spreadValues({}, nextState), { tenants, total: pageCount })));
1627
+ const [tenants, pageCount] = await tenantListRetrieval(nextState);
1628
+ return dispatch(actions5.setTenantListState({ ...nextState, tenants, total: pageCount }));
1970
1629
  }
1971
- return dispatch(actions5.setTenantListState(__spreadValues({}, nextState)));
1972
- }));
1630
+ return dispatch(actions5.setTenantListState({ ...nextState }));
1631
+ });
1973
1632
  var editTenantDeviceLimit = createAsyncThunk4(`${sliceName5}/editDeviceLimit`, ({ newLimit, id, name }, { dispatch }) => {
1974
1633
  return general_api_default.put(`${tenantadmApiUrlv2}/tenants/${id}/child`, { device_limit: newLimit, name }).catch((err) => commonErrorHandler(err, `Device Limit cannot be changed`, dispatch)).then(() => {
1975
1634
  const tasks = [Promise.resolve(dispatch(setSnackbar3("Device Limit was changed successfully")))];
@@ -2012,10 +1671,7 @@ var downloadLicenseReport = createAsyncThunk4(
2012
1671
  );
2013
1672
  var createIntegration = createAsyncThunk4(
2014
1673
  `${sliceName5}/createIntegration`,
2015
- (_a, { dispatch }) => {
2016
- var _b = _a, { id } = _b, integration = __objRest(_b, ["id"]);
2017
- return general_api_default.post(`${iotManagerBaseURL}/integrations`, integration).catch((err) => commonErrorHandler(err, "There was an error creating the integration", dispatch, commonErrorFallback)).then(() => Promise.all([dispatch(setSnackbar3("The integration was set up successfully")), dispatch(getIntegrations())]));
2018
- }
1674
+ ({ id, ...integration }, { dispatch }) => general_api_default.post(`${iotManagerBaseURL}/integrations`, integration).catch((err) => commonErrorHandler(err, "There was an error creating the integration", dispatch, commonErrorFallback)).then(() => Promise.all([dispatch(setSnackbar3("The integration was set up successfully")), dispatch(getIntegrations())]))
2019
1675
  );
2020
1676
  var changeIntegration = createAsyncThunk4(
2021
1677
  `${sliceName5}/changeIntegration`,
@@ -2036,9 +1692,8 @@ var getIntegrations = createAsyncThunk4(
2036
1692
  (_, { dispatch, getState }) => general_api_default.get(`${iotManagerBaseURL}/integrations`).catch((err) => commonErrorHandler(err, "There was an error retrieving the integration", dispatch, commonErrorFallback)).then(({ data }) => {
2037
1693
  const existingIntegrations = getState().organization.externalDeviceIntegrations;
2038
1694
  const integrations = data.reduce((accu, item) => {
2039
- var _a;
2040
- const existingIntegration = (_a = existingIntegrations.find((integration2) => item.id === integration2.id)) != null ? _a : {};
2041
- const integration = __spreadValues(__spreadValues({}, existingIntegration), item);
1695
+ const existingIntegration = existingIntegrations.find((integration2) => item.id === integration2.id) ?? {};
1696
+ const integration = { ...existingIntegration, ...item };
2042
1697
  accu.push(integration);
2043
1698
  return accu;
2044
1699
  }, []);
@@ -2090,7 +1745,7 @@ var getSsoConfigById = createAsyncThunk4(
2090
1745
  `${sliceName5}/getSsoConfigById`,
2091
1746
  (config, { dispatch }) => general_api_default.get(`${ssoIdpApiUrlv1}/${config.id}`).catch((err) => dispatch(ssoConfigActionErrorHandler(err, "read"))).then(({ data, headers }) => {
2092
1747
  const sso = Object.values(SSO_TYPES).find(({ contentType }) => contentType === headers["content-type"]);
2093
- return sso ? Promise.resolve(__spreadProps(__spreadValues({}, config), { config: data, type: sso.id })) : Promise.reject("Unsupported SSO config content type.");
1748
+ return sso ? Promise.resolve({ ...config, config: data, type: sso.id }) : Promise.reject("Unsupported SSO config content type.");
2094
1749
  })
2095
1750
  );
2096
1751
  var getSsoConfigs = createAsyncThunk4(
@@ -2101,7 +1756,7 @@ var getSsoConfigs = createAsyncThunk4(
2101
1756
  );
2102
1757
 
2103
1758
  // src/usersSlice/thunks.ts
2104
- import { duplicateFilter, isEmpty as isEmpty2 } from "@northern.tech/utils/helpers";
1759
+ import { duplicateFilter, extractErrorMessage as extractErrorMessage2, isEmpty as isEmpty2, preformatWithRequestID } from "@northern.tech/utils/helpers";
2105
1760
  import { clearAllRetryTimers } from "@northern.tech/utils/retrytimer";
2106
1761
  import { createAsyncThunk as createAsyncThunk5 } from "@reduxjs/toolkit";
2107
1762
  import hashString2 from "md5";
@@ -2109,7 +1764,7 @@ import Cookies3 from "universal-cookie";
2109
1764
  var cookies3 = new Cookies3();
2110
1765
  var { setAnnouncement: setAnnouncement2, setSnackbar: setSnackbar4 } = actions_default;
2111
1766
  var handleLoginError = (err, { token2fa: has2FA, password }, rejectWithValue) => (dispatch) => {
2112
- const errorText = extractErrorMessage(err);
1767
+ const errorText = extractErrorMessage2(err);
2113
1768
  const is2FABackend = errorText.includes("2fa");
2114
1769
  if (is2FABackend && !has2FA) {
2115
1770
  return rejectWithValue({ error: "2fa code missing" });
@@ -2123,43 +1778,40 @@ var handleLoginError = (err, { token2fa: has2FA, password }, rejectWithValue) =>
2123
1778
  };
2124
1779
  var loginUser = createAsyncThunk5(
2125
1780
  `${sliceName6}/loginUser`,
2126
- (_a, { dispatch, rejectWithValue }) => {
2127
- var _b = _a, { stayLoggedIn } = _b, userData = __objRest(_b, ["stayLoggedIn"]);
2128
- return users_api_default.postLogin(`${useradmApiUrlv1}/auth/login`, __spreadProps(__spreadValues({}, userData), { no_expiry: stayLoggedIn })).catch((err) => {
2129
- cleanUp();
2130
- return Promise.reject(dispatch(handleLoginError(err, userData, rejectWithValue)));
2131
- }).then(({ text: response, contentType }) => {
2132
- if (contentType.includes(APPLICATION_JSON_CONTENT_TYPE)) {
2133
- const { id, kind } = response;
2134
- const type = kind.split("/")[1];
2135
- const ssoLoginUrl = SSO_TYPES[type].getStartUrl(id);
2136
- window.location.replace(ssoLoginUrl);
2137
- return;
2138
- }
2139
- const token = response;
2140
- if (contentType !== APPLICATION_JWT_CONTENT_TYPE || !token) {
2141
- return;
2142
- }
2143
- let now = /* @__PURE__ */ new Date();
2144
- now.setSeconds(now.getSeconds() + maxSessionAge);
2145
- const expiresAt = stayLoggedIn ? void 0 : now.toISOString();
2146
- setSessionInfo({ token, expiresAt });
2147
- cookies3.remove("JWT", { path: "/" });
2148
- return (
2149
- // @ts-ignore
2150
- Promise.resolve(dispatch(getUser(OWN_USER_ID))).unwrap().catch((e) => {
2151
- cleanUp();
2152
- return Promise.reject(dispatch(setSnackbar4(extractErrorMessage(e))));
2153
- }).then(() => {
2154
- window.sessionStorage.removeItem("pendings-redirect");
2155
- if (window.location.pathname !== "/ui/") {
2156
- window.location.replace("/ui/");
2157
- }
2158
- return Promise.resolve(dispatch(actions6.successfullyLoggedIn({ expiresAt, token })));
2159
- })
2160
- );
2161
- });
2162
- }
1781
+ ({ stayLoggedIn, ...userData }, { dispatch, rejectWithValue }) => users_api_default.postLogin(`${useradmApiUrlv1}/auth/login`, { ...userData, no_expiry: stayLoggedIn }).catch((err) => {
1782
+ cleanUp();
1783
+ return Promise.reject(dispatch(handleLoginError(err, userData, rejectWithValue)));
1784
+ }).then(({ text: response, contentType }) => {
1785
+ if (contentType.includes(APPLICATION_JSON_CONTENT_TYPE)) {
1786
+ const { id, kind } = response;
1787
+ const type = kind.split("/")[1];
1788
+ const ssoLoginUrl = SSO_TYPES[type].getStartUrl(id);
1789
+ window.location.replace(ssoLoginUrl);
1790
+ return;
1791
+ }
1792
+ const token = response;
1793
+ if (contentType !== APPLICATION_JWT_CONTENT_TYPE || !token) {
1794
+ return;
1795
+ }
1796
+ let now = /* @__PURE__ */ new Date();
1797
+ now.setSeconds(now.getSeconds() + maxSessionAge);
1798
+ const expiresAt = stayLoggedIn ? void 0 : now.toISOString();
1799
+ setSessionInfo({ token, expiresAt });
1800
+ cookies3.remove("JWT", { path: "/" });
1801
+ return (
1802
+ // @ts-ignore
1803
+ Promise.resolve(dispatch(getUser(OWN_USER_ID))).unwrap().catch((e) => {
1804
+ cleanUp();
1805
+ return Promise.reject(dispatch(setSnackbar4(extractErrorMessage2(e))));
1806
+ }).then(() => {
1807
+ window.sessionStorage.removeItem("pendings-redirect");
1808
+ if (window.location.pathname !== "/ui/") {
1809
+ window.location.replace("/ui/");
1810
+ }
1811
+ return Promise.resolve(dispatch(actions6.successfullyLoggedIn({ expiresAt, token })));
1812
+ })
1813
+ );
1814
+ })
2163
1815
  );
2164
1816
  var logoutUser = createAsyncThunk5(`${sliceName6}/logoutUser`, (_, { dispatch, getState }) => {
2165
1817
  if (Object.keys(getState().app.uploadsById).length) {
@@ -2176,7 +1828,7 @@ var switchUserOrganization = createAsyncThunk5(`${sliceName6}/switchUserOrganiza
2176
1828
  return Promise.reject();
2177
1829
  }
2178
1830
  return general_api_default.get(`${useradmApiUrlv1}/users/tenants/${tenantId}/token`).then(({ data: token }) => {
2179
- setSessionInfo(__spreadProps(__spreadValues({}, getSessionInfo()), { token }));
1831
+ setSessionInfo({ ...getSessionInfo(), token });
2180
1832
  window.location.reload();
2181
1833
  });
2182
1834
  });
@@ -2239,13 +1891,13 @@ var getUser = createAsyncThunk5(
2239
1891
  );
2240
1892
  var initializeSelf = createAsyncThunk5(`${sliceName6}/initializeSelf`, (_, { dispatch }) => dispatch(getUser(OWN_USER_ID)));
2241
1893
  var updateUserColumnSettings = createAsyncThunk5(`${sliceName6}/updateUserColumnSettings`, ({ columns, currentUserId }, { dispatch, getState }) => {
2242
- const userId = currentUserId != null ? currentUserId : getCurrentUser(getState()).id;
1894
+ const userId = currentUserId ?? getCurrentUser(getState()).id;
2243
1895
  const storageKey = `${userId}-column-widths`;
2244
1896
  let customColumns = [];
2245
1897
  if (!columns) {
2246
1898
  try {
2247
1899
  customColumns = JSON.parse(window.localStorage.getItem(storageKey)) || customColumns;
2248
- } catch (e) {
1900
+ } catch {
2249
1901
  }
2250
1902
  } else {
2251
1903
  customColumns = columns;
@@ -2274,10 +1926,7 @@ var userActions = {
2274
1926
  var userActionErrorHandler = (err, type, dispatch) => commonErrorHandler(err, `There was an error ${userActions[type].errorMessage} the user.`, dispatch);
2275
1927
  var createUser = createAsyncThunk5(
2276
1928
  `${sliceName6}/createUser`,
2277
- (_a, { dispatch }) => {
2278
- var _b = _a, { shouldResetPassword } = _b, userData = __objRest(_b, ["shouldResetPassword"]);
2279
- return general_api_default.post(`${useradmApiUrlv1}/users`, __spreadProps(__spreadValues({}, userData), { send_reset_password: shouldResetPassword })).then(() => Promise.all([dispatch(actions6.createdUser(userData)), dispatch(getUserList()), dispatch(setSnackbar4(userActions.create.successMessage))])).catch((err) => userActionErrorHandler(err, "create", dispatch));
2280
- }
1929
+ ({ shouldResetPassword, ...userData }, { dispatch }) => general_api_default.post(`${useradmApiUrlv1}/users`, { ...userData, send_reset_password: shouldResetPassword }).then(() => Promise.all([dispatch(actions6.createdUser(userData)), dispatch(getUserList()), dispatch(setSnackbar4(userActions.create.successMessage))])).catch((err) => userActionErrorHandler(err, "create", dispatch))
2281
1930
  );
2282
1931
  var removeUser = createAsyncThunk5(
2283
1932
  `${sliceName6}/removeUser`,
@@ -2288,15 +1937,12 @@ var removeUser = createAsyncThunk5(
2288
1937
  );
2289
1938
  var editUser = createAsyncThunk5(
2290
1939
  `${sliceName6}/editUser`,
2291
- (_a, { dispatch, getState }) => {
2292
- var _b = _a, { id } = _b, userData = __objRest(_b, ["id"]);
2293
- return general_api_default.put(`${useradmApiUrlv1}/users/${id}`, userData).then(
2294
- () => Promise.all([
2295
- dispatch(actions6.updatedUser(__spreadProps(__spreadValues({}, userData), { id: id === OWN_USER_ID ? getCurrentUser(getState()).id : id }))),
2296
- dispatch(setSnackbar4(userActions.edit.successMessage))
2297
- ])
2298
- );
2299
- }
1940
+ ({ id, ...userData }, { dispatch, getState }) => general_api_default.put(`${useradmApiUrlv1}/users/${id}`, userData).then(
1941
+ () => Promise.all([
1942
+ dispatch(actions6.updatedUser({ ...userData, id: id === OWN_USER_ID ? getCurrentUser(getState()).id : id })),
1943
+ dispatch(setSnackbar4(userActions.edit.successMessage))
1944
+ ])
1945
+ )
2300
1946
  );
2301
1947
  var addUserToCurrentTenant = createAsyncThunk5(`${sliceName6}/addUserToTenant`, (userId, { dispatch, getState }) => {
2302
1948
  const { id } = getOrganization(getState());
@@ -2331,7 +1977,7 @@ var mapHttpPermission = (permission) => Object.entries(uiPermissionsByArea).redu
2331
1977
  }
2332
1978
  return accu;
2333
1979
  },
2334
- __spreadValues({}, emptyUiPermissions)
1980
+ { ...emptyUiPermissions }
2335
1981
  );
2336
1982
  var permissionActionTypes = {
2337
1983
  any: mapHttpPermission,
@@ -2354,20 +2000,21 @@ var combinePermissions = (existingPermissions, additionalPermissions = {}) => Ob
2354
2000
  }, existingPermissions);
2355
2001
  var tryParseCustomPermission = (permission) => {
2356
2002
  const uiPermissions = permissionActionTypes[permission.action](permission.object);
2357
- const result = mergePermissions(__spreadValues({}, emptyUiPermissions), uiPermissions);
2003
+ const result = mergePermissions({ ...emptyUiPermissions }, uiPermissions);
2358
2004
  return { isCustom: true, permission, result };
2359
2005
  };
2360
2006
  var customPermissionHandler = (accu, permission) => {
2361
2007
  let processor = tryParseCustomPermission(permission);
2362
- return __spreadProps(__spreadValues({}, accu), {
2008
+ return {
2009
+ ...accu,
2363
2010
  isCustom: accu.isCustom || processor.isCustom,
2364
2011
  uiPermissions: mergePermissions(accu.uiPermissions, processor.result)
2365
- });
2012
+ };
2366
2013
  };
2367
2014
  var mapPermissionSet = (permissionSetName, names, scope, existingGroupsPermissions = {}) => {
2368
2015
  const permission = Object.values(uiPermissionsById).find((permission2) => permission2.permissionSets[scope] === permissionSetName).value;
2369
2016
  const scopedPermissions = names.reduce((accu, name) => combinePermissions(accu, { [name]: [permission] }), existingGroupsPermissions);
2370
- return Object.entries(scopedPermissions).reduce((accu, [key, permissions]) => __spreadProps(__spreadValues({}, accu), { [key]: deriveImpliedAreaPermissions(scope, permissions) }), {});
2017
+ return Object.entries(scopedPermissions).reduce((accu, [key, permissions]) => ({ ...accu, [key]: deriveImpliedAreaPermissions(scope, permissions) }), {});
2371
2018
  };
2372
2019
  var isEmptyPermissionSet = (permissionSet) => !Object.values(permissionSet).reduce((accu, permissions) => {
2373
2020
  if (Array.isArray(permissions)) {
@@ -2382,60 +2029,59 @@ var parseRolePermissions = ({ permission_sets_with_scope = [], permissions = []
2382
2029
  if (!processor) {
2383
2030
  return accu;
2384
2031
  }
2385
- const scope = Object.keys(scopedPermissionAreas).find((scope2) => {
2386
- var _a;
2387
- return uiPermissionsByArea[scope2].scope === ((_a = permissionSet.scope) == null ? void 0 : _a.type);
2388
- });
2032
+ const scope = Object.keys(scopedPermissionAreas).find((scope2) => uiPermissionsByArea[scope2].scope === permissionSet.scope?.type);
2389
2033
  if (scope) {
2390
2034
  const result = mapPermissionSet(permissionSet.name, permissionSet.scope.value, scope, accu.uiPermissions[scope]);
2391
- return __spreadProps(__spreadValues({}, accu), { uiPermissions: __spreadProps(__spreadValues({}, accu.uiPermissions), { [scope]: result }) });
2035
+ return { ...accu, uiPermissions: { ...accu.uiPermissions, [scope]: result } };
2392
2036
  } else if (isEmptyPermissionSet(processor.result)) {
2393
2037
  return processor.permissions.reduce(customPermissionHandler, accu);
2394
2038
  }
2395
- return __spreadProps(__spreadValues({}, accu), {
2039
+ return {
2040
+ ...accu,
2396
2041
  isCustom: accu.isCustom || processor.isCustom,
2397
2042
  uiPermissions: mergePermissions(accu.uiPermissions, processor.result)
2398
- });
2043
+ };
2399
2044
  },
2400
- { isCustom: false, uiPermissions: __spreadProps(__spreadValues({}, emptyUiPermissions), { groups: {}, releases: {} }) }
2045
+ { isCustom: false, uiPermissions: { ...emptyUiPermissions, groups: {}, releases: {} } }
2401
2046
  );
2402
2047
  return permissions.reduce(customPermissionHandler, preliminaryResult);
2403
2048
  };
2404
2049
  var normalizeRbacRoles = (roles, rolesById2, permissionSets) => roles.reduce(
2405
2050
  (accu, role) => {
2406
- var _a;
2407
2051
  let normalizedPermissions;
2408
2052
  let isCustom = false;
2409
2053
  if (rolesById2[role.name]) {
2410
- normalizedPermissions = __spreadProps(__spreadValues({}, rolesById2[role.name].uiPermissions), {
2411
- groups: __spreadValues({}, rolesById2[role.name].uiPermissions.groups),
2412
- releases: __spreadValues({}, rolesById2[role.name].uiPermissions.releases)
2413
- });
2054
+ normalizedPermissions = {
2055
+ ...rolesById2[role.name].uiPermissions,
2056
+ groups: { ...rolesById2[role.name].uiPermissions.groups },
2057
+ releases: { ...rolesById2[role.name].uiPermissions.releases }
2058
+ };
2414
2059
  } else {
2415
2060
  const result = parseRolePermissions(role, permissionSets);
2416
2061
  normalizedPermissions = result.uiPermissions;
2417
2062
  isCustom = result.isCustom;
2418
2063
  }
2419
- const roleState = (_a = accu[role.name]) != null ? _a : __spreadValues({}, emptyRole);
2420
- accu[role.name] = __spreadProps(__spreadValues(__spreadValues({}, roleState), role), {
2064
+ const roleState = accu[role.name] ?? { ...emptyRole };
2065
+ accu[role.name] = {
2066
+ ...roleState,
2067
+ ...role,
2421
2068
  description: roleState.description ? roleState.description : role.description,
2422
2069
  editable: !rolesById[role.name] && !isCustom && (typeof roleState.editable !== "undefined" ? roleState.editable : true),
2423
2070
  isCustom,
2424
2071
  name: roleState.name ? roleState.name : role.name,
2425
2072
  uiPermissions: normalizedPermissions
2426
- });
2073
+ };
2427
2074
  return accu;
2428
2075
  },
2429
- __spreadValues({}, rolesById2)
2076
+ { ...rolesById2 }
2430
2077
  );
2431
2078
  var getPermissionSets = createAsyncThunk5(
2432
2079
  `${sliceName6}/getPermissionSets`,
2433
2080
  (_, { dispatch, getState }) => general_api_default.get(`${useradmApiUrlv2}/permission_sets?per_page=500`).then(({ data }) => {
2434
2081
  const permissionSets = data.reduce(
2435
2082
  (accu, permissionSet) => {
2436
- var _a, _b;
2437
- const permissionSetState = (_a = accu[permissionSet.name]) != null ? _a : {};
2438
- let permissionSetObject = __spreadValues(__spreadValues({}, permissionSetState), permissionSet);
2083
+ const permissionSetState = accu[permissionSet.name] ?? {};
2084
+ let permissionSetObject = { ...permissionSetState, ...permissionSet };
2439
2085
  permissionSetObject.result = Object.values(uiPermissionsById).reduce(
2440
2086
  (accu2, item) => Object.entries(item.permissionSets).reduce((collector, [area, permissionSet2]) => {
2441
2087
  if (scopedPermissionAreas[area]) {
@@ -2446,11 +2092,10 @@ var getPermissionSets = createAsyncThunk5(
2446
2092
  }
2447
2093
  return collector;
2448
2094
  }, accu2),
2449
- __spreadValues(__spreadValues({}, emptyUiPermissions), (_b = permissionSetObject.result) != null ? _b : {})
2095
+ { ...emptyUiPermissions, ...permissionSetObject.result ?? {} }
2450
2096
  );
2451
2097
  const scopes = Object.values(scopedPermissionAreas).reduce((accu2, { key, scopeType }) => {
2452
- var _a2, _b2;
2453
- if (((_a2 = permissionSetObject.supported_scope_types) == null ? void 0 : _a2.includes(key)) || ((_b2 = permissionSetObject.supported_scope_types) == null ? void 0 : _b2.includes(scopeType))) {
2098
+ if (permissionSetObject.supported_scope_types?.includes(key) || permissionSetObject.supported_scope_types?.includes(scopeType)) {
2454
2099
  accu2.push(key);
2455
2100
  }
2456
2101
  return accu2;
@@ -2463,7 +2108,7 @@ var getPermissionSets = createAsyncThunk5(
2463
2108
  return accu;
2464
2109
  },
2465
2110
  // @ts-ignore
2466
- __spreadValues({}, getState().users.permissionSetsById)
2111
+ { ...getState().users.permissionSetsById }
2467
2112
  );
2468
2113
  return Promise.all([dispatch(actions6.receivedPermissionSets(permissionSets)), permissionSets]);
2469
2114
  }).catch(() => console.log("Permission set retrieval failed - likely accessing a non-RBAC backend"))
@@ -2496,28 +2141,27 @@ var transformAreaRoleDataToScopedPermissionsSets = (area, areaPermissions, exces
2496
2141
  const skipPermissions = scopedPermissionAreas.releases.key === area && item !== ALL_RELEASES ? [uiPermissionsById.upload.value] : [];
2497
2142
  const impliedPermissions = deriveImpliedAreaPermissions(area, uiPermissions, skipPermissions);
2498
2143
  accu = impliedPermissions.reduce((itemPermissionAccu, impliedPermission) => {
2499
- var _a;
2500
- const permissionSetState = (_a = itemPermissionAccu[uiPermissionsById[impliedPermission].permissionSets[area]]) != null ? _a : {
2144
+ const permissionSetState = itemPermissionAccu[uiPermissionsById[impliedPermission].permissionSets[area]] ?? {
2501
2145
  type: uiPermissionsByArea[area].scope,
2502
2146
  value: []
2503
2147
  };
2504
- itemPermissionAccu[uiPermissionsById[impliedPermission].permissionSets[area]] = __spreadProps(__spreadValues({}, permissionSetState), {
2148
+ itemPermissionAccu[uiPermissionsById[impliedPermission].permissionSets[area]] = {
2149
+ ...permissionSetState,
2505
2150
  value: [...permissionSetState.value, item]
2506
- });
2151
+ };
2507
2152
  return itemPermissionAccu;
2508
2153
  }, accu);
2509
2154
  return accu;
2510
2155
  }, {});
2511
- return Object.entries(permissionSetObject).map((_a) => {
2512
- var [name, _b] = _a, _c = _b, { value } = _c, scope = __objRest(_c, ["value"]);
2156
+ return Object.entries(permissionSetObject).map(([name, { value, ...scope }]) => {
2513
2157
  if (value.includes(excessiveAccessSelector)) {
2514
2158
  return { name };
2515
2159
  }
2516
- return { name, scope: __spreadProps(__spreadValues({}, scope), { value: value.filter(duplicateFilter) }) };
2160
+ return { name, scope: { ...scope, value: value.filter(duplicateFilter) } };
2517
2161
  });
2518
2162
  };
2519
2163
  var transformRoleDataToRole = (roleData, roleState = {}) => {
2520
- const role = __spreadValues(__spreadValues({}, roleState), roleData);
2164
+ const role = { ...roleState, ...roleData };
2521
2165
  const { description = "", name, uiPermissions = emptyUiPermissions } = role;
2522
2166
  const { maybeUiPermissions, remainderKeys } = Object.entries(emptyUiPermissions).reduce(
2523
2167
  (accu, [key, emptyPermissions]) => {
@@ -2553,12 +2197,17 @@ var transformRoleDataToRole = (roleData, roleState = {}) => {
2553
2197
  }, []);
2554
2198
  return {
2555
2199
  permissionSetsWithScope: [...permissionSetsWithScope, ...scopedPermissionSets],
2556
- role: __spreadProps(__spreadValues({}, emptyRole), {
2200
+ role: {
2201
+ ...emptyRole,
2557
2202
  name,
2558
2203
  // @ts-ignore
2559
2204
  description: description ? description : roleState.description,
2560
- uiPermissions: __spreadValues(__spreadValues(__spreadValues({}, emptyUiPermissions), roleUiPermissions), maybeUiPermissions)
2561
- })
2205
+ uiPermissions: {
2206
+ ...emptyUiPermissions,
2207
+ ...roleUiPermissions,
2208
+ ...maybeUiPermissions
2209
+ }
2210
+ }
2562
2211
  };
2563
2212
  };
2564
2213
  var roleActions = {
@@ -2609,13 +2258,12 @@ var getGlobalSettings2 = createAsyncThunk5(
2609
2258
  var saveGlobalSettings = createAsyncThunk5(
2610
2259
  `${sliceName6}/saveGlobalSettings`,
2611
2260
  // @ts-ignore
2612
- (_a, { dispatch, getState }) => {
2613
- var _b = _a, { beOptimistic = false, notify = false } = _b, settings = __objRest(_b, ["beOptimistic", "notify"]);
2261
+ ({ beOptimistic = false, notify = false, ...settings }, { dispatch, getState }) => {
2614
2262
  if (!window.sessionStorage.getItem(settingsKeys.initialized) && !beOptimistic) {
2615
2263
  return;
2616
2264
  }
2617
2265
  return dispatch(getGlobalSettings2()).unwrap().then((result) => {
2618
- let updatedSettings = __spreadValues(__spreadValues({}, getState().users.globalSettings), settings);
2266
+ let updatedSettings = { ...getState().users.globalSettings, ...settings };
2619
2267
  if (getCurrentUser(getState()).verified) {
2620
2268
  updatedSettings["2fa"] = twoFAStates.enabled;
2621
2269
  } else {
@@ -2653,10 +2301,17 @@ var saveUserSettings = createAsyncThunk5(`${sliceName6}/saveUserSettings`, (sett
2653
2301
  const userSettings = getUserSettings(getState());
2654
2302
  const onboardingState = getOnboardingState(getState());
2655
2303
  const tooltipState = getTooltipsState(getState());
2656
- const updatedSettings = __spreadProps(__spreadValues(__spreadValues({}, userSettings), settings), {
2657
- onboarding: __spreadValues(__spreadValues({}, onboardingState), settings.onboarding),
2304
+ const updatedSettings = {
2305
+ ...userSettings,
2306
+ // @ts-ignore
2307
+ ...settings,
2308
+ onboarding: {
2309
+ ...onboardingState,
2310
+ // @ts-ignore
2311
+ ...settings.onboarding
2312
+ },
2658
2313
  tooltips: tooltipState
2659
- });
2314
+ };
2660
2315
  const headers = result[result.length - 1] ? { "If-Match": result[result.length - 1] } : {};
2661
2316
  return Promise.all([
2662
2317
  Promise.resolve(dispatch(actions6.setUserSettings(updatedSettings))),
@@ -2682,9 +2337,10 @@ var getTokens = createAsyncThunk5(
2682
2337
  `${sliceName6}/getTokens`,
2683
2338
  (_, { dispatch, getState }) => general_api_default.get(`${useradmApiUrlv1}/settings/tokens`).then(({ data: tokens }) => {
2684
2339
  const user = getCurrentUser(getState());
2685
- const updatedUser = __spreadProps(__spreadValues({}, user), {
2340
+ const updatedUser = {
2341
+ ...user,
2686
2342
  tokens
2687
- });
2343
+ };
2688
2344
  return Promise.resolve(dispatch(actions6.updatedUser(updatedUser)));
2689
2345
  })
2690
2346
  );
@@ -2700,8 +2356,7 @@ var revokeToken = createAsyncThunk5(
2700
2356
  general_api_default.delete(`${useradmApiUrlv1}/settings/tokens/${token.id}`).then(() => Promise.resolve(dispatch(getTokens())))
2701
2357
  )
2702
2358
  );
2703
- var setTooltipReadState = createAsyncThunk5(`${sliceName6}/setTooltipReadState`, (_a, { dispatch }) => {
2704
- var _b = _a, { persist } = _b, remainder = __objRest(_b, ["persist"]);
2359
+ var setTooltipReadState = createAsyncThunk5(`${sliceName6}/setTooltipReadState`, ({ persist, ...remainder }, { dispatch }) => {
2705
2360
  let tasks = [dispatch(actions6.setTooltipState(remainder))];
2706
2361
  if (persist) {
2707
2362
  tasks.push(dispatch(saveUserSettings()));
@@ -2709,14 +2364,13 @@ var setTooltipReadState = createAsyncThunk5(`${sliceName6}/setTooltipReadState`,
2709
2364
  return Promise.all(tasks);
2710
2365
  });
2711
2366
  var setAllTooltipsReadState = createAsyncThunk5(`${sliceName6}/toggleHelptips`, ({ readState = READ_STATES.read, tooltips }, { dispatch }) => {
2712
- const updatedTips = tooltips.reduce((accu, id) => __spreadProps(__spreadValues({}, accu), { [id]: { readState } }), {});
2367
+ const updatedTips = tooltips.reduce((accu, id) => ({ ...accu, [id]: { readState } }), {});
2713
2368
  return Promise.resolve(dispatch(actions6.setTooltipsState(updatedTips))).then(() => dispatch(saveUserSettings()));
2714
2369
  });
2715
2370
  var submitFeedback = createAsyncThunk5(
2716
2371
  `${sliceName6}/submitFeedback`,
2717
2372
  // @ts-ignore
2718
- (_a, { dispatch }) => {
2719
- var _b = _a, { satisfaction, feedback } = _b, meta = __objRest(_b, ["satisfaction", "feedback"]);
2373
+ ({ satisfaction, feedback, ...meta }, { dispatch }) => {
2720
2374
  return general_api_default.post(`${tenantadmApiUrlv2}/contact/support`, {
2721
2375
  subject: "feedback submission",
2722
2376
  body: JSON.stringify({ feedback, satisfaction, meta })
@@ -2729,7 +2383,7 @@ var submitFeedback = createAsyncThunk5(
2729
2383
  );
2730
2384
 
2731
2385
  // src/appSlice/thunks.ts
2732
- import { deepCompare as deepCompare4 } from "@northern.tech/utils/helpers";
2386
+ import { deepCompare as deepCompare4, extractErrorMessage as extractErrorMessage3 } from "@northern.tech/utils/helpers";
2733
2387
  import { createAsyncThunk as createAsyncThunk6 } from "@reduxjs/toolkit";
2734
2388
  import Cookies4 from "universal-cookie";
2735
2389
  var cookies4 = new Cookies4();
@@ -2742,17 +2396,16 @@ var dateFunctionMap = {
2742
2396
  setDays: "setDate"
2743
2397
  };
2744
2398
  var setOfflineThreshold = createAsyncThunk6(`${sliceName}/setOfflineThreshold`, (_, { dispatch, getState }) => {
2745
- var _a, _b;
2746
2399
  const { interval, intervalUnit } = getOfflineThresholdSettings(getState());
2747
2400
  const today = /* @__PURE__ */ new Date();
2748
2401
  const intervalName = `${intervalUnit.charAt(0).toUpperCase()}${intervalUnit.substring(1)}`;
2749
- const setter = (_a = dateFunctionMap[`set${intervalName}`]) != null ? _a : `set${intervalName}`;
2750
- const getter = (_b = dateFunctionMap[`get${intervalName}`]) != null ? _b : `get${intervalName}`;
2402
+ const setter = dateFunctionMap[`set${intervalName}`] ?? `set${intervalName}`;
2403
+ const getter = dateFunctionMap[`get${intervalName}`] ?? `get${intervalName}`;
2751
2404
  today[setter](today[getter]() - interval);
2752
2405
  let value;
2753
2406
  try {
2754
2407
  value = today.toISOString();
2755
- } catch (e) {
2408
+ } catch {
2756
2409
  return Promise.resolve(dispatch(actions.setSnackbar("There was an error saving the offline threshold, please check your settings.")));
2757
2410
  }
2758
2411
  return Promise.resolve(dispatch(actions.setOfflineThreshold(value)));
@@ -2777,7 +2430,7 @@ var getLatestReleaseInfo = createAsyncThunk6(`${sliceName}/getLatestReleaseInfo`
2777
2430
  return Promise.resolve();
2778
2431
  }
2779
2432
  return Promise.all([general_api_default.get("/versions.json"), general_api_default.get("/tags.json")]).catch((err) => {
2780
- console.log("init error:", extractErrorMessage(err));
2433
+ console.log("init error:", extractErrorMessage3(err));
2781
2434
  return Promise.resolve([{ data: {} }, { data: [] }]);
2782
2435
  }).then(([{ data }, { data: guiTags }]) => {
2783
2436
  if (!guiTags.length) {
@@ -2793,37 +2446,43 @@ var getLatestReleaseInfo = createAsyncThunk6(`${sliceName}/getLatestReleaseInfo`
2793
2446
  accu.latestRepos[item.name] = getComparisonCompatibleVersion(item.version);
2794
2447
  return accu;
2795
2448
  },
2796
- { latestVersions: __spreadValues({}, getState().app.versionInformation), latestRepos: {} }
2449
+ { latestVersions: { ...getState().app.versionInformation }, latestRepos: {} }
2797
2450
  );
2798
2451
  const info = deductSaasState(latestRelease, guiTags, saas);
2799
2452
  return Promise.resolve(
2800
2453
  dispatch(
2801
- actions.setVersionInformation(__spreadProps(__spreadValues({}, latestVersions), {
2454
+ actions.setVersionInformation({
2455
+ ...latestVersions,
2802
2456
  backend: info,
2803
2457
  GUI: info,
2804
2458
  latestRelease: {
2805
2459
  releaseDate: latestRelease.release_date,
2806
2460
  repos: latestRepos
2807
2461
  }
2808
- }))
2462
+ })
2809
2463
  )
2810
2464
  );
2811
2465
  });
2812
2466
  });
2813
2467
  var setSearchState = createAsyncThunk6(`${sliceName}/setSearchState`, (searchState, { dispatch, getState }) => {
2814
2468
  const currentState = getSearchState(getState());
2815
- let nextState = __spreadProps(__spreadValues(__spreadValues({}, currentState), searchState), {
2816
- sort: __spreadValues(__spreadValues({}, currentState.sort), searchState.sort)
2817
- });
2469
+ let nextState = {
2470
+ ...currentState,
2471
+ ...searchState,
2472
+ sort: {
2473
+ ...currentState.sort,
2474
+ ...searchState.sort
2475
+ }
2476
+ };
2818
2477
  let tasks = [];
2819
- const _a = currentState, { isSearching: currentSearching, deviceIds: currentDevices, searchTotal: currentTotal } = _a, currentRequestState = __objRest(_a, ["isSearching", "deviceIds", "searchTotal"]);
2820
- const _b = nextState, { isSearching: nextSearching, deviceIds: nextDevices, searchTotal: nextTotal } = _b, nextRequestState = __objRest(_b, ["isSearching", "deviceIds", "searchTotal"]);
2478
+ const { isSearching: currentSearching, deviceIds: currentDevices, searchTotal: currentTotal, ...currentRequestState } = currentState;
2479
+ const { isSearching: nextSearching, deviceIds: nextDevices, searchTotal: nextTotal, ...nextRequestState } = nextState;
2821
2480
  if (nextRequestState.searchTerm && !deepCompare4(currentRequestState, nextRequestState)) {
2822
2481
  nextState.isSearching = true;
2823
2482
  tasks.push(
2824
2483
  dispatch(searchDevices(nextState)).unwrap().then((results) => {
2825
2484
  const searchResult = results[results.length - 1];
2826
- return dispatch(actions.setSearchState(__spreadProps(__spreadValues({}, searchResult), { isSearching: false })));
2485
+ return dispatch(actions.setSearchState({ ...searchResult, isSearching: false }));
2827
2486
  }).catch(() => dispatch(actions.setSearchState({ isSearching: false, searchTotal: 0 })))
2828
2487
  );
2829
2488
  }
@@ -2974,4 +2633,4 @@ export {
2974
2633
  setAllTooltipsReadState,
2975
2634
  submitFeedback
2976
2635
  };
2977
- //# sourceMappingURL=chunk-UPMSYTWW.mjs.map
2636
+ //# sourceMappingURL=chunk-DQ4ZLUIU.js.map