homebridge-config-ui-x 5.0.0-beta.8 → 5.0.0-beta.81

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 (319) hide show
  1. package/CHANGELOG.md +412 -31
  2. package/CONTRIBUTING.md +5 -4
  3. package/LICENSE +1 -1
  4. package/config.schema.json +35 -145
  5. package/dist/bin/hb-service.d.ts +2 -2
  6. package/dist/bin/hb-service.js +51 -50
  7. package/dist/bin/hb-service.js.map +1 -1
  8. package/dist/bin/platforms/darwin.js +2 -2
  9. package/dist/bin/platforms/darwin.js.map +1 -1
  10. package/dist/bin/platforms/win32.js +4 -2
  11. package/dist/bin/platforms/win32.js.map +1 -1
  12. package/dist/bin/standalone.js +1 -0
  13. package/dist/bin/standalone.js.map +1 -1
  14. package/dist/core/auth/auth.controller.d.ts +3 -3
  15. package/dist/core/auth/auth.controller.js.map +1 -1
  16. package/dist/core/auth/auth.module.js +1 -1
  17. package/dist/core/auth/auth.module.js.map +1 -1
  18. package/dist/core/auth/auth.service.js +10 -10
  19. package/dist/core/auth/auth.service.js.map +1 -1
  20. package/dist/core/auth/jwt.strategy.d.ts +3 -1
  21. package/dist/core/config/config.service.d.ts +8 -10
  22. package/dist/core/config/config.service.js +24 -19
  23. package/dist/core/config/config.service.js.map +1 -1
  24. package/dist/core/config/config.startup.js +2 -2
  25. package/dist/core/config/config.startup.js.map +1 -1
  26. package/dist/core/homebridge-ipc/homebridge-ipc.service.js +3 -3
  27. package/dist/core/homebridge-ipc/homebridge-ipc.service.js.map +1 -1
  28. package/dist/index.js +6 -77
  29. package/dist/index.js.map +1 -1
  30. package/dist/main.js +1 -1
  31. package/dist/main.js.map +1 -1
  32. package/dist/modules/accessories/accessories.controller.js +5 -5
  33. package/dist/modules/accessories/accessories.controller.js.map +1 -1
  34. package/dist/modules/accessories/accessories.service.js +8 -7
  35. package/dist/modules/accessories/accessories.service.js.map +1 -1
  36. package/dist/modules/backup/backup.controller.js +7 -7
  37. package/dist/modules/backup/backup.controller.js.map +1 -1
  38. package/dist/modules/backup/backup.service.js +19 -79
  39. package/dist/modules/backup/backup.service.js.map +1 -1
  40. package/dist/modules/child-bridges/child-bridges.service.js +0 -7
  41. package/dist/modules/child-bridges/child-bridges.service.js.map +1 -1
  42. package/dist/modules/config-editor/config-editor.controller.d.ts +1 -1
  43. package/dist/modules/config-editor/config-editor.controller.js +8 -8
  44. package/dist/modules/config-editor/config-editor.controller.js.map +1 -1
  45. package/dist/modules/config-editor/config-editor.service.d.ts +1 -1
  46. package/dist/modules/config-editor/config-editor.service.js +62 -64
  47. package/dist/modules/config-editor/config-editor.service.js.map +1 -1
  48. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.d.ts +1 -1
  49. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js +17 -13
  50. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js.map +1 -1
  51. package/dist/modules/log/log.gateway.d.ts +2 -1
  52. package/dist/modules/log/log.gateway.js.map +1 -1
  53. package/dist/modules/log/log.service.js +3 -3
  54. package/dist/modules/log/log.service.js.map +1 -1
  55. package/dist/modules/platform-tools/docker/docker.controller.js +3 -3
  56. package/dist/modules/platform-tools/docker/docker.controller.js.map +1 -1
  57. package/dist/modules/platform-tools/docker/docker.service.js +1 -1
  58. package/dist/modules/platform-tools/docker/docker.service.js.map +1 -1
  59. package/dist/modules/platform-tools/hb-service/hb-service.controller.js +3 -3
  60. package/dist/modules/platform-tools/hb-service/hb-service.controller.js.map +1 -1
  61. package/dist/modules/platform-tools/hb-service/hb-service.service.js +6 -6
  62. package/dist/modules/platform-tools/hb-service/hb-service.service.js.map +1 -1
  63. package/dist/modules/platform-tools/linux/linux.controller.js +2 -2
  64. package/dist/modules/platform-tools/linux/linux.controller.js.map +1 -1
  65. package/dist/modules/platform-tools/linux/linux.service.js +2 -2
  66. package/dist/modules/platform-tools/linux/linux.service.js.map +1 -1
  67. package/dist/modules/platform-tools/terminal/terminal.gateway.d.ts +2 -1
  68. package/dist/modules/platform-tools/terminal/terminal.gateway.js.map +1 -1
  69. package/dist/modules/platform-tools/terminal/terminal.service.js +2 -2
  70. package/dist/modules/platform-tools/terminal/terminal.service.js.map +1 -1
  71. package/dist/modules/plugins/plugins.controller.js +4 -4
  72. package/dist/modules/plugins/plugins.controller.js.map +1 -1
  73. package/dist/modules/plugins/plugins.service.d.ts +4 -1
  74. package/dist/modules/plugins/plugins.service.js +168 -103
  75. package/dist/modules/plugins/plugins.service.js.map +1 -1
  76. package/dist/modules/server/server.controller.d.ts +28 -3
  77. package/dist/modules/server/server.controller.js +137 -20
  78. package/dist/modules/server/server.controller.js.map +1 -1
  79. package/dist/modules/server/server.service.d.ts +27 -6
  80. package/dist/modules/server/server.service.js +212 -66
  81. package/dist/modules/server/server.service.js.map +1 -1
  82. package/dist/modules/status/status.controller.d.ts +0 -1
  83. package/dist/modules/status/status.controller.js +3 -4
  84. package/dist/modules/status/status.controller.js.map +1 -1
  85. package/dist/modules/status/status.gateway.d.ts +1 -1
  86. package/dist/modules/status/status.service.d.ts +1 -1
  87. package/dist/modules/status/status.service.js +17 -41
  88. package/dist/modules/status/status.service.js.map +1 -1
  89. package/dist/modules/users/users.controller.js +7 -7
  90. package/dist/modules/users/users.controller.js.map +1 -1
  91. package/dist/self-check.js +6 -6
  92. package/dist/self-check.js.map +1 -1
  93. package/package.json +45 -43
  94. package/public/3rdpartylicenses.txt +145 -62
  95. package/public/assets/hap-icons/airpurifier.svg +49 -16
  96. package/public/assets/hap-icons/airquality.svg +24 -13
  97. package/public/assets/hap-icons/co-sensor.svg +72 -0
  98. package/public/assets/hap-icons/co2-sensor.svg +72 -0
  99. package/public/assets/hap-icons/contactsensor-closed.svg +35 -2
  100. package/public/assets/hap-icons/contactsensor-open.svg +80 -2
  101. package/public/assets/hap-icons/door-closed.svg +32 -2
  102. package/public/assets/hap-icons/door-open.svg +48 -2
  103. package/public/assets/hap-icons/fan-off.svg +24 -13
  104. package/public/assets/hap-icons/fan-on.svg +24 -13
  105. package/public/assets/hap-icons/garagedoor.svg +24 -13
  106. package/public/assets/hap-icons/humidity.svg +24 -13
  107. package/public/assets/hap-icons/irrigation-system.svg +47 -18
  108. package/public/assets/hap-icons/leaksensor.svg +52 -2
  109. package/public/assets/hap-icons/light.svg +47 -28
  110. package/public/assets/hap-icons/lightbulb.svg +24 -13
  111. package/public/assets/hap-icons/lock-locked.svg +24 -13
  112. package/public/assets/hap-icons/lock-unlocked.svg +24 -13
  113. package/public/assets/hap-icons/motionsensor.svg +100 -2
  114. package/public/assets/hap-icons/occupancysensor.svg +97 -2
  115. package/public/assets/hap-icons/outlet.svg +24 -13
  116. package/public/assets/hap-icons/securitysystem-active.svg +102 -2
  117. package/public/assets/hap-icons/securitysystem-off.svg +68 -2
  118. package/public/assets/hap-icons/smokesensor.svg +42 -9
  119. package/public/assets/hap-icons/speaker.svg +29 -13
  120. package/public/assets/hap-icons/statelessprogrammableswitch.svg +51 -2
  121. package/public/assets/hap-icons/switch.svg +24 -13
  122. package/public/assets/hap-icons/television.svg +15 -4
  123. package/public/assets/hap-icons/temperature.svg +24 -13
  124. package/public/assets/hap-icons/unknown.svg +24 -13
  125. package/public/assets/hap-icons/valve-generic.svg +27 -16
  126. package/public/assets/hap-icons/valve-irrigation.svg +37 -21
  127. package/public/assets/hap-icons/valve-showerhead.svg +52 -0
  128. package/public/assets/hap-icons/valve-waterfaucet.svg +21 -0
  129. package/public/assets/hap-icons/window-closed.svg +85 -2
  130. package/public/assets/hap-icons/window-open.svg +136 -2
  131. package/public/assets/hap-icons/windowcovering-closed.svg +45 -49
  132. package/public/assets/hap-icons/windowcovering-open.svg +40 -44
  133. package/public/assets/homebridge-color-round.svg +36 -1
  134. package/public/assets/homebridge-logo.svg +11 -1
  135. package/public/assets/mask-icon.svg +5 -1
  136. package/public/assets/plugin-ui-utils/ui.js +3 -0
  137. package/public/assets/plugin-ui-utils/ui.js.map +1 -1
  138. package/public/chunk-2BYFJJKD.js +1 -0
  139. package/public/chunk-2HBIS5KD.js +14 -0
  140. package/public/chunk-2O6AXIBR.js +1 -0
  141. package/public/chunk-2SEP7Q76.js +1 -0
  142. package/public/chunk-2UZO6OQ7.js +23 -0
  143. package/public/chunk-3RCQ6L4J.js +6 -0
  144. package/public/chunk-4SITUFK3.js +1 -0
  145. package/public/{chunk-YRSHLHYL.js → chunk-4UM5QHY6.js} +1 -1
  146. package/public/chunk-57WSQ6T6.js +1 -0
  147. package/public/chunk-62DAT7AX.js +1 -0
  148. package/public/chunk-67A3U7JY.js +1 -0
  149. package/public/{chunk-CCUID66K.js → chunk-6US6MXBM.js} +1 -1
  150. package/public/{chunk-EA5J2VEJ.js → chunk-7VVMNL54.js} +1 -1
  151. package/public/chunk-7Z74FGCO.js +1 -0
  152. package/public/chunk-7ZNHDMCE.js +1 -0
  153. package/public/chunk-A7263J2F.js +1 -0
  154. package/public/{chunk-QE7DO6J3.js → chunk-ADC7QO6N.js} +2 -2
  155. package/public/chunk-AU74FUFM.js +1 -0
  156. package/public/chunk-BI2JONL7.js +1 -0
  157. package/public/{chunk-7EUQWCP5.js → chunk-BVWBB74Y.js} +2 -2
  158. package/public/chunk-CIDCYWQD.js +1 -0
  159. package/public/chunk-COJPC76A.js +1 -0
  160. package/public/chunk-D6GDUL63.js +5 -0
  161. package/public/{chunk-WNWWUCCZ.js → chunk-EGECSH4K.js} +3 -3
  162. package/public/chunk-EON6XHIW.js +20 -0
  163. package/public/chunk-F2CIREEO.js +1 -0
  164. package/public/chunk-F75NHZPV.js +1 -0
  165. package/public/chunk-FD54JRNF.js +1 -0
  166. package/public/chunk-FQEUOMOT.js +1 -0
  167. package/public/chunk-GJL2B6EX.js +1 -0
  168. package/public/{chunk-6TCHCTXZ.js → chunk-GN7IXG4L.js} +1 -1
  169. package/public/chunk-HI45ZEZU.js +1 -0
  170. package/public/chunk-HWJ734TY.js +1 -0
  171. package/public/chunk-I5VNJY5H.js +1 -0
  172. package/public/chunk-I7XHOSDH.js +1 -0
  173. package/public/{chunk-D2D564LE.js → chunk-IH7IL35X.js} +1 -1
  174. package/public/chunk-JIT72ITX.js +1 -0
  175. package/public/chunk-LBGUEPBU.js +1 -0
  176. package/public/chunk-LEMXCMWD.js +1 -0
  177. package/public/chunk-LIG3MQU2.js +1 -0
  178. package/public/chunk-MCY32ZEQ.js +1 -0
  179. package/public/{chunk-TSZZQKYF.js → chunk-MVL5EQPC.js} +1 -1
  180. package/public/chunk-MXAKDDIW.js +1 -0
  181. package/public/chunk-MZFFFGFF.js +1 -0
  182. package/public/chunk-OZ3D5PEN.js +1 -0
  183. package/public/chunk-P6HYOLET.js +1 -0
  184. package/public/chunk-PAZ5V5TQ.js +7 -0
  185. package/public/chunk-PDQGIGL6.js +1 -0
  186. package/public/chunk-PGJGS3YA.js +1 -0
  187. package/public/chunk-PL6ZMRTL.js +1 -0
  188. package/public/chunk-QAQ62ONT.js +1 -0
  189. package/public/chunk-QHRWSZEW.js +1 -0
  190. package/public/chunk-QOVSP2KD.js +1 -0
  191. package/public/chunk-QT6YV32Y.js +1 -0
  192. package/public/chunk-RKG5F4ZV.js +1 -0
  193. package/public/chunk-RMMQMQZX.js +1 -0
  194. package/public/chunk-RQA2H3J6.js +1 -0
  195. package/public/chunk-S2XBNDS5.js +1 -0
  196. package/public/chunk-SKS24AVF.js +1 -0
  197. package/public/chunk-SKVHW32E.js +5 -0
  198. package/public/chunk-TIXTDDTD.js +7 -0
  199. package/public/chunk-TP425OA6.js +1 -0
  200. package/public/chunk-TRIO3R5X.js +1 -0
  201. package/public/chunk-UBLIT2K3.js +1 -0
  202. package/public/{chunk-TZS4WGUK.js → chunk-UHT54HTE.js} +2 -2
  203. package/public/chunk-UNO5SD4B.js +1 -0
  204. package/public/chunk-USOUWLNH.js +2 -0
  205. package/public/chunk-VL2VV7JU.js +1 -0
  206. package/public/chunk-VQEPN6H2.js +1 -0
  207. package/public/chunk-VUKQDY5X.js +1 -0
  208. package/public/chunk-VUTUDBG5.js +1 -0
  209. package/public/chunk-VXLVIRES.js +1 -0
  210. package/public/chunk-W3624K3I.js +1 -0
  211. package/public/chunk-WCO7YV6E.js +8 -0
  212. package/public/chunk-XYRZUWP2.js +1 -0
  213. package/public/chunk-Y4XTCS5Q.js +41 -0
  214. package/public/chunk-Y5I5EFKZ.js +1 -0
  215. package/public/chunk-YDBOT4OU.js +1 -0
  216. package/public/chunk-YHXSTLHD.js +1 -0
  217. package/public/{chunk-JZZQRLNW.js → chunk-ZA436JJP.js} +1 -1
  218. package/public/chunk-ZOK6NY4K.js +8 -0
  219. package/public/chunk-ZVGCGGDU.js +1 -0
  220. package/public/index.html +2 -2
  221. package/public/main-N277YXB2.js +1 -0
  222. package/public/media/fa-brands-400-Q3XCMWHQ.woff2 +0 -0
  223. package/public/media/{fa-brands-400-KOKGDU7E.ttf → fa-brands-400-R2XQZCET.ttf} +0 -0
  224. package/public/media/fa-regular-400-QSNYFYRT.woff2 +0 -0
  225. package/public/media/{fa-regular-400-IPMAEX5Y.ttf → fa-regular-400-XUOPSR7E.ttf} +0 -0
  226. package/public/media/fa-solid-900-5ZUYHGA7.woff2 +0 -0
  227. package/public/media/{fa-solid-900-SRFFQLRM.ttf → fa-solid-900-PJNKLK6W.ttf} +0 -0
  228. package/public/polyfills-4F4B5XMZ.js +2 -0
  229. package/public/styles-PGYQLREL.css +1 -0
  230. package/scripts/upgrade-install-plugin.sh +1 -1
  231. package/public/chunk-32ZJLZS4.js +0 -1
  232. package/public/chunk-34G5YV5T.js +0 -1
  233. package/public/chunk-37PRYZH6.js +0 -1
  234. package/public/chunk-3IX3CLER.js +0 -1
  235. package/public/chunk-3NB33IBB.js +0 -1
  236. package/public/chunk-5ABW4ZKF.js +0 -20
  237. package/public/chunk-5KSPDTFH.js +0 -1
  238. package/public/chunk-5OHKMFXO.js +0 -1
  239. package/public/chunk-656LQTVE.js +0 -14
  240. package/public/chunk-7T234PWV.js +0 -1
  241. package/public/chunk-AZC7XCGC.js +0 -1
  242. package/public/chunk-BKUGARB4.js +0 -7
  243. package/public/chunk-BPMSJ2VF.js +0 -1
  244. package/public/chunk-BY2TSVEY.js +0 -1
  245. package/public/chunk-C7QJOHXE.js +0 -1
  246. package/public/chunk-CKR46AVL.js +0 -1
  247. package/public/chunk-DLMGGPRM.js +0 -1
  248. package/public/chunk-DXZ6DCYP.js +0 -1
  249. package/public/chunk-EP66JAAV.js +0 -1
  250. package/public/chunk-FJF4WNUO.js +0 -1
  251. package/public/chunk-FQYNC4RH.js +0 -1
  252. package/public/chunk-HHG6WMVF.js +0 -1
  253. package/public/chunk-HHIHVUCL.js +0 -1
  254. package/public/chunk-HSJSWZHD.js +0 -1
  255. package/public/chunk-II2UAWC2.js +0 -6
  256. package/public/chunk-IMOTYOKQ.js +0 -8
  257. package/public/chunk-JDQ5PHOU.js +0 -1
  258. package/public/chunk-KG3DHJZY.js +0 -1
  259. package/public/chunk-KQJ7ONUG.js +0 -1
  260. package/public/chunk-LLGTFHIT.js +0 -1
  261. package/public/chunk-M346UY2G.js +0 -1
  262. package/public/chunk-MNBUOV7P.js +0 -1
  263. package/public/chunk-NI664X6I.js +0 -1
  264. package/public/chunk-NW6AFAD7.js +0 -1
  265. package/public/chunk-NZNNTHFQ.js +0 -1
  266. package/public/chunk-ORPWYWCL.js +0 -5
  267. package/public/chunk-P5FZV27L.js +0 -1
  268. package/public/chunk-PS4KQKK7.js +0 -1
  269. package/public/chunk-Q5YFESZW.js +0 -1
  270. package/public/chunk-QAEUHAL6.js +0 -1
  271. package/public/chunk-QBDPVXMM.js +0 -1
  272. package/public/chunk-QHPDGSZ6.js +0 -1
  273. package/public/chunk-QJYLB6LD.js +0 -1
  274. package/public/chunk-R2W5BRWY.js +0 -32
  275. package/public/chunk-RIN5QMTV.js +0 -1
  276. package/public/chunk-RKC5OBYP.js +0 -1
  277. package/public/chunk-RT7V3UYQ.js +0 -5
  278. package/public/chunk-SCR7PUV7.js +0 -1
  279. package/public/chunk-SOEXENDP.js +0 -1
  280. package/public/chunk-TCSXGQNF.js +0 -1
  281. package/public/chunk-TH2G22O2.js +0 -23
  282. package/public/chunk-TMD6JYTR.js +0 -1
  283. package/public/chunk-TO5O6L7A.js +0 -1
  284. package/public/chunk-TXOB7R5K.js +0 -7
  285. package/public/chunk-UG5DK2RQ.js +0 -2
  286. package/public/chunk-UYLV5ENO.js +0 -1
  287. package/public/chunk-VPSLX47Z.js +0 -1
  288. package/public/chunk-VVGJ5MFU.js +0 -1
  289. package/public/chunk-WAUGELUM.js +0 -1
  290. package/public/chunk-WHJOLAED.js +0 -1
  291. package/public/chunk-WHJSVGC7.js +0 -1
  292. package/public/chunk-WXTR3AXD.js +0 -1
  293. package/public/chunk-X2AWRY46.js +0 -1
  294. package/public/chunk-X3GZMTJ5.js +0 -1
  295. package/public/chunk-X7YNKLZW.js +0 -1
  296. package/public/chunk-XRPL3VU7.js +0 -1
  297. package/public/chunk-Y3RRGTUL.js +0 -1
  298. package/public/chunk-YD5MPMXA.js +0 -1
  299. package/public/chunk-YJB6Y76M.js +0 -1
  300. package/public/chunk-ZT23DWNL.js +0 -1
  301. package/public/main-35ZSDHG6.js +0 -1
  302. package/public/media/01-RQ3S2L53.png +0 -0
  303. package/public/media/02-VNCG2I2A.png +0 -0
  304. package/public/media/03-HI42L4ZG.png +0 -0
  305. package/public/media/04-FJLL55LZ.png +0 -0
  306. package/public/media/05-V3EO6SPT.png +0 -0
  307. package/public/media/06-EOJZCQZN.png +0 -0
  308. package/public/media/07-KMKB5PBD.png +0 -0
  309. package/public/media/08-UQJRF6B2.png +0 -0
  310. package/public/media/09-2DJQFRHH.png +0 -0
  311. package/public/media/arrow_left-CQT7FZM7.svg +0 -4
  312. package/public/media/arrow_right-SBUDRR2G.svg +0 -4
  313. package/public/media/fa-brands-400-6PJPV6JM.woff2 +0 -0
  314. package/public/media/fa-regular-400-OHB6J4OK.woff2 +0 -0
  315. package/public/media/fa-solid-900-ABTK6BNK.woff2 +0 -0
  316. package/public/polyfills-C6JHVXJJ.js +0 -2
  317. package/public/scripts-6GVLYD7F.js +0 -62
  318. package/public/styles-EG5MFQEM.css +0 -1
  319. /package/public/assets/{bootstrap-4 → bootstrap-5}/cssframework/assets.json +0 -0
@@ -1,2 +0,0 @@
1
- import{$a as tt,$c as ee,Ea as ve,Ga as M,H as $e,Ha as Ee,Ic as it,Jc as at,Ka as Ye,L as Xe,La as Te,Ma as Ke,Na as N,Pa as we,Pc as H,Qc as ct,Rc as lt,Sc as R,T as me,Ua as V,Va as L,Wa as C,Xa as qe,Ya as Qe,Za as He,_a as et,a as B,aa as Ge,ab as nt,b as ze,bb as rt,cb as S,ea as b,fa as D,h as he,ha as v,hb as $,ia as ye,k as fe,ka as w,ma as d,md as dt,na as T,nd as ut,ob as st,pd as te,q as Ve,qa as ge,r as pe,rd as ne,sa as Je,sb as Re,ta as Ze,ua as We,wb as ot,x as z,xb as q,yb as Q,zb as be}from"./chunk-TXOB7R5K.js";var G=class{},se=class{},A=class r{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(`
2
- `).forEach(e=>{let n=e.indexOf(":");if(n>0){let s=e.slice(0,n),o=e.slice(n+1).trim();this.addHeaderEntry(s,o)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,n)=>{this.addHeaderEntry(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof r?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new r;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof r?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(t.name,e);let s=(t.op==="a"?this.headers.get(e):void 0)||[];s.push(...n),this.headers.set(e,s);break;case"d":let o=t.value;if(!o)this.headers.delete(e),this.normalizedNames.delete(e);else{let i=this.headers.get(e);if(!i)return;i=i.filter(c=>o.indexOf(c)===-1),i.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,i)}break}}addHeaderEntry(t,e){let n=t.toLowerCase();this.maybeSetNormalizedName(t,n),this.headers.has(n)?this.headers.get(n).push(e):this.headers.set(n,[e])}setHeaderEntries(t,e){let n=(Array.isArray(e)?e:[e]).map(o=>o.toString()),s=t.toLowerCase();this.headers.set(s,n),this.maybeSetNormalizedName(t,s)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var Ae=class{encodeKey(t){return ht(t)}encodeValue(t){return ht(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function Ft(r,t){let e=new Map;return r.length>0&&r.replace(/^\?/,"").split("&").forEach(s=>{let o=s.indexOf("="),[i,c]=o==-1?[t.decodeKey(s),""]:[t.decodeKey(s.slice(0,o)),t.decodeValue(s.slice(o+1))],a=e.get(i)||[];a.push(c),e.set(i,a)}),e}var Bt=/%(\d[a-f0-9])/gi,zt={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function ht(r){return encodeURIComponent(r).replace(Bt,(t,e)=>{var n;return(n=zt[e])!=null?n:t})}function re(r){return`${r}`}var P=class r{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new Ae,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=Ft(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let n=t.fromObject[e],s=Array.isArray(n)?n.map(re):[re(n)];this.map.set(e,s)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(n=>{let s=t[n];Array.isArray(s)?s.forEach(o=>{e.push({param:n,value:o,op:"a"})}):e.push({param:n,value:s,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new r({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=(t.op==="a"?this.map.get(t.param):void 0)||[];e.push(re(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let n=this.map.get(t.param)||[],s=n.indexOf(re(t.value));s!==-1&&n.splice(s,1),n.length>0?this.map.set(t.param,n):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};var De=class{map=new Map;set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function Vt(r){switch(r){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function ft(r){return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer}function pt(r){return typeof Blob<"u"&&r instanceof Blob}function mt(r){return typeof FormData<"u"&&r instanceof FormData}function $t(r){return typeof URLSearchParams<"u"&&r instanceof URLSearchParams}var X=class r{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;responseType="json";method;params;urlWithParams;transferCache;constructor(t,e,n,s){var i,c;this.url=e,this.method=t.toUpperCase();let o;if(Vt(this.method)||s?(this.body=n!==void 0?n:null,o=s):o=n,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),(i=this.headers)!=null||(this.headers=new A),(c=this.context)!=null||(this.context=new De),!this.params)this.params=new P,this.urlWithParams=e;else{let a=this.params.toString();if(a.length===0)this.urlWithParams=e;else{let l=e.indexOf("?"),p=l===-1?"?":l<e.length-1?"&":"";this.urlWithParams=e+p+a}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||ft(this.body)||pt(this.body)||mt(this.body)||$t(this.body)?this.body:this.body instanceof P?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||mt(this.body)?null:pt(this.body)?this.body.type||null:ft(this.body)?null:typeof this.body=="string"?"text/plain":this.body instanceof P?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?"application/json":null}clone(t={}){var y,g,_,u;let e=t.method||this.method,n=t.url||this.url,s=t.responseType||this.responseType,o=(y=t.transferCache)!=null?y:this.transferCache,i=t.body!==void 0?t.body:this.body,c=(g=t.withCredentials)!=null?g:this.withCredentials,a=(_=t.reportProgress)!=null?_:this.reportProgress,l=t.headers||this.headers,p=t.params||this.params,m=(u=t.context)!=null?u:this.context;return t.setHeaders!==void 0&&(l=Object.keys(t.setHeaders).reduce((h,E)=>h.set(E,t.setHeaders[E]),l)),t.setParams&&(p=Object.keys(t.setParams).reduce((h,E)=>h.set(E,t.setParams[E]),p)),new r(e,n,i,{params:p,headers:l,context:m,reportProgress:a,responseType:s,withCredentials:c,transferCache:o})}},I=function(r){return r[r.Sent=0]="Sent",r[r.UploadProgress=1]="UploadProgress",r[r.ResponseHeader=2]="ResponseHeader",r[r.DownloadProgress=3]="DownloadProgress",r[r.Response=4]="Response",r[r.User=5]="User",r}(I||{}),J=class{headers;status;statusText;url;ok;type;constructor(t,e=200,n="OK"){this.headers=t.headers||new A,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},oe=class r extends J{constructor(t={}){super(t)}type=I.ResponseHeader;clone(t={}){return new r({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},Z=class r extends J{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=I.Response;clone(t={}){return new r({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},O=class extends J{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},Tt=200,Xt=204;function Me(r,t){return{body:t,headers:r.headers,context:r.context,observe:r.observe,params:r.params,reportProgress:r.reportProgress,responseType:r.responseType,withCredentials:r.withCredentials,transferCache:r.transferCache}}var Gt=(()=>{class r{handler;constructor(e){this.handler=e}request(e,n,s={}){let o;if(e instanceof X)o=e;else{let a;s.headers instanceof A?a=s.headers:a=new A(s.headers);let l;s.params&&(s.params instanceof P?l=s.params:l=new P({fromObject:s.params})),o=new X(e,n,s.body!==void 0?s.body:null,{headers:a,context:s.context,params:l,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials,transferCache:s.transferCache})}let i=pe(o).pipe(Xe(a=>this.handler.handle(a)));if(e instanceof X||s.observe==="events")return i;let c=i.pipe($e(a=>a instanceof Z));switch(s.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return c.pipe(z(a=>{if(a.body!==null&&!(a.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return a.body}));case"blob":return c.pipe(z(a=>{if(a.body!==null&&!(a.body instanceof Blob))throw new Error("Response is not a Blob.");return a.body}));case"text":return c.pipe(z(a=>{if(a.body!==null&&typeof a.body!="string")throw new Error("Response is not a string.");return a.body}));case"json":default:return c.pipe(z(a=>a.body))}case"response":return c;default:throw new Error(`Unreachable: unhandled observe type ${s.observe}}`)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:new P().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,s={}){return this.request("PATCH",e,Me(s,n))}post(e,n,s={}){return this.request("POST",e,Me(s,n))}put(e,n,s={}){return this.request("PUT",e,Me(s,n))}static \u0275fac=function(n){return new(n||r)(d(G))};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})(),Jt=/^\)\]\}',?\n/,Zt="X-Request-URL";function yt(r){if(r.url)return r.url;let t=Zt.toLocaleLowerCase();return r.headers.get(t)}var Wt=(()=>{var t,e;class r{fetchImpl=(e=(t=T(Oe,{optional:!0}))==null?void 0:t.fetch)!=null?e:(...s)=>globalThis.fetch(...s);ngZone=T(M);handle(s){return new fe(o=>{let i=new AbortController;return this.doRequest(s,i.signal,o).then(Pe,c=>o.error(new O({error:c}))),()=>i.abort()})}doRequest(s,o,i){return he(this,null,function*(){var u,h,E,x;let c=this.createRequestInit(s),a;try{let f=this.ngZone.runOutsideAngular(()=>this.fetchImpl(s.urlWithParams,B({signal:o},c)));Yt(f),i.next({type:I.Sent}),a=yield f}catch(f){i.error(new O({error:f,status:(u=f.status)!=null?u:0,statusText:f.statusText,url:s.urlWithParams,headers:f.headers}));return}let l=new A(a.headers),p=a.statusText,m=(h=yt(a))!=null?h:s.urlWithParams,y=a.status,g=null;if(s.reportProgress&&i.next(new oe({headers:l,status:y,statusText:p,url:m})),a.body){let f=a.headers.get("content-length"),k=[],le=a.body.getReader(),j=0,de,U,Fe=typeof Zone<"u"&&Zone.current;yield this.ngZone.runOutsideAngular(()=>he(this,null,function*(){for(;;){let{done:F,value:ue}=yield le.read();if(F)break;if(k.push(ue),j+=ue.length,s.reportProgress){U=s.responseType==="text"?(U!=null?U:"")+(de!=null?de:de=new TextDecoder).decode(ue,{stream:!0}):void 0;let Be=()=>i.next({type:I.DownloadProgress,total:f?+f:void 0,loaded:j,partialText:U});Fe?Fe.run(Be):Be()}}}));let Ct=this.concatChunks(k,j);try{let F=(E=a.headers.get("Content-Type"))!=null?E:"";g=this.parseBody(s,Ct,F)}catch(F){i.error(new O({error:F,headers:new A(a.headers),status:a.status,statusText:a.statusText,url:(x=yt(a))!=null?x:s.urlWithParams}));return}}y===0&&(y=g?Tt:0),y>=200&&y<300?(i.next(new Z({body:g,headers:l,status:y,statusText:p,url:m})),i.complete()):i.error(new O({error:g,headers:l,status:y,statusText:p,url:m}))})}parseBody(s,o,i){switch(s.responseType){case"json":let c=new TextDecoder().decode(o).replace(Jt,"");return c===""?null:JSON.parse(c);case"text":return new TextDecoder().decode(o);case"blob":return new Blob([o],{type:i});case"arraybuffer":return o.buffer}}createRequestInit(s){let o={},i=s.withCredentials?"include":void 0;if(s.headers.forEach((c,a)=>o[c]=a.join(",")),s.headers.has("Accept")||(o.Accept="application/json, text/plain, */*"),!s.headers.has("Content-Type")){let c=s.detectContentTypeHeader();c!==null&&(o["Content-Type"]=c)}return{body:s.serializeBody(),method:s.method,headers:o,credentials:i}}concatChunks(s,o){let i=new Uint8Array(o),c=0;for(let a of s)i.set(a,c),c+=a.length;return i}static \u0275fac=function(o){return new(o||r)};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})(),Oe=class{};function Pe(){}function Yt(r){r.then(Pe,Pe)}function wt(r,t){return t(r)}function Kt(r,t){return(e,n)=>t.intercept(e,{handle:s=>r(s,n)})}function qt(r,t,e){return(n,s)=>We(e,()=>t(n,o=>r(o,s)))}var Qt=new w(""),Ie=new w(""),Ht=new w(""),Rt=new w("",{providedIn:"root",factory:()=>!0});function en(){let r=null;return(t,e)=>{var o;r===null&&(r=((o=T(Qt,{optional:!0}))!=null?o:[]).reduceRight(Kt,wt));let n=T(ve);if(T(Rt)){let i=n.add();return r(t,e).pipe(me(()=>n.remove(i)))}else return r(t,e)}}var gt=(()=>{class r extends G{backend;injector;chain=null;pendingTasks=T(ve);contributeToStability=T(Rt);constructor(e,n){super(),this.backend=e,this.injector=n}handle(e){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(Ie),...this.injector.get(Ht,[])]));this.chain=n.reduceRight((s,o)=>qt(s,o,this.injector),wt)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,s=>this.backend.handle(s)).pipe(me(()=>this.pendingTasks.remove(n)))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||r)(d(se),d(Ze))};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})();var tn=/^\)\]\}',?\n/;function nn(r){return"responseURL"in r&&r.responseURL?r.responseURL:/^X-Request-URL:/m.test(r.getAllResponseHeaders())?r.getResponseHeader("X-Request-URL"):null}var vt=(()=>{class r{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new b(-2800,!1);let n=this.xhrFactory;return(n.\u0275loadImpl?Ve(n.\u0275loadImpl()):pe(null)).pipe(Ge(()=>new fe(o=>{let i=n.build();if(i.open(e.method,e.urlWithParams),e.withCredentials&&(i.withCredentials=!0),e.headers.forEach((u,h)=>i.setRequestHeader(u,h.join(","))),e.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){let u=e.detectContentTypeHeader();u!==null&&i.setRequestHeader("Content-Type",u)}if(e.responseType){let u=e.responseType.toLowerCase();i.responseType=u!=="json"?u:"text"}let c=e.serializeBody(),a=null,l=()=>{if(a!==null)return a;let u=i.statusText||"OK",h=new A(i.getAllResponseHeaders()),E=nn(i)||e.url;return a=new oe({headers:h,status:i.status,statusText:u,url:E}),a},p=()=>{let{headers:u,status:h,statusText:E,url:x}=l(),f=null;h!==Xt&&(f=typeof i.response>"u"?i.responseText:i.response),h===0&&(h=f?Tt:0);let k=h>=200&&h<300;if(e.responseType==="json"&&typeof f=="string"){let le=f;f=f.replace(tn,"");try{f=f!==""?JSON.parse(f):null}catch(j){f=le,k&&(k=!1,f={error:j,text:f})}}k?(o.next(new Z({body:f,headers:u,status:h,statusText:E,url:x||void 0})),o.complete()):o.error(new O({error:f,headers:u,status:h,statusText:E,url:x||void 0}))},m=u=>{let{url:h}=l(),E=new O({error:u,status:i.status||0,statusText:i.statusText||"Unknown Error",url:h||void 0});o.error(E)},y=!1,g=u=>{y||(o.next(l()),y=!0);let h={type:I.DownloadProgress,loaded:u.loaded};u.lengthComputable&&(h.total=u.total),e.responseType==="text"&&i.responseText&&(h.partialText=i.responseText),o.next(h)},_=u=>{let h={type:I.UploadProgress,loaded:u.loaded};u.lengthComputable&&(h.total=u.total),o.next(h)};return i.addEventListener("load",p),i.addEventListener("error",m),i.addEventListener("timeout",m),i.addEventListener("abort",m),e.reportProgress&&(i.addEventListener("progress",g),c!==null&&i.upload&&i.upload.addEventListener("progress",_)),i.send(c),o.next({type:I.Sent}),()=>{i.removeEventListener("error",m),i.removeEventListener("abort",m),i.removeEventListener("load",p),i.removeEventListener("timeout",m),e.reportProgress&&(i.removeEventListener("progress",g),c!==null&&i.upload&&i.upload.removeEventListener("progress",_)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(n){return new(n||r)(d(ne))};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})(),bt=new w(""),rn="XSRF-TOKEN",sn=new w("",{providedIn:"root",factory:()=>rn}),on="X-XSRF-TOKEN",an=new w("",{providedIn:"root",factory:()=>on}),ie=class{},cn=(()=>{class r{doc;platform;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,n,s){this.doc=e,this.platform=n,this.cookieName=s}getToken(){if(this.platform==="server")return null;let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=ee(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||r)(d(R),d(N),d(sn))};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})();function ln(r,t){let e=r.url.toLowerCase();if(!T(bt)||r.method==="GET"||r.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return t(r);let n=T(ie).getToken(),s=T(an);return n!=null&&!r.headers.has(s)&&(r=r.clone({headers:r.headers.set(s,n)})),t(r)}var Mt=function(r){return r[r.Interceptors=0]="Interceptors",r[r.LegacyInterceptors=1]="LegacyInterceptors",r[r.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",r[r.NoXsrfProtection=3]="NoXsrfProtection",r[r.JsonpSupport=4]="JsonpSupport",r[r.RequestsMadeViaParent=5]="RequestsMadeViaParent",r[r.Fetch=6]="Fetch",r}(Mt||{});function dn(r,t){return{\u0275kind:r,\u0275providers:t}}function Qn(...r){let t=[Gt,vt,gt,{provide:G,useExisting:gt},{provide:se,useFactory:()=>{var e;return(e=T(Wt,{optional:!0}))!=null?e:T(vt)}},{provide:Ie,useValue:ln,multi:!0},{provide:bt,useValue:!0},{provide:ie,useClass:cn}];for(let e of r)t.push(...e.\u0275providers);return ge(t)}var Et=new w("");function Hn(){return dn(Mt.LegacyInterceptors,[{provide:Et,useFactory:en},{provide:Ie,useExisting:Et,multi:!0}])}var Se=class extends lt{supportsDOMEvents=!0},_e=class r extends Se{static makeCurrent(){ct(new r)}onAndCancel(t,e,n){return t.addEventListener(e,n),()=>{t.removeEventListener(e,n)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.remove()}createElement(t,e){return e=e||this.getDefaultDocument(),e.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=hn();return e==null?null:fn(e)}resetBaseElement(){W=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return ee(document.cookie,t)}},W=null;function hn(){return W=W||document.querySelector("base"),W?W.getAttribute("href"):null}function fn(r){return new URL(r,document.baseURI).pathname}var ke=class{addToWindow(t){D.getAngularTestability=(n,s=!0)=>{let o=t.findTestabilityInTree(n,s);if(o==null)throw new b(5103,!1);return o},D.getAllAngularTestabilities=()=>t.getAllTestabilities(),D.getAllAngularRootElements=()=>t.getAllRootElements();let e=n=>{let s=D.getAllAngularTestabilities(),o=s.length,i=function(){o--,o==0&&n()};s.forEach(c=>{c.whenStable(i)})};D.frameworkStabilizers||(D.frameworkStabilizers=[]),D.frameworkStabilizers.push(e)}findTestabilityInTree(t,e,n){if(e==null)return null;let s=t.getTestability(e);return s!=null?s:n?H().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}},pn=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||r)};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})(),Le=new w(""),Nt=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,n){this._zone=n,e.forEach(s=>{s.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,n,s){return this._findPluginFor(n).addEventListener(e,n,s)}getZone(){return this._zone}_findPluginFor(e){let n=this._eventNameToPlugin.get(e);if(n)return n;if(n=this._plugins.find(o=>o.supports(e)),!n)throw new b(5101,!1);return this._eventNameToPlugin.set(e,n),n}static \u0275fac=function(n){return new(n||r)(d(Le),d(M))};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})(),ae=class{_doc;constructor(t){this._doc=t}manager},Ce="ng-app-id";function At(r){for(let t of r)t.remove()}function Dt(r,t){let e=t.createElement("style");return e.textContent=r,e}function mn(r,t,e){var s;let n=(s=r.head)==null?void 0:s.querySelectorAll(`style[${Ce}="${t}"]`);if(n)for(let o of n)o.textContent&&(o.removeAttribute(Ce),e.set(o.textContent,{usage:0,elements:[o]}))}function xe(r,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var St=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(e,n,s,o={}){this.doc=e,this.appId=n,this.nonce=s,this.isServer=te(o),mn(e,n,this.inline),this.hosts.add(e.head)}addStyles(e,n){for(let s of e)this.addUsage(s,this.inline,Dt);n==null||n.forEach(s=>this.addUsage(s,this.external,xe))}removeStyles(e,n){for(let s of e)this.removeUsage(s,this.inline);n==null||n.forEach(s=>this.removeUsage(s,this.external))}addUsage(e,n,s){let o=n.get(e);o?o.usage++:n.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,s(e,this.doc)))})}removeUsage(e,n){let s=n.get(e);s&&(s.usage--,s.usage<=0&&(At(s.elements),n.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])At(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[n,{elements:s}]of this.inline)s.push(this.addElement(e,Dt(n,this.doc)));for(let[n,{elements:s}]of this.external)s.push(this.addElement(e,xe(n,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,n){return this.nonce&&n.setAttribute("nonce",this.nonce),this.isServer&&n.setAttribute(Ce,this.appId),e.appendChild(n)}static \u0275fac=function(n){return new(n||r)(d(R),d(Te),d(we,8),d(N))};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})(),Ne={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Ue=/%COMP%/g,_t="%COMP%",yn=`_nghost-${_t}`,gn=`_ngcontent-${_t}`,vn=!0,En=new w("",{providedIn:"root",factory:()=>vn});function Tn(r){return gn.replace(Ue,r)}function wn(r){return yn.replace(Ue,r)}function kt(r,t){return t.map(e=>e.replace(Ue,r))}var Ot=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,n,s,o,i,c,a,l=null){this.eventManager=e,this.sharedStylesHost=n,this.appId=s,this.removeStylesOnCompDestroy=o,this.doc=i,this.platformId=c,this.ngZone=a,this.nonce=l,this.platformIsServer=te(c),this.defaultRenderer=new Y(e,i,a,this.platformIsServer)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;this.platformIsServer&&n.encapsulation===V.ShadowDom&&(n=ze(B({},n),{encapsulation:V.Emulated}));let s=this.getOrCreateRenderer(e,n);return s instanceof ce?s.applyToHost(e):s instanceof K&&s.applyStyles(),s}getOrCreateRenderer(e,n){let s=this.rendererByCompId,o=s.get(n.id);if(!o){let i=this.doc,c=this.ngZone,a=this.eventManager,l=this.sharedStylesHost,p=this.removeStylesOnCompDestroy,m=this.platformIsServer;switch(n.encapsulation){case V.Emulated:o=new ce(a,l,n,this.appId,p,i,c,m);break;case V.ShadowDom:return new je(a,l,e,n,i,c,this.nonce,m);default:o=new K(a,l,n,p,i,c,m);break}s.set(n.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}static \u0275fac=function(n){return new(n||r)(d(Nt),d(St),d(Te),d(En),d(R),d(N),d(M),d(we))};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})(),Y=class{eventManager;doc;ngZone;platformIsServer;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,n,s){this.eventManager=t,this.doc=e,this.ngZone=n,this.platformIsServer=s}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(Ne[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(Pt(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(Pt(t)?t.content:t).insertBefore(e,n)}removeChild(t,e){e.remove()}selectRootElement(t,e){let n=typeof t=="string"?this.doc.querySelector(t):t;if(!n)throw new b(-5104,!1);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,s){if(s){e=s+":"+e;let o=Ne[s];o?t.setAttributeNS(o,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){let s=Ne[n];s?t.removeAttributeNS(s,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,s){s&($.DashCase|$.Important)?t.style.setProperty(e,n,s&$.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&$.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t!=null&&(t[e]=n)}setValue(t,e){t.nodeValue=e}listen(t,e,n){if(typeof t=="string"&&(t=H().getGlobalEventTarget(this.doc,t),!t))throw new Error(`Unsupported event target ${t} for event ${e}`);return this.eventManager.addEventListener(t,e,this.decoratePreventDefault(n))}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(e)):t(e))===!1&&e.preventDefault()}}};function Pt(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var je=class extends Y{sharedStylesHost;hostEl;shadowRoot;constructor(t,e,n,s,o,i,c,a){var m;super(t,o,i,a),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=kt(s.id,s.styles);for(let y of l){let g=document.createElement("style");c&&g.setAttribute("nonce",c),g.textContent=y,this.shadowRoot.appendChild(g)}let p=(m=s.getExternalStyles)==null?void 0:m.call(s);if(p)for(let y of p){let g=xe(y,o);c&&g.setAttribute("nonce",c),this.shadowRoot.appendChild(g)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},K=class extends Y{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,n,s,o,i,c,a){var l;super(t,o,i,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=s,this.styles=a?kt(a,n.styles):n.styles,this.styleUrls=(l=n.getExternalStyles)==null?void 0:l.call(n,a)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},ce=class extends K{contentAttr;hostAttr;constructor(t,e,n,s,o,i,c,a){let l=s+"-"+n.id;super(t,e,n,o,i,c,a,l),this.contentAttr=Tn(l),this.hostAttr=wn(l)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}},Rn=(()=>{class r extends ae{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,s){return e.addEventListener(n,s,!1),()=>this.removeEventListener(e,n,s)}removeEventListener(e,n,s){return e.removeEventListener(n,s)}static \u0275fac=function(n){return new(n||r)(d(R))};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})(),It=["alt","control","meta","shift"],bn={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Mn={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},An=(()=>{class r extends ae{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,n,s){let o=r.parseEventName(n),i=r.eventCallback(o.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>H().onAndCancel(e,o.domEventName,i))}static parseEventName(e){let n=e.toLowerCase().split("."),s=n.shift();if(n.length===0||!(s==="keydown"||s==="keyup"))return null;let o=r._normalizeKey(n.pop()),i="",c=n.indexOf("code");if(c>-1&&(n.splice(c,1),i="code."),It.forEach(l=>{let p=n.indexOf(l);p>-1&&(n.splice(p,1),i+=l+".")}),i+=o,n.length!=0||o.length===0)return null;let a={};return a.domEventName=s,a.fullKey=i,a}static matchEventFullKeyCode(e,n){let s=bn[e.key]||e.key,o="";return n.indexOf("code.")>-1&&(s=e.code,o="code."),s==null||!s?!1:(s=s.toLowerCase(),s===" "?s="space":s==="."&&(s="dot"),It.forEach(i=>{if(i!==s){let c=Mn[i];c(e)&&(o+=i+".")}}),o+=s,o===n)}static eventCallback(e,n,s){return o=>{r.matchEventFullKeyCode(o,e)&&s.runGuarded(()=>n(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(n){return new(n||r)(d(R))};static \u0275prov=v({token:r,factory:r.\u0275fac})}return r})();function Tr(r,t){return at(B({rootComponent:r},Dn(t)))}function Dn(r){var t;return{appProviders:[...Lt,...(t=r==null?void 0:r.providers)!=null?t:[]],platformProviders:Nn}}function On(){_e.makeCurrent()}function Pn(){return new Ee}function In(){return Ye(document),document}var Nn=[{provide:N,useValue:ut},{provide:Ke,useValue:On,multi:!0},{provide:R,useFactory:In,deps:[]}];var Sn=new w(""),_n=[{provide:q,useClass:ke,deps:[]},{provide:ot,useClass:Q,deps:[M,be,q]},{provide:Q,useClass:Q,deps:[M,be,q]}],Lt=[{provide:Je,useValue:"root"},{provide:Ee,useFactory:Pn,deps:[]},{provide:Le,useClass:Rn,multi:!0,deps:[R,M,N]},{provide:Le,useClass:An,multi:!0,deps:[R]},Ot,St,Nt,{provide:st,useExisting:Ot},{provide:ne,useClass:pn,deps:[]},[]],wr=(()=>{class r{constructor(e){}static \u0275fac=function(n){return new(n||r)(d(Sn,12))};static \u0275mod=Re({type:r});static \u0275inj=ye({providers:[...Lt,..._n],imports:[dt,it]})}return r})();var Rr=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(n){return new(n||r)(d(R))};static \u0275prov=v({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var kn=(()=>{class r{static \u0275fac=function(n){return new(n||r)};static \u0275prov=v({token:r,factory:function(n){let s=null;return n?s=new(n||r):s=d(Ln),s},providedIn:"root"})}return r})(),Ln=(()=>{class r extends kn{_doc;constructor(e){super(),this._doc=e}sanitize(e,n){if(n==null)return null;switch(e){case S.NONE:return n;case S.HTML:return C(n,"HTML")?L(n):rt(this._doc,String(n)).toString();case S.STYLE:return C(n,"Style")?L(n):n;case S.SCRIPT:if(C(n,"Script"))return L(n);throw new b(5200,!1);case S.URL:return C(n,"URL")?L(n):nt(String(n));case S.RESOURCE_URL:if(C(n,"ResourceURL"))return L(n);throw new b(5201,!1);default:throw new b(5202,!1)}}bypassSecurityTrustHtml(e){return qe(e)}bypassSecurityTrustStyle(e){return Qe(e)}bypassSecurityTrustScript(e){return He(e)}bypassSecurityTrustUrl(e){return et(e)}bypassSecurityTrustResourceUrl(e){return tt(e)}static \u0275fac=function(n){return new(n||r)(d(R))};static \u0275prov=v({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{se as a,P as b,I as c,Z as d,Gt as e,Qt as f,Qn as g,Hn as h,Ot as i,Tr as j,wr as k,Rr as l,kn as m};
@@ -1 +0,0 @@
1
- import{a as R}from"./chunk-TZS4WGUK.js";import"./chunk-FJF4WNUO.js";import{c as g}from"./chunk-7EUQWCP5.js";import"./chunk-JZZQRLNW.js";import{q as C}from"./chunk-ORPWYWCL.js";import{y as S,z as v}from"./chunk-QHPDGSZ6.js";import"./chunk-YRSHLHYL.js";import{d as h,g as n}from"./chunk-NZNNTHFQ.js";import"./chunk-TSZZQKYF.js";import"./chunk-EP66JAAV.js";import{b as f,j as M}from"./chunk-TMD6JYTR.js";import"./chunk-UG5DK2RQ.js";import{a as u,c as d}from"./chunk-3IX3CLER.js";import{h as p,ha as c,ia as i,md as l,na as e,sb as a,w as s}from"./chunk-TXOB7R5K.js";var m=(()=>{class t{$api=e(f);$router=e(h);$toastr=e(M);$translate=e(u);resolve(){return p(this,null,function*(){try{return yield s(this.$api.get("/platform-tools/docker/startup-script"))}catch(r){console.error(r),this.$toastr.error(r.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(o){return new(o||t)};static \u0275prov=c({token:t,factory:t.\u0275fac})}return t})();var j=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"startup-script",loadComponent:()=>import("./chunk-32ZJLZS4.js").then(t=>t.StartupScriptComponent),resolve:{startupScript:m}},{path:"restart-container",loadComponent:()=>import("./chunk-WAUGELUM.js").then(t=>t.ContainerRestartComponent)}],$=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({imports:[n.forChild(j),n]})}return t})();var Q=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({providers:[m],imports:[l,S,v,g,C,d.forChild(),$,R]})}return t})();export{Q as DockerModule};
@@ -1 +0,0 @@
1
- import{a as X}from"./chunk-5OHKMFXO.js";import{n as Q}from"./chunk-ORPWYWCL.js";import{c as D,d as C,e as G,f as j,g as H,j as F,m as A,p as q,q as L,y as K,z as J}from"./chunk-QHPDGSZ6.js";import{e as N}from"./chunk-NZNNTHFQ.js";import{c as W}from"./chunk-TSZZQKYF.js";import{b as R}from"./chunk-EP66JAAV.js";import{a as z,b as B,j as O}from"./chunk-TMD6JYTR.js";import{l as M}from"./chunk-UG5DK2RQ.js";import{a as P,b as V}from"./chunk-3IX3CLER.js";import{$b as y,Bc as s,Cc as l,Kb as I,Mb as _,Rb as f,Wb as i,Xb as o,Yb as c,ad as E,cc as b,dc as m,h as w,ib as t,na as g,nc as a,oc as d,pc as v,rb as T,w as S,xa as x,xc as $,ya as h,yc as k}from"./chunk-TXOB7R5K.js";var U=(n,u)=>({"is-valid":n,"is-invalid":u}),Z=n=>({"button-loading":n});function ee(n,u){if(n&1){let e=y();i(0,"div",2),c(1,"img",3),i(2,"h3",4),a(3),s(4,"translate"),o(),i(5,"button",5),b("click",function(){x(e);let p=m();return h(p.onClickGettingStarted())}),a(6),s(7,"translate"),o(),i(8,"small",6)(9,"a",7),b("click",function(){x(e);let p=m();return h(p.onClickRestoreBackup())}),a(10),s(11,"translate"),o()()()}n&2&&(t(3),d(l(4,3,"setup.welcome_to_homebridge")),t(3),v(" ",l(7,5,"setup.button_get_started")," "),t(4),d(l(11,7,"setup_wizard_message_restore")))}function te(n,u){if(n&1){let e=y();i(0,"div",2),c(1,"img",8),i(2,"h3",4),a(3),s(4,"translate"),o(),i(5,"div",9)(6,"p"),a(7),s(8,"translate"),o(),i(9,"form",10),b("ngSubmit",function(){x(e);let p=m();return h(p.createFirstUser())}),i(10,"div",11),c(11,"i",12)(12,"input",13),i(13,"label",14),a(14),s(15,"translate"),o()(),i(16,"div",11),c(17,"i",15)(18,"input",16),i(19,"label",17),a(20),s(21,"translate"),o()(),i(22,"div",11),c(23,"i",15)(24,"input",18),i(25,"label",19),a(26),s(27,"translate"),o()(),i(28,"div",20)(29,"button",21),a(30),s(31,"translate"),c(32,"i",22),o()()()()()}if(n&2){let e=m();t(3),d(l(4,15,"setup.create_account")),t(4),d(l(8,17,"setup.create_account_reason")),t(2),_("formGroup",e.createUserForm),t(3),_("readonly",e.loading)("ngClass",k(27,U,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid)),t(2),d(l(15,19,"users.label_username")),t(4),_("readonly",e.loading)("ngClass",k(30,U,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors)),t(2),d(l(21,21,"users.label_password")),t(4),_("readonly",e.loading)("ngClass",k(33,U,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors)),t(2),d(l(27,23,"users.label_confirm_password")),t(3),_("disabled",e.createUserForm.invalid||e.loading)("ngClass",$(36,Z,e.loading)),t(),v(" ",l(31,25,"setup.create_account")," ")}}function ie(n,u){n&1&&(i(0,"span"),c(1,"i",29),a(2),s(3,"translate"),o()),n&2&&(t(2),v(" ",l(3,1,"backup.label_uploading")," "))}function ne(n,u){n&1&&(i(0,"span"),a(1),s(2,"translate"),o()),n&2&&(t(),d(l(2,1,"backup.button_restore_backup")))}function oe(n,u){if(n&1){let e=y();i(0,"div",2),c(1,"img",8),i(2,"h3",4),a(3),s(4,"translate"),o(),i(5,"p"),a(6),s(7,"translate"),o(),i(8,"div",23)(9,"input",24),b("change",function(p){x(e);let Y=m();return h(Y.handleRestoreFileInput(p.target.files))}),o(),i(10,"label",25),a(11),s(12,"translate"),o()(),i(13,"div",26)(14,"button",27),b("click",function(){x(e);let p=m();return h(p.onClickCancelRestore())}),a(15),s(16,"translate"),o(),i(17,"button",28),b("click",function(){x(e);let p=m();return h(p.onRestoreBackupClick())}),I(18,ie,4,3,"span")(19,ne,3,3,"span"),o()()()}if(n&2){let e=m();t(3),d(l(4,8,"form.button_restore")),t(3),d(l(7,10,"backup.restore_help_one")),t(5),v(" ",l(12,12,(e.selectedFile==null?null:e.selectedFile.name)||"backup.label_choose_backup_file_to_restore")," "),t(3),_("disabled",e.restoreUploadStarted),t(),v(" ",l(16,14,"form.button_cancel")," "),t(2),_("disabled",e.restoreUploading||!e.selectedFile),t(),f(e.restoreUploading?18:-1),t(),f(e.restoreUploading?-1:19)}}function re(n,u){n&1&&(i(0,"div",2),c(1,"img",8),i(2,"h3",4),a(3),s(4,"translate"),o(),i(5,"h1"),c(6,"i",29),o()()),n&2&&(t(3),d(l(4,1,"restart.title_restart")))}function ae(n,u){n&1&&(i(0,"div",2),c(1,"img",8),i(2,"h3",30),a(3),s(4,"translate"),o(),i(5,"p",31),a(6),s(7,"translate"),o(),i(8,"a",32),a(9),s(10,"translate"),o()()),n&2&&(t(3),d(l(4,3,"setup_wizard_message_complete_title")),t(3),d(l(7,5,"setup_wizard_message_complete_message")),t(3),d(l(10,7,"setup.open_dashboard")))}var ye=(()=>{class n{$api=g(B);$auth=g(W);$modal=g(Q);$settings=g(R);$title=g(M);$toastr=g(O);$translate=g(P);previousTitle;step="welcome";createUserForm=new H({username:new F("",[C.required]),password:new F("",[C.compose([C.required,C.minLength(4)])]),passwordConfirm:new F("",[C.required])},this.matchPassword);loading=!1;selectedFile;restoreUploading=!1;ngOnInit(){this.previousTitle=this.$title.getTitle(),this.$title.setTitle("Setup Homebridge")}matchPassword(e){let r=e.get("password").value,p=e.get("passwordConfirm").value;if(r!==p)e.get("passwordConfirm").setErrors({matchPassword:!0});else return null}ngOnDestroy(){this.$title.setTitle(this.previousTitle)}onClickGettingStarted(){this.step="create-account"}onClickRestoreBackup(){this.step="restore-backup"}onClickCancelRestore(){this.selectedFile=null,this.step="welcome"}createFirstUser(){this.loading=!0;let e=this.createUserForm.getRawValue();e.name=e.username,this.$api.post("/setup-wizard/create-first-user",e).subscribe({next:()=>w(this,null,function*(){this.$settings.env.setupWizardComplete=!0,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}),error:r=>{this.loading=!1,console.error(r),this.$toastr.error(r.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?this.selectedFile=e[0]:delete this.selectedFile}onRestoreBackupClick(){this.restoreUploading=!0,this.uploadHomebridgeArchive()}uploadHomebridgeArchive(){return w(this,null,function*(){try{let e=yield S(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(z.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token;let r=new FormData;r.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield S(this.$api.post("/backup/restore",r)),this.openRestoreModal(),this.restoreUploading=!1}catch(e){this.restoreUploading=!1,console.error(e),this.$toastr.error(e.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}openRestoreModal(){let e=this.$modal.open(X,{size:"lg",backdrop:"static"});e.componentInstance.setupWizardRestore=!0,e.result.then(r=>{r===!0&&this.waitForHomebridgeToRestart()})}waitForHomebridgeToRestart(){return w(this,null,function*(){this.step="restarting",window.localStorage.removeItem(z.jwt.tokenKey),this.$auth.token=null,yield new Promise(r=>setTimeout(r,15e3));let e=setInterval(()=>w(this,null,function*(){try{yield S(this.$api.get("/auth/settings")),clearInterval(e),location.reload()}catch{}}),1e3)})}static \u0275fac=function(r){return new(r||n)};static \u0275cmp=T({type:n,selectors:[["ng-component"]],decls:7,vars:5,consts:[[1,"setup-container","d-flex","align-items-center","justify-content-center"],[1,"w-100","setup-card","d-flex","py-5"],[1,"w-100","d-flex","flex-column","align-items-center"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","mx-auto"],[1,"pt-4","pb-3","text-center"],["type","button",1,"btn","btn-lg","btn-primary",3,"click"],[1,"mt-3"],["href","javascript:void(0)",1,"grey-text",3,"click"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","homebridge-logo-small","mx-auto"],[1,"w-100"],["novalidate","",3,"ngSubmit","formGroup"],[1,"md-form"],[1,"fas","fa-fw","fa-user","prefix","grey-text"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none","tabindex","1",1,"form-control","px-0",3,"readonly","ngClass"],["for","form-username"],[1,"fas","fa-fw","fa-lock","prefix","grey-text"],["formControlName","password","type","password","id","form-pass","autocomplete","new-password","tabindex","2",1,"form-control","px-0",3,"readonly","ngClass"],["for","form-pass"],["formControlName","passwordConfirm","type","password","id","form-pass-confirm","autocomplete","new-password","tabindex","2",1,"form-control","px-0",3,"readonly","ngClass"],["for","form-pass-confirm"],[1,"w-100","text-center"],["type","submit",1,"btn","btn-primary",3,"disabled","ngClass"],[1,"button-loading-overlay","fas","fa-fw","fa-spinner","fa-pulse"],[1,"custom-file"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz",1,"custom-file-input",3,"change"],["for","restoreFileUpload",1,"custom-file-label"],[1,"mt-3","w-100","d-flex","justify-content-between"],["type","button",1,"btn","btn-elegant","ml-0",3,"click","disabled"],["type","button",1,"btn","btn-primary","mr-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"pt-4","pb-3"],[1,"text-center"],["routerLink","/",1,"btn","btn-lg","btn-primary","mt-3"]],template:function(r,p){r&1&&(i(0,"div",0)(1,"div",1),I(2,ee,12,9,"div",2)(3,te,33,38,"div",2)(4,oe,20,16,"div",2)(5,re,7,3,"div",2)(6,ae,11,9,"div",2),o()()),r&2&&(t(2),f(p.step==="welcome"?2:-1),t(),f(p.step==="create-account"?3:-1),t(),f(p.step==="restore-backup"?4:-1),t(),f(p.step==="restarting"?5:-1),t(),f(p.step==="setup-complete"?6:-1))},dependencies:[K,A,D,G,j,J,q,L,E,N,V],styles:[".setup-container[_ngcontent-%COMP%]{background-size:cover;z-index:-1;padding-top:1em;padding-bottom:1em}@media screen and (min-height: 500px) and (min-width: 600px){.setup-container[_ngcontent-%COMP%]{padding-top:4em}}.setup-card[_ngcontent-%COMP%]{max-width:600px;border-radius:15px;background-color:#fff;padding-right:25px;padding-left:25px}.setup-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 600px){.setup-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}} body.dark-mode .setup-card{background-color:#2b2b2b;color:#fff}.homebridge-logo[_ngcontent-%COMP%]{margin-right:10px;height:200px}@media screen and (max-height: 500px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}@media screen and (max-width: 600px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}.homebridge-logo-small[_ngcontent-%COMP%]{height:50px}.button-loading[_ngcontent-%COMP%]{position:relative;color:#0000}.button-loading[_ngcontent-%COMP%] .button-loading-overlay[_ngcontent-%COMP%]{display:block;color:#fff}.button-loading-overlay[_ngcontent-%COMP%]{display:none;position:absolute;top:9px;left:0;right:0}small[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}return n})();export{ye as a};
@@ -1 +0,0 @@
1
- import{a as G}from"./chunk-WHJSVGC7.js";import{a as W}from"./chunk-BPMSJ2VF.js";import{a as Z}from"./chunk-WHJOLAED.js";import{a as X}from"./chunk-JZZQRLNW.js";import{a as H}from"./chunk-KQJ7ONUG.js";import{n as B}from"./chunk-ORPWYWCL.js";import"./chunk-QHPDGSZ6.js";import{a as R}from"./chunk-YRSHLHYL.js";import{a as q,c as N,d as T,e as D,f as j}from"./chunk-NZNNTHFQ.js";import{c as $}from"./chunk-TSZZQKYF.js";import{b as L}from"./chunk-EP66JAAV.js";import{a as P}from"./chunk-TMD6JYTR.js";import"./chunk-UG5DK2RQ.js";import{a as M,b as U}from"./chunk-3IX3CLER.js";import{$b as y,Bc as d,Cc as l,Kb as E,Lb as u,Mb as m,Rb as w,Wb as n,Xb as a,Yb as p,ad as V,cc as _,dc as C,g as Y,h as z,ib as o,na as c,nc as f,oc as v,pb as F,rb as O,sd as K,w as A,wc as g,xa as b,xc as k,ya as x}from"./chunk-TXOB7R5K.js";var Q=Y(Z(),1);var I=()=>["/"],te=i=>({"hamburger-icon-cross":i}),ne=i=>({expanded:i}),ie=()=>({exact:!0}),oe=()=>["/accessories"],re=()=>["/support"],ae=()=>["/power-options"],se=()=>["/plugins"],de=()=>["/logs"],le=()=>["/platform-tools/terminal"],pe=()=>["/config"],ce=()=>["/settings"];function me(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),d(3,"translate"),_("click",function(){b(e);let t=C();return x(t.openUnderVoltageModal())})("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",20),a(),n(6,"div",14),f(7),d(8,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"rpi.throttled.undervoltage_title")+" - "+l(3,4,"rpi.throttled.undervoltage_description")),o(6),v(l(8,6,"rpi.throttled.undervoltage_title")))}function ue(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",21),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),m("routerLink",g(8,se))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_plugins")),o(5),v(l(7,6,"menu.label_plugins")))}function _e(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),m("routerLink",g(8,de))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_logs")),o(5),v(l(7,6,"menu.linux.label_logs")))}function fe(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),m("routerLink",g(8,le))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_terminal")),o(5),v(l(7,6,"menu.linux.label_terminal")))}function ge(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),m("routerLink",g(8,pe))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.config_json_editor")),o(5),v(l(7,6,"menu.config_json_editor")))}function ve(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),m("routerLink",g(8,ce))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_settings")),o(5),v(l(7,6,"menu.label_settings")))}function he(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),_("click",function(){b(e);let t=C();return x(t.$auth.logout())})("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"menu.tooltip_logout")),o(5),v(l(7,4,"menu.tooltip_logout")))}var J=(()=>{class i{router=c(T);translate=c(M);$auth=c($);$settings=c(L);$md=c(X);$modal=c(B);$notification=c(G);$translate=c(M);renderer=c(F);isExpanded=!1;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;constructor(){let e=this.router;this.isMobile=this.$md.detect.mobile(),e.events.subscribe(s=>{s instanceof q&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},500))})}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)});let e=document.querySelector(".sidebar"),s=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!s.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),s.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),s.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,this.updateContentStyles())}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded?(this.renderer.setStyle(e,"opacity","20%"),this.renderer.setStyle(e,"pointer-events","none"),this.renderer.setStyle(e,"overflow","hidden")):(this.renderer.removeStyle(e,"opacity"),this.renderer.removeStyle(e,"pointer-events"),this.renderer.removeStyle(e,"overflow"))}openUnderVoltageModal(){let e=this.$modal.open(W,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-fw fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let s=e.target;["menuitem","button"].includes(s.getAttribute("role"))&&s.click()}}static \u0275fac=function(s){return new(s||i)};static \u0275cmp=O({type:i,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:60,vars:66,consts:[["tabindex","0","role","button",1,"m-header","text-right",3,"click","keydown"],[1,"mr-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","../../../../assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon",3,"ngClass"],["role","navigation","id","sidebar",1,"sidebar",3,"ngClass"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-fw","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-fw","fa-lightbulb"],[1,"fa","fa-fw","fa-question-circle-o"],[1,"fa","fa-fw","fa-power-off"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-fw","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-fw","fa-plug"],[1,"fa","fa-fw","fa-wave-square"],[1,"fa","fa-fw","fa-terminal"],[1,"fa","fa-fw","fa-code"],[1,"fa","fa-fw","fa-cog"],[1,"fa","fa-fw","fa-right-from-bracket"]],template:function(s,t){s&1&&(n(0,"div",0),d(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(h){return t.handleKeydown(h)}),p(2,"span",1),n(3,"a",2),d(4,"translate"),p(5,"img",3),n(6,"div",4),f(7,"Homebridge"),a()(),n(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),n(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(h){return t.handleKeydown(h)}),n(15,"a",2),d(16,"translate"),p(17,"img",3),n(18,"div",8),f(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),_("keydown",function(h){return t.handleKeydown(h)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),f(27),d(28,"translate"),a()()(),E(29,me,9,8,"div",10)(30,ue,8,9,"div",10),n(31,"div",10)(32,"div",15),d(33,"translate"),_("keydown",function(h){return t.handleKeydown(h)}),n(34,"div",12),p(35,"i",16),a(),n(36,"div",14),f(37),d(38,"translate"),a()()(),E(39,_e,8,9,"div",10)(40,fe,8,9,"div",10)(41,ge,8,9,"div",10)(42,ve,8,9,"div",10),n(43,"div",10)(44,"div",15),d(45,"translate"),_("keydown",function(h){return t.handleKeydown(h)}),n(46,"div",12),p(47,"i",17),a(),n(48,"div",14),f(49),d(50,"translate"),a()()(),n(51,"div",10)(52,"div",15),d(53,"translate"),_("keydown",function(h){return t.handleKeydown(h)}),n(54,"div",12),p(55,"i",18),a(),n(56,"div",14),f(57),d(58,"translate"),a()()(),E(59,he,8,6,"div",10),a()()),s&2&&(u("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",l(1,33,"menu.sidebar.aria_menu")),o(3),m("routerLink",g(55,I)),u("aria-label",l(4,35,"menu.label_status")),o(5),m("ngClass",k(56,te,t.isExpanded)),o(5),m("ngClass",k(58,ne,t.isExpanded)),o(2),m("routerLink",g(60,I)),u("aria-label",l(16,37,"menu.label_status")),o(7),m("routerLink",g(61,I))("routerLinkActive","active")("routerLinkActiveOptions",g(62,ie)),u("aria-label",l(23,39,"menu.label_status")),o(5),v(l(28,41,"menu.label_status")),o(2),w(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),o(),w(t.$auth.user.admin?30:-1),o(2),m("routerLink",g(63,oe))("routerLinkActive","active"),u("aria-label",l(33,43,"menu.label_accessories")),o(5),v(l(38,45,"menu.label_accessories")),o(2),w(t.$auth.user.admin?39:-1),o(),w(t.$settings.env.enableTerminalAccess&&t.$auth.user.admin?40:-1),o(),w(t.$auth.user.admin?41:-1),o(),w(t.$auth.user.admin?42:-1),o(2),m("routerLink",g(64,re))("routerLinkActive","active"),u("aria-label",l(45,47,"support.title")),o(5),v(l(50,49,"support.title")),o(3),m("routerLink",g(65,ae))("routerLinkActive","active"),u("aria-label",l(53,51,"menu.restart.title")),o(5),v(l(58,53,"menu.restart.title")),o(2),w(t.$settings.formAuth?59:-1))},dependencies:[K,V,D,j,U],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media (min-width: 768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-y:auto;max-height:calc(100vh - 80px)!important}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media (max-width: 767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media (min-width: 768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media (max-width: 767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.5s ease-in-out;-moz-transition:.5s ease-in-out;-o-transition:.5s ease-in-out;transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.25s ease-in-out;-moz-transition:.25s ease-in-out;-o-transition:.25s ease-in-out;transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return i})();var be=i=>({sidebarExpanded:i}),He=(()=>{class i{$auth=c($);$modal=c(B);$router=c(T);$settings=c(L);$translate=c(M);$ws=c(R);sidebarExpanded=!1;io;ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return z(this,null,function*(){if(this.$settings.settingsLoaded||(yield A(this.$settings.onSettingsLoaded)),(0,Q.lt)(this.$settings.uiVersion,P.serverTarget)){console.log(`Server restart required. UI Version: ${P.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(H,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:P.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-fw-power-off",e.result.then(()=>{this.$router.navigate(["/restart"])}).catch(()=>{})}})}static \u0275fac=function(s){return new(s||i)};static \u0275cmp=O({type:i,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(s,t){s&1&&(p(0,"app-sidebar",0),n(1,"div",1),p(2,"router-outlet"),a()),s&2&&(m("isExpanded",t.sidebarExpanded),o(),m("ngClass",k(2,be,t.sidebarExpanded)))},dependencies:[J,V,N],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media (max-width: 767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media (min-width: 768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return i})();export{He as LayoutComponent};
@@ -1 +0,0 @@
1
- import{a}from"./chunk-FJF4WNUO.js";import"./chunk-YRSHLHYL.js";import"./chunk-NZNNTHFQ.js";import"./chunk-TSZZQKYF.js";import"./chunk-EP66JAAV.js";import"./chunk-TMD6JYTR.js";import"./chunk-UG5DK2RQ.js";import"./chunk-3IX3CLER.js";import"./chunk-TXOB7R5K.js";export{a as ContainerRestartComponent};
@@ -1 +0,0 @@
1
- import{e as h}from"./chunk-TXOB7R5K.js";var P=h((Zn,ue)=>{var rt="2.0.0",tt=Number.MAX_SAFE_INTEGER||9007199254740991,st=16,nt=250,it=["major","premajor","minor","preminor","patch","prepatch","prerelease"];ue.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:st,MAX_SAFE_BUILD_LENGTH:nt,MAX_SAFE_INTEGER:tt,RELEASE_TYPES:it,SEMVER_SPEC_VERSION:rt,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var v=h((Jn,Ee)=>{var ot=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Ee.exports=ot});var w=h((T,fe)=>{var{MAX_SAFE_COMPONENT_LENGTH:Y,MAX_SAFE_BUILD_LENGTH:lt,MAX_LENGTH:at}=P(),ct=v();T=fe.exports={};var ut=T.re=[],Et=T.safeRe=[],l=T.src=[],a=T.t={},ft=0,B="[a-zA-Z0-9-]",ht=[["\\s",1],["\\d",at],[B,lt]],pt=t=>{for(let[e,r]of ht)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},p=(t,e,r)=>{let s=pt(e),n=ft++;ct(t,n,e),a[t]=n,l[n]=e,ut[n]=new RegExp(e,r?"g":void 0),Et[n]=new RegExp(s,r?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*");p("NUMERICIDENTIFIERLOOSE","\\d+");p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${B}*`);p("MAINVERSION",`(${l[a.NUMERICIDENTIFIER]})\\.(${l[a.NUMERICIDENTIFIER]})\\.(${l[a.NUMERICIDENTIFIER]})`);p("MAINVERSIONLOOSE",`(${l[a.NUMERICIDENTIFIERLOOSE]})\\.(${l[a.NUMERICIDENTIFIERLOOSE]})\\.(${l[a.NUMERICIDENTIFIERLOOSE]})`);p("PRERELEASEIDENTIFIER",`(?:${l[a.NUMERICIDENTIFIER]}|${l[a.NONNUMERICIDENTIFIER]})`);p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[a.NUMERICIDENTIFIERLOOSE]}|${l[a.NONNUMERICIDENTIFIER]})`);p("PRERELEASE",`(?:-(${l[a.PRERELEASEIDENTIFIER]}(?:\\.${l[a.PRERELEASEIDENTIFIER]})*))`);p("PRERELEASELOOSE",`(?:-?(${l[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[a.PRERELEASEIDENTIFIERLOOSE]})*))`);p("BUILDIDENTIFIER",`${B}+`);p("BUILD",`(?:\\+(${l[a.BUILDIDENTIFIER]}(?:\\.${l[a.BUILDIDENTIFIER]})*))`);p("FULLPLAIN",`v?${l[a.MAINVERSION]}${l[a.PRERELEASE]}?${l[a.BUILD]}?`);p("FULL",`^${l[a.FULLPLAIN]}$`);p("LOOSEPLAIN",`[v=\\s]*${l[a.MAINVERSIONLOOSE]}${l[a.PRERELEASELOOSE]}?${l[a.BUILD]}?`);p("LOOSE",`^${l[a.LOOSEPLAIN]}$`);p("GTLT","((?:<|>)?=?)");p("XRANGEIDENTIFIERLOOSE",`${l[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);p("XRANGEIDENTIFIER",`${l[a.NUMERICIDENTIFIER]}|x|X|\\*`);p("XRANGEPLAIN",`[v=\\s]*(${l[a.XRANGEIDENTIFIER]})(?:\\.(${l[a.XRANGEIDENTIFIER]})(?:\\.(${l[a.XRANGEIDENTIFIER]})(?:${l[a.PRERELEASE]})?${l[a.BUILD]}?)?)?`);p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[a.XRANGEIDENTIFIERLOOSE]})(?:${l[a.PRERELEASELOOSE]})?${l[a.BUILD]}?)?)?`);p("XRANGE",`^${l[a.GTLT]}\\s*${l[a.XRANGEPLAIN]}$`);p("XRANGELOOSE",`^${l[a.GTLT]}\\s*${l[a.XRANGEPLAINLOOSE]}$`);p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Y}})(?:\\.(\\d{1,${Y}}))?(?:\\.(\\d{1,${Y}}))?`);p("COERCE",`${l[a.COERCEPLAIN]}(?:$|[^\\d])`);p("COERCEFULL",l[a.COERCEPLAIN]+`(?:${l[a.PRERELEASE]})?(?:${l[a.BUILD]})?(?:$|[^\\d])`);p("COERCERTL",l[a.COERCE],!0);p("COERCERTLFULL",l[a.COERCEFULL],!0);p("LONETILDE","(?:~>?)");p("TILDETRIM",`(\\s*)${l[a.LONETILDE]}\\s+`,!0);T.tildeTrimReplace="$1~";p("TILDE",`^${l[a.LONETILDE]}${l[a.XRANGEPLAIN]}$`);p("TILDELOOSE",`^${l[a.LONETILDE]}${l[a.XRANGEPLAINLOOSE]}$`);p("LONECARET","(?:\\^)");p("CARETTRIM",`(\\s*)${l[a.LONECARET]}\\s+`,!0);T.caretTrimReplace="$1^";p("CARET",`^${l[a.LONECARET]}${l[a.XRANGEPLAIN]}$`);p("CARETLOOSE",`^${l[a.LONECARET]}${l[a.XRANGEPLAINLOOSE]}$`);p("COMPARATORLOOSE",`^${l[a.GTLT]}\\s*(${l[a.LOOSEPLAIN]})$|^$`);p("COMPARATOR",`^${l[a.GTLT]}\\s*(${l[a.FULLPLAIN]})$|^$`);p("COMPARATORTRIM",`(\\s*)${l[a.GTLT]}\\s*(${l[a.LOOSEPLAIN]}|${l[a.XRANGEPLAIN]})`,!0);T.comparatorTrimReplace="$1$2$3";p("HYPHENRANGE",`^\\s*(${l[a.XRANGEPLAIN]})\\s+-\\s+(${l[a.XRANGEPLAIN]})\\s*$`);p("HYPHENRANGELOOSE",`^\\s*(${l[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[a.XRANGEPLAINLOOSE]})\\s*$`);p("STAR","(<|>)?=?\\s*\\*");p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var F=h((Qn,he)=>{var Rt=Object.freeze({loose:!0}),$t=Object.freeze({}),mt=t=>t?typeof t!="object"?Rt:t:$t;he.exports=mt});var W=h((ei,$e)=>{var pe=/^[0-9]+$/,Re=(t,e)=>{let r=pe.test(t),s=pe.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},It=(t,e)=>Re(e,t);$e.exports={compareIdentifiers:Re,rcompareIdentifiers:It}});var L=h((ri,Ne)=>{var j=v(),{MAX_LENGTH:me,MAX_SAFE_INTEGER:X}=P(),{safeRe:Ie,t:Le}=w(),Lt=F(),{compareIdentifiers:g}=W(),z=class t{constructor(e,r){if(r=Lt(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>me)throw new TypeError(`version is longer than ${me} characters`);j("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?Ie[Le.LOOSE]:Ie[Le.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>X||this.major<0)throw new TypeError("Invalid major version");if(this.minor>X||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>X||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<X)return i}return n}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(j("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),g(this.major,e.major)||g(this.minor,e.minor)||g(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],n=e.prerelease[r];if(j("prerelease compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return g(s,n)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],n=e.build[r];if(j("build compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return g(s,n)}while(++r)}inc(e,r,s){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(s)?1:0;if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let i=[r,n];s===!1&&(i=[r]),g(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Ne.exports=z});var q=h((ti,de)=>{var Oe=L(),Nt=(t,e,r=!1)=>{if(t instanceof Oe)return t;try{return new Oe(t,e)}catch(s){if(!r)return null;throw s}};de.exports=Nt});var Se=h((si,Ae)=>{var Ot=q(),dt=(t,e)=>{let r=Ot(t,e);return r?r.version:null};Ae.exports=dt});var qe=h((ni,Te)=>{var At=q(),St=(t,e)=>{let r=At(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};Te.exports=St});var Pe=h((ii,ge)=>{var we=L(),Tt=(t,e,r,s,n)=>{typeof r=="string"&&(n=s,s=r,r=void 0);try{return new we(t instanceof we?t.version:t,r).inc(e,s,n).version}catch{return null}};ge.exports=Tt});var Ce=h((oi,xe)=>{var ve=q(),qt=(t,e)=>{let r=ve(t,null,!0),s=ve(e,null,!0),n=r.compare(s);if(n===0)return null;let i=n>0,o=i?r:s,c=i?s:r,u=!!o.prerelease.length;if(!!c.prerelease.length&&!u)return!c.patch&&!c.minor?"major":o.patch?"patch":o.minor?"minor":"major";let $=u?"pre":"";return r.major!==s.major?$+"major":r.minor!==s.minor?$+"minor":r.patch!==s.patch?$+"patch":"prerelease"};xe.exports=qt});var Ge=h((li,De)=>{var wt=L(),gt=(t,e)=>new wt(t,e).major;De.exports=gt});var Fe=h((ai,ye)=>{var Pt=L(),vt=(t,e)=>new Pt(t,e).minor;ye.exports=vt});var Xe=h((ci,je)=>{var xt=L(),Ct=(t,e)=>new xt(t,e).patch;je.exports=Ct});var Ve=h((ui,Ue)=>{var Dt=q(),Gt=(t,e)=>{let r=Dt(t,e);return r&&r.prerelease.length?r.prerelease:null};Ue.exports=Gt});var A=h((Ei,He)=>{var _e=L(),yt=(t,e,r)=>new _e(t,r).compare(new _e(e,r));He.exports=yt});var ke=h((fi,be)=>{var Ft=A(),jt=(t,e,r)=>Ft(e,t,r);be.exports=jt});var Ye=h((hi,Me)=>{var Xt=A(),Ut=(t,e)=>Xt(t,e,!0);Me.exports=Ut});var U=h((pi,We)=>{var Be=L(),Vt=(t,e,r)=>{let s=new Be(t,r),n=new Be(e,r);return s.compare(n)||s.compareBuild(n)};We.exports=Vt});var Ke=h((Ri,ze)=>{var _t=U(),Ht=(t,e)=>t.sort((r,s)=>_t(r,s,e));ze.exports=Ht});var Je=h(($i,Ze)=>{var bt=U(),kt=(t,e)=>t.sort((r,s)=>bt(s,r,e));Ze.exports=kt});var x=h((mi,Qe)=>{var Mt=A(),Yt=(t,e,r)=>Mt(t,e,r)>0;Qe.exports=Yt});var V=h((Ii,er)=>{var Bt=A(),Wt=(t,e,r)=>Bt(t,e,r)<0;er.exports=Wt});var K=h((Li,rr)=>{var zt=A(),Kt=(t,e,r)=>zt(t,e,r)===0;rr.exports=Kt});var Z=h((Ni,tr)=>{var Zt=A(),Jt=(t,e,r)=>Zt(t,e,r)!==0;tr.exports=Jt});var _=h((Oi,sr)=>{var Qt=A(),es=(t,e,r)=>Qt(t,e,r)>=0;sr.exports=es});var H=h((di,nr)=>{var rs=A(),ts=(t,e,r)=>rs(t,e,r)<=0;nr.exports=ts});var J=h((Ai,ir)=>{var ss=K(),ns=Z(),is=x(),os=_(),ls=V(),as=H(),cs=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return ss(t,r,s);case"!=":return ns(t,r,s);case">":return is(t,r,s);case">=":return os(t,r,s);case"<":return ls(t,r,s);case"<=":return as(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};ir.exports=cs});var lr=h((Si,or)=>{var us=L(),Es=q(),{safeRe:b,t:k}=w(),fs=(t,e)=>{if(t instanceof us)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?b[k.COERCEFULL]:b[k.COERCE]);else{let u=e.includePrerelease?b[k.COERCERTLFULL]:b[k.COERCERTL],R;for(;(R=u.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||R.index+R[0].length!==r.index+r[0].length)&&(r=R),u.lastIndex=R.index+R[1].length+R[2].length;u.lastIndex=-1}if(r===null)return null;let s=r[2],n=r[3]||"0",i=r[4]||"0",o=e.includePrerelease&&r[5]?`-${r[5]}`:"",c=e.includePrerelease&&r[6]?`+${r[6]}`:"";return Es(`${s}.${n}.${i}${o}${c}`,e)};or.exports=fs});var cr=h((Ti,ar)=>{var Q=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,r)}return this}};ar.exports=Q});var S=h((qi,hr)=>{var hs=/\s+/g,ee=class t{constructor(e,r){if(r=Rs(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof re)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(hs," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(n=>!Er(n[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&ds(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&Ns)|(this.options.loose&&Os))+":"+e,n=ur.get(s);if(n)return n;let i=this.options.loose,o=i?d[N.HYPHENRANGELOOSE]:d[N.HYPHENRANGE];e=e.replace(o,Cs(this.options.includePrerelease)),m("hyphen replace",e),e=e.replace(d[N.COMPARATORTRIM],ms),m("comparator trim",e),e=e.replace(d[N.TILDETRIM],Is),m("tilde trim",e),e=e.replace(d[N.CARETTRIM],Ls),m("caret trim",e);let c=e.split(" ").map(E=>As(E,this.options)).join(" ").split(/\s+/).map(E=>xs(E,this.options));i&&(c=c.filter(E=>(m("loose invalid filter",E,this.options),!!E.match(d[N.COMPARATORLOOSE])))),m("range list",c);let u=new Map,R=c.map(E=>new re(E,this.options));for(let E of R){if(Er(E))return[E];u.set(E.value,E)}u.size>1&&u.has("")&&u.delete("");let $=[...u.values()];return ur.set(s,$),$}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>fr(s,r)&&e.set.some(n=>fr(n,r)&&s.every(i=>n.every(o=>i.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new $s(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(Ds(this.set[r],e,this.options))return!0;return!1}};hr.exports=ee;var ps=cr(),ur=new ps,Rs=F(),re=C(),m=v(),$s=L(),{safeRe:d,t:N,comparatorTrimReplace:ms,tildeTrimReplace:Is,caretTrimReplace:Ls}=w(),{FLAG_INCLUDE_PRERELEASE:Ns,FLAG_LOOSE:Os}=P(),Er=t=>t.value==="<0.0.0-0",ds=t=>t.value==="",fr=(t,e)=>{let r=!0,s=t.slice(),n=s.pop();for(;r&&s.length;)r=s.every(i=>n.intersects(i,e)),n=s.pop();return r},As=(t,e)=>(m("comp",t,e),t=qs(t,e),m("caret",t),t=Ss(t,e),m("tildes",t),t=gs(t,e),m("xrange",t),t=vs(t,e),m("stars",t),t),O=t=>!t||t.toLowerCase()==="x"||t==="*",Ss=(t,e)=>t.trim().split(/\s+/).map(r=>Ts(r,e)).join(" "),Ts=(t,e)=>{let r=e.loose?d[N.TILDELOOSE]:d[N.TILDE];return t.replace(r,(s,n,i,o,c)=>{m("tilde",t,s,n,i,o,c);let u;return O(n)?u="":O(i)?u=`>=${n}.0.0 <${+n+1}.0.0-0`:O(o)?u=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:c?(m("replaceTilde pr",c),u=`>=${n}.${i}.${o}-${c} <${n}.${+i+1}.0-0`):u=`>=${n}.${i}.${o} <${n}.${+i+1}.0-0`,m("tilde return",u),u})},qs=(t,e)=>t.trim().split(/\s+/).map(r=>ws(r,e)).join(" "),ws=(t,e)=>{m("caret",t,e);let r=e.loose?d[N.CARETLOOSE]:d[N.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(n,i,o,c,u)=>{m("caret",t,n,i,o,c,u);let R;return O(i)?R="":O(o)?R=`>=${i}.0.0${s} <${+i+1}.0.0-0`:O(c)?i==="0"?R=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`:R=`>=${i}.${o}.0${s} <${+i+1}.0.0-0`:u?(m("replaceCaret pr",u),i==="0"?o==="0"?R=`>=${i}.${o}.${c}-${u} <${i}.${o}.${+c+1}-0`:R=`>=${i}.${o}.${c}-${u} <${i}.${+o+1}.0-0`:R=`>=${i}.${o}.${c}-${u} <${+i+1}.0.0-0`):(m("no pr"),i==="0"?o==="0"?R=`>=${i}.${o}.${c}${s} <${i}.${o}.${+c+1}-0`:R=`>=${i}.${o}.${c}${s} <${i}.${+o+1}.0-0`:R=`>=${i}.${o}.${c} <${+i+1}.0.0-0`),m("caret return",R),R})},gs=(t,e)=>(m("replaceXRanges",t,e),t.split(/\s+/).map(r=>Ps(r,e)).join(" ")),Ps=(t,e)=>{t=t.trim();let r=e.loose?d[N.XRANGELOOSE]:d[N.XRANGE];return t.replace(r,(s,n,i,o,c,u)=>{m("xRange",t,s,n,i,o,c,u);let R=O(i),$=R||O(o),E=$||O(c),I=E;return n==="="&&I&&(n=""),u=e.includePrerelease?"-0":"",R?n===">"||n==="<"?s="<0.0.0-0":s="*":n&&I?($&&(o=0),c=0,n===">"?(n=">=",$?(i=+i+1,o=0,c=0):(o=+o+1,c=0)):n==="<="&&(n="<",$?i=+i+1:o=+o+1),n==="<"&&(u="-0"),s=`${n+i}.${o}.${c}${u}`):$?s=`>=${i}.0.0${u} <${+i+1}.0.0-0`:E&&(s=`>=${i}.${o}.0${u} <${i}.${+o+1}.0-0`),m("xRange return",s),s})},vs=(t,e)=>(m("replaceStars",t,e),t.trim().replace(d[N.STAR],"")),xs=(t,e)=>(m("replaceGTE0",t,e),t.trim().replace(d[e.includePrerelease?N.GTE0PRE:N.GTE0],"")),Cs=t=>(e,r,s,n,i,o,c,u,R,$,E,I)=>(O(s)?r="":O(n)?r=`>=${s}.0.0${t?"-0":""}`:O(i)?r=`>=${s}.${n}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,O(R)?u="":O($)?u=`<${+R+1}.0.0-0`:O(E)?u=`<${R}.${+$+1}.0-0`:I?u=`<=${R}.${$}.${E}-${I}`:t?u=`<${R}.${$}.${+E+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),Ds=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(m(t[s].semver),t[s].semver!==re.ANY&&t[s].semver.prerelease.length>0){let n=t[s].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var C=h((wi,Lr)=>{var D=Symbol("SemVer ANY"),ne=class t{static get ANY(){return D}constructor(e,r){if(r=pr(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),se("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===D?this.value="":this.value=this.operator+this.semver.version,se("comp",this)}parse(e){let r=this.options.loose?Rr[$r.COMPARATORLOOSE]:Rr[$r.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new mr(s[2],this.options.loose):this.semver=D}toString(){return this.value}test(e){if(se("Comparator.test",e,this.options.loose),this.semver===D||e===D)return!0;if(typeof e=="string")try{e=new mr(e,this.options)}catch{return!1}return te(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Ir(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Ir(this.value,r).test(e.semver):(r=pr(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||te(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||te(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Lr.exports=ne;var pr=F(),{safeRe:Rr,t:$r}=w(),te=J(),se=v(),mr=L(),Ir=S()});var G=h((gi,Nr)=>{var Gs=S(),ys=(t,e,r)=>{try{e=new Gs(e,r)}catch{return!1}return e.test(t)};Nr.exports=ys});var dr=h((Pi,Or)=>{var Fs=S(),js=(t,e)=>new Fs(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Or.exports=js});var Sr=h((vi,Ar)=>{var Xs=L(),Us=S(),Vs=(t,e,r)=>{let s=null,n=null,i=null;try{i=new Us(e,r)}catch{return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===-1)&&(s=o,n=new Xs(s,r))}),s};Ar.exports=Vs});var qr=h((xi,Tr)=>{var _s=L(),Hs=S(),bs=(t,e,r)=>{let s=null,n=null,i=null;try{i=new Hs(e,r)}catch{return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===1)&&(s=o,n=new _s(s,r))}),s};Tr.exports=bs});var Pr=h((Ci,gr)=>{var ie=L(),ks=S(),wr=x(),Ms=(t,e)=>{t=new ks(t,e);let r=new ie("0.0.0");if(t.test(r)||(r=new ie("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let n=t.set[s],i=null;n.forEach(o=>{let c=new ie(o.semver.version);switch(o.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!i||wr(c,i))&&(i=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!r||wr(r,i))&&(r=i)}return r&&t.test(r)?r:null};gr.exports=Ms});var xr=h((Di,vr)=>{var Ys=S(),Bs=(t,e)=>{try{return new Ys(t,e).range||"*"}catch{return null}};vr.exports=Bs});var M=h((Gi,yr)=>{var Ws=L(),Gr=C(),{ANY:zs}=Gr,Ks=S(),Zs=G(),Cr=x(),Dr=V(),Js=H(),Qs=_(),en=(t,e,r,s)=>{t=new Ws(t,s),e=new Ks(e,s);let n,i,o,c,u;switch(r){case">":n=Cr,i=Js,o=Dr,c=">",u=">=";break;case"<":n=Dr,i=Qs,o=Cr,c="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Zs(t,e,s))return!1;for(let R=0;R<e.set.length;++R){let $=e.set[R],E=null,I=null;if($.forEach(f=>{f.semver===zs&&(f=new Gr(">=0.0.0")),E=E||f,I=I||f,n(f.semver,E.semver,s)?E=f:o(f.semver,I.semver,s)&&(I=f)}),E.operator===c||E.operator===u||(!I.operator||I.operator===c)&&i(t,I.semver))return!1;if(I.operator===u&&o(t,I.semver))return!1}return!0};yr.exports=en});var jr=h((yi,Fr)=>{var rn=M(),tn=(t,e,r)=>rn(t,e,">",r);Fr.exports=tn});var Ur=h((Fi,Xr)=>{var sn=M(),nn=(t,e,r)=>sn(t,e,"<",r);Xr.exports=nn});var Hr=h((ji,_r)=>{var Vr=S(),on=(t,e,r)=>(t=new Vr(t,r),e=new Vr(e,r),t.intersects(e,r));_r.exports=on});var kr=h((Xi,br)=>{var ln=G(),an=A();br.exports=(t,e,r)=>{let s=[],n=null,i=null,o=t.sort(($,E)=>an($,E,r));for(let $ of o)ln($,e,r)?(i=$,n||(n=$)):(i&&s.push([n,i]),i=null,n=null);n&&s.push([n,null]);let c=[];for(let[$,E]of s)$===E?c.push($):!E&&$===o[0]?c.push("*"):E?$===o[0]?c.push(`<=${E}`):c.push(`${$} - ${E}`):c.push(`>=${$}`);let u=c.join(" || "),R=typeof e.raw=="string"?e.raw:String(e);return u.length<R.length?u:e}});var Kr=h((Ui,zr)=>{var Mr=S(),le=C(),{ANY:oe}=le,y=G(),ae=A(),cn=(t,e,r={})=>{if(t===e)return!0;t=new Mr(t,r),e=new Mr(e,r);let s=!1;e:for(let n of t.set){for(let i of e.set){let o=En(n,i,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},un=[new le(">=0.0.0-0")],Yr=[new le(">=0.0.0")],En=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===oe){if(e.length===1&&e[0].semver===oe)return!0;r.includePrerelease?t=un:t=Yr}if(e.length===1&&e[0].semver===oe){if(r.includePrerelease)return!0;e=Yr}let s=new Set,n,i;for(let f of t)f.operator===">"||f.operator===">="?n=Br(n,f,r):f.operator==="<"||f.operator==="<="?i=Wr(i,f,r):s.add(f.semver);if(s.size>1)return null;let o;if(n&&i){if(o=ae(n.semver,i.semver,r),o>0)return null;if(o===0&&(n.operator!==">="||i.operator!=="<="))return null}for(let f of s){if(n&&!y(f,String(n),r)||i&&!y(f,String(i),r))return null;for(let et of e)if(!y(f,String(et),r))return!1;return!0}let c,u,R,$,E=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,I=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;E&&E.prerelease.length===1&&i.operator==="<"&&E.prerelease[0]===0&&(E=!1);for(let f of e){if($=$||f.operator===">"||f.operator===">=",R=R||f.operator==="<"||f.operator==="<=",n){if(I&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===I.major&&f.semver.minor===I.minor&&f.semver.patch===I.patch&&(I=!1),f.operator===">"||f.operator===">="){if(c=Br(n,f,r),c===f&&c!==n)return!1}else if(n.operator===">="&&!y(n.semver,String(f),r))return!1}if(i){if(E&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===E.major&&f.semver.minor===E.minor&&f.semver.patch===E.patch&&(E=!1),f.operator==="<"||f.operator==="<="){if(u=Wr(i,f,r),u===f&&u!==i)return!1}else if(i.operator==="<="&&!y(i.semver,String(f),r))return!1}if(!f.operator&&(i||n)&&o!==0)return!1}return!(n&&R&&!i&&o!==0||i&&$&&!n&&o!==0||I||E)},Br=(t,e,r)=>{if(!t)return e;let s=ae(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},Wr=(t,e,r)=>{if(!t)return e;let s=ae(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};zr.exports=cn});var Kn=h((Vi,Qr)=>{var ce=w(),Zr=P(),fn=L(),Jr=W(),hn=q(),pn=Se(),Rn=qe(),$n=Pe(),mn=Ce(),In=Ge(),Ln=Fe(),Nn=Xe(),On=Ve(),dn=A(),An=ke(),Sn=Ye(),Tn=U(),qn=Ke(),wn=Je(),gn=x(),Pn=V(),vn=K(),xn=Z(),Cn=_(),Dn=H(),Gn=J(),yn=lr(),Fn=C(),jn=S(),Xn=G(),Un=dr(),Vn=Sr(),_n=qr(),Hn=Pr(),bn=xr(),kn=M(),Mn=jr(),Yn=Ur(),Bn=Hr(),Wn=kr(),zn=Kr();Qr.exports={parse:hn,valid:pn,clean:Rn,inc:$n,diff:mn,major:In,minor:Ln,patch:Nn,prerelease:On,compare:dn,rcompare:An,compareLoose:Sn,compareBuild:Tn,sort:qn,rsort:wn,gt:gn,lt:Pn,eq:vn,neq:xn,gte:Cn,lte:Dn,cmp:Gn,coerce:yn,Comparator:Fn,Range:jn,satisfies:Xn,toComparators:Un,maxSatisfying:Vn,minSatisfying:_n,minVersion:Hn,validRange:bn,outside:kn,gtr:Mn,ltr:Yn,intersects:Bn,simplifyRange:Wn,subset:zn,SemVer:fn,re:ce.re,src:ce.src,tokens:ce.t,SEMVER_SPEC_VERSION:Zr.SEMVER_SPEC_VERSION,RELEASE_TYPES:Zr.RELEASE_TYPES,compareIdentifiers:Jr.compareIdentifiers,rcompareIdentifiers:Jr.rcompareIdentifiers}});export{Kn as a};
@@ -1 +0,0 @@
1
- import{ha as e,n as r}from"./chunk-TXOB7R5K.js";var n=(()=>{class t{raspberryPiThrottled=new r;static \u0275fac=function(o){return new(o||t)};static \u0275prov=e({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{n as a};
@@ -1 +0,0 @@
1
- import{a as se}from"./chunk-QE7DO6J3.js";import{g as re,m as A,n as ae}from"./chunk-ORPWYWCL.js";import{b as P,c as T,d as C,e as D,f as z,g as F,j as x,m as R,o as Q,p as L,q as O,w as ne,y as I,z as M}from"./chunk-QHPDGSZ6.js";import{b as ie}from"./chunk-NZNNTHFQ.js";import{c as j}from"./chunk-TSZZQKYF.js";import{a as ve}from"./chunk-EP66JAAV.js";import{b as S,j as U}from"./chunk-TMD6JYTR.js";import{a as $,b as E}from"./chunk-3IX3CLER.js";import{$b as G,Bc as s,Cc as o,Dc as te,Gb as K,Kb as B,Lb as f,Mb as u,Rb as g,Tb as W,Ub as X,Vb as Y,Wb as i,Xb as l,Yb as m,ad as q,cc as _,dc as h,g as be,ib as e,kc as Z,lc as ee,na as d,nc as p,oc as v,pc as c,rb as y,xa as N,xc as w,ya as V}from"./chunk-TXOB7R5K.js";function Ce(r,k){r&1&&(i(0,"p",8)(1,"small"),p(2),s(3,"translate"),l()()),r&2&&(e(2),v(o(3,1,"login.invalid_credentials")))}var oe=(()=>{class r{$activeModal=d(A);$api=d(S);$toastr=d(U);$translate=d($);formGroup=new F({password:new x("",[C.required])});invalidCredentials=!1;disable2fa(){this.invalidCredentials=!1,this.$api.post("/users/otp/deactivate",this.formGroup.value).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.setup_2fa_disable_success"),this.$translate.instant("toast.title_success"))},error:()=>{this.formGroup.setValue({password:""}),this.invalidCredentials=!0}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:28,vars:24,consts:[[1,"modal-content",2,"min-height","300px"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],["type","password","autocomplete","current-password",1,"form-control",3,"formControl","placeholder"],[1,"red-text"],[1,"modal-footer","justify-content-between"],[1,"text-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-right"],["type","button","data-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"]],template:function(a,n){a&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),p(3),s(4,"translate"),l(),i(5,"button",3),s(6,"translate"),_("click",function(){return n.$activeModal.dismiss("Dismiss")}),i(7,"span",4),p(8,"\xD7"),l()()(),i(9,"div",5)(10,"p"),p(11),s(12,"translate"),l(),i(13,"div",6),m(14,"input",7),s(15,"translate"),l(),B(16,Ce,4,3,"p",8),l(),i(17,"div",9)(18,"div",10)(19,"button",11),s(20,"translate"),_("click",function(){return n.$activeModal.dismiss("Dismiss")}),p(21),s(22,"translate"),l()(),m(23,"div",12),i(24,"div",13)(25,"button",14),_("click",function(){return n.disable2fa()}),p(26),s(27,"translate"),l()()()()),a&2&&(e(3),v(o(4,10,"users.setup_2fa_disable")),e(2),f("aria-label",o(6,12,"form.button_close")),e(6),v(o(12,14,"users.setup_2fa_disable_current_password")),e(3),u("formControl",n.formGroup.controls.password)("placeholder",o(15,16,"users.label_password")),e(2),g(n.invalidCredentials?16:-1),e(3),f("aria-label",o(20,18,"form.button_close")),e(2),c(" ",o(22,20,"form.button_close")," "),e(4),u("disabled",n.formGroup.invalid),e(),c(" ",o(27,22,"form.button_disable")," "))},dependencies:[I,T,D,M,Q,E],encapsulation:2})}return r})();var le=be(ve(),1);var xe=["qrcode"],he=r=>({timeDiffError:r});function we(r,k){if(r&1&&(i(0,"div",6)(1,"h3"),p(2),s(3,"translate"),l(),i(4,"p"),p(5),s(6,"translate"),l()()),r&2){let t=h();e(2),v(o(3,2,"users.setup_2fa_cannot_setup_2fa")),e(3),v(te(6,4,"users.setup_2fa_server_time_out",w(7,he,t.timeDiffError)))}}function ge(r,k){r&1&&(i(0,"div")(1,"p"),p(2),s(3,"translate"),l()()),r&2&&(e(2),v(o(3,1,"users.setup_2fa_scan_qr_code")))}function ye(r,k){if(r&1&&(i(0,"div",10)(1,"p"),p(2),s(3,"translate"),l(),i(4,"div",16),m(5,"input",17),l()()),r&2){let t=h();e(2),v(o(3,2,"users.setup_2fa_enter_code")),e(3),u("formControl",t.formGroup.controls.code)}}function Se(r,k){if(r&1){let t=G();i(0,"button",18),_("click",function(){N(t);let n=h();return V(n.enable2fa())}),p(1),s(2,"translate"),l()}if(r&2){let t=h();u("disabled",t.formGroup.invalid),e(),c(" ",o(2,2,"form.button_enable")," ")}}var pe=(()=>{class r{$activeModal=d(A);$api=d(S);$toastr=d(U);$translate=d($);user;qrcodeElement=K("qrcode");timeDiffError=null;otpString;formGroup=new F({code:new x("",[C.required,C.minLength(6),C.maxLength(6)])});ngOnInit(){this.$api.post("/users/otp/setup",{}).subscribe({next:t=>{this.checkTimeDiff(t.timestamp),this.timeDiffError||(this.otpString=t.otpauth)},error:t=>{this.$activeModal.dismiss(),console.error(t),this.$toastr.error(this.$translate.instant("users.setup_2fa_enable_error"),this.$translate.instant("toast.title_error"))}})}checkTimeDiff(t){let a=(0,le.default)(t).diff(new Date,"millisecond");if(a<-5e3||a>5e3){this.timeDiffError=a;return}this.timeDiffError=null}enable2fa(){this.$api.post("/users/otp/activate",this.formGroup.value).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.setup_2fa_enabled_success"),this.$translate.instant("toast.title_success")),this.$activeModal.close()},error:t=>{console.error(t),this.$toastr.error(this.$translate.instant("users.setup_2fa_activate_error"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],viewQuery:function(a,n){a&1&&Z(n.qrcodeElement,xe,5),a&2&&ee()},inputs:{user:"user"},decls:27,vars:21,consts:[[1,"modal-content","setup2fa"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"text-center"],["type","warning",3,"dismissible"],[1,"text-center","w-100","d-flex","justify-content-center"],[1,"mx-auto","my-2",2,"width","180px","height","180px",3,"data"],[1,"mt-4"],[1,"modal-footer","justify-content-between"],[1,"text-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-right"],["type","button","data-dismiss","modal",1,"btn","btn-primary",3,"disabled"],[1,"form-group"],["type","text","placeholder","eg. 123456","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*",1,"form-control",3,"formControl"],["type","button","data-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(a,n){a&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),p(3),s(4,"translate"),l(),i(5,"button",3),s(6,"translate"),_("click",function(){return n.$activeModal.dismiss("Dismiss")}),i(7,"span",4),p(8,"\xD7"),l()()(),i(9,"div",5),B(10,we,7,9,"div",6),i(11,"ngb-alert",7),p(12),s(13,"translate"),l(),B(14,ge,4,3,"div"),i(15,"div",8),m(16,"app-qrcode",9),l(),B(17,ye,6,4,"div",10),l(),i(18,"div",11)(19,"div",12)(20,"button",13),s(21,"translate"),_("click",function(){return n.$activeModal.dismiss("Dismiss")}),p(22),s(23,"translate"),l()(),m(24,"div",6),i(25,"div",14),B(26,Se,3,4,"button",15),l()()()),a&2&&(e(3),v(o(4,11,"users.setup_2fa")),e(2),f("aria-label",o(6,13,"form.button_close")),e(5),g(n.timeDiffError?10:-1),e(),u("dismissible",!1),e(),c(" ",o(13,15,"users.setup_2fa_warning")," "),e(2),g(n.timeDiffError?-1:14),e(2),u("data",n.otpString),e(),g(n.timeDiffError?-1:17),e(3),f("aria-label",o(21,17,"form.button_close")),e(2),c(" ",o(23,19,"form.button_close")," "),e(4),g(n.timeDiffError?-1:26))},dependencies:[re,se,I,T,D,ne,M,Q,E],encapsulation:2})}return r})();var me=r=>({active:r}),de=r=>({"is-invalid":r}),ce=(()=>{class r{$activeModal=d(A);$api=d(S);$toastr=d(U);$translate=d($);form=new F({username:new x("",[C.required]),name:new x("",[C.required]),password:new x("",[C.compose([C.required,C.minLength(4)])]),passwordConfirm:new x("",[C.required]),admin:new x(!0)},this.matchPassword);page={title:"users.title_add_user",save:"users.button_add_new_user",password:"users.label_password"};matchPassword(t){let a=t.get("password").value,n=t.get("passwordConfirm").value;if(a!==n)t.get("passwordConfirm").setErrors({matchPassword:!0});else return null}onSubmit({value:t}){this.$api.post("/users",t).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_added_new_user"),this.$translate.instant("toast.title_success"))},error:a=>{this.$toastr.error(a.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:59,vars:57,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"container","px-1"],[1,"md-form"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none",1,"form-control","px-0"],["for","form-username",3,"ngClass"],[1,"fas","fa-fw","fa-user-shield"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","px-0"],["for","form-name",3,"ngClass"],[1,"fas","fa-fw","fa-user"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","px-0",3,"ngClass"],["for","form-pass"],[1,"fas","fa-fw","fa-lock"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","px-0",3,"ngClass"],["for","form-pass-confirm"],[1,"form-group","row","align-items-center"],[1,"col-6","col-form-label","grey-text"],[1,"fas","fa-fw","fa-user-secret"],[1,"col-6","text-right"],["type","checkbox","formControlName","admin","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ml-3",2,"min-width","50px"],[1,"modal-footer","justify-content-between"],[1,"text-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-right"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(a,n){a&1&&(i(0,"div",0)(1,"form",1),_("ngSubmit",function(){return n.onSubmit(n.form)}),i(2,"div",2)(3,"h5",3),p(4),s(5,"translate"),l(),i(6,"button",4),s(7,"translate"),_("click",function(){return n.$activeModal.dismiss("Dismiss")}),i(8,"span",5),p(9,"\xD7"),l()()(),i(10,"div",6)(11,"div",7)(12,"div",8),m(13,"input",9),s(14,"translate"),i(15,"label",10),m(16,"i",11),p(17),s(18,"translate"),l()(),i(19,"div",8),m(20,"input",12),s(21,"translate"),i(22,"label",13),m(23,"i",14),p(24),s(25,"translate"),l()(),i(26,"div",8),m(27,"input",15),s(28,"translate"),i(29,"label",16),m(30,"i",17),p(31),s(32,"translate"),l()(),i(33,"div",8),m(34,"input",18),s(35,"translate"),i(36,"label",19),m(37,"i",17),p(38),s(39,"translate"),l()(),i(40,"div",20)(41,"label",21),m(42,"i",22),p(43),s(44,"translate"),l(),i(45,"div",23),m(46,"input",24),s(47,"translate"),m(48,"label",25),l()()()(),i(49,"div",26)(50,"div",27)(51,"button",28),_("click",function(){return n.$activeModal.dismiss("Dismiss")}),p(52),s(53,"translate"),l()(),m(54,"div",29),i(55,"div",30)(56,"button",31),p(57),s(58,"translate"),l()()()()()),a&2&&(e(),u("formGroup",n.form),e(3),v(o(5,21,"users.title_add_user")),e(2),f("aria-label",o(7,23,"form.button_close")),e(7),f("disabled",n.page.title==="users.title_edit_user"?!0:null)("aria-label",o(14,25,"users.label_username")),e(2),u("ngClass",w(49,me,n.page.title==="users.title_edit_user")),e(2),c(" ",o(18,27,"users.label_username")," "),e(3),f("aria-label",o(21,29,"users.label_full_name")),e(2),u("ngClass",w(51,me,n.page.title==="users.title_edit_user")),e(2),c(" ",o(25,31,"users.label_full_name")," "),e(3),u("ngClass",w(53,de,n.form.controls.password.dirty&&n.form.controls.password.errors)),f("aria-label",o(28,33,n.page.password)),e(4),c(" ",o(32,35,n.page.password)," "),e(3),u("ngClass",w(55,de,n.form.controls.passwordConfirm.dirty&&n.form.controls.passwordConfirm.errors)),f("aria-label",o(35,37,"users.label_confirm_password")),e(4),c(" ",o(39,39,"users.label_confirm_password")," "),e(5),c(" ",o(44,41,"users.label_admin_user")," "),e(3),f("aria-label",o(47,43,"users.label_admin_user")),e(6),c(" ",o(53,45,"form.button_close")," "),e(4),u("disabled",!n.form.valid),e(),c(" ",o(58,47,"form.button_save")," "))},dependencies:[I,R,T,P,D,z,M,L,O,q,E],encapsulation:2})}return r})();var ue=r=>({active:r}),fe=r=>({"is-invalid":r}),_e=(()=>{class r{$activeModal=d(A);$api=d(S);$auth=d(j);$toastr=d(U);$translate=d($);user;form=new F({username:new x("",[C.required]),name:new x("",[C.required]),password:new x(""),passwordConfirm:new x(""),admin:new x(!0)},this.matchPassword);page={title:"users.title_edit_user",save:"form.button_save",password:"users.label_new_password"};isCurrentUser=!1;ngOnInit(){this.isCurrentUser=this.$auth.user.username===this.user.username,this.form.patchValue(this.user)}matchPassword(t){let a=t.get("password").value,n=t.get("passwordConfirm").value;if(a!==n)t.get("passwordConfirm").setErrors({matchPassword:!0});else return null}onSubmit({value:t}){this.$api.patch(`/users/${this.user.id}`,t).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_updated_user"),this.$translate.instant("toast.title_success")),this.isCurrentUser&&t.username!==this.$auth.user.username&&this.$auth.logout()},error:a=>{console.error(a),this.$toastr.error(a.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:59,vars:56,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"container","px-1"],[1,"md-form"],["formControlName","username","type","text","id","form-username","autocomplete","off","autocapitalize","none",1,"form-control","px-0"],["for","form-username",3,"ngClass"],[1,"fas","fa-fw","fa-user-shield"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","px-0"],["for","form-name",3,"ngClass"],[1,"fas","fa-fw","fa-user"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","px-0",3,"ngClass"],["for","form-pass"],[1,"fas","fa-fw","fa-lock"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","px-0",3,"ngClass"],["for","form-pass-confirm"],[1,"form-group","row","align-items-center"],[1,"col-6","col-form-label","grey-text"],[1,"fas","fa-fw","fa-user-secret"],[1,"col-6","text-right"],["type","checkbox","formControlName","admin","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ml-3",2,"min-width","50px"],[1,"modal-footer","justify-content-between"],[1,"text-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-right"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(a,n){a&1&&(i(0,"div",0)(1,"form",1),_("ngSubmit",function(){return n.onSubmit(n.form)}),i(2,"div",2)(3,"h5",3),p(4),s(5,"translate"),l(),i(6,"button",4),s(7,"translate"),_("click",function(){return n.$activeModal.dismiss("Dismiss")}),i(8,"span",5),p(9,"\xD7"),l()()(),i(10,"div",6)(11,"div",7)(12,"div",8),m(13,"input",9),s(14,"translate"),i(15,"label",10),m(16,"i",11),p(17),s(18,"translate"),l()(),i(19,"div",8),m(20,"input",12),s(21,"translate"),i(22,"label",13),m(23,"i",14),p(24),s(25,"translate"),l()(),i(26,"div",8),m(27,"input",15),s(28,"translate"),i(29,"label",16),m(30,"i",17),p(31),s(32,"translate"),l()(),i(33,"div",8),m(34,"input",18),s(35,"translate"),i(36,"label",19),m(37,"i",17),p(38),s(39,"translate"),l()(),i(40,"div",20)(41,"label",21),m(42,"i",22),p(43),s(44,"translate"),l(),i(45,"div",23),m(46,"input",24),s(47,"translate"),m(48,"label",25),l()()()(),i(49,"div",26)(50,"div",27)(51,"button",28),_("click",function(){return n.$activeModal.dismiss("Dismiss")}),p(52),s(53,"translate"),l()(),m(54,"div",29),i(55,"div",30)(56,"button",31),p(57),s(58,"translate"),l()()()()()),a&2&&(e(),u("formGroup",n.form),e(3),v(o(5,20,"users.title_edit_user")),e(2),f("aria-label",o(7,22,"form.button_close")),e(7),f("aria-label",o(14,24,"users.label_username")),e(2),u("ngClass",w(48,ue,n.page.title==="users.title_edit_user")),e(2),c(" ",o(18,26,"users.label_username")," "),e(3),f("aria-label",o(21,28,"users.label_full_name")),e(2),u("ngClass",w(50,ue,n.page.title==="users.title_edit_user")),e(2),c(" ",o(25,30,"users.label_full_name")," "),e(3),u("ngClass",w(52,fe,n.form.controls.password.dirty&&n.form.controls.password.errors)),f("aria-label",o(28,32,n.page.password)),e(4),c(" ",o(32,34,n.page.password)," "),e(3),u("ngClass",w(54,fe,n.form.controls.passwordConfirm.dirty&&n.form.controls.passwordConfirm.errors)),f("aria-label",o(35,36,"users.label_confirm_password")),e(4),c(" ",o(39,38,"users.label_confirm_password")," "),e(5),c(" ",o(44,40,"users.label_admin_user")," "),e(3),f("aria-label",o(47,42,"users.label_admin_user")),e(6),c(" ",o(53,44,"form.button_close")," "),e(4),u("disabled",!n.form.valid),e(),c(" ",o(58,46,"form.button_save")," "))},dependencies:[I,R,T,P,D,z,M,L,O,q,E],encapsulation:2})}return r})();function $e(r,k){if(r&1){let t=G();i(0,"button",19),_("click",function(){N(t);let n=h().$implicit,b=h();return V(b.deleteUser(n.id))}),p(1),s(2,"translate"),l()}r&2&&(e(),c(" ",o(2,1,"form.button_delete")," "))}function Ee(r,k){if(r&1){let t=G();i(0,"button",20),_("click",function(){N(t);let n=h().$implicit,b=h();return V(b.setup2fa(n))}),p(1),s(2,"translate"),l()}r&2&&(e(),v(o(2,1,"users.setup_2fa")))}function Ue(r,k){if(r&1){let t=G();i(0,"button",18),_("click",function(){N(t);let n=h().$implicit,b=h();return V(b.disable2fa(n))}),p(1),s(2,"translate"),l()}r&2&&(e(),c(" ",o(2,1,"users.setup_2fa_disable")," "))}function ke(r,k){if(r&1){let t=G();i(0,"div",7)(1,"div",8)(2,"div",9)(3,"div",10)(4,"span",11),m(5,"h4",12)(6,"h5",13),l()(),i(7,"div",14),B(8,$e,3,3,"button",15)(9,Ee,3,3,"button",16)(10,Ue,3,3,"button",17),i(11,"button",18),_("click",function(){let n=N(t).$implicit,b=h();return V(b.openEditUser(n))}),p(12),s(13,"translate"),l()()()()()}if(r&2){let t=k.$implicit,a=h();e(5),u("innerText",t.name),e(),u("innerText",t.username),e(2),g(a.$auth.user.username!==t.username?8:-1),e(),g(a.$auth.user.username===t.username&&!t.otpActive?9:-1),e(),g(a.$auth.user.username===t.username&&t.otpActive?10:-1),e(2),v(o(13,6,"form.button_edit"))}}var $t=(()=>{class r{$api=d(S);$auth=d(j);$modal=d(ae);$route=d(ie);$toastr=d(U);$translate=d($);homebridgeUsers;ngOnInit(){this.$route.data.subscribe(t=>{this.homebridgeUsers=t.homebridgeUsers})}reloadUsers(){return this.$api.get("/users").subscribe(t=>{this.homebridgeUsers=t})}openAddNewUser(){this.$modal.open(ce,{size:"lg",backdrop:"static"}).result.finally(()=>{this.reloadUsers()})}openEditUser(t){let a=this.$modal.open(_e,{size:"lg",backdrop:"static"});a.componentInstance.user=t,a.result.finally(()=>{this.reloadUsers()})}deleteUser(t){this.$api.delete(`/users/${t}`).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.toast_user_deleted"),this.$translate.instant("toast.title_success")),this.reloadUsers()},error:a=>{console.error(a),this.$toastr.error(a.error.message||this.$translate.instant("users.toast_failed_to_delete_user"),this.$translate.instant("toast.title_error"))}})}setup2fa(t){let a=this.$modal.open(pe,{size:"lg",backdrop:"static"});a.componentInstance.user=t,a.result.finally(()=>{this.reloadUsers()})}disable2fa(t){let a=this.$modal.open(oe,{size:"lg",backdrop:"static"});a.componentInstance.user=t,a.result.finally(()=>{this.reloadUsers()})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=y({type:r,selectors:[["app-users"]],decls:12,vars:6,consts:[[1,"row","mb-3"],[1,"col-9"],[1,"primary-text","m-0"],[1,"col-3","text-right"],[1,"btn","btn-elegant","waves-effect","m-0",3,"click"],[1,"fas","fa-fw","fa-plus"],[1,"row"],[1,"col-md-6","mb-4"],[1,"card","card-body"],[1,"d-flex","flex-column"],[1,"d-flex","flex-row","mb-3"],[1,"me-auto","my-0"],[3,"innerText"],[1,"small","text-truncate","primary-text",3,"innerText"],[1,"d-flex","flex-row","justify-content-between",2,"gap","10px"],[1,"btn","btn-elegant","btn-sml","m-0"],[1,"btn","btn-primary","mt-0","m-0"],[1,"btn","btn-primary","m-0"],[1,"btn","btn-primary","m-0",3,"click"],[1,"btn","btn-elegant","btn-sml","m-0",3,"click"],[1,"btn","btn-primary","mt-0","m-0",3,"click"]],template:function(a,n){a&1&&(i(0,"div",0)(1,"div",1)(2,"h3",2),p(3),s(4,"translate"),l()(),i(5,"div",3)(6,"button",4),s(7,"translate"),_("click",function(){return n.openAddNewUser()}),m(8,"i",5),l()()(),i(9,"div",6),X(10,ke,14,8,"div",7,W),l()),a&2&&(e(3),v(o(4,2,"users.title_users")),e(3),f("aria-label",o(7,4,"users.button_add_user")),e(4),Y(n.homebridgeUsers))},dependencies:[E],encapsulation:2})}return r})();export{oe as a,pe as b,ce as c,_e as d,$t as e};
@@ -1 +0,0 @@
1
- import"./chunk-DLMGGPRM.js";import{q as s}from"./chunk-ORPWYWCL.js";import{z as p}from"./chunk-QHPDGSZ6.js";import{g as i}from"./chunk-NZNNTHFQ.js";import"./chunk-EP66JAAV.js";import"./chunk-TMD6JYTR.js";import"./chunk-UG5DK2RQ.js";import{c as m}from"./chunk-3IX3CLER.js";import{ia as t,md as n,sb as r}from"./chunk-TXOB7R5K.js";var a=[{path:"",loadComponent:()=>import("./chunk-QJYLB6LD.js").then(o=>o.PowerOptionsComponent)}],u=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i.forChild(a),i]})}return o})();var j=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[n,u,s,p,m]})}return o})();export{j as PowerOptionsModule};
@@ -1 +0,0 @@
1
- import{a}from"./chunk-KG3DHJZY.js";import"./chunk-QHPDGSZ6.js";import"./chunk-NZNNTHFQ.js";import"./chunk-TSZZQKYF.js";import"./chunk-EP66JAAV.js";import"./chunk-TMD6JYTR.js";import"./chunk-UG5DK2RQ.js";import"./chunk-3IX3CLER.js";import"./chunk-TXOB7R5K.js";export{a as LoginComponent};
@@ -1 +0,0 @@
1
- import{a}from"./chunk-YJB6Y76M.js";import"./chunk-ZT23DWNL.js";import"./chunk-6TCHCTXZ.js";import"./chunk-R2W5BRWY.js";import"./chunk-656LQTVE.js";import"./chunk-7EUQWCP5.js";import"./chunk-WNWWUCCZ.js";import"./chunk-IMOTYOKQ.js";import"./chunk-CCUID66K.js";import"./chunk-QE7DO6J3.js";import"./chunk-BKUGARB4.js";import"./chunk-BPMSJ2VF.js";import"./chunk-WHJOLAED.js";import"./chunk-JZZQRLNW.js";import"./chunk-KQJ7ONUG.js";import"./chunk-ORPWYWCL.js";import"./chunk-QHPDGSZ6.js";import"./chunk-YRSHLHYL.js";import"./chunk-NZNNTHFQ.js";import"./chunk-TSZZQKYF.js";import"./chunk-EP66JAAV.js";import"./chunk-TMD6JYTR.js";import"./chunk-UG5DK2RQ.js";import"./chunk-3IX3CLER.js";import"./chunk-TXOB7R5K.js";export{a as PluginsComponent};