@64mb/freelens-power 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/README.md +5 -4
  2. package/THIRD_PARTY_LICENSES +1707 -0
  3. package/out/main/ai.js +63 -23
  4. package/out/main/ai.js.map +1 -1
  5. package/out/main/cluster-icons-catalog.js +28 -0
  6. package/out/main/cluster-icons-catalog.js.map +1 -0
  7. package/out/main/cluster-icons.js +125 -0
  8. package/out/main/cluster-icons.js.map +1 -0
  9. package/out/main/common/ai-terminal-context.js +51 -0
  10. package/out/main/common/ai-terminal-context.js.map +1 -0
  11. package/out/main/common/ai.js.map +1 -1
  12. package/out/main/common/cluster-icon-ipc.js +6 -0
  13. package/out/main/common/cluster-icon-ipc.js.map +1 -0
  14. package/out/main/common/cluster-icons.js +121 -0
  15. package/out/main/common/cluster-icons.js.map +1 -0
  16. package/out/main/common/dashboard.js +1 -1
  17. package/out/main/common/dashboard.js.map +1 -1
  18. package/out/main/common/settings-export.js +3 -1
  19. package/out/main/common/settings-export.js.map +1 -1
  20. package/out/main/common/store/cluster-icons-store.js +32 -0
  21. package/out/main/common/store/cluster-icons-store.js.map +1 -0
  22. package/out/main/common/store/monitoring-preferences-store.js +5 -0
  23. package/out/main/common/store/monitoring-preferences-store.js.map +1 -1
  24. package/out/main/diagnostics-menu-order.js +57 -0
  25. package/out/main/diagnostics-menu-order.js.map +1 -0
  26. package/out/main/index.js +9 -1
  27. package/out/main/index.js.map +1 -1
  28. package/out/main/monitoring-history.js +13 -3
  29. package/out/main/monitoring-history.js.map +1 -1
  30. package/out/renderer/_virtual/_global-external_react-dom.js +2 -1
  31. package/out/renderer/_virtual/_global-external_react.js +10 -5
  32. package/out/renderer/_virtual/_rolldown/runtime.js +22 -0
  33. package/out/renderer/ai-terminal-context.js +200 -0
  34. package/out/renderer/ai-terminal-context.js.map +1 -0
  35. package/out/renderer/ai.js +90 -9
  36. package/out/renderer/ai.js.map +1 -1
  37. package/out/renderer/appearance.js +1 -0
  38. package/out/renderer/appearance.js.map +1 -1
  39. package/out/renderer/cluster-icon-colors.js +188 -0
  40. package/out/renderer/cluster-icon-colors.js.map +1 -0
  41. package/out/renderer/cluster-icons.js +304 -0
  42. package/out/renderer/cluster-icons.js.map +1 -0
  43. package/out/renderer/dashboard.js +8 -5
  44. package/out/renderer/dashboard.js.map +1 -1
  45. package/out/renderer/details/secret-certificate-details.js +9 -2
  46. package/out/renderer/details/secret-certificate-details.js.map +1 -1
  47. package/out/renderer/diagnostics.css.js +39 -0
  48. package/out/renderer/diagnostics.css.js.map +1 -0
  49. package/out/renderer/diagnostics.js +796 -343
  50. package/out/renderer/diagnostics.js.map +1 -1
  51. package/out/renderer/index.js +9 -4
  52. package/out/renderer/index.js.map +1 -1
  53. package/out/renderer/monitoring-details-chart.js +42 -0
  54. package/out/renderer/monitoring-details-chart.js.map +1 -0
  55. package/out/renderer/monitoring-history-collection.js +2 -18
  56. package/out/renderer/monitoring-history-collection.js.map +1 -1
  57. package/out/renderer/monitoring-history-view.js +111 -34
  58. package/out/renderer/monitoring-history-view.js.map +1 -1
  59. package/out/renderer/monitoring.js +68 -27
  60. package/out/renderer/monitoring.js.map +1 -1
  61. package/out/renderer/node-monitoring.js +23 -12
  62. package/out/renderer/node-monitoring.js.map +1 -1
  63. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +10 -0
  64. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js.map +1 -0
  65. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +8 -0
  66. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js.map +1 -0
  67. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +9 -0
  68. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js.map +1 -0
  69. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +9 -0
  70. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js.map +1 -0
  71. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +8 -0
  72. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/classCallCheck.js.map +1 -0
  73. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/createClass.js +15 -0
  74. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/createClass.js.map +1 -0
  75. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/createSuper.js +19 -0
  76. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/createSuper.js.map +1 -0
  77. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/defineProperty.js +14 -0
  78. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/defineProperty.js.map +1 -0
  79. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/extends.js +19 -0
  80. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
  81. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +15 -0
  82. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js.map +1 -0
  83. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/inherits.js +14 -0
  84. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/inherits.js.map +1 -0
  85. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +18 -0
  86. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js.map +1 -0
  87. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +8 -0
  88. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/iterableToArray.js.map +1 -0
  89. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +26 -0
  90. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js.map +1 -0
  91. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +8 -0
  92. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js.map +1 -0
  93. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +8 -0
  94. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js.map +1 -0
  95. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +27 -0
  96. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/objectSpread2.js.map +1 -0
  97. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +15 -0
  98. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js.map +1 -0
  99. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +14 -0
  100. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -0
  101. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +12 -0
  102. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js.map +1 -0
  103. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +15 -0
  104. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +1 -0
  105. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +12 -0
  106. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/slicedToArray.js.map +1 -0
  107. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +8 -0
  108. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js.map +1 -0
  109. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +12 -0
  110. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js.map +1 -0
  111. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +16 -0
  112. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +1 -0
  113. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +11 -0
  114. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js.map +1 -0
  115. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/typeof.js +18 -0
  116. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/typeof.js.map +1 -0
  117. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +13 -0
  118. package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js.map +1 -0
  119. package/out/renderer/node_modules/.pnpm/@emotion_cache@11.14.0/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js +237 -0
  120. package/out/renderer/node_modules/.pnpm/@emotion_cache@11.14.0/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js.map +1 -0
  121. package/out/renderer/node_modules/.pnpm/@emotion_hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js +25 -0
  122. package/out/renderer/node_modules/.pnpm/@emotion_hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js.map +1 -0
  123. package/out/renderer/node_modules/.pnpm/@emotion_memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +12 -0
  124. package/out/renderer/node_modules/.pnpm/@emotion_memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js.map +1 -0
  125. package/out/renderer/node_modules/.pnpm/@emotion_react@11.14.0_@types_react@17.0.93_react@17.0.2/node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js +58 -0
  126. package/out/renderer/node_modules/.pnpm/@emotion_react@11.14.0_@types_react@17.0.93_react@17.0.2/node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js.map +1 -0
  127. package/out/renderer/node_modules/.pnpm/@emotion_react@11.14.0_@types_react@17.0.93_react@17.0.2/node_modules/@emotion/react/dist/emotion-react.browser.esm.js +54 -0
  128. package/out/renderer/node_modules/.pnpm/@emotion_react@11.14.0_@types_react@17.0.93_react@17.0.2/node_modules/@emotion/react/dist/emotion-react.browser.esm.js.map +1 -0
  129. package/out/renderer/node_modules/.pnpm/@emotion_serialize@1.3.3/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js +133 -0
  130. package/out/renderer/node_modules/.pnpm/@emotion_serialize@1.3.3/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js.map +1 -0
  131. package/out/renderer/node_modules/.pnpm/@emotion_sheet@1.4.0/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js +65 -0
  132. package/out/renderer/node_modules/.pnpm/@emotion_sheet@1.4.0/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js.map +1 -0
  133. package/out/renderer/node_modules/.pnpm/@emotion_unitless@0.10.0/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +54 -0
  134. package/out/renderer/node_modules/.pnpm/@emotion_unitless@0.10.0/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js.map +1 -0
  135. package/out/renderer/node_modules/.pnpm/@emotion_use-insertion-effect-with-fallbacks@1.2.0_react@17.0.2/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js +12 -0
  136. package/out/renderer/node_modules/.pnpm/@emotion_use-insertion-effect-with-fallbacks@1.2.0_react@17.0.2/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js.map +1 -0
  137. package/out/renderer/node_modules/.pnpm/@emotion_utils@1.4.2/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js +30 -0
  138. package/out/renderer/node_modules/.pnpm/@emotion_utils@1.4.2/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js.map +1 -0
  139. package/out/renderer/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +211 -0
  140. package/out/renderer/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
  141. package/out/renderer/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +97 -0
  142. package/out/renderer/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
  143. package/out/renderer/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +31 -0
  144. package/out/renderer/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
  145. package/out/renderer/node_modules/.pnpm/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +93 -0
  146. package/out/renderer/node_modules/.pnpm/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js.map +1 -0
  147. package/out/renderer/node_modules/.pnpm/memoize-one@6.0.0/node_modules/memoize-one/dist/memoize-one.esm.js +38 -0
  148. package/out/renderer/node_modules/.pnpm/memoize-one@6.0.0/node_modules/memoize-one/dist/memoize-one.esm.js.map +1 -0
  149. package/out/renderer/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js +159 -0
  150. package/out/renderer/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js.map +1 -0
  151. package/out/renderer/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js +103 -0
  152. package/out/renderer/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js.map +1 -0
  153. package/out/renderer/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +18 -0
  154. package/out/renderer/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js.map +1 -0
  155. package/out/renderer/node_modules/.pnpm/react-select@5.10.2_@types_react@17.0.93_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/Select-ef7c0426.esm.js +2200 -0
  156. package/out/renderer/node_modules/.pnpm/react-select@5.10.2_@types_react@17.0.93_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/Select-ef7c0426.esm.js.map +1 -0
  157. package/out/renderer/node_modules/.pnpm/react-select@5.10.2_@types_react@17.0.93_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/index-641ee5b8.esm.js +992 -0
  158. package/out/renderer/node_modules/.pnpm/react-select@5.10.2_@types_react@17.0.93_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/index-641ee5b8.esm.js.map +1 -0
  159. package/out/renderer/node_modules/.pnpm/react-select@5.10.2_@types_react@17.0.93_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/react-select.esm.js +14 -0
  160. package/out/renderer/node_modules/.pnpm/react-select@5.10.2_@types_react@17.0.93_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/react-select.esm.js.map +1 -0
  161. package/out/renderer/node_modules/.pnpm/react-select@5.10.2_@types_react@17.0.93_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/useStateManager-7e1e8489.esm.js +56 -0
  162. package/out/renderer/node_modules/.pnpm/react-select@5.10.2_@types_react@17.0.93_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/useStateManager-7e1e8489.esm.js.map +1 -0
  163. package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Enum.js +22 -0
  164. package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Enum.js.map +1 -0
  165. package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Middleware.js +30 -0
  166. package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Middleware.js.map +1 -0
  167. package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Parser.js +164 -0
  168. package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Parser.js.map +1 -0
  169. package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Serializer.js +37 -0
  170. package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Serializer.js.map +1 -0
  171. package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Tokenizer.js +245 -0
  172. package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Tokenizer.js.map +1 -0
  173. package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Utility.js +120 -0
  174. package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Utility.js.map +1 -0
  175. package/out/renderer/node_modules/.pnpm/use-isomorphic-layout-effect@1.2.1_@types_react@17.0.93_react@17.0.2/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js +6 -0
  176. package/out/renderer/node_modules/.pnpm/use-isomorphic-layout-effect@1.2.1_@types_react@17.0.93_react@17.0.2/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js.map +1 -0
  177. package/out/renderer/pod-monitoring.js +15 -19
  178. package/out/renderer/pod-monitoring.js.map +1 -1
  179. package/out/renderer/preferences/ai-shortcuts-preferences.js +12 -4
  180. package/out/renderer/preferences/ai-shortcuts-preferences.js.map +1 -1
  181. package/out/renderer/preferences/dashboard-preferences.js +20 -4
  182. package/out/renderer/preferences/dashboard-preferences.js.map +1 -1
  183. package/out/renderer/preferences/monitoring-preferences.js +131 -44
  184. package/out/renderer/preferences/monitoring-preferences.js.map +1 -1
  185. package/out/renderer/preferences/preferences.js +31 -7
  186. package/out/renderer/preferences/preferences.js.map +1 -1
  187. package/out/renderer/read-only.js +2 -2
  188. package/out/renderer/read-only.js.map +1 -1
  189. package/out/renderer/src/common/ai-terminal-context.js +51 -0
  190. package/out/renderer/src/common/ai-terminal-context.js.map +1 -0
  191. package/out/renderer/src/common/ai.js.map +1 -1
  192. package/out/renderer/src/common/cluster-icon-ipc.js +6 -0
  193. package/out/renderer/src/common/cluster-icon-ipc.js.map +1 -0
  194. package/out/renderer/src/common/cluster-icons.js +133 -0
  195. package/out/renderer/src/common/cluster-icons.js.map +1 -0
  196. package/out/renderer/src/common/dashboard.js +1 -1
  197. package/out/renderer/src/common/dashboard.js.map +1 -1
  198. package/out/renderer/src/common/date-time.js +11 -0
  199. package/out/renderer/src/common/date-time.js.map +1 -0
  200. package/out/renderer/src/common/monitoring-history.js +2 -0
  201. package/out/renderer/src/common/monitoring-history.js.map +1 -1
  202. package/out/renderer/src/common/resource-diagnostics.js.map +1 -1
  203. package/out/renderer/src/common/settings-export.js.map +1 -1
  204. package/out/renderer/src/common/store/monitoring-preferences-store.js +5 -0
  205. package/out/renderer/src/common/store/monitoring-preferences-store.js.map +1 -1
  206. package/out/renderer/welcome.js +28 -6
  207. package/out/renderer/welcome.js.map +1 -1
  208. package/package.json +3 -2
@@ -1 +1 @@
1
- {"version":3,"file":"monitoring.js","names":[],"sources":["../../src/renderer/monitoring.tsx"],"sourcesContent":["import { Renderer } from \"@freelensapp/extensions\";\nimport { reaction } from \"mobx\";\nimport { type CSSProperties, useEffect, useLayoutEffect, useRef, useState } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport {\n aggregateMetrics,\n aggregateResources,\n MONITORING_INTERVAL as INTERVAL,\n MAX_SAMPLES,\n type MonitoringSample,\n} from \"../common/monitoring-math\";\nimport { MonitoringPreferencesStore } from \"../common/store/monitoring-preferences-store\";\nimport { getMonitoringSnapshot, retainMonitoringCollector } from \"./monitoring-collector\";\nimport { MonitoringHistoryRange, useMonitoringHistory } from \"./monitoring-history-view\";\n\nexport {\n aggregateMetrics,\n aggregateResources,\n effectivePodResource,\n MAX_SAMPLES,\n type MonitoringNode,\n type MonitoringPod,\n type MonitoringSample,\n parseQuantity,\n} from \"../common/monitoring-math\";\n\nexport function formatMonitoringTime(time: number): string {\n return new Date(time).toLocaleTimeString([], {\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n hourCycle: \"h23\",\n });\n}\n\nfunction ResourceTitle({ metric, label }: { metric: \"cpu\" | \"memory\"; label?: string }) {\n return (\n <strong style={{ display: \"inline-flex\", alignItems: \"center\", gap: 6 }}>\n <span className=\"Icon material\" aria-hidden=\"true\" style={{ \"--size\": \"18px\", fontWeight: 400 } as CSSProperties}>\n <span className=\"icon\">{metric === \"cpu\" ? \"developer_board\" : \"memory\"}</span>\n </span>\n {label ?? (metric === \"cpu\" ? \"CPU\" : \"Memory\")}\n </strong>\n );\n}\n\nexport function MetricChart({\n metric,\n samples,\n status,\n scope = \"node\",\n}: {\n metric: \"cpu\" | \"memory\";\n samples: MonitoringSample[];\n status: string;\n scope?: \"node\" | \"pod\";\n}) {\n const [selectedTime, setSelectedTime] = useState<number>();\n const [pinned, setPinned] = useState(false);\n const previousMetric = useRef(metric);\n useEffect(() => {\n if (\n previousMetric.current !== metric ||\n (selectedTime !== undefined && !samples.some((sample) => sample.time === selectedTime))\n ) {\n setPinned(false);\n setSelectedTime(undefined);\n }\n previousMetric.current = metric;\n }, [metric, samples, selectedTime]);\n useEffect(() => {\n if (!pinned) return;\n const escape = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n event.preventDefault();\n event.stopPropagation();\n setPinned(false);\n setSelectedTime(undefined);\n }\n };\n document.addEventListener(\"keydown\", escape, true);\n return () => document.removeEventListener(\"keydown\", escape, true);\n }, [pinned]);\n const chartRef = useRef<SVGSVGElement>(null);\n const [width, setWidth] = useState(600);\n useLayoutEffect(() => {\n const chart = chartRef.current;\n if (!chart) return;\n const measure = () => {\n const measured = chart.getBoundingClientRect().width;\n if (measured > 0) setWidth(measured);\n };\n measure();\n const observer = typeof ResizeObserver === \"undefined\" ? undefined : new ResizeObserver(measure);\n observer?.observe(chart);\n window.addEventListener(\"resize\", measure);\n return () => {\n observer?.disconnect();\n window.removeEventListener(\"resize\", measure);\n };\n }, []);\n const plotWidth = Math.max(1, width - 112);\n const last = samples.at(-1);\n const selected = samples.find((sample) => sample.time === selectedTime);\n const label = metric === \"cpu\" ? \"CPU\" : \"Memory\";\n const format = (value: number) =>\n metric === \"cpu\" ? `${value.toFixed(2)} cores` : `${(value / 1024 ** 3).toFixed(2)} GiB`;\n const series = [\n { key: \"usage\", label: \"Usage\", color: \"#c93dce\", value: (sample: MonitoringSample) => sample[metric] },\n ...([\"requests\", \"allocatable\", \"capacity\"] as const).map((key) => ({\n key,\n label: { requests: \"Requests\", allocatable: \"Allocatable Capacity\", capacity: \"Capacity\" }[key],\n color: { requests: \"#4caf50\", allocatable: \"#5486b5\", capacity: \"var(--textColorSecondary)\" }[key],\n value: (sample: MonitoringSample) => sample.resources?.[metric][key],\n })),\n ];\n const visibleSeries =\n scope === \"pod\" ? series.filter((line) => line.key === \"usage\" || line.key === \"requests\") : series;\n const max =\n Math.max(\n ...samples.flatMap((sample) => [\n ...visibleSeries.map((line) => line.value(sample) ?? 0),\n sample.historical?.[metric]?.max ?? 0,\n ]),\n 0.001,\n ) * 1.1;\n const end = last?.time ?? Date.now();\n const start = samples[0]?.time ?? end;\n const duration = Math.max(end - start, INTERVAL);\n const x = (sample: MonitoringSample) => 88 + ((sample.time - start) / duration) * plotWidth;\n const y = (sample: MonitoringSample) => 208 - (sample[metric] / max) * 184;\n const selectNearest = (event: React.MouseEvent<SVGSVGElement>) => {\n const bounds = event.currentTarget.getBoundingClientRect();\n if (!bounds.width || !samples.length) return;\n const scale = Math.min(bounds.width / width, (bounds.height || 250) / 250);\n const offset = (bounds.width - width * scale) / 2;\n const position = (event.clientX - bounds.left - offset) / scale;\n const time = start + ((position - 88) / plotWidth) * duration;\n const nearest = samples.reduce((nearest, sample) =>\n Math.abs(sample.time - time) < Math.abs(nearest.time - time) ? sample : nearest,\n ).time;\n setSelectedTime(nearest);\n return nearest;\n };\n return (\n <section\n aria-label={`${label} metrics-server usage`}\n style={{\n padding: \"var(--power-monitoring-trend-top, 16px) 16px 16px\",\n background: \"var(--contentColor)\",\n minWidth: 0,\n minHeight: 280,\n position: \"relative\",\n }}\n >\n <div style={{ display: \"flex\", alignItems: \"center\", gap: 12 }}>\n <ResourceTitle metric={metric} />\n <span>{status ? \"Unavailable\" : last ? format(last[metric]) : \"Collecting…\"}</span>\n </div>\n <svg\n ref={chartRef}\n data-monitoring-trend=\"\"\n viewBox={`0 0 ${width} 250`}\n role=\"img\"\n tabIndex={0}\n aria-label={`${label} usage over collected samples. Use arrow keys to inspect samples. Click or press Enter to pin the tooltip, Escape to dismiss`}\n onMouseMove={(event) => {\n if (!pinned) selectNearest(event);\n }}\n onClick={(event) => {\n if (pinned) setPinned(false);\n else if (samples.length) {\n if (selectNearest(event) === undefined && !selected) setSelectedTime(last?.time);\n setPinned(true);\n }\n }}\n onMouseLeave={() => {\n if (!pinned) setSelectedTime(undefined);\n }}\n onFocus={() => {\n if (!pinned) setSelectedTime(last?.time);\n }}\n onBlur={() => {\n if (!pinned) setSelectedTime(undefined);\n }}\n onKeyDown={(event) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n if (samples.length) {\n if (!selected) setSelectedTime(last?.time);\n setPinned(!pinned);\n }\n return;\n }\n if (event.key !== \"ArrowLeft\" && event.key !== \"ArrowRight\") return;\n event.preventDefault();\n const index = samples.findIndex((sample) => sample.time === selectedTime);\n setSelectedTime(\n samples[\n Math.max(\n 0,\n Math.min(\n samples.length - 1,\n (index < 0 ? samples.length - 1 : index) + (event.key === \"ArrowLeft\" ? -1 : 1),\n ),\n )\n ]?.time,\n );\n }}\n style={{ width: \"100%\", height: 250, color: \"#c93dce\", display: \"block\" }}\n >\n <title>Click to pin tooltip · click again or Escape to unpin</title>\n {[0, 0.5, 1].map((fraction) => (\n <g key={fraction}>\n <line\n x1=\"88\"\n x2={width - 24}\n y1={208 - fraction * 184}\n y2={208 - fraction * 184}\n stroke=\"var(--borderFaintColor)\"\n />\n <text x=\"80\" y={212 - fraction * 184} textAnchor=\"end\" fill=\"var(--textColorSecondary)\" fontSize=\"11\">\n {format(max * fraction)}\n </text>\n </g>\n ))}\n {samples.map((sample) => {\n const summary = sample.historical?.[metric];\n if (!summary || summary.min === summary.max) return null;\n return (\n <line\n key={`range:${sample.time}`}\n data-monitoring-extrema=\"\"\n x1={x(sample)}\n x2={x(sample)}\n y1={208 - (summary.max / max) * 184}\n y2={208 - (summary.min / max) * 184}\n stroke=\"#c93dce\"\n strokeOpacity={0.35}\n strokeWidth={4}\n />\n );\n })}\n {visibleSeries.map((line) => (\n <path\n key={line.key}\n data-monitoring-series={line.key}\n d={samples.reduce((path, sample, index) => {\n const value = line.value(sample);\n if (value === undefined) return path;\n const previous = index ? line.value(samples[index - 1]) : undefined;\n return `${path} ${previous === undefined || sample.breakBefore || sample.time - samples[index - 1].time > 1.8 * Math.max(sample.historical?.[metric]?.resolution ?? INTERVAL, samples[index - 1].historical?.[metric]?.resolution ?? INTERVAL) ? \"M\" : \"L\"}${x(sample)},${208 - (value / max) * 184}`;\n }, \"\")}\n fill=\"none\"\n stroke={line.color}\n strokeWidth=\"2\"\n strokeDasharray={line.key === \"capacity\" || line.key === \"allocatable\" ? \"5 3\" : undefined}\n />\n ))}\n {samples.map((sample) => (\n <circle key={sample.time} cx={x(sample)} cy={y(sample)} r=\"2\" fill=\"currentColor\">\n <title>\n {formatMonitoringTime(sample.time)}: {format(sample[metric])}\n </title>\n </circle>\n ))}\n {samples.length > 0 &&\n [0, 0.5, 1].map((fraction) => (\n <text\n key={fraction}\n x={88 + fraction * plotWidth}\n y=\"235\"\n textAnchor={fraction === 0 ? \"start\" : fraction === 1 ? \"end\" : \"middle\"}\n fill=\"var(--textColorSecondary)\"\n fontSize=\"11\"\n >\n {formatMonitoringTime(start + fraction * duration)}\n </text>\n ))}\n {selected && (\n <line\n data-monitoring-crosshair=\"\"\n x1={x(selected)}\n x2={x(selected)}\n y1=\"24\"\n y2=\"208\"\n stroke=\"var(--textColorSecondary)\"\n strokeDasharray=\"4 3\"\n />\n )}\n </svg>\n <style>{`\n @keyframes freelens-power-metric-tooltip-enter { from { opacity:0; transform:translateY(2px) } to { opacity:1; transform:translateY(0) } }\n [data-monitoring-tooltip] { animation:freelens-power-metric-tooltip-enter 140ms ease-out }\n @media (prefers-reduced-motion:reduce) { [data-monitoring-tooltip] { animation:none } }\n `}</style>\n {selected && (\n <div\n data-monitoring-tooltip=\"\"\n role=\"tooltip\"\n style={{\n position: \"absolute\",\n top: 44,\n right: 24,\n padding: 8,\n background: \"var(--contentColor)\",\n border: \"1px solid var(--borderFaintColor)\",\n pointerEvents: \"none\",\n }}\n >\n <div>\n {formatMonitoringTime(selected.time)}\n {pinned ? \" · Pinned\" : \"\"}\n </div>\n {visibleSeries.map((line) => (\n <div key={line.key} style={{ color: line.color }}>\n {line.label}: {line.value(selected) === undefined ? \"Unavailable\" : format(line.value(selected)!)}\n </div>\n ))}\n {selected.historical?.[metric] && (\n <div>\n Min: {format(selected.historical[metric]!.min)} · Max: {format(selected.historical[metric]!.max)}\n <br />\n {selected.historical[metric]!.count} samples ·{\" \"}\n {Math.round(selected.historical[metric]!.resolution / 1000)}s bucket\n </div>\n )}\n <div style={{ color: \"var(--textColorSecondary)\", marginTop: 4, fontSize: 10 }}>\n {pinned ? \"Click chart or Escape to unpin\" : \"Click or Enter to pin\"}\n </div>\n </div>\n )}\n <div\n aria-label={`${label} chart legend`}\n style={{ display: \"flex\", flexWrap: \"wrap\", gap: \"6px 16px\", marginBottom: 8 }}\n >\n {visibleSeries.map((line) => (\n <span key={line.key}>\n <span style={{ color: line.color }}>●</span> {line.label}\n </span>\n ))}\n </div>\n {last?.resourceStatus && (\n <div role=\"status\" style={{ color: \"var(--textColorSecondary)\", marginBottom: 8 }}>\n {last.resourceStatus}\n </div>\n )}\n {(scope === \"node\" || status || !samples.length) && (\n <div\n style={{ fontSize: 11, color: \"var(--textColorSecondary)\", display: \"flex\", alignItems: \"center\", gap: 4 }}\n role=\"status\"\n aria-label={`${scope} metrics status`}\n >\n {scope === \"node\" && (\n <sup aria-hidden=\"true\" style={{ fontSize: 12 }}>\n *\n </sup>\n )}\n <span>{status || (samples.length ? \"metrics-server data\" : \"Waiting for metrics-server data\")}</span>\n </div>\n )}\n </section>\n );\n}\n\nfunction ResourceDonut({\n metric,\n sample,\n status,\n}: {\n metric: \"cpu\" | \"memory\";\n sample?: MonitoringSample;\n status: string;\n}) {\n const [activeRing, setActiveRing] = useState<number>();\n useEffect(() => {\n if (activeRing === undefined) return;\n const dismiss = (event: KeyboardEvent) => {\n if (event.key !== \"Escape\") return;\n event.preventDefault();\n event.stopPropagation();\n setActiveRing(undefined);\n };\n document.addEventListener(\"keydown\", dismiss, true);\n return () => document.removeEventListener(\"keydown\", dismiss, true);\n }, [activeRing]);\n const label = metric === \"cpu\" ? \"CPU\" : \"Memory\";\n const totals = sample?.resources?.[metric];\n const format = (value: number) =>\n metric === \"cpu\" ? `${value.toFixed(2)} cores` : `${(value / 1024 ** 3).toFixed(2)} GiB`;\n const available = (value?: number) => (value === undefined ? \"Unavailable\" : format(value));\n const denominator = totals?.allocatable;\n const rings = [\n { label: \"Usage\", color: \"#c93dce\", value: sample?.[metric] },\n { label: \"Requests\", color: \"#4caf50\", value: totals?.requests },\n ];\n const percentage = (value?: number) =>\n value !== undefined && denominator !== undefined && denominator > 0 ? (value / denominator) * 100 : undefined;\n const usagePercent = percentage(sample?.[metric]);\n const unused =\n sample?.completeUsage && denominator !== undefined ? format(denominator - sample[metric]) : \"Unavailable\";\n const unrequested =\n denominator !== undefined && totals?.requests !== undefined ? format(denominator - totals.requests) : \"Unavailable\";\n const allocationDetail = `Allocatable: ${available(denominator)}. Schedulable capacity after system reservations, used as the denominator for both rings. Physical Capacity: ${available(totals?.capacity)}. Unused allocatable (usage): ${unused}. Unrequested: ${unrequested}`;\n const hovered = activeRing === undefined ? undefined : rings[activeRing];\n const tooltipId = `power-monitoring-${metric}-donut-tooltip`;\n return (\n <section\n aria-label={`${label} resource summary`}\n style={{\n padding: \"var(--power-monitoring-summary-top, 16px) 16px 16px\",\n minWidth: 0,\n background: \"var(--contentColor)\",\n position: \"relative\",\n overflow: \"visible\",\n }}\n >\n <ResourceTitle metric={metric} label={metric === \"memory\" ? \"RAM\" : \"CPU\"} />\n <svg\n data-monitoring-donut=\"\"\n viewBox=\"0 0 200 200\"\n role=\"img\"\n aria-label={`${label} usage and requests relative to allocatable capacity`}\n style={{ display: \"block\", width: \"100%\", height: 200 }}\n >\n {rings.map((ring, index) => {\n const radius = 76 - index * 18;\n const percent = percentage(ring.value);\n const detail = `${ring.label}: ${available(ring.value)}${percent === undefined ? \"\" : ` (${percent.toFixed(1)}% of allocatable${percent > 100 ? \", over allocatable\" : \"\"})`}`;\n return (\n <g\n key={ring.label}\n tabIndex={0}\n role=\"img\"\n aria-label={detail}\n aria-describedby={activeRing === index ? tooltipId : undefined}\n onMouseEnter={() => setActiveRing(index)}\n onMouseMove={() => setActiveRing(index)}\n onMouseLeave={() => setActiveRing(undefined)}\n onFocus={() => setActiveRing(index)}\n onBlur={() => setActiveRing(undefined)}\n >\n <circle cx=\"100\" cy=\"100\" r={radius} fill=\"none\" stroke=\"var(--borderFaintColor)\" strokeWidth=\"12\" />\n {percent !== undefined && (\n <circle\n data-monitoring-ring={ring.label}\n cx=\"100\"\n cy=\"100\"\n r={radius}\n fill=\"none\"\n stroke={ring.color}\n strokeWidth=\"12\"\n pathLength=\"100\"\n strokeDasharray={`${Math.min(100, Math.max(0, percent))} 100`}\n transform=\"rotate(-90 100 100)\"\n />\n )}\n </g>\n );\n })}\n <text\n data-monitoring-usage-percentage=\"\"\n x=\"100\"\n y=\"100\"\n textAnchor=\"middle\"\n fill=\"var(--textColorPrimary)\"\n fontSize=\"26\"\n fontWeight=\"600\"\n >\n {usagePercent === undefined ? \"N/A\" : `${usagePercent.toFixed(1)}%`}\n </text>\n <text x=\"100\" y=\"120\" textAnchor=\"middle\" fill=\"var(--textColorPrimary)\" fontSize=\"12\">\n Usage\n </text>\n </svg>\n {hovered && (\n <div\n id={tooltipId}\n data-monitoring-tooltip=\"\"\n role=\"tooltip\"\n style={{\n position: \"absolute\",\n top: 48,\n left: 8,\n right: 8,\n zIndex: 20,\n padding: 8,\n border: \"1px solid var(--borderFaintColor)\",\n background: \"var(--contentColor)\",\n pointerEvents: \"none\",\n overflowWrap: \"anywhere\",\n boxShadow: \"0 3px 12px #0003\",\n }}\n >\n <div style={{ color: hovered.color }}>\n {hovered.label}: {available(hovered.value)}\n </div>\n <div>\n {percentage(hovered.value) === undefined\n ? \"Percentage unavailable\"\n : `${percentage(hovered.value)!.toFixed(1)}% of allocatable${percentage(hovered.value)! > 100 ? \" (over allocatable)\" : \"\"}`}\n </div>\n <div>Allocatable: {available(denominator)}</div>\n </div>\n )}\n <div aria-label={`${label} resource totals`} style={{ display: \"grid\", gap: 6, fontSize: 12 }}>\n {rings.map((ring) => (\n <div\n key={ring.label}\n title={`${ring.label} relative to allocatable capacity. ${ring.label === \"Usage\" ? `Unused allocatable (usage): ${unused}` : `Unrequested: ${unrequested}`}`}\n >\n <span style={{ color: ring.color }}>●</span> {ring.label}: {available(ring.value)}\n {percentage(ring.value) !== undefined && <span> ({percentage(ring.value)!.toFixed(1)}%)</span>}\n </div>\n ))}\n <div title={allocationDetail}>\n <span style={{ color: \"#5486b5\" }}>●</span> Allocatable: {available(denominator)}\n </div>\n </div>\n {(status || sample?.resourceStatus) && (\n <div role=\"status\" style={{ color: \"var(--textColorSecondary)\", fontSize: 11, marginTop: 8 }}>\n {status || sample?.resourceStatus}\n </div>\n )}\n </section>\n );\n}\n\nfunction MonitoringCharts({ samples, status }: { samples: MonitoringSample[]; status: string }) {\n const clusterId = Renderer.Catalog.activeCluster.get()?.metadata.uid;\n const history = useMonitoringHistory(\n clusterId ? { clusterId, scope: \"cluster\", uid: clusterId } : undefined,\n samples,\n );\n return (\n <div style={{ containerType: \"inline-size\" }}>\n <style>{`\n [data-monitoring-layout] { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr); gap:16px; align-items:stretch }\n [data-monitoring-trends], [data-monitoring-summaries] { display:contents }\n @container (min-width: 961px) {\n [data-monitoring-summaries] > section { --power-monitoring-summary-top:16px }\n }\n @container (max-width: 960px) {\n [data-monitoring-layout] { grid-template-columns:repeat(2,minmax(0,1fr)) }\n .power-ai-overview-actions + [data-testid=\"cluster-overview-page\"] [data-monitoring-trends] > section { --power-monitoring-trend-top:56px }\n }\n @container (max-width: 580px) {\n [data-monitoring-layout] { grid-template-columns:minmax(0,1fr) }\n .power-ai-overview-actions + [data-testid=\"cluster-overview-page\"] [data-monitoring-trends] > section:not(:first-child) { --power-monitoring-trend-top:16px }\n }\n `}</style>\n <div style={{ display: \"flex\", alignItems: \"center\", gap: 12, marginBottom: 8 }}>\n <MonitoringHistoryRange range={history.range} onChange={history.setRange} />\n <small role=\"status\">{history.status}</small>\n </div>\n <div data-monitoring-layout=\"\">\n <div data-monitoring-trends=\"\">\n {([\"cpu\", \"memory\"] as const).map((metric) => (\n <MetricChart key={metric} metric={metric} samples={history.samples} status={status} />\n ))}\n </div>\n <div data-monitoring-summaries=\"\">\n {([\"cpu\", \"memory\"] as const).map((metric) => (\n <ResourceDonut key={metric} metric={metric} sample={samples.at(-1)} status={status} />\n ))}\n </div>\n </div>\n </div>\n );\n}\n\nexport function startMonitoring(): () => void {\n const release = retainMonitoringCollector();\n const preferences = MonitoringPreferencesStore.getInstanceOrCreate<MonitoringPreferencesStore>();\n let stopCurrent: (() => void) | undefined;\n const stop = reaction(\n () => preferences.enabled,\n (enabled) => {\n stopCurrent?.();\n stopCurrent = enabled ? mountMonitoring() : undefined;\n },\n { fireImmediately: true },\n );\n return () => {\n stop();\n stopCurrent?.();\n release();\n };\n}\n\nfunction mountMonitoring(): () => void {\n const suppression = document.createElement(\"style\");\n suppression.setAttribute(\"data-freelens-power-native-metrics-suppression\", \"\");\n suppression.textContent = `\n [data-testid=\"cluster-overview-page\"] > [class*=\"ClusterMetrics\"],\n [data-testid=\"cluster-overview-page\"] > :has([class*=\"ClusterMetrics\"]),\n [data-testid=\"cluster-overview-page\"] > :is([class*=\"noMetrics\"], [data-testid=\"no-metrics-message\"]):not(:has(.PieChart)),\n [data-testid=\"cluster-overview-page\"] > :has([class*=\"noMetrics\"], [data-testid=\"no-metrics-message\"], [class*=\"cluster-pie-charts\"][class*=\"empty\"]):not(:has(.PieChart)) {\n display:none !important;\n }\n `;\n document.head.append(suppression);\n let host: HTMLElement | undefined;\n let overview: Element | null = null;\n let samples: MonitoringSample[] = [];\n let status = \"\";\n let renderedSamples: MonitoringSample[] | undefined;\n let renderedStatus: string | undefined;\n let cluster: string | undefined;\n let stopped = false;\n let pendingGeneration: number | undefined;\n let generation = 0;\n let nextSample = 0;\n const hidden = new Map<HTMLElement, string | null>();\n const restore = () => {\n for (const [element, original] of hidden) {\n if (original === null) element.removeAttribute(\"style\");\n else element.setAttribute(\"style\", original);\n }\n hidden.clear();\n if (host) {\n ReactDOM.unmountComponentAtNode(host);\n host.remove();\n host = undefined;\n renderedSamples = undefined;\n renderedStatus = undefined;\n }\n };\n const update = async () => {\n const currentCluster = Renderer.Catalog.activeCluster.get()?.metadata.uid;\n const currentOverview = document.querySelector('[data-testid=\"cluster-overview-page\"]');\n if (cluster !== currentCluster || overview !== currentOverview) {\n generation++;\n restore();\n samples = [];\n status = \"\";\n nextSample = 0;\n cluster = currentCluster;\n overview = currentOverview;\n }\n const cutoff = Date.now() - MAX_SAMPLES * INTERVAL;\n if (samples.length && samples[0].time < cutoff) samples = samples.filter((sample) => sample.time >= cutoff);\n if (!overview || !cluster || document.visibilityState === \"hidden\") return;\n if (!host) {\n host = document.createElement(\"div\");\n host.setAttribute(\"data-freelens-power-monitoring\", \"\");\n host.style.gridColumn = \"1 / -1\";\n hidden.set(overview as HTMLElement, overview.getAttribute(\"style\"));\n Object.assign((overview as HTMLElement).style, {\n gridTemplateAreas: \"none\",\n gridTemplateColumns: \"minmax(0, 1fr)\",\n gridTemplateRows: \"none\",\n height: \"auto\",\n });\n overview.prepend(host);\n }\n for (const title of overview.querySelectorAll<HTMLElement>(\".PieChart > .chart-title\")) {\n if (title.textContent !== \"CPU\" && title.textContent !== \"Memory\") continue;\n const panel = title.closest(\".PieChart\")?.parentElement;\n if (panel && panel.style.display !== \"none\") {\n if (!hidden.has(panel)) hidden.set(panel, panel.getAttribute(\"style\"));\n panel.style.display = \"none\";\n }\n }\n // native CSS modules retain [ClusterMetrics] in the generated class name\n for (const child of overview.children) {\n if (!(child instanceof HTMLElement) || child === host) continue;\n const nativeMetrics =\n child.matches('[class*=\"ClusterMetrics\"]') || child.querySelector('[class*=\"ClusterMetrics\"]');\n const unavailablePies =\n (child.matches('[class*=\"noMetrics\"], [data-testid=\"no-metrics-message\"]') ||\n child.querySelector(\n '[class*=\"noMetrics\"], [data-testid=\"no-metrics-message\"], [class*=\"cluster-pie-charts\"][class*=\"empty\"]',\n )) &&\n !child.querySelector(\".PieChart\");\n if ((nativeMetrics || unavailablePies) && child.style.display !== \"none\") {\n if (!hidden.has(child)) hidden.set(child, child.getAttribute(\"style\"));\n child.style.display = \"none\";\n }\n if (!hidden.has(child)) hidden.set(child, child.getAttribute(\"style\"));\n child.style.gridArea = \"auto\";\n }\n const render = () => {\n if (host && (renderedSamples !== samples || renderedStatus !== status)) {\n ReactDOM.render(<MonitoringCharts samples={samples} status={status} />, host);\n renderedSamples = samples;\n renderedStatus = status;\n }\n };\n render();\n if (pendingGeneration === generation || Date.now() < nextSample) return;\n pendingGeneration = generation;\n nextSample = Date.now() + INTERVAL;\n const requestGeneration = generation;\n const isCurrent = () =>\n !stopped &&\n requestGeneration === generation &&\n document.visibilityState !== \"hidden\" &&\n overview?.isConnected === true &&\n Renderer.Catalog.activeCluster.get()?.metadata.uid === cluster;\n try {\n const collected = await getMonitoringSnapshot();\n const metrics =\n collected.nodeMetrics === undefined\n ? { status: \"rejected\" as const }\n : { status: \"fulfilled\" as const, value: collected.nodeMetrics };\n const inventory =\n collected.nodes === undefined\n ? { status: \"rejected\" as const }\n : { status: \"fulfilled\" as const, value: collected.nodes };\n const pods =\n collected.pods === undefined\n ? { status: \"rejected\" as const }\n : { status: \"fulfilled\" as const, value: collected.pods };\n if (!isCurrent()) return;\n if (metrics.status !== \"fulfilled\") throw new Error(\"Metrics unavailable\");\n const sample = aggregateMetrics(metrics.value ?? []);\n sample.time = Math.min(...metrics.value.map((item) => Date.parse(item.timestamp)));\n const warnings: string[] = [];\n if (inventory.status === \"fulfilled\") {\n try {\n sample.resources = aggregateResources(\n inventory.value ?? [],\n pods.status === \"fulfilled\" ? (pods.value ?? undefined) : undefined,\n );\n const expected = new Set((inventory.value ?? []).map((node) => node.metadata.name));\n const observed = new Set((metrics.value ?? []).map((node) => node.metadata.name));\n sample.completeUsage =\n expected.size > 0 && expected.size === observed.size && [...expected].every((name) => observed.has(name));\n if (!sample.completeUsage)\n warnings.push(\n \"Partial node metrics coverage: usage is the reported subset; unused allocatable unavailable\",\n );\n } catch {\n warnings.push(\"Resource totals unavailable: incomplete or invalid node/pod data\");\n }\n } else\n warnings.push(\"Node inventory unavailable or access denied; usage coverage unverified, capacity unavailable\");\n if (pods.status !== \"fulfilled\")\n warnings.push(\"Cluster-wide Pods unavailable or access denied; requests unavailable\");\n sample.resourceStatus = warnings.join(\". \");\n samples = [...samples.filter((entry) => entry.time !== sample.time), sample]\n .sort((a, b) => a.time - b.time)\n .slice(-MAX_SAMPLES);\n status = \"\";\n } catch {\n if (!isCurrent()) return;\n status = \"Node metrics unavailable, stale or access denied. Last collected samples remain visible.\";\n } finally {\n if (pendingGeneration === requestGeneration) pendingGeneration = undefined;\n }\n if (!stopped && requestGeneration === generation) render();\n };\n const observer = new MutationObserver(() => {\n void update();\n });\n observer.observe(document.body, { childList: true, subtree: true });\n const timer = window.setInterval(() => {\n void update();\n }, 1000);\n void update();\n return () => {\n stopped = true;\n generation++;\n window.clearInterval(timer);\n observer.disconnect();\n suppression.remove();\n restore();\n samples = [];\n };\n}\n"],"mappings":";;;;;;;;;;AA0BA,SAAgB,qBAAqB,MAAsB;CACzD,OAAO,IAAI,KAAK,IAAI,CAAC,CAAC,mBAAmB,CAAC,GAAG;EAC3C,MAAM;EACN,QAAQ;EACR,QAAQ;EACR,WAAW;CACb,CAAC;AACH;AAEA,SAAS,cAAc,EAAE,QAAQ,SAAuD;CACtF,OACE,oCAAA,KAAC,UAAD;EAAQ,OAAO;GAAE,SAAS;GAAe,YAAY;GAAU,KAAK;EAAE;YAAtE,CACE,oCAAA,IAAC,QAAD;GAAM,WAAU;GAAgB,eAAY;GAAO,OAAO;IAAE,UAAU;IAAQ,YAAY;GAAI;aAC5F,oCAAA,IAAC,QAAD;IAAM,WAAU;cAAQ,WAAW,QAAQ,oBAAoB;GAAe,CAAA;EAC1E,CAAA,GACL,UAAU,WAAW,QAAQ,QAAQ,SAChC;;AAEZ;AAEA,SAAgB,YAAY,EAC1B,QACA,SACA,QACA,QAAQ,UAMP;CACD,MAAM,CAAC,cAAc,mBAAmB,+BAAA,SAAiB;CACzD,MAAM,CAAC,QAAQ,aAAa,+BAAA,SAAS,KAAK;CAC1C,MAAM,iBAAiB,+BAAA,OAAO,MAAM;CACpC,+BAAA,gBAAgB;EACd,IACE,eAAe,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Renderer } from \"@freelensapp/extensions\";\nimport { reaction } from \"mobx\";\nimport { type CSSProperties, type ReactNode, useEffect, useLayoutEffect, useRef, useState } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { formatDateTime } from \"../common/date-time\";\nimport {\n aggregateMetrics,\n aggregateResources,\n MONITORING_INTERVAL as INTERVAL,\n MAX_SAMPLES,\n type MonitoringSample,\n} from \"../common/monitoring-math\";\nimport { MonitoringPreferencesStore } from \"../common/store/monitoring-preferences-store\";\nimport { getMonitoringSnapshot, retainMonitoringCollector } from \"./monitoring-collector\";\nimport { MonitoringHistoryRange, useMonitoringHistory } from \"./monitoring-history-view\";\n\nexport {\n aggregateMetrics,\n aggregateResources,\n effectivePodResource,\n MAX_SAMPLES,\n type MonitoringNode,\n type MonitoringPod,\n type MonitoringSample,\n parseQuantity,\n} from \"../common/monitoring-math\";\n\nexport function formatMonitoringTime(time: number): string {\n return new Date(time).toLocaleTimeString([], {\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n hourCycle: \"h23\",\n });\n}\n\nfunction ResourceTitle({ metric, label }: { metric: \"cpu\" | \"memory\"; label?: string }) {\n return (\n <strong style={{ display: \"inline-flex\", alignItems: \"center\", gap: 6 }}>\n <span className=\"Icon material\" aria-hidden=\"true\" style={{ \"--size\": \"18px\", fontWeight: 400 } as CSSProperties}>\n <span className=\"icon\">{metric === \"cpu\" ? \"developer_board\" : \"memory\"}</span>\n </span>\n {label ?? (metric === \"cpu\" ? \"CPU\" : \"Memory\")}\n </strong>\n );\n}\n\nexport function MetricChart({\n metric,\n samples,\n status,\n scope = \"node\",\n headerAction,\n}: {\n metric: \"cpu\" | \"memory\";\n samples: MonitoringSample[];\n status: string;\n scope?: \"node\" | \"pod\";\n headerAction?: ReactNode;\n}) {\n const [selectedTime, setSelectedTime] = useState<number>();\n const [pinned, setPinned] = useState(false);\n const previousMetric = useRef(metric);\n useEffect(() => {\n if (\n previousMetric.current !== metric ||\n (selectedTime !== undefined && !samples.some((sample) => sample.time === selectedTime))\n ) {\n setPinned(false);\n setSelectedTime(undefined);\n }\n previousMetric.current = metric;\n }, [metric, samples, selectedTime]);\n useEffect(() => {\n if (!pinned) return;\n const escape = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n event.preventDefault();\n event.stopPropagation();\n setPinned(false);\n setSelectedTime(undefined);\n }\n };\n document.addEventListener(\"keydown\", escape, true);\n return () => document.removeEventListener(\"keydown\", escape, true);\n }, [pinned]);\n const chartRef = useRef<SVGSVGElement>(null);\n const [width, setWidth] = useState(600);\n useLayoutEffect(() => {\n const chart = chartRef.current;\n if (!chart) return;\n const measure = () => {\n const measured = chart.getBoundingClientRect().width;\n if (measured > 0) setWidth(measured);\n };\n measure();\n const observer = typeof ResizeObserver === \"undefined\" ? undefined : new ResizeObserver(measure);\n observer?.observe(chart);\n window.addEventListener(\"resize\", measure);\n return () => {\n observer?.disconnect();\n window.removeEventListener(\"resize\", measure);\n };\n }, []);\n const plotWidth = Math.max(1, width - 112);\n const last = samples.at(-1);\n const selected = samples.find((sample) => sample.time === selectedTime);\n const label = metric === \"cpu\" ? \"CPU\" : \"Memory\";\n const format = (value: number) =>\n metric === \"cpu\" ? `${value.toFixed(2)} cores` : `${(value / 1024 ** 3).toFixed(2)} GiB`;\n const series = [\n { key: \"usage\", label: \"Usage\", color: \"#c93dce\", value: (sample: MonitoringSample) => sample[metric] },\n ...([\"requests\", \"allocatable\", \"capacity\"] as const).map((key) => ({\n key,\n label: { requests: \"Requests\", allocatable: \"Allocatable Capacity\", capacity: \"Capacity\" }[key],\n color: { requests: \"#4caf50\", allocatable: \"#5486b5\", capacity: \"var(--textColorSecondary)\" }[key],\n value: (sample: MonitoringSample) => sample.resources?.[metric][key],\n })),\n ];\n const visibleSeries =\n scope === \"pod\" ? series.filter((line) => line.key === \"usage\" || line.key === \"requests\") : series;\n const max =\n Math.max(\n ...samples.flatMap((sample) => [\n ...visibleSeries.map((line) => line.value(sample) ?? 0),\n sample.historical?.[metric]?.max ?? 0,\n ]),\n 0.001,\n ) * 1.1;\n const end = last?.time ?? Date.now();\n const start = samples[0]?.time ?? end;\n const duration = Math.max(end - start, INTERVAL);\n const x = (sample: MonitoringSample) => 88 + ((sample.time - start) / duration) * plotWidth;\n const y = (sample: MonitoringSample) => 208 - (sample[metric] / max) * 184;\n const selectNearest = (event: React.MouseEvent<SVGSVGElement>) => {\n const bounds = event.currentTarget.getBoundingClientRect();\n if (!bounds.width || !samples.length) return;\n const scale = Math.min(bounds.width / width, (bounds.height || 250) / 250);\n const offset = (bounds.width - width * scale) / 2;\n const position = (event.clientX - bounds.left - offset) / scale;\n const time = start + ((position - 88) / plotWidth) * duration;\n const nearest = samples.reduce((nearest, sample) =>\n Math.abs(sample.time - time) < Math.abs(nearest.time - time) ? sample : nearest,\n ).time;\n setSelectedTime(nearest);\n return nearest;\n };\n return (\n <section\n aria-label={`${label} metrics-server usage`}\n style={{\n padding: \"var(--power-monitoring-trend-top, 16px) 16px 16px\",\n background: \"var(--contentColor)\",\n minWidth: 0,\n minHeight: 280,\n position: \"relative\",\n }}\n >\n {headerAction && <div className=\"power-monitoring-period-action\">{headerAction}</div>}\n <div\n data-monitoring-heading=\"\"\n style={{\n display: \"flex\",\n alignItems: \"center\",\n flexWrap: \"wrap\",\n gap: 12,\n paddingRight: headerAction ? 100 : 0,\n minHeight: headerAction ? 32 : undefined,\n }}\n >\n <ResourceTitle metric={metric} />\n <span>{status ? \"Unavailable\" : last ? format(last[metric]) : \"Collecting…\"}</span>\n </div>\n <svg\n ref={chartRef}\n data-monitoring-trend=\"\"\n viewBox={`0 0 ${width} 250`}\n role=\"img\"\n tabIndex={0}\n aria-label={`${label} usage over collected samples. Use arrow keys to inspect samples. Click or press Enter to pin the tooltip, Escape to dismiss`}\n onMouseMove={(event) => {\n if (!pinned) selectNearest(event);\n }}\n onClick={(event) => {\n if (pinned) setPinned(false);\n else if (samples.length) {\n if (selectNearest(event) === undefined && !selected) setSelectedTime(last?.time);\n setPinned(true);\n }\n }}\n onMouseLeave={() => {\n if (!pinned) setSelectedTime(undefined);\n }}\n onFocus={() => {\n if (!pinned) setSelectedTime(last?.time);\n }}\n onBlur={() => {\n if (!pinned) setSelectedTime(undefined);\n }}\n onKeyDown={(event) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n if (samples.length) {\n if (!selected) setSelectedTime(last?.time);\n setPinned(!pinned);\n }\n return;\n }\n if (event.key !== \"ArrowLeft\" && event.key !== \"ArrowRight\") return;\n event.preventDefault();\n const index = samples.findIndex((sample) => sample.time === selectedTime);\n setSelectedTime(\n samples[\n Math.max(\n 0,\n Math.min(\n samples.length - 1,\n (index < 0 ? samples.length - 1 : index) + (event.key === \"ArrowLeft\" ? -1 : 1),\n ),\n )\n ]?.time,\n );\n }}\n style={{ width: \"100%\", height: 250, color: \"#c93dce\", display: \"block\" }}\n >\n <title>Click to pin tooltip · click again or Escape to unpin</title>\n {[0, 0.5, 1].map((fraction) => (\n <g key={fraction}>\n <line\n x1=\"88\"\n x2={width - 24}\n y1={208 - fraction * 184}\n y2={208 - fraction * 184}\n stroke=\"var(--borderFaintColor)\"\n />\n <text x=\"80\" y={212 - fraction * 184} textAnchor=\"end\" fill=\"var(--textColorSecondary)\" fontSize=\"11\">\n {format(max * fraction)}\n </text>\n </g>\n ))}\n {samples.map((sample) => {\n const summary = sample.historical?.[metric];\n if (!summary || summary.min === summary.max) return null;\n return (\n <line\n key={`range:${sample.time}`}\n data-monitoring-extrema=\"\"\n x1={x(sample)}\n x2={x(sample)}\n y1={208 - (summary.max / max) * 184}\n y2={208 - (summary.min / max) * 184}\n stroke=\"#c93dce\"\n strokeOpacity={0.35}\n strokeWidth={4}\n />\n );\n })}\n {visibleSeries.map((line) => {\n let path = \"\";\n let gaps = \"\";\n let previous: { sample: MonitoringSample; point: string } | undefined;\n let interrupted = false;\n for (const sample of samples) {\n const value = line.value(sample);\n if (value === undefined || !Number.isFinite(value)) {\n interrupted = true;\n continue;\n }\n const point = `${x(sample)},${208 - (value / max) * 184}`;\n const gap =\n previous &&\n (interrupted ||\n sample.breakBefore ||\n sample.time - previous.sample.time >\n 1.8 *\n Math.max(\n sample.historical?.[metric]?.resolution ?? INTERVAL,\n previous.sample.historical?.[metric]?.resolution ?? INTERVAL,\n ));\n path += ` ${!previous || gap ? \"M\" : \"L\"}${point}`;\n if (previous && gap) gaps += ` M${previous.point} L${point}`;\n previous = { sample, point };\n interrupted = false;\n }\n return (\n <g key={line.key}>\n <path\n data-monitoring-series={line.key}\n d={path}\n fill=\"none\"\n stroke={line.color}\n strokeWidth=\"2\"\n strokeDasharray={line.key === \"capacity\" || line.key === \"allocatable\" ? \"5 3\" : undefined}\n />\n {gaps && (\n <path\n data-monitoring-gap={line.key}\n d={gaps}\n fill=\"none\"\n stroke={line.color}\n strokeWidth=\"2\"\n strokeDasharray=\"3 4\"\n opacity=\".65\"\n >\n <title>Dashed connections span missing measurements; intermediate values are unknown</title>\n </path>\n )}\n </g>\n );\n })}\n {samples.map((sample) => (\n <circle key={sample.time} cx={x(sample)} cy={y(sample)} r=\"2\" fill=\"currentColor\">\n <title>\n {formatDateTime(sample.time)}: {format(sample[metric])}\n </title>\n </circle>\n ))}\n {samples.length > 0 &&\n [0, 0.5, 1].map((fraction) => (\n <text\n key={fraction}\n x={88 + fraction * plotWidth}\n y=\"235\"\n textAnchor={fraction === 0 ? \"start\" : fraction === 1 ? \"end\" : \"middle\"}\n fill=\"var(--textColorSecondary)\"\n fontSize=\"11\"\n >\n {formatMonitoringTime(start + fraction * duration)}\n </text>\n ))}\n {selected && (\n <line\n data-monitoring-crosshair=\"\"\n x1={x(selected)}\n x2={x(selected)}\n y1=\"24\"\n y2=\"208\"\n stroke=\"var(--textColorSecondary)\"\n strokeDasharray=\"4 3\"\n />\n )}\n </svg>\n <style>{`\n @keyframes freelens-power-metric-tooltip-enter { from { opacity:0; transform:translateY(2px) } to { opacity:1; transform:translateY(0) } }\n [data-monitoring-tooltip] { animation:freelens-power-metric-tooltip-enter 140ms ease-out }\n @media (prefers-reduced-motion:reduce) { [data-monitoring-tooltip] { animation:none } }\n `}</style>\n {selected && (\n <div\n data-monitoring-tooltip=\"\"\n role=\"tooltip\"\n style={{\n position: \"absolute\",\n top: 44,\n right: 24,\n padding: 8,\n background: \"var(--contentColor)\",\n border: \"1px solid var(--borderFaintColor)\",\n pointerEvents: \"none\",\n }}\n >\n <div style={{ whiteSpace: \"pre-wrap\" }}>\n {formatDateTime(selected.time)}\n {pinned ? \" · Pinned\" : \"\"}\n </div>\n {visibleSeries.map((line) => (\n <div key={line.key} style={{ color: line.color }}>\n {line.label}: {line.value(selected) === undefined ? \"Unavailable\" : format(line.value(selected)!)}\n </div>\n ))}\n {selected.historical?.[metric] && (\n <div>\n Min: {format(selected.historical[metric]!.min)} · Max: {format(selected.historical[metric]!.max)}\n <br />\n {selected.historical[metric]!.count} samples ·{\" \"}\n {Math.round(selected.historical[metric]!.resolution / 1000)}s bucket\n </div>\n )}\n <div style={{ color: \"var(--textColorSecondary)\", marginTop: 4, fontSize: 10 }}>\n {pinned ? \"Click chart or Escape to unpin\" : \"Click or Enter to pin\"}\n </div>\n </div>\n )}\n <div\n aria-label={`${label} chart legend`}\n style={{ display: \"flex\", flexWrap: \"wrap\", gap: \"6px 16px\", marginBottom: 8 }}\n >\n {visibleSeries.map((line) => (\n <span key={line.key}>\n <span style={{ color: line.color }}>●</span> {line.label}\n </span>\n ))}\n </div>\n {last?.resourceStatus && (\n <div role=\"status\" style={{ color: \"var(--textColorSecondary)\", marginBottom: 8 }}>\n {last.resourceStatus}\n </div>\n )}\n {(scope === \"node\" || status || !samples.length) && (\n <div\n style={{ fontSize: 11, color: \"var(--textColorSecondary)\", display: \"flex\", alignItems: \"center\", gap: 4 }}\n role=\"status\"\n aria-label={`${scope} metrics status`}\n >\n {scope === \"node\" && (\n <sup aria-hidden=\"true\" style={{ fontSize: 12 }}>\n *\n </sup>\n )}\n <span>{status || (samples.length ? \"metrics-server data\" : \"Waiting for metrics-server data\")}</span>\n </div>\n )}\n </section>\n );\n}\n\nfunction ResourceDonut({\n metric,\n sample,\n status,\n}: {\n metric: \"cpu\" | \"memory\";\n sample?: MonitoringSample;\n status: string;\n}) {\n const [activeRing, setActiveRing] = useState<number>();\n useEffect(() => {\n if (activeRing === undefined) return;\n const dismiss = (event: KeyboardEvent) => {\n if (event.key !== \"Escape\") return;\n event.preventDefault();\n event.stopPropagation();\n setActiveRing(undefined);\n };\n document.addEventListener(\"keydown\", dismiss, true);\n return () => document.removeEventListener(\"keydown\", dismiss, true);\n }, [activeRing]);\n const label = metric === \"cpu\" ? \"CPU\" : \"Memory\";\n const totals = sample?.resources?.[metric];\n const format = (value: number) =>\n metric === \"cpu\" ? `${value.toFixed(2)} cores` : `${(value / 1024 ** 3).toFixed(2)} GiB`;\n const available = (value?: number) => (value === undefined ? \"Unavailable\" : format(value));\n const denominator = totals?.allocatable;\n const rings = [\n { label: \"Usage\", color: \"#c93dce\", value: sample?.[metric] },\n { label: \"Requests\", color: \"#4caf50\", value: totals?.requests },\n ];\n const percentage = (value?: number) =>\n value !== undefined && denominator !== undefined && denominator > 0 ? (value / denominator) * 100 : undefined;\n const usagePercent = percentage(sample?.[metric]);\n const unused =\n sample?.completeUsage && denominator !== undefined ? format(denominator - sample[metric]) : \"Unavailable\";\n const unrequested =\n denominator !== undefined && totals?.requests !== undefined ? format(denominator - totals.requests) : \"Unavailable\";\n const allocationDetail = `Allocatable: ${available(denominator)}. Schedulable capacity after system reservations, used as the denominator for both rings. Physical Capacity: ${available(totals?.capacity)}. Unused allocatable (usage): ${unused}. Unrequested: ${unrequested}`;\n const hovered = activeRing === undefined ? undefined : rings[activeRing];\n const tooltipId = `power-monitoring-${metric}-donut-tooltip`;\n return (\n <section\n aria-label={`${label} resource summary`}\n style={{\n padding: \"var(--power-monitoring-summary-top, 16px) 16px 16px\",\n minWidth: 0,\n background: \"var(--contentColor)\",\n position: \"relative\",\n overflow: \"visible\",\n }}\n >\n <ResourceTitle metric={metric} label={metric === \"memory\" ? \"RAM\" : \"CPU\"} />\n <svg\n data-monitoring-donut=\"\"\n viewBox=\"0 0 200 200\"\n role=\"img\"\n aria-label={`${label} usage and requests relative to allocatable capacity`}\n style={{ display: \"block\", width: \"100%\", height: 200 }}\n >\n {rings.map((ring, index) => {\n const radius = 76 - index * 18;\n const percent = percentage(ring.value);\n const detail = `${ring.label}: ${available(ring.value)}${percent === undefined ? \"\" : ` (${percent.toFixed(1)}% of allocatable${percent > 100 ? \", over allocatable\" : \"\"})`}`;\n return (\n <g\n key={ring.label}\n tabIndex={0}\n role=\"img\"\n aria-label={detail}\n aria-describedby={activeRing === index ? tooltipId : undefined}\n onMouseEnter={() => setActiveRing(index)}\n onMouseMove={() => setActiveRing(index)}\n onMouseLeave={() => setActiveRing(undefined)}\n onFocus={() => setActiveRing(index)}\n onBlur={() => setActiveRing(undefined)}\n >\n <circle cx=\"100\" cy=\"100\" r={radius} fill=\"none\" stroke=\"var(--borderFaintColor)\" strokeWidth=\"12\" />\n {percent !== undefined && (\n <circle\n data-monitoring-ring={ring.label}\n cx=\"100\"\n cy=\"100\"\n r={radius}\n fill=\"none\"\n stroke={ring.color}\n strokeWidth=\"12\"\n pathLength=\"100\"\n strokeDasharray={`${Math.min(100, Math.max(0, percent))} 100`}\n transform=\"rotate(-90 100 100)\"\n />\n )}\n </g>\n );\n })}\n <text\n data-monitoring-usage-percentage=\"\"\n x=\"100\"\n y=\"100\"\n textAnchor=\"middle\"\n fill=\"var(--textColorPrimary)\"\n fontSize=\"26\"\n fontWeight=\"600\"\n >\n {usagePercent === undefined ? \"N/A\" : `${usagePercent.toFixed(1)}%`}\n </text>\n <text x=\"100\" y=\"120\" textAnchor=\"middle\" fill=\"var(--textColorPrimary)\" fontSize=\"12\">\n Usage\n </text>\n </svg>\n {hovered && (\n <div\n id={tooltipId}\n data-monitoring-tooltip=\"\"\n role=\"tooltip\"\n style={{\n position: \"absolute\",\n top: 48,\n left: 8,\n right: 8,\n zIndex: 20,\n padding: 8,\n border: \"1px solid var(--borderFaintColor)\",\n background: \"var(--contentColor)\",\n pointerEvents: \"none\",\n overflowWrap: \"anywhere\",\n boxShadow: \"0 3px 12px #0003\",\n }}\n >\n <div style={{ color: hovered.color }}>\n {hovered.label}: {available(hovered.value)}\n </div>\n <div>\n {percentage(hovered.value) === undefined\n ? \"Percentage unavailable\"\n : `${percentage(hovered.value)!.toFixed(1)}% of allocatable${percentage(hovered.value)! > 100 ? \" (over allocatable)\" : \"\"}`}\n </div>\n <div>Allocatable: {available(denominator)}</div>\n </div>\n )}\n <div aria-label={`${label} resource totals`} style={{ display: \"grid\", gap: 6, fontSize: 12 }}>\n {rings.map((ring) => (\n <div\n key={ring.label}\n title={`${ring.label} relative to allocatable capacity. ${ring.label === \"Usage\" ? `Unused allocatable (usage): ${unused}` : `Unrequested: ${unrequested}`}`}\n >\n <span style={{ color: ring.color }}>●</span> {ring.label}: {available(ring.value)}\n {percentage(ring.value) !== undefined && <span> ({percentage(ring.value)!.toFixed(1)}%)</span>}\n </div>\n ))}\n <div title={allocationDetail}>\n <span style={{ color: \"#5486b5\" }}>●</span> Allocatable: {available(denominator)}\n </div>\n </div>\n {(status || sample?.resourceStatus) && (\n <div role=\"status\" style={{ color: \"var(--textColorSecondary)\", fontSize: 11, marginTop: 8 }}>\n {status || sample?.resourceStatus}\n </div>\n )}\n </section>\n );\n}\n\nfunction MonitoringCharts({ samples, status }: { samples: MonitoringSample[]; status: string }) {\n const clusterId = Renderer.Catalog.activeCluster.get()?.metadata.uid;\n const history = useMonitoringHistory(\n clusterId ? { clusterId, scope: \"cluster\", uid: clusterId } : undefined,\n samples,\n );\n return (\n <div style={{ containerType: \"inline-size\" }}>\n <style>{`\n [data-monitoring-layout] { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr); gap:16px; align-items:stretch }\n [data-monitoring-trends], [data-monitoring-summaries] { display:contents }\n .power-monitoring-period-action { position:absolute;right:16px;top:19px }\n @container (min-width: 961px) {\n [data-monitoring-summaries] > section { --power-monitoring-summary-top:16px }\n }\n @container (max-width: 960px) {\n [data-monitoring-layout] { grid-template-columns:repeat(2,minmax(0,1fr)) }\n .power-ai-overview-actions + [data-testid=\"cluster-overview-page\"] [data-monitoring-trends] > section { --power-monitoring-trend-top:56px }\n }\n @container (max-width: 580px) {\n [data-monitoring-layout] { grid-template-columns:minmax(0,1fr) }\n .power-monitoring-period-action { left:16px;right:auto;top:15px }\n [data-monitoring-trends] > section:first-child { --power-monitoring-trend-top:56px }\n .power-ai-overview-actions + [data-testid=\"cluster-overview-page\"] [data-monitoring-trends] > section:not(:first-child) { --power-monitoring-trend-top:16px }\n }\n `}</style>\n {history.status && (\n <small role=\"status\" style={{ display: \"block\", color: \"var(--textColorSecondary)\", marginBottom: 8 }}>\n {history.status}\n </small>\n )}\n <div data-monitoring-layout=\"\">\n <div data-monitoring-trends=\"\">\n {([\"cpu\", \"memory\"] as const).map((metric) => (\n <MetricChart\n key={metric}\n metric={metric}\n samples={history.samples}\n status={status}\n headerAction={\n metric === \"cpu\" ? (\n <MonitoringHistoryRange compact range={history.range} onChange={history.setRange} />\n ) : undefined\n }\n />\n ))}\n </div>\n <div data-monitoring-summaries=\"\">\n {([\"cpu\", \"memory\"] as const).map((metric) => (\n <ResourceDonut key={metric} metric={metric} sample={samples.at(-1)} status={status} />\n ))}\n </div>\n </div>\n </div>\n );\n}\n\nexport function startMonitoring(): () => void {\n const release = retainMonitoringCollector();\n const preferences = MonitoringPreferencesStore.getInstanceOrCreate<MonitoringPreferencesStore>();\n let stopCurrent: (() => void) | undefined;\n const stop = reaction(\n () => preferences.enabled,\n (enabled) => {\n stopCurrent?.();\n stopCurrent = enabled ? mountMonitoring() : undefined;\n },\n { fireImmediately: true },\n );\n return () => {\n stop();\n stopCurrent?.();\n release();\n };\n}\n\nfunction mountMonitoring(): () => void {\n const suppression = document.createElement(\"style\");\n suppression.setAttribute(\"data-freelens-power-native-metrics-suppression\", \"\");\n suppression.textContent = `\n [data-testid=\"cluster-overview-page\"] > [class*=\"ClusterMetrics\"],\n [data-testid=\"cluster-overview-page\"] > :has([class*=\"ClusterMetrics\"]),\n [data-testid=\"cluster-overview-page\"] > :is([class*=\"noMetrics\"], [data-testid=\"no-metrics-message\"]):not(:has(.PieChart)),\n [data-testid=\"cluster-overview-page\"] > :has([class*=\"noMetrics\"], [data-testid=\"no-metrics-message\"], [class*=\"cluster-pie-charts\"][class*=\"empty\"]):not(:has(.PieChart)) {\n display:none !important;\n }\n `;\n document.head.append(suppression);\n let host: HTMLElement | undefined;\n let overview: Element | null = null;\n let samples: MonitoringSample[] = [];\n let status = \"\";\n let renderedSamples: MonitoringSample[] | undefined;\n let renderedStatus: string | undefined;\n let cluster: string | undefined;\n let stopped = false;\n let pendingGeneration: number | undefined;\n let generation = 0;\n let nextSample = 0;\n const hidden = new Map<HTMLElement, string | null>();\n const restore = () => {\n for (const [element, original] of hidden) {\n if (original === null) element.removeAttribute(\"style\");\n else element.setAttribute(\"style\", original);\n }\n hidden.clear();\n if (host) {\n ReactDOM.unmountComponentAtNode(host);\n host.remove();\n host = undefined;\n renderedSamples = undefined;\n renderedStatus = undefined;\n }\n };\n const update = async () => {\n const currentCluster = Renderer.Catalog.activeCluster.get()?.metadata.uid;\n const currentOverview = document.querySelector('[data-testid=\"cluster-overview-page\"]');\n if (cluster !== currentCluster || overview !== currentOverview) {\n generation++;\n restore();\n samples = [];\n status = \"\";\n nextSample = 0;\n cluster = currentCluster;\n overview = currentOverview;\n }\n const cutoff = Date.now() - MAX_SAMPLES * INTERVAL;\n if (samples.length && samples[0].time < cutoff) samples = samples.filter((sample) => sample.time >= cutoff);\n if (!overview || !cluster || document.visibilityState === \"hidden\") return;\n if (!host) {\n host = document.createElement(\"div\");\n host.setAttribute(\"data-freelens-power-monitoring\", \"\");\n host.style.gridColumn = \"1 / -1\";\n hidden.set(overview as HTMLElement, overview.getAttribute(\"style\"));\n Object.assign((overview as HTMLElement).style, {\n gridTemplateAreas: \"none\",\n gridTemplateColumns: \"minmax(0, 1fr)\",\n gridTemplateRows: \"none\",\n height: \"auto\",\n });\n overview.prepend(host);\n }\n for (const title of overview.querySelectorAll<HTMLElement>(\".PieChart > .chart-title\")) {\n if (title.textContent !== \"CPU\" && title.textContent !== \"Memory\") continue;\n const panel = title.closest(\".PieChart\")?.parentElement;\n if (panel && panel.style.display !== \"none\") {\n if (!hidden.has(panel)) hidden.set(panel, panel.getAttribute(\"style\"));\n panel.style.display = \"none\";\n }\n }\n // native CSS modules retain [ClusterMetrics] in the generated class name\n for (const child of overview.children) {\n if (!(child instanceof HTMLElement) || child === host) continue;\n const nativeMetrics =\n child.matches('[class*=\"ClusterMetrics\"]') || child.querySelector('[class*=\"ClusterMetrics\"]');\n const unavailablePies =\n (child.matches('[class*=\"noMetrics\"], [data-testid=\"no-metrics-message\"]') ||\n child.querySelector(\n '[class*=\"noMetrics\"], [data-testid=\"no-metrics-message\"], [class*=\"cluster-pie-charts\"][class*=\"empty\"]',\n )) &&\n !child.querySelector(\".PieChart\");\n if ((nativeMetrics || unavailablePies) && child.style.display !== \"none\") {\n if (!hidden.has(child)) hidden.set(child, child.getAttribute(\"style\"));\n child.style.display = \"none\";\n }\n if (!hidden.has(child)) hidden.set(child, child.getAttribute(\"style\"));\n child.style.gridArea = \"auto\";\n }\n const render = () => {\n if (host && (renderedSamples !== samples || renderedStatus !== status)) {\n ReactDOM.render(<MonitoringCharts samples={samples} status={status} />, host);\n renderedSamples = samples;\n renderedStatus = status;\n }\n };\n render();\n if (pendingGeneration === generation || Date.now() < nextSample) return;\n pendingGeneration = generation;\n nextSample = Date.now() + INTERVAL;\n const requestGeneration = generation;\n const isCurrent = () =>\n !stopped &&\n requestGeneration === generation &&\n document.visibilityState !== \"hidden\" &&\n overview?.isConnected === true &&\n Renderer.Catalog.activeCluster.get()?.metadata.uid === cluster;\n try {\n const collected = await getMonitoringSnapshot();\n const metrics =\n collected.nodeMetrics === undefined\n ? { status: \"rejected\" as const }\n : { status: \"fulfilled\" as const, value: collected.nodeMetrics };\n const inventory =\n collected.nodes === undefined\n ? { status: \"rejected\" as const }\n : { status: \"fulfilled\" as const, value: collected.nodes };\n const pods =\n collected.pods === undefined\n ? { status: \"rejected\" as const }\n : { status: \"fulfilled\" as const, value: collected.pods };\n if (!isCurrent()) return;\n if (metrics.status !== \"fulfilled\") throw new Error(\"Metrics unavailable\");\n const sample = aggregateMetrics(metrics.value ?? []);\n sample.time = Math.min(...metrics.value.map((item) => Date.parse(item.timestamp)));\n const warnings: string[] = [];\n if (inventory.status === \"fulfilled\") {\n try {\n sample.resources = aggregateResources(\n inventory.value ?? [],\n pods.status === \"fulfilled\" ? (pods.value ?? undefined) : undefined,\n );\n const expected = new Set((inventory.value ?? []).map((node) => node.metadata.name));\n const observed = new Set((metrics.value ?? []).map((node) => node.metadata.name));\n sample.completeUsage =\n expected.size > 0 && expected.size === observed.size && [...expected].every((name) => observed.has(name));\n if (!sample.completeUsage)\n warnings.push(\n \"Partial node metrics coverage: usage is the reported subset; unused allocatable unavailable\",\n );\n } catch {\n warnings.push(\"Resource totals unavailable: incomplete or invalid node/pod data\");\n }\n } else\n warnings.push(\"Node inventory unavailable or access denied; usage coverage unverified, capacity unavailable\");\n if (pods.status !== \"fulfilled\")\n warnings.push(\"Cluster-wide Pods unavailable or access denied; requests unavailable\");\n sample.resourceStatus = warnings.join(\". \");\n samples = [...samples.filter((entry) => entry.time !== sample.time), sample]\n .sort((a, b) => a.time - b.time)\n .slice(-MAX_SAMPLES);\n status = \"\";\n } catch {\n if (!isCurrent()) return;\n status = \"Node metrics unavailable, stale or access denied. Last collected samples remain visible.\";\n } finally {\n if (pendingGeneration === requestGeneration) pendingGeneration = undefined;\n }\n if (!stopped && requestGeneration === generation) render();\n };\n const observer = new MutationObserver(() => {\n void update();\n });\n observer.observe(document.body, { childList: true, subtree: true });\n const timer = window.setInterval(() => {\n void update();\n }, 1000);\n void update();\n return () => {\n stopped = true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U;EACV;EACA,OAAO,cAAc,KAAK;EAC1B,SAAS,WAAW;EACpB,YAAY,OAAO;EACnB,QAAQ;EACR,UAAU,CAAC;CACb;AACF"}
@@ -5,7 +5,7 @@ const require__global_external_react = require("./_virtual/_global-external_reac
5
5
  const require_jsx_runtime = require("./_virtual/_global-external_react/jsx-runtime.js");
6
6
  const require_monitoring_collector = require("./monitoring-collector.js");
7
7
  const require_monitoring_history_view = require("./monitoring-history-view.js");
8
- const require_monitoring = require("./monitoring.js");
8
+ const require_monitoring_details_chart = require("./monitoring-details-chart.js");
9
9
  //#region src/renderer/node-monitoring.tsx
10
10
  var NodeMonitoringCharts = require__global_external_mobx_react.observer(({ object }) => {
11
11
  const clusterId = require_extensions.Renderer.Catalog.activeCluster.get()?.metadata.uid;
@@ -16,6 +16,7 @@ var NodeMonitoringCharts = require__global_external_mobx_react.observer(({ objec
16
16
  name,
17
17
  uid
18
18
  ]);
19
+ const [metric, setMetric] = require__global_external_react.useState("cpu");
19
20
  const [state, setState] = require__global_external_react.useState({
20
21
  identity,
21
22
  samples: [],
@@ -90,20 +91,30 @@ var NodeMonitoringCharts = require__global_external_mobx_react.observer(({ objec
90
91
  display: none !important;
91
92
  }
92
93
  ` }),
93
- /* @__PURE__ */ require_jsx_runtime.jsx(require_monitoring_history_view.MonitoringHistoryRange, {
94
- native: true,
95
- range: history.range,
96
- onChange: history.setRange
97
- }),
98
- history.status && /* @__PURE__ */ require_jsx_runtime.jsx("div", {
99
- role: "status",
100
- children: history.status
94
+ /* @__PURE__ */ require_jsx_runtime.jsx("div", {
95
+ style: { marginBottom: 16 },
96
+ children: /* @__PURE__ */ require_jsx_runtime.jsxs(require_extensions.Renderer.Component.RadioGroup, {
97
+ value: metric,
98
+ onChange: setMetric,
99
+ asButtons: true,
100
+ children: [/* @__PURE__ */ require_jsx_runtime.jsx(require_extensions.Renderer.Component.Radio, {
101
+ value: "cpu",
102
+ label: "CPU"
103
+ }), /* @__PURE__ */ require_jsx_runtime.jsx(require_extensions.Renderer.Component.Radio, {
104
+ value: "memory",
105
+ label: "Memory"
106
+ })]
107
+ })
101
108
  }),
102
- ["cpu", "memory"].map((metric) => /* @__PURE__ */ require_jsx_runtime.jsx(require_monitoring.MetricChart, {
109
+ /* @__PURE__ */ require_jsx_runtime.jsx(require_monitoring_details_chart.MonitoringDetailsChart, {
103
110
  metric,
104
111
  samples: history.samples,
105
- status
106
- }, `${identity}:${metric}`))
112
+ status,
113
+ native: true,
114
+ range: history.range,
115
+ onRangeChange: history.setRange,
116
+ historyStatus: history.status
117
+ }, `${identity}:${metric}`)
107
118
  ]
108
119
  });
109
120
  });
@@ -1 +1 @@
1
- {"version":3,"file":"node-monitoring.js","names":[],"sources":["../../src/renderer/node-monitoring.tsx"],"sourcesContent":["import { Renderer } from \"@freelensapp/extensions\";\nimport { observer } from \"mobx-react\";\nimport { useEffect, useState } from \"react\";\nimport { MAX_SAMPLES, type MonitoringSample } from \"../common/monitoring-math\";\nimport { MonitoringPreferencesStore } from \"../common/store/monitoring-preferences-store\";\nimport { MetricChart } from \"./monitoring\";\nimport { getMonitoringSnapshot, getNodeSample, retainMonitoringCollector } from \"./monitoring-collector\";\nimport { MonitoringHistoryRange, useMonitoringHistory } from \"./monitoring-history-view\";\n\ntype NodeProps = Renderer.Component.KubeObjectDetailsProps<Renderer.K8sApi.Node>;\n\nconst NodeMonitoringCharts = observer(({ object }: NodeProps) => {\n const clusterId = Renderer.Catalog.activeCluster.get()?.metadata.uid;\n const name = object.metadata.name;\n const uid = object.metadata.uid;\n const identity = JSON.stringify([clusterId, name, uid]);\n const [state, setState] = useState<{ identity: string; samples: MonitoringSample[]; status: string }>({\n identity,\n samples: [],\n status: \"\",\n });\n useEffect(() => {\n let stopped = false;\n let pending = false;\n const release = retainMonitoringCollector();\n setState({ identity, samples: [], status: \"\" });\n const current = () =>\n !stopped &&\n Renderer.Catalog.activeCluster.get()?.metadata.uid === clusterId &&\n object.metadata.name === name &&\n object.metadata.uid === uid;\n const update = async () => {\n if (pending || !clusterId || document.visibilityState === \"hidden\") return;\n pending = true;\n try {\n const snapshot = await getMonitoringSnapshot();\n if (!current() || snapshot.clusterId !== clusterId) return;\n const node = snapshot.nodes?.find((candidate) => candidate.metadata.name === name);\n const replaced = !!uid && !!node?.metadata.uid && node.metadata.uid !== uid;\n const sample = replaced ? undefined : getNodeSample(snapshot, name, uid);\n setState((previous) => {\n const retained = (previous.identity === identity && !replaced ? previous.samples : []).filter(\n (entry) => entry.time >= Date.now() - 30 * 60_000,\n );\n return {\n identity,\n samples: sample\n ? [...retained.filter((entry) => entry.time !== sample.time), sample]\n .sort((a, b) => a.time - b.time)\n .slice(-MAX_SAMPLES)\n : retained,\n status: sample\n ? \"\"\n : \"Node metrics unavailable, stale or access denied. Last collected samples remain visible.\",\n };\n });\n } catch {\n if (current())\n setState((previous) => ({\n identity,\n samples:\n previous.identity === identity\n ? previous.samples.filter((entry) => entry.time >= Date.now() - 30 * 60_000)\n : [],\n status: \"Node metrics unavailable, stale or access denied. Last collected samples remain visible.\",\n }));\n } finally {\n pending = false;\n }\n };\n const timer = window.setInterval(() => {\n void update();\n }, 1000);\n void update();\n return () => {\n stopped = true;\n window.clearInterval(timer);\n release();\n };\n }, [clusterId, identity, name, object, uid]);\n const samples = state.identity === identity ? state.samples : [];\n const status = state.identity === identity ? state.status : \"\";\n const history = useMonitoringHistory(clusterId && uid ? { clusterId, scope: \"node\", uid } : undefined, samples);\n return (\n <div data-power-node-monitoring=\"\">\n <style>{`\n .KubeObjectDetails:has([data-power-node-monitoring]) .ResourceMetrics,\n .KubeObjectDetails:has([data-power-node-monitoring]) [data-time-range]:has(+ .ResourceMetrics) {\n display: none !important;\n }\n `}</style>\n <MonitoringHistoryRange native range={history.range} onChange={history.setRange} />\n {history.status && <div role=\"status\">{history.status}</div>}\n {([\"cpu\", \"memory\"] as const).map((metric) => (\n <MetricChart key={`${identity}:${metric}`} metric={metric} samples={history.samples} status={status} />\n ))}\n </div>\n );\n});\n\nexport const NodeMonitoringDetails = observer((props: NodeProps) => {\n const preferences = MonitoringPreferencesStore.getInstanceOrCreate<MonitoringPreferencesStore>();\n return preferences.enabled ? <NodeMonitoringCharts {...props} /> : null;\n});\n"],"mappings":";;;;;;;;;AAWA,IAAM,uBAAuB,oCAAA,UAAU,EAAE,aAAwB;CAC/D,MAAM,YAAY,mBAAA,SAAS,QAAQ,cAAc,IAAI,CAAC,EAAE,SAAS;CACjE,MAAM,OAAO,OAAO,SAAS;CAC7B,MAAM,MAAM,OAAO,SAAS;CAC5B,MAAM,WAAW,KAAK,UAAU;EAAC;EAAW;EAAM;CAAG,CAAC;CACtD,MAAM,CAAC,OAAO,YAAY,+BAAA,SAA4E;EACpG;EACA,SAAS,CAAC;EACV,QAAQ;CACV,CAAC;CACD,+BAAA,gBAAgB;EACd,IAAI,UAAU;EACd,IAAI,UAAU;EACd,MAAM,UAAU,6BAAA,0BAA0B;EAC1C,SAAS;GAAE;GAAU,SAAS,CAAC;GAAG,QAAQ;EAAG,CAAC;EAC9C,MAAM,gBACJ,CAAC,WACD,mBAAA,SAAS,QAAQ,cAAc,IAAI,CAAC,EAAE,SAAS,QAAQ,aACvD,OAAO,SAAS,SAAS,QACzB,OAAO,SAAS,QAAQ;EAC1B,MAAM,SAAS,YAAY;GACzB,IAAI,WAAW,CAAC,aAAa,SAAS,oBAAoB,UAAU;GACpE,UAAU;GACV,IAAI;IACF,MAAM,WAAW,MAAM,6BAAA,sBAAsB;IAC7C,IAAI,CAAC,QAAQ,KAAK,SAAS,cAAc,WAAW;IACpD,MAAM,OAAO,SAAS,OAAO,MAAM,cAAc,UAAU,SAAS,SAAS,IAAI;IACjF,MAAM,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,SAAS,OAAO,KAAK,SAAS,QAAQ;IACxE,MAAM,SAAS,WAAW,KAAA,IAAY,6BAAA,cAAc,UAAU,MAAM,GAAG;IACvE,UAAU,aAAa;KACrB,MAAM,YAAY,SAAS,aAAa,YAAY,CAAC,WA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,CAAC,CAAW,KAAK,WACjC,oCAAA,IAAC,mBAAA,aAAD;IAAmD;IAAQ,SAAS,QAAQ;IAAiB;GAAS,GAApF,GAAG,SAAS,GAAG,QAAqE,CACvG;EACE;;AAET,CAAC;AAED,IAAa,wBAAwB,oCAAA,UAAU,UAAqB;CAElE,OADoB,qCAAA,2BAA2B,oBACxC,CAAA,CAAY,UAAU,oCAAA,IAAC,sBAAD,EAAsB,GAAI,MAAQ,CAAA,IAAI;AACrE,CAAC"}
1
+ {"version":3,"file":"node-monitoring.js","names":[],"sources":["../../src/renderer/node-monitoring.tsx"],"sourcesContent":["import { Renderer } from \"@freelensapp/extensions\";\nimport { observer } from \"mobx-react\";\nimport { useEffect, useState } from \"react\";\nimport { MAX_SAMPLES, type MonitoringSample } from \"../common/monitoring-math\";\nimport { MonitoringPreferencesStore } from \"../common/store/monitoring-preferences-store\";\nimport { getMonitoringSnapshot, getNodeSample, retainMonitoringCollector } from \"./monitoring-collector\";\nimport { MonitoringDetailsChart } from \"./monitoring-details-chart\";\nimport { useMonitoringHistory } from \"./monitoring-history-view\";\n\ntype NodeProps = Renderer.Component.KubeObjectDetailsProps<Renderer.K8sApi.Node>;\n\nconst NodeMonitoringCharts = observer(({ object }: NodeProps) => {\n const clusterId = Renderer.Catalog.activeCluster.get()?.metadata.uid;\n const name = object.metadata.name;\n const uid = object.metadata.uid;\n const identity = JSON.stringify([clusterId, name, uid]);\n const [metric, setMetric] = useState<\"cpu\" | \"memory\">(\"cpu\");\n const [state, setState] = useState<{ identity: string; samples: MonitoringSample[]; status: string }>({\n identity,\n samples: [],\n status: \"\",\n });\n useEffect(() => {\n let stopped = false;\n let pending = false;\n const release = retainMonitoringCollector();\n setState({ identity, samples: [], status: \"\" });\n const current = () =>\n !stopped &&\n Renderer.Catalog.activeCluster.get()?.metadata.uid === clusterId &&\n object.metadata.name === name &&\n object.metadata.uid === uid;\n const update = async () => {\n if (pending || !clusterId || document.visibilityState === \"hidden\") return;\n pending = true;\n try {\n const snapshot = await getMonitoringSnapshot();\n if (!current() || snapshot.clusterId !== clusterId) return;\n const node = snapshot.nodes?.find((candidate) => candidate.metadata.name === name);\n const replaced = !!uid && !!node?.metadata.uid && node.metadata.uid !== uid;\n const sample = replaced ? undefined : getNodeSample(snapshot, name, uid);\n setState((previous) => {\n const retained = (previous.identity === identity && !replaced ? previous.samples : []).filter(\n (entry) => entry.time >= Date.now() - 30 * 60_000,\n );\n return {\n identity,\n samples: sample\n ? [...retained.filter((entry) => entry.time !== sample.time), sample]\n .sort((a, b) => a.time - b.time)\n .slice(-MAX_SAMPLES)\n : retained,\n status: sample\n ? \"\"\n : \"Node metrics unavailable, stale or access denied. Last collected samples remain visible.\",\n };\n });\n } catch {\n if (current())\n setState((previous) => ({\n identity,\n samples:\n previous.identity === identity\n ? previous.samples.filter((entry) => entry.time >= Date.now() - 30 * 60_000)\n : [],\n status: \"Node metrics unavailable, stale or access denied. Last collected samples remain visible.\",\n }));\n } finally {\n pending = false;\n }\n };\n const timer = window.setInterval(() => {\n void update();\n }, 1000);\n void update();\n return () => {\n stopped = true;\n window.clearInterval(timer);\n release();\n };\n }, [clusterId, identity, name, object, uid]);\n const samples = state.identity === identity ? state.samples : [];\n const status = state.identity === identity ? state.status : \"\";\n const history = useMonitoringHistory(clusterId && uid ? { clusterId, scope: \"node\", uid } : undefined, samples);\n return (\n <div data-power-node-monitoring=\"\">\n <style>{`\n .KubeObjectDetails:has([data-power-node-monitoring]) .ResourceMetrics,\n .KubeObjectDetails:has([data-power-node-monitoring]) [data-time-range]:has(+ .ResourceMetrics) {\n display: none !important;\n }\n `}</style>\n <div style={{ marginBottom: 16 }}>\n <Renderer.Component.RadioGroup value={metric} onChange={setMetric} asButtons>\n <Renderer.Component.Radio value=\"cpu\" label=\"CPU\" />\n <Renderer.Component.Radio value=\"memory\" label=\"Memory\" />\n </Renderer.Component.RadioGroup>\n </div>\n <MonitoringDetailsChart\n key={`${identity}:${metric}`}\n metric={metric}\n samples={history.samples}\n status={status}\n native\n range={history.range}\n onRangeChange={history.setRange}\n historyStatus={history.status}\n />\n </div>\n );\n});\n\nexport const NodeMonitoringDetails = observer((props: NodeProps) => {\n const preferences = MonitoringPreferencesStore.getInstanceOrCreate<MonitoringPreferencesStore>();\n return preferences.enabled ? <NodeMonitoringCharts {...props} /> : null;\n});\n"],"mappings":";;;;;;;;;AAWA,IAAM,uBAAuB,oCAAA,UAAU,EAAE,aAAwB;CAC/D,MAAM,YAAY,mBAAA,SAAS,QAAQ,cAAc,IAAI,CAAC,EAAE,SAAS;CACjE,MAAM,OAAO,OAAO,SAAS;CAC7B,MAAM,MAAM,OAAO,SAAS;CAC5B,MAAM,WAAW,KAAK,UAAU;EAAC;EAAW;EAAM;CAAG,CAAC;CACtD,MAAM,CAAC,QAAQ,aAAa,+BAAA,SAA2B,KAAK;CAC5D,MAAM,CAAC,OAAO,YAAY,+BAAA,SAA4E;EACpG;EACA,SAAS,CAAC;EACV,QAAQ;CACV,CAAC;CACD,+BAAA,gBAAgB;EACd,IAAI,UAAU;EACd,IAAI,UAAU;EACd,MAAM,UAAU,6BAAA,0BAA0B;EAC1C,SAAS;GAAE;GAAU,SAAS,CAAC;GAAG,QAAQ;EAAG,CAAC;EAC9C,MAAM,gBACJ,CAAC,WACD,mBAAA,SAAS,QAAQ,cAAc,IAAI,CAAC,EAAE,SAAS,QAAQ,aACvD,OAAO,SAAS,SAAS,QACzB,OAAO,SAAS,QAAQ;EAC1B,MAAM,SAAS,YAAY;GACzB,IAAI,WAAW,CAAC,aAAa,SAAS,oBAAoB,UAAU;GACpE,UAAU;GACV,IAAI;IACF,MAAM,WAAW,MAAM,6BAAA,sBAAsB;IAC7C,IAAI,CAAC,QAAQ,KAAK,SAAS,cAAc,WAAW;IACpD,MAAM,OAAO,SAAS,OAAO,MAAM,cAAc,UAAU,SAAS,SAAS,IAAI;IACjF,MAAM,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,SAAS,OAAO,KAAK,SAAS,QAAQ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CAAA,KAAC,mBAAA,SAAS,UAAU,YAApB;KAA+B,OAAO;KAAQ,UAAU;KAAW,WAAA;eAAnE,CACE,oCAAA,IAAC,mBAAA,SAAS,UAAU,OAApB;MAA0B,OAAM;MAAM,OAAM;KAAO,CAAA,GACnD,oCAAA,IAAC,mBAAA,SAAS,UAAU,OAApB;MAA0B,OAAM;MAAS,OAAM;KAAU,CAAA,CAC5B;;GAC5B,CAAA;GACL,oCAAA,IAAC,iCAAA,wBAAD;IAEU;IACR,SAAS,QAAQ;IACT;IACR,QAAA;IACA,OAAO,QAAQ;IACf,eAAe,QAAQ;IACvB,eAAe,QAAQ;GACxB,GARM,GAAG,SAAS,GAAG,QAQrB;EACE;;AAET,CAAC;AAED,IAAa,wBAAwB,oCAAA,UAAU,UAAqB;CAElE,OADoB,qCAAA,2BAA2B,oBACxC,CAAA,CAAY,UAAU,oCAAA,IAAC,sBAAD,EAAsB,GAAI,MAAQ,CAAA,IAAI;AACrE,CAAC"}
@@ -0,0 +1,10 @@
1
+ //#region node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
2
+ function _arrayLikeToArray(r, a) {
3
+ (null == a || a > r.length) && (a = r.length);
4
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
5
+ return n;
6
+ }
7
+ //#endregion
8
+ exports.default = _arrayLikeToArray;
9
+
10
+ //# sourceMappingURL=arrayLikeToArray.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrayLikeToArray.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js"],"sourcesContent":["function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nexport { _arrayLikeToArray as default };"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,kBAAkB,GAAG,GAAG;CAC/B,CAAC,QAAQ,KAAK,IAAI,EAAE,YAAY,IAAI,EAAE;CACtC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,GAAG,KAAK,EAAE,KAAK,EAAE;CACnD,OAAO;AACT"}
@@ -0,0 +1,8 @@
1
+ //#region node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
2
+ function _arrayWithHoles(r) {
3
+ if (Array.isArray(r)) return r;
4
+ }
5
+ //#endregion
6
+ exports.default = _arrayWithHoles;
7
+
8
+ //# sourceMappingURL=arrayWithHoles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrayWithHoles.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js"],"sourcesContent":["function _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nexport { _arrayWithHoles as default };"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,gBAAgB,GAAG;CAC1B,IAAI,MAAM,QAAQ,CAAC,GAAG,OAAO;AAC/B"}
@@ -0,0 +1,9 @@
1
+ const require_arrayLikeToArray = require("./arrayLikeToArray.js");
2
+ //#region node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
3
+ function _arrayWithoutHoles(r) {
4
+ if (Array.isArray(r)) return require_arrayLikeToArray.default(r);
5
+ }
6
+ //#endregion
7
+ exports.default = _arrayWithoutHoles;
8
+
9
+ //# sourceMappingURL=arrayWithoutHoles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrayWithoutHoles.js","names":["arrayLikeToArray"],"sources":["../../../../../../../../../../node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js"],"sourcesContent":["import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return arrayLikeToArray(r);\n}\nexport { _arrayWithoutHoles as default };"],"x_google_ignoreList":[0],"mappings":";;AACA,SAAS,mBAAmB,GAAG;CAC7B,IAAI,MAAM,QAAQ,CAAC,GAAG,OAAOA,yBAAAA,QAAiB,CAAC;AACjD"}
@@ -0,0 +1,9 @@
1
+ //#region node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
2
+ function _assertThisInitialized(e) {
3
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4
+ return e;
5
+ }
6
+ //#endregion
7
+ exports.default = _assertThisInitialized;
8
+
9
+ //# sourceMappingURL=assertThisInitialized.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertThisInitialized.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"],"sourcesContent":["function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nexport { _assertThisInitialized as default };"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,uBAAuB,GAAG;CACjC,IAAI,KAAK,MAAM,GAAG,MAAM,IAAI,eAAe,2DAA2D;CACtG,OAAO;AACT"}
@@ -0,0 +1,8 @@
1
+ //#region node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/classCallCheck.js
2
+ function _classCallCheck(a, n) {
3
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
4
+ }
5
+ //#endregion
6
+ exports.default = _classCallCheck;
7
+
8
+ //# sourceMappingURL=classCallCheck.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classCallCheck.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/classCallCheck.js"],"sourcesContent":["function _classCallCheck(a, n) {\n if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nexport { _classCallCheck as default };"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,gBAAgB,GAAG,GAAG;CAC7B,IAAI,EAAE,aAAa,IAAI,MAAM,IAAI,UAAU,mCAAmC;AAChF"}
@@ -0,0 +1,15 @@
1
+ const require_toPropertyKey = require("./toPropertyKey.js");
2
+ //#region node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/createClass.js
3
+ function _defineProperties(e, r) {
4
+ for (var t = 0; t < r.length; t++) {
5
+ var o = r[t];
6
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, require_toPropertyKey.default(o.key), o);
7
+ }
8
+ }
9
+ function _createClass(e, r, t) {
10
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
11
+ }
12
+ //#endregion
13
+ exports.default = _createClass;
14
+
15
+ //# sourceMappingURL=createClass.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createClass.js","names":["toPropertyKey"],"sources":["../../../../../../../../../../node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/createClass.js"],"sourcesContent":["import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(e, r) {\n for (var t = 0; t < r.length; t++) {\n var o = r[t];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);\n }\n}\nfunction _createClass(e, r, t) {\n return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), e;\n}\nexport { _createClass as default };"],"x_google_ignoreList":[0],"mappings":";;AACA,SAAS,kBAAkB,GAAG,GAAG;CAC/B,KAAK,IAAI,IAAI,GAAG,IAAI,EAAE,QAAQ,KAAK;EACjC,IAAI,IAAI,EAAE;EACV,EAAE,aAAa,EAAE,cAAc,CAAC,GAAG,EAAE,eAAe,CAAC,GAAG,WAAW,MAAM,EAAE,WAAW,CAAC,IAAI,OAAO,eAAe,GAAGA,sBAAAA,QAAc,EAAE,GAAG,GAAG,CAAC;CAC7I;AACF;AACA,SAAS,aAAa,GAAG,GAAG,GAAG;CAC7B,OAAO,KAAK,kBAAkB,EAAE,WAAW,CAAC,GAAG,KAAK,kBAAkB,GAAG,CAAC,GAAG,OAAO,eAAe,GAAG,aAAa,EACjH,UAAU,CAAC,EACb,CAAC,GAAG;AACN"}
@@ -0,0 +1,19 @@
1
+ const require_getPrototypeOf = require("./getPrototypeOf.js");
2
+ const require_isNativeReflectConstruct = require("./isNativeReflectConstruct.js");
3
+ const require_possibleConstructorReturn = require("./possibleConstructorReturn.js");
4
+ //#region node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/createSuper.js
5
+ function _createSuper(t) {
6
+ var r = require_isNativeReflectConstruct.default();
7
+ return function() {
8
+ var e, o = require_getPrototypeOf.default(t);
9
+ if (r) {
10
+ var s = require_getPrototypeOf.default(this).constructor;
11
+ e = Reflect.construct(o, arguments, s);
12
+ } else e = o.apply(this, arguments);
13
+ return require_possibleConstructorReturn.default(this, e);
14
+ };
15
+ }
16
+ //#endregion
17
+ exports.default = _createSuper;
18
+
19
+ //# sourceMappingURL=createSuper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createSuper.js","names":["isNativeReflectConstruct","getPrototypeOf","possibleConstructorReturn"],"sources":["../../../../../../../../../../node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/createSuper.js"],"sourcesContent":["import getPrototypeOf from \"./getPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nimport possibleConstructorReturn from \"./possibleConstructorReturn.js\";\nfunction _createSuper(t) {\n var r = isNativeReflectConstruct();\n return function () {\n var e,\n o = getPrototypeOf(t);\n if (r) {\n var s = getPrototypeOf(this).constructor;\n e = Reflect.construct(o, arguments, s);\n } else e = o.apply(this, arguments);\n return possibleConstructorReturn(this, e);\n };\n}\nexport { _createSuper as default };"],"x_google_ignoreList":[0],"mappings":";;;;AAGA,SAAS,aAAa,GAAG;CACvB,IAAI,IAAIA,iCAAAA,QAAyB;CACjC,OAAO,WAAY;EACjB,IAAI,GACF,IAAIC,uBAAAA,QAAe,CAAC;EACtB,IAAI,GAAG;GACL,IAAI,IAAIA,uBAAAA,QAAe,IAAI,CAAC,CAAC;GAC7B,IAAI,QAAQ,UAAU,GAAG,WAAW,CAAC;EACvC,OAAO,IAAI,EAAE,MAAM,MAAM,SAAS;EAClC,OAAOC,kCAAAA,QAA0B,MAAM,CAAC;CAC1C;AACF"}
@@ -0,0 +1,14 @@
1
+ const require_toPropertyKey = require("./toPropertyKey.js");
2
+ //#region node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/defineProperty.js
3
+ function _defineProperty(e, r, t) {
4
+ return (r = require_toPropertyKey.default(r)) in e ? Object.defineProperty(e, r, {
5
+ value: t,
6
+ enumerable: !0,
7
+ configurable: !0,
8
+ writable: !0
9
+ }) : e[r] = t, e;
10
+ }
11
+ //#endregion
12
+ exports.default = _defineProperty;
13
+
14
+ //# sourceMappingURL=defineProperty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defineProperty.js","names":["toPropertyKey"],"sources":["../../../../../../../../../../node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/defineProperty.js"],"sourcesContent":["import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };"],"x_google_ignoreList":[0],"mappings":";;AACA,SAAS,gBAAgB,GAAG,GAAG,GAAG;CAChC,QAAQ,IAAIA,sBAAAA,QAAc,CAAC,MAAM,IAAI,OAAO,eAAe,GAAG,GAAG;EAC/D,OAAO;EACP,YAAY,CAAC;EACb,cAAc,CAAC;EACf,UAAU,CAAC;CACb,CAAC,IAAI,EAAE,KAAK,GAAG;AACjB"}
@@ -0,0 +1,19 @@
1
+ //#region node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/extends.js
2
+ function _extends() {
3
+ return _extends = Object.assign ? Object.assign.bind() : function(n) {
4
+ for (var e = 1; e < arguments.length; e++) {
5
+ var t = arguments[e];
6
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
7
+ }
8
+ return n;
9
+ }, _extends.apply(null, arguments);
10
+ }
11
+ //#endregion
12
+ Object.defineProperty(exports, "default", {
13
+ enumerable: true,
14
+ get: function() {
15
+ return _extends;
16
+ }
17
+ });
18
+
19
+ //# sourceMappingURL=extends.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extends.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/extends.js"],"sourcesContent":["function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,WAAW;CAClB,OAAO,WAAW,OAAO,SAAS,OAAO,OAAO,KAAK,IAAI,SAAU,GAAG;EACpE,KAAK,IAAI,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;GACzC,IAAI,IAAI,UAAU;GAClB,KAAK,IAAI,KAAK,GAAG,CAAC,CAAC,EAAA,CAAG,eAAe,KAAK,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE;EAC/D;EACA,OAAO;CACT,GAAG,SAAS,MAAM,MAAM,SAAS;AACnC"}
@@ -0,0 +1,15 @@
1
+ //#region node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
2
+ function _getPrototypeOf(t) {
3
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
4
+ return t.__proto__ || Object.getPrototypeOf(t);
5
+ }, _getPrototypeOf(t);
6
+ }
7
+ //#endregion
8
+ Object.defineProperty(exports, "default", {
9
+ enumerable: true,
10
+ get: function() {
11
+ return _getPrototypeOf;
12
+ }
13
+ });
14
+
15
+ //# sourceMappingURL=getPrototypeOf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPrototypeOf.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"],"sourcesContent":["function _getPrototypeOf(t) {\n return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n return t.__proto__ || Object.getPrototypeOf(t);\n }, _getPrototypeOf(t);\n}\nexport { _getPrototypeOf as default };"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,gBAAgB,GAAG;CAC1B,OAAO,kBAAkB,OAAO,iBAAiB,OAAO,eAAe,KAAK,IAAI,SAAU,GAAG;EAC3F,OAAO,EAAE,aAAa,OAAO,eAAe,CAAC;CAC/C,GAAG,gBAAgB,CAAC;AACtB"}
@@ -0,0 +1,14 @@
1
+ const require_setPrototypeOf = require("./setPrototypeOf.js");
2
+ //#region node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/inherits.js
3
+ function _inherits(t, e) {
4
+ if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
5
+ t.prototype = Object.create(e && e.prototype, { constructor: {
6
+ value: t,
7
+ writable: !0,
8
+ configurable: !0
9
+ } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && require_setPrototypeOf.default(t, e);
10
+ }
11
+ //#endregion
12
+ exports.default = _inherits;
13
+
14
+ //# sourceMappingURL=inherits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inherits.js","names":["setPrototypeOf"],"sources":["../../../../../../../../../../node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/inherits.js"],"sourcesContent":["import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inherits(t, e) {\n if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n t.prototype = Object.create(e && e.prototype, {\n constructor: {\n value: t,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), e && setPrototypeOf(t, e);\n}\nexport { _inherits as default };"],"x_google_ignoreList":[0],"mappings":";;AACA,SAAS,UAAU,GAAG,GAAG;CACvB,IAAI,cAAc,OAAO,KAAK,SAAS,GAAG,MAAM,IAAI,UAAU,oDAAoD;CAClH,EAAE,YAAY,OAAO,OAAO,KAAK,EAAE,WAAW,EAC5C,aAAa;EACX,OAAO;EACP,UAAU,CAAC;EACX,cAAc,CAAC;CACjB,EACF,CAAC,GAAG,OAAO,eAAe,GAAG,aAAa,EACxC,UAAU,CAAC,EACb,CAAC,GAAG,KAAKA,uBAAAA,QAAe,GAAG,CAAC;AAC9B"}
@@ -0,0 +1,18 @@
1
+ //#region node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
2
+ function _isNativeReflectConstruct() {
3
+ try {
4
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
5
+ } catch (t) {}
6
+ return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {
7
+ return !!t;
8
+ })();
9
+ }
10
+ //#endregion
11
+ Object.defineProperty(exports, "default", {
12
+ enumerable: true,
13
+ get: function() {
14
+ return _isNativeReflectConstruct;
15
+ }
16
+ });
17
+
18
+ //# sourceMappingURL=isNativeReflectConstruct.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isNativeReflectConstruct.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@babel+runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js"],"sourcesContent":["function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {\n return !!t;\n })();\n}\nexport { _isNativeReflectConstruct as default };"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,4BAA4B;CACnC,IAAI;EACF,IAAI,IAAI,CAAC,QAAQ,UAAU,QAAQ,KAAK,QAAQ,UAAU,SAAS,CAAC,GAAG,WAAY,CAAC,CAAC,CAAC;CACxF,SAAS,GAAG,CAAC;CACb,QAAQ,4BAA4B,SAAS,4BAA4B;EACvE,OAAO,CAAC,CAAC;CACX,EAAA,CAAG;AACL"}