iobroker.eos-admin 8.0.0 → 8.0.2

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 (267) hide show
  1. package/NEXOWATT_EOS_BUILD_INFO.json +7 -6
  2. package/NEXOWATT_EOS_PREBUILT_MANIFEST.json +195 -107
  3. package/START_HERE_8.0.1.md +36 -0
  4. package/START_HERE_8.0.2.md +41 -0
  5. package/adminWww/.vite/manifest.json +278 -278
  6. package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +333 -329
  7. package/adminWww/assets/{AccessTime-Dpa6PKHY.js → AccessTime-5f47qrw7.js} +1 -1
  8. package/adminWww/assets/{AceEditor-DTzNaeVy.js → AceEditor-CJ-_Ev2E.js} +1 -1
  9. package/adminWww/assets/{AdapterUpdateDialog-B3y8RL_5.js → AdapterUpdateDialog-QwlPbETd.js} +3 -3
  10. package/adminWww/assets/Adapters-gKngfaOu.js +7 -0
  11. package/adminWww/assets/{AdminUtils-DDT_kD8H.js → AdminUtils-CopxRJZ2.js} +1 -1
  12. package/adminWww/assets/{Apps-C8LE9l6Z.js → Apps-BKnx1gzD.js} +1 -1
  13. package/adminWww/assets/{Book-QmHxDaHb.js → Book-DrhneQH0.js} +1 -1
  14. package/adminWww/assets/{Cached-f77QQBQD.js → Cached-XJmxLN4E.js} +1 -1
  15. package/adminWww/assets/{Computer-DFIUq-fL.js → Computer-DDMBRY5r.js} +1 -1
  16. package/adminWww/assets/{Config-BZDUILCW.js → Config-BwTa1LdH.js} +1 -1
  17. package/adminWww/assets/{ConfigManager-CFuOc_kb.js → ConfigManager-DYwC4yq9.js} +1 -1
  18. package/adminWww/assets/{CustomModal-B8vdCRn1.js → CustomModal-DjI4oCb8.js} +1 -1
  19. package/adminWww/assets/{CustomTab-DSPqif6P.js → CustomTab-_HYUrXsZ.js} +1 -1
  20. package/adminWww/assets/{DeleteForever-BnEM-6_v.js → DeleteForever-Caoe64_y.js} +1 -1
  21. package/adminWww/assets/EasyMode-CCRqFtQq.js +1 -0
  22. package/adminWww/assets/Enums-BTurn3-x.js +92 -0
  23. package/adminWww/assets/{Extension-DU1jqvic.js → Extension-D-tNJv4S.js} +1 -1
  24. package/adminWww/assets/{Fields-DnckPMA8.js → Fields-C2Bn4V04.js} +1 -1
  25. package/adminWww/assets/{Files-CwUHx0pF.js → Files-XdmhxGOR.js} +1 -1
  26. package/adminWww/assets/Hosts-DiTMe9fw.js +120 -0
  27. package/adminWww/assets/{InfoOutlined-l86Si1qa.js → InfoOutlined-DIGDQvu6.js} +1 -1
  28. package/adminWww/assets/Instances-DA6FIgRs.js +4 -0
  29. package/adminWww/assets/Intro-CJpwLg8Q.js +2 -0
  30. package/adminWww/assets/{KeyboardArrowRight-zZUJhG9e.js → KeyboardArrowRight-DVPBjTKi.js} +1 -1
  31. package/adminWww/assets/Logs-CA0mEMlO.js +2 -0
  32. package/adminWww/assets/{MoreHoriz-CR2kD-dc.js → MoreHoriz-BYaCptH0.js} +1 -1
  33. package/adminWww/assets/Objects-B2IC3Bce.js +301 -0
  34. package/adminWww/assets/{Overview-WwP6FjK-.js → Overview-HG8fAMFM.js} +2 -2
  35. package/adminWww/assets/{Pageview-DBITLOzI.js → Pageview-DFHddrKX.js} +1 -1
  36. package/adminWww/assets/{PersonOff-ANdO5Nu4.js → PersonOff-BwYQLD1M.js} +1 -1
  37. package/adminWww/assets/{PushPinOutlined-DvxsqPHo.js → PushPinOutlined-CEBeTmNm.js} +1 -1
  38. package/adminWww/assets/Remove-BPxvNccW.js +1 -0
  39. package/adminWww/assets/{Schedule-BMMrgd7j.js → Schedule-BQlh1nhQ.js} +1 -1
  40. package/adminWww/assets/{Star-DNdm064z.js → Star-ChMjBwLn.js} +1 -1
  41. package/adminWww/assets/State-UGfoS6qW.js +1 -0
  42. package/adminWww/assets/Storage-DrC3j-wf.js +1 -0
  43. package/adminWww/assets/{TextSnippet-Bywi1YuG.js → TextSnippet-BQ4TSmvS.js} +1 -1
  44. package/adminWww/assets/{Timeline-IQCnSLiw.js → Timeline-CEyldmz2.js} +1 -1
  45. package/adminWww/assets/{Timer-Be9yF62g.js → Timer-I0twtyWh.js} +1 -1
  46. package/adminWww/assets/{UnfoldMore-Du7-8wYn.js → UnfoldMore-_DDSfPKk.js} +1 -1
  47. package/adminWww/assets/{Usb-Ca47vqRv.js → Usb-Dwk7qdYu.js} +1 -1
  48. package/adminWww/assets/{UsedResources-CMTzFOX3.js → UsedResources-B6HWeXGX.js} +2 -2
  49. package/adminWww/assets/Users-DFeYuC5y.js +1 -0
  50. package/adminWww/assets/{ViewCompact-C3SC0jFF.js → ViewCompact-BbfomOIi.js} +1 -1
  51. package/adminWww/assets/ViewList-1pB5VinA.js +1 -0
  52. package/adminWww/assets/{ViewSidebar-kHvah-XS.js → ViewSidebar-DdedDirX.js} +1 -1
  53. package/adminWww/assets/{VpnKey-iMA7KrB-.js → VpnKey-o8QeqmnU.js} +1 -1
  54. package/adminWww/assets/{WifiTethering-Da8nW7Do.js → WifiTethering-Cp63fmkC.js} +1 -1
  55. package/adminWww/assets/{_virtual_mf-localSharedImportMap___mfe_internal__iobroker_admin__mf_owner__1-CpelrCgN.js → _virtual_mf-localSharedImportMap___mfe_internal__iobroker_admin__mf_owner__1-uaKFfE5p.js} +1 -1
  56. package/adminWww/assets/{bootstrap-Bs4TZ7iA.js → bootstrap-DSDOwKWU.js} +33 -33
  57. package/adminWww/assets/{date-fns-Bpgjk9P-.js → date-fns-ukillHs-.js} +1 -1
  58. package/adminWww/assets/helpers-CDcY0YJ-.js +1 -0
  59. package/adminWww/assets/{hostInit-2xIZYDSq.js → hostInit-Cd61hJHh.js} +1 -1
  60. package/adminWww/assets/{icons-material-BLgrEUSv.js → icons-material-Dms1APQk.js} +1 -1
  61. package/adminWww/assets/{index-BZifaJHi.js → index-D6uhIclX.js} +2 -2
  62. package/adminWww/assets/{installSVGRenderer-Pe6-VnD2.js → installSVGRenderer-BR-zIijZ.js} +1 -1
  63. package/adminWww/assets/{lib-CE1B3iHH.js → lib-BZRGBDoe.js} +2 -2
  64. package/adminWww/assets/{loadShare-eager-CRNcc8D7.js → loadShare-eager-BpwDZfDr.js} +93 -93
  65. package/adminWww/assets/{mf-entry-bootstrap-0-a6a54377.js → mf-entry-bootstrap-0-2d631020.js} +3 -3
  66. package/adminWww/assets/{pendingShares-CuQbFsaK.js → pendingShares-D1Vr_qYv.js} +2 -2
  67. package/adminWww/assets/{sentry-B4uGc7ut.js → sentry-BFzW-2KQ.js} +1 -1
  68. package/adminWww/assets/{setYear-DurmWw03.js → setYear-DhVdgUBF.js} +1 -1
  69. package/adminWww/css/nexowatt-native-shell.css +72 -0
  70. package/adminWww/index.html +21 -21
  71. package/adminWww/js/eos-license-link.js +9 -16
  72. package/adminWww/js/nexowatt-native-shell.js +2 -2
  73. package/adminWww/mf-manifest.json +1 -1
  74. package/adminWww/mf-stats.json +1 -1
  75. package/adminWww/{remoteEntry-eos-8.0.0.js → remoteEntry-eos-8.0.2.js} +2 -2
  76. package/adminWww/remoteEntry.js +1 -1
  77. package/build/lib/eosSessionSecurity.js +12 -4
  78. package/build/lib/eosSessionSecurity.js.map +1 -1
  79. package/build/lib/vendor/webserver/LICENSE +21 -0
  80. package/build/lib/vendor/webserver/README.md +506 -0
  81. package/build/lib/vendor/webserver/build/index.d.ts +9 -0
  82. package/build/lib/vendor/webserver/build/index.js +42 -0
  83. package/build/lib/vendor/webserver/build/index.js.map +1 -0
  84. package/build/lib/vendor/webserver/build/lib/acmeChallenge.d.ts +65 -0
  85. package/build/lib/vendor/webserver/build/lib/acmeChallenge.js +149 -0
  86. package/build/lib/vendor/webserver/build/lib/acmeChallenge.js.map +1 -0
  87. package/build/lib/vendor/webserver/build/lib/certificateManager.d.ts +60 -0
  88. package/build/lib/vendor/webserver/build/lib/certificateManager.js +128 -0
  89. package/build/lib/vendor/webserver/build/lib/certificateManager.js.map +1 -0
  90. package/build/lib/vendor/webserver/build/lib/http2Compat.d.ts +21 -0
  91. package/build/lib/vendor/webserver/build/lib/http2Compat.js +109 -0
  92. package/build/lib/vendor/webserver/build/lib/http2Compat.js.map +1 -0
  93. package/build/lib/vendor/webserver/build/lib/oauth2-authcode.d.ts +167 -0
  94. package/build/lib/vendor/webserver/build/lib/oauth2-authcode.js +619 -0
  95. package/build/lib/vendor/webserver/build/lib/oauth2-authcode.js.map +1 -0
  96. package/build/lib/vendor/webserver/build/lib/oauth2-clients.d.ts +92 -0
  97. package/build/lib/vendor/webserver/build/lib/oauth2-clients.js +230 -0
  98. package/build/lib/vendor/webserver/build/lib/oauth2-clients.js.map +1 -0
  99. package/build/lib/vendor/webserver/build/lib/oauth2-model.d.ts +84 -0
  100. package/build/lib/vendor/webserver/build/lib/oauth2-model.js +388 -0
  101. package/build/lib/vendor/webserver/build/lib/oauth2-model.js.map +1 -0
  102. package/build/lib/vendor/webserver/build/lib/oauth2.d.ts +75 -0
  103. package/build/lib/vendor/webserver/build/lib/oauth2.js +625 -0
  104. package/build/lib/vendor/webserver/build/lib/oauth2.js.map +1 -0
  105. package/build/lib/vendor/webserver/build/lib/securityChecker.d.ts +6 -0
  106. package/build/lib/vendor/webserver/build/lib/securityChecker.js +96 -0
  107. package/build/lib/vendor/webserver/build/lib/securityChecker.js.map +1 -0
  108. package/build/lib/vendor/webserver/build/lib/usedResources.d.ts +62 -0
  109. package/build/lib/vendor/webserver/build/lib/usedResources.js +231 -0
  110. package/build/lib/vendor/webserver/build/lib/usedResources.js.map +1 -0
  111. package/build/lib/vendor/webserver/build/lib/utils.d.ts +35 -0
  112. package/build/lib/vendor/webserver/build/lib/utils.js +110 -0
  113. package/build/lib/vendor/webserver/build/lib/utils.js.map +1 -0
  114. package/build/lib/vendor/webserver/build/lib/webServer.d.ts +164 -0
  115. package/build/lib/vendor/webserver/build/lib/webServer.js +454 -0
  116. package/build/lib/vendor/webserver/build/lib/webServer.js.map +1 -0
  117. package/build/lib/vendor/webserver/package.json +63 -0
  118. package/build/lib/web.js +26 -6
  119. package/build/lib/web.js.map +1 -1
  120. package/docs/ADMIN8_MIGRATION_8.0.0_DE.md +4 -0
  121. package/docs/cra/CRA_IEC_GAP_ANALYSIS_2026-09-30.md +10 -0
  122. package/docs/security/admin8-2026-11-04/development-1.log +4 -4
  123. package/docs/security/admin8-2026-11-04/development-2.log +275 -233
  124. package/docs/security/admin8-2026-11-05/copy-update/evidence-sha256.json +0 -5
  125. package/docs/security/admin8-2026-11-05/login-fix/BACKEND_DIAGNOSE_DE.md +48 -0
  126. package/docs/security/admin8-2026-11-05/login-fix/REPORT_DE.md +47 -0
  127. package/docs/security/admin8-2026-11-05/login-fix/REVIEW_DE.md +7 -0
  128. package/docs/security/admin8-2026-11-05/login-fix/controller-adapter-api.ts.txt +122 -0
  129. package/docs/security/admin8-2026-11-05/login-fix/controller-file-view.ts.txt +75 -0
  130. package/docs/security/admin8-2026-11-05/login-fix/controller-redis-view.ts.txt +471 -0
  131. package/docs/security/admin8-2026-11-05/login-fix/dependency/LICENSE-webserver-3.4.0 +21 -0
  132. package/docs/security/admin8-2026-11-05/login-fix/dependency/REPORT_DE.md +41 -0
  133. package/docs/security/admin8-2026-11-05/login-fix/dependency/evidence-sha256.json +116 -0
  134. package/docs/security/admin8-2026-11-05/login-fix/dependency/http-consumer-check.cjs +58 -0
  135. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/README_DE.md +9 -0
  136. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/REJECTED-webserver-3.4.0-eos-oauth.provenance.json +263 -0
  137. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/REJECTED-webserver-3.4.0-eos-oauth.tgz +0 -0
  138. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/admission.log +16 -0
  139. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/consumer-audit-stderr.log +1 -0
  140. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/consumer-audit.json +22 -0
  141. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/consumer-fixture-1.0.0.tgz +0 -0
  142. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/consumer-fixture-package.json +11 -0
  143. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/consumer-npm10-package-lock.json +387 -0
  144. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/consumer-npm11-package-lock.json +387 -0
  145. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/evidence-sha256.json +85 -0
  146. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/http-consumer-npm10-node22.json +11 -0
  147. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/http-consumer-npm11-node24.json +11 -0
  148. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/local-tests.json +38 -0
  149. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/tests-node22.log +168 -0
  150. package/docs/security/admin8-2026-11-05/login-fix/dependency/rejected-file-dependency/tests-node24.log +36 -0
  151. package/docs/security/admin8-2026-11-05/login-fix/dependency/source-vendor-tests-node22.log +224 -0
  152. package/docs/security/admin8-2026-11-05/login-fix/dependency/source-vendor-tests-node24.log +42 -0
  153. package/docs/security/admin8-2026-11-05/login-fix/dependency/source-vendor-tests.json +31 -0
  154. package/docs/security/admin8-2026-11-05/login-fix/dependency/webserver-3.4.0-upstream.tgz +0 -0
  155. package/docs/security/admin8-2026-11-05/login-fix/eos-session-8.0.0.js.txt +385 -0
  156. package/docs/security/admin8-2026-11-05/login-fix/evidence-sha256.json +59 -0
  157. package/docs/security/admin8-2026-11-05/login-fix/path-budget.json +6 -0
  158. package/docs/security/admin8-2026-11-05/login-fix/provenance.json +51 -0
  159. package/docs/security/admin8-2026-11-05/login-fix/release/admission.log +21 -0
  160. package/docs/security/admin8-2026-11-05/login-fix/release/archive-scan.json +13 -0
  161. package/docs/security/admin8-2026-11-05/login-fix/release/artifacts.log +6 -0
  162. package/docs/security/admin8-2026-11-05/login-fix/release/backend-build.log +5 -0
  163. package/docs/security/admin8-2026-11-05/login-fix/release/consumer-package-lock.json +3258 -0
  164. package/docs/security/admin8-2026-11-05/login-fix/release/copy-update-journal.json +165 -0
  165. package/docs/security/admin8-2026-11-05/login-fix/release/development.log +365 -0
  166. package/docs/security/admin8-2026-11-05/login-fix/release/frontend-build.log +149 -0
  167. package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-audit.json +22 -0
  168. package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-audit.stderr +2 -0
  169. package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-final-install-node22.log +9 -0
  170. package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-http-node22.json +15 -0
  171. package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-http-node22.stderr +2 -0
  172. package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-http-node24.json +15 -0
  173. package/docs/security/admin8-2026-11-05/login-fix/release/full-consumer-http-node24.stderr +0 -0
  174. package/docs/security/admin8-2026-11-05/login-fix/release/inventory.log +8 -0
  175. package/docs/security/admin8-2026-11-05/login-fix/release/npm-pack-final.json +7809 -0
  176. package/docs/security/admin8-2026-11-05/login-fix/release/npm-pack-final.stderr +6 -0
  177. package/docs/security/admin8-2026-11-05/login-fix/release/overlay-final-publish-node22.json +10213 -0
  178. package/docs/security/admin8-2026-11-05/login-fix/release/overlay-final-publish-node22.stderr +282 -0
  179. package/docs/security/admin8-2026-11-05/login-fix/release/pipeline.json +72 -0
  180. package/docs/security/admin8-2026-11-05/login-fix/release/seal.log +6 -0
  181. package/docs/security/admin8-2026-11-05/login-fix/release/vendor-final-review-node24.log +18 -0
  182. package/docs/security/admin8-2026-11-05/login-fix/reproduce.cjs +79 -0
  183. package/docs/security/admin8-2026-11-05/login-fix/reproduction.json +80 -0
  184. package/docs/security/admin8-2026-11-05/login-fix/upstream-LICENSE.txt +22 -0
  185. package/docs/security/admin8-2026-11-05/login-fix/validation.json +85 -0
  186. package/docs/security/admin8-2026-11-05/system-fix/BACKEND_ROLE_REVIEW_DE.md +79 -0
  187. package/docs/security/admin8-2026-11-05/system-fix/NAVIGATION_DE.md +30 -0
  188. package/docs/security/admin8-2026-11-05/system-fix/REPORT_DE.md +51 -0
  189. package/docs/security/admin8-2026-11-05/system-fix/REVIEW_DE.md +65 -0
  190. package/docs/security/admin8-2026-11-05/system-fix/SCOPE_DE.md +21 -0
  191. package/docs/security/admin8-2026-11-05/system-fix/SYSTEM_DE.md +44 -0
  192. package/docs/security/admin8-2026-11-05/system-fix/archive-scan.json +12 -0
  193. package/docs/security/admin8-2026-11-05/system-fix/browser/README.md +46 -0
  194. package/docs/security/admin8-2026-11-05/system-fix/browser/integrity.json +16 -0
  195. package/docs/security/admin8-2026-11-05/system-fix/browser/system-browser-result.json +3607 -0
  196. package/docs/security/admin8-2026-11-05/system-fix/browser/system-browser.cjs +221 -0
  197. package/docs/security/admin8-2026-11-05/system-fix/browser/system-fixture.cjs +60 -0
  198. package/docs/security/admin8-2026-11-05/system-fix/evidence-sha256.json +49 -0
  199. package/docs/security/admin8-2026-11-05/system-fix/license-ui-tests-node22.log +80 -0
  200. package/docs/security/admin8-2026-11-05/system-fix/license-ui-tests-node24.log +19 -0
  201. package/docs/security/admin8-2026-11-05/system-fix/navigation/lint.log +0 -0
  202. package/docs/security/admin8-2026-11-05/system-fix/navigation/node22-tests.log +56 -0
  203. package/docs/security/admin8-2026-11-05/system-fix/navigation/node24-tests.log +15 -0
  204. package/docs/security/admin8-2026-11-05/system-fix/navigation/source-sha256.json +11 -0
  205. package/docs/security/admin8-2026-11-05/system-fix/path-budget.json +7 -0
  206. package/docs/security/admin8-2026-11-05/system-fix/release/artifacts.log +6 -0
  207. package/docs/security/admin8-2026-11-05/system-fix/release/audit-root.json +22 -0
  208. package/docs/security/admin8-2026-11-05/system-fix/release/audit-root.stderr +1 -0
  209. package/docs/security/admin8-2026-11-05/system-fix/release/backend-build.log +5 -0
  210. package/docs/security/admin8-2026-11-05/system-fix/release/clean.log +6 -0
  211. package/docs/security/admin8-2026-11-05/system-fix/release/consumer-audit.json +22 -0
  212. package/docs/security/admin8-2026-11-05/system-fix/release/consumer-audit.stderr +2 -0
  213. package/docs/security/admin8-2026-11-05/system-fix/release/consumer-install.log +4 -0
  214. package/docs/security/admin8-2026-11-05/system-fix/release/consumer-package-lock.json +3258 -0
  215. package/docs/security/admin8-2026-11-05/system-fix/release/development.log +392 -0
  216. package/docs/security/admin8-2026-11-05/system-fix/release/frontend-build.log +149 -0
  217. package/docs/security/admin8-2026-11-05/system-fix/release/http-node22.json +15 -0
  218. package/docs/security/admin8-2026-11-05/system-fix/release/http-node24.json +15 -0
  219. package/docs/security/admin8-2026-11-05/system-fix/release/inventory.log +8 -0
  220. package/docs/security/admin8-2026-11-05/system-fix/release/overlay-journal.json +452 -0
  221. package/docs/security/admin8-2026-11-05/system-fix/release/overlay-publish.log +10790 -0
  222. package/docs/security/admin8-2026-11-05/system-fix/release/overlay-validation.json +12 -0
  223. package/docs/security/admin8-2026-11-05/system-fix/release/pack.json +8104 -0
  224. package/docs/security/admin8-2026-11-05/system-fix/release/pack.stderr +6 -0
  225. package/docs/security/admin8-2026-11-05/system-fix/release/retired-801.json +68 -0
  226. package/docs/security/admin8-2026-11-05/system-fix/release/seal.log +6 -0
  227. package/docs/security/admin8-2026-11-05/system-fix/review-tests.log +30 -0
  228. package/docs/security/admin8-2026-11-05/system-fix/role-context-before.log +86 -0
  229. package/docs/security/admin8-2026-11-05/system-fix/role-context-lint.log +0 -0
  230. package/docs/security/admin8-2026-11-05/system-fix/role-context-node22.log +44 -0
  231. package/docs/security/admin8-2026-11-05/system-fix/role-context-test.log +13 -0
  232. package/docs/security/admin8-2026-11-05/system-fix/validation.json +90 -0
  233. package/docs/third-party/admin8/NOTICE-PROVENANCE.json +3 -3
  234. package/io-package.json +13 -15
  235. package/package.json +10 -4
  236. package/release-manifests/admin8-development-validation.json +136 -43
  237. package/reports/security/artifact-inventory.json +822 -587
  238. package/reports/security/inventory-summary.json +39 -17
  239. package/reports/security/sbom-backend-lock.cdx.json +108 -111
  240. package/reports/security/sbom-frontend-lock.cdx.json +5 -5
  241. package/reports/security/source-runtime-manifest.json +553 -163
  242. package/tools/nexowatt-admin8-development-check.cjs +8 -1
  243. package/tools/nexowatt-artifact-inventory.cjs +8 -1
  244. package/tools/nexowatt-installer-ems-selftest.cjs +1 -1
  245. package/tools/nexowatt-lock-provenance-check.cjs +8 -3
  246. package/tools/nexowatt-repair-lock-metadata.cjs +3 -3
  247. package/tools/nexowatt-role-security-selftest.cjs +2 -2
  248. package/tools/nexowatt-security-inventory.cjs +22 -1
  249. package/tools/nexowatt-user-area-selftest.cjs +1 -1
  250. package/tools/nexowatt-v7109-clean-core-selftest.cjs +1 -1
  251. package/tools/nexowatt-vendored-webserver.cjs +69 -0
  252. package/tools/vendor/eos-retired-release-files.json +268 -1
  253. package/tools/vendor/webserver-3.4.0-source.provenance.json +244 -0
  254. package/adminWww/assets/Adapters-BDxfhfGe.js +0 -7
  255. package/adminWww/assets/EasyMode-TwIN5yxu.js +0 -1
  256. package/adminWww/assets/Enums-CSzSzWm7.js +0 -92
  257. package/adminWww/assets/Hosts-QkyuASJy.js +0 -120
  258. package/adminWww/assets/Instances-BaWBemTT.js +0 -4
  259. package/adminWww/assets/Intro-DsfrPrWv.js +0 -2
  260. package/adminWww/assets/Logs-Cngy2Opt.js +0 -2
  261. package/adminWww/assets/Objects-DY8KS7zK.js +0 -301
  262. package/adminWww/assets/Remove-DplJatnC.js +0 -1
  263. package/adminWww/assets/State-vP1o2BCL.js +0 -1
  264. package/adminWww/assets/Storage-COo2RkS1.js +0 -1
  265. package/adminWww/assets/Users-BjTGOjzL.js +0 -1
  266. package/adminWww/assets/ViewList-DuKCnBnc.js +0 -1
  267. package/adminWww/assets/helpers-DBoACUHw.js +0 -1
@@ -0,0 +1,4 @@
1
+ import{a as e,n as t,t as n}from"./rolldown-runtime-sJBDdmOt.js";import{$o as r,$s as i,An as a,Ba as o,Br as s,Bs as c,Ci as l,Ds as u,Ei as d,Eo as f,Es as p,Fa as m,Fo as h,Fs as g,Ga as _,Go as v,Gr as y,Ho as b,Hr as ee,Hs as x,Ia as te,In as ne,Is as S,Ja as re,Jo as ie,Jr as ae,Kr as oe,La as se,Ln as ce,Lo as le,Ls as ue,Ma as de,Mo as fe,Na as pe,No as me,Pa as he,Pr as ge,Ra as _e,Rr as ve,Rs as ye,So as be,To as xe,Tr as C,Ua as Se,Us as w,Va as Ce,Vi as we,Vo as Te,Wo as Ee,Ws as T,Yo as De,Zo as Oe,_i as ke,_o as E,ba as Ae,bo as je,ca as Me,da as Ne,gs as Pe,ho as Fe,is as Ie,jo as Le,jr as Re,ko as ze,ma as Be,mc as D,mo as O,ms as k,nc as Ve,ns as He,or as Ue,qa as We,qo as A,si as Ge,sr as Ke,ss as j,ta as M,tn as qe,ts as Je,uo as Ye,us as Xe,vo as Ze,wo as Qe,xa as $e,za as et,zo as N,zr as P,zs as tt}from"./loadShare-eager-BpwDZfDr.js";import{f as nt,r as F}from"./WifiTethering-Cp63fmkC.js";import{i as rt}from"./Usb-Dwk7qdYu.js";import{i as it,n as at,r as ot,t as st}from"./ViewCompact-BbfomOIi.js";import{t as ct}from"./Schedule-BQlh1nhQ.js";import{t as lt}from"./Storage-DrC3j-wf.js";import{t as ut}from"./ViewList-1pB5VinA.js";import{c as dt,d as ft,f as pt,l as mt,s as ht,t as I,u as gt}from"./AdminUtils-CopxRJZ2.js";import{F as L,dt as _t,ht as vt,ot as yt}from"./bootstrap-DSDOwKWU.js";import{n as bt,r as xt,t as St}from"./sentry-BFzW-2KQ.js";import{t as R}from"./State-UGfoS6qW.js";import{t as Ct}from"./CustomModal-DjI4oCb8.js";import{t as wt}from"./Config-BwTa1LdH.js";import{a as z,c as Tt,i as B,n as Et,o as Dt,r as Ot,s as kt}from"./UsedResources-B6HWeXGX.js";import{a as At,c as jt,i as Mt,n as Nt,o as Pt,r as V,s as H,t as U}from"./classPrivateFieldGet2-CBZxMSQ4.js";function W(e,t,n){return e.set(H(e,t),n),n}var Ft=t((()=>{jt()})),It=n((e=>{Object.defineProperty(e,"__esModule",{value:!0})}));function Lt(e,t){At(e,t),t.add(e)}var Rt=t((()=>{Pt()})),zt=n((e=>{Rt(),Mt(),u(),Ft(),jt(),Nt(),Object.defineProperty(e,"__esModule",{value:!0}),e.CronField=void 0;var t=new WeakMap,n=new WeakMap,r=new WeakMap,i=new WeakMap,a=new WeakSet,o=class e{static get min(){throw Error(`min must be overridden`)}static get max(){throw Error(`max must be overridden`)}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}constructor(o,c={rawValue:``}){if(Lt(this,a),V(this,t,!1),V(this,n,!1),V(this,r,!1),V(this,i,[]),p(this,`options`,{rawValue:``}),!Array.isArray(o))throw Error(`${this.constructor.name} Validation error, values is not an array`);if(!(o.length>0))throw Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...c,rawValue:c.rawValue??``},W(i,this,[...o].sort(e.sorter)),W(r,this,this.options.wildcard===void 0?H(a,this,s).call(this):this.options.wildcard),W(t,this,this.options.rawValue.includes(`L`)||o.includes(`L`)),W(n,this,this.options.rawValue.includes(`?`)||o.includes(`?`))}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return U(t,this)}get hasQuestionMarkChar(){return U(n,this)}get isWildcard(){return U(r,this)}get values(){return U(i,this)}static sorter(e,t){let n=typeof e==`number`,r=typeof t==`number`;return n&&r?e-t:!n&&!r?e.localeCompare(t):n?-1:1}static findNearestValueInList(e,t,n){if(n){for(let n=e.length-1;n>=0;n--)if(e[n]<t)return e[n];return null}for(let n=0;n<e.length;n++)if(e[n]>t)return e[n];return null}findNearestValue(e,t){return this.constructor.findNearestValueInList(this.values,e,t)}serialize(){return{wildcard:U(r,this),values:U(i,this)}}validate(){let e,t=this.chars.length>0?` or chars ${this.chars.join(``)}`:``,n=e=>t=>RegExp(`^\\d{0,2}${t}$`).test(e);if(!U(i,this).every(t=>(e=t,typeof t==`number`?t>=this.min&&t<=this.max:this.chars.some(n(t)))))throw Error(`${this.constructor.name} Validation error, got value ${e} expected range ${this.min}-${this.max}${t}`);let r=U(i,this).find((e,t)=>U(i,this).indexOf(e)!==t);if(r!==void 0)throw Error(`${this.constructor.name} Validation error, duplicate values found: ${r}`)}};function s(){return this.options.rawValue.length>0?[`*`,`?`].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(e,t)=>t+this.min).every(e=>U(i,this).includes(e))}e.CronField=o})),Bt=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=class extends Error{},n=class extends t{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},r=class extends t{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},i=class extends t{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},a=class extends t{},o=class extends t{constructor(e){super(`Invalid unit ${e}`)}},s=class extends t{},c=class extends t{constructor(){super(`Zone is an abstract class`)}},l=`numeric`,u=`short`,d=`long`,f={year:l,month:l,day:l},p={year:l,month:u,day:l},m={year:l,month:u,day:l,weekday:u},h={year:l,month:d,day:l},g={year:l,month:d,day:l,weekday:d},_={hour:l,minute:l},v={hour:l,minute:l,second:l},y={hour:l,minute:l,second:l,timeZoneName:u},b={hour:l,minute:l,second:l,timeZoneName:d},ee={hour:l,minute:l,hourCycle:`h23`},x={hour:l,minute:l,second:l,hourCycle:`h23`},te={hour:l,minute:l,second:l,hourCycle:`h23`,timeZoneName:u},ne={hour:l,minute:l,second:l,hourCycle:`h23`,timeZoneName:d},S={year:l,month:l,day:l,hour:l,minute:l},re={year:l,month:l,day:l,hour:l,minute:l,second:l},ie={year:l,month:u,day:l,hour:l,minute:l},ae={year:l,month:u,day:l,hour:l,minute:l,second:l},oe={year:l,month:u,day:l,weekday:u,hour:l,minute:l},se={year:l,month:d,day:l,hour:l,minute:l,timeZoneName:u},ce={year:l,month:d,day:l,hour:l,minute:l,second:l,timeZoneName:u},le={year:l,month:d,day:l,weekday:d,hour:l,minute:l,timeZoneName:d},ue={year:l,month:d,day:l,weekday:d,hour:l,minute:l,second:l,timeZoneName:d},de=class{get type(){throw new c}get name(){throw new c}get ianaName(){return this.name}get isUniversal(){throw new c}offsetName(e,t){throw new c}formatOffset(e,t){throw new c}offset(e){throw new c}equals(e){throw new c}get isValid(){throw new c}},fe=null,pe=class e extends de{static get instance(){return fe===null&&(fe=new e),fe}get type(){return`system`}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return U(e,t,n)}formatOffset(e,t){return Lt(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type===`system`}get isValid(){return!0}},me=new Map;function he(e){let t=me.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(`en-US`,{hour12:!1,timeZone:e,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,era:`short`}),me.set(e,t)),t}var ge={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function _e(e,t){let n=e.format(t).replace(/\u200E/g,``),[,r,i,a,o,s,c,l]=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n);return[a,r,i,o,s,c,l]}function ve(e,t){let n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){let{type:t,value:i}=n[e],a=ge[t];t===`era`?r[a]=i:I(a)||(r[a]=parseInt(i,10))}return r}var ye=new Map,be=class e extends de{static create(t){let n=ye.get(t);return n===void 0&&ye.set(t,n=new e(t)),n}static resetCache(){ye.clear(),me.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat(`en-US`,{timeZone:e}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=e.isValidZone(t)}get type(){return`iana`}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return U(e,t,n,this.name)}formatOffset(e,t){return Lt(this.offset(e),t)}offset(e){if(!this.valid)return NaN;let t=new Date(e);if(isNaN(t))return NaN;let n=he(this.name),[r,i,a,o,s,c,l]=n.formatToParts?ve(n,t):_e(n,t);o===`BC`&&(r=-Math.abs(r)+1);let u=Nt({year:r,month:i,day:a,hour:s===24?0:s,minute:c,second:l,millisecond:0}),d=+t,f=d%1e3;return d-=f>=0?f:1e3+f,(u-d)/6e4}equals(e){return e.type===`iana`&&e.name===this.name}get isValid(){return this.valid}},xe={};function C(e,t={}){let n=JSON.stringify([e,t]),r=xe[n];return r||(r=new Intl.ListFormat(e,t),xe[n]=r),r}var Se=new Map;function w(e,t={}){let n=JSON.stringify([e,t]),r=Se.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(e,t),Se.set(n,r)),r}var Ce=new Map;function we(e,t={}){let n=JSON.stringify([e,t]),r=Ce.get(n);return r===void 0&&(r=new Intl.NumberFormat(e,t),Ce.set(n,r)),r}var Te=new Map;function Ee(e,t={}){let{base:n,...r}=t,i=JSON.stringify([e,r]),a=Te.get(i);return a===void 0&&(a=new Intl.RelativeTimeFormat(e,t),Te.set(i,a)),a}var T=null;function De(){return T||(T=new Intl.DateTimeFormat().resolvedOptions().locale,T)}var Oe=new Map;function ke(e){let t=Oe.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),Oe.set(e,t)),t}var E=new Map;function Ae(e){let t=E.get(e);if(!t){let n=new Intl.Locale(e);t=`getWeekInfo`in n?n.getWeekInfo():n.weekInfo,`minimalDays`in t||(t={...Be,...t}),E.set(e,t)}return t}function je(e){let t=e.indexOf(`-x-`);t!==-1&&(e=e.substring(0,t));let n=e.indexOf(`-u-`);if(n===-1)return[e];{let t,r;try{t=w(e).resolvedOptions(),r=e}catch{let i=e.substring(0,n);t=w(i).resolvedOptions(),r=i}let{numberingSystem:i,calendar:a}=t;return[r,i,a]}}function Me(e,t,n){return(n||t)&&(e.includes(`-u-`)||(e+=`-u`),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function Ne(e){let t=[];for(let n=1;n<=12;n++){let r=$.utc(2009,n,1);t.push(e(r))}return t}function Pe(e){let t=[];for(let n=1;n<=7;n++){let r=$.utc(2016,11,13+n);t.push(e(r))}return t}function Fe(e,t,n,r){let i=e.listingMode();return i===`error`?null:i===`en`?n(t):r(t)}function Ie(e){return e.numberingSystem&&e.numberingSystem!==`latn`?!1:e.numberingSystem===`latn`||!e.locale||e.locale.startsWith(`en`)||ke(e.locale).numberingSystem===`latn`}var Le=class{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:r,floor:i,...a}=n;if(!t||Object.keys(a).length>0){let t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=we(e,t)}}format(e){if(this.inf){let t=this.floor?Math.floor(e):e;return this.inf.format(t)}return B(this.floor?Math.floor(e):kt(e,3),this.padTo)}},Re=class{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let r;if(this.opts.timeZone)this.dt=e;else if(e.zone.type===`fixed`){let t=-1*(e.offset/60),n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;e.offset!==0&&be.create(n).valid?(r=n,this.dt=e):(r=`UTC`,this.dt=e.offset===0?e:e.setZone(`UTC`).plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type===`system`?this.dt=e:e.zone.type===`iana`?(this.dt=e,r=e.zone.name):(r=`UTC`,this.dt=e.setZone(`UTC`).plus({minutes:e.offset}),this.originalZone=e.zone);let i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=w(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(``):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if(e.type===`timeZoneName`){let t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},ze=class{constructor(e,t,n){this.opts={style:`long`,...n},!t&&yt()&&(this.rtf=Ee(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):nn(t,e,this.opts.numeric,this.opts.style!==`long`)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}},Be={firstDay:1,minimalDays:4,weekend:[6,7]},D=class e{static fromOpts(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,i,a=!1){let o=t||N.defaultLocale,s=o||(a?`en-US`:De()),c=n||N.defaultNumberingSystem,l=r||N.defaultOutputCalendar,u=wt(i)||N.defaultWeekSettings;return new e(s,c,l,u,o)}static resetCache(){T=null,Se.clear(),Ce.clear(),Te.clear(),Oe.clear(),E.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:i}={}){return e.create(t,n,r,i)}constructor(e,t,n,r,i){let[a,o,s]=je(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=n||s||null,this.weekSettings=r,this.intl=Me(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached??=Ie(this),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem===`latn`)&&(this.outputCalendar===null||this.outputCalendar===`gregory`);return e&&t?`en`:`intl`}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,wt(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Fe(this,e,Ht,()=>{let n=this.intl===`ja`||this.intl.startsWith(`ja-`);t&=!n;let r=t?{month:e,day:`numeric`}:{month:e},i=t?`format`:`standalone`;if(!this.monthsCache[i][e]){let t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,`month`);this.monthsCache[i][e]=Ne(t)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return Fe(this,e,Kt,()=>{let n=t?{weekday:e,year:`numeric`,month:`long`,day:`numeric`}:{weekday:e},r=t?`format`:`standalone`;return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=Pe(e=>this.extract(e,n,`weekday`))),this.weekdaysCache[r][e]})}meridiems(){return Fe(this,void 0,()=>qt,()=>{if(!this.meridiemCache){let e={hour:`numeric`,hourCycle:`h12`};this.meridiemCache=[$.utc(2016,11,13,9),$.utc(2016,11,13,19)].map(t=>this.extract(t,e,`dayperiod`))}return this.meridiemCache})}eras(e){return Fe(this,e,Zt,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[$.utc(-40,1,1),$.utc(2017,1,1)].map(e=>this.extract(e,t,`era`))),this.eraCache[e]})}extract(e,t,n){let r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new Le(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Re(e,this.intl,t)}relFormatter(e={}){return new ze(this.intl,this.isEnglish(),e)}listFormatter(e={}){return C(this.intl,e)}isEnglish(){return this.locale===`en`||this.locale.toLowerCase()===`en-us`||ke(this.intl).locale.startsWith(`en-us`)}getWeekSettings(){return this.weekSettings?this.weekSettings:bt()?Ae(this.locale):Be}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},O=null,k=class e extends de{static get utcInstance(){return O===null&&(O=new e(0)),O}static instance(t){return t===0?e.utcInstance:new e(t)}static parseSpecifier(t){if(t){let n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new e(W(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return`fixed`}get name(){return this.fixed===0?`UTC`:`UTC${Lt(this.fixed,`narrow`)}`}get ianaName(){return this.fixed===0?`Etc/UTC`:`Etc/GMT${Lt(-this.fixed,`narrow`)}`}offsetName(){return this.name}formatOffset(e,t){return Lt(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type===`fixed`&&e.fixed===this.fixed}get isValid(){return!0}},Ve=class extends de{constructor(e){super(),this.zoneName=e}get type(){return`invalid`}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return``}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function He(e,t){if(I(e)||e===null)return t;if(e instanceof de)return e;if(_t(e)){let n=e.toLowerCase();return n==="default"?t:n===`local`||n===`system`?pe.instance:n===`utc`||n===`gmt`?k.utcInstance:k.parseSpecifier(n)||be.create(e)}return gt(e)?k.instance(e):typeof e==`object`&&`offset`in e&&typeof e.offset==`function`?e:new Ve(e)}var Ue={arab:`[٠-٩]`,arabext:`[۰-۹]`,bali:`[᭐-᭙]`,beng:`[০-৯]`,deva:`[०-९]`,fullwide:`[0-9]`,gujr:`[૦-૯]`,hanidec:`[〇|一|二|三|四|五|六|七|八|九]`,khmr:`[០-៩]`,knda:`[೦-೯]`,laoo:`[໐-໙]`,limb:`[᥆-᥏]`,mlym:`[൦-൯]`,mong:`[᠐-᠙]`,mymr:`[၀-၉]`,orya:`[୦-୯]`,tamldec:`[௦-௯]`,telu:`[౦-౯]`,thai:`[๐-๙]`,tibt:`[༠-༩]`,latn:`\\d`},We={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},A=Ue.hanidec.replace(/[\[|\]]/g,``).split(``);function Ge(e){let t=parseInt(e,10);if(isNaN(t)){t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(e[n].search(Ue.hanidec)!==-1)t+=A.indexOf(e[n]);else for(let e in We){let[n,i]=We[e];r>=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}return t}var Ke=new Map;function j(){Ke.clear()}function M({numberingSystem:e},t=``){let n=e||`latn`,r=Ke.get(n);r===void 0&&(r=new Map,Ke.set(n,r));let i=r.get(t);return i===void 0&&(i=RegExp(`${Ue[n]}${t}`),r.set(t,i)),i}var qe=()=>Date.now(),Je=`system`,Ye=null,Xe=null,Ze=null,Qe=60,$e,et=null,N=class{static get now(){return qe}static set now(e){qe=e}static set defaultZone(e){Je=e}static get defaultZone(){return He(Je,pe.instance)}static get defaultLocale(){return Ye}static set defaultLocale(e){Ye=e}static get defaultNumberingSystem(){return Xe}static set defaultNumberingSystem(e){Xe=e}static get defaultOutputCalendar(){return Ze}static set defaultOutputCalendar(e){Ze=e}static get defaultWeekSettings(){return et}static set defaultWeekSettings(e){et=wt(e)}static get twoDigitCutoffYear(){return Qe}static set twoDigitCutoffYear(e){Qe=e%100}static get throwOnInvalid(){return $e}static set throwOnInvalid(e){$e=e}static resetCaches(){D.resetCache(),be.resetCache(),$.resetCache(),j()}},P=class{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},tt=[0,31,59,90,120,151,181,212,243,273,304,334],nt=[0,31,60,91,121,152,182,213,244,274,305,335];function F(e,t){return new P(`unit out of range`,`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function rt(e,t,n){let r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);let i=r.getUTCDay();return i===0?7:i}function it(e,t,n){return n+(At(e)?nt:tt)[t-1]}function at(e,t){let n=At(e)?nt:tt,r=n.findIndex(e=>e<t),i=t-n[r];return{month:r+1,day:i}}function ot(e,t){return(e-t+7)%7+1}function st(e,t=4,n=1){let{year:r,month:i,day:a}=e,o=it(r,i,a),s=ot(rt(r,i,a),n),c=Math.floor((o-s+14-t)/7),l;return c<1?(l=r-1,c=V(l,t,n)):c>V(r,t,n)?(l=r+1,c=1):l=r,{weekYear:l,weekNumber:c,weekday:s,...Rt(e)}}function ct(e,t=4,n=1){let{weekYear:r,weekNumber:i,weekday:a}=e,o=ot(rt(r,1,t),n),s=jt(r),c=i*7+a-o-7+t,l;c<1?(l=r-1,c+=jt(l)):c>s?(l=r+1,c-=jt(r)):l=r;let{month:u,day:d}=at(l,c);return{year:l,month:u,day:d,...Rt(e)}}function lt(e){let{year:t,month:n,day:r}=e;return{year:t,ordinal:it(t,n,r),...Rt(e)}}function ut(e){let{year:t,ordinal:n}=e,{month:r,day:i}=at(t,n);return{year:t,month:r,day:i,...Rt(e)}}function dt(e,t){if(!I(e.localWeekday)||!I(e.localWeekNumber)||!I(e.localWeekYear)){if(!I(e.weekday)||!I(e.weekNumber)||!I(e.weekYear))throw new a(`Cannot mix locale-based week fields with ISO-based week fields`);return I(e.localWeekday)||(e.weekday=e.localWeekday),I(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),I(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function ft(e,t=4,n=1){let r=L(e.weekYear),i=z(e.weekNumber,1,V(e.weekYear,t,n)),a=z(e.weekday,1,7);return r?i?!a&&F(`weekday`,e.weekday):F(`week`,e.weekNumber):F(`weekYear`,e.weekYear)}function pt(e){let t=L(e.year),n=z(e.ordinal,1,jt(e.year));return t?!n&&F(`ordinal`,e.ordinal):F(`year`,e.year)}function mt(e){let t=L(e.year),n=z(e.month,1,12),r=z(e.day,1,Mt(e.year,e.month));return t?n?!r&&F(`day`,e.day):F(`month`,e.month):F(`year`,e.year)}function ht(e){let{hour:t,minute:n,second:r,millisecond:i}=e,a=z(t,0,23)||t===24&&n===0&&r===0&&i===0,o=z(n,0,59),s=z(r,0,59),c=z(i,0,999);return a?o?s?!c&&F(`millisecond`,i):F(`second`,r):F(`minute`,n):F(`hour`,t)}function I(e){return e===void 0}function gt(e){return typeof e==`number`}function L(e){return typeof e==`number`&&e%1==0}function _t(e){return typeof e==`string`}function vt(e){return Object.prototype.toString.call(e)===`[object Date]`}function yt(){try{return typeof Intl<`u`&&!!Intl.RelativeTimeFormat}catch{return!1}}function bt(){try{return typeof Intl<`u`&&!!Intl.Locale&&(`weekInfo`in Intl.Locale.prototype||`getWeekInfo`in Intl.Locale.prototype)}catch{return!1}}function xt(e){return Array.isArray(e)?e:[e]}function St(e,t,n){if(e.length!==0)return e.reduce((e,r)=>{let i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i},null)[1]}function R(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}function Ct(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function wt(e){if(e==null)return null;if(typeof e!=`object`)throw new s(`Week settings must be an object`);if(!z(e.firstDay,1,7)||!z(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!z(e,1,7)))throw new s(`Invalid week settings`);return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function z(e,t,n){return L(e)&&e>=t&&e<=n}function Tt(e,t){return e-t*Math.floor(e/t)}function B(e,t=2){let n=e<0,r;return r=n?`-`+(``+-e).padStart(t,`0`):(``+e).padStart(t,`0`),r}function Et(e){if(!(I(e)||e===null||e===``))return parseInt(e,10)}function Dt(e){if(!(I(e)||e===null||e===``))return parseFloat(e)}function Ot(e){if(!(I(e)||e===null||e===``)){let t=parseFloat(`0.`+e)*1e3;return Math.floor(t)}}function kt(e,t,n=`round`){let r=10**t;switch(n){case`expand`:return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case`trunc`:return Math.trunc(e*r)/r;case`round`:return Math.round(e*r)/r;case`floor`:return Math.floor(e*r)/r;case`ceil`:return Math.ceil(e*r)/r;default:throw RangeError(`Value rounding ${n} is out of range`)}}function At(e){return e%4==0&&(e%100!=0||e%400==0)}function jt(e){return At(e)?366:365}function Mt(e,t){let n=Tt(t-1,12)+1,r=e+(t-n)/12;return n===2?At(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Nt(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Pt(e,t,n){return-ot(rt(e,1,t),n)+t-1}function V(e,t=4,n=1){let r=Pt(e,t,n),i=Pt(e+1,t,n);return(jt(e)-r+i)/7}function H(e){return e>99?e:e>N.twoDigitCutoffYear?1900+e:2e3+e}function U(e,t,n,r=null){let i=new Date(e),a={hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`};r&&(a.timeZone=r);let o={timeZoneName:t,...a},s=new Intl.DateTimeFormat(n,o).formatToParts(i).find(e=>e.type.toLowerCase()===`timezonename`);return s?s.value:null}function W(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);let r=parseInt(t,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function Ft(e){let t=Number(e);if(typeof e==`boolean`||e===``||!Number.isFinite(t))throw new s(`Invalid unit value ${e}`);return t}function It(e,t){let n={};for(let r in e)if(Ct(e,r)){let i=e[r];if(i==null)continue;n[t(r)]=Ft(i)}return n}function Lt(e,t){let n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?`+`:`-`;switch(t){case`short`:return`${i}${B(n,2)}:${B(r,2)}`;case`narrow`:return`${i}${n}${r>0?`:${r}`:``}`;case`techie`:return`${i}${B(n,2)}${B(r,2)}`;default:throw RangeError(`Value format ${t} is out of range for property format`)}}function Rt(e){return R(e,[`hour`,`minute`,`second`,`millisecond`])}var zt=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],Bt=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],Vt=[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`];function Ht(e){switch(e){case`narrow`:return[...Vt];case`short`:return[...Bt];case`long`:return[...zt];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`,`12`];case`2-digit`:return[`01`,`02`,`03`,`04`,`05`,`06`,`07`,`08`,`09`,`10`,`11`,`12`];default:return null}}var Ut=[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`],Wt=[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`],Gt=[`M`,`T`,`W`,`T`,`F`,`S`,`S`];function Kt(e){switch(e){case`narrow`:return[...Gt];case`short`:return[...Wt];case`long`:return[...Ut];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`];default:return null}}var qt=[`AM`,`PM`],Jt=[`Before Christ`,`Anno Domini`],Yt=[`BC`,`AD`],Xt=[`B`,`A`];function Zt(e){switch(e){case`narrow`:return[...Xt];case`short`:return[...Yt];case`long`:return[...Jt];default:return null}}function Qt(e){return qt[e.hour<12?0:1]}function $t(e,t){return Kt(t)[e.weekday-1]}function en(e,t){return Ht(t)[e.month-1]}function tn(e,t){return Zt(t)[e.year<0?0:1]}function nn(e,t,n=`always`,r=!1){let i={years:[`year`,`yr.`],quarters:[`quarter`,`qtr.`],months:[`month`,`mo.`],weeks:[`week`,`wk.`],days:[`day`,`day`,`days`],hours:[`hour`,`hr.`],minutes:[`minute`,`min.`],seconds:[`second`,`sec.`]},a=[`hours`,`minutes`,`seconds`].indexOf(e)===-1;if(n===`auto`&&a){let n=e===`days`;switch(t){case 1:return n?`tomorrow`:`next ${i[e][0]}`;case-1:return n?`yesterday`:`last ${i[e][0]}`;case 0:return n?`today`:`this ${i[e][0]}`}}let o=Object.is(t,-0)||t<0,s=Math.abs(t),c=s===1,l=i[e],u=r?c?l[1]:l[2]||l[1]:c?i[e][0]:e;return o?`${s} ${u} ago`:`in ${s} ${u}`}function rn(e,t){let n=``;for(let r of e)r.literal?n+=r.val:n+=t(r.val);return n}var an={D:f,DD:p,DDD:h,DDDD:g,t:_,tt:v,ttt:y,tttt:b,T:ee,TT:x,TTT:te,TTTT:ne,f:S,ff:ie,fff:se,ffff:le,F:re,FF:ae,FFF:ce,FFFF:ue},G=class e{static create(t,n={}){return new e(t,n)}static parseFormat(e){let t=null,n=``,r=!1,i=[];for(let a=0;a<e.length;a++){let o=e.charAt(a);o===`'`?((n.length>0||r)&&i.push({literal:r||/^\s+$/.test(n),val:n===``?`'`:n}),t=null,n=``,r=!r):r||o===t?n+=o:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=o,t=o)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return an[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return B(e,t);let r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(t,n){let r=this.loc.listingMode()===`en`,i=this.loc.outputCalendar&&this.loc.outputCalendar!==`gregory`,a=(e,n)=>this.loc.extract(t,e,n),o=e=>t.isOffsetFixed&&t.offset===0&&e.allowZ?`Z`:t.isValid?t.zone.formatOffset(t.ts,e.format):``,s=()=>r?Qt(t):a({hour:`numeric`,hourCycle:`h12`},`dayperiod`),c=(e,n)=>r?en(t,e):a(n?{month:e}:{month:e,day:`numeric`},`month`),l=(e,n)=>r?$t(t,e):a(n?{weekday:e}:{weekday:e,month:`long`,day:`numeric`},`weekday`),u=n=>{let r=e.macroTokenToFormatOpts(n);return r?this.formatWithSystemDefault(t,r):n},d=e=>r?tn(t,e):a({era:e},`era`);return rn(e.parseFormat(n),e=>{switch(e){case`S`:return this.num(t.millisecond);case`u`:case`SSS`:return this.num(t.millisecond,3);case`s`:return this.num(t.second);case`ss`:return this.num(t.second,2);case`uu`:return this.num(Math.floor(t.millisecond/10),2);case`uuu`:return this.num(Math.floor(t.millisecond/100));case`m`:return this.num(t.minute);case`mm`:return this.num(t.minute,2);case`h`:return this.num(t.hour%12==0?12:t.hour%12);case`hh`:return this.num(t.hour%12==0?12:t.hour%12,2);case`H`:return this.num(t.hour);case`HH`:return this.num(t.hour,2);case`Z`:return o({format:`narrow`,allowZ:this.opts.allowZ});case`ZZ`:return o({format:`short`,allowZ:this.opts.allowZ});case`ZZZ`:return o({format:`techie`,allowZ:this.opts.allowZ});case`ZZZZ`:return t.zone.offsetName(t.ts,{format:`short`,locale:this.loc.locale});case`ZZZZZ`:return t.zone.offsetName(t.ts,{format:`long`,locale:this.loc.locale});case`z`:return t.zoneName;case`a`:return s();case`d`:return i?a({day:`numeric`},`day`):this.num(t.day);case`dd`:return i?a({day:`2-digit`},`day`):this.num(t.day,2);case`c`:return this.num(t.weekday);case`ccc`:return l(`short`,!0);case`cccc`:return l(`long`,!0);case`ccccc`:return l(`narrow`,!0);case`E`:return this.num(t.weekday);case`EEE`:return l(`short`,!1);case`EEEE`:return l(`long`,!1);case`EEEEE`:return l(`narrow`,!1);case`L`:return i?a({month:`numeric`,day:`numeric`},`month`):this.num(t.month);case`LL`:return i?a({month:`2-digit`,day:`numeric`},`month`):this.num(t.month,2);case`LLL`:return c(`short`,!0);case`LLLL`:return c(`long`,!0);case`LLLLL`:return c(`narrow`,!0);case`M`:return i?a({month:`numeric`},`month`):this.num(t.month);case`MM`:return i?a({month:`2-digit`},`month`):this.num(t.month,2);case`MMM`:return c(`short`,!1);case`MMMM`:return c(`long`,!1);case`MMMMM`:return c(`narrow`,!1);case`y`:return i?a({year:`numeric`},`year`):this.num(t.year);case`yy`:return i?a({year:`2-digit`},`year`):this.num(t.year.toString().slice(-2),2);case`yyyy`:return i?a({year:`numeric`},`year`):this.num(t.year,4);case`yyyyyy`:return i?a({year:`numeric`},`year`):this.num(t.year,6);case`G`:return d(`short`);case`GG`:return d(`long`);case`GGGGG`:return d(`narrow`);case`kk`:return this.num(t.weekYear.toString().slice(-2),2);case`kkkk`:return this.num(t.weekYear,4);case`W`:return this.num(t.weekNumber);case`WW`:return this.num(t.weekNumber,2);case`n`:return this.num(t.localWeekNumber);case`nn`:return this.num(t.localWeekNumber,2);case`ii`:return this.num(t.localWeekYear.toString().slice(-2),2);case`iiii`:return this.num(t.localWeekYear,4);case`o`:return this.num(t.ordinal);case`ooo`:return this.num(t.ordinal,3);case`q`:return this.num(t.quarter);case`qq`:return this.num(t.quarter,2);case`X`:return this.num(Math.floor(t.ts/1e3));case`x`:return this.num(t.ts);default:return u(e)}})}formatDurationFromString(t,n){let r=this.opts.signMode===`negativeLargestOnly`?-1:1,i=e=>{switch(e[0]){case`S`:return`milliseconds`;case`s`:return`seconds`;case`m`:return`minutes`;case`h`:return`hours`;case`d`:return`days`;case`w`:return`weeks`;case`M`:return`months`;case`y`:return`years`;default:return null}},a=(e,t)=>n=>{let a=i(n);if(a){let i=t.isNegativeDuration&&a!==t.largestUnit?r:1,o;return o=this.opts.signMode===`negativeLargestOnly`&&a!==t.largestUnit?`never`:this.opts.signMode===`all`?`always`:`auto`,this.num(e.get(a)*i,n.length,o)}return n},o=e.parseFormat(n),s=o.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),c=t.shiftTo(...s.map(i).filter(e=>e));return rn(o,a(c,{isNegativeDuration:c<0,largestUnit:Object.keys(c.values)[0]}))}},K=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function on(...e){let t=e.reduce((e,t)=>e+t.source,``);return RegExp(`^${t}$`)}function sn(...e){return t=>e.reduce(([e,n,r],i)=>{let[a,o,s]=i(t,r);return[{...e,...a},o||n,s]},[{},null,1]).slice(0,2)}function cn(e,...t){if(e==null)return[null,null];for(let[n,r]of t){let t=n.exec(e);if(t)return r(t)}return[null,null]}function ln(...e){return(t,n)=>{let r={},i=0;for(;i<e.length;i++)r[e[i]]=Et(t[n+i]);return[r,null,n+i]}}var un=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,dn=`(?:${un.source}?(?:\\[(${K.source})\\])?)?`,fn=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,pn=RegExp(`${fn.source}${dn}`),mn=RegExp(`(?:[Tt]${pn.source})?`),hn=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,q=/(\d{4})-?W(\d\d)(?:-?(\d))?/,gn=/(\d{4})-?(\d{3})/,J=ln(`weekYear`,`weekNumber`,`weekDay`),_n=ln(`year`,`ordinal`),vn=/(\d{4})-(\d\d)-(\d\d)/,Y=RegExp(`${fn.source} ?(?:${un.source}|(${K.source}))?`),yn=RegExp(`(?: ${Y.source})?`);function bn(e,t,n){let r=e[t];return I(r)?n:Et(r)}function xn(e,t){return[{year:bn(e,t),month:bn(e,t+1,1),day:bn(e,t+2,1)},null,t+3]}function Sn(e,t){return[{hours:bn(e,t,0),minutes:bn(e,t+1,0),seconds:bn(e,t+2,0),milliseconds:Ot(e[t+3])},null,t+4]}function Cn(e,t){let n=!e[t]&&!e[t+1],r=W(e[t+1],e[t+2]);return[{},n?null:k.instance(r),t+3]}function wn(e,t){return[{},e[t]?be.create(e[t]):null,t+1]}var Tn=RegExp(`^T?${fn.source}$`),En=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Dn(e){let[t,n,r,i,a,o,s,c,l]=e,u=t[0]===`-`,d=c&&c[0]===`-`,f=(e,t=!1)=>e!==void 0&&(t||e&&u)?-e:e;return[{years:f(Dt(n)),months:f(Dt(r)),weeks:f(Dt(i)),days:f(Dt(a)),hours:f(Dt(o)),minutes:f(Dt(s)),seconds:f(Dt(c),c===`-0`),milliseconds:f(Ot(l),d)}]}var X={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function On(e,t,n,r,i,a,o){let s={year:t.length===2?H(Et(t)):Et(t),month:Bt.indexOf(n)+1,day:Et(r),hour:Et(i),minute:Et(a)};return o&&(s.second=Et(o)),e&&(s.weekday=e.length>3?Ut.indexOf(e)+1:Wt.indexOf(e)+1),s}var kn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function An(e){let[,t,n,r,i,a,o,s,c,l,u,d]=e,f=On(t,i,r,n,a,o,s),p;return p=c?X[c]:l?0:W(u,d),[f,new k(p)]}function jn(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).trim()}var Mn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Nn=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Pn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Fn(e){let[,t,n,r,i,a,o,s]=e;return[On(t,i,r,n,a,o,s),k.utcInstance]}function In(e){let[,t,n,r,i,a,o,s]=e;return[On(t,s,n,r,i,a,o),k.utcInstance]}var Ln=on(hn,mn),Rn=on(q,mn),zn=on(gn,mn),Bn=on(pn),Vn=sn(xn,Sn,Cn,wn),Hn=sn(J,Sn,Cn,wn),Un=sn(_n,Sn,Cn,wn),Wn=sn(Sn,Cn,wn);function Gn(e){return cn(e,[Ln,Vn],[Rn,Hn],[zn,Un],[Bn,Wn])}function Kn(e){return cn(jn(e),[kn,An])}function qn(e){return cn(e,[Mn,Fn],[Nn,Fn],[Pn,In])}function Jn(e){return cn(e,[En,Dn])}var Yn=sn(Sn);function Xn(e){return cn(e,[Tn,Yn])}var Zn=on(vn,yn),Qn=on(Y),$n=sn(Sn,Cn,wn);function er(e){return cn(e,[Zn,Vn],[Qn,$n])}var tr=`Invalid Duration`,nr={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},rr={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...nr},ir=146097/400,ar=146097/4800,or={years:{quarters:4,months:12,weeks:ir/7,days:ir,hours:ir*24,minutes:ir*24*60,seconds:ir*24*60*60,milliseconds:ir*24*60*60*1e3},quarters:{months:3,weeks:ir/28,days:ir/4,hours:ir*24/4,minutes:ir*24*60/4,seconds:ir*24*60*60/4,milliseconds:ir*24*60*60*1e3/4},months:{weeks:ar/7,days:ar,hours:ar*24,minutes:ar*24*60,seconds:ar*24*60*60,milliseconds:ar*24*60*60*1e3},...nr},sr=[`years`,`quarters`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`],cr=sr.slice(0).reverse();function lr(e,t,n=!1){return new Z({values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix})}function ur(e,t){let n=t.milliseconds??0;for(let r of cr.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function dr(e,t){let n=ur(e,t)<0?-1:1;sr.reduceRight((r,i)=>{if(I(t[i]))return r;if(r){let a=t[r]*n,o=e[i][r],s=Math.floor(a/o);t[i]+=s*n,t[r]-=s*o*n}return i},null),sr.reduce((n,r)=>{if(I(t[r]))return n;if(n){let i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r},null)}function fr(e){let t={};for(let[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}var Z=class e{constructor(e){let t=e.conversionAccuracy===`longterm`||!1,n=t?or:rr;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||D.create(),this.conversionAccuracy=t?`longterm`:`casual`,this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(t,n){return e.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(typeof t!=`object`||!t)throw new s(`Duration.fromObject: argument expected to be an object, got ${t===null?`null`:typeof t}`);return new e({values:It(t,e.normalizeUnit),loc:D.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(gt(t))return e.fromMillis(t);if(e.isDuration(t))return t;if(typeof t==`object`)return e.fromObject(t);throw new s(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){let[r]=Jn(t);return r?e.fromObject(r,n):e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){let[r]=Xn(t);return r?e.fromObject(r,n):e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new s(`need to specify a reason the Duration is invalid`);let r=t instanceof P?t:new P(t,n);if(N.throwOnInvalid)throw new i(r);return new e({invalid:r})}static normalizeUnit(e){let t={year:`years`,years:`years`,quarter:`quarters`,quarters:`quarters`,month:`months`,months:`months`,week:`weeks`,weeks:`weeks`,day:`days`,days:`days`,hour:`hours`,hours:`hours`,minute:`minutes`,minutes:`minutes`,second:`seconds`,seconds:`seconds`,millisecond:`milliseconds`,milliseconds:`milliseconds`}[e&&e.toLowerCase()];if(!t)throw new o(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){let n={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?G.create(this.loc,n).formatDurationFromString(this,e):tr}toHuman(e={}){if(!this.isValid)return tr;let t=e.showZeros!==!1,n=sr.map(n=>{let r=this.values[n];return I(r)||r===0&&!t?null:this.loc.numberFormatter({style:`unit`,unitDisplay:`long`,...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:`conjunction`,style:e.listStyle||`narrow`,...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e=`P`;return this.years!==0&&(e+=this.years+`Y`),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+`M`),this.weeks!==0&&(e+=this.weeks+`W`),this.days!==0&&(e+=this.days+`D`),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+=`T`),this.hours!==0&&(e+=this.hours+`H`),this.minutes!==0&&(e+=this.minutes+`M`),(this.seconds!==0||this.milliseconds!==0)&&(e+=kt(this.seconds+this.milliseconds/1e3,3)+`S`),e===`P`&&(e+=`T0S`),e}toISOTime(e={}){if(!this.isValid)return null;let t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:`extended`,...e,includeOffset:!1},$.fromMillis(t,{zone:`UTC`}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?ur(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;let n=e.fromDurationLike(t),r={};for(let e of sr)(Ct(n.values,e)||Ct(this.values,e))&&(r[e]=n.get(e)+this.get(e));return lr(this,{values:r},!0)}minus(t){if(!this.isValid)return this;let n=e.fromDurationLike(t);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;let t={};for(let n of Object.keys(this.values))t[n]=Ft(e(this.values[n],n));return lr(this,{values:t},!0)}get(t){return this[e.normalizeUnit(t)]}set(t){if(!this.isValid)return this;let n={...this.values,...It(t,e.normalizeUnit)};return lr(this,{values:n})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){let i={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n};return lr(this,i)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return dr(this.matrix,e),lr(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=fr(this.normalize().shiftToAll().toObject());return lr(this,{values:e},!0)}shiftTo(...t){if(!this.isValid||t.length===0)return this;t=t.map(t=>e.normalizeUnit(t));let n={},r={},i=this.toObject(),a;for(let e of sr)if(t.indexOf(e)>=0){a=e;let t=0;for(let n in r)t+=this.matrix[n][e]*r[n],r[n]=0;gt(i[e])&&(t+=i[e]);let o=Math.trunc(t);n[e]=o,r[e]=(t*1e3-o*1e3)/1e3}else gt(i[e])&&(r[e]=i[e]);for(let e in r)r[e]!==0&&(n[a]+=e===a?r[e]:r[e]/this.matrix[a][e]);return dr(this.matrix,n),lr(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo(`years`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`):this}negate(){if(!this.isValid)return this;let e={};for(let t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return lr(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=fr(this.values);return lr(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(e,t){return e===void 0||e===0?t===void 0||t===0:e===t}for(let n of sr)if(!t(this.values[n],e.values[n]))return!1;return!0}},pr=`Invalid Interval`;function mr(e,t){return!e||!e.isValid?hr.invalid(`missing or invalid start`):!t||!t.isValid?hr.invalid(`missing or invalid end`):t<e?hr.invalid(`end before start`,`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}var hr=class e{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new s(`need to specify a reason the Interval is invalid`);let i=t instanceof P?t:new P(t,n);if(N.throwOnInvalid)throw new r(i);return new e({invalid:i})}static fromDateTimes(t,n){let r=_i(t),i=_i(n);return mr(r,i)??new e({start:r,end:i})}static after(t,n){let r=Z.fromDurationLike(n),i=_i(t);return e.fromDateTimes(i,i.plus(r))}static before(t,n){let r=Z.fromDurationLike(n),i=_i(t);return e.fromDateTimes(i.minus(r),i)}static fromISO(t,n){let[r,i]=(t||``).split(`/`,2);if(r&&i){let t,a;try{t=$.fromISO(r,n),a=t.isValid}catch{a=!1}let o,s;try{o=$.fromISO(i,n),s=o.isValid}catch{s=!1}if(a&&s)return e.fromDateTimes(t,o);if(a){let r=Z.fromISO(i,n);if(r.isValid)return e.after(t,r)}else if(s){let t=Z.fromISO(r,n);if(t.isValid)return e.before(o,t)}}return e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e=`milliseconds`){return this.isValid?this.toDuration(e).get(e):NaN}count(e=`milliseconds`,t){if(!this.isValid)return NaN;let n=this.start.startOf(e,t),r;return r=t!=null&&t.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:t,end:n}={}){return this.isValid?e.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];let n=t.map(_i).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),r=[],{s:i}=this,a=0;for(;i<this.e;){let t=n[a]||this.e,o=+t>+this.e?this.e:t;r.push(e.fromDateTimes(i,o)),i=o,a+=1}return r}splitBy(t){let n=Z.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as(`milliseconds`)===0)return[];let{s:r}=this,i=1,a,o=[];for(;r<this.e;){let t=this.start.plus(n.mapUnits(e=>e*i));a=+t>+this.e?this.e:t,o.push(e.fromDateTimes(r,a)),r=a,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(t){if(!this.isValid)return this;let n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:e.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;let n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return e.fromDateTimes(n,r)}static merge(e){let[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(t){let n=null,r=0,i=[],a=t.map(e=>[{time:e.s,type:`s`},{time:e.e,type:`e`}]),o=Array.prototype.concat(...a).sort((e,t)=>e.time-t.time);for(let t of o)r+=t.type===`s`?1:-1,r===1?n=t.time:(n&&+n!=+t.time&&i.push(e.fromDateTimes(n,t.time)),n=null);return e.merge(i)}difference(...t){return e.xor([this].concat(t)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:pr}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=f,t={}){return this.isValid?G.create(this.s.loc.clone(t),e).formatInterval(this):pr}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:pr}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:pr}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:pr}toFormat(e,{separator:t=` – `}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:pr}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Z.invalid(this.invalidReason)}mapEndpoints(t){return e.fromDateTimes(t(this.s),t(this.e))}},gr=class{static hasDST(e=N.defaultZone){let t=$.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return be.isValidZone(e)}static normalizeZone(e){return He(e,N.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||D.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||D.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||D.create(e)).getWeekendDays().slice()}static months(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||D.create(t,n,i)).months(e)}static monthsFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||D.create(t,n,i)).months(e,!0)}static weekdays(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||D.create(t,n,null)).weekdays(e)}static weekdaysFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||D.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return D.create(e).meridiems()}static eras(e=`short`,{locale:t=null}={}){return D.create(t,null,`gregory`).eras(e)}static features(){return{relative:yt(),localeWeek:bt()}}};function _r(e,t){let n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf(`day`).valueOf(),r=n(t)-n(e);return Math.floor(Z.fromMillis(r).as(`days`))}function vr(e,t,n){let r=[[`years`,(e,t)=>t.year-e.year],[`quarters`,(e,t)=>t.quarter-e.quarter+(t.year-e.year)*4],[`months`,(e,t)=>t.month-e.month+(t.year-e.year)*12],[`weeks`,(e,t)=>{let n=_r(e,t);return(n-n%7)/7}],[`days`,_r]],i={},a=e,o,s;for(let[c,l]of r)n.indexOf(c)>=0&&(o=c,i[c]=l(e,t),s=a.plus(i),s>t?(i[c]--,e=a.plus(i),e>t&&(s=e,i[c]--,e=a.plus(i))):e=s);return[e,i,s,o]}function yr(e,t,n,r){let[i,a,o,s]=vr(e,t,n),c=t-i,l=n.filter(e=>[`hours`,`minutes`,`seconds`,`milliseconds`].indexOf(e)>=0);l.length===0&&(o<t&&(o=i.plus({[s]:1})),o!==i&&(a[s]=(a[s]||0)+c/(o-i)));let u=Z.fromObject(a,r);return l.length>0?Z.fromMillis(c,r).shiftTo(...l).plus(u):u}var br=`missing Intl.DateTimeFormat.formatToParts support`;function Q(e,t=e=>e){return{regex:e,deser:([e])=>t(Ge(e))}}var xr=`[ \xA0]`,Sr=new RegExp(xr,`g`);function Cr(e){return e.replace(/\./g,`\\.?`).replace(Sr,xr)}function wr(e){return e.replace(/\./g,``).replace(Sr,` `).toLowerCase()}function Tr(e,t){return e===null?null:{regex:RegExp(e.map(Cr).join(`|`)),deser:([n])=>e.findIndex(e=>wr(n)===wr(e))+t}}function Er(e,t){return{regex:e,deser:([,e,t])=>W(e,t),groups:t}}function Dr(e){return{regex:e,deser:([e])=>e}}function Or(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,`\\$&`)}function kr(e,t){let n=M(t),r=M(t,`{2}`),i=M(t,`{3}`),a=M(t,`{4}`),o=M(t,`{6}`),s=M(t,`{1,2}`),c=M(t,`{1,3}`),l=M(t,`{1,6}`),u=M(t,`{1,9}`),d=M(t,`{2,4}`),f=M(t,`{4,6}`),p=e=>({regex:RegExp(Or(e.val)),deser:([e])=>e,literal:!0}),m=(m=>{if(e.literal)return p(m);switch(m.val){case`G`:return Tr(t.eras(`short`),0);case`GG`:return Tr(t.eras(`long`),0);case`y`:return Q(l);case`yy`:return Q(d,H);case`yyyy`:return Q(a);case`yyyyy`:return Q(f);case`yyyyyy`:return Q(o);case`M`:return Q(s);case`MM`:return Q(r);case`MMM`:return Tr(t.months(`short`,!0),1);case`MMMM`:return Tr(t.months(`long`,!0),1);case`L`:return Q(s);case`LL`:return Q(r);case`LLL`:return Tr(t.months(`short`,!1),1);case`LLLL`:return Tr(t.months(`long`,!1),1);case`d`:return Q(s);case`dd`:return Q(r);case`o`:return Q(c);case`ooo`:return Q(i);case`HH`:return Q(r);case`H`:return Q(s);case`hh`:return Q(r);case`h`:return Q(s);case`mm`:return Q(r);case`m`:return Q(s);case`q`:return Q(s);case`qq`:return Q(r);case`s`:return Q(s);case`ss`:return Q(r);case`S`:return Q(c);case`SSS`:return Q(i);case`u`:return Dr(u);case`uu`:return Dr(s);case`uuu`:return Q(n);case`a`:return Tr(t.meridiems(),0);case`kkkk`:return Q(a);case`kk`:return Q(d,H);case`W`:return Q(s);case`WW`:return Q(r);case`E`:case`c`:return Q(n);case`EEE`:return Tr(t.weekdays(`short`,!1),1);case`EEEE`:return Tr(t.weekdays(`long`,!1),1);case`ccc`:return Tr(t.weekdays(`short`,!0),1);case`cccc`:return Tr(t.weekdays(`long`,!0),1);case`Z`:case`ZZ`:return Er(RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case`ZZZ`:return Er(RegExp(`([+-]${s.source})(${r.source})?`),2);case`z`:return Dr(/[a-z_+-/]{1,256}?/i);case` `:return Dr(/[^\S\n\r]/);default:return p(m)}})(e)||{invalidReason:br};return m.token=e,m}var Ar={year:{"2-digit":`yy`,numeric:`yyyyy`},month:{numeric:`M`,"2-digit":`MM`,short:`MMM`,long:`MMMM`},day:{numeric:`d`,"2-digit":`dd`},weekday:{short:`EEE`,long:`EEEE`},dayperiod:`a`,dayPeriod:`a`,hour12:{numeric:`h`,"2-digit":`hh`},hour24:{numeric:`H`,"2-digit":`HH`},minute:{numeric:`m`,"2-digit":`mm`},second:{numeric:`s`,"2-digit":`ss`},timeZoneName:{long:`ZZZZZ`,short:`ZZZ`}};function jr(e,t,n){let{type:r,value:i}=e;if(r===`literal`){let e=/^\s+$/.test(i);return{literal:!e,val:e?` `:i}}let a=t[r],o=r;r===`hour`&&(o=t.hour12==null?t.hourCycle==null?n.hour12?`hour12`:`hour24`:t.hourCycle===`h11`||t.hourCycle===`h12`?`hour12`:`hour24`:t.hour12?`hour12`:`hour24`);let s=Ar[o];if(typeof s==`object`&&(s=s[a]),s)return{literal:!1,val:s}}function Mr(e){return[`^${e.map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,``)}$`,e]}function Nr(e,t,n){let r=e.match(t);if(r){let e={},t=1;for(let i in n)if(Ct(n,i)){let a=n[i],o=a.groups?a.groups+1:1;!a.literal&&a.token&&(e[a.token.val[0]]=a.deser(r.slice(t,t+o))),t+=o}return[r,e]}return[r,{}]}function Pr(e){let t=e=>{switch(e){case`S`:return`millisecond`;case`s`:return`second`;case`m`:return`minute`;case`h`:case`H`:return`hour`;case`d`:return`day`;case`o`:return`ordinal`;case`L`:case`M`:return`month`;case`y`:return`year`;case`E`:case`c`:return`weekday`;case`W`:return`weekNumber`;case`k`:return`weekYear`;case`q`:return`quarter`;default:return null}},n=null,r;return I(e.z)||(n=be.create(e.z)),I(e.Z)||(n||=new k(e.Z),r=e.Z),I(e.q)||(e.M=(e.q-1)*3+1),I(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),I(e.u)||(e.S=Ot(e.u)),[Object.keys(e).reduce((n,r)=>{let i=t(r);return i&&(n[i]=e[r]),n},{}),n,r]}var Fr=null;function Ir(){return Fr||=$.fromMillis(1555555555555),Fr}function Lr(e,t){if(e.literal)return e;let n=Hr(G.macroTokenToFormatOpts(e.val),t);return n==null||n.includes(void 0)?e:n}function Rr(e,t){return Array.prototype.concat(...e.map(e=>Lr(e,t)))}var zr=class{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Rr(G.parseFormat(t),e),this.units=this.tokens.map(t=>kr(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){let[e,t]=Mr(this.units);this.regex=RegExp(e,`i`),this.handlers=t}}explainFromTokens(e){if(this.isValid){let[t,n]=Nr(e,this.regex,this.handlers),[r,i,o]=n?Pr(n):[null,null,void 0];if(Ct(n,`a`)&&Ct(n,`H`))throw new a(`Can't include meridiem when specifying 24-hour format`);return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:i,specificOffset:o}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function Br(e,t,n){return new zr(e,n).explainFromTokens(t)}function Vr(e,t,n){let{result:r,zone:i,specificOffset:a,invalidReason:o}=Br(e,t,n);return[r,i,a,o]}function Hr(e,t){if(!e)return null;let n=G.create(t,e).dtFormatter(Ir()),r=n.formatToParts(),i=n.resolvedOptions();return r.map(t=>jr(t,e,i))}var Ur=`Invalid DateTime`,Wr=864e13;function Gr(e){return new P(`unsupported zone`,`the zone "${e.name}" is not supported`)}function Kr(e){return e.weekData===null&&(e.weekData=st(e.c)),e.weekData}function qr(e){return e.localWeekData===null&&(e.localWeekData=st(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Jr(e,t){let n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new $({...n,...t,old:n})}function Yr(e,t,n){let r=e-t*60*1e3,i=n.offset(r);if(t===i)return[r,t];r-=(i-t)*60*1e3;let a=n.offset(r);return i===a?[r,i]:[e-Math.min(i,a)*60*1e3,Math.max(i,a)]}function Xr(e,t){e+=t*60*1e3;let n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Zr(e,t,n){return Yr(Nt(e),t,n)}function Qr(e,t){let n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,a={...e.c,year:r,month:i,day:Math.min(e.c.day,Mt(r,i))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=Z.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as(`milliseconds`),[s,c]=Yr(Nt(a),n,e.zone);return o!==0&&(s+=o,c=e.zone.offset(s)),{ts:s,o:c}}function $r(e,t,n,r,i,a){let{setZone:o,zone:s}=n;if(e&&Object.keys(e).length!==0||t){let r=t||s,i=$.fromObject(e,{...n,zone:r,specificOffset:a});return o?i:i.setZone(s)}return $.invalid(new P(`unparsable`,`the input "${i}" can't be parsed as ${r}`))}function ei(e,t,n=!0){return e.isValid?G.create(D.create(`en-US`),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function ti(e,t,n){let r=e.c.year>9999||e.c.year<0,i=``;if(r&&e.c.year>=0&&(i+=`+`),i+=B(e.c.year,r?6:4),n===`year`)return i;if(t){if(i+=`-`,i+=B(e.c.month),n===`month`)return i;i+=`-`}else if(i+=B(e.c.month),n===`month`)return i;return i+=B(e.c.day),i}function ni(e,t,n,r,i,a,o){let s=!n||e.c.millisecond!==0||e.c.second!==0,c=``;switch(o){case`day`:case`month`:case`year`:break;default:if(c+=B(e.c.hour),o===`hour`)break;if(t){if(c+=`:`,c+=B(e.c.minute),o===`minute`)break;s&&(c+=`:`,c+=B(e.c.second))}else{if(c+=B(e.c.minute),o===`minute`)break;s&&(c+=B(e.c.second))}if(o===`second`)break;s&&(!r||e.c.millisecond!==0)&&(c+=`.`,c+=B(e.c.millisecond,3))}return i&&(e.isOffsetFixed&&e.offset===0&&!a?c+=`Z`:e.o<0?(c+=`-`,c+=B(Math.trunc(-e.o/60)),c+=`:`,c+=B(Math.trunc(-e.o%60))):(c+=`+`,c+=B(Math.trunc(e.o/60)),c+=`:`,c+=B(Math.trunc(e.o%60)))),a&&(c+=`[`+e.zone.ianaName+`]`),c}var ri={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ii={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ai={ordinal:1,hour:0,minute:0,second:0,millisecond:0},oi=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],si=[`weekYear`,`weekNumber`,`weekday`,`hour`,`minute`,`second`,`millisecond`],ci=[`year`,`ordinal`,`hour`,`minute`,`second`,`millisecond`];function li(e){let t={year:`year`,years:`year`,month:`month`,months:`month`,day:`day`,days:`day`,hour:`hour`,hours:`hour`,minute:`minute`,minutes:`minute`,quarter:`quarter`,quarters:`quarter`,second:`second`,seconds:`second`,millisecond:`millisecond`,milliseconds:`millisecond`,weekday:`weekday`,weekdays:`weekday`,weeknumber:`weekNumber`,weeksnumber:`weekNumber`,weeknumbers:`weekNumber`,weekyear:`weekYear`,weekyears:`weekYear`,ordinal:`ordinal`}[e.toLowerCase()];if(!t)throw new o(e);return t}function ui(e){switch(e.toLowerCase()){case`localweekday`:case`localweekdays`:return`localWeekday`;case`localweeknumber`:case`localweeknumbers`:return`localWeekNumber`;case`localweekyear`:case`localweekyears`:return`localWeekYear`;default:return li(e)}}function di(e){if(hi===void 0&&(hi=N.now()),e.type!==`iana`)return e.offset(hi);let t=e.name,n=gi.get(t);return n===void 0&&(n=e.offset(hi),gi.set(t,n)),n}function fi(e,t){let n=He(t.zone,N.defaultZone);if(!n.isValid)return $.invalid(Gr(n));let r=D.fromObject(t),i,a;if(I(e.year))i=N.now();else{for(let t of oi)I(e[t])&&(e[t]=ri[t]);let t=mt(e)||ht(e);if(t)return $.invalid(t);let r=di(n);[i,a]=Zr(e,r,n)}return new $({ts:i,zone:n,loc:r,o:a})}function pi(e,t,n){let r=I(n.round)?!0:n.round,i=I(n.rounding)?`trunc`:n.rounding,a=(e,a)=>(e=kt(e,r||n.calendary?0:2,n.calendary?`round`:i),t.loc.clone(n).relFormatter(n).format(e,a)),o=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return a(o(n.unit),n.unit);for(let e of n.units){let t=o(e);if(Math.abs(t)>=1)return a(t,e)}return a(e>t?-0:0,n.units[n.units.length-1])}function mi(e){let t={},n;return e.length>0&&typeof e[e.length-1]==`object`?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}var hi,gi=new Map,$=class e{constructor(e){let t=e.zone||N.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new P(`invalid input`):null)||(t.isValid?null:Gr(t));this.ts=I(e.ts)?N.now():e.ts;let r=null,i=null;if(!n){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{let a=gt(e.o)&&!e.old?e.o:t.offset(this.ts);r=Xr(this.ts,a),n=Number.isNaN(r.year)?new P(`invalid input`):null,r=n?null:r,i=n?null:a}}this._zone=t,this.loc=e.loc||D.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new e({})}static local(){let[e,t]=mi(arguments),[n,r,i,a,o,s,c]=t;return fi({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static utc(){let[e,t]=mi(arguments),[n,r,i,a,o,s,c]=t;return e.zone=k.utcInstance,fi({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static fromJSDate(t,n={}){let r=vt(t)?t.valueOf():NaN;if(Number.isNaN(r))return e.invalid(`invalid input`);let i=He(n.zone,N.defaultZone);return i.isValid?new e({ts:r,zone:i,loc:D.fromObject(n)}):e.invalid(Gr(i))}static fromMillis(t,n={}){if(!gt(t))throw new s(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`);return t<-864e13||t>Wr?e.invalid(`Timestamp out of range`):new e({ts:t,zone:He(n.zone,N.defaultZone),loc:D.fromObject(n)})}static fromSeconds(t,n={}){if(gt(t))return new e({ts:t*1e3,zone:He(n.zone,N.defaultZone),loc:D.fromObject(n)});throw new s(`fromSeconds requires a numerical input`)}static fromObject(t,n={}){t||={};let r=He(n.zone,N.defaultZone);if(!r.isValid)return e.invalid(Gr(r));let i=D.fromObject(n),o=It(t,ui),{minDaysInFirstWeek:s,startOfWeek:c}=dt(o,i),l=N.now(),u=I(n.specificOffset)?r.offset(l):n.specificOffset,d=!I(o.ordinal),f=!I(o.year),p=!I(o.month)||!I(o.day),m=f||p,h=o.weekYear||o.weekNumber;if((m||d)&&h)throw new a(`Can't mix weekYear/weekNumber units with year/month/day or ordinals`);if(p&&d)throw new a(`Can't mix ordinal dates with month/day`);let g=h||o.weekday&&!m,_,v,y=Xr(l,u);g?(_=si,v=ii,y=st(y,s,c)):d?(_=ci,v=ai,y=lt(y)):(_=oi,v=ri);let b=!1;for(let e of _){let t=o[e];I(t)?o[e]=b?v[e]:y[e]:b=!0}let ee=(g?ft(o,s,c):d?pt(o):mt(o))||ht(o);if(ee)return e.invalid(ee);let[x,te]=Zr(g?ct(o,s,c):d?ut(o):o,u,r),ne=new e({ts:x,zone:r,o:te,loc:i});return o.weekday&&m&&t.weekday!==ne.weekday?e.invalid(`mismatched weekday`,`you can't specify both a weekday of ${o.weekday} and a date of ${ne.toISO()}`):ne.isValid?ne:e.invalid(ne.invalid)}static fromISO(e,t={}){let[n,r]=Gn(e);return $r(n,r,t,`ISO 8601`,e)}static fromRFC2822(e,t={}){let[n,r]=Kn(e);return $r(n,r,t,`RFC 2822`,e)}static fromHTTP(e,t={}){let[n,r]=qn(e);return $r(n,r,t,`HTTP`,t)}static fromFormat(t,n,r={}){if(I(t)||I(n))throw new s(`fromFormat requires an input string and a format`);let{locale:i=null,numberingSystem:a=null}=r,[o,c,l,u]=Vr(D.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0}),t,n);return u?e.invalid(u):$r(o,c,r,`format ${n}`,t,l)}static fromString(t,n,r={}){return e.fromFormat(t,n,r)}static fromSQL(e,t={}){let[n,r]=er(e);return $r(n,r,t,`SQL`,e)}static invalid(t,r=null){if(!t)throw new s(`need to specify a reason the DateTime is invalid`);let i=t instanceof P?t:new P(t,r);if(N.throwOnInvalid)throw new n(i);return new e({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let n=Hr(e,D.fromObject(t));return n?n.map(e=>e?e.val:null).join(``):null}static expandFormat(e,t={}){return Rr(G.parseFormat(e),D.fromObject(t)).map(e=>e.val).join(``)}static resetCache(){hi=void 0,gi.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Kr(this).weekYear:NaN}get weekNumber(){return this.isValid?Kr(this).weekNumber:NaN}get weekday(){return this.isValid?Kr(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?qr(this).weekday:NaN}get localWeekNumber(){return this.isValid?qr(this).weekNumber:NaN}get localWeekYear(){return this.isValid?qr(this).weekYear:NaN}get ordinal(){return this.isValid?lt(this.c).ordinal:NaN}get monthShort(){return this.isValid?gr.months(`short`,{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?gr.months(`long`,{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?gr.weekdays(`short`,{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?gr.weekdays(`long`,{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:`short`,locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:`long`,locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,t=6e4,n=Nt(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),a=this.zone.offset(n-r*t),o=this.zone.offset(n-i*t);if(a===o)return[this];let s=n-a*t,c=n-o*t,l=Xr(s,a),u=Xr(c,o);return l.hour===u.hour&&l.minute===u.minute&&l.second===u.second&&l.millisecond===u.millisecond?[Jr(this,{ts:s}),Jr(this,{ts:c})]:[this]}get isInLeapYear(){return At(this.year)}get daysInMonth(){return Mt(this.year,this.month)}get daysInYear(){return this.isValid?jt(this.year):NaN}get weeksInWeekYear(){return this.isValid?V(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?V(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:n,calendar:r}=G.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(k.instance(e),t)}toLocal(){return this.setZone(N.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=He(t,N.defaultZone),t.equals(this.zone))return this;if(t.isValid){let e=this.ts;if(n||r){let n=t.offset(this.ts),r=this.toObject();[e]=Zr(r,n,t)}return Jr(this,{ts:e,zone:t})}return e.invalid(Gr(t))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){let r=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return Jr(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let t=It(e,ui),{minDaysInFirstWeek:n,startOfWeek:r}=dt(t,this.loc),i=!I(t.weekYear)||!I(t.weekNumber)||!I(t.weekday),o=!I(t.ordinal),s=!I(t.year),c=!I(t.month)||!I(t.day),l=s||c,u=t.weekYear||t.weekNumber;if((l||o)&&u)throw new a(`Can't mix weekYear/weekNumber units with year/month/day or ordinals`);if(c&&o)throw new a(`Can't mix ordinal dates with month/day`);let d;i?d=ct({...st(this.c,n,r),...t},n,r):I(t.ordinal)?(d={...this.toObject(),...t},I(t.day)&&(d.day=Math.min(Mt(d.year,d.month),d.day))):d=ut({...lt(this.c),...t});let[f,p]=Zr(d,this.o,this.zone);return Jr(this,{ts:f,o:p})}plus(e){if(!this.isValid)return this;let t=Z.fromDurationLike(e);return Jr(this,Qr(this,t))}minus(e){if(!this.isValid)return this;let t=Z.fromDurationLike(e).negate();return Jr(this,Qr(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;let n={},r=Z.normalizeUnit(e);switch(r){case`years`:n.month=1;case`quarters`:case`months`:n.day=1;case`weeks`:case`days`:n.hour=0;case`hours`:n.minute=0;case`minutes`:n.second=0;case`seconds`:n.millisecond=0}if(r===`weeks`){if(t){let e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1}return r===`quarters`&&(n.month=(Math.ceil(this.month/3)-1)*3+1),this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?G.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Ur}toLocaleString(e=f,t={}){return this.isValid?G.create(this.loc.clone(t),e).formatDateTime(this):Ur}toLocaleParts(e={}){return this.isValid?G.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e=`extended`,suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:i=!1,precision:a=`milliseconds`}={}){if(!this.isValid)return null;a=li(a);let o=e===`extended`,s=ti(this,o,a);return oi.indexOf(a)>=3&&(s+=`T`),s+=ni(this,o,t,n,r,i,a),s}toISODate({format:e=`extended`,precision:t=`day`}={}){return this.isValid?ti(this,e===`extended`,li(t)):null}toISOWeekDate(){return ei(this,`kkkk-'W'WW-c`)}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:i=!1,format:a=`extended`,precision:o=`milliseconds`}={}){return this.isValid?(o=li(o),(r&&oi.indexOf(o)>=3?`T`:``)+ni(this,a===`extended`,t,e,n,i,o)):null}toRFC2822(){return ei(this,`EEE, dd LLL yyyy HH:mm:ss ZZZ`,!1)}toHTTP(){return ei(this.toUTC(),`EEE, dd LLL yyyy HH:mm:ss 'GMT'`)}toSQLDate(){return this.isValid?ti(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r=`HH:mm:ss.SSS`;return(t||e)&&(n&&(r+=` `),t?r+=`z`:e&&(r+=`ZZ`)),ei(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Ur}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t=`milliseconds`,n={}){if(!this.isValid||!e.isValid)return Z.invalid(`created by diffing an invalid DateTime`);let r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=xt(t).map(Z.normalizeUnit),a=e.valueOf()>this.valueOf(),o=yr(a?this:e,a?e:this,i,r);return a?o.negate():o}diffNow(t=`milliseconds`,n={}){return this.diff(e.now(),t,n)}until(e){return this.isValid?hr.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;let r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(t={}){if(!this.isValid)return null;let n=t.base||e.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0,i=[`years`,`months`,`days`,`hours`,`minutes`,`seconds`],a=t.unit;return Array.isArray(t.unit)&&(i=t.unit,a=void 0),pi(n,this.plus(r),{...t,numeric:`always`,units:i,unit:a})}toRelativeCalendar(t={}){return this.isValid?pi(t.base||e.fromObject({},{zone:this.zone}),this,{...t,numeric:`auto`,units:[`years`,`months`,`days`],calendary:!0}):null}static min(...t){if(!t.every(e.isDateTime))throw new s(`min requires all arguments be DateTimes`);return St(t,e=>e.valueOf(),Math.min)}static max(...t){if(!t.every(e.isDateTime))throw new s(`max requires all arguments be DateTimes`);return St(t,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){let{locale:r=null,numberingSystem:i=null}=n;return Br(D.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(t,n,r={}){return e.fromFormatExplain(t,n,r)}static buildFormatParser(e,t={}){let{locale:n=null,numberingSystem:r=null}=t;return new zr(D.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),e)}static fromFormatParser(t,n,r={}){if(I(t)||I(n))throw new s(`fromFormatParser requires an input string and a format parser`);let{locale:i=null,numberingSystem:a=null}=r,o=D.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});if(!o.equals(n.locale))throw new s(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);let{result:c,zone:l,specificOffset:u,invalidReason:d}=n.explainFromTokens(t);return d?e.invalid(d):$r(c,l,r,`format ${n.format}`,t,u)}static get DATE_SHORT(){return f}static get DATE_MED(){return p}static get DATE_MED_WITH_WEEKDAY(){return m}static get DATE_FULL(){return h}static get DATE_HUGE(){return g}static get TIME_SIMPLE(){return _}static get TIME_WITH_SECONDS(){return v}static get TIME_WITH_SHORT_OFFSET(){return y}static get TIME_WITH_LONG_OFFSET(){return b}static get TIME_24_SIMPLE(){return ee}static get TIME_24_WITH_SECONDS(){return x}static get TIME_24_WITH_SHORT_OFFSET(){return te}static get TIME_24_WITH_LONG_OFFSET(){return ne}static get DATETIME_SHORT(){return S}static get DATETIME_SHORT_WITH_SECONDS(){return re}static get DATETIME_MED(){return ie}static get DATETIME_MED_WITH_SECONDS(){return ae}static get DATETIME_MED_WITH_WEEKDAY(){return oe}static get DATETIME_FULL(){return se}static get DATETIME_FULL_WITH_SECONDS(){return ce}static get DATETIME_HUGE(){return le}static get DATETIME_HUGE_WITH_SECONDS(){return ue}};function _i(e){if($.isDateTime(e))return e;if(e&&e.valueOf&&gt(e.valueOf()))return $.fromJSDate(e);if(e&&typeof e==`object`)return $.fromObject(e);throw new s(`Unknown datetime argument: ${e}, of type ${typeof e}`)}e.DateTime=$,e.Duration=Z,e.FixedOffsetZone=k,e.IANAZone=be,e.Info=gr,e.Interval=hr,e.InvalidZone=Ve,e.Settings=N,e.SystemZone=pe,e.VERSION=`3.7.2`,e.Zone=de})),Vt=n((e=>{Rt(),Mt(),Ft(),Nt(),jt(),Object.defineProperty(e,"__esModule",{value:!0}),e.CronDate=e.DAYS_IN_MONTH=e.DateMathOp=e.TimeUnit=void 0;var t=Bt(),n;(function(e){e.Second=`Second`,e.Minute=`Minute`,e.Hour=`Hour`,e.Day=`Day`,e.Month=`Month`,e.Year=`Year`})(n||(e.TimeUnit=n={}));var r;(function(e){e.Add=`Add`,e.Subtract=`Subtract`})(r||(e.DateMathOp=r={})),e.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);var i=new WeakMap,a=new WeakMap,o=new WeakMap,s=new WeakMap,c=new WeakSet,l=class l{constructor(e,n){Lt(this,c),V(this,i,void 0),V(this,a,null),V(this,o,null),V(this,s,null);let r={zone:n};if(e?e instanceof l?(W(i,this,U(i,e)),W(a,this,U(a,e)),W(o,this,U(o,e)),W(s,this,U(s,e))):e instanceof Date?W(i,this,t.DateTime.fromJSDate(e,r)):typeof e==`number`?W(i,this,t.DateTime.fromMillis(e,r)):(W(i,this,t.DateTime.fromISO(e,r)),U(i,this).isValid||W(i,this,t.DateTime.fromRFC2822(e,r)),U(i,this).isValid||W(i,this,t.DateTime.fromSQL(e,r)),U(i,this).isValid||W(i,this,t.DateTime.fromFormat(e,`EEE, d MMM yyyy HH:mm:ss`,r))):W(i,this,t.DateTime.local()),!U(i,this).isValid)throw Error(`CronDate: unhandled timestamp: ${e}`);n&&n!==U(i,this).zoneName&&W(i,this,U(i,this).setZone(n))}get dstStart(){return U(a,this)}get dstStartLandingHour(){return U(o,this)}clearDstStart(){W(a,this,null),W(o,this,null)}get dstEnd(){return U(s,this)}set dstEnd(e){W(s,this,e)}addYear(){W(i,this,U(i,this).plus({years:1}))}addMonth(){W(i,this,U(i,this).plus({months:1}).startOf(`month`))}addDay(){W(i,this,U(i,this).plus({days:1}).startOf(`day`))}addHour(){W(i,this,U(i,this).plus({hours:1}).startOf(`hour`))}addMinute(){W(i,this,U(i,this).plus({minutes:1}).startOf(`minute`))}addSecond(){W(i,this,U(i,this).plus({seconds:1}))}subtractYear(){W(i,this,U(i,this).minus({years:1}))}subtractMonth(){W(i,this,U(i,this).minus({months:1}).endOf(`month`).startOf(`second`))}subtractDay(){W(i,this,U(i,this).minus({days:1}).endOf(`day`).startOf(`second`))}subtractHour(){W(i,this,U(i,this).minus({hours:1}).endOf(`hour`).startOf(`second`))}subtractMinute(){W(i,this,U(i,this).minus({minutes:1}).endOf(`minute`).startOf(`second`))}subtractSecond(){W(i,this,U(i,this).minus({seconds:1}))}addUnit(e){switch(e){case n.Year:return this.addYear();case n.Month:return this.addMonth();case n.Day:return this.addDay();case n.Hour:return this.addHour();case n.Minute:return this.addMinute();case n.Second:return this.addSecond()}}subtractUnit(e){switch(e){case n.Year:return this.subtractYear();case n.Month:return this.subtractMonth();case n.Day:return this.subtractDay();case n.Hour:return this.subtractHour();case n.Minute:return this.subtractMinute();case n.Second:return this.subtractSecond()}}invokeDateOperation(e,t){if(e===r.Add)this.addUnit(t);else if(e===r.Subtract)this.subtractUnit(t);else throw Error(`Invalid verb: ${e}`)}getDate(){return U(i,this).day}getFullYear(){return U(i,this).year}getDay(){let e=U(i,this).weekday;return e===7?0:e}getMonth(){return U(i,this).month-1}getHours(){return U(i,this).hour}getMinutes(){return U(i,this).minute}getSeconds(){return U(i,this).second}getMilliseconds(){return U(i,this).millisecond}getUTCOffset(){return U(i,this).offset}setStartOfDay(){W(i,this,U(i,this).startOf(`day`))}setEndOfDay(){W(i,this,U(i,this).endOf(`day`))}getTime(){return U(i,this).valueOf()}getUTCDate(){return H(c,this,d).call(this).day}getUTCFullYear(){return H(c,this,d).call(this).year}getUTCDay(){let e=H(c,this,d).call(this).weekday;return e===7?0:e}getUTCMonth(){return H(c,this,d).call(this).month-1}getUTCHours(){return H(c,this,d).call(this).hour}getUTCMinutes(){return H(c,this,d).call(this).minute}getUTCSeconds(){return H(c,this,d).call(this).second}toISOString(){return U(i,this).toUTC().toISO()}toJSON(){return U(i,this).toJSON()}setDate(e){W(i,this,U(i,this).set({day:e}))}setFullYear(e){W(i,this,U(i,this).set({year:e}))}setDay(e){W(i,this,U(i,this).set({weekday:e}))}setMonth(e){W(i,this,U(i,this).set({month:e+1}))}setHours(e){W(i,this,U(i,this).set({hour:e}))}setMinutes(e){W(i,this,U(i,this).set({minute:e}))}setSeconds(e){W(i,this,U(i,this).set({second:e}))}setMilliseconds(e){W(i,this,U(i,this).set({millisecond:e}))}toString(){return this.toDate().toString()}toDate(){return U(i,this).toJSDate()}isLastDayOfMonth(){let{day:t,month:n}=U(i,this);if(n===2){let r=u.call(l,U(i,this).year);return t===e.DAYS_IN_MONTH[n-1]-+!r}return t===e.DAYS_IN_MONTH[n-1]}isLastWeekdayOfMonth(){let{day:t,month:n}=U(i,this),r;return r=n===2?e.DAYS_IN_MONTH[n-1]-+!u.call(l,U(i,this).year):e.DAYS_IN_MONTH[n-1],t>r-7}applyDateOperation(e,t,i){if(t===n.Month||t===n.Day){this.invokeDateOperation(e,t);return}let s=this.getHours(),c=this.getUTCOffset();this.invokeDateOperation(e,t);let l=this.getHours(),u=(l-s+24)%24;e===r.Add&&this.getUTCOffset()>c&&u>=2?i!==24&&(W(a,this,(s+1)%24),W(o,this,l)):u===0&&this.getMinutes()===0&&this.getSeconds()===0&&i!==24&&(this.dstEnd=l)}};function u(e){return e%4==0&&e%100!=0||e%400==0}function d(){return U(i,this).toUTC()}e.CronDate=l,e.default=l})),Ht=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronMonth=void 0;var t=Vt(),n=zt(),r=1,i=12,a=Object.freeze([]);e.CronMonth=class extends n.CronField{static get min(){return r}static get max(){return i}static get chars(){return a}static get daysInMonth(){return t.DAYS_IN_MONTH}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Ut=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDayOfMonth=void 0;var t=zt(),n=Ht(),r=1,i=31,a=Object.freeze([`L`]);e.CronDayOfMonth=class e extends t.CronField{static fromMonth(t,r,i){if(t.length!==1)return new e(r,i);let a=n.CronMonth.daysInMonth[t[0]-1],o=r.filter(e=>typeof e!=`number`||e<=a);return new e(o.length>0?o:r,i)}static get min(){return r}static get max(){return i}static get chars(){return a}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Wt=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDayOfWeek=void 0;var t=zt(),n=0,r=7,i=Object.freeze([`L`]);e.CronDayOfWeek=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){if(super(e,t),this.validate(),this.values.some(e=>e===`L`))throw Error(`${this.constructor.name} Validation error, unexpected standalone L`)}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}}})),Gt=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronHour=void 0;var t=zt(),n=0,r=23,i=Object.freeze([]);e.CronHour=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Kt=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronMinute=void 0;var t=zt(),n=0,r=59,i=Object.freeze([]);e.CronMinute=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),qt=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronSecond=void 0;var t=zt(),n=0,r=59,i=Object.freeze([]);e.CronSecond=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Jt=n(((e,t,n)=>{var r=n&&n.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),i=n&&n.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&r(t,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(It(),e),i(Ut(),e),i(Wt(),e),i(zt(),e),i(Gt(),e),i(Kt(),e),i(Ht(),e),i(qt(),e)})),Yt=n((e=>{Mt(),Ft(),Nt(),Object.defineProperty(e,"__esModule",{value:!0}),e.CronFieldCollection=void 0;var t=Jt(),n=new WeakMap,r=new WeakMap,i=new WeakMap,a=new WeakMap,o=new WeakMap,s=new WeakMap,c=class e{static from(n,r){return new e({second:this.resolveField(t.CronSecond,n.second,r.second),minute:this.resolveField(t.CronMinute,n.minute,r.minute),hour:this.resolveField(t.CronHour,n.hour,r.hour),dayOfMonth:this.resolveField(t.CronDayOfMonth,n.dayOfMonth,r.dayOfMonth),month:this.resolveField(t.CronMonth,n.month,r.month),dayOfWeek:this.resolveField(t.CronDayOfWeek,n.dayOfWeek,r.dayOfWeek)})}static resolveField(e,n,r){return r?r instanceof t.CronField?r:new e(r):n}constructor({second:e,minute:c,hour:l,dayOfMonth:u,month:d,dayOfWeek:f}){if(V(this,n,void 0),V(this,r,void 0),V(this,i,void 0),V(this,a,void 0),V(this,o,void 0),V(this,s,void 0),!e)throw Error(`Validation error, Field second is missing`);if(!c)throw Error(`Validation error, Field minute is missing`);if(!l)throw Error(`Validation error, Field hour is missing`);if(!u)throw Error(`Validation error, Field dayOfMonth is missing`);if(!d)throw Error(`Validation error, Field month is missing`);if(!f)throw Error(`Validation error, Field dayOfWeek is missing`);if(d.values.length===1&&!u.hasLastChar&&f.isWildcard&&!(parseInt(u.values[0],10)<=t.CronMonth.daysInMonth[d.values[0]-1]))throw Error(`Invalid explicit day of month definition`);W(n,this,e),W(r,this,c),W(i,this,l),W(o,this,d),W(s,this,f),W(a,this,u)}get second(){return U(n,this)}get minute(){return U(r,this)}get hour(){return U(i,this)}get dayOfMonth(){return U(a,this)}get month(){return U(o,this)}get dayOfWeek(){return U(s,this)}static compactField(e){if(e.length===0)return[];let t=[],n;return e.forEach((e,r,i)=>{if(n===void 0){n={start:e,count:1};return}let a=i[r-1]||n.start,o=i[r+1];if(e===`L`||e===`W`)t.push(n),t.push({start:e,count:1}),n=void 0;else{if(n.step===void 0&&o!==void 0){let t=e-a;if(t<=o-e){n={...n,count:2,end:e,step:t};return}n.step=1}e-(n.end??0)===n.step?(n.count++,n.end=e):(n.count===1?t.push({start:n.start,count:1}):n.count===2?(t.push({start:n.start,count:1}),t.push({start:n.end??a,count:1})):t.push(n),n={start:e,count:1})}}),n&&t.push(n),t}stringifyField(n){let r=n.max,i=n.values;if(n instanceof t.CronDayOfWeek){r=6;let e=U(s,this).values;i=e[e.length-1]===7?e.slice(0,-1):e}n instanceof t.CronDayOfMonth&&(r=U(o,this).values.length===1?t.CronMonth.daysInMonth[U(o,this).values[0]-1]:n.max);let a=e.compactField(i);if(a.length===1){let t=l.call(e,n,a[0],r);if(t)return t}return a.map(r=>{let i=r.count===1?r.start.toString():u.call(e,r);return n instanceof t.CronDayOfWeek&&n.nthDay>0?`${i}#${n.nthDay}`:i}).join(`,`)}stringify(e=!1){let t=[];return e&&t.push(this.stringifyField(U(n,this))),t.push(this.stringifyField(U(r,this)),this.stringifyField(U(i,this)),this.stringifyField(U(a,this)),this.stringifyField(U(o,this)),this.stringifyField(U(s,this))),t.join(` `)}serialize(){return{second:U(n,this).serialize(),minute:U(r,this).serialize(),hour:U(i,this).serialize(),dayOfMonth:U(a,this).serialize(),month:U(o,this).serialize(),dayOfWeek:U(s,this).serialize()}}};function l(e,n,r){let i=n.step;return i?i===1&&n.start===e.min&&n.end&&n.end>=r?(e instanceof t.CronDayOfMonth||e instanceof t.CronDayOfWeek)&&!e.isWildcard?null:e.hasQuestionMarkChar?`?`:`*`:i!==1&&n.start===e.min&&n.end&&n.end>=r-i+1?`*/${i}`:null:null}function u(e){let t=e.step;if(t===1)return`${e.start}-${e.end}`;let n=e.start===0?e.count-1:e.count;if(!t)throw Error(`Unexpected range step`);if(!e.end)throw Error(`Unexpected range end`);if(t*n>e.end){let n=(n,r)=>{if(typeof e.start!=`number`)throw Error(`Unexpected range start`);return r%t===0?e.start+r:null};if(typeof e.start!=`number`)throw Error(`Unexpected range start`);let r={length:e.end-e.start+1};return Array.from(r,n).filter(e=>e!==null).join(`,`)}return`${e.start}-${e.end}/${t}`}e.CronFieldCollection=c})),Xt=n((e=>{Rt(),Mt(),Ft(),Nt(),jt();var t,n;Object.defineProperty(e,"__esModule",{value:!0}),e.CronExpression=e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;var r=Vt();e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=`Out of the time span range`,e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=`Invalid expression, loop limit exceeded`;var i=1e4,a=new WeakMap,o=new WeakMap,s=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakSet;n=Symbol.iterator;var m=class e{constructor(e,t){Lt(this,p),V(this,a,void 0),V(this,o,void 0),V(this,s,void 0),V(this,c,void 0),V(this,l,void 0),V(this,u,void 0),V(this,d,null),V(this,f,!1),W(a,this,t),W(o,this,t.tz),W(c,this,t.startDate?new r.CronDate(t.startDate,U(o,this)):null),W(l,this,t.endDate?new r.CronDate(t.endDate,U(o,this)):null);let n=t.currentDate??t.startDate;if(n){let e=new r.CronDate(n,U(o,this));U(c,this)&&e.getTime()<U(c,this).getTime()?n=U(c,this):U(l,this)&&e.getTime()>U(l,this).getTime()&&(n=U(l,this))}W(s,this,new r.CronDate(n,U(o,this))),W(u,this,e)}get fields(){return U(u,this)}static fieldsToExpression(t,n){return new e(t,n||{})}next(){return H(p,this,S).call(this)}prev(){return H(p,this,S).call(this,!0)}hasNext(){let e=U(s,this);try{return H(p,this,S).call(this),!0}catch{return!1}finally{W(s,this,e)}}hasPrev(){let e=U(s,this);try{return H(p,this,S).call(this,!0),!0}catch{return!1}finally{W(s,this,e)}}take(e){let t=[];if(e>=0)for(let n=0;n<e;n++)try{t.push(this.next())}catch{return t}else for(let n=0;n>e;n--)try{t.push(this.prev())}catch{return t}return t}reset(e){W(s,this,new r.CronDate(e||U(a,this).currentDate,U(o,this)))}stringify(e=!1){return U(u,this).stringify(e)}includesDate(e){let{second:t,minute:n,hour:i,month:a}=U(u,this),s=new r.CronDate(e,U(o,this));return!(!t.values.includes(s.getSeconds())||!n.values.includes(s.getMinutes())||!i.values.includes(s.getHours())||!a.values.includes(s.getMonth()+1)||!H(p,this,x).call(this,s))}toString(){return U(a,this).expression||this.stringify(!0)}[n](){return{next:()=>{try{return{value:H(p,this,S).call(this),done:!1}}catch{return{value:void 0,done:!0}}}}}};t=m;function h(e,t){return t.some(t=>t===e)}function g(e,t){return e[t?e.length-1:0]}function _(e){let t=`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`;if(U(d,this)===t)return U(f,this);let n=new r.CronDate(e);n.setStartOfDay();let i=new r.CronDate(e);return i.setEndOfDay(),W(d,this,t),W(f,this,n.getUTCOffset()!==i.getUTCOffset()),U(f,this)}function v(e,t,n){let i=U(u,this).second.values,a=e.getSeconds(),o=U(u,this).second.findNearestValue(a,n);o===null?(e.applyDateOperation(t,r.TimeUnit.Minute,U(u,this).hour.values.length),e.setSeconds(H(p,this,g).call(this,i,n))):e.setSeconds(o)}function y(e,t,n){let i=U(u,this).minute.values,a=U(u,this).second.values,o=e.getMinutes(),s=U(u,this).minute.findNearestValue(o,n);s===null?(e.applyDateOperation(t,r.TimeUnit.Hour,U(u,this).hour.values.length),e.setMinutes(H(p,this,g).call(this,i,n)),e.setSeconds(H(p,this,g).call(this,a,n))):(e.setMinutes(s),e.setSeconds(H(p,this,g).call(this,a,n)))}function b(e,t){if(!t.isLastWeekdayOfMonth())return!1;let n=t.getDay();return e.some(e=>n===parseInt(e.toString().charAt(0),10)%7)}function ee(e,t){return e<=0||Math.ceil(t.getDate()/7)===e}function x(e){let n=U(u,this).dayOfMonth.isWildcard,r=!n,i=U(u,this).dayOfWeek.isWildcard,a=!i,o=h.call(t,e.getDate(),U(u,this).dayOfMonth.values)||U(u,this).dayOfMonth.hasLastChar&&e.isLastDayOfMonth(),s=U(u,this).dayOfWeek.nthDay,c=h.call(t,e.getDay(),U(u,this).dayOfWeek.values)&&ee.call(t,s,e)||U(u,this).dayOfWeek.hasLastChar&&b.call(t,U(u,this).dayOfWeek.values,e);return!!(r&&a&&(o||c)||o&&!a||n&&!i&&c)}function te(e,n,i){let a=U(u,this).hour.values,o=a,s=e.getHours(),c=h.call(t,s,a),l=e.dstEnd===s;if(e.dstStart!==null&&e.dstStartLandingHour===s){for(let n=e.dstStart;n!==s;n=(n+1)%24)if(h.call(t,n,a))return!0}if(l&&!i)return e.dstEnd=null,e.applyDateOperation(r.DateMathOp.Add,r.TimeUnit.Hour,o.length),!1;if(c)return!0;e.clearDstStart();let d=U(u,this).hour.findNearestValue(s,i);if(d===null)return e.applyDateOperation(n,r.TimeUnit.Day,o.length),!1;if(H(p,this,_).call(this,e)){let t=i?s-d:d-s;for(let a=0;a<t&&(e.applyDateOperation(n,r.TimeUnit.Hour,o.length),!(!i&&e.getHours()>=d||i&&e.getHours()<=d));a++);}else e.setHours(d);return e.setMinutes(H(p,this,g).call(this,U(u,this).minute.values,i)),e.setSeconds(H(p,this,g).call(this,U(u,this).second.values,i)),!1}function ne(t){if(!U(c,this)&&!U(l,this))return;let n=t.getTime();if(U(c,this)&&n<U(c,this).getTime()||U(l,this)&&n>U(l,this).getTime())throw Error(e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)}function S(n=!1){let a=n?r.DateMathOp.Subtract:r.DateMathOp.Add,o=new r.CronDate(U(s,this)),c=o.getTime();o.getMilliseconds()>0&&(o.setMilliseconds(0),n||o.applyDateOperation(r.DateMathOp.Add,r.TimeUnit.Second,U(u,this).hour.values.length));let l=0;for(;++l<i;)if(H(p,this,ne).call(this,o),!H(p,this,x).call(this,o))o.applyDateOperation(a,r.TimeUnit.Day,U(u,this).hour.values.length);else if(!h.call(t,o.getMonth()+1,U(u,this).month.values))o.applyDateOperation(a,r.TimeUnit.Month,U(u,this).hour.values.length);else if(H(p,this,te).call(this,o,a,n)){if(!h.call(t,o.getMinutes(),U(u,this).minute.values))H(p,this,y).call(this,o,a,n);else if(!h.call(t,o.getSeconds(),U(u,this).second.values))H(p,this,v).call(this,o,a,n);else if(c===o.getTime())o.applyDateOperation(a,r.TimeUnit.Second,U(u,this).hour.values.length);else break}if(l>=i)throw Error(e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return W(s,this,o),o}e.CronExpression=m,e.default=m})),Zt=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.seededRandom=r;function t(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return()=>t>>>0}function n(e){return()=>{let t=e+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function r(e){return n(e?t(e)():Math.floor(Math.random()*1e10))}})),Qt=n((e=>{jt();var t;Object.defineProperty(e,"__esModule",{value:!0}),e.CronExpressionParser=e.DayOfWeek=e.Months=e.CronUnit=e.PredefinedExpressions=void 0;var n=Yt(),r=Xt(),i=Zt(),a=Jt(),o;(function(e){e[`@yearly`]=`0 0 0 1 1 *`,e[`@annually`]=`0 0 0 1 1 *`,e[`@monthly`]=`0 0 0 1 * *`,e[`@weekly`]=`0 0 0 * * 0`,e[`@daily`]=`0 0 0 * * *`,e[`@hourly`]=`0 0 * * * *`,e[`@minutely`]=`0 * * * * *`,e[`@secondly`]=`* * * * * *`,e[`@weekdays`]=`0 0 0 * * 1-5`,e[`@weekends`]=`0 0 0 * * 0,6`})(o||(e.PredefinedExpressions=o={}));var s;(function(e){e.Second=`Second`,e.Minute=`Minute`,e.Hour=`Hour`,e.DayOfMonth=`DayOfMonth`,e.Month=`Month`,e.DayOfWeek=`DayOfWeek`})(s||(e.CronUnit=s={}));var c;(function(e){e[e.jan=1]=`jan`,e[e.feb=2]=`feb`,e[e.mar=3]=`mar`,e[e.apr=4]=`apr`,e[e.may=5]=`may`,e[e.jun=6]=`jun`,e[e.jul=7]=`jul`,e[e.aug=8]=`aug`,e[e.sep=9]=`sep`,e[e.oct=10]=`oct`,e[e.nov=11]=`nov`,e[e.dec=12]=`dec`})(c||(e.Months=c={}));var l;(function(e){e[e.sun=0]=`sun`,e[e.mon=1]=`mon`,e[e.tue=2]=`tue`,e[e.wed=3]=`wed`,e[e.thu=4]=`thu`,e[e.fri=5]=`fri`,e[e.sat=6]=`sat`})(l||(e.DayOfWeek=l={}));var u=256,d=1024,f=class e{static parse(t,c={}){let{strict:l=!1,hashSeed:u}=c,d=(0,i.seededRandom)(u);t=o[t]||t;let f=p.call(e,t,l);if(f.dayOfMonth!==`*`&&f.dayOfWeek!==`*`&&l)throw Error(`Cannot use both dayOfMonth and dayOfWeek together in strict mode!`);let h=m.call(e,s.Second,f.second,a.CronSecond.constraints,d,l),g=m.call(e,s.Minute,f.minute,a.CronMinute.constraints,d,l),_=m.call(e,s.Hour,f.hour,a.CronHour.constraints,d,l),v=m.call(e,s.Month,f.month,a.CronMonth.constraints,d,l),y=m.call(e,s.DayOfMonth,f.dayOfMonth,a.CronDayOfMonth.constraints,d,l),{dayOfWeek:b,nthDayOfWeek:ee}=ae.call(e,f.dayOfWeek),x=m.call(e,s.DayOfWeek,b,a.CronDayOfWeek.constraints,d,l),te=new n.CronFieldCollection({second:new a.CronSecond(h,{rawValue:f.second}),minute:new a.CronMinute(g,{rawValue:f.minute}),hour:new a.CronHour(_,{rawValue:f.hour}),dayOfMonth:a.CronDayOfMonth.fromMonth(v,y,{rawValue:f.dayOfMonth}),month:new a.CronMonth(v,{rawValue:f.month}),dayOfWeek:new a.CronDayOfWeek(x,{rawValue:f.dayOfWeek,nthDayOfWeek:ee})});return new r.CronExpression(te,{...c,expression:t})}};t=f;function p(e,t){if(t&&!e.length)throw Error(`Invalid cron expression`);if(e||=`0 * * * * *`,e.length>d)throw Error(`Invalid cron expression, too long, expected at most ${d} characters`);let n=e.trim().split(/\s+/);if(t&&n.length<6)throw Error(`Invalid cron expression, expected 6 fields`);if(n.length>6)throw Error(`Invalid cron expression, too many fields`);let r=[`0`,`*`,`*`,`*`,`*`,`*`];n.length<r.length&&n.unshift(...r.slice(0,r.length-n.length));let[i,a,o,s,c,l]=n;return{second:i,minute:a,hour:o,dayOfMonth:s,month:c,dayOfWeek:l}}function m(e,n,r,i,a){if((e===s.Month||e===s.DayOfWeek)&&(n=n.replace(/[a-z]{3}/gi,e=>{e=e.toLowerCase();let t=c[e]||l[e];if(t===void 0)throw Error(`Validation error, cannot resolve alias "${e}"`);return t.toString()})),!r.validChars.test(n))throw Error(`Invalid characters, got value: ${n}`);return n=H(t,this,h).call(this,n,r),n=H(t,this,g).call(this,n,r,i,e,a),H(t,this,x).call(this,e,n,r)}function h(e,t){return e.replace(/[*?]/g,t.min+`-`+t.max)}function g(e,n,r,i,a){let o=r(),s=0;return e.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(e,r,c,l)=>{if(r&&c&&l){let e=parseInt(r,10),u=parseInt(c,10),d=parseInt(l,10);if(d<=0)throw Error(`Invalid step: ${d}, must be positive`);let f=y.call(t,e,u,n,i,a);return s+=Math.ceil((f.max-f.min+1)/d),ee.call(t,i,s),b.call(t,o,f.min,f.max,d,i,a)}if(r&&c){let e=parseInt(r,10),s=parseInt(c,10),l=y.call(t,e,s,n,i,a);return String(_.call(t,o,l.min,l.max))}if(l){let e=parseInt(l,10);if(e<=0)throw Error(`Invalid step: ${e}, must be positive`);return s+=Math.ceil((n.max-n.min+1)/e),ee.call(t,i,s),b.call(t,o,n.min,n.max,e,i,a)}return String(_.call(t,o,n.min,n.max))})}function _(e,t,n){return Math.floor(e*(n-t+1))+t}function v(e){return e.charAt(0).toLowerCase()+e.slice(1)}function y(e,n,r,i,a){if(e>n)throw Error(`Invalid range: ${e}-${n}, min > max`);if(a&&(e<r.min||n>r.max))throw Error(`Invalid range: ${e}-${n}, outside the ${r.min}-${r.max} range of the ${v.call(t,i)} field`);let o=Math.max(e,r.min),s=Math.min(n,r.max);if(o>s)throw Error(`Invalid range: ${e}-${n}, no usable value in the ${v.call(t,i)} field`);return{min:o,max:s}}function b(e,n,r,i,a,o){if(o&&i>r-n+1)throw Error(`Invalid step: ${i}, wider than the ${n}-${r} range of the ${v.call(t,a)} field`);let s=Math.floor(e*i),c=[];for(let e=Math.floor(n/i)*i+s;e<=r;e+=i)e>=n&&c.push(e);return c.length===0?String(_.call(t,e,n,r)):c.join(`,`)}function ee(e,t){if(t>u)throw Error(`Constraint error, too many values in ${e} field, expected at most ${u}`)}function x(e,n,r){let i=[];function a(n,r){if(Array.isArray(n))i.push(...n);else if(oe.call(t,r,n))i.push(n);else{let t=parseInt(n.toString(),10);if(!(t>=r.min&&t<=r.max))throw Error(`Constraint error, got value ${n} expected range ${r.min}-${r.max}`);i.push(e===s.DayOfWeek?t%7:n)}}let o=n.split(`,`);for(let n of o){if(ee.call(t,e,i.length),!(n.length>0))throw Error(`Invalid list value format`);a(te.call(t,e,n,r),r)}return i}function te(e,n,r){let i=n.split(`/`);if(i.length>2)throw Error(`Invalid repeat: ${n}`);return i.length===2?(i[0].includes(`-`)||(i[0]=`${i[0]}-${r.max}`),ie.call(t,e,i[0],parseInt(i[1],10),r)):ie.call(t,e,n,1,r)}function ne(e,t,n){if(!(!isNaN(e)&&!isNaN(t)&&e>=n.min&&t<=n.max))throw Error(`Constraint error, got range ${e}-${t} expected range ${n.min}-${n.max}`);if(e>t)throw Error(`Invalid range: ${e}-${t}, min(${e}) > max(${t})`)}function S(e){if(!(!isNaN(e)&&e>0))throw Error(`Constraint error, cannot repeat at every ${e} time.`)}function re(e,t,n,r){let i=[];e===s.DayOfWeek&&n%7==0&&(n-t)%r===0&&i.push(0);for(let e=t;e<=n;e+=r)i.indexOf(e)===-1&&i.push(e);return i}function ie(e,n,r,i){let a=n.split(`-`);if(a.length<=1)return isNaN(+n)?n:+n;let[o,s]=a.map(e=>parseInt(e,10));return H(t,this,ne).call(this,o,s,i),H(t,this,S).call(this,r),H(t,this,re).call(this,e,o,s,r)}function ae(e){let t=e.split(`#`);if(t.length<=1)return{dayOfWeek:t[0]};let n=+t[t.length-1],r=e.match(/([,\-/])/);if(r!==null)throw Error(`Constraint error, invalid dayOfWeek \`#\` and \`${r==null?void 0:r[0]}\` special characters are incompatible`);if(!(t.length<=2&&!isNaN(n)&&n>=1&&n<=5))throw Error(`Constraint error, invalid dayOfWeek occurrence number (#)`);return{dayOfWeek:t[0],nthDayOfWeek:n}}function oe(e,t){return e.chars.some(e=>t.toString().includes(e))}e.CronExpressionParser=f})),$t=n((e=>{var t;Object.defineProperty(e,"__esModule",{value:!0}),e.CronFileParser=void 0;var n=Qt(),r=class e{static async parseFile(t){let{readFile:n}=ae(),r=await n(t,`utf8`);return i.call(e,r)}static parseFileSync(t){let{readFileSync:n}=ae(),r=n(t,`utf8`);return i.call(e,r)}};t=r;function i(e){let n=e.split(`
2
+ `),r={variables:{},expressions:[],errors:{}};for(let e of n){let n=e.trim();if(n.length===0||n.startsWith(`#`))continue;let i=n.match(/^(.*)=(.*)$/);if(i){let[,e,t]=i;r.variables[e]=t.replace(/["']/g,``)}else try{let e=a.call(t,n);r.expressions.push(e.interval)}catch(e){r.errors[n]=e}}return r}function a(e){let t=e.split(/\s+/);return{interval:n.CronExpressionParser.parse(t.slice(0,5).join(` `)),command:t.slice(5,t.length)}}e.CronFileParser=r})),en=n(((e,t,n)=>{var r=n&&n.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),i=n&&n.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&r(t,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.CronFileParser=e.CronExpressionParser=e.CronExpression=e.CronFieldCollection=e.CronDate=void 0;var a=Qt(),o=Vt();Object.defineProperty(e,"CronDate",{enumerable:!0,get:function(){return o.CronDate}});var s=Yt();Object.defineProperty(e,"CronFieldCollection",{enumerable:!0,get:function(){return s.CronFieldCollection}});var c=Xt();Object.defineProperty(e,"CronExpression",{enumerable:!0,get:function(){return c.CronExpression}});var l=Qt();Object.defineProperty(e,"CronExpressionParser",{enumerable:!0,get:function(){return l.CronExpressionParser}});var u=$t();Object.defineProperty(e,"CronFileParser",{enumerable:!0,get:function(){return u.CronFileParser}}),i(Jt(),e),e.default=a.CronExpressionParser})),tn=n(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(Ce()):typeof define==`function`&&define.amd?define(`locales/en`,[`cronstrue`],r):typeof e==`object`?e["locales/en"]=r(Ce()):n[`locales/en`]=r(n.cronstrue)})(globalThis,e=>(()=>{var t={93(t){t.exports=e}},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};r.r(i);var a=r(93),o=r.n(a),s=i;Object.defineProperty(s,"__esModule",{value:!0}),s.en=void 0;var c=function(e){return Number(e)===1},l=function(){function e(){}return e.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},e.prototype.atX0MinutesPastTheHourGt20=function(){return null},e.prototype.commaMonthX0ThroughMonthX1=function(){return null},e.prototype.commaYearX0ThroughYearX1=function(){return null},e.prototype.use24HourTimeFormatByDefault=function(){return!1},e.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return`An error occurred when generating the expression description. Check the cron expression syntax.`},e.prototype.everyMinute=function(){return`every minute`},e.prototype.everyHour=function(){return`every hour`},e.prototype.atSpace=function(){return`At `},e.prototype.everyMinuteBetweenX0AndX1=function(){return`Every minute between %s and %s`},e.prototype.at=function(){return`At`},e.prototype.spaceAnd=function(){return` and`},e.prototype.everySecond=function(){return`every second`},e.prototype.everyX0Seconds=function(e){return c(e)?`every %s second`:`every %s seconds`},e.prototype.secondsX0ThroughX1PastTheMinute=function(){return`seconds %s through %s past the minute`},e.prototype.atX0SecondsPastTheMinute=function(e){return c(e)?`at %s second past the minute`:`at %s seconds past the minute`},e.prototype.everyX0Minutes=function(e){return c(e)?`every %s minute`:`every %s minutes`},e.prototype.minutesX0ThroughX1PastTheHour=function(){return`minutes %s through %s past the hour`},e.prototype.atX0MinutesPastTheHour=function(e){return c(e)?`at %s minute past the hour`:`at %s minutes past the hour`},e.prototype.everyX0Hours=function(e){return c(e)?`every %s hour`:`every %s hours`},e.prototype.betweenX0AndX1=function(){return`between %s and %s`},e.prototype.atX0=function(){return`at %s`},e.prototype.commaEveryDay=function(){return`, every day`},e.prototype.commaEveryX0DaysOfTheWeek=function(){return`, every %s days of the week`},e.prototype.commaX0ThroughX1=function(){return`, %s through %s`},e.prototype.commaAndX0ThroughX1=function(){return`, %s through %s`},e.prototype.first=function(){return`first`},e.prototype.second=function(){return`second`},e.prototype.third=function(){return`third`},e.prototype.fourth=function(){return`fourth`},e.prototype.fifth=function(){return`fifth`},e.prototype.commaOnThe=function(){return`, on the `},e.prototype.spaceX0OfTheMonth=function(){return` %s of the month`},e.prototype.lastDay=function(){return`the last day`},e.prototype.commaOnTheLastX0OfTheMonth=function(){return`, on the last %s of the month`},e.prototype.commaOnlyOnX0=function(){return`, only on %s`},e.prototype.commaAndOnX0=function(){return`, and on %s`},e.prototype.commaEveryX0Months=function(){return`, every %s months`},e.prototype.commaOnlyInX0=function(){return`, only in %s`},e.prototype.commaOnTheLastDayOfTheMonth=function(){return`, on the last day of the month`},e.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return`, on the last weekday of the month`},e.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(e){return c(e)?`, %s day before the last day of the month`:`, %s days before the last day of the month`},e.prototype.firstWeekday=function(){return`first weekday`},e.prototype.weekdayNearestDayX0=function(){return`weekday nearest day %s`},e.prototype.commaOnTheX0OfTheMonth=function(){return`, on the %s of the month`},e.prototype.commaDaysBeforeTheX0OfTheMonth=function(e){return c(e)?`, %s day before the %s of the month`:`, %s days before the %s of the month`},e.prototype.commaDaysAfterTheX0OfTheMonth=function(e){return c(e)?`, %s day after the %s of the month`:`, %s days after the %s of the month`},e.prototype.commaEveryX0Days=function(){return`, every %s days in a month`},e.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return`, between day %s and %s of the month`},e.prototype.commaOnDayX0OfTheMonth=function(){return`, on day %s of the month`},e.prototype.commaEveryHour=function(){return`, every hour`},e.prototype.commaEveryX0Years=function(e){return c(e)?`, every %s year`:`, every %s years`},e.prototype.commaStartingX0=function(){return`, starting %s`},e.prototype.daysOfTheWeek=function(){return[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},e.prototype.monthsOfTheYear=function(){return[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},e.prototype.atReboot=function(){return`Run once, at startup`},e.prototype.onTheHour=function(){return`on the hour`},e}();return s.en=l,o().locales.en=new l,i})())})),nn=n(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(Ce()):typeof define==`function`&&define.amd?define(`locales/nl`,[`cronstrue`],r):typeof e==`object`?e["locales/nl"]=r(Ce()):n[`locales/nl`]=r(n.cronstrue)})(globalThis,e=>(()=>{var t={93(t){t.exports=e}},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};r.r(i);var a=r(93),o=r.n(a),s=i;Object.defineProperty(s,"__esModule",{value:!0}),s.nl=void 0;var c=function(){function e(){}return e.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},e.prototype.atX0MinutesPastTheHourGt20=function(){return null},e.prototype.commaMonthX0ThroughMonthX1=function(){return null},e.prototype.commaYearX0ThroughYearX1=function(){return null},e.prototype.use24HourTimeFormatByDefault=function(){return!0},e.prototype.everyMinute=function(){return`elke minuut`},e.prototype.everyHour=function(){return`elk uur`},e.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return`Er is een fout opgetreden bij het vertalen van de gegevens. Controleer de gegevens.`},e.prototype.atSpace=function(){return`Om `},e.prototype.everyMinuteBetweenX0AndX1=function(){return`Elke minuut tussen %s en %s`},e.prototype.at=function(){return`Om`},e.prototype.spaceAnd=function(){return` en`},e.prototype.everySecond=function(){return`elke seconde`},e.prototype.everyX0Seconds=function(){return`elke %s seconden`},e.prototype.secondsX0ThroughX1PastTheMinute=function(){return`seconden %s t/m %s na de minuut`},e.prototype.atX0SecondsPastTheMinute=function(){return`op %s seconden na de minuut`},e.prototype.everyX0Minutes=function(){return`elke %s minuten`},e.prototype.minutesX0ThroughX1PastTheHour=function(){return`minuut %s t/m %s na het uur`},e.prototype.atX0MinutesPastTheHour=function(){return`op %s minuten na het uur`},e.prototype.everyX0Hours=function(){return`elke %s uur`},e.prototype.betweenX0AndX1=function(){return`tussen %s en %s`},e.prototype.atX0=function(){return`om %s`},e.prototype.commaEveryDay=function(){return`, elke dag`},e.prototype.commaEveryX0DaysOfTheWeek=function(){return`, elke %s dagen van de week`},e.prototype.commaX0ThroughX1=function(){return`, %s t/m %s`},e.prototype.commaAndX0ThroughX1=function(){return`, en %s t/m %s`},e.prototype.first=function(){return`eerste`},e.prototype.second=function(){return`tweede`},e.prototype.third=function(){return`derde`},e.prototype.fourth=function(){return`vierde`},e.prototype.fifth=function(){return`vijfde`},e.prototype.commaOnThe=function(){return`, op de `},e.prototype.spaceX0OfTheMonth=function(){return` %s van de maand`},e.prototype.lastDay=function(){return`de laatste dag`},e.prototype.commaOnTheLastX0OfTheMonth=function(){return`, op de laatste %s van de maand`},e.prototype.commaOnlyOnX0=function(){return`, alleen op %s`},e.prototype.commaAndOnX0=function(){return`, en op %s`},e.prototype.commaEveryX0Months=function(){return`, elke %s maanden`},e.prototype.commaOnlyInX0=function(){return`, alleen in %s`},e.prototype.commaOnTheLastDayOfTheMonth=function(){return`, op de laatste dag van de maand`},e.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return`, op de laatste werkdag van de maand`},e.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return`, %s dagen vóór de laatste dag van de maand`},e.prototype.firstWeekday=function(){return`eerste werkdag`},e.prototype.weekdayNearestDayX0=function(){return`werkdag dichtst bij dag %s`},e.prototype.commaOnTheX0OfTheMonth=function(){return`, op de %s van de maand`},e.prototype.commaEveryX0Days=function(){return`, elke %s dagen`},e.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return`, tussen dag %s en %s van de maand`},e.prototype.commaOnDayX0OfTheMonth=function(){return`, op dag %s van de maand`},e.prototype.commaEveryX0Years=function(){return`, elke %s jaren`},e.prototype.commaStartingX0=function(){return`, beginnend %s`},e.prototype.daysOfTheWeek=function(){return[`zondag`,`maandag`,`dinsdag`,`woensdag`,`donderdag`,`vrijdag`,`zaterdag`]},e.prototype.monthsOfTheYear=function(){return[`januari`,`februari`,`maart`,`april`,`mei`,`juni`,`juli`,`augustus`,`september`,`oktober`,`november`,`december`]},e.prototype.atReboot=function(){return`Eén keer uitvoeren, bij het opstarten`},e.prototype.onTheHour=function(){return`op het hele uur`},e}();return s.nl=c,o().locales.nl=new c,i})())})),rn=e(Ce(),1);o(),et(),_e(),se(),te(),m(),he(),pe(),de();var an=en();tn(),nn();var G={nowrap:{flexFlow:`nowrap`,overflow:`hidden`},width:{width:`100%`,overflow:`hidden`},tooltip:{pointerEvents:`none`,"& .MuiTooltip-tooltip":{whiteSpace:`pre-line`}}},K=e=>T(v,{container:!0,title:e.icon?``:e.tooltip||``,direction:`row`,spacing:1,style:G.nowrap,sx:{alignItems:`center`},children:[e.icon&&w(v,{style:{minWidth:24},children:w(O,{title:e.tooltip||``,slotProps:{popper:{sx:G.tooltip}},children:e.icon})}),w(v,{style:G.width,children:w(O,{title:e.tooltip||``,slotProps:{popper:{sx:G.tooltip}},children:w(Fe,{component:`div`,style:e.style,children:e.children})})})]}),on=`data:image/svg+xml,%3csvg%20width='256'%20height='230'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M251.22%20187.856c5.785%2010.045%206.345%2020.608%201.538%2028.958-4.8%208.357-14.192%2013.143-25.768%2013.143h-21.816c.259-4.068.431-8.17.431-12.302%200-4.628-.215-9.198-.531-13.754l14.35-.014c3.528%200%206.38-2.867%206.38-6.403a6.46%206.46%200%200%200-.768-3.053l-91.46-158.97a6.349%206.349%200%200%200-5.54-3.24%206.374%206.374%200%200%200-5.461%203.09l-14.522%2025.243c44.134%2033.27%2073.804%2084.813%2077.864%20143.333.316%204.548.531%209.119.531%2013.753%200%204.132-.172%208.228-.424%2012.302h-71.246c.388-4.053.611-8.148.611-12.302%200-4.649-.273-9.233-.776-13.753-3.52-32.206-19.286-60.748-42.503-80.89l-10.003%2017.376c17.54%2016.325%2029.512%2038.558%2032.767%2063.514.59%204.505.92%209.09.92%2013.753%200%204.154-.273%208.264-.74%2012.302H29.01c-11.576%200-20.968-4.793-25.768-13.15-4.807-8.35-4.247-18.905%201.538-28.958l13.56-23.238a79.42%2079.42%200%200%201%2020.715%2016.052l-8.083%2013.768a6.523%206.523%200%200%200-.77%203.054%206.383%206.383%200%200%200%206.382%206.395l32.033.015c-2.687-15.356-9.772-29.21-19.918-40.183-5.979-6.445-12.963-11.9-20.738-16.074l35.77-62.15a151.427%20151.427%200%200%201%2021.564%2014.624c30.827%2025.013%2051.644%2061.955%2055.416%20103.776h19.172c-3.91-48.892-28.477-92.006-64.937-120.548a171.205%20171.205%200%200%200-21.672-14.457l30.532-53.045C109.583%205.77%20118.42%200%20128.036%200c9.607%200%2018.438%205.77%2024.223%2015.823l98.961%20172.033z'%20fill='%23FB2D26'/%3e%3cline%20stroke-width='33'%20y2='223'%20x2='250.40002'%20y1='8'%20x1='6.40002'%20stroke='%23FB2D26'%20fill='none'/%3e%3cline%20stroke-width='32'%20y2='224'%20x2='8.40002'%20y1='7'%20x1='247.40002'%20stroke='%23FB2D26'%20fill='none'/%3e%3c/svg%3e`,sn={img:{width:`100%`,height:`100%`}},cn=class extends Ve{render(){if(!this.props.links||!this.props.links.length)return null;let e=this.props.links[0].port,t=this.props.links.find(t=>t.port!==e);return T(Le,{onClose:()=>this.props.onClose(),open:!0,children:[w(h,{style:{padding:`8px 0 0 0`,textAlign:`center`},children:this.props.t(`Links`)}),w(r,{children:this.props.links.map(e=>T(He,{disabled:e.unreachable,title:e.unreachable?this.props.t(`Only reachable in the local network`):void 0,style:e.color&&!e.unreachable?{backgroundColor:e.color,color:y.getInvertedColor(e.color,this.props.themeType,!0)}:{},onClick:t=>{if(t.stopPropagation(),e.unreachable)return;let n=e.link;n=n.replace(/\/\/([0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*)(:\d+)?\//i,`//[$1]$2/`),window.open(n,this.props.instanceId),this.props.onClose()},children:[w(Je,{children:w(Pe,{variant:`rounded`,children:w(`img`,{style:sn.img,src:this.props.image,alt:this.props.instanceId})})}),w(Ie,{primary:I.getText(e.name,C.getLanguage())+(t?` [:${e.port}]`:``)})]},I.getText(e.name,C.getLanguage())))})]})}};u();function ln(e,t){let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Object.prototype.hasOwnProperty.call(t,n)&&e[n]===t[n])}var un=[`silly`,`debug`,`info`,`warn`,`error`],dn=[{value:1,desc:`1: Logic adapters`},{value:2,desc:`2: Data provider adapters`},{value:3,desc:`3: Other adapters`}],fn=`0 2px 2px 0 rgba(0, 0, 0, .14),0 3px 1px -2px rgba(0, 0, 0, .12),0 1px 5px 0 rgba(0, 0, 0, .2)`,pn=`0 8px 17px 0 rgba(0, 0, 0, .2),0 6px 20px 0 rgba(0, 0, 0, .19)`,mn={root:e=>({position:`relative`,m:`10px`,width:300,minHeight:200,background:e.palette.background.default,boxShadow:fn,display:`flex`,flexDirection:`column`,transition:`box-shadow 0.5s`,"&:hover":{boxShadow:pn}}),imageBlock:{background:`silver`,minHeight:60,display:`flex`,padding:`0 10px 0 10px`,position:`relative`,justifyContent:`space-between`,transition:`background 0.5s`},logLevel:{width:`100%`,marginBottom:5},hostInfo:{width:`100%`},addCompact:{width:`100%`,marginBottom:5},selectStyle:{display:`flex`,margin:5,justifyContent:`space-around`},hide:{visibility:`hidden`},tooltip:{pointerEvents:`none`},deleting:{position:`relative`,"&:before":{content:`""`,position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,zIndex:100,opacity:`.3 !important`,background:`repeating-linear-gradient(135deg, #333, #333 10px, #888 10px, #888 20px)`}},enabled:{color:ye[400],"&:hover":{backgroundColor:ye[200]}},disabled:{color:c[400],"&:hover":{backgroundColor:c[200]}},sentry:{width:24,height:24,objectFit:`fill`,filter:`invert(0%) sepia(90%) saturate(1267%) hue-rotate(-260deg) brightness(99%) contrast(97%)`},displayFlex:{display:`flex`},marginLeft5:{marginLeft:5},marginRight5:{marginRight:5},instanceStateNotEnabled1:{backgroundColor:`rgba(192, 192, 192, 0.2)`},instanceStateNotEnabled2:{backgroundColor:`rgba(192, 192, 192, 0.15)`},instanceStateNotAlive1:{backgroundColor:`rgba(255,14,14,0.2)`},instanceStateNotAlive2:{backgroundColor:`rgba(255,14,14, 0.15)`},instanceStateAliveNotConnected1:{backgroundColor:`rgba(255, 177, 0, 0.1)`},instanceStateAliveNotConnected2:{backgroundColor:`rgba(255, 177, 0, 0.15)`},instanceStateAliveAndConnected1:{backgroundColor:`rgba(0, 255, 0, 0.1)`},instanceStateAliveAndConnected2:{backgroundColor:`rgba(0, 255, 0, 0.15)`},instanceStateAliveAndConnectedWebExtension1:{backgroundColor:`rgba(0, 255, 0, 0.25)`},instanceStateAliveAndConnectedWebExtension2:{backgroundColor:`rgba(0, 255, 0, 0.3)`},statusIcon_green:{border:`2px solid grey`,borderRadius:2},statusIcon_red:{border:`2px solid grey`,borderRadius:20},statusIcon_orange:{border:0,borderRadius:0},statusIcon_orangeDevice:{border:0,borderRadius:0},statusIcon_blue:{border:`2px solid grey`,borderRadius:20},statusIcon_grey:{border:`2px solid grey`,borderRadius:20},statusIcon_missing:{border:0,borderRadius:0},orangeDevice:{color:S[300]},button:{padding:`5px`,transition:`opacity 0.2s`,height:34},hiddenOpacity:{opacity:0,cursor:`default`},smallAvatar:{width:24,height:24},statusIndicator:{marginLeft:8},green:{color:ye[700]},red:{color:c[700]},grey:{color:g[700]},blue:{color:`#0055a9`},orange:{color:S[400]},transparent:{color:`transparent`,backgroundColor:`transparent`},silly:{},debug:{backgroundColor:g[700]},info:{backgroundColor:tt[700]},warn:{backgroundColor:ue[700]},error:{backgroundColor:c[700]},scheduleIcon:{color:`#dc8e00`},memoryIcon:{color:`#dc8e00`},contrast0:{filter:`contrast(0%)`},hidden:{display:`none`},okSymbol:{width:20,height:20,margin:2,borderRadius:2},okSymbolInner:{width:`calc(100% - 2px)`,height:`calc(100% - 2px)`,borderRadius:2,margin:1,backgroundColor:`#66bb6a`},editButton:{minHeight:32,"& .admin-edit-button":I.isTouchDevice()?void 0:{display:`none`,maxHeight:32},"&:hover":I.isTouchDevice()?void 0:{"& .admin-edit-button":{display:`block`}}}},hn=class e extends Ve{constructor(...e){super(...e),p(this,`commandClose`,()=>this.setState({expanded:!1}))}componentDidMount(){this.props.context.onRegisterClose(this.props.id,this.commandClose)}componentWillUnmount(){this.props.context.onRegisterClose(this.props.id,null)}shouldComponentUpdate(t,n){if(!ln(this.state,n))return!0;let{item:r,context:i,...a}=this.props,{item:o,context:s,...c}=t;return!ln(a,c)||!ln(i,s)||!e.sameItem(r,o)}static sameItem(e,t){let n=Object.keys(t);return n.length===Object.keys(e).length&&n.every(n=>e[n]===t[n]||n===`loglevelIcon`?!0:n===`inputOutput`?e.inputOutput.stateInput===t.inputOutput.stateInput&&e.inputOutput.stateOutput===t.inputOutput.stateOutput:n===`usedResources`&&e.usedResources.length===t.usedResources.length&&e.usedResources.every((e,n)=>e===t.usedResources[n]))}getDefaultState(e){return{openDialog:!1,openSelectCompactGroup:!1,openDialogCron:!1,openDialogSchedule:!1,openDialogName:!1,openDialogLogLevel:!1,openDialogDelete:!1,openDialogMemoryLimit:!1,openDialogHost:!1,openDialogCompact:!1,openDialogTier:!1,showLinks:!1,showStopAdminDialog:!1,logLevel:e.item.logLevel,logOnTheFly:!1,compactGroup:e.item.compactGroup||0,maxCompactGroupNumber:e.context.maxCompactGroupNumber,tier:e.item.tier,host:e.instance.host,deleteCustom:!1,visibleEdit:!1,expanded:!1}}static isCompact(e){var t;return(e==null||(t=e.common)==null?void 0:t.runAsCompactMode)||!1}isSentry(){var e;return!!((e=this.props.context.states[`system.adapter.${this.props.instance.id}.plugins.sentry.enabled`])!=null&&e.val)}static getSchedule(e){var t;return(e==null||(t=e.common)==null?void 0:t.schedule)||``}static isRunning(e){var t,n;return(e==null||(t=e.common)==null?void 0:t.onlyWWW)||(e==null||(n=e.common)==null?void 0:n.enabled)}static isCompactGroup(e){var t;return(e==null||(t=e.common)==null?void 0:t.compactGroup)||null}static getSentrySettings(e){var t;return!!(e!=null&&(t=e.common)!=null&&(t=t.plugins)!=null&&t.sentry)}static isModeSchedule(e){var t;return(e==null||(t=e.common)==null?void 0:t.mode)===`schedule`}static getMemoryLimitMB(e){var t;return(e==null||(t=e.common)==null?void 0:t.memoryLimitMB)||0}static getRestartSchedule(e){var t;return e!=null&&(t=e.common)!=null&&t.restartSchedule?e.common.restartSchedule:``}async setCommonValue(e,t){try{await this.props.context.socket.extendObject(e,{common:t})}catch(e){window.alert(e)}}toggleSentry(){let e=!this.isSentry();this.props.context.socket.setState(`system.adapter.${this.props.instance.id}.plugins.sentry.enabled`,e,!0).catch(e=>window.alert(`Cannot set sentry: ${e}`))}setTier(e,t){this.setCommonValue(`system.adapter.${e.id}`,{tier:t})}setName(e,t){this.setCommonValue(`system.adapter.${e.id}`,{titleLang:t})}setLogLevel(e,t,n){n?this.props.context.socket.setState(`system.adapter.${e.id}.logLevel`,t):this.setCommonValue(`system.adapter.${e.id}`,{loglevel:t})}setSchedule(e,t){t?this.setCommonValue(`system.adapter.${e.id}`,{schedule:t}):this.props.context.socket.getObject(`system.adapter.${e.id}`).then(e=>{e&&e.common.schedule!==``&&(e.common.schedule=``,this.props.context.socket.setObject(e._id,e).catch(e=>window.alert(`Cannot set schedule: ${e}`)))}).catch(e=>window.alert(`Cannot set schedule: ${e}`))}setMemoryLimitMB(e,t){this.setCommonValue(`system.adapter.${e.id}`,{memoryLimitMB:t})}toggleCompactMode(){this.setCommonValue(`system.adapter.${this.props.instance.id}`,{runAsCompactMode:!e.isCompact(this.props.instance.obj)})}setRestartSchedule(e,t){t?this.setCommonValue(`system.adapter.${e.id}`,{restartSchedule:t}):this.props.context.socket.getObject(`system.adapter.${e.id}`).then(e=>{e&&e.common.restartSchedule!==``&&(e.common.restartSchedule=``,this.props.context.socket.setObject(e._id,e))})}setHost(e,t){this.setCommonValue(`system.adapter.${e.id}`,{host:t})}setCompactGroup(e,t){t=t===`controller`?0:t==="default"?1:parseInt(t,10),this.setCommonValue(`system.adapter.${e.id}`,{compactGroup:t}),this.props.context.maxCompactGroupNumber<t&&this.props.context.setMaxCompactGroupNumber(t)}getMemory(){return this.props.item.memRss}renderDeleteDialog(){return T(Le,{onClose:()=>this.setState({openDialogDelete:!1,openDialog:!1}),open:!0,children:[w(h,{children:this.props.context.t(`Please confirm`)}),T(me,{children:[this.state.openDialogDelete===1?this.props.context.t(`Are you sure you want to delete the instance "%s" or whole adapter "%s"?`,this.props.instance.id,this.props.instance.id.split(`.`)[0]):this.props.context.t(`Are you sure you want to delete the instance %s?`,this.props.instance.id),this.props.context.deleteCustomSupported&&this.props.instance.obj.common.supportCustoms&&w(`br`,{}),this.props.context.deleteCustomSupported&&this.props.instance.obj.common.supportCustoms&&w(b,{control:w(f,{checked:this.state.deleteCustom,onChange:e=>this.setState({deleteCustom:e.target.checked})}),label:this.props.context.t(`Delete all custom object settings of this adapter too`)})]}),T(fe,{children:[this.state.openDialogDelete===1?w(je,{startIcon:w(Se,{}),onClick:()=>{this.props.context.onDeleteInstance(this.props.instance,this.state.deleteCustom,!0),this.setState({deleteCustom:!1,openDialogDelete:!1,openDialog:!1})},variant:`contained`,style:{background:`red`,color:`white`},children:this.props.context.t(`Delete adapter`)}):null,w(je,{startIcon:w(Se,{}),onClick:()=>{this.props.context.onDeleteInstance(this.props.instance,this.state.deleteCustom),this.setState({deleteCustom:!1,openDialogDelete:!1,openDialog:!1})},variant:`contained`,color:`primary`,children:this.props.context.t(`Delete instance`)}),w(je,{color:`grey`,onClick:()=>this.setState({openDialogDelete:!1,openDialog:!1}),variant:`contained`,startIcon:w(We,{}),children:this.props.context.t(`Cancel`)})]})]})}renderEditNameDialog(){return w(Ct,{theme:this.props.context.theme,title:this.props.context.t(`Enter title for %s`,this.props.instance.id),disableApplyIfNotChanged:!0,textInput:!0,defaultValue:I.getText(this.props.item.name,this.props.context.lang),onApply:e=>{this.setName(this.props.instance,e.toString()),this.setState({openDialogName:!1,openDialog:!1})},onClose:()=>this.setState({openDialogName:!1,openDialog:!1})})}renderEditLogLevelDialog(){return T(Ct,{theme:this.props.context.theme,title:this.props.context.t(`Edit log level rule for %s`,this.props.instance.id),onApply:()=>{this.setLogLevel(this.props.instance,this.state.logLevel,this.state.logOnTheFly),this.setState({openDialogLogLevel:!1,openDialog:!1})},disableApply:this.state.logLevel===this.props.item.logLevel,onClose:()=>this.setState({openDialogLogLevel:!1,logLevel:this.props.item.logLevel,openDialog:!1}),children:[T(Te,{style:this.styles.logLevel,variant:`standard`,children:[w(De,{children:this.props.context.t(`log level`)}),w(k,{variant:`standard`,value:this.state.logLevel,fullWidth:!0,onChange:e=>this.setState({logLevel:e.target.value}),children:un.map(e=>w(j,{value:e,children:this.props.context.t(e)},e))})]}),T(Te,{variant:`outlined`,children:[w(b,{control:w(f,{checked:this.state.logOnTheFly,onChange:e=>this.setState({logOnTheFly:e.target.checked})}),label:this.props.context.t(`Without restart`)}),w(Ee,{children:this.state.logOnTheFly?this.props.context.t(`Will be reset to the saved log level after restart of adapter`):this.props.context.t(`Log level will be saved permanently`)})]})]})}renderEditMemoryLimitDialog(){return w(Ct,{theme:this.props.context.theme,title:this.props.context.t(`Edit memory limit rule for %s`,this.props.instance.id),onApply:e=>{this.setMemoryLimitMB(this.props.instance,parseFloat(e.toString())||0),this.setState({openDialogMemoryLimit:!1,openDialog:!1})},disableApplyIfNotChanged:!0,textInput:!0,defaultValue:this.props.item.memoryLimitMB,help:this.props.context.t(`Default V8 has a memory limit of 512mb on 32-bit systems, and 1gb on 64-bit systems. The limit can be raised by setting --max-old-space-size to a maximum of ~1gb (32-bit) and ~1.7gb (64-bit)`),onClose:()=>this.setState({openDialogMemoryLimit:!1,openDialog:!1})})}renderEditHostDialog(){return w(Ct,{theme:this.props.context.theme,title:this.props.context.t(`Edit host for %s`,this.props.instance.id),onApply:()=>{this.setHost(this.props.instance,this.state.host),this.setState({openDialogHost:!1,openDialog:!1})},disableApply:this.state.host===this.props.instance.host,onClose:()=>this.setState({openDialogHost:!1,host:this.props.instance.host,openDialog:!1}),children:w(ge,{themeType:this.props.context.themeType,value:this.state.host,list:this.props.context.hosts,removePrefix:`system.host.`,fullWidth:!0,style:this.styles.hostInfo,onChange:e=>this.setState({host:e}),lang:this.props.context.lang,t:this.props.context.t})})}renderEditCompactGroupDialog(){return w(Ct,{theme:this.props.context.theme,title:this.props.context.t(`Edit compact groups for %s`,this.props.instance.id),onApply:()=>{this.setCompactGroup(this.props.instance,parseInt(this.state.compactGroup.toString(),10)||0),this.setState({openDialogCompact:!1,openDialog:!1})},disableApply:this.state.compactGroup===this.props.item.compactGroup,onClose:()=>this.setState({openDialogCompact:!1,openDialog:!1,compactGroup:this.props.item.compactGroup||0,maxCompactGroupNumber:this.props.context.maxCompactGroupNumber}),children:T(Te,{style:this.styles.addCompact,variant:`standard`,children:[w(De,{children:this.props.context.t(`compact groups`)}),T(k,{variant:`standard`,autoWidth:!0,onClose:()=>this.setState({openSelectCompactGroup:!1}),onOpen:()=>this.setState({openSelectCompactGroup:!0}),open:this.state.openSelectCompactGroup,value:(this.state.compactGroup===1?`default`:(this.state.compactGroup||``).toString()===`0`?`controller`:this.state.compactGroup?this.state.compactGroup:`default`)||`default`,onChange:e=>this.setState({compactGroup:parseInt(e.target.value,10)}),children:[w(`div`,{onClick:e=>{e.preventDefault(),e.stopPropagation()},style:this.styles.selectStyle,children:w(je,{color:`grey`,onClick:()=>this.setState({openSelectCompactGroup:!1,compactGroup:this.state.maxCompactGroupNumber+1,maxCompactGroupNumber:this.state.maxCompactGroupNumber+1}),variant:`outlined`,children:this.props.context.t(`Add compact group`)})}),w(j,{value:`controller`,children:this.props.context.t(`with js-controller`)}),w(j,{value:`default`,children:this.props.context.t(`default group`)}),Array(this.state.maxCompactGroupNumber-1).fill(0).map((e,t)=>w(j,{value:(t+2).toString(),children:t+2},t))]})]})})}renderEditTierDialog(){return w(Ct,{theme:this.props.context.theme,title:this.props.context.t(`Set tier for %s`,this.props.instance.id),onApply:()=>{this.setTier(this.props.instance,this.state.tier),this.setState({openDialogTier:!1,openDialog:!1})},help:this.props.context.t(`Tiers define the order of adapters when the system starts.`),disableApply:this.state.tier===this.props.item.tier,onClose:()=>this.setState({openDialogTier:!1,tier:this.props.item.tier,openDialog:!1}),children:T(Te,{style:this.styles.logLevel,variant:`standard`,children:[w(De,{children:this.props.context.t(`Tiers`)}),w(k,{variant:`standard`,value:this.state.tier,fullWidth:!0,onChange:e=>this.setState({tier:Number(e.target.value)}),children:dn.map(e=>w(j,{value:e.value,children:this.props.context.t(e.desc)},e.value))})]})})}renderStopAdminDialog(){return this.state.showStopAdminDialog?w(Ke,{title:this.props.context.t(`Please confirm`),text:this.props.context.t(`stop_admin`,this.props.context.adminInstance),ok:this.props.context.t(`Stop admin`),onClose:e=>{e&&this.setCommonValue(this.state.showStopAdminDialog,{enabled:!1}),this.setState({showStopAdminDialog:!1,openDialog:!1})}}):null}renderLinksDialog(){return this.state.showLinks?w(cn,{image:this.props.instance.image,instanceId:this.props.instance.id,links:this.props.instance.links,onClose:()=>this.setState({showLinks:!1,openDialog:!1}),t:this.props.context.t,themeType:this.props.context.themeType}):null}renderCronDialog(){return w(Ue,{title:this.props.context.t(`Edit restart rule for %s`,this.props.instance.id),clearButton:!0,cron:e.getRestartSchedule(this.props.instance.obj),onOk:e=>this.setRestartSchedule(this.props.instance,e||``),onClose:()=>this.setState({openDialogCron:!1,openDialog:!1})})}renderScheduleDialog(){return w(Ue,{title:this.props.context.t(`Edit schedule rule for %s`,this.props.instance.id),clearButton:!0,cron:e.getSchedule(this.props.instance.obj),onOk:e=>this.setSchedule(this.props.instance,e||null),onClose:()=>this.setState({openDialogSchedule:!1,openDialog:!1})})}renderDialogs(){return this.state.openDialog?this.state.openDialogDelete?this.renderDeleteDialog():this.state.openDialogHost?this.renderEditHostDialog():this.state.openDialogTier?this.renderEditTierDialog():this.state.openDialogCompact?this.renderEditCompactGroupDialog():this.state.openDialogLogLevel?this.renderEditLogLevelDialog():this.state.openDialogName?this.renderEditNameDialog():this.state.showStopAdminDialog?this.renderStopAdminDialog():this.state.openDialogCron?this.renderCronDialog():this.state.openDialogSchedule?this.renderScheduleDialog():this.state.showLinks?this.renderLinksDialog():this.state.openDialogMemoryLimit?this.renderEditMemoryLimitDialog():null:null}renderModeIcon(e){return this.props.item.adapterMissing?w(`div`,{style:{...this.styles.smallAvatar,...this.styles.statusIndicator,...this.styles.red},children:w(ke,{style:this.styles.statusIcon_missing})}):w(`div`,{style:{...this.styles.smallAvatar,...this.styles.statusIndicator,...this.props.instance.mode===`daemon`||this.props.instance.mode===`schedule`?this.styles[e]:this.styles.transparent,...this.props.item.connectedToHost&&this.props.item.alive&&this.props.item.connected===!1?this.styles.orangeDevice:void 0},children:this.getModeIcon(this.props.instance.mode,e,this.styles[`statusIcon_${e}`],this.props.item.stoppedWhenWebExtension)})}getModeIcon(e,t,n,r){return e===`daemon`?r?w(`div`,{style:{...n,...this.styles.okSymbol},children:w(`div`,{style:this.styles.okSymbolInner})}):t===`orange`?w(Ge,{style:n}):t===`green`?w(`div`,{style:{...n,...this.styles.okSymbol},children:w(`div`,{style:this.styles.okSymbolInner})}):w(d,{style:n}):e===`schedule`?w(ct,{style:n}):null}renderTooltip(){let{instance:e,item:t}=this.props,n,r,i;if(e.mode===`schedule`&&e.schedule){try{i=rn.default.toString(e.schedule,{locale:this.props.context.lang})}catch{i=e.schedule}if(e.enabled)try{let t=an.CronExpressionParser.parse(e.schedule);n=t.next().toDate(),r=t.prev().toDate()}catch{n=null,r=null}}return[t.adapterMissing?w(R,{state:!1,children:this.props.context.t(`The adapter is not installed on host "%s"`,t.host)},0):null,t.stoppedWhenWebExtension===void 0?``:w(R,{state:!0,children:this.props.context.t(`Runs as web-extension`)},1),e.mode===`daemon`&&this.props.item.stoppedWhenWebExtension===void 0?w(R,{state:t.connectedToHost,children:this.props.context.t(`Connected to host`)},2):``,e.mode===`daemon`&&this.props.item.stoppedWhenWebExtension===void 0?w(R,{state:t.alive,children:this.props.context.t(`Heartbeat`)},3):``,this.props.item.connected!==null&&this.props.item.stoppedWhenWebExtension===void 0?w(R,{state:!!t.connected,children:typeof t.connected==`string`?`${this.props.context.t(`Connected:`)} ${t.connected||`-`}`:this.props.context.t(`Connected to device or service`)},4):``,i?T(R,{state:e.enabled,children:[`CRON:`,i]},5):null,n?w(R,{state:!0,children:this.props.context.t(`Next start: %s`,`${n.toLocaleDateString(this.props.context.lang)} ${n.toLocaleTimeString(this.props.context.lang)}`)},6):null,r?w(R,{state:!0,children:this.props.context.t(`Last start: %s`,`${r.toLocaleDateString(this.props.context.lang)} ${r.toLocaleTimeString(this.props.context.lang)}`)},7):null].filter(e=>e)}renderMemoryUsage(){return this.props.item.running&&w(K,{icon:w(yt,{}),tooltip:this.props.context.t(`RAM usage`),children:`${this.props.instance.mode===`daemon`&&!e.isCompact(this.props.instance.obj)?this.getMemory():`-.--`} MB`})}renderPort(){if(!this.props.item.port)return null;let e=this.props.item.usedResources.filter(e=>e.type===`tcpPort`||e.type===`udpPort`),t=e.filter(e=>e.conflicts.length);return w(K,{icon:t.length?w(Ge,{color:`warning`}):w(F,{}),tooltip:t.length?t.map(e=>Et(e,this.props.context.t)).join(`
3
+ `):this.props.context.t(`Port`),children:e.length?[...new Set(e.map(e=>String(e.data.port)))].join(`, `):this.props.item.port.toString()})}renderResourcesColumn(){let{t:e}=this.props.context,t=this.props.item.usedResources;if(!t.length)return this.renderPort();let n=t.filter(e=>e.conflicts.length),r=t[0],i=kt(r),a=t.map(t=>{let n=`${B(t.type,e)}: ${kt(t)}`;return t.conflicts.length?`${n} - ${Et(t,e)}`:n}).join(`
4
+ `);return w(K,{icon:n.length?w(Ge,{color:`warning`}):Ot(r.type),tooltip:a,style:{...n.length?{color:this.props.context.theme.palette.warning.main}:void 0,...t.every(e=>!e.isBlocked)?{opacity:.6}:void 0},children:t.length>1?`${i} +${t.length-1}`:i})}renderUsedResources(){let{t:e}=this.props.context;return this.props.item.usedResources.length?w(x,{children:this.props.item.usedResources.map(t=>{let n=kt(t),r=t.isBlocked?e(`The instance runs and holds the resource`):e(`The instance does not run and would take the resource when started`);return w(K,{icon:t.conflicts.length?w(Ge,{color:`warning`}):Ot(t.type),tooltip:t.conflicts.length?`${r}. ${Et(t,e)}`:r,style:t.isBlocked?void 0:{opacity:.6},children:`${B(t.type,e)}: ${n}`},`${t.type}|${n}`)})}):null}renderPlayPause(){return w(O,{title:this.props.context.t(`Start/stop`),slotProps:{popper:{sx:this.styles.tooltip}},children:w(`div`,{children:w(A,{size:`small`,onClick:e=>{e.stopPropagation(),e.preventDefault(),this.props.item.running&&this.props.instance.id===this.props.context.adminInstance?this.setState({showStopAdminDialog:`system.adapter.${this.props.instance.id}`,openDialog:!0}):this.setCommonValue(`system.adapter.${this.props.instance.id}`,{enabled:!this.props.item.running})},onFocus:e=>e.stopPropagation(),sx:{...this.styles.button,...this.props.instance.canStart?this.props.item.running?this.styles.enabled:this.styles.disabled:this.styles.hide},children:this.props.item.running?w(ce,{}):w(ne,{})})})})}renderSettingsButton(){return w(O,{title:this.props.instance.config?this.props.context.t(`Settings`):``,slotProps:{popper:{sx:this.styles.tooltip}},children:w(`div`,{children:w(A,{disabled:!this.props.instance.config,size:`small`,style:{...this.styles.button,...this.props.instance.config?void 0:this.styles.hiddenOpacity},onClick:e=>{e.stopPropagation(),e.preventDefault(),this.props.saveScrollPosition(),Re.doNavigate(`tab-instances`,`config`,this.props.id)},children:w(l,{})})})})}renderRestartButton(){return w(O,{title:this.props.context.t(`Restart`),slotProps:{popper:{sx:this.styles.tooltip}},children:w(`div`,{children:w(A,{size:`small`,onClick:e=>{e.stopPropagation(),e.preventDefault(),this.props.context.socket.extendObject(`system.adapter.${this.props.instance.id}`,{})},onFocus:e=>e.stopPropagation(),style:{...this.styles.button,...this.props.instance.canStart?void 0:this.styles.hide},disabled:!this.props.item.running,children:w(Ne,{})})})})}renderLink(){var e;let t=!!((e=this.props.instance.links)!=null&&e.length)&&this.props.instance.links.every(e=>e.unreachable);return w(O,{title:t?this.props.context.t(`Only reachable in the local network`):this.props.context.t(`Instance link %s`,this.props.instance.id),slotProps:{popper:{sx:this.styles.tooltip}},children:w(`div`,{children:w(A,{size:`small`,style:{...this.styles.button,...!this.props.instance.links||!this.props.instance.links[0]?this.styles.hide:void 0},disabled:!this.props.item.running||t,onClick:e=>{if(e.stopPropagation(),e.preventDefault(),this.props.instance.links.length===1){let e=this.props.instance.links[0].link;e=e.replace(/\/\/([0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*)(:\d+)?\//i,`//$1$2/`),window.open(e,this.props.instance.id)}else this.setState({showLinks:!0,openDialog:!0})},onFocus:e=>e.stopPropagation(),children:w(it,{})})})})}renderEditNameButton(){return w(O,{title:this.props.context.t(`Edit`),slotProps:{popper:{sx:this.styles.tooltip}},children:w(A,{size:`small`,className:`admin-edit-button`,style:{...this.styles.button,...this.state.visibleEdit?void 0:this.styles.hiddenOpacity},onClick:e=>{e.stopPropagation(),e.preventDefault(),this.setState({openDialogName:!0,openDialog:!0})},children:w($e,{})})})}renderInputOutput(){return w(K,{icon:w(_t,{}),children:T(`div`,{style:this.styles.displayFlex,children:[w(O,{title:this.props.context.t(`input events`),slotProps:{popper:{sx:this.styles.tooltip}},children:T(`div`,{style:this.styles.marginRight5,children:[`⇥`,this.props.item.inputOutput.stateInput]})}),`/`,w(O,{title:this.props.context.t(`output events`),slotProps:{popper:{sx:this.styles.tooltip}},children:T(`div`,{style:this.styles.marginLeft5,children:[`↦`,this.props.item.inputOutput.stateOutput]})})]})})}renderHost(){return w(ee,{value:this.props.instance.host,list:this.props.context.hosts,removePrefix:`system.host.`,themeType:this.props.context.themeType,lang:this.props.context.lang,reserveIconSpace:!0})}renderEditHostButton(){return w(O,{title:this.props.context.t(`Edit`),slotProps:{popper:{sx:this.styles.tooltip}},children:w(A,{size:`small`,style:this.styles.button,className:`admin-edit-button`,onClick:e=>{e.stopPropagation(),e.preventDefault(),this.setState({openDialogHost:!0,openDialog:!0})},children:w($e,{})})})}renderSentry(){return this.props.item.checkSentry?w(O,{title:`sentry`,slotProps:{popper:{sx:this.styles.tooltip}},children:w(A,{size:`small`,style:this.styles.button,onClick:e=>{e.stopPropagation(),e.preventDefault(),this.toggleSentry()},children:w(xe,{style:{...this.styles.sentry,...this.props.item.sentry?void 0:this.styles.contrast0},component:`img`,image:this.props.item.sentry?St:on})})}):null}renderCompactGroupEnabled(){return w(O,{title:this.props.context.t(`compact groups`),slotProps:{popper:{sx:this.styles.tooltip}},children:w(A,{size:`small`,style:{...this.styles.button,...this.props.context.expertMode&&this.props.item.checkCompact&&!this.props.item.isPython?void 0:this.styles.hide},onClick:e=>{e.stopPropagation(),e.preventDefault(),this.toggleCompactMode()},children:w(st,{color:this.props.item.compact?`primary`:`inherit`})})})}renderVersion(){return T(K,{tooltip:this.props.context.t(`Installed`),children:[`v`,this.props.instance.version]})}renderInfo(e){return T(x,{children:[e?void 0:w(`span`,{style:this.styles.instanceName,children:this.props.instance.id}),this.props.item.adapterMissing&&w(R,{state:!1,children:this.props.context.t(`The adapter is not installed on host "%s"`,this.props.item.host)}),this.props.item.stoppedWhenWebExtension!==void 0&&w(R,{state:this.props.item.stoppedWhenWebExtension,children:this.props.context.t(`Runs as web-extension`)}),this.props.item.running&&this.props.instance.mode===`daemon`&&this.props.item.stoppedWhenWebExtension===void 0&&w(R,{state:this.props.item.connectedToHost,children:this.props.context.t(`Connected to host`)}),this.props.item.running&&this.props.instance.mode===`daemon`&&this.props.item.stoppedWhenWebExtension===void 0&&w(R,{state:this.props.item.alive,children:this.props.context.t(`Heartbeat`)}),this.props.item.running&&this.props.item.connected!==null&&this.props.item.stoppedWhenWebExtension===void 0&&w(R,{state:!!this.props.item.connected,children:typeof this.props.item.connected==`string`?`${this.props.context.t(`Connected:`)} ${this.props.item.connected||`-`}`:this.props.context.t(`Connected to device or service`)})]})}renderLogLevel(){return T(x,{children:[w(K,{icon:this.props.item.loglevelIcon||void 0,tooltip:this.props.item.logLevelObject===this.props.item.logLevel?`${this.props.context.t(`loglevel`)} ${this.props.item.logLevel}`:`${this.props.context.t(`saved:`)} ${this.props.item.logLevelObject} / ${this.props.context.t(`actual:`)} ${this.props.item.logLevel}`,children:this.props.item.logLevelObject===this.props.item.logLevel?this.props.item.logLevel:`${this.props.item.logLevelObject} / ${this.props.item.logLevel}`}),w(O,{title:this.props.context.t(`Edit`),slotProps:{popper:{sx:this.styles.tooltip}},children:w(A,{size:`small`,className:`admin-edit-button`,style:this.styles.button,onClick:e=>{e.stopPropagation(),e.preventDefault(),this.setState({openDialogLogLevel:!0,openDialog:!0})},children:w($e,{})})})]})}renderSchedule(){return T(x,{children:[w(K,{icon:w(ct,{}),tooltip:this.props.context.t(`schedule_group`),children:e.getSchedule(this.props.instance.obj)||`-`}),w(O,{title:this.props.context.t(`Edit`),slotProps:{popper:{sx:this.styles.tooltip}},children:w(A,{size:`small`,className:`admin-edit-button`,style:this.styles.button,onClick:e=>{e.stopPropagation(),e.preventDefault(),this.setState({openDialogSchedule:!0,openDialog:!0})},children:w($e,{})})})]})}renderRestartSchedule(){return T(x,{children:[w(K,{icon:w(ct,{style:this.styles.scheduleIcon}),tooltip:this.props.context.t(`restart`),children:e.getRestartSchedule(this.props.instance.obj)||`-`}),w(O,{title:this.props.context.t(`Edit`),slotProps:{popper:{sx:this.styles.tooltip}},children:w(A,{size:`small`,className:`admin-edit-button`,style:this.styles.button,onClick:e=>{e.stopPropagation(),e.preventDefault(),this.setState({openDialogCron:!0,openDialog:!0})},children:w($e,{})})})]})}renderRamLimit(){return this.props.item.isPython?null:T(x,{children:[w(K,{icon:w(yt,{style:this.styles.memoryIcon}),tooltip:this.props.context.t(`RAM limit`),children:`${this.props.item.memoryLimitMB?this.props.item.memoryLimitMB:`-.--`} MB`}),w(O,{title:this.props.context.t(`Edit`),slotProps:{popper:{sx:this.styles.tooltip}},children:w(A,{size:`small`,className:`admin-edit-button`,style:this.styles.button,onClick:e=>{e.stopPropagation(),e.preventDefault(),this.setState({openDialogMemoryLimit:!0,openDialog:!0})},children:w($e,{})})})]})}renderCompactGroup(){return this.props.item.isPython?null:T(x,{children:[w(K,{icon:w(st,{style:this.styles.marginRight5,color:`inherit`}),tooltip:this.props.context.t(`compact groups`),children:(this.props.item.compactGroup===1?`default`:(this.props.item.compactGroup||``).toString()===`0`?`controller`:this.props.item.compactGroup?this.props.item.compactGroup:`default`).toString()||`default`}),w(O,{title:this.props.context.t(`Edit`),slotProps:{popper:{sx:this.styles.tooltip}},children:w(A,{size:`small`,className:`admin-edit-button`,style:this.styles.button,onClick:e=>{e.stopPropagation(),e.preventDefault(),this.setState({openDialogCompact:!0,openDialog:!0})},children:w($e,{})})})]})}renderTier(){var e;return T(x,{children:[w(K,{icon:w(at,{style:this.styles.marginRight5,color:`inherit`}),tooltip:this.props.context.t(`Start order (tier)`),children:this.props.instance.adapter===`admin`?this.props.context.t(`Always first`):this.props.context.t(((e=dn.find(e=>e.value===this.props.item.tier))==null?void 0:e.desc)||dn[2].desc)}),this.props.instance.adapter===`admin`?null:w(O,{title:this.props.context.t(`Edit start order (tier)`),slotProps:{popper:{sx:this.styles.tooltip}},children:w(A,{size:`small`,className:`admin-edit-button`,style:this.styles.button,onClick:e=>{e.stopPropagation(),e.preventDefault(),this.setState({openDialogTier:!0,openDialog:!0})},children:w($e,{})})})]})}renderHostWithButton(){return T(x,{children:[w(K,{icon:w(lt,{style:this.styles.marginRight5}),tooltip:this.props.context.t(`Host for this instance`),children:this.renderHost()}),this.renderEditHostButton()]})}renderDeleteButton(){return w(O,{title:this.props.context.t(`Delete`),slotProps:{popper:{sx:this.styles.tooltip}},children:w(A,{size:`small`,style:this.styles.button,onClick:async e=>{e.stopPropagation(),e.preventDefault();let t=!0;try{let e=await this.props.context.socket.getAdapterInstances(this.props.instance.id.split(`.`)[0]);t=Array.isArray(e)&&e.length||!0}catch(e){console.warn(`Cannot read adapter instances before delete:`,e)}this.setState({openDialogDelete:t,openDialog:!0})},children:w(Se,{})})})}render(){return w(`div`,{children:this.state.expanded})}};u();var q={...mn,fab:{position:`absolute`,bottom:-20,width:40,height:40,right:20},collapse:e=>({height:`100%`,background:`linear-gradient(180deg, rgba(8, 29, 47, 0.985), rgba(4, 14, 25, 0.975))`,color:`#eef7ff`,border:`1px solid rgba(0, 255, 136, 0.34)`,borderRadius:22,position:`absolute`,width:`100%`,zIndex:8,marginTop:`auto`,bottom:0,overflow:`hidden`,transition:`height 0.3s`,justifyContent:`space-between`,display:`flex`,flexDirection:`column`}),collapseOff:{height:0},close:{display:`flex`,ml:`auto`,mt:`-4px`},footerBlock:e=>({background:`rgba(2, 9, 20, 0.90)`,borderTop:`1px solid rgba(0,255,136,.22)`,p:`10px`,display:`flex`,justifyContent:`space-between`}),versionDate:{alignSelf:`center`},adapterMissingIcon:{...mn.red,alignSelf:`center`},adapter:{width:`100%`,fontWeight:`bold`,fontSize:16,verticalAlign:`middle`,paddingLeft:8,paddingTop:16},cardContent:{mt:2,paddingTop:0},cardContentH5:{height:`100%`,display:`flex`,flexDirection:`column`,justifyContent:`space-between`},marginTop10:{marginTop:10},overflowAuto:{overflow:`auto`},collapseIcon:e=>({position:`sticky`,right:0,top:0,background:`linear-gradient(135deg, rgba(0,255,136,.16), rgba(0,212,255,.09))`,borderBottom:`1px solid rgba(0,255,136,.22)`,zIndex:2}),enableButton:{display:`flex`,justifyContent:`space-between`},instanceName:{fontSize:16,padding:4,paddingBottom:15,fontWeight:`bold`},img:{width:45,height:45,margin:`auto 0`,position:`relative`,"&:after":{content:`""`,position:`absolute`,zIndex:2,top:0,left:0,width:`100%`,height:`100%`,background:`url("img/no-image.svg") 100% 100% no-repeat`,backgroundSize:`cover`,backgroundColor:`#fff`}},instanceStateNotEnabled1:e=>({backgroundColor:`rgba(192, 192, 192, 0.2)`,color:e.palette.mode===`dark`?`#CCC`:`#333`}),instanceStateNotAlive1:e=>({backgroundColor:`rgba(192, 192, 192, 0.7)`,color:e.palette.mode===`dark`?`#CCC`:`#333`}),instanceStateAliveNotConnected1:e=>({backgroundColor:`rgba(255, 177, 0, 0.4)`,color:e.palette.mode===`dark`?`#CCC`:`#333`}),instanceStateAliveAndConnected1:e=>({backgroundColor:`rgba(0, 255, 0, 0.4)`,color:e.palette.mode===`dark`?`#CCC`:`#333`})},gn=class extends hn{constructor(e){super(e),p(this,`styles`,q),this.state=Object.assign(this.getDefaultState(e),{mouseOver:!1})}renderSecondCardInfo(){var e;if(this.props.deleting||!this.state.expanded)return null;let{item:t,instance:n}=this.props;return T(E,{component:`div`,sx:y.getStyle(this.props.context.theme,q.collapse,this.state.expanded?``:q.collapseOff,this.props.deleting&&q.deleting),children:[T(Qe,{sx:{"&.MuiCardContent-root":{...q.cardContent,...q.overflowAuto}},children:[w(E,{component:`div`,sx:q.collapseIcon,children:w(A,{size:`small`,sx:q.close,onClick:()=>{this.state.openDialog||this.setState({expanded:!1},()=>this.props.context.onToggleExpanded(this.props.id,!1))},children:w(We,{})})}),T(Fe,{gutterBottom:!0,component:`span`,variant:`body2`,children:[this.renderInfo(),this.renderVersion(),this.renderMemoryUsage(),t.port&&!t.usedResources.length?w(`div`,{style:q.displayFlex,children:this.renderPort()}):null,this.renderUsedResources(),t.running&&this.props.context.expertMode&&w(`div`,{style:q.displayFlex,children:this.renderInputOutput()}),this.props.context.expertMode&&!t.isPython&&w(`div`,{style:q.displayFlex,children:this.renderRamLimit()}),w(`div`,{style:q.displayFlex,children:this.renderLogLevel()}),t.modeSchedule&&w(`div`,{style:q.displayFlex,children:this.renderSchedule()}),this.props.context.expertMode&&n.mode===`daemon`&&w(`div`,{style:q.displayFlex,children:this.renderRestartSchedule()}),this.props.context.expertMode&&!t.isPython&&t.checkCompact&&t.compact&&t.supportCompact&&w(`div`,{style:q.displayFlex,children:this.renderCompactGroup()}),this.props.context.expertMode&&w(`div`,{style:q.displayFlex,children:this.renderTier()}),this.props.context.hosts.length>1||this.props.context.hosts.length&&((e=this.props.context.hosts[0].common)==null?void 0:e.name)!==n.host?w(`div`,{style:q.displayFlex,children:this.renderHostWithButton()}):null,w(L,{config:t,name:`allowInstanceSettings`,children:w(E,{component:`div`,sx:{display:{sm:`none`,xs:`inline-block`}},children:this.renderSettingsButton()})})]})]}),T(E,{component:`div`,sx:q.footerBlock,children:[w(L,{config:t,name:`allowInstanceDelete`,children:w(`div`,{style:q.displayFlex,children:this.renderDeleteButton()})}),this.props.context.expertMode&&t.checkSentry&&w(`div`,{style:q.displayFlex,children:this.renderSentry()}),t.supportCompact&&!t.isPython&&this.props.context.expertMode&&t.checkCompact&&w(`div`,{style:q.displayFlex,children:this.renderCompactGroupEnabled()})]})]})}render(){let{item:e,instance:t}=this.props,n=e.stoppedWhenWebExtension!==void 0;return T(be,{"data-instance":e.id,"data-instance-id":e.id,"data-instance-row":`1`,sx:y.getStyle(this.props.context.theme,q.root,this.props.hidden&&q.hidden),children:[this.state.openDialog&&this.renderDialogs(),this.renderSecondCardInfo(),T(E,{component:`div`,sx:y.getStyle(this.props.context.theme,q.imageBlock,!n&&(!e.running||t.mode!==`daemon`)&&q.instanceStateNotEnabled1,n&&q.instanceStateAliveAndConnectedWebExtension1,!n&&e.running&&t.mode===`daemon`&&(!e.connectedToHost||!e.alive)&&q.instanceStateNotAlive1,!n&&e.running&&e.connectedToHost&&e.alive&&e.connected===!1&&q.instanceStateAliveNotConnected1,!n&&e.running&&e.connectedToHost&&e.alive&&e.connected!==!1&&q.instanceStateAliveAndConnected1),children:[w(xe,{sx:q.img,component:`img`,image:t.image||`img/no-image.svg`}),w(`div`,{style:q.adapter,children:t.id}),e.adapterMissing?w(O,{title:this.props.context.t(`The adapter is not installed on host "%s"`,e.host),slotProps:{popper:{sx:q.tooltip}},children:w(ke,{style:q.adapterMissingIcon})}):null,w(`div`,{style:q.versionDate}),this.state.expanded?null:w(N,{onMouseOver:()=>this.setState({mouseOver:!0}),onMouseOut:()=>this.setState({mouseOver:!1}),onClick:()=>this.setState({expanded:!0},()=>this.props.context.onToggleExpanded(this.props.id,!0)),style:q.fab,color:`primary`,"aria-label":`add`,children:w(qe,{})})]}),T(Qe,{style:q.cardContentH5,children:[w(Fe,{gutterBottom:!0,variant:`h5`,component:`h5`,children:T(`div`,{onMouseEnter:()=>this.setState({visibleEdit:!0}),onMouseLeave:()=>this.setState({visibleEdit:!1}),style:q.displayFlex,children:[I.getText(e.name,this.props.context.lang),this.renderEditNameButton()]})}),w(`div`,{style:q.marginTop10,children:T(Fe,{component:`span`,style:q.enableButton,children:[this.renderPlayPause(),w(E,{component:`div`,sx:{display:{sm:`inline-block`,xs:`none`}},children:this.renderSettingsButton()}),this.renderRestartButton(),w(L,{config:e,name:`allowInstanceLink`,children:this.renderLink()})]})})]})]})}};u();var J={...mn,row:{pl:1,pr:2,p:0},expanded:{minHeight:64},invisible:{opacity:0},instanceIcon:{height:42,width:42,"@media screen and (max-width: 800px)":{height:28,width:28,ml:`4px`}},hidden1250:{display:`flex`,width:200,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"@media screen and (max-width: 1500px)":{display:`none !important`}},visible1250:{display:`flex`,width:200,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"@media screen and (max-width: 1500px)":{display:`flex !important`}},visible1050:{display:`none`,"@media screen and (max-width: 1120px)":{display:`flex !important`}},hidden1050:{display:`flex`,"@media screen and (max-width: 1120px)":{display:`none !important`}},visible1400:{display:`none`,"@media screen and (max-width: 1400px)":{display:`flex !important`}},hidden1400:{display:`flex`,"@media screen and (max-width: 1400px)":{display:`none !important`}},hidden800:{display:`flex`,"@media screen and (max-width: 800px)":{display:`none !important`}},visible800:{display:`none`,"@media screen and (max-width: 800px)":{display:`flex !important`}},hidden570:{display:`flex`,"@media screen and (max-width: 650px)":{display:`none !important`}},visible570:{display:`none`,"@media screen and (max-width: 650px)":{display:`flex !important`}},hidden1230:{width:150,minWidth:150,overflow:`hidden`,"@media screen and (max-width: 1300px)":{display:`none !important`}},hidden380:{display:`flex`,"@media screen and (max-width: 380px)":{display:`none !important`}},instanceId:{overflow:`hidden`,alignSelf:`center`,fontSize:16,ml:`5px`,maxWidth:150,minWidth:100,whiteSpace:`nowrap`,textOverflow:`ellipsis`,flexGrow:2,"@media screen and (max-width: 380px)":{width:`70px !important`,minWidth:`70px !important`},"@media screen and (max-width: 480px)":{width:100}},secondaryHeading:{maxWidth:200,fontSize:12},secondaryHeadingDiv:{display:`flex`,alignItems:`center`,width:200},secondaryHeadingDivDiv:{whiteSpace:`nowrap`,overflow:`hidden`,padding:5,textOverflow:`ellipsis`,maxWidth:200},gridStyle:{display:`flex`,minWidth:270,lineHeight:`34px`,justifyContent:`space-around`,alignItems:`center`,"@media screen and (max-width: 480px)":{minWidth:`auto !important`,ml:`10px`},"@media screen and (max-width: 335px)":{ml:`0px`}},paddingRight200:{},maxWidth300:{width:300,"@media screen and (max-width: 480px)":{width:`250px !important`}},width150:{width:150},desktopRow:{minHeight:0},desktopIcon:{height:32,width:32,mt:1},desktopRowContent:{mt:`2px`,mb:`2px`},desktopButton:{},rowGridLine:{marginTop:-2,overflow:`hidden`,flexGrow:1}},_n=class extends hn{constructor(e){super(e),p(this,`desktop`,window.innerWidth>1e3),p(this,`styles`,J),this.state=this.getDefaultState(e)}renderDetails(){var e;let{instance:t,item:n}=this.props;return w(ze,{children:T(v,{container:!0,direction:`row`,children:[T(v,{container:!0,direction:`row`,size:{xs:10},children:[w(v,{container:!0,size:{xs:12,sm:6,md:4},sx:{flexDirection:`column`},children:this.renderInfo(!0)}),w(v,{container:!0,size:{xs:12,sm:6,md:4},sx:{flexDirection:`column`},children:this.renderVersion()}),T(v,{container:!0,size:{xs:12,sm:6,md:4},style:J.paddingRight200,sx:{flexDirection:`column`},children:[w(E,{component:`div`,sx:{...J.displayFlex,...J.maxWidth300,...J.editButton},children:this.renderLogLevel()}),n.running&&this.props.context.expertMode&&w(E,{component:`div`,sx:J.visible1250,children:this.renderInputOutput()}),w(v,{sx:J.visible1050,children:this.renderMemoryUsage()}),n.port&&!n.usedResources.length?w(v,{sx:J.visible1400,children:this.renderPort()}):null,this.renderUsedResources(),n.modeSchedule&&w(E,{component:`div`,sx:{...J.displayFlex,...J.maxWidth300,...J.editButton},children:this.renderSchedule()}),this.props.context.expertMode&&t.mode===`daemon`&&w(E,{component:`div`,sx:{...J.displayFlex,...J.maxWidth300,...J.editButton},children:this.renderRestartSchedule()}),this.props.context.expertMode&&!n.isPython&&w(E,{component:`div`,sx:{...J.displayFlex,...J.maxWidth300,...J.editButton},children:this.renderRamLimit()}),this.props.context.expertMode&&!n.isPython&&n.checkCompact&&n.compact&&n.supportCompact&&w(E,{component:`div`,sx:{...J.displayFlex,...J.maxWidth300,...J.editButton},children:this.renderCompactGroup()}),this.props.context.expertMode&&w(E,{component:`div`,sx:{...J.displayFlex,...J.maxWidth300,...J.editButton},children:this.renderTier()}),T(E,{component:`div`,sx:{...J.maxWidth300,...J.visible800,...J.editButton},children:[w(K,{children:I.getText(n.name,this.props.context.lang)}),this.renderEditNameButton()]}),this.props.context.hosts.length>1||this.props.context.hosts.length&&((e=this.props.context.hosts[0].common)==null?void 0:e.name)!==t.host?w(E,{component:`div`,sx:{...J.displayFlex,...J.maxWidth300,...J.editButton},children:this.renderHostWithButton()}):null]})]}),T(`div`,{style:J.displayFlex,children:[w(L,{config:n,name:`allowInstanceDelete`,children:w(E,{component:`div`,sx:{display:{xs:`inline-block`,md:`none`}},children:this.renderSettingsButton()})}),w(E,{component:`div`,sx:{display:{md:`none`,xs:`inline-block`}},children:this.renderRestartButton()}),w(L,{config:n,name:`allowInstanceLink`,children:w(E,{component:`div`,sx:{display:{md:`none`,xs:`inline-block`}},children:this.renderLink()})}),w(L,{config:n,name:`allowInstanceDelete`,children:this.renderDeleteButton()}),this.props.context.expertMode&&n.checkSentry&&w(E,{component:`div`,sx:J.visible570,children:this.renderSentry()}),w(E,{component:`div`,sx:J.visible570,children:this.renderCompactGroupEnabled()})]})]})})}render(){var e;let{instance:t,item:n}=this.props,r=this.props.context.getInstanceStatus(t.obj),i=this.renderTooltip(),o=n.stoppedWhenWebExtension!==void 0,s={...J.row,...!o&&(!n.running||t.mode!==`daemon`)?this.props.idx%2==0?J.instanceStateNotEnabled1:J.instanceStateNotEnabled2:void 0,...o?this.props.idx%2==0?J.instanceStateAliveAndConnectedWebExtension1:J.instanceStateAliveAndConnectedWebExtension2:void 0,...!o&&n.running&&t.mode===`daemon`&&(!n.connectedToHost||!n.alive)?this.props.idx%2==0?J.instanceStateNotAlive1:J.instanceStateNotAlive2:void 0,...!o&&n.running&&n.connectedToHost&&n.alive&&n.connected===!1?this.props.idx%2==0?J.instanceStateAliveNotConnected1:J.instanceStateAliveNotConnected2:void 0,...!o&&n.running&&n.connectedToHost&&n.alive&&n.connected!==!1?this.props.idx%2==0?J.instanceStateAliveAndConnected1:J.instanceStateAliveAndConnected2:void 0,...this.desktop?J.desktopRow:void 0,...this.state.expanded&&!this.props.deleting?J.expanded:void 0};return T(re,{"data-instance":this.props.id,"data-instance-id":this.props.id,"data-instance-row":`1`,square:!0,sx:{"&.MuiAccordion-root":{...this.props.deleting?J.deleting:void 0,...this.props.hidden?J.hidden:void 0}},expanded:this.state.expanded&&!this.props.deleting,onChange:()=>{this.state.openDialog||this.setState({expanded:!this.state.expanded},()=>this.props.context.onToggleExpanded(this.props.id,this.state.expanded))},children:[T(le,{sx:{"&.MuiAccordionSummary-root":{...s,justifyContent:`flex-start`},"& .MuiAccordionSummary-content":{minWidth:0,...this.desktop?J.desktopRowContent:void 0}},expandIcon:w(a,{style:this.desktop?J.desktopButton:void 0}),children:[this.renderDialogs(),T(v,{container:!0,spacing:1,direction:`row`,wrap:`nowrap`,style:J.rowGridLine,sx:{alignItems:`center`},children:[T(E,{component:`div`,style:J.gridStyle,children:[i.length?w(O,{slotProps:{popper:{sx:J.tooltip}},title:w(`span`,{style:{display:`flex`,flexDirection:`column`},children:i}),children:this.renderModeIcon(r)}):this.renderModeIcon(r),w(Pe,{variant:`square`,alt:t.id,src:t.image,sx:{...J.instanceIcon,...this.desktop?J.desktopIcon:void 0}}),w(E,{component:`div`,sx:J.instanceId,children:t.id})]}),this.renderPlayPause(),w(L,{config:n,name:`allowInstanceSettings`,children:w(E,{component:`div`,sx:{display:{md:`inline-block`,xs:`none`}},children:this.renderSettingsButton()})}),w(E,{component:`div`,sx:{display:{md:`inline-block`,xs:`none`}},children:this.renderRestartButton()}),w(L,{config:n,name:`allowInstanceLink`,children:w(E,{component:`div`,sx:{display:{md:`inline-block`,xs:`none`}},children:this.renderLink()})}),w(Fe,{sx:{...J.secondaryHeading,...J.hidden800},component:`div`,children:T(`div`,{onMouseEnter:()=>this.setState({visibleEdit:!0}),onMouseLeave:()=>this.setState({visibleEdit:!1}),style:J.secondaryHeadingDiv,children:[w(`div`,{style:J.secondaryHeadingDivDiv,children:I.getText(n.name,this.props.context.lang)}),this.renderEditNameButton()]})}),this.props.context.expertMode&&w(E,{component:`div`,sx:{...J.hidden1250,...t.mode!==`daemon`||!n.running?J.invisible:void 0},children:this.renderInputOutput()}),w(O,{title:n.logLevelObject===n.logLevel?`${this.props.context.t(`loglevel`)} ${n.logLevel}`:`${this.props.context.t(`saved:`)} ${n.logLevelObject} / ${this.props.context.t(`actual:`)} ${n.logLevel}`,slotProps:{popper:{sx:J.tooltip}},children:w(Pe,{sx:{...J.smallAvatar,...J.hidden380,...J[n.logLevel]},children:n.loglevelIcon})}),this.props.context.hasAnyResource?w(v,{sx:{...J.hidden1400,flex:`0 1 150px`,minWidth:0,overflow:`hidden`},children:this.renderResourcesColumn()}):null,w(v,{sx:{...J.hidden1050,...J.width150,...t.mode!==`daemon`||!n.running?J.invisible:void 0},children:this.renderMemoryUsage()}),this.props.context.hosts.length>1||this.props.context.hosts.length&&((e=this.props.context.hosts[0].common)==null?void 0:e.name)!==t.host?w(v,{sx:J.hidden1230,children:this.renderHost()}):null]}),this.props.context.expertMode&&w(E,{component:`div`,sx:{...J.hidden570,minWidth:34},children:n.checkSentry?this.renderSentry():null}),w(E,{component:`div`,sx:J.hidden570,children:this.renderCompactGroupEnabled()})]}),this.state.expanded?this.renderDetails():null,this.renderDialogs()]})}},vn=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24px'%20viewBox='0%200%2024%2024'%20width='24px'%20fill='%23FB2D26'%3e%3cg%3e%3cpath%20d='M0,0h24%20M24,24H0'%20fill='currentColor'/%3e%3cpath%20d='M4.25,5.61C6.27,8.2,10,13,10,13v6c0,0.55,0.45,1,1,1h2c0.55,0,1-0.45,1-1v-6c0,0,3.72-4.8,5.74-7.39%20C20.25,4.95,19.78,4,18.95,4H5.04C4.21,4,3.74,4.95,4.25,5.61z'/%3e%3cpath%20d='M0,0h24v24H0V0z'%20fill='none'/%3e%3c/g%3e%3c/svg%3e`,Y={root:{width:`100%`,padding:10},paper:{width:`100%`,maxHeight:800},overflowHidden:{display:`flex`,overflow:`hidden`},pre:{overflow:`auto`,whiteSpace:`pre-wrap`,margin:0},rowBlock:{display:`flex`,width:`100%`,justifyContent:`space-between`,margin:`10px 0`},select:{minWidth:200},checkbox:{minWidth:160},statusIcon_1:{border:`2px solid grey`,borderRadius:20,color:`grey`},statusIcon_2:{border:`2px solid grey`,borderRadius:20,color:`#d32f2f`},statusIcon_3:{border:0,borderRadius:0,color:`#ffa726`},statusIcon_4:{border:`2px solid grey`,borderRadius:20,color:`#0055a9`},statusIcon_5:{border:`2px solid grey`,borderRadius:20},statusIcon_6:{border:`2px solid grey`,borderRadius:20},menuWrapper:{display:`flex`,alignItems:`center`},iconWrapper:{marginRight:10},textWrapper:{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},square:{width:24,height:24,marginRight:10,filter:`invert(0%) sepia(90%) saturate(300%) hue-rotate(-537deg) brightness(99%) contrast(97%)`},statusIcon_green:{border:`2px solid grey`,borderRadius:2},statusIcon_red:{border:`2px solid grey`,borderRadius:20},statusIcon_orange:{border:0,borderRadius:0},statusIcon_orangeDevice:{border:0,borderRadius:0},statusIcon_blue:{border:`2px solid grey`,borderRadius:20},statusIcon_gray:{border:`2px solid grey`,borderRadius:20},statusIcon_grey:{border:`2px solid grey`,borderRadius:20},green:{color:ye[700]},red:{color:c[700]},grey:{color:g[700]},blue:{color:`#0055a9`},orange:{color:S[400]},orangeDevice:{color:S[300]},icon:{width:18,height:18,marginRight:8,display:`inline-block`},menuValue:{whiteSpace:`nowrap`}},yn=[`none`,`daemon`,`schedule`,`once`],bn=(e,t)=>e===1||e===2?w(ot,{style:t}):e===3?w(Ge,{style:t}):e===4?w(ct,{style:t}):e===5?w(`div`,{style:{...t,width:20,height:20,margin:2,borderRadius:2},children:w(`div`,{style:{width:`calc(100% - 2px)`,height:`calc(100% - 2px)`,borderRadius:2,margin:1,backgroundColor:`#66bb6a`}})}):null,xn={none:{text:`none`,_class:``,status:``},disabled:{text:`disabled`,_class:`statusIcon_grey`,status:`grey`},not_alive:{text:`enabled, but not alive`,_class:`statusIcon_red`,status:`red`},alive_not_connected:{text:`enabled, alive, but not connected to controller`,_class:`statusIcon_orange`,status:`orange`},alive_no_device:{text:`enabled, alive, but not connected to device or service`,_class:`statusIcon_orangeDevice`,status:`orange`},ok:{text:`enabled and OK`,_class:`statusIcon_green`,status:`green`}},Sn=({onClose:e,filterMode:t,filterStatus:n,sortColumn:r,sortDirection:i,expertMode:a})=>{let[o,s]=D(t),[c,l]=D(n),[u,d]=D(r),[p,m]=D(i);return T(Le,{onClose:()=>e(),open:!0,sx:{"& .MuiDialog-paper":Y.paper},children:[w(h,{style:{display:`flex`},children:T(`div`,{style:{display:`flex`},children:[w(Pe,{variant:`square`,style:Y.square,src:vn}),C.t(`Filter instances`)]})}),w(me,{style:Y.overflowHidden,dividers:!0,children:T(be,{style:Y.root,children:[T(`div`,{style:Y.rowBlock,children:[w(b,{style:Y.checkbox,control:w(f,{checked:!!o,onChange:e=>e.target.checked?s(`daemon`):s(null)}),label:C.t(`Filter by mode`)}),w(k,{disabled:!o,variant:`standard`,value:o||`none`,style:Y.select,onChange:e=>{e.target.value===`none`?s(null):s(e.target.value)},children:yn.map(e=>w(j,{value:e,children:C.t(e)},e))})]}),T(`div`,{style:Y.rowBlock,children:[w(b,{style:Y.checkbox,control:w(f,{checked:!!c,onChange:e=>e.target.checked?l(`ok`):l(null)}),label:C.t(`Filter by status`)}),w(k,{disabled:!c,variant:`standard`,value:c||`none`,style:Y.select,onChange:e=>{e.target.value===`none`?l(null):l(e.target.value)},children:Object.keys(xn).map((e,t)=>w(j,{value:e,children:T(`div`,{style:Y.menuWrapper,children:[xn[e].status?w(`div`,{style:Y.iconWrapper,children:bn(t,Y[`statusIcon_${t}`])}):null,w(`div`,{style:Y.textWrapper,children:C.t(xn[e].text)})]})},e))})]}),T(`div`,{style:Y.rowBlock,children:[w(b,{style:Y.checkbox,control:w(f,{checked:!!u,onChange:e=>e.target.checked?d(`name`):d(null)}),label:C.t(`Sort by`)}),T(k,{disabled:!u,variant:`standard`,value:u||`none`,style:Y.select,onChange:e=>{e.target.value===`none`?d(null):d(e.target.value)},children:[w(j,{value:`none`,children:C.t(`none`)}),w(j,{value:`name`,children:C.t(`Name`)}),w(j,{value:`id`,children:C.t(`ID`)}),w(j,{value:`status`,children:C.t(`Status`)}),w(j,{value:`memory`,children:C.t(`Memory`)}),w(j,{value:`port`,children:C.t(`Port`)}),w(j,{value:`host`,children:C.t(`Host`)}),a&&w(j,{value:`loglevel`,children:C.t(`Log level`)})]})]}),u&&T(`div`,{style:Y.rowBlock,children:[w(`div`,{style:Y.checkbox,children:C.t(`Sort direction`)}),T(k,{variant:`standard`,value:p,style:Y.select,onChange:e=>m(e.target.value),children:[w(j,{value:`asc`,children:C.t(`Ascending`)}),w(j,{value:`desc`,children:C.t(`Descending`)})]})]})]})}),T(fe,{children:[w(je,{color:`grey`,variant:`contained`,disabled:(u||`none`)===`none`&&(c||`none`)===`none`&&(o||`none`)===`none`,onClick:()=>{e({filterMode:null,filterStatus:null,sortColumn:null,sortDirection:`asc`})},startIcon:w(Se,{}),children:C.t(`Reset`)}),w(`div`,{style:{flexGrow:1}}),w(je,{variant:`contained`,autoFocus:!0,disabled:o===t&&n===c&&u===r&&p===i,onClick:()=>{e({filterMode:o,filterStatus:c,sortColumn:u,sortDirection:p})},color:`primary`,startIcon:w(_,{}),children:C.t(`Apply`)}),w(je,{color:`grey`,variant:`contained`,onClick:()=>e(),startIcon:w(We,{}),children:C.t(`Close`)})]})]})},Cn={row:{paddingLeft:8,flexDirection:`row-reverse`,minHeight:`48px !important`,height:48,fontWeight:`bold`,fontSize:16},iconStyle:{marginRight:10},wrapperName:{margin:`0 10px`,display:`flex`,alignItems:`center`},wrapperChildren:{width:`100%`},accordionDetails:{padding:0},accordion:{margin:`1px 0 !important`}};function wn({name:e,key:t,children:n,expanded:r,onExpand:i}){return T(re,{expanded:!!r,onChange:()=>i(!r),style:Cn.accordion,square:!0,children:[w(le,{style:Cn.row,expandIcon:w(a,{}),children:T(`div`,{style:Cn.wrapperName,children:[w(xt,{iconName:e,style:Cn.iconStyle}),e]})}),w(ze,{style:Cn.accordionDetails,children:w(`div`,{style:Cn.wrapperChildren,children:n})})]},t)}u();var Tn=new Set([`admin`,`eos-admin`,`backitup`,`nexowatt-devices`,`nexowatt-device`,`nexowatt-dev`,`nexowatt-ui`]),En=e=>{let t=String(e||``).toLowerCase().replace(/^system\.adapter\./,``).replace(/^iobroker\./,``).replace(/^@nexowatt\/iobroker\./,``).replace(/^@nexowatt\//,``),n=t.match(/^([a-z0-9_-]+)(?:\.(\d+))?$/);return n?{adapter:n[1],instance:n[2]}:{adapter:t.replace(/\.\d+$/,``)}},Dn=e=>{let{adapter:t,instance:n}=En(e);return t===`admin`||t===`eos-admin`?n===void 0||n===`0`:Tn.has(t)},X={paper:{height:`100%`},iframe:{height:`100%`,width:`100%`,color:`#000`,borderRadius:4,boxShadow:`0px 2px 1px -1px rgb(0 0 0 / 20%), 0px 1px 1px 0px rgb(0 0 0 / 14%), 0px 1px 3px 0px rgb(0 0 0 / 12%)`,border:`0px solid #888`},cards:{display:`flex`,flexFlow:`wrap`,justifyContent:`center`},filterActive:e=>({color:e.palette.primary.main}),tooltip:{pointerEvents:`none`},grow:{flexGrow:1},hostInfo:{display:`flex`,alignItems:`center`,gap:1.5,whiteSpace:`nowrap`},usage:{display:`flex`,alignItems:`center`,gap:.5},usageIcon:{fontSize:20,opacity:.8},usageBar:e=>({position:`relative`,width:80,height:18,borderRadius:`4px`,overflow:`hidden`,backgroundColor:e.palette.action.hover,border:`1px solid ${e.palette.divider}`}),usageBarFill:{position:`absolute`,top:0,left:0,bottom:0,transition:`width 0.5s`},usageBarText:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:12,fontWeight:`bold`,lineHeight:1}},On=class e extends Ve{scheduleInstancesRetry(){if(this.instancesUnmounted||this.instancesRetryTimer)return;let e=[500,1e3,2e3,4e3,8e3,12e3],t=e[Math.min(this.instancesRetryAttempt,e.length-1)];this.instancesRetryAttempt++,this.instancesRetryTimer=setTimeout(()=>{this.instancesRetryTimer=null,this.getInstances()},t)}constructor(t){super(t),p(this,`localStorage`,void 0),p(this,`statePromise`,null),p(this,`states`,void 0),p(this,`installedPerHost`,{}),p(this,`statesUpdateTimer`,null),p(this,`typingTimer`,null),p(this,`hostsTimer`,null),p(this,`wordCache`,void 0),p(this,`t`,void 0),p(this,`inputRef`,void 0),p(this,`refTabContent`,void 0),p(this,`subscribed`,!1),p(this,`unmounted`,!1),p(this,`_cacheList`,null),p(this,`shouldUpdateAfterDialogClosed`,!1),p(this,`expanded`,``),p(this,`closeCommands`,{}),p(this,`instancesRetryTimer`,null),p(this,`instancesRetryAttempt`,0),p(this,`instancesUnmounted`,!1),p(this,`translate`,(e,t,n)=>t===void 0?(this.wordCache[e]||(this.wordCache[e]=this.props.t(e)),this.wordCache[e]):this.props.t(e,t,n)),p(this,`usedResourcesStates`,{}),p(this,`onUsedResourcesChange`,(e,t)=>{this.usedResourcesStates={...this.usedResourcesStates,[e]:t},this.updateUsedResources()}),p(this,`getInstances`,async()=>{let e=[],t=await this.props.instancesWorker.getObjects();if(!t){this.scheduleInstancesRetry();return}this.instancesRetryAttempt=0,e=Object.values(t);let n={};this.props.hosts.forEach(e=>n[e._id]=e);let r={};e.sort((e,t)=>{let n=e._id.split(`.`),r=t._id.split(`.`),i=parseInt(n[n.length-1],10),a=parseInt(r[r.length-1],10),o=n[n.length-2],s=r[r.length-2];return o===s?i>a?1:i<a?-1:0:o>s?1:o<s?-1:0});let i=1,a={};for(let a=0;a<e.length;a++){var o,s,c,l,u,d;let f=e[a],p=f.common||null,m=parseInt(f._id.split(`.`).pop()||``,10);p.compactGroup&&typeof p.compactGroup==`number`&&i<p.compactGroup&&(i=p.compactGroup);let h={id:f._id.replace(`system.adapter.`,``),obj:f,compact:!!p.compact,host:p.host,name:this.getName(f),image:p.icon?`adapter/${p.name}/${p.icon}`:`img/no-image.svg`,enabled:p.enabled,canStart:!p.onlyWWW,config:((o=p.adminUI)==null?void 0:o.config)!==`none`,jsonConfig:((s=p.adminUI)==null?void 0:s.config)===`json`,materialize:((c=p.adminUI)==null?void 0:c.config)===`materialize`,compactMode:p.runAsCompactMode||!1,mode:p.mode||null,schedule:p.schedule===void 0||p.schedule===null?null:p.schedule,loglevel:p.loglevel||`info`,adapter:p.name||``,version:p.version||``,stoppedWhenWebExtension:f.common.mode===`daemon`&&f.common.enabled&&f.common.webExtension&&f.native.webInstance?!0:void 0,links:[]},g=p.localLinks||p.localLink||``,_=null;g&&typeof g==`string`?_={_default:g}:g&&typeof g==`object`&&(_=g);let v=_?Object.keys(_):[];v.forEach(e=>{h.links||=[];let r,i=_==null?void 0:_[e];r=typeof i==`string`?{link:i}:i;let a=pt(r.link,p.name,m,{instances:t,hostname:this.props.hostname,hosts:n,adminInstance:this.props.adminInstance})||[],o=r.name||e;o=o===`_default`?v.length===1?``:this.t(`default`):typeof o==`object`?I.getText(o,this.props.lang):this.t(o),a.length===1?h.links.push({name:o,link:a[0].url,port:a[0].port,color:r.color}):a.length>1&&a.forEach(e=>{h.links.push({name:o,link:e.url,port:e.port,color:r.color})})});let y=mt(t,window.location);if((l=h.links)!=null&&l.length&&y)h.links.forEach(e=>{let t=ht(e.link,e.port,y);t===null?e.unreachable=!0:e.link=t});else if((u=h.links)!=null&&u.length&&(d=this.state.reverseProxy)!=null&&d.length){let e=window.location.pathname,n=this.state.reverseProxy.find(t=>{if(!t.globalPath)return!1;let n=t.globalPath.endsWith(`/`)?t.globalPath:`${t.globalPath}/`;return e===n||e.startsWith(n)})||null;if(n&&h.links.forEach(e=>{e.link=dt(e.link,h.id,t,n)||e.link}),h.links.length>1){let e=new Set;h.links=h.links.filter(t=>!t.link||e.has(t.link)?!1:(e.add(t.link),!0))}}r[f._id]=h}this.state.deleting&&!r[`system.adapter.${this.state.deleting}`]&&(a.deleting=null),a.maxCompactGroupNumber=i,a.instances=r,this._cacheList=null,this.setState(a),this.readMemoryUsage(e,i)}),p(this,`onStateChange`,(e,t)=>{let n=this.states[e];this.states[e]=t,(!n&&t||n&&!t||n&&t&&n.val!==t.val)&&(this.state.dialog===`config`&&this.state.dialogProp?(this.statesUpdateTimer&&=(clearTimeout(this.statesUpdateTimer),null),this.shouldUpdateAfterDialogClosed=!0):this.statesUpdateTimer||=setTimeout(()=>{this.statesUpdateTimer=null,this._cacheList=null,this.forceUpdate()},1e3))}),p(this,`getInstanceStatus`,e=>{let t=e?e.common:null,n=(t==null?void 0:t.mode)||``,r=n===`daemon`?`green`:`blue`;if(t!=null&&t.enabled&&(!t.webExtension||!e.native.webInstance||n===`daemon`)){let i=this.states[`${e._id}.alive`],a=this.states[`${e._id}.connected`],o=this.states[`${e._id.replace(`system.adapter.`,``)}.info.connection`];if(t.webExtension&&e.native.webInstance)return`green`;a!=null&&a.val&&i!=null&&i.val||(r=n===`daemon`?`red`:`orangeDevice`),o&&!(o!=null&&o.val)&&r!==`red`&&(r=`orange`)}else r=n===`daemon`?`grey`:`blue`;return r}),p(this,`onDeleteInstance`,(e,t,n)=>{let r=n?e.id.split(`.`)[0]:e.id;Dn(r)?window.alert(`Dieser Dienst ist ein geschütztes NexoWatt-EOS-Systemmodul und darf nicht gelöscht werden.`):this.setState({deleting:e.id},()=>this.props.executeCommand(`del ${r}${t?` --custom`:``}${this.props.expertMode?` --debug`:``}`))}),p(this,`onMaxCompactGroupNumber`,e=>this.setState({maxCompactGroupNumber:e})),p(this,`onRegisterClose`,(e,t)=>{this.closeCommands[e]=t}),p(this,`saveScrollPosition`,()=>{var t;e.lastScrollPosition=(t=this.refTabContent.current)==null||(t=t.parentNode)==null?void 0:t.scrollTop}),p(this,`onToggleExpanded`,(e,t)=>{let n=this.closeCommands[this.expanded];this.expanded!==e&&t&&n&&n(),this.expanded=t?e:``}),p(this,`changeStartedStopped`,()=>{this._cacheList=null,this.setState(e=>{let t=e.playArrow?e.playArrow===1?2:0:1;return this.localStorage.setItem(`Instances.playArrow`,JSON.stringify(t)),{playArrow:t}})}),this.localStorage=window._localStorage||window.localStorage;let n=[];if(this.localStorage.getItem(`Instances.expandedFolder`))try{n=JSON.parse(this.localStorage.getItem(`Instances.expandedFolder`)||`[]`)}catch{}let r=this.localStorage.getItem(`Instances.filterMode`),a=this.localStorage.getItem(`Instances.filterStatus`);this.state={expertMode:this.props.expertMode,dialog:null,instances:null,dialogProp:null,playArrow:0,onlyCurrentHost:!1,viewMode:!1,viewCategory:!1,hostInfo:null,processes:null,mem:null,percent:null,memFree:null,filterText:this.localStorage.getItem(`instances.filter`)||``,compact:!1,maxCompactGroupNumber:1,filterCompactGroup:`All`,deleting:null,deleteCustomSupported:!1,currentHost:this.props.currentHost,showFilterDialog:!1,expandedFolder:n,filterMode:r?r===`null`?null:r:null,filterStatus:a?a===`null`?null:a:null,sortColumn:this.localStorage.getItem(`Instances.sortColumn`)||null,sortDirection:this.localStorage.getItem(`Instances.sortDirection`)||`asc`,usedResources:{}},this.states={},this.statesUpdateTimer=null,this.wordCache={},this.t=this.translate,this.inputRef=i(),this.refTabContent=i()}async componentDidMount(){this.instancesUnmounted=!1,this.props.instancesWorker.registerHandler(this.getInstances),await this.updateData(),this.subscribeUsedResources();let e=await this.props.socket.checkFeatureSupported(`DEL_INSTANCE_CUSTOM`);e&&this.setState({deleteCustomSupported:e})}async readReverseProxy(){try{var e;let t=await this.props.socket.getObject(`system.adapter.${this.props.adminInstance}`),n=(t==null||(e=t.native)==null?void 0:e.reverseProxy)||[];await new Promise(e=>this.setState({reverseProxy:n},()=>e()))}catch(e){console.warn(`Cannot read reverseProxy config for Instances page:`,e)}}async updateData(){this.getParamsLocalAndPanel(),this.readCompactMode(),this.getHostsData(),await Promise.all([this.getData(),this.readReverseProxy()]),await this.getInstances()}componentWillUnmount(){this.instancesUnmounted=!0,this.instancesRetryTimer&&=(clearTimeout(this.instancesRetryTimer),null),this.unmounted=!0,this.subscribeStates(!0),this.props.socket.unsubscribeState(z,this.onUsedResourcesChange),this.props.instancesWorker.unregisterHandler(this.getInstances)}async readUsedResources(){try{let e=await Tt(this.props.socket,this.props.hosts.map(e=>e._id));this.usedResourcesStates={...e,...this.usedResourcesStates},this.updateUsedResources()}catch(e){console.warn(`Cannot read the used resources: ${e}`)}}async subscribeUsedResources(){await this.readUsedResources(),this.unmounted||await this.props.socket.subscribeState(z,this.onUsedResourcesChange)}componentDidUpdate(e){e.hosts.map(e=>e._id).join(`,`)!==this.props.hosts.map(e=>e._id).join(`,`)&&this.readUsedResources()}updateUsedResources(){if(this.unmounted)return;let e={};for(let t of Dt(this.usedResourcesStates))e[t.instance]||=[],e[t.instance].push(t);this._cacheList=null,this.setState({usedResources:e})}getStates(e){return e&&(this.statePromise=null),this.statePromise instanceof Promise||(this.statePromise=this.props.socket.getForeignStates(`system.adapter.*`)),this.statePromise}static getDerivedStateFromProps(e,t){let n=Re.getLocation(),r={dialog:n.dialog,dialogProp:n.id};return e.expertMode!==t.expertMode&&(r.expertMode=e.expertMode),r}async readMemoryUsage(e,t){let n=[`${this.state.currentHost}.memRss`,...e.filter(e=>{var t;return(e==null||(t=e.common)==null?void 0:t.host)===this.props.currentHostName&&e.common.enabled&&e.common.mode===`daemon`&&!hn.isCompact(e)}).map(e=>`${e._id}.memRss`)],r=[];for(let e=1;e<=t;e++)r.push(`${this.state.currentHost}.compactgroup${e}.memRss`);let i=[...n,...r].filter(e=>!this.states[e]);if(i.length){try{let e=await this.props.socket.getForeignStates(i);for(let t of i)e[t]&&(this.states[t]=e[t])}catch(e){console.warn(`Cannot read the memory usage: ${e}`)}if(this.unmounted)return}let a=e=>{var t;return parseFloat((t=this.states[e])==null?void 0:t.val)||0},o=n.reduce((e,t)=>e+a(t),0),s=n.length;r.filter(e=>this.states[e]).forEach(e=>{o+=a(e),s++}),this.setState({processes:s,mem:Math.round(o)})}async readCompactMode(){let e=!1;try{var t;e=!!((t=(await this.props.socket.readBaseSettings(this.state.currentHost)).config)!=null&&(t=t.system)!=null&&t.compact)}catch(e){window.alert(`Cannot read compact mode by host "${this.state.currentHost}": ${e}`)}!this.unmounted&&e!==this.state.compact&&(this._cacheList=null,this.setState({compact:e}))}getParamsLocalAndPanel(){let e=0,t=`All`;try{e=JSON.parse(this.localStorage.getItem(`Instances.playArrow`)||`0`),e.toString()===`true`?e=1:e.toString()===`false`&&(e=0),t=JSON.parse(this.localStorage.getItem(`Instances.filterCompactGroup`)||`"All"`)}catch{}let n=this.localStorage.getItem(`Instances.onlyCurrentHost`)===`true`,r=this.localStorage.getItem(`Instances.viewMode`)===`true`,i=this.localStorage.getItem(`Instances.viewCategory`)===`true`;!t&&t!==0&&(t=`All`),this._cacheList=null,this.setState({filterCompactGroup:t,onlyCurrentHost:n,playArrow:e,viewMode:r,viewCategory:i})}async getData(e){try{this.states=await this.getStates()||{}}catch(e){console.log(e)}this.readInstalledPerHost(e),this.states&&(this.subscribed||(this.subscribed=!0,this.subscribeStates()))}async readInstalledPerHost(e){let t={};try{t=await gt(this.props.socket,this.props.hosts,{update:e})}catch(e){console.warn(`Cannot read the installed adapters: ${e}`)}this.unmounted||(this.installedPerHost=t,this._cacheList=null,this.forceUpdate())}subscribeStates(e){let t=e?this.props.socket.unsubscribeState:this.props.socket.subscribeState;t.call(this.props.socket,`system.adapter.*.alive`,this.onStateChange),t.call(this.props.socket,`system.adapter.*.connected`,this.onStateChange),t.call(this.props.socket,`system.adapter.*.inputCount`,this.onStateChange),t.call(this.props.socket,`system.adapter.*.memRss`,this.onStateChange),t.call(this.props.socket,`system.adapter.*.outputCount`,this.onStateChange),t.call(this.props.socket,`system.adapter.*.logLevel`,this.onStateChange),t.call(this.props.socket,`system.adapter.*.plugins.sentry.enabled`,this.onStateChange),t.call(this.props.socket,`system.host.*.diskFree`,this.onStateChange),t.call(this.props.socket,`system.host.*.diskSize`,this.onStateChange),t.call(this.props.socket,`system.host.*.diskWarning`,this.onStateChange),t.call(this.props.socket,`system.host.*.freemem`,this.onStateChange),t.call(this.props.socket,`*.info.connection`,this.onStateChange),t.call(this.props.socket,`*.info.extension`,this.onStateChange)}getName(e){return e!=null&&e.common?e.common.titleLang?I.getText(e.common.titleLang,this.props.lang):I.getText(e.common.title,this.props.lang):``}getMemoryUsage(e){let t=this.states[`${e}.memRss`];return t&&parseFloat(t.val)||0}getInputOutput(e){let t=this.states[`${e}.inputCount`],n=this.states[`${e}.outputCount`];return{stateInput:t!=null&&t.val?t.val:0,stateOutput:n!=null&&n.val?n.val:0}}isAlive(e){let t=this.states[`${e}.alive`];return!!(t!=null&&t.val)}isConnectedToHost(e){let t=this.states[`${e}.connected`];return!!(t!=null&&t.val)&&this.isAlive(e)}getConnected(e){var t;let n=(t=this.state.instances)==null?void 0:t[e],r=n&&this.states[`${n.id}.info.connection`];return r?this.isAlive(e)&&r.val:null}static getStatusFilter(e){switch(e){case`not_alive`:return`red`;case`alive_no_device`:return`orangeDevice`;case`alive_not_connected`:return`orange`;case`ok`:return`green`;default:return`grey`}}static getLogLevelIcon(e){return e===`debug`?w(rt,{}):e===`info`?w(M,{}):e===`warn`?w(Ge,{}):e===`error`?w(ke,{}):null}isSentry(e){var t;return!!((t=this.states[`${e}.plugins.sentry.enabled`])!=null&&t.val)}cacheInstances(){let t=this.state.currentHost.replace(/^system.host./,``),n=this.state.instances||{};if(this._cacheList=Object.keys(n).map(t=>{var r,i,a,o,s,c;let l=n[t],u=hn.isRunning(l.obj),d=hn.isCompactGroup(l.obj),f=hn.isCompact(l.obj),p=l.compact||!1,m=p&&this.state.compact,h=this.isAlive(t),g=this.isConnectedToHost(t),_=this.getConnected(t),v=this.getName(l.obj),y=((r=this.states[`${t}.logLevel`])==null?void 0:r.val)||l.loglevel,b=l.loglevel,ee=(l==null||(i=l.obj)==null||(i=i.common)==null?void 0:i.tier)||3,x=e.getLogLevelIcon(y),te=this.getInputOutput(t),ne=hn.isModeSchedule(l.obj),S=hn.getMemoryLimitMB(l.obj),re=((a=l.obj.common.platform)==null?void 0:a.toLowerCase())===`python`,ie=hn.getSentrySettings(l.obj),ae=this.isSentry(t),oe=this.state.usedResources[l.id]||[],se=((o=oe.find(e=>e.type===`tcpPort`||e.type===`udpPort`))==null?void 0:o.data.port)??((s=l.obj.native)==null?void 0:s.port),ce=se==null||se===``?null:parseInt(String(se),10)||null;return{id:t,running:u,host:l.host,adapterMissing:ft(l.obj,this.installedPerHost),nameId:l.id,compactGroup:d,checkCompact:m,mode:l.mode,sentry:ae,category:l.obj.common.type||`other`,status:this.getInstanceStatus(l.obj),alive:h,compact:f,supportCompact:p,connectedToHost:g,connected:_,name:v,logLevel:y,logLevelObject:b,tier:ee,loglevelIcon:x,inputOutput:te,memRss:((c=this.states[`${t}.memRss`])==null?void 0:c.val)||0,modeSchedule:ne,checkSentry:ie,memoryLimitMB:S,isPython:re,port:ce,usedResources:oe,stoppedWhenWebExtension:l.stoppedWhenWebExtension,allowInstanceSettings:!this.props.repository[l.adapter]||this.props.repository[l.adapter].allowInstanceSettings,allowInstanceDelete:!Dn(l.id),allowInstanceLink:!this.props.repository[l.adapter]||this.props.repository[l.adapter].allowInstanceLink}}),String(window.NEXOWATT_EOS_ACCESS_ROLE||`unknown`).toLowerCase()!==`admin`&&(this._cacheList=this._cacheList.filter(({nameId:e,id:t})=>{let n=String(e||t||``).replace(/^system\.adapter\./,``);return!/^(?:admin|backitup)\.\d+$/i.test(n)})),this.state.playArrow&&(this._cacheList=(this._cacheList||[]).filter(({running:e})=>this.state.playArrow===1?e:!e)),this.state.onlyCurrentHost&&(this._cacheList=(this._cacheList||[]).filter(({host:e})=>e===t)),this.state.filterText){let e=this.state.filterText.toLowerCase();this._cacheList=(this._cacheList||[]).filter(({name:t,nameId:n})=>t.toLowerCase().includes(e)||n.toLowerCase().includes(e))}if(this.props.expertMode&&(this.state.filterCompactGroup||this.state.filterCompactGroup===0)&&this.state.compact&&(this._cacheList=(this._cacheList||[]).filter(({compactGroup:e})=>e===this.state.filterCompactGroup||this.state.filterCompactGroup===`All`||this.state.filterCompactGroup==="default"&&(e===null||e===1)||this.state.filterCompactGroup===`controller`&&e===`0`)),this.state.filterMode&&(this._cacheList=(this._cacheList||[]).filter(e=>e.mode===this.state.filterMode)),this.state.filterStatus){let t=e.getStatusFilter(this.state.filterStatus);this._cacheList=(this._cacheList||[]).filter(e=>t===e.status)}return this.state.sortColumn&&(this._cacheList=(this._cacheList||[]).sort((e,t)=>{let n=0;switch(this.state.sortColumn){case`name`:n=e.name.localeCompare(t.name);break;case`id`:n=e.nameId.localeCompare(t.nameId);break;case`status`:{let r={green:4,orange:3,orangeDevice:2,red:1,grey:0,blue:0};n=(r[e.status]||0)-(r[t.status]||0);break}case`memory`:n=!e.running||!t.running?e.running===t.running?0:e.running?1:-1:this.getMemoryUsage(e.id)-this.getMemoryUsage(t.id);break;case`host`:n=e.host.localeCompare(t.host);break;case`loglevel`:{let r={error:4,warn:3,info:2,debug:1,silly:0};n=(r[e.logLevel]||0)-(r[t.logLevel]||0);break}case`port`:n=e.port===null||t.port===null?e.port===t.port?0:e.port===null?1:-1:e.port-t.port;break;default:n=0}return this.state.sortDirection===`desc`?-n:n})),this._cacheList||[]}clearAllFilters(){let e={playArrow:0,onlyCurrentHost:!1,filterCompactGroup:`All`,filterMode:null,filterStatus:null,filterText:``,sortColumn:null,sortDirection:`asc`};this.localStorage.removeItem(`instances.filter`),this.localStorage.removeItem(`Instances.playArrow`),this.localStorage.removeItem(`Instances.onlyCurrentHost`),this.localStorage.removeItem(`Instances.filterCompactGroup`),this.localStorage.removeItem(`Instances.filterMode`),this.localStorage.removeItem(`Instances.filterStatus`),this.localStorage.removeItem(`Instances.sortColumn`),this.localStorage.removeItem(`Instances.sortDirection`),this._cacheList=null,this.setState(e,()=>{this.inputRef.current&&(this.inputRef.current.value=``),this.cacheInstances()})}getPanels(){this._cacheList||this.cacheInstances();let e=(this._cacheList||[]).some(e=>e.port!==null||!!e.usedResources.length),t={adminInstance:this.props.adminInstance,onDeleteInstance:this.onDeleteInstance,expertMode:this.props.expertMode,hosts:this.props.hosts,socket:this.props.socket,t:this.t,lang:this.props.lang,themeType:this.props.themeType,setMaxCompactGroupNumber:this.onMaxCompactGroupNumber,maxCompactGroupNumber:this.state.maxCompactGroupNumber,deleteCustomSupported:this.state.deleteCustomSupported,states:this.states,onToggleExpanded:this.onToggleExpanded,getInstanceStatus:this.getInstanceStatus,theme:this.props.theme,onRegisterClose:this.onRegisterClose,hasAnyResource:e},n=(this._cacheList||[]).map((e,n)=>{let r=e.id,i=(this.state.instances||{})[r];return this.state.viewMode?{category:e.category,render:w(gn,{saveScrollPosition:this.saveScrollPosition,deleting:this.state.deleting===i.id,id:r,idx:n,instance:i,item:e,context:t},i.id)}:{category:e.category,render:w(_n,{saveScrollPosition:this.saveScrollPosition,deleting:this.state.deleting===i.id,id:r,idx:n,instance:i,item:e,context:t},i.id)}});if(!n.length)return w(`div`,{title:this.t(`Click to clear all filters`),onClick:()=>this.clearAllFilters(),style:{margin:20,fontSize:26,textAlign:`center`,cursor:`pointer`},children:this.t(`all items are filtered out`)});if(!this.state.viewMode&&this.state.viewCategory){let e=[];return n.forEach(({category:t})=>!e.includes(t)&&e.push(t)),e.sort((e,t)=>e===`general`&&t!==`general`?-1:e!==`general`&&t===`general`||e>t?1:e<t?-1:0),e.map(e=>w(wn,{name:e,expanded:this.state.expandedFolder.includes(e),onExpand:t=>{let n=[...this.state.expandedFolder],r=n.indexOf(e);t?r===-1&&(n.push(e),n.sort()):r!==-1&&n.splice(r,1),this.localStorage.setItem(`Instances.expandedFolder`,JSON.stringify(n)),this.setState({expandedFolder:n})},children:n.filter(({category:t})=>t===e).map(({render:e})=>e)},e))}return n.map(({render:e})=>e)}async getHostsData(){this.props.socket.getHostInfo(this.state.currentHost,!1,1e4).catch(e=>(e.toString().includes(`May not read`)||window.alert(`Cannot read host information: ${e}`),{})).then(e=>{this._cacheList=null,this.setState({hostInfo:e})});let e,t,n,r;try{[t,n,r]=await Promise.all([this.props.socket.getState(`${this.state.currentHost}.memAvailable`),this.props.socket.getState(`${this.state.currentHost}.freemem`),this.props.socket.getObject(`${this.state.currentHost}`)])}catch(e){console.warn(`Cannot read the memory of "${this.state.currentHost}": ${e}`);return}if(!this.unmounted&&(t?e=t:n&&(e=n),e)){let t=((r==null?void 0:r.native.hardware.totalmem)||0)/1048576,n=Math.round(e.val/t*100);this._cacheList=null,this.setState({percent:n,memFree:e.val})}}static renderUsageBar(e,t,n){let r=Math.min(100,Math.max(0,t)),i=r>=90?`error`:r>=75?`warning`:`success`;return w(O,{title:n,slotProps:{popper:{sx:X.tooltip}},children:T(E,{sx:X.usage,children:[e,T(E,{sx:X.usageBar,children:[w(E,{sx:e=>({...X.usageBarFill,width:`${r}%`,backgroundColor:Ze(e.palette[i].main,.6)})}),T(E,{component:`span`,sx:X.usageBarText,children:[r,`%`]})]})]})})}changeCompactGroup(e){this._cacheList=null,this.localStorage.setItem(`Instances.filterCompactGroup`,JSON.stringify(e)),this.setState({filterCompactGroup:e})}handleFilterChange(e){this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout(e=>{this.typingTimer=null,this._cacheList=null,this.setState({filterText:e}),this.localStorage.setItem(`instances.filter`,e)},300,e.target.value)}renderFilterDialog(){return this.state.showFilterDialog?w(Sn,{filterMode:this.state.filterMode,filterStatus:this.state.filterStatus,sortColumn:this.state.sortColumn,sortDirection:this.state.sortDirection,expertMode:this.props.expertMode,onClose:e=>{e&&(this._cacheList=null,this.localStorage.setItem(`Instances.filterMode`,e.filterMode||``),this.localStorage.setItem(`Instances.filterStatus`,e.filterStatus||``),e.sortColumn?(this.localStorage.setItem(`Instances.sortColumn`,e.sortColumn),this.localStorage.setItem(`Instances.sortDirection`,e.sortDirection)):(this.localStorage.removeItem(`Instances.sortColumn`),this.localStorage.removeItem(`Instances.sortDirection`)),this.setState({filterMode:e.filterMode,filterStatus:e.filterStatus,sortColumn:e.sortColumn,sortDirection:e.sortDirection})),this.setState({showFilterDialog:!1})}}):null}render(){if(!this.state.instances)return w(Oe,{});if(this.props.currentHost!==this.state.currentHost&&(this.hostsTimer=this.hostsTimer||setTimeout(()=>{this.hostsTimer=null,this.setState({currentHost:this.props.currentHost},()=>this.updateData())},200)),this.state.dialog===`config`&&this.state.dialogProp){let e=this.state.instances[this.state.dialogProp]||null;if(e)return T(Xe,{style:X.paper,children:[this.renderFilterDialog(),w(wt,{expertMode:this.props.expertMode,adapter:e.id.split(`.`)[0],adminInstance:this.props.adminInstance,style:X.iframe,configStored:this.props.configStored,dateFormat:this.props.dateFormat,icon:e.image,instance:parseInt(e.id.split(`.`)[1]),isFloatComma:this.props.isFloatComma,jsonConfig:e.jsonConfig,lang:this.props.lang,materialize:e.materialize,socket:this.props.socket,t:this.t,theme:this.props.theme,themeName:this.props.themeName,themeType:this.props.themeType,width:this.props.width,version:e.version,onRegisterIframeRef:e=>this.props.onRegisterIframeRef(e),onUnregisterIframeRef:e=>this.props.onUnregisterIframeRef(e),handleNavigation:this.props.handleNavigation})]})}else e.lastScrollPosition&&=(setTimeout(e=>{var t;if((t=this.refTabContent.current)!=null&&t.parentNode){var n;((n=this.refTabContent.current)==null?void 0:n.parentNode).scrollTop=e}},200,e.lastScrollPosition),0);this.shouldUpdateAfterDialogClosed&&(this.shouldUpdateAfterDialogClosed=!1,this.statesUpdateTimer||(this.statesUpdateTimer||=setTimeout(()=>{this.statesUpdateTimer=null,this.forceUpdate()},300)));let t=null;if(this.state.hostInfo){let n=this.state.hostInfo[`Disk free`],r=this.state.hostInfo[`Disk size`],i=n&&r?Math.round(n/(r/100)):null,a=this.state.percent&&this.state.memFree!==null?Math.round(this.state.memFree*100/this.state.percent):null;t=T(E,{sx:X.hostInfo,children:[i===null?null:e.renderUsageBar(w(lt,{sx:X.usageIcon}),100-i,T(x,{children:[T(`div`,{children:[this.t(`Disk free`),`: `,i,`% = `,I.formatBytes(n)]}),T(`div`,{children:[this.t(`Disk size`),`: `,I.formatBytes(r)]})]})),this.state.percent===null?null:e.renderUsageBar(w(yt,{sx:X.usageIcon}),100-this.state.percent,T(x,{children:[T(`div`,{children:[this.t(`Total RAM usage`),`: `,this.state.mem,` Mb`]}),T(`div`,{children:[this.t(`Free`),`: `,this.state.percent,`% = `,this.state.memFree,` Mb`]}),a?T(`div`,{children:[this.t(`RAM`),`: `,a,` Mb`]}):null]})),T(`span`,{children:[`[`,this.t(`Host`),`: `,this.props.currentHostName,` - `,this.state.processes,` `,this.state.processes===1?this.t(`process`):this.t(`processes`),`]`]})]})}return T(ve,{children:[this.renderFilterDialog(),T(s,{children:[this.props.menuButtonSpace?w(E,{sx:{width:40,flexShrink:0}}):null,w(O,{title:this.t(`Show / hide List`),slotProps:{popper:{sx:X.tooltip}},children:w(A,{size:`large`,onClick:()=>{this.setState({viewMode:!this.state.viewMode}),this.localStorage.setItem(`Instances.viewMode`,this.state.viewMode?`false`:`true`)},children:this.state.viewMode?w(Me,{}):w(ut,{})})}),!this.state.viewMode&&w(O,{title:this.t(`Category`),slotProps:{popper:{sx:X.tooltip}},children:w(A,{size:`large`,onClick:()=>{this.setState({viewCategory:!this.state.viewCategory}),this.localStorage.setItem(`Instances.viewCategory`,this.state.viewCategory?`false`:`true`)},children:w(Be,{color:this.state.viewCategory?`primary`:`inherit`})})}),!this.state.viewMode&&this.state.viewCategory&&T(x,{children:[w(O,{title:this.t(`expand all`),slotProps:{popper:{sx:X.tooltip}},children:w(A,{size:`large`,onClick:()=>{let e=[];(this._cacheList||[]).forEach(({category:t})=>!e.includes(t)&&e.push(t)),e.sort(),this.localStorage.setItem(`Instances.expandedFolder`,JSON.stringify(e)),this.setState({expandedFolder:e})},children:w(Ae,{})})}),w(O,{title:this.t(`collapse all`),slotProps:{popper:{sx:X.tooltip}},children:w(A,{size:`large`,onClick:()=>{this.localStorage.removeItem(`Instances.expandedFolder`),this.setState({expandedFolder:[]})},children:w(nt,{})})})]}),w(O,{title:this.t(`Reload`),slotProps:{popper:{sx:X.tooltip}},children:w(A,{size:`large`,onClick:()=>this.getData(!0),children:w(Ne,{})})}),this.props.hosts.length>1?w(O,{title:this.t(`Show instances only for current host`),slotProps:{popper:{sx:X.tooltip}},children:w(A,{size:`large`,onClick:()=>{this.setState({onlyCurrentHost:!this.state.onlyCurrentHost}),this.localStorage.setItem(`Instances.onlyCurrentHost`,this.state.onlyCurrentHost?`false`:`true`)},children:w(vt,{color:this.state.onlyCurrentHost?`primary`:`inherit`})})}):null,w(O,{title:this.t(this.state.playArrow?this.state.playArrow===1?`Showed only running instances`:`Showed only stopped instances`:`Show running or stopped instances`),slotProps:{popper:{sx:X.tooltip}},children:w(A,{size:`large`,onClick:()=>this.changeStartedStopped(),children:w(ne,{style:this.state.playArrow===2?{color:`red`}:void 0,color:this.state.playArrow===1?`primary`:`inherit`})})}),w(O,{title:this.t(`Filter instances`),slotProps:{popper:{sx:X.tooltip}},children:w(A,{size:`large`,onClick:()=>this.setState({showFilterDialog:!0}),sx:this.state.filterMode||this.state.filterStatus||this.state.sortColumn?X.filterActive:void 0,children:w(we,{style:{width:16,height:16}})})}),this.props.expertMode&&this.state.compact?w(bt,{title:this.t(`Filter specific compact group`),t:this.t,arrayItem:[{name:`All`},{name:`controller`},{name:`default`},...Array(this.state.maxCompactGroupNumber-1).fill(0).map((e,t)=>({name:t+2}))],buttonIcon:w(st,{style:{marginRight:4},color:`primary`}),onClick:e=>this.changeCompactGroup(e),value:this.state.filterCompactGroup}):null,w(`div`,{style:X.grow}),w(Ye,{variant:`standard`,inputRef:this.inputRef,label:this.t(`Filter`),sx:{margin:{xs:`0 0 2px 16px`,md:`5px 0 5px 0`}},defaultValue:this.state.filterText,onChange:e=>this.handleFilterChange(e),slotProps:{input:{endAdornment:this.state.filterText?w(ie,{position:`end`,children:w(A,{tabIndex:-1,size:`small`,onClick:()=>{this.inputRef.current&&(this.inputRef.current.value=``),this._cacheList=null,this.setState({filterText:``}),this.localStorage.setItem(`instances.filter`,``)},children:w(We,{})})}):null}}}),w(`div`,{style:X.grow}),w(E,{component:`span`,sx:{display:{xs:`none`,sm:`inline-block`}},children:t}),w(E,{sx:{ml:`auto`,pl:1},children:this.props.hostSelector})]}),w(P,{overflow:`auto`,children:w(`div`,{ref:this.refTabContent,style:this.state.viewMode?X.cards:void 0,children:this.getPanels()})})]})}};p(On,`lastScrollPosition`,0);var kn=oe()(On);export{kn as default};