homebridge-config-ui-x 5.9.1-beta.0 → 5.9.1-beta.10

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 (385) hide show
  1. package/CHANGELOG.md +23 -2
  2. package/TODO-MATTER.md +15 -0
  3. package/dist/app.controller.d.ts +1 -1
  4. package/dist/app.controller.js +14 -12
  5. package/dist/app.controller.js.map +1 -1
  6. package/dist/app.gateway.js +7 -10
  7. package/dist/app.gateway.js.map +1 -1
  8. package/dist/app.module.js +42 -43
  9. package/dist/app.module.js.map +1 -1
  10. package/dist/app.service.js +4 -7
  11. package/dist/app.service.js.map +1 -1
  12. package/dist/bin/base-platform.d.ts +1 -1
  13. package/dist/bin/base-platform.js +11 -17
  14. package/dist/bin/base-platform.js.map +1 -1
  15. package/dist/bin/fork.js +7 -45
  16. package/dist/bin/fork.js.map +1 -1
  17. package/dist/bin/hb-service.js +224 -243
  18. package/dist/bin/hb-service.js.map +1 -1
  19. package/dist/bin/platforms/darwin.d.ts +1 -1
  20. package/dist/bin/platforms/darwin.js +61 -65
  21. package/dist/bin/platforms/darwin.js.map +1 -1
  22. package/dist/bin/platforms/freebsd.d.ts +1 -1
  23. package/dist/bin/platforms/freebsd.js +42 -47
  24. package/dist/bin/platforms/freebsd.js.map +1 -1
  25. package/dist/bin/platforms/linux.d.ts +1 -1
  26. package/dist/bin/platforms/linux.js +127 -132
  27. package/dist/bin/platforms/linux.js.map +1 -1
  28. package/dist/bin/platforms/win32.d.ts +1 -1
  29. package/dist/bin/platforms/win32.js +30 -36
  30. package/dist/bin/platforms/win32.js.map +1 -1
  31. package/dist/bin/standalone.js +15 -53
  32. package/dist/bin/standalone.js.map +1 -1
  33. package/dist/core/auth/auth.controller.d.ts +5 -4
  34. package/dist/core/auth/auth.controller.js +40 -39
  35. package/dist/core/auth/auth.controller.js.map +1 -1
  36. package/dist/core/auth/auth.dto.js +17 -18
  37. package/dist/core/auth/auth.dto.js.map +1 -1
  38. package/dist/core/auth/auth.module.js +28 -31
  39. package/dist/core/auth/auth.module.js.map +1 -1
  40. package/dist/core/auth/auth.service.d.ts +3 -3
  41. package/dist/core/auth/auth.service.js +65 -62
  42. package/dist/core/auth/auth.service.js.map +1 -1
  43. package/dist/core/auth/guards/admin.guard.js +4 -7
  44. package/dist/core/auth/guards/admin.guard.js.map +1 -1
  45. package/dist/core/auth/guards/custom.guard.js +6 -9
  46. package/dist/core/auth/guards/custom.guard.js.map +1 -1
  47. package/dist/core/auth/guards/ws-admin-guard.d.ts +2 -2
  48. package/dist/core/auth/guards/ws-admin-guard.js +13 -11
  49. package/dist/core/auth/guards/ws-admin-guard.js.map +1 -1
  50. package/dist/core/auth/guards/ws.guard.d.ts +2 -2
  51. package/dist/core/auth/guards/ws.guard.js +13 -11
  52. package/dist/core/auth/guards/ws.guard.js.map +1 -1
  53. package/dist/core/auth/jwt.strategy.d.ts +3 -2
  54. package/dist/core/auth/jwt.strategy.js +21 -16
  55. package/dist/core/auth/jwt.strategy.js.map +1 -1
  56. package/dist/core/config/config.interfaces.d.ts +8 -1
  57. package/dist/core/config/config.interfaces.js +1 -2
  58. package/dist/core/config/config.module.js +8 -10
  59. package/dist/core/config/config.module.js.map +1 -1
  60. package/dist/core/config/config.service.d.ts +4 -3
  61. package/dist/core/config/config.service.js +90 -83
  62. package/dist/core/config/config.service.js.map +1 -1
  63. package/dist/core/config/config.startup.d.ts +1 -1
  64. package/dist/core/config/config.startup.js +23 -28
  65. package/dist/core/config/config.startup.js.map +1 -1
  66. package/dist/core/feature-flags/feature-flags.registry.js +2 -5
  67. package/dist/core/feature-flags/feature-flags.registry.js.map +1 -1
  68. package/dist/core/homebridge-ipc/homebridge-ipc.module.js +11 -14
  69. package/dist/core/homebridge-ipc/homebridge-ipc.module.js.map +1 -1
  70. package/dist/core/homebridge-ipc/homebridge-ipc.service.d.ts +4 -4
  71. package/dist/core/homebridge-ipc/homebridge-ipc.service.js +25 -19
  72. package/dist/core/homebridge-ipc/homebridge-ipc.service.js.map +1 -1
  73. package/dist/core/logger/logger.module.js +8 -10
  74. package/dist/core/logger/logger.module.js.map +1 -1
  75. package/dist/core/logger/logger.service.js +13 -23
  76. package/dist/core/logger/logger.service.js.map +1 -1
  77. package/dist/core/node-pty/node-pty.module.js +7 -10
  78. package/dist/core/node-pty/node-pty.module.js.map +1 -1
  79. package/dist/core/node-pty/node-pty.service.js +6 -11
  80. package/dist/core/node-pty/node-pty.service.js.map +1 -1
  81. package/dist/core/node-version.constants.js +4 -11
  82. package/dist/core/node-version.constants.js.map +1 -1
  83. package/dist/core/scheduler/scheduler.module.js +15 -10
  84. package/dist/core/scheduler/scheduler.module.js.map +1 -1
  85. package/dist/core/scheduler/scheduler.service.d.ts +12 -1
  86. package/dist/core/scheduler/scheduler.service.js +101 -13
  87. package/dist/core/scheduler/scheduler.service.js.map +1 -1
  88. package/dist/core/spa/spa-html.service.js +9 -15
  89. package/dist/core/spa/spa-html.service.js.map +1 -1
  90. package/dist/core/spa/spa.filter.d.ts +1 -1
  91. package/dist/core/spa/spa.filter.js +11 -16
  92. package/dist/core/spa/spa.filter.js.map +1 -1
  93. package/dist/core/ssl/ssl-cert-generator.service.d.ts +1 -1
  94. package/dist/core/ssl/ssl-cert-generator.service.js +34 -36
  95. package/dist/core/ssl/ssl-cert-generator.service.js.map +1 -1
  96. package/dist/env-setup.d.ts +1 -0
  97. package/dist/env-setup.js +7 -0
  98. package/dist/env-setup.js.map +1 -0
  99. package/dist/globalDefaults.d.ts +1 -0
  100. package/dist/globalDefaults.js +1 -0
  101. package/dist/index.d.ts +1 -1
  102. package/dist/index.js +16 -19
  103. package/dist/index.js.map +1 -1
  104. package/dist/main.d.ts +5 -3
  105. package/dist/main.js +44 -51
  106. package/dist/main.js.map +1 -1
  107. package/dist/modules/accessories/accessories.controller.d.ts +3 -3
  108. package/dist/modules/accessories/accessories.controller.js +28 -29
  109. package/dist/modules/accessories/accessories.controller.js.map +1 -1
  110. package/dist/modules/accessories/accessories.dto.js +11 -13
  111. package/dist/modules/accessories/accessories.dto.js.map +1 -1
  112. package/dist/modules/accessories/accessories.gateway.d.ts +2 -2
  113. package/dist/modules/accessories/accessories.gateway.js +18 -16
  114. package/dist/modules/accessories/accessories.gateway.js.map +1 -1
  115. package/dist/modules/accessories/accessories.interfaces.d.ts +94 -0
  116. package/dist/modules/accessories/accessories.interfaces.js +2 -0
  117. package/dist/modules/accessories/accessories.interfaces.js.map +1 -0
  118. package/dist/modules/accessories/accessories.module.js +19 -20
  119. package/dist/modules/accessories/accessories.module.js.map +1 -1
  120. package/dist/modules/accessories/accessories.service.d.ts +23 -5
  121. package/dist/modules/accessories/accessories.service.js +316 -51
  122. package/dist/modules/accessories/accessories.service.js.map +1 -1
  123. package/dist/modules/backup/backup.controller.d.ts +4 -4
  124. package/dist/modules/backup/backup.controller.js +68 -67
  125. package/dist/modules/backup/backup.controller.js.map +1 -1
  126. package/dist/modules/backup/backup.gateway.d.ts +4 -4
  127. package/dist/modules/backup/backup.gateway.js +25 -21
  128. package/dist/modules/backup/backup.gateway.js.map +1 -1
  129. package/dist/modules/backup/backup.module.js +22 -25
  130. package/dist/modules/backup/backup.module.js.map +1 -1
  131. package/dist/modules/backup/backup.service.d.ts +5 -5
  132. package/dist/modules/backup/backup.service.js +143 -133
  133. package/dist/modules/backup/backup.service.js.map +1 -1
  134. package/dist/modules/child-bridges/child-bridges.gateway.d.ts +3 -3
  135. package/dist/modules/child-bridges/child-bridges.gateway.js +23 -21
  136. package/dist/modules/child-bridges/child-bridges.gateway.js.map +1 -1
  137. package/dist/modules/child-bridges/child-bridges.interfaces.js +1 -2
  138. package/dist/modules/child-bridges/child-bridges.module.js +19 -22
  139. package/dist/modules/child-bridges/child-bridges.module.js.map +1 -1
  140. package/dist/modules/child-bridges/child-bridges.service.d.ts +3 -3
  141. package/dist/modules/child-bridges/child-bridges.service.js +15 -11
  142. package/dist/modules/child-bridges/child-bridges.service.js.map +1 -1
  143. package/dist/modules/config-editor/config-editor.controller.d.ts +13 -11
  144. package/dist/modules/config-editor/config-editor.controller.js +168 -103
  145. package/dist/modules/config-editor/config-editor.controller.js.map +1 -1
  146. package/dist/modules/config-editor/config-editor.dto.d.ts +6 -0
  147. package/dist/modules/config-editor/config-editor.dto.js +40 -0
  148. package/dist/modules/config-editor/config-editor.dto.js.map +1 -0
  149. package/dist/modules/config-editor/config-editor.module.js +21 -24
  150. package/dist/modules/config-editor/config-editor.module.js.map +1 -1
  151. package/dist/modules/config-editor/config-editor.service.d.ts +11 -8
  152. package/dist/modules/config-editor/config-editor.service.js +123 -66
  153. package/dist/modules/config-editor/config-editor.service.js.map +1 -1
  154. package/dist/modules/custom-plugins/custom-plugins.module.js +10 -13
  155. package/dist/modules/custom-plugins/custom-plugins.module.js.map +1 -1
  156. package/dist/modules/custom-plugins/homebridge-deconz/homebridge-deconz.controller.d.ts +2 -2
  157. package/dist/modules/custom-plugins/homebridge-deconz/homebridge-deconz.controller.js +21 -19
  158. package/dist/modules/custom-plugins/homebridge-deconz/homebridge-deconz.controller.js.map +1 -1
  159. package/dist/modules/custom-plugins/homebridge-deconz/homebridge-deconz.module.js +14 -17
  160. package/dist/modules/custom-plugins/homebridge-deconz/homebridge-deconz.module.js.map +1 -1
  161. package/dist/modules/custom-plugins/homebridge-deconz/homebridge-deconz.service.d.ts +2 -2
  162. package/dist/modules/custom-plugins/homebridge-deconz/homebridge-deconz.service.js +18 -15
  163. package/dist/modules/custom-plugins/homebridge-deconz/homebridge-deconz.service.js.map +1 -1
  164. package/dist/modules/custom-plugins/homebridge-hue/homebridge-hue.controller.d.ts +2 -2
  165. package/dist/modules/custom-plugins/homebridge-hue/homebridge-hue.controller.js +21 -19
  166. package/dist/modules/custom-plugins/homebridge-hue/homebridge-hue.controller.js.map +1 -1
  167. package/dist/modules/custom-plugins/homebridge-hue/homebridge-hue.module.js +14 -17
  168. package/dist/modules/custom-plugins/homebridge-hue/homebridge-hue.module.js.map +1 -1
  169. package/dist/modules/custom-plugins/homebridge-hue/homebridge-hue.service.d.ts +2 -2
  170. package/dist/modules/custom-plugins/homebridge-hue/homebridge-hue.service.js +18 -15
  171. package/dist/modules/custom-plugins/homebridge-hue/homebridge-hue.service.js.map +1 -1
  172. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.controller.d.ts +2 -2
  173. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.controller.js +18 -19
  174. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.controller.js.map +1 -1
  175. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.gateway.d.ts +2 -2
  176. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.gateway.js +15 -13
  177. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.gateway.js.map +1 -1
  178. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.module.js +18 -21
  179. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.module.js.map +1 -1
  180. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.d.ts +8 -8
  181. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js +47 -41
  182. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js.map +1 -1
  183. package/dist/modules/log/log.gateway.d.ts +3 -3
  184. package/dist/modules/log/log.gateway.js +15 -13
  185. package/dist/modules/log/log.gateway.js.map +1 -1
  186. package/dist/modules/log/log.interfaces.js +1 -2
  187. package/dist/modules/log/log.module.js +14 -17
  188. package/dist/modules/log/log.module.js.map +1 -1
  189. package/dist/modules/log/log.service.d.ts +5 -5
  190. package/dist/modules/log/log.service.js +47 -43
  191. package/dist/modules/log/log.service.js.map +1 -1
  192. package/dist/modules/platform-tools/docker/docker.controller.d.ts +1 -1
  193. package/dist/modules/platform-tools/docker/docker.controller.js +24 -25
  194. package/dist/modules/platform-tools/docker/docker.controller.js.map +1 -1
  195. package/dist/modules/platform-tools/docker/docker.module.js +14 -17
  196. package/dist/modules/platform-tools/docker/docker.module.js.map +1 -1
  197. package/dist/modules/platform-tools/docker/docker.service.d.ts +2 -2
  198. package/dist/modules/platform-tools/docker/docker.service.js +20 -16
  199. package/dist/modules/platform-tools/docker/docker.service.js.map +1 -1
  200. package/dist/modules/platform-tools/hb-service/hb-service.controller.d.ts +2 -2
  201. package/dist/modules/platform-tools/hb-service/hb-service.controller.js +35 -36
  202. package/dist/modules/platform-tools/hb-service/hb-service.controller.js.map +1 -1
  203. package/dist/modules/platform-tools/hb-service/hb-service.dto.js +20 -19
  204. package/dist/modules/platform-tools/hb-service/hb-service.dto.js.map +1 -1
  205. package/dist/modules/platform-tools/hb-service/hb-service.module.js +14 -17
  206. package/dist/modules/platform-tools/hb-service/hb-service.module.js.map +1 -1
  207. package/dist/modules/platform-tools/hb-service/hb-service.service.d.ts +3 -3
  208. package/dist/modules/platform-tools/hb-service/hb-service.service.js +37 -30
  209. package/dist/modules/platform-tools/hb-service/hb-service.service.js.map +1 -1
  210. package/dist/modules/platform-tools/linux/linux.controller.d.ts +1 -1
  211. package/dist/modules/platform-tools/linux/linux.controller.js +23 -21
  212. package/dist/modules/platform-tools/linux/linux.controller.js.map +1 -1
  213. package/dist/modules/platform-tools/linux/linux.module.js +14 -17
  214. package/dist/modules/platform-tools/linux/linux.module.js.map +1 -1
  215. package/dist/modules/platform-tools/linux/linux.service.d.ts +2 -2
  216. package/dist/modules/platform-tools/linux/linux.service.js +18 -14
  217. package/dist/modules/platform-tools/linux/linux.service.js.map +1 -1
  218. package/dist/modules/platform-tools/platform-tools.module.js +12 -15
  219. package/dist/modules/platform-tools/platform-tools.module.js.map +1 -1
  220. package/dist/modules/platform-tools/terminal/terminal.controller.d.ts +1 -1
  221. package/dist/modules/platform-tools/terminal/terminal.controller.js +15 -13
  222. package/dist/modules/platform-tools/terminal/terminal.controller.js.map +1 -1
  223. package/dist/modules/platform-tools/terminal/terminal.gateway.d.ts +2 -2
  224. package/dist/modules/platform-tools/terminal/terminal.gateway.js +17 -15
  225. package/dist/modules/platform-tools/terminal/terminal.gateway.js.map +1 -1
  226. package/dist/modules/platform-tools/terminal/terminal.interfaces.js +1 -2
  227. package/dist/modules/platform-tools/terminal/terminal.module.js +18 -21
  228. package/dist/modules/platform-tools/terminal/terminal.module.js.map +1 -1
  229. package/dist/modules/platform-tools/terminal/terminal.service.d.ts +7 -7
  230. package/dist/modules/platform-tools/terminal/terminal.service.js +33 -28
  231. package/dist/modules/platform-tools/terminal/terminal.service.js.map +1 -1
  232. package/dist/modules/plugins/plugins.controller.d.ts +12 -7
  233. package/dist/modules/plugins/plugins.controller.js +100 -52
  234. package/dist/modules/plugins/plugins.controller.js.map +1 -1
  235. package/dist/modules/plugins/plugins.dto.js +26 -24
  236. package/dist/modules/plugins/plugins.dto.js.map +1 -1
  237. package/dist/modules/plugins/plugins.gateway.d.ts +5 -5
  238. package/dist/modules/plugins/plugins.gateway.js +38 -34
  239. package/dist/modules/plugins/plugins.gateway.js.map +1 -1
  240. package/dist/modules/plugins/plugins.interfaces.js +1 -2
  241. package/dist/modules/plugins/plugins.module.js +27 -26
  242. package/dist/modules/plugins/plugins.module.js.map +1 -1
  243. package/dist/modules/plugins/plugins.service.d.ts +26 -13
  244. package/dist/modules/plugins/plugins.service.js +366 -203
  245. package/dist/modules/plugins/plugins.service.js.map +1 -1
  246. package/dist/modules/server/server.controller.d.ts +37 -7
  247. package/dist/modules/server/server.controller.js +294 -177
  248. package/dist/modules/server/server.controller.js.map +1 -1
  249. package/dist/modules/server/server.dto.js +13 -16
  250. package/dist/modules/server/server.dto.js.map +1 -1
  251. package/dist/modules/server/server.module.js +23 -26
  252. package/dist/modules/server/server.module.js.map +1 -1
  253. package/dist/modules/server/server.service.d.ts +36 -6
  254. package/dist/modules/server/server.service.js +406 -150
  255. package/dist/modules/server/server.service.js.map +1 -1
  256. package/dist/modules/setup-wizard/setup-wizard.controller.d.ts +3 -3
  257. package/dist/modules/setup-wizard/setup-wizard.controller.js +19 -20
  258. package/dist/modules/setup-wizard/setup-wizard.controller.js.map +1 -1
  259. package/dist/modules/setup-wizard/setup-wizard.gateway.d.ts +4 -4
  260. package/dist/modules/setup-wizard/setup-wizard.gateway.js +25 -21
  261. package/dist/modules/setup-wizard/setup-wizard.gateway.js.map +1 -1
  262. package/dist/modules/setup-wizard/setup-wizard.guard.d.ts +2 -2
  263. package/dist/modules/setup-wizard/setup-wizard.guard.js +11 -9
  264. package/dist/modules/setup-wizard/setup-wizard.guard.js.map +1 -1
  265. package/dist/modules/setup-wizard/setup-wizard.module.js +12 -15
  266. package/dist/modules/setup-wizard/setup-wizard.module.js.map +1 -1
  267. package/dist/modules/status/status.controller.d.ts +5 -5
  268. package/dist/modules/status/status.controller.js +40 -36
  269. package/dist/modules/status/status.controller.js.map +1 -1
  270. package/dist/modules/status/status.gateway.d.ts +11 -11
  271. package/dist/modules/status/status.gateway.js +51 -47
  272. package/dist/modules/status/status.gateway.js.map +1 -1
  273. package/dist/modules/status/status.interfaces.js +2 -5
  274. package/dist/modules/status/status.interfaces.js.map +1 -1
  275. package/dist/modules/status/status.module.js +26 -29
  276. package/dist/modules/status/status.module.js.map +1 -1
  277. package/dist/modules/status/status.service.d.ts +13 -13
  278. package/dist/modules/status/status.service.js +100 -88
  279. package/dist/modules/status/status.service.js.map +1 -1
  280. package/dist/modules/users/users.controller.d.ts +3 -3
  281. package/dist/modules/users/users.controller.js +59 -60
  282. package/dist/modules/users/users.controller.js.map +1 -1
  283. package/dist/modules/users/users.dto.js +51 -45
  284. package/dist/modules/users/users.dto.js.map +1 -1
  285. package/dist/modules/users/users.module.js +14 -17
  286. package/dist/modules/users/users.module.js.map +1 -1
  287. package/dist/self-check.js +25 -25
  288. package/dist/self-check.js.map +1 -1
  289. package/docs/ssl-upload-pr.md +103 -0
  290. package/package.json +14 -12
  291. package/public/3rdpartylicenses.txt +26 -26
  292. package/public/{chunk-QJLKBB62.js → chunk-2UCXG3TD.js} +1 -1
  293. package/public/{chunk-W26VKO62.js → chunk-2VYE34OE.js} +1 -1
  294. package/public/{chunk-FGS4HIPD.js → chunk-4AG5CIDJ.js} +1 -1
  295. package/public/{chunk-ZF6W5Z5R.js → chunk-4H57TZAE.js} +1 -1
  296. package/public/{chunk-VFIOPF3O.js → chunk-5CCE4FIL.js} +1 -1
  297. package/public/{chunk-2UQL2OTF.js → chunk-5RBSMCFS.js} +1 -1
  298. package/public/{chunk-HVGUNGBB.js → chunk-6O32KEYY.js} +1 -1
  299. package/public/{chunk-NUCXRR5D.js → chunk-7K67C3PU.js} +1 -1
  300. package/public/{chunk-HERKNFLL.js → chunk-7PEOCUE2.js} +3 -3
  301. package/public/{chunk-5WTTTYNS.js → chunk-7RXQUWCY.js} +1 -1
  302. package/public/{chunk-RLWY3GD4.js → chunk-7SZF43OV.js} +1 -1
  303. package/public/chunk-AEYQANK4.js +68 -0
  304. package/public/{chunk-R2PMDKTD.js → chunk-AU2Q4PYM.js} +1 -1
  305. package/public/chunk-AZIULTML.js +1 -0
  306. package/public/chunk-B63E4PTS.js +19 -0
  307. package/public/{chunk-JWY7RFE6.js → chunk-CT6TS63V.js} +1 -1
  308. package/public/{chunk-TGX55EFG.js → chunk-DGS32J2V.js} +1 -1
  309. package/public/{chunk-TJEQFEML.js → chunk-DWAKEAKY.js} +1 -1
  310. package/public/chunk-DZVJNQPQ.js +1 -0
  311. package/public/chunk-E26RJWMZ.js +4 -0
  312. package/public/{chunk-E4ZKIFZH.js → chunk-H22EEHWT.js} +1 -1
  313. package/public/{chunk-PPA66JI2.js → chunk-HZFYCQBZ.js} +1 -1
  314. package/public/{chunk-SOA3BB36.js → chunk-I24Z7SXB.js} +1 -1
  315. package/public/{chunk-IEO2AG2N.js → chunk-IA43FDJ7.js} +1 -1
  316. package/public/{chunk-EYO3XCE2.js → chunk-IHMVNP7Y.js} +1 -1
  317. package/public/{chunk-FOSFENMV.js → chunk-IJNJ3FHH.js} +1 -1
  318. package/public/{chunk-5T6O4JCR.js → chunk-IM4LXJ36.js} +1 -1
  319. package/public/chunk-J4AYRIB4.js +1 -0
  320. package/public/{chunk-XS5JK2LY.js → chunk-JXJXX7ID.js} +1 -1
  321. package/public/chunk-K73OEMZP.js +1 -0
  322. package/public/chunk-KAZYWBPX.js +1 -0
  323. package/public/chunk-KGXF4YD5.js +1 -0
  324. package/public/chunk-KN2SQNGB.js +1 -0
  325. package/public/chunk-LN3BMCV4.js +1 -0
  326. package/public/{chunk-B5Z4M7ZJ.js → chunk-LOQEG2RD.js} +1 -1
  327. package/public/chunk-M3HVG4RQ.js +1 -0
  328. package/public/{chunk-WMGV3KS6.js → chunk-MNT5ZGV3.js} +1 -1
  329. package/public/{chunk-5W7EKO7F.js → chunk-NTFDKV64.js} +1 -1
  330. package/public/chunk-PF7M52WR.js +1 -0
  331. package/public/chunk-PFWD43QS.js +2 -0
  332. package/public/{chunk-E7S36RMO.js → chunk-PHND6FV5.js} +1 -1
  333. package/public/chunk-PSYU6RB3.js +1 -0
  334. package/public/{chunk-4H7ODI34.js → chunk-Q7T3F2Y7.js} +1 -1
  335. package/public/chunk-QKKTMQUU.js +1 -0
  336. package/public/chunk-QT6XPFQS.js +1 -0
  337. package/public/{chunk-5G7T74GR.js → chunk-R2WI5YTX.js} +1 -1
  338. package/public/chunk-R44T3ZI7.js +50 -0
  339. package/public/{chunk-Z6VQEXUS.js → chunk-R6KWC4OQ.js} +1 -1
  340. package/public/{chunk-NIERW5KT.js → chunk-RDOYYGV5.js} +1 -1
  341. package/public/chunk-RERUZJD4.js +5 -0
  342. package/public/chunk-S5IG2PNV.js +1 -0
  343. package/public/{chunk-LI4BZAUI.js → chunk-SVVZYE76.js} +1 -1
  344. package/public/{chunk-IKY3F7MM.js → chunk-T3SFHTRG.js} +1 -1
  345. package/public/{chunk-USXMCNIE.js → chunk-TJ6P7UCH.js} +1 -1
  346. package/public/{chunk-AOALMLGY.js → chunk-U3NNN7U4.js} +1 -1
  347. package/public/{chunk-7F6JT34E.js → chunk-UBLR5WZR.js} +1 -1
  348. package/public/{chunk-UKEKNQEJ.js → chunk-UZHUIPNT.js} +1 -1
  349. package/public/{chunk-EHHNHG6Q.js → chunk-VNXIDOPC.js} +1 -1
  350. package/public/{chunk-RON3LUMX.js → chunk-W6VJMRO6.js} +1 -1
  351. package/public/{chunk-BQTGMLQB.js → chunk-WFVVY4KI.js} +1 -1
  352. package/public/{chunk-Y2N6WV2O.js → chunk-WHSTHY5K.js} +1 -1
  353. package/public/chunk-XMBCOKOA.js +1 -0
  354. package/public/{chunk-VB4UAZWJ.js → chunk-XQACD65E.js} +1 -1
  355. package/public/{chunk-DIWD6B4C.js → chunk-XQCLQKCG.js} +2 -2
  356. package/public/{chunk-IXIZVUXX.js → chunk-XS55KH6X.js} +1 -1
  357. package/public/{chunk-AO7VT6PL.js → chunk-YFMEPI62.js} +1 -1
  358. package/public/chunk-Z4E6BJST.js +1 -0
  359. package/public/{chunk-OTOQR5Z2.js → chunk-ZSWIXPXA.js} +1 -1
  360. package/public/index.html +2 -2
  361. package/public/{main-QP5R7HI3.js → main-WFXBCXTF.js} +1 -1
  362. package/public/{styles-CSF457UW.css → styles-WNHDEKE4.css} +1 -1
  363. package/scripts/extract-plugin-alias.js +8 -4
  364. package/public/chunk-2ADAW5AD.js +0 -1
  365. package/public/chunk-2MFBHUTD.js +0 -1
  366. package/public/chunk-2Y63WBU6.js +0 -1
  367. package/public/chunk-4AWJ2PWG.js +0 -1
  368. package/public/chunk-4DVF333O.js +0 -1
  369. package/public/chunk-4E4YMHG4.js +0 -1
  370. package/public/chunk-BI2TS6NN.js +0 -4
  371. package/public/chunk-BVTPAZF3.js +0 -1
  372. package/public/chunk-CWTDHTPI.js +0 -1
  373. package/public/chunk-D4LRW76J.js +0 -1
  374. package/public/chunk-DL2QDFLD.js +0 -2
  375. package/public/chunk-I3QQTGGZ.js +0 -1
  376. package/public/chunk-IBO6BDNZ.js +0 -1
  377. package/public/chunk-ISV4M72Q.js +0 -1
  378. package/public/chunk-JWCVCB6V.js +0 -5
  379. package/public/chunk-JWHZQ7YI.js +0 -40
  380. package/public/chunk-LGE6SGDN.js +0 -1
  381. package/public/chunk-PZD3OMMY.js +0 -1
  382. package/public/chunk-QOSAHW73.js +0 -50
  383. package/public/chunk-QU4I4QSX.js +0 -1
  384. package/public/chunk-SXOLKD36.js +0 -19
  385. package/public/chunk-ZC3JEQZ5.js +0 -1
@@ -0,0 +1,103 @@
1
+ # SSL uploads, validation, and self-signed generation
2
+
3
+ This PR adds a complete HTTPS management experience to Settings → Security → HTTPS:
4
+
5
+ - Upload PEM key + certificate with server-side validation
6
+ - Upload PKCS#12 (.pfx/.p12) with optional passphrase and validation
7
+ - Validate the currently configured HTTPS mode from the UI (“Validate SSL”)
8
+ - Generate a self-signed certificate from the UI with hostnames/SANs
9
+ - Generate Self‑Signed & Use as Key + Cert (writes files, selects key/cert mode)
10
+ - Generate & Enable Self‑Signed Mode (enables runtime self-signed mode)
11
+
12
+ See the updated mockup: `screenshots/ssl-upload-mock.svg`.
13
+
14
+ ## Target branch
15
+
16
+ Per repo guidelines, this PR targets the current beta branch: `beta-5.8.1`.
17
+
18
+ ## Backend (NestJS)
19
+
20
+ New/updated endpoints under Server module:
21
+
22
+ - POST `/server/ssl/keycert` — multipart upload for `key.pem` + `cert.pem`
23
+ - Validates key↔cert pair via Node.js X509/tls before persisting
24
+ - Saves to `{storagePath}/ssl-certs/ui-ssl.key` and `ui-ssl.crt`
25
+ - Updates `config.json` → `ui.ssl` to key/cert mode; clears pfx/selfSigned
26
+ - POST `/server/ssl/pfx` — multipart upload for `ui-ssl.pfx` with optional `passphrase`
27
+ - Validates by creating a SecureContext
28
+ - Saves to `{storagePath}/ssl-certs/ui-ssl.pfx`
29
+ - Updates `config.json` → `ui.ssl` to pfx mode; clears key/cert/selfSigned
30
+ - POST `/server/ssl/validate` — validates the current HTTPS configuration
31
+ - Handles `off`, `selfsigned`, `keycert`, and `pfx` modes; returns status/details
32
+ - POST `/server/ssl/selfsigned/generate` — generates a self-signed cert
33
+ - Body: `{ hostnames?: string[], mode?: 'keycert'|'selfsigned' }`
34
+ - Uses existing SSL generator service
35
+ - If `mode='keycert'`: writes `private-key.pem`/`certificate.pem`, sets key/cert mode
36
+ - If `mode='selfsigned'`: enables runtime self-signed mode and records hostnames
37
+
38
+ Security: endpoints are admin-only and write under `{storagePath}/ssl-certs`.
39
+
40
+ ## Frontend (Angular)
41
+
42
+ Settings → Security → HTTPS additions:
43
+
44
+ - HTTPS mode selector: Off, Self-Signed, Key+Cert, PFX
45
+ - “Validate SSL” button next to the selector
46
+ - Self-signed section:
47
+ - Hostnames/SANs input (e.g. `localhost, 127.0.0.1, homebridge.local`)
48
+ - Two actions:
49
+ - “Generate Self‑Signed & Use as Key + Cert”
50
+ - “Generate & Enable Self‑Signed Mode”
51
+ - Key/Cert upload (with unified “Upload” button) and PFX upload with passphrase field
52
+ - Toastr notifications and restart prompt after changes
53
+ - i18n keys added in `ui/src/i18n/en.json` for new labels and toasts
54
+
55
+ ## Storage layout
56
+
57
+ All artifacts are saved under `{storagePath}/ssl-certs`:
58
+
59
+ - `ui-ssl.key` / `ui-ssl.crt` (file-based key/cert mode)
60
+ - `ui-ssl.pfx` (pfx mode)
61
+ - `private-key.pem` / `certificate.pem` (generated self-signed files)
62
+
63
+ ## Manual validation
64
+
65
+ Follow the project’s validation steps:
66
+
67
+ 1. Build and test:
68
+ - `npm run build`
69
+ - `npm run lint`
70
+ - `npm run test`
71
+ 2. Start the app (`npm run watch` for UI + backend) and open Settings → Security → HTTPS
72
+ 3. Try each flow:
73
+ - Upload Key+Cert and validate
74
+ - Upload PFX (with/without passphrase) and validate
75
+ - Generate self-signed with custom hostnames and select one of the two buttons
76
+ - Use “Validate SSL” to verify the mode
77
+
78
+ Backend-only check (optional):
79
+
80
+ - POST `/server/ssl/validate` should return OK plus details of the active mode
81
+
82
+ ## Notes
83
+
84
+ - Raspbian image: the self-signed UI option is hidden/disabled since nginx terminates TLS
85
+ - Admin-only scope maintained for all write endpoints
86
+
87
+ ## Quality gates
88
+
89
+ - Build: PASS
90
+ - Lint: PASS
91
+ - Tests: PASS (310 e2e tests)
92
+
93
+ ---
94
+
95
+ Compare URL (after pushing this branch):
96
+
97
+ https://github.com/homebridge/homebridge-config-ui-x/compare/beta-5.8.1...ssl-upload
98
+
99
+ Suggested PR title:
100
+
101
+ feat(settings/https): upload + validate SSL (PEM/PFX) and generate self-signed from UI
102
+
103
+ Suggested labels: `feature`, `settings`, `security`, `beta`
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "homebridge-config-ui-x",
3
3
  "displayName": "Homebridge UI",
4
- "version": "5.9.1-beta.0",
4
+ "type": "module",
5
+ "version": "5.9.1-beta.10",
5
6
  "description": "A web based management, configuration and control platform for Homebridge.",
6
7
  "author": "oznu <dev@oz.nu>",
7
8
  "license": "MIT",
@@ -65,11 +66,11 @@
65
66
  "check": "npm run check:server && npm run check:ui",
66
67
  "check:server": "npm install && npm outdated",
67
68
  "check:ui": "npm install --prefix ui && npm outdated --prefix ui",
68
- "lang-sync": "ts-node scripts/lang-sync.ts",
69
+ "lang-sync": "tsx scripts/lang-sync.ts",
69
70
  "lint": "eslint . --max-warnings=0",
70
71
  "lint:fix": "npm run lint -- --fix",
71
72
  "prepublishOnly": "npm i --package-lock-only && npm run lint && npm run build",
72
- "start": "ts-node -r tsconfig-paths/register src/main.ts",
73
+ "start": "tsx src/main.ts",
73
74
  "test": "vitest run",
74
75
  "test-coverage": "npm run test -- --coverage",
75
76
  "upgrade-install": "./scripts/upgrade-install.sh",
@@ -92,14 +93,14 @@
92
93
  "@nestjs/platform-socket.io": "11.1.8",
93
94
  "@nestjs/swagger": "11.2.1",
94
95
  "@nestjs/websockets": "11.1.8",
95
- "axios": "1.13.1",
96
+ "axios": "1.13.2",
96
97
  "bash-color": "0.0.4",
97
98
  "bonjour-service": "1.3.0",
98
99
  "class-transformer": "0.5.1",
99
100
  "class-validator": "0.14.2",
100
101
  "commander": "14.0.2",
101
102
  "dayjs": "1.11.19",
102
- "fastify": "5.6.1",
103
+ "fastify": "5.6.2",
103
104
  "fs-extra": "11.3.2",
104
105
  "jsonwebtoken": "9.0.2",
105
106
  "lodash": "4.17.21",
@@ -126,7 +127,7 @@
126
127
  "@prettier/plugin-xml": "^3.4.2",
127
128
  "@types/fs-extra": "^11.0.4",
128
129
  "@types/lodash": "^4.17.20",
129
- "@types/node": "^24.9.2",
130
+ "@types/node": "^24.10.0",
130
131
  "@types/node-forge": "^1.3.11",
131
132
  "@types/node-schedule": "^2.1.8",
132
133
  "@types/passport-jwt": "^4.0.1",
@@ -134,22 +135,23 @@
134
135
  "@types/tail": "^2.2.3",
135
136
  "@types/tcp-port-used": "^1.0.4",
136
137
  "@types/unzipper": "^0.10.11",
137
- "@vitest/coverage-v8": "^4.0.6",
138
+ "@vitest/coverage-v8": "^4.0.8",
138
139
  "concurrently": "^9.2.1",
139
140
  "eslint-plugin-format": "^1.0.2",
140
141
  "form-data": "^4.0.4",
141
142
  "nodemon": "^3.1.10",
142
143
  "rimraf": "^6.1.0",
143
- "ts-loader": "^9.5.4",
144
- "ts-node": "^10.9.2",
145
- "tsconfig-paths": "^4.2.0",
144
+ "tsx": "^4.20.6",
146
145
  "typescript": "^5.9.3",
147
146
  "unplugin-swc": "^1.5.8",
148
- "vitest": "^4.0.6"
147
+ "vitest": "^4.0.8"
149
148
  },
150
149
  "overrides": {
151
150
  "@homebridge/hap-client": {
152
- "axios": "1.13.1"
151
+ "axios": "1.13.2"
152
+ },
153
+ "@nestjs/platform-fastify": {
154
+ "fastify": "5.6.2"
153
155
  }
154
156
  },
155
157
  "maintainers": [
@@ -1316,32 +1316,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1316
1316
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1317
1317
  SOFTWARE.
1318
1318
 
1319
- --------------------------------------------------------------------------------
1320
- Package: @angular/router
1321
- License: "MIT"
1322
-
1323
- The MIT License
1324
-
1325
- Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
1326
-
1327
- Permission is hereby granted, free of charge, to any person obtaining a copy
1328
- of this software and associated documentation files (the "Software"), to deal
1329
- in the Software without restriction, including without limitation the rights
1330
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1331
- copies of the Software, and to permit persons to whom the Software is
1332
- furnished to do so, subject to the following conditions:
1333
-
1334
- The above copyright notice and this permission notice shall be included in
1335
- all copies or substantial portions of the Software.
1336
-
1337
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1338
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1339
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1340
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1341
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1342
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1343
- THE SOFTWARE.
1344
-
1345
1319
  --------------------------------------------------------------------------------
1346
1320
  Package: dayjs
1347
1321
  License: "MIT"
@@ -1407,6 +1381,32 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1407
1381
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1408
1382
  SOFTWARE.
1409
1383
 
1384
+ --------------------------------------------------------------------------------
1385
+ Package: @angular/router
1386
+ License: "MIT"
1387
+
1388
+ The MIT License
1389
+
1390
+ Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
1391
+
1392
+ Permission is hereby granted, free of charge, to any person obtaining a copy
1393
+ of this software and associated documentation files (the "Software"), to deal
1394
+ in the Software without restriction, including without limitation the rights
1395
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1396
+ copies of the Software, and to permit persons to whom the Software is
1397
+ furnished to do so, subject to the following conditions:
1398
+
1399
+ The above copyright notice and this permission notice shall be included in
1400
+ all copies or substantial portions of the Software.
1401
+
1402
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1403
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1404
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1405
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1406
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1407
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1408
+ THE SOFTWARE.
1409
+
1410
1410
  --------------------------------------------------------------------------------
1411
1411
  Package: rxjs
1412
1412
  License: "Apache-2.0"
@@ -1 +1 @@
1
- import{a as T}from"./chunk-IKY3F7MM.js";import"./chunk-EYO3XCE2.js";import{e as $}from"./chunk-WMGV3KS6.js";import{b as S}from"./chunk-IBO6BDNZ.js";import{k as g,l as _,n as E,q as y}from"./chunk-I3QQTGGZ.js";import{$b as s,Ab as r,Bb as i,Cb as u,Nb as v,Qa as n,_b as a,db as h,na as o,qb as c,rb as d,rc as m,sc as l}from"./chunk-JWCVCB6V.js";function C(t,f){if(t&1&&(r(0,"div",7),a(1),i()),t&2){let e=v();n(),s(e.error)}}function w(t,f){t&1&&(r(0,"p",9),a(1),m(2,"translate"),i(),r(3,"div",10)(4,"div",11),u(5,"i",12),i()()),t&2&&(n(),s(l(2,1,"restart.please_wait_while_server_restarts")))}function k(t,f){t&1&&(r(0,"div",8),a(1),m(2,"translate"),i()),t&2&&(n(),s(l(2,1,"platform.linux.long_time")))}var z=(()=>{class t{$api=o(y);$router=o($);$settings=o(S);$toastr=o(E);$translate=o(g);$ws=o(T);checkTimeout;checkDelay;io;resp={};timeout=!1;error=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/linux/restart-host",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{console.error(e),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="ok"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.linux.server_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},3e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("platform.linux.server_taking_long_time"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},12e4)}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=h({type:t,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-spinner","fa-spin"]],template:function(p,x){p&1&&(r(0,"div",0)(1,"h3",1),a(2),m(3,"translate"),i()(),r(4,"div",2)(5,"div",3),u(6,"i",4),i(),r(7,"div",5)(8,"h4",6),a(9),m(10,"translate"),i(),c(11,C,2,1,"div",7)(12,w,6,3),c(13,k,3,3,"div",8),i()()),p&2&&(n(2),s(l(3,4,"menu.restart.title")),n(7),s(l(10,6,"platform.linux.restarting_server")),n(2),d(x.error?11:12),n(2),d(x.timeout?13:-1))},dependencies:[_],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{z as RestartLinuxComponent};
1
+ import{a as T}from"./chunk-T3SFHTRG.js";import"./chunk-IHMVNP7Y.js";import{b as S}from"./chunk-KAZYWBPX.js";import{k as g,l as _,n as E,q as y}from"./chunk-AZIULTML.js";import{e as $}from"./chunk-MNT5ZGV3.js";import{$b as s,Ab as r,Bb as i,Cb as u,Nb as v,Qa as n,_b as a,db as h,na as o,qb as c,rb as d,sc as m,tc as l}from"./chunk-RERUZJD4.js";function C(t,f){if(t&1&&(r(0,"div",7),a(1),i()),t&2){let e=v();n(),s(e.error)}}function w(t,f){t&1&&(r(0,"p",9),a(1),m(2,"translate"),i(),r(3,"div",10)(4,"div",11),u(5,"i",12),i()()),t&2&&(n(),s(l(2,1,"restart.please_wait_while_server_restarts")))}function k(t,f){t&1&&(r(0,"div",8),a(1),m(2,"translate"),i()),t&2&&(n(),s(l(2,1,"platform.linux.long_time")))}var z=(()=>{class t{$api=o(y);$router=o($);$settings=o(S);$toastr=o(E);$translate=o(g);$ws=o(T);checkTimeout;checkDelay;io;resp={};timeout=!1;error=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/linux/restart-host",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{console.error(e),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="ok"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.linux.server_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},3e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("platform.linux.server_taking_long_time"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},12e4)}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=h({type:t,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-spinner","fa-spin"]],template:function(p,x){p&1&&(r(0,"div",0)(1,"h3",1),a(2),m(3,"translate"),i()(),r(4,"div",2)(5,"div",3),u(6,"i",4),i(),r(7,"div",5)(8,"h4",6),a(9),m(10,"translate"),i(),c(11,C,2,1,"div",7)(12,w,6,3),c(13,k,3,3,"div",8),i()()),p&2&&(n(2),s(l(3,4,"menu.restart.title")),n(7),s(l(10,6,"platform.linux.restarting_server")),n(2),d(x.error?11:12),n(2),d(x.timeout?13:-1))},dependencies:[_],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{z as RestartLinuxComponent};
@@ -1 +1 @@
1
- import{k as v,l as E,n as _,q as h}from"./chunk-I3QQTGGZ.js";import{$b as a,Ab as i,Bb as e,Cb as f,Nb as u,Qa as n,_b as o,db as d,na as l,qb as c,rb as x,rc as p,sc as s}from"./chunk-JWCVCB6V.js";function y(t,w){if(t&1&&(i(0,"div",7),o(1),e()),t&2){let r=u();n(),a(r.error)}}function C(t,w){t&1&&(i(0,"p",8),o(1),p(2,"translate"),e()),t&2&&(n(),a(s(2,1,"platform.linux.server_will_power_down")))}var B=(()=>{class t{$api=l(h);$toastr=l(_);$translate=l(v);error=!1;ngOnInit(){this.$api.put("/platform-tools/linux/shutdown-host",{}).subscribe({error:r=>{console.error(r),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(m){return new(m||t)};static \u0275cmp=d({type:t,selectors:[["ng-component"]],decls:13,vars:7,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"grey-text"]],template:function(m,S){m&1&&(i(0,"div",0)(1,"h3",1),o(2),p(3,"translate"),e()(),i(4,"div",2)(5,"div",3),f(6,"i",4),e(),i(7,"div",5)(8,"h4",6),o(9),p(10,"translate"),e(),c(11,y,2,1,"div",7)(12,C,3,3,"p",8),e()()),m&2&&(n(2),a(s(3,3,"menu.restart.title")),n(7),a(s(10,5,"platform.linux.shutting_down_server")),n(2),x(S.error?11:12))},dependencies:[E],encapsulation:2})}return t})();export{B as ShutdownLinuxComponent};
1
+ import{k as v,l as E,n as _,q as h}from"./chunk-AZIULTML.js";import{$b as a,Ab as i,Bb as e,Cb as f,Nb as u,Qa as n,_b as o,db as d,na as l,qb as c,rb as x,sc as p,tc as s}from"./chunk-RERUZJD4.js";function y(t,w){if(t&1&&(i(0,"div",7),o(1),e()),t&2){let r=u();n(),a(r.error)}}function C(t,w){t&1&&(i(0,"p",8),o(1),p(2,"translate"),e()),t&2&&(n(),a(s(2,1,"platform.linux.server_will_power_down")))}var B=(()=>{class t{$api=l(h);$toastr=l(_);$translate=l(v);error=!1;ngOnInit(){this.$api.put("/platform-tools/linux/shutdown-host",{}).subscribe({error:r=>{console.error(r),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(m){return new(m||t)};static \u0275cmp=d({type:t,selectors:[["ng-component"]],decls:13,vars:7,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"grey-text"]],template:function(m,S){m&1&&(i(0,"div",0)(1,"h3",1),o(2),p(3,"translate"),e()(),i(4,"div",2)(5,"div",3),f(6,"i",4),e(),i(7,"div",5)(8,"h4",6),o(9),p(10,"translate"),e(),c(11,y,2,1,"div",7)(12,C,3,3,"p",8),e()()),m&2&&(n(2),a(s(3,3,"menu.restart.title")),n(7),a(s(10,5,"platform.linux.shutting_down_server")),n(2),x(S.error?11:12))},dependencies:[E],encapsulation:2})}return t})();export{B as ShutdownLinuxComponent};
@@ -1 +1 @@
1
- import{e as n}from"./chunk-WMGV3KS6.js";import{b as s}from"./chunk-IBO6BDNZ.js";import{h as r,ia as o,na as e,x as i}from"./chunk-JWCVCB6V.js";var l=(()=>{class t{$router=e(n);$settings=e(s);canActivate(){return r(this,null,function*(){return this.$settings.settingsLoaded||(yield i(this.$settings.onSettingsLoaded)),this.$settings.env.setupWizardComplete===!1||this.$router.navigate(["/"]),!0})}static \u0275fac=function(a){return new(a||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{l as a};
1
+ import{b as s}from"./chunk-KAZYWBPX.js";import{e as n}from"./chunk-MNT5ZGV3.js";import{h as r,ia as o,na as e,x as i}from"./chunk-RERUZJD4.js";var l=(()=>{class t{$router=e(n);$settings=e(s);canActivate(){return r(this,null,function*(){return this.$settings.settingsLoaded||(yield i(this.$settings.onSettingsLoaded)),this.$settings.env.setupWizardComplete===!1||this.$router.navigate(["/"]),!0})}static \u0275fac=function(a){return new(a||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{l as a};
@@ -1 +1 @@
1
- import{b as c}from"./chunk-EYO3XCE2.js";import{p as r}from"./chunk-I3QQTGGZ.js";import{h as i,ia as a,na as o}from"./chunk-JWCVCB6V.js";var h=(()=>{class t{cache=null;CACHE_DURATION_MS=6e4;getToken(){let n=Date.now();if(this.cache&&n-this.cache.timestamp<this.CACHE_DURATION_MS)return this.cache.token;let e=window.localStorage.getItem(r.jwt.tokenKey);return this.cache={token:e,timestamp:n},e}invalidateCache(){this.cache=null}static \u0275fac=function(e){return new(e||t)};static \u0275prov=a({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var p=(()=>{class t{$auth=o(c);$tokenCache=o(h);isAuthenticated(){return i(this,null,function*(){if(!this.$tokenCache.getToken())return this.$auth.token=null,this.$auth.user={},this.$tokenCache.invalidateCache(),!1;try{let e=this.$auth.isLoggedIn();return e||(this.$auth.token=null,this.$auth.user={},this.$tokenCache.invalidateCache()),e}catch{return console.warn("Token validation error, clearing auth state"),this.$auth.logout(),this.$tokenCache.invalidateCache(),!1}})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=a({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{h as a,p as b};
1
+ import{b as c}from"./chunk-IHMVNP7Y.js";import{p as r}from"./chunk-AZIULTML.js";import{h as i,ia as a,na as o}from"./chunk-RERUZJD4.js";var h=(()=>{class t{cache=null;CACHE_DURATION_MS=6e4;getToken(){let n=Date.now();if(this.cache&&n-this.cache.timestamp<this.CACHE_DURATION_MS)return this.cache.token;let e=window.localStorage.getItem(r.jwt.tokenKey);return this.cache={token:e,timestamp:n},e}invalidateCache(){this.cache=null}static \u0275fac=function(e){return new(e||t)};static \u0275prov=a({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var p=(()=>{class t{$auth=o(c);$tokenCache=o(h);isAuthenticated(){return i(this,null,function*(){if(!this.$tokenCache.getToken())return this.$auth.token=null,this.$auth.user={},this.$tokenCache.invalidateCache(),!1;try{let e=this.$auth.isLoggedIn();return e||(this.$auth.token=null,this.$auth.user={},this.$tokenCache.invalidateCache()),e}catch{return console.warn("Token validation error, clearing auth state"),this.$auth.logout(),this.$tokenCache.invalidateCache(),!1}})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=a({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{h as a,p as b};
@@ -1 +1 @@
1
- import{g as l}from"./chunk-DIWD6B4C.js";import{l as c}from"./chunk-I3QQTGGZ.js";import{La as i,db as r,mc as s,rc as a,tc as m,wb as o,zb as p}from"./chunk-JWCVCB6V.js";var f=(e,d)=>({github:e,discord:d}),k=(()=>{class e{linkGithub='<a href="https://github.com/homebridge/homebridge-config-ui-x/issues/new?template=feature-request.yml" target="_blank" rel="noopener noreferrer">GitHub</a>';linkDiscord='<a href="https://discord.gg/kqNCe2D" target="_blank" rel="noopener noreferrer">Discord</a>';static \u0275fac=function(t){return new(t||e)};static \u0275cmp=r({type:e,selectors:[["app-support-banner"]],decls:2,vars:8,consts:[["type","info",1,"mt-3","mb-0","grey-text","small",3,"dismissible","innerHtml"]],template:function(t,n){t&1&&(p(0,"ngb-alert",0),a(1,"translate")),t&2&&o("dismissible",!1)("innerHtml",m(1,2,"common.phrases.support",s(5,f,n.linkGithub,n.linkDiscord)),i)},dependencies:[l,c],encapsulation:2})}return e})();export{k as a};
1
+ import{h as l}from"./chunk-XQCLQKCG.js";import{l as c}from"./chunk-AZIULTML.js";import{La as i,db as r,nc as s,sc as a,uc as m,wb as o,zb as p}from"./chunk-RERUZJD4.js";var f=(e,d)=>({github:e,discord:d}),k=(()=>{class e{linkGithub='<a href="https://github.com/homebridge/homebridge-config-ui-x/issues/new?template=feature-request.yml" target="_blank" rel="noopener noreferrer">GitHub</a>';linkDiscord='<a href="https://discord.gg/kqNCe2D" target="_blank" rel="noopener noreferrer">Discord</a>';static \u0275fac=function(t){return new(t||e)};static \u0275cmp=r({type:e,selectors:[["app-support-banner"]],decls:2,vars:8,consts:[["type","info",1,"mt-3","mb-0","grey-text","small",3,"dismissible","innerHtml"]],template:function(t,n){t&1&&(p(0,"ngb-alert",0),a(1,"translate")),t&2&&o("dismissible",!1)("innerHtml",m(1,2,"common.phrases.support",s(5,f,n.linkGithub,n.linkDiscord)),i)},dependencies:[l,c],encapsulation:2})}return e})();export{k as a};
@@ -1 +1 @@
1
- import{h as i}from"./chunk-WMGV3KS6.js";import{eb as r,ja as o}from"./chunk-JWCVCB6V.js";var m=[{path:"",loadComponent:()=>import("./chunk-4DVF333O.js").then(t=>t.SupportComponent)}],n=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[i.forChild(m),i]})}return t})();var s=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[n]})}return t})();export{s as SupportModule};
1
+ import{h as i}from"./chunk-MNT5ZGV3.js";import{eb as r,ja as o}from"./chunk-RERUZJD4.js";var m=[{path:"",loadComponent:()=>import("./chunk-LN3BMCV4.js").then(t=>t.SupportComponent)}],n=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[i.forChild(m),i]})}return t})();var s=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[n]})}return t})();export{s as SupportModule};
@@ -1 +1 @@
1
- import{a as P}from"./chunk-IKY3F7MM.js";import"./chunk-EYO3XCE2.js";import{e as D}from"./chunk-WMGV3KS6.js";import{b as F}from"./chunk-IBO6BDNZ.js";import{k as E,l as R,n as B,q as U}from"./chunk-I3QQTGGZ.js";import{$b as p,Ec as I,Ib as S,Lb as k,Nb as u,Qa as r,Qc as O,_b as a,ac as x,db as y,h as b,lc as T,mc as g,na as d,qb as h,rb as _,rc as l,sa as $,sc as c,ta as w,wb as f,x as C,xb as s,yb as n,zb as v}from"./chunk-JWCVCB6V.js";var W=(e,m)=>({"fas fa-spinner fa-spin":e,"far fa-check-circle":m}),M=e=>({"grey-text":e}),V=(e,m)=>({"far fa-circle":e,"fas fa-spinner fa-spin":m});function j(e,m){if(e&1&&(s(0,"div",7),a(1),n()),e&2){let t=u();r(),p(t.error)}}function q(e,m){if(e&1&&(s(0,"p",9),a(1),l(2,"translate"),n(),s(3,"div",10)(4,"div",11)(5,"span"),v(6,"i",12),a(7),l(8,"translate"),n()(),s(9,"div",11)(10,"span",12),v(11,"i",12),a(12),l(13,"translate"),n()()()),e&2){let t=u();r(),p(c(2,6,"restart.please_wait_while_server_restarts")),r(5),f("ngClass",g(12,W,!t.uiOnline,t.uiOnline)),r(),x(" ",c(8,8,"restart.ui_online")," "),r(3),f("ngClass",T(15,M,!t.uiOnline)),r(),f("ngClass",g(17,V,!t.uiOnline,t.uiOnline)),r(),x(" ",c(13,10,"restart.service_ready")," ")}}function z(e,m){if(e&1){let t=S();s(0,"p",15)(1,"button",16),k("click",function(){$(t);let o=u(2);return w(o.viewLogs())}),a(2),l(3,"translate"),n()()}e&2&&(r(2),p(c(3,1,"menu.tooltip_view_logs")))}function A(e,m){if(e&1&&(s(0,"div",8)(1,"p"),a(2),l(3,"translate"),n(),s(4,"p",13),a(5),l(6,"translate"),s(7,"span",14),a(8),n()(),h(9,z,4,3,"p",15),n()),e&2){let t=u();r(2),p(c(3,4,"restart.server_is_taking_long_time_to_restart")),r(3),x(" ",c(6,6,"restart.label_restart_command_executed"),": "),r(3),p(t.resp.command||"End Process"),r(),_(t.uiOnline?9:-1)}}var et=(()=>{class e{$api=d(U);$router=d(D);$settings=d(F);$toastr=d(B);$translate=d(E);$ws=d(P);checkTimeout;checkDelay;io;webrootChanged=!1;uiOnline=!1;error=!1;resp={};timeout=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$router.parseUrl(this.$router.url).queryParams.restarting==="true"?(this.uiOnline=!0,this.checkIfServerUp()):this.performRestart()}viewLogs(){this.$router.navigate(["/logs"])}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}performRestart(){return b(this,null,function*(){try{let t=this.$settings.originalWebroot||"",i=this.$settings.webroot||"";this.webrootChanged=t!==i&&t!==globalThis.webroot.errorCode,this.webrootChanged&&(yield C(this.$api.put("/server/webroot",{webroot:i}))),this.$api.put("/server/restart",{}).subscribe({next:o=>{this.resp=o,this.checkIfServerUp(),o.restartingUI||(this.uiOnline=!0)},error:o=>{console.error(o),this.error=this.$translate.instant("restart.toast_server_restart_error"),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}catch(t){console.error("Failed to update webroot:",t),this.$api.put("/server/restart",{}).subscribe({next:i=>{this.resp=i,this.checkIfServerUp(),i.restartingUI||(this.uiOnline=!0)},error:i=>{console.error(i),this.error=this.$translate.instant("restart.toast_server_restart_error"),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}})}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",t=>{if(this.uiOnline=!0,t.status==="ok"||t.status==="pending")if(this.$toastr.success(this.$translate.instant("restart.toast_server_restarted"),this.$translate.instant("toast.title_success")),this.webrootChanged&&!I()){let i=this.$settings.webroot?.replace(/^\/+|\/+$/g,"")||"";window.location.href=i?`/${i}/`:"/"}else this.$router.navigate(["/"])})},7e3),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("restart.toast_server_restart_timeout"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},4e4)}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=y({type:e,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[3,"ngClass"],[1,"grey-text","mb-0"],[1,"font-monospace"],[1,"mt-2","mb-0"],[1,"btn","btn-primary","mb-0",3,"click"]],template:function(i,o){i&1&&(s(0,"div",0)(1,"h3",1),a(2),l(3,"translate"),n()(),s(4,"div",2)(5,"div",3),v(6,"i",4),n(),s(7,"div",5)(8,"h4",6),a(9),l(10,"translate"),n(),h(11,j,2,1,"div",7)(12,q,14,20),h(13,A,10,8,"div",8),n()()),i&2&&(r(2),p(c(3,4,"menu.restart.title")),r(7),p(c(10,6,"restart.title_restart")),r(2),_(o.error?11:12),r(2),_(o.timeout?13:-1))},dependencies:[O,R],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return e})();export{et as RestartComponent};
1
+ import{a as P}from"./chunk-T3SFHTRG.js";import"./chunk-IHMVNP7Y.js";import{b as F}from"./chunk-KAZYWBPX.js";import{k as E,l as R,n as B,q as U}from"./chunk-AZIULTML.js";import{e as D}from"./chunk-MNT5ZGV3.js";import{$b as p,Fc as I,Ib as S,Lb as k,Nb as u,Qa as r,Rc as O,_b as a,ac as x,db as y,h as b,mc as T,na as d,nc as g,qb as h,rb as _,sa as $,sc as l,ta as w,tc as c,wb as f,x as C,xb as s,yb as n,zb as v}from"./chunk-RERUZJD4.js";var W=(e,m)=>({"fas fa-spinner fa-spin":e,"far fa-check-circle":m}),M=e=>({"grey-text":e}),V=(e,m)=>({"far fa-circle":e,"fas fa-spinner fa-spin":m});function j(e,m){if(e&1&&(s(0,"div",7),a(1),n()),e&2){let t=u();r(),p(t.error)}}function q(e,m){if(e&1&&(s(0,"p",9),a(1),l(2,"translate"),n(),s(3,"div",10)(4,"div",11)(5,"span"),v(6,"i",12),a(7),l(8,"translate"),n()(),s(9,"div",11)(10,"span",12),v(11,"i",12),a(12),l(13,"translate"),n()()()),e&2){let t=u();r(),p(c(2,6,"restart.please_wait_while_server_restarts")),r(5),f("ngClass",g(12,W,!t.uiOnline,t.uiOnline)),r(),x(" ",c(8,8,"restart.ui_online")," "),r(3),f("ngClass",T(15,M,!t.uiOnline)),r(),f("ngClass",g(17,V,!t.uiOnline,t.uiOnline)),r(),x(" ",c(13,10,"restart.service_ready")," ")}}function z(e,m){if(e&1){let t=S();s(0,"p",15)(1,"button",16),k("click",function(){$(t);let o=u(2);return w(o.viewLogs())}),a(2),l(3,"translate"),n()()}e&2&&(r(2),p(c(3,1,"menu.tooltip_view_logs")))}function A(e,m){if(e&1&&(s(0,"div",8)(1,"p"),a(2),l(3,"translate"),n(),s(4,"p",13),a(5),l(6,"translate"),s(7,"span",14),a(8),n()(),h(9,z,4,3,"p",15),n()),e&2){let t=u();r(2),p(c(3,4,"restart.server_is_taking_long_time_to_restart")),r(3),x(" ",c(6,6,"restart.label_restart_command_executed"),": "),r(3),p(t.resp.command||"End Process"),r(),_(t.uiOnline?9:-1)}}var et=(()=>{class e{$api=d(U);$router=d(D);$settings=d(F);$toastr=d(B);$translate=d(E);$ws=d(P);checkTimeout;checkDelay;io;webrootChanged=!1;uiOnline=!1;error=!1;resp={};timeout=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$router.parseUrl(this.$router.url).queryParams.restarting==="true"?(this.uiOnline=!0,this.checkIfServerUp()):this.performRestart()}viewLogs(){this.$router.navigate(["/logs"])}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}performRestart(){return b(this,null,function*(){try{let t=this.$settings.originalWebroot||"",i=this.$settings.webroot||"";this.webrootChanged=t!==i&&t!==globalThis.webroot.errorCode,this.webrootChanged&&(yield C(this.$api.put("/server/webroot",{webroot:i}))),this.$api.put("/server/restart",{}).subscribe({next:o=>{this.resp=o,this.checkIfServerUp(),o.restartingUI||(this.uiOnline=!0)},error:o=>{console.error(o),this.error=this.$translate.instant("restart.toast_server_restart_error"),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}catch(t){console.error("Failed to update webroot:",t),this.$api.put("/server/restart",{}).subscribe({next:i=>{this.resp=i,this.checkIfServerUp(),i.restartingUI||(this.uiOnline=!0)},error:i=>{console.error(i),this.error=this.$translate.instant("restart.toast_server_restart_error"),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}})}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",t=>{if(this.uiOnline=!0,t.status==="ok"||t.status==="pending")if(this.$toastr.success(this.$translate.instant("restart.toast_server_restarted"),this.$translate.instant("toast.title_success")),this.webrootChanged&&!I()){let i=this.$settings.webroot?.replace(/^\/+|\/+$/g,"")||"";window.location.href=i?`/${i}/`:"/"}else this.$router.navigate(["/"])})},7e3),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("restart.toast_server_restart_timeout"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},4e4)}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=y({type:e,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[3,"ngClass"],[1,"grey-text","mb-0"],[1,"font-monospace"],[1,"mt-2","mb-0"],[1,"btn","btn-primary","mb-0",3,"click"]],template:function(i,o){i&1&&(s(0,"div",0)(1,"h3",1),a(2),l(3,"translate"),n()(),s(4,"div",2)(5,"div",3),v(6,"i",4),n(),s(7,"div",5)(8,"h4",6),a(9),l(10,"translate"),n(),h(11,j,2,1,"div",7)(12,q,14,20),h(13,A,10,8,"div",8),n()()),i&2&&(r(2),p(c(3,4,"menu.restart.title")),r(7),p(c(10,6,"restart.title_restart")),r(2),_(o.error?11:12),r(2),_(o.timeout?13:-1))},dependencies:[O,R],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return e})();export{et as RestartComponent};
@@ -1,4 +1,4 @@
1
- import{a as ce,e as ge}from"./chunk-JWCVCB6V.js";var ye=ge((le,me)=>{(function(Z,q){typeof le=="object"&&typeof me=="object"?me.exports=q():typeof define=="function"&&define.amd?define([],q):typeof le=="object"?le.FitAddon=q():Z.FitAddon=q()})(self,()=>(()=>{"use strict";var Z={};return(()=>{var q=Z;Object.defineProperty(q,"__esModule",{value:!0}),q.FitAddon=void 0,q.FitAddon=class{activate(K){this._terminal=K}dispose(){}fit(){let K=this.proposeDimensions();if(!K||!this._terminal||isNaN(K.cols)||isNaN(K.rows))return;let J=this._terminal._core;this._terminal.rows===K.rows&&this._terminal.cols===K.cols||(J._renderService.clear(),this._terminal.resize(K.cols,K.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let K=this._terminal._core,J=K._renderService.dimensions;if(J.css.cell.width===0||J.css.cell.height===0)return;let B=this._terminal.options.scrollback===0?0:K.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(r.getPropertyValue("height")),l=Math.max(0,parseInt(r.getPropertyValue("width"))),u=window.getComputedStyle(this._terminal.element),n=o-(parseInt(u.getPropertyValue("padding-top"))+parseInt(u.getPropertyValue("padding-bottom"))),d=l-(parseInt(u.getPropertyValue("padding-right"))+parseInt(u.getPropertyValue("padding-left")))-B;return{cols:Math.max(2,Math.floor(d/J.css.cell.width)),rows:Math.max(1,Math.floor(n/J.css.cell.height))}}}})(),Z})())});var Ee=ge((de,Se)=>{(function(Z,q){typeof de=="object"&&typeof Se=="object"?Se.exports=q():typeof define=="function"&&define.amd?define([],q):typeof de=="object"?de.WebLinksAddon=q():Z.WebLinksAddon=q()})(self,()=>(()=>{"use strict";var Z={6:(B,r)=>{function o(u){try{let n=new URL(u),d=n.password&&n.username?`${n.protocol}//${n.username}:${n.password}@${n.host}`:n.username?`${n.protocol}//${n.username}@${n.host}`:`${n.protocol}//${n.host}`;return u.toLocaleLowerCase().startsWith(d.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(r,"__esModule",{value:!0}),r.LinkComputer=r.WebLinkProvider=void 0,r.WebLinkProvider=class{constructor(u,n,d,_={}){this._terminal=u,this._regex=n,this._handler=d,this._options=_}provideLinks(u,n){let d=l.computeLink(u,this._regex,this._terminal,this._handler);n(this._addCallbacks(d))}_addCallbacks(u){return u.map(n=>(n.leave=this._options.leave,n.hover=(d,_)=>{if(this._options.hover){let{range:p}=n;this._options.hover(d,_,p)}},n))}};class l{static computeLink(n,d,_,p){let h=new RegExp(d.source,(d.flags||"")+"g"),[t,s]=l._getWindowedLineStrings(n-1,_),e=t.join(""),i,a=[];for(;i=h.exec(e);){let f=i[0];if(!o(f))continue;let[v,g]=l._mapStrIdx(_,s,0,i.index),[c,m]=l._mapStrIdx(_,v,g,f.length);if(v===-1||g===-1||c===-1||m===-1)continue;let E={start:{x:g+1,y:v+1},end:{x:m,y:c+1}};a.push({range:E,text:f,activate:p})}return a}static _getWindowedLineStrings(n,d){let _,p=n,h=n,t=0,s="",e=[];if(_=d.buffer.active.getLine(n)){let i=_.translateToString(!0);if(_.isWrapped&&i[0]!==" "){for(t=0;(_=d.buffer.active.getLine(--p))&&t<2048&&(s=_.translateToString(!0),t+=s.length,e.push(s),_.isWrapped&&s.indexOf(" ")===-1););e.reverse()}for(e.push(i),t=0;(_=d.buffer.active.getLine(++h))&&_.isWrapped&&t<2048&&(s=_.translateToString(!0),t+=s.length,e.push(s),s.indexOf(" ")===-1););}return[e,p]}static _mapStrIdx(n,d,_,p){let h=n.buffer.active,t=h.getNullCell(),s=_;for(;p;){let e=h.getLine(d);if(!e)return[-1,-1];for(let i=s;i<e.length;++i){e.getCell(i,t);let a=t.getChars();if(t.getWidth()&&(p-=a.length||1,i===e.length-1&&a==="")){let f=h.getLine(d+1);f&&f.isWrapped&&(f.getCell(0,t),t.getWidth()===2&&(p+=1))}if(p<0)return[d,i]}d++,s=0}return[d,s]}}r.LinkComputer=l}},q={};function K(B){var r=q[B];if(r!==void 0)return r.exports;var o=q[B]={exports:{}};return Z[B](o,o.exports,K),o.exports}var J={};return(()=>{var B=J;Object.defineProperty(B,"__esModule",{value:!0}),B.WebLinksAddon=void 0;let r=K(6),o=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function l(u,n){let d=window.open();if(d){try{d.opener=null}catch{}d.location.href=n}else console.warn("Opening link blocked as opener could not be cleared")}B.WebLinksAddon=class{constructor(u=l,n={}){this._handler=u,this._options=n}activate(u){this._terminal=u;let n=this._options,d=n.urlRegex||o;this._linkProvider=this._terminal.registerLinkProvider(new r.WebLinkProvider(this._terminal,d,this._handler,n))}dispose(){this._linkProvider?.dispose()}}})(),J})())});var ke=ge((_e,Ce)=>{(function(Z,q){if(typeof _e=="object"&&typeof Ce=="object")Ce.exports=q();else if(typeof define=="function"&&define.amd)define([],q);else{var K=q();for(var J in K)(typeof _e=="object"?_e:Z)[J]=K[J]}})(globalThis,()=>(()=>{"use strict";var Z={4567:function(B,r,o){var l=this&&this.__decorate||function(e,i,a,f){var v,g=arguments.length,c=g<3?i:f===null?f=Object.getOwnPropertyDescriptor(i,a):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(e,i,a,f);else for(var m=e.length-1;m>=0;m--)(v=e[m])&&(c=(g<3?v(c):g>3?v(i,a,c):v(i,a))||c);return g>3&&c&&Object.defineProperty(i,a,c),c},u=this&&this.__param||function(e,i){return function(a,f){i(a,f,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;let n=o(9042),d=o(9924),_=o(844),p=o(4725),h=o(2585),t=o(3656),s=r.AccessibilityManager=class extends _.Disposable{constructor(e,i,a,f){super(),this._terminal=e,this._coreBrowserService=a,this._renderService=f,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let v=0;v<this._terminal.rows;v++)this._rowElements[v]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[v]);if(this._topBoundaryFocusListener=v=>this._handleBoundaryFocus(v,0),this._bottomBoundaryFocusListener=v=>this._handleBoundaryFocus(v,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new d.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(v=>this._handleResize(v.rows))),this.register(this._terminal.onRender(v=>this._refreshRows(v.start,v.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(v=>this._handleChar(v))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
1
+ import{a as ce,e as ge}from"./chunk-RERUZJD4.js";var ye=ge((le,me)=>{(function(Z,q){typeof le=="object"&&typeof me=="object"?me.exports=q():typeof define=="function"&&define.amd?define([],q):typeof le=="object"?le.FitAddon=q():Z.FitAddon=q()})(self,()=>(()=>{"use strict";var Z={};return(()=>{var q=Z;Object.defineProperty(q,"__esModule",{value:!0}),q.FitAddon=void 0,q.FitAddon=class{activate(K){this._terminal=K}dispose(){}fit(){let K=this.proposeDimensions();if(!K||!this._terminal||isNaN(K.cols)||isNaN(K.rows))return;let J=this._terminal._core;this._terminal.rows===K.rows&&this._terminal.cols===K.cols||(J._renderService.clear(),this._terminal.resize(K.cols,K.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let K=this._terminal._core,J=K._renderService.dimensions;if(J.css.cell.width===0||J.css.cell.height===0)return;let B=this._terminal.options.scrollback===0?0:K.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(r.getPropertyValue("height")),l=Math.max(0,parseInt(r.getPropertyValue("width"))),u=window.getComputedStyle(this._terminal.element),n=o-(parseInt(u.getPropertyValue("padding-top"))+parseInt(u.getPropertyValue("padding-bottom"))),d=l-(parseInt(u.getPropertyValue("padding-right"))+parseInt(u.getPropertyValue("padding-left")))-B;return{cols:Math.max(2,Math.floor(d/J.css.cell.width)),rows:Math.max(1,Math.floor(n/J.css.cell.height))}}}})(),Z})())});var Ee=ge((de,Se)=>{(function(Z,q){typeof de=="object"&&typeof Se=="object"?Se.exports=q():typeof define=="function"&&define.amd?define([],q):typeof de=="object"?de.WebLinksAddon=q():Z.WebLinksAddon=q()})(self,()=>(()=>{"use strict";var Z={6:(B,r)=>{function o(u){try{let n=new URL(u),d=n.password&&n.username?`${n.protocol}//${n.username}:${n.password}@${n.host}`:n.username?`${n.protocol}//${n.username}@${n.host}`:`${n.protocol}//${n.host}`;return u.toLocaleLowerCase().startsWith(d.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(r,"__esModule",{value:!0}),r.LinkComputer=r.WebLinkProvider=void 0,r.WebLinkProvider=class{constructor(u,n,d,_={}){this._terminal=u,this._regex=n,this._handler=d,this._options=_}provideLinks(u,n){let d=l.computeLink(u,this._regex,this._terminal,this._handler);n(this._addCallbacks(d))}_addCallbacks(u){return u.map(n=>(n.leave=this._options.leave,n.hover=(d,_)=>{if(this._options.hover){let{range:p}=n;this._options.hover(d,_,p)}},n))}};class l{static computeLink(n,d,_,p){let h=new RegExp(d.source,(d.flags||"")+"g"),[t,s]=l._getWindowedLineStrings(n-1,_),e=t.join(""),i,a=[];for(;i=h.exec(e);){let f=i[0];if(!o(f))continue;let[v,g]=l._mapStrIdx(_,s,0,i.index),[c,m]=l._mapStrIdx(_,v,g,f.length);if(v===-1||g===-1||c===-1||m===-1)continue;let E={start:{x:g+1,y:v+1},end:{x:m,y:c+1}};a.push({range:E,text:f,activate:p})}return a}static _getWindowedLineStrings(n,d){let _,p=n,h=n,t=0,s="",e=[];if(_=d.buffer.active.getLine(n)){let i=_.translateToString(!0);if(_.isWrapped&&i[0]!==" "){for(t=0;(_=d.buffer.active.getLine(--p))&&t<2048&&(s=_.translateToString(!0),t+=s.length,e.push(s),_.isWrapped&&s.indexOf(" ")===-1););e.reverse()}for(e.push(i),t=0;(_=d.buffer.active.getLine(++h))&&_.isWrapped&&t<2048&&(s=_.translateToString(!0),t+=s.length,e.push(s),s.indexOf(" ")===-1););}return[e,p]}static _mapStrIdx(n,d,_,p){let h=n.buffer.active,t=h.getNullCell(),s=_;for(;p;){let e=h.getLine(d);if(!e)return[-1,-1];for(let i=s;i<e.length;++i){e.getCell(i,t);let a=t.getChars();if(t.getWidth()&&(p-=a.length||1,i===e.length-1&&a==="")){let f=h.getLine(d+1);f&&f.isWrapped&&(f.getCell(0,t),t.getWidth()===2&&(p+=1))}if(p<0)return[d,i]}d++,s=0}return[d,s]}}r.LinkComputer=l}},q={};function K(B){var r=q[B];if(r!==void 0)return r.exports;var o=q[B]={exports:{}};return Z[B](o,o.exports,K),o.exports}var J={};return(()=>{var B=J;Object.defineProperty(B,"__esModule",{value:!0}),B.WebLinksAddon=void 0;let r=K(6),o=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function l(u,n){let d=window.open();if(d){try{d.opener=null}catch{}d.location.href=n}else console.warn("Opening link blocked as opener could not be cleared")}B.WebLinksAddon=class{constructor(u=l,n={}){this._handler=u,this._options=n}activate(u){this._terminal=u;let n=this._options,d=n.urlRegex||o;this._linkProvider=this._terminal.registerLinkProvider(new r.WebLinkProvider(this._terminal,d,this._handler,n))}dispose(){this._linkProvider?.dispose()}}})(),J})())});var ke=ge((_e,Ce)=>{(function(Z,q){if(typeof _e=="object"&&typeof Ce=="object")Ce.exports=q();else if(typeof define=="function"&&define.amd)define([],q);else{var K=q();for(var J in K)(typeof _e=="object"?_e:Z)[J]=K[J]}})(globalThis,()=>(()=>{"use strict";var Z={4567:function(B,r,o){var l=this&&this.__decorate||function(e,i,a,f){var v,g=arguments.length,c=g<3?i:f===null?f=Object.getOwnPropertyDescriptor(i,a):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(e,i,a,f);else for(var m=e.length-1;m>=0;m--)(v=e[m])&&(c=(g<3?v(c):g>3?v(i,a,c):v(i,a))||c);return g>3&&c&&Object.defineProperty(i,a,c),c},u=this&&this.__param||function(e,i){return function(a,f){i(a,f,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;let n=o(9042),d=o(9924),_=o(844),p=o(4725),h=o(2585),t=o(3656),s=r.AccessibilityManager=class extends _.Disposable{constructor(e,i,a,f){super(),this._terminal=e,this._coreBrowserService=a,this._renderService=f,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let v=0;v<this._terminal.rows;v++)this._rowElements[v]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[v]);if(this._topBoundaryFocusListener=v=>this._handleBoundaryFocus(v,0),this._bottomBoundaryFocusListener=v=>this._handleBoundaryFocus(v,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new d.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(v=>this._handleResize(v.rows))),this.register(this._terminal.onRender(v=>this._refreshRows(v.start,v.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(v=>this._handleChar(v))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
2
2
  `))),this.register(this._terminal.onA11yTab(v=>this._handleTab(v))),this.register(this._terminal.onKey(v=>this._handleKey(v.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,t.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,_.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let i=0;i<e;i++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
3
3
  `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,i){this._liveRegionDebouncer.refresh(e,i,this._terminal.rows)}_renderRows(e,i){let a=this._terminal.buffer,f=a.lines.length.toString();for(let v=e;v<=i;v++){let g=a.lines.get(a.ydisp+v),c=[],m=g?.translateToString(!0,void 0,void 0,c)||"",E=(a.ydisp+v+1).toString(),k=this._rowElements[v];k&&(m.length===0?(k.innerText="\xA0",this._rowColumns.set(k,[0,1])):(k.textContent=m,this._rowColumns.set(k,c)),k.setAttribute("aria-posinset",E),k.setAttribute("aria-setsize",f))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,i){let a=e.target,f=this._rowElements[i===0?1:this._rowElements.length-2];if(a.getAttribute("aria-posinset")===(i===0?"1":`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==f)return;let v,g;if(i===0?(v=a,g=this._rowElements.pop(),this._rowContainer.removeChild(g)):(v=this._rowElements.shift(),g=a,this._rowContainer.removeChild(v)),v.removeEventListener("focus",this._topBoundaryFocusListener),g.removeEventListener("focus",this._bottomBoundaryFocusListener),i===0){let c=this._createAccessibilityTreeNode();this._rowElements.unshift(c),this._rowContainer.insertAdjacentElement("afterbegin",c)}else{let c=this._createAccessibilityTreeNode();this._rowElements.push(c),this._rowContainer.appendChild(c)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(i===0?-1:1),this._rowElements[i===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=document.getSelection();if(!e)return;if(e.isCollapsed)return void(this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection());if(!e.anchorNode||!e.focusNode)return void console.error("anchorNode and/or focusNode are null");let i={node:e.anchorNode,offset:e.anchorOffset},a={node:e.focusNode,offset:e.focusOffset};if((i.node.compareDocumentPosition(a.node)&Node.DOCUMENT_POSITION_PRECEDING||i.node===a.node&&i.offset>a.offset)&&([i,a]=[a,i]),i.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(i={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(i.node))return;let f=this._rowElements.slice(-1)[0];if(a.node.compareDocumentPosition(f)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(a={node:f,offset:f.textContent?.length??0}),!this._rowContainer.contains(a.node))return;let v=({node:m,offset:E})=>{let k=m instanceof Text?m.parentNode:m,D=parseInt(k?.getAttribute("aria-posinset"),10)-1;if(isNaN(D))return console.warn("row is invalid. Race condition?"),null;let b=this._rowColumns.get(k);if(!b)return console.warn("columns is null. Race condition?"),null;let x=E<b.length?b[E]:b.slice(-1)[0]+1;return x>=this._terminal.cols&&(++D,x=0),{row:D,column:x}},g=v(i),c=v(a);if(g&&c){if(g.row>c.row||g.row===c.row&&g.column>=c.column)throw new Error("invalid range");this._terminal.select(g.column,g.row,(c.row-g.row)*this._terminal.cols-g.column+c.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let i=this._rowContainer.children.length;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}};r.AccessibilityManager=s=l([u(1,h.IInstantiationService),u(2,p.ICoreBrowserService),u(3,p.IRenderService)],s)},3614:(B,r)=>{function o(d){return d.replace(/\r?\n/g,"\r")}function l(d,_){return _?"\x1B[200~"+d+"\x1B[201~":d}function u(d,_,p,h){d=l(d=o(d),p.decPrivateModes.bracketedPasteMode&&h.rawOptions.ignoreBracketedPasteMode!==!0),p.triggerDataEvent(d,!0),_.value=""}function n(d,_,p){let h=p.getBoundingClientRect(),t=d.clientX-h.left-10,s=d.clientY-h.top-10;_.style.width="20px",_.style.height="20px",_.style.left=`${t}px`,_.style.top=`${s}px`,_.style.zIndex="1000",_.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=o,r.bracketTextForPaste=l,r.copyHandler=function(d,_){d.clipboardData&&d.clipboardData.setData("text/plain",_.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,_,p,h){d.stopPropagation(),d.clipboardData&&u(d.clipboardData.getData("text/plain"),_,p,h)},r.paste=u,r.moveTextAreaUnderMouseCursor=n,r.rightClickHandler=function(d,_,p,h,t){n(d,_,p),t&&h.rightClickSelect(d),_.value=h.selectionText,_.select()}},7239:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;let l=o(1505);r.ColorContrastCache=class{constructor(){this._color=new l.TwoKeyMap,this._css=new l.TwoKeyMap}setCss(u,n,d){this._css.set(u,n,d)}getCss(u,n){return this._css.get(u,n)}setColor(u,n,d){this._color.set(u,n,d)}getColor(u,n){return this._color.get(u,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(o,l,u,n){o.addEventListener(l,u,n);let d=!1;return{dispose:()=>{d||(d=!0,o.removeEventListener(l,u,n))}}}},3551:function(B,r,o){var l=this&&this.__decorate||function(s,e,i,a){var f,v=arguments.length,g=v<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,i):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(s,e,i,a);else for(var c=s.length-1;c>=0;c--)(f=s[c])&&(g=(v<3?f(g):v>3?f(e,i,g):f(e,i))||g);return v>3&&g&&Object.defineProperty(e,i,g),g},u=this&&this.__param||function(s,e){return function(i,a){e(i,a,s)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier=void 0;let n=o(3656),d=o(8460),_=o(844),p=o(2585),h=o(4725),t=r.Linkifier=class extends _.Disposable{get currentLink(){return this._currentLink}constructor(s,e,i,a,f){super(),this._element=s,this._mouseService=e,this._renderService=i,this._bufferService=a,this._linkProviderService=f,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new d.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new d.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,_.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,_.toDisposable)(()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(s){this._lastMouseEvent=s;let e=this._positionFromMouseEvent(s,this._element,this._mouseService);if(!e)return;this._isMouseOut=!1;let i=s.composedPath();for(let a=0;a<i.length;a++){let f=i[a];if(f.classList.contains("xterm"))break;if(f.classList.contains("xterm-hover"))return}this._lastBufferCell&&e.x===this._lastBufferCell.x&&e.y===this._lastBufferCell.y||(this._handleHover(e),this._lastBufferCell=e)}_handleHover(s){if(this._activeLine!==s.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(s,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,s)||(this._clearCurrentLink(),this._askForLink(s,!0))}_askForLink(s,e){this._activeProviderReplies&&e||(this._activeProviderReplies?.forEach(a=>{a?.forEach(f=>{f.link.dispose&&f.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=s.y);let i=!1;for(let[a,f]of this._linkProviderService.linkProviders.entries())e?this._activeProviderReplies?.get(a)&&(i=this._checkLinkProviderResult(a,s,i)):f.provideLinks(s.y,v=>{if(this._isMouseOut)return;let g=v?.map(c=>({link:c}));this._activeProviderReplies?.set(a,g),i=this._checkLinkProviderResult(a,s,i),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(s.y,this._activeProviderReplies)})}_removeIntersectingLinks(s,e){let i=new Set;for(let a=0;a<e.size;a++){let f=e.get(a);if(f)for(let v=0;v<f.length;v++){let g=f[v],c=g.link.range.start.y<s?0:g.link.range.start.x,m=g.link.range.end.y>s?this._bufferService.cols:g.link.range.end.x;for(let E=c;E<=m;E++){if(i.has(E)){f.splice(v--,1);break}i.add(E)}}}}_checkLinkProviderResult(s,e,i){if(!this._activeProviderReplies)return i;let a=this._activeProviderReplies.get(s),f=!1;for(let v=0;v<s;v++)this._activeProviderReplies.has(v)&&!this._activeProviderReplies.get(v)||(f=!0);if(!f&&a){let v=a.find(g=>this._linkAtPosition(g.link,e));v&&(i=!0,this._handleNewLink(v))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!i)for(let v=0;v<this._activeProviderReplies.size;v++){let g=this._activeProviderReplies.get(v)?.find(c=>this._linkAtPosition(c.link,e));if(g){i=!0,this._handleNewLink(g);break}}return i}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(s){if(!this._currentLink)return;let e=this._positionFromMouseEvent(s,this._element,this._mouseService);e&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,e)&&this._currentLink.link.activate(s,this._currentLink.link.text)}_clearCurrentLink(s,e){this._currentLink&&this._lastMouseEvent&&(!s||!e||this._currentLink.link.range.start.y>=s&&this._currentLink.link.range.end.y<=e)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,_.disposeArray)(this._linkCacheDisposables))}_handleNewLink(s){if(!this._lastMouseEvent)return;let e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._linkAtPosition(s.link,e)&&(this._currentLink=s,this._currentLink.state={decorations:{underline:s.link.decorations===void 0||s.link.decorations.underline,pointerCursor:s.link.decorations===void 0||s.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,s.link,this._lastMouseEvent),s.link.decorations={},Object.defineProperties(s.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:i=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==i&&(this._currentLink.state.decorations.pointerCursor=i,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",i))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:i=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==i&&(this._currentLink.state.decorations.underline=i,this._currentLink.state.isHovered&&this._fireUnderlineEvent(s.link,i))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(i=>{if(!this._currentLink)return;let a=i.start===0?0:i.start+1+this._bufferService.buffer.ydisp,f=this._bufferService.buffer.ydisp+1+i.end;if(this._currentLink.link.range.start.y>=a&&this._currentLink.link.range.end.y<=f&&(this._clearCurrentLink(a,f),this._lastMouseEvent)){let v=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);v&&this._askForLink(v,!1)}})))}_linkHover(s,e,i){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!0),this._currentLink.state.decorations.pointerCursor&&s.classList.add("xterm-cursor-pointer")),e.hover&&e.hover(i,e.text)}_fireUnderlineEvent(s,e){let i=s.range,a=this._bufferService.buffer.ydisp,f=this._createLinkUnderlineEvent(i.start.x-1,i.start.y-a-1,i.end.x,i.end.y-a-1,void 0);(e?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(f)}_linkLeave(s,e,i){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!1),this._currentLink.state.decorations.pointerCursor&&s.classList.remove("xterm-cursor-pointer")),e.leave&&e.leave(i,e.text)}_linkAtPosition(s,e){let i=s.range.start.y*this._bufferService.cols+s.range.start.x,a=s.range.end.y*this._bufferService.cols+s.range.end.x,f=e.y*this._bufferService.cols+e.x;return i<=f&&f<=a}_positionFromMouseEvent(s,e,i){let a=i.getCoords(s,e,this._bufferService.cols,this._bufferService.rows);if(a)return{x:a[0],y:a[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(s,e,i,a,f){return{x1:s,y1:e,x2:i,y2:a,cols:this._bufferService.cols,fg:f}}};r.Linkifier=t=l([u(1,h.IMouseService),u(2,h.IRenderService),u(3,p.IBufferService),u(4,h.ILinkProviderService)],t)},9042:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(B,r,o){var l=this&&this.__decorate||function(h,t,s,e){var i,a=arguments.length,f=a<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,s):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(h,t,s,e);else for(var v=h.length-1;v>=0;v--)(i=h[v])&&(f=(a<3?i(f):a>3?i(t,s,f):i(t,s))||f);return a>3&&f&&Object.defineProperty(t,s,f),f},u=this&&this.__param||function(h,t){return function(s,e){t(s,e,h)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;let n=o(511),d=o(2585),_=r.OscLinkProvider=class{constructor(h,t,s){this._bufferService=h,this._optionsService=t,this._oscLinkService=s}provideLinks(h,t){let s=this._bufferService.buffer.lines.get(h-1);if(!s)return void t(void 0);let e=[],i=this._optionsService.rawOptions.linkHandler,a=new n.CellData,f=s.getTrimmedLength(),v=-1,g=-1,c=!1;for(let m=0;m<f;m++)if(g!==-1||s.hasContent(m)){if(s.loadCell(m,a),a.hasExtendedAttrs()&&a.extended.urlId){if(g===-1){g=m,v=a.extended.urlId;continue}c=a.extended.urlId!==v}else g!==-1&&(c=!0);if(c||g!==-1&&m===f-1){let E=this._oscLinkService.getLinkData(v)?.uri;if(E){let k={start:{x:g+1,y:h},end:{x:m+(c||m!==f-1?0:1),y:h}},D=!1;if(!i?.allowNonHttpProtocols)try{let b=new URL(E);["http:","https:"].includes(b.protocol)||(D=!0)}catch{D=!0}D||e.push({text:E,range:k,activate:(b,x)=>i?i.activate(b,x,k):p(0,x),hover:(b,x)=>i?.hover?.(b,x,k),leave:(b,x)=>i?.leave?.(b,x,k)})}c=!1,a.hasExtendedAttrs()&&a.extended.urlId?(g=m,v=a.extended.urlId):(g=-1,v=-1)}}t(e)}};function p(h,t){if(confirm(`Do you want to navigate to ${t}?
4
4