@perses-dev/prometheus-plugin 0.50.3 → 0.51.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +183 -183
- package/README.md +41 -0
- package/__mf/css/async/2341.dacad691.css +1 -0
- package/__mf/css/async/5263.dacad691.css +1 -0
- package/__mf/css/async/6759.dacad691.css +1 -0
- package/__mf/font/lato-all-300-normal.322bdf14.woff +0 -0
- package/__mf/font/lato-all-400-normal.63513b00.woff +0 -0
- package/__mf/font/lato-all-700-normal.bb27db94.woff +0 -0
- package/__mf/font/lato-all-900-normal.a27049a3.woff +0 -0
- package/__mf/font/lato-latin-300-normal.c5195215.woff2 +0 -0
- package/__mf/font/lato-latin-400-normal.b7ffde23.woff2 +0 -0
- package/__mf/font/lato-latin-700-normal.d5eb20bc.woff2 +0 -0
- package/__mf/font/lato-latin-900-normal.d884a71c.woff2 +0 -0
- package/__mf/font/lato-latin-ext-300-normal.abcc64a9.woff2 +0 -0
- package/__mf/font/lato-latin-ext-400-normal.6ebed106.woff2 +0 -0
- package/__mf/font/lato-latin-ext-700-normal.8697d1d5.woff2 +0 -0
- package/__mf/font/lato-latin-ext-900-normal.20a2b415.woff2 +0 -0
- package/__mf/js/622.f7592106.js +5 -0
- package/__mf/js/Prometheus.328aad7c.js +5 -0
- package/__mf/js/async/1465.3b5e12d5.js +1 -0
- package/__mf/js/async/1495.6c8b8071.js +1 -0
- package/__mf/js/async/1620.6376bd14.js +2 -0
- package/__mf/js/async/1620.6376bd14.js.LICENSE.txt +9 -0
- package/__mf/js/async/1864.df7c4beb.js +1 -0
- package/__mf/js/async/1950.704c331e.js +1 -0
- package/__mf/js/async/1964.95da06f6.js +2 -0
- package/__mf/js/async/1964.95da06f6.js.LICENSE.txt +9 -0
- package/__mf/js/async/1996.01084c88.js +2 -0
- package/__mf/js/async/1996.01084c88.js.LICENSE.txt +24 -0
- package/__mf/js/async/212.bd5d617a.js +1 -0
- package/__mf/js/async/2316.fec4907a.js +1 -0
- package/__mf/js/async/232.f3523a60.js +1 -0
- package/__mf/js/async/2569.daf868a6.js +10 -0
- package/__mf/js/async/2569.daf868a6.js.LICENSE.txt +27 -0
- package/__mf/js/async/2675.c3b73822.js +1 -0
- package/__mf/js/async/3224.23f0dccf.js +1 -0
- package/__mf/js/async/3355.a4dbcdb0.js +1 -0
- package/__mf/js/async/3436.97c926a4.js +1 -0
- package/__mf/js/async/3818.dde21d04.js +1 -0
- package/__mf/js/async/3871.6915e369.js +1 -0
- package/__mf/js/async/3960.129d5ef5.js +2 -0
- package/__mf/js/async/3960.129d5ef5.js.LICENSE.txt +8 -0
- package/__mf/js/async/4075.b77ca1c7.js +1 -0
- package/__mf/js/async/4238.8e4d29d5.js +1 -0
- package/__mf/js/async/4323.4266fd6a.js +1 -0
- package/__mf/js/async/4421.1bcc1637.js +1 -0
- package/__mf/js/async/4489.3361e7bc.js +29 -0
- package/__mf/js/async/4489.3361e7bc.js.LICENSE.txt +59 -0
- package/__mf/js/async/5214.027c4332.js +1 -0
- package/__mf/js/async/5345.8c2e4b4a.js +1 -0
- package/__mf/js/async/537.6911ea2e.js +1 -0
- package/__mf/js/async/5387.fd6e16d6.js +1 -0
- package/__mf/js/async/5654.ecb41aea.js +38 -0
- package/__mf/js/async/5724.6ee6ec51.js +1 -0
- package/__mf/js/async/5774.9b0b6be1.js +1 -0
- package/__mf/js/async/5790.2273e061.js +1 -0
- package/__mf/js/async/5913.9d30fd07.js +73 -0
- package/__mf/js/async/5913.9d30fd07.js.LICENSE.txt +19 -0
- package/__mf/js/async/5914.bd342d22.js +74 -0
- package/__mf/js/async/5981.40bed0d0.js +2 -0
- package/__mf/js/async/5981.40bed0d0.js.LICENSE.txt +8 -0
- package/__mf/js/async/6292.7b8efa78.js +1 -0
- package/__mf/js/async/6333.865a46e0.js +2 -0
- package/__mf/js/async/6333.865a46e0.js.LICENSE.txt +9 -0
- package/__mf/js/async/6377.ca974d89.js +2 -0
- package/__mf/js/async/6377.ca974d89.js.LICENSE.txt +32 -0
- package/__mf/js/async/6770.adb1c939.js +1 -0
- package/__mf/js/async/684.ca510333.js +1 -0
- package/__mf/js/async/694.f861d67c.js +1 -0
- package/__mf/js/async/7272.a763aa92.js +1 -0
- package/__mf/js/async/738.aca54e25.js +1 -0
- package/__mf/js/async/7740.0c5363fd.js +1 -0
- package/__mf/js/async/8265.b9e2c31e.js +1 -0
- package/__mf/js/async/8488.5237550f.js +1 -0
- package/__mf/js/async/8587.4891ea90.js +1 -0
- package/__mf/js/async/8610.8300df79.js +1 -0
- package/__mf/js/async/87.fdc843ac.js +1 -0
- package/__mf/js/async/8930.9fbbc975.js +1 -0
- package/__mf/js/async/8997.18901f45.js +28 -0
- package/__mf/js/async/9173.e8fbead5.js +2 -0
- package/__mf/js/async/9173.e8fbead5.js.LICENSE.txt +19 -0
- package/__mf/js/async/__federation_expose_PrometheusDatasource.f6f57299.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusExplorer.5fcf955a.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusLabelNamesVariable.86d0ad5a.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusLabelValuesVariable.b2893484.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusPromQLVariable.cd16f6e8.js +1 -0
- package/__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.eb9eefa6.js +1 -0
- package/__mf/js/main.154a5b65.js +1 -0
- package/lib/bootstrap.d.ts +2 -0
- package/lib/bootstrap.d.ts.map +1 -0
- package/lib/bootstrap.js +19 -0
- package/lib/bootstrap.js.map +1 -0
- package/lib/cjs/bootstrap.js +26 -0
- package/{dist → lib}/cjs/components/PromQLEditor.js +9 -7
- package/lib/cjs/components/TreeNode.js +492 -0
- package/{dist → lib}/cjs/components/promql/ast.js +21 -21
- package/lib/cjs/components/promql/functionSignatures.js +651 -0
- package/lib/cjs/components/promql/serialize.js +88 -0
- package/{dist → lib}/cjs/components/promql/utils.js +12 -1
- package/{dist/cjs/components/parse.js → lib/cjs/components/query.js} +37 -4
- package/lib/cjs/env.d.js +14 -0
- package/lib/cjs/explore/PrometheusExplorer.js +203 -0
- package/lib/cjs/explore/PrometheusMetricsFinder/PrometheusMetricsFinder.js +268 -0
- package/lib/cjs/explore/PrometheusMetricsFinder/display/MetricChip.js +61 -0
- package/lib/cjs/explore/PrometheusMetricsFinder/display/list/MetricList.js +179 -0
- package/lib/cjs/explore/PrometheusMetricsFinder/filter/FilterInputs.js +231 -0
- package/lib/cjs/explore/PrometheusMetricsFinder/filter/FinderFilters.js +97 -0
- package/{dist/cjs/plugins/prometheus-time-series-query → lib/cjs/explore/PrometheusMetricsFinder}/index.js +1 -1
- package/lib/cjs/explore/PrometheusMetricsFinder/overview/MetricOverview.js +235 -0
- package/lib/cjs/explore/PrometheusMetricsFinder/overview/tabs/JobTab.js +144 -0
- package/lib/cjs/explore/PrometheusMetricsFinder/overview/tabs/OverviewTab.js +423 -0
- package/lib/cjs/explore/PrometheusMetricsFinder/overview/tabs/SimilarTab.js +53 -0
- package/lib/cjs/explore/PrometheusMetricsFinder/types.js +25 -0
- package/lib/cjs/explore/PrometheusMetricsFinder/utils.js +203 -0
- package/lib/cjs/explore/index.js +19 -0
- package/lib/cjs/getPluginModule.js +27 -0
- package/lib/cjs/index-federation.js +55 -0
- package/lib/cjs/index.js +28 -0
- package/{dist → lib}/cjs/model/api-types.js +1 -1
- package/{dist → lib}/cjs/model/prometheus-client.js +1 -1
- package/lib/cjs/plugins/PrometheusDatasourceEditor.js +109 -0
- package/lib/cjs/plugins/PrometheusLabelNamesVariable.js +34 -0
- package/lib/cjs/plugins/PrometheusLabelValuesVariable.js +38 -0
- package/lib/cjs/plugins/PrometheusPromQLVariable.js +42 -0
- package/lib/cjs/plugins/index.js +26 -0
- package/{dist → lib}/cjs/plugins/prometheus-datasource.js +9 -9
- package/{dist → lib}/cjs/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js +11 -9
- package/{dist → lib}/cjs/plugins/prometheus-time-series-query/get-time-series-data.js +51 -29
- package/lib/cjs/plugins/prometheus-time-series-query/index.js +35 -0
- package/{dist → lib}/cjs/plugins/prometheus-variables.js +25 -101
- package/{dist → lib}/cjs/plugins/variable.js +1 -2
- package/lib/cjs/setup-tests.js +19 -0
- package/{dist → lib}/cjs/utils/utils.js +1 -2
- package/lib/components/PromQLEditor.d.ts.map +1 -0
- package/{dist → lib}/components/PromQLEditor.js +9 -7
- package/lib/components/PromQLEditor.js.map +1 -0
- package/lib/components/TreeNode.d.ts +15 -0
- package/lib/components/TreeNode.d.ts.map +1 -0
- package/lib/components/TreeNode.js +479 -0
- package/lib/components/TreeNode.js.map +1 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/promql/ast.d.ts.map +1 -0
- package/{dist → lib}/components/promql/ast.js +21 -21
- package/lib/components/promql/ast.js.map +1 -0
- package/{dist → lib}/components/promql/format.d.ts +1 -1
- package/lib/components/promql/format.d.ts.map +1 -0
- package/lib/components/promql/format.js.map +1 -0
- package/lib/components/promql/functionSignatures.d.ts +3 -0
- package/lib/components/promql/functionSignatures.d.ts.map +1 -0
- package/lib/components/promql/functionSignatures.js +643 -0
- package/lib/components/promql/functionSignatures.js.map +1 -0
- package/lib/components/promql/serialize.d.ts +4 -0
- package/lib/components/promql/serialize.d.ts.map +1 -0
- package/lib/components/promql/serialize.js +80 -0
- package/lib/components/promql/serialize.js.map +1 -0
- package/{dist → lib}/components/promql/utils.d.ts +1 -0
- package/lib/components/promql/utils.d.ts.map +1 -0
- package/{dist → lib}/components/promql/utils.js +9 -1
- package/lib/components/promql/utils.js.map +1 -0
- package/lib/components/query.d.ts +6 -0
- package/lib/components/query.d.ts.map +1 -0
- package/{dist/components/parse.js → lib/components/query.js} +27 -2
- package/lib/components/query.js.map +1 -0
- package/lib/env.d.js +15 -0
- package/lib/env.d.js.map +1 -0
- package/lib/explore/PrometheusExplorer.d.ts +3 -0
- package/lib/explore/PrometheusExplorer.d.ts.map +1 -0
- package/lib/explore/PrometheusExplorer.js +190 -0
- package/lib/explore/PrometheusExplorer.js.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/PrometheusMetricsFinder.d.ts +31 -0
- package/lib/explore/PrometheusMetricsFinder/PrometheusMetricsFinder.d.ts.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/PrometheusMetricsFinder.js +244 -0
- package/lib/explore/PrometheusMetricsFinder/PrometheusMetricsFinder.js.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/display/MetricChip.d.ts +4 -0
- package/lib/explore/PrometheusMetricsFinder/display/MetricChip.d.ts.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/display/MetricChip.js +53 -0
- package/lib/explore/PrometheusMetricsFinder/display/MetricChip.js.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/display/list/MetricList.d.ts +27 -0
- package/lib/explore/PrometheusMetricsFinder/display/list/MetricList.d.ts.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/display/list/MetricList.js +158 -0
- package/lib/explore/PrometheusMetricsFinder/display/list/MetricList.js.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/filter/FilterInputs.d.ts +23 -0
- package/lib/explore/PrometheusMetricsFinder/filter/FilterInputs.d.ts.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/filter/FilterInputs.js +209 -0
- package/lib/explore/PrometheusMetricsFinder/filter/FilterInputs.js.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/filter/FinderFilters.d.ts +13 -0
- package/lib/explore/PrometheusMetricsFinder/filter/FinderFilters.d.ts.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/filter/FinderFilters.js +84 -0
- package/lib/explore/PrometheusMetricsFinder/filter/FinderFilters.js.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/index.d.ts +2 -0
- package/lib/explore/PrometheusMetricsFinder/index.d.ts.map +1 -0
- package/{dist/model/api-types.js → lib/explore/PrometheusMetricsFinder/index.js} +2 -2
- package/lib/explore/PrometheusMetricsFinder/index.js.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/overview/MetricOverview.d.ts +23 -0
- package/lib/explore/PrometheusMetricsFinder/overview/MetricOverview.d.ts.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/overview/MetricOverview.js +214 -0
- package/lib/explore/PrometheusMetricsFinder/overview/MetricOverview.js.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/overview/tabs/JobTab.d.ts +28 -0
- package/lib/explore/PrometheusMetricsFinder/overview/tabs/JobTab.d.ts.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/overview/tabs/JobTab.js +125 -0
- package/lib/explore/PrometheusMetricsFinder/overview/tabs/JobTab.js.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/overview/tabs/OverviewTab.d.ts +25 -0
- package/lib/explore/PrometheusMetricsFinder/overview/tabs/OverviewTab.d.ts.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/overview/tabs/OverviewTab.js +399 -0
- package/lib/explore/PrometheusMetricsFinder/overview/tabs/OverviewTab.js.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/overview/tabs/SimilarTab.d.ts +12 -0
- package/lib/explore/PrometheusMetricsFinder/overview/tabs/SimilarTab.d.ts.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/overview/tabs/SimilarTab.js +45 -0
- package/lib/explore/PrometheusMetricsFinder/overview/tabs/SimilarTab.js.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/types.d.ts +22 -0
- package/lib/explore/PrometheusMetricsFinder/types.d.ts.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/types.js +17 -0
- package/lib/explore/PrometheusMetricsFinder/types.js.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/utils.d.ts +22 -0
- package/lib/explore/PrometheusMetricsFinder/utils.d.ts.map +1 -0
- package/lib/explore/PrometheusMetricsFinder/utils.js +185 -0
- package/lib/explore/PrometheusMetricsFinder/utils.js.map +1 -0
- package/lib/explore/index.d.ts +3 -0
- package/lib/explore/index.d.ts.map +1 -0
- package/lib/explore/index.js +4 -0
- package/lib/explore/index.js.map +1 -0
- package/lib/getPluginModule.d.ts +6 -0
- package/lib/getPluginModule.d.ts.map +1 -0
- package/lib/getPluginModule.js +16 -0
- package/lib/getPluginModule.js.map +1 -0
- package/lib/index-federation.d.ts +1 -0
- package/lib/index-federation.d.ts.map +1 -0
- package/lib/index-federation.js +15 -0
- package/{dist/components/index.js.map → lib/index-federation.js.map} +1 -1
- package/lib/index.d.ts +6 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +7 -0
- package/lib/index.js.map +1 -0
- package/{dist → lib}/model/api-types.d.ts +18 -1
- package/lib/model/api-types.d.ts.map +1 -0
- package/{dist/plugins/prometheus-time-series-query/index.js → lib/model/api-types.js} +3 -3
- package/lib/model/api-types.js.map +1 -0
- package/lib/model/index.d.ts.map +1 -0
- package/lib/model/index.js.map +1 -0
- package/lib/model/parse-sample-values.d.ts.map +1 -0
- package/lib/model/parse-sample-values.js.map +1 -0
- package/lib/model/prometheus-client.d.ts.map +1 -0
- package/{dist → lib}/model/prometheus-client.js +1 -1
- package/lib/model/prometheus-client.js.map +1 -0
- package/lib/model/prometheus-selectors.d.ts.map +1 -0
- package/lib/model/prometheus-selectors.js.map +1 -0
- package/lib/model/time.d.ts.map +1 -0
- package/lib/model/time.js.map +1 -0
- package/lib/plugins/MatcherEditor.d.ts.map +1 -0
- package/lib/plugins/MatcherEditor.js.map +1 -0
- package/lib/plugins/PrometheusDatasourceEditor.d.ts.map +1 -0
- package/lib/plugins/PrometheusDatasourceEditor.js +96 -0
- package/lib/plugins/PrometheusDatasourceEditor.js.map +1 -0
- package/lib/plugins/PrometheusLabelNamesVariable.d.ts +4 -0
- package/lib/plugins/PrometheusLabelNamesVariable.d.ts.map +1 -0
- package/lib/plugins/PrometheusLabelNamesVariable.js +26 -0
- package/lib/plugins/PrometheusLabelNamesVariable.js.map +1 -0
- package/lib/plugins/PrometheusLabelValuesVariable.d.ts +4 -0
- package/lib/plugins/PrometheusLabelValuesVariable.d.ts.map +1 -0
- package/lib/plugins/PrometheusLabelValuesVariable.js +30 -0
- package/lib/plugins/PrometheusLabelValuesVariable.js.map +1 -0
- package/lib/plugins/PrometheusPromQLVariable.d.ts +4 -0
- package/lib/plugins/PrometheusPromQLVariable.d.ts.map +1 -0
- package/lib/plugins/PrometheusPromQLVariable.js +34 -0
- package/lib/plugins/PrometheusPromQLVariable.js.map +1 -0
- package/lib/plugins/index.d.ts +10 -0
- package/lib/plugins/index.d.ts.map +1 -0
- package/lib/plugins/index.js +11 -0
- package/lib/plugins/index.js.map +1 -0
- package/lib/plugins/prometheus-datasource.d.ts.map +1 -0
- package/{dist → lib}/plugins/prometheus-datasource.js +9 -9
- package/lib/plugins/prometheus-datasource.js.map +1 -0
- package/lib/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.d.ts.map +1 -0
- package/lib/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.js.map +1 -0
- package/lib/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.d.ts.map +1 -0
- package/{dist → lib}/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js +9 -7
- package/lib/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js.map +1 -0
- package/lib/plugins/prometheus-time-series-query/get-time-series-data.d.ts.map +1 -0
- package/{dist → lib}/plugins/prometheus-time-series-query/get-time-series-data.js +51 -29
- package/lib/plugins/prometheus-time-series-query/get-time-series-data.js.map +1 -0
- package/lib/plugins/prometheus-time-series-query/index.d.ts +7 -0
- package/lib/plugins/prometheus-time-series-query/index.d.ts.map +1 -0
- package/lib/plugins/prometheus-time-series-query/index.js +20 -0
- package/lib/plugins/prometheus-time-series-query/index.js.map +1 -0
- package/lib/plugins/prometheus-time-series-query/query-editor-model.d.ts.map +1 -0
- package/lib/plugins/prometheus-time-series-query/query-editor-model.js.map +1 -0
- package/lib/plugins/prometheus-time-series-query/replace-prom-builtin-variables.d.ts.map +1 -0
- package/lib/plugins/prometheus-time-series-query/replace-prom-builtin-variables.js.map +1 -0
- package/lib/plugins/prometheus-time-series-query/time-series-query-model.d.ts.map +1 -0
- package/lib/plugins/prometheus-time-series-query/time-series-query-model.js.map +1 -0
- package/lib/plugins/prometheus-variables.d.ts +14 -0
- package/lib/plugins/prometheus-variables.d.ts.map +1 -0
- package/{dist → lib}/plugins/prometheus-variables.js +15 -98
- package/lib/plugins/prometheus-variables.js.map +1 -0
- package/lib/plugins/types.d.ts.map +1 -0
- package/lib/plugins/types.js.map +1 -0
- package/lib/plugins/variable.d.ts.map +1 -0
- package/{dist → lib}/plugins/variable.js +1 -2
- package/lib/plugins/variable.js.map +1 -0
- package/lib/setup-tests.d.ts +2 -0
- package/lib/setup-tests.d.ts.map +1 -0
- package/lib/setup-tests.js +17 -0
- package/{dist/utils/index.js.map → lib/setup-tests.js.map} +1 -1
- package/lib/test/setup-tests.d.ts.map +1 -0
- package/lib/test/setup-tests.js.map +1 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/utils.d.ts.map +1 -0
- package/{dist → lib}/utils/utils.js +1 -2
- package/lib/utils/utils.js.map +1 -0
- package/mf-manifest.json +898 -0
- package/mf-stats.json +1004 -0
- package/package.json +99 -38
- package/dist/cjs/components/TreeNode.js +0 -147
- package/dist/cjs/index.js +0 -61
- package/dist/cjs/plugins/PrometheusDatasourceEditor.js +0 -626
- package/dist/components/PromQLEditor.d.ts.map +0 -1
- package/dist/components/PromQLEditor.js.map +0 -1
- package/dist/components/TreeNode.d.ts +0 -10
- package/dist/components/TreeNode.d.ts.map +0 -1
- package/dist/components/TreeNode.js +0 -139
- package/dist/components/TreeNode.js.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/parse.d.ts +0 -5
- package/dist/components/parse.d.ts.map +0 -1
- package/dist/components/parse.js.map +0 -1
- package/dist/components/promql/ast.d.ts.map +0 -1
- package/dist/components/promql/ast.js.map +0 -1
- package/dist/components/promql/format.d.ts.map +0 -1
- package/dist/components/promql/format.js.map +0 -1
- package/dist/components/promql/utils.d.ts.map +0 -1
- package/dist/components/promql/utils.js.map +0 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -24
- package/dist/index.js.map +0 -1
- package/dist/model/api-types.d.ts.map +0 -1
- package/dist/model/api-types.js.map +0 -1
- package/dist/model/index.d.ts.map +0 -1
- package/dist/model/index.js.map +0 -1
- package/dist/model/parse-sample-values.d.ts.map +0 -1
- package/dist/model/parse-sample-values.js.map +0 -1
- package/dist/model/prometheus-client.d.ts.map +0 -1
- package/dist/model/prometheus-client.js.map +0 -1
- package/dist/model/prometheus-selectors.d.ts.map +0 -1
- package/dist/model/prometheus-selectors.js.map +0 -1
- package/dist/model/time.d.ts.map +0 -1
- package/dist/model/time.js.map +0 -1
- package/dist/plugins/MatcherEditor.d.ts.map +0 -1
- package/dist/plugins/MatcherEditor.js.map +0 -1
- package/dist/plugins/PrometheusDatasourceEditor.d.ts.map +0 -1
- package/dist/plugins/PrometheusDatasourceEditor.js +0 -572
- package/dist/plugins/PrometheusDatasourceEditor.js.map +0 -1
- package/dist/plugins/prometheus-datasource.d.ts.map +0 -1
- package/dist/plugins/prometheus-datasource.js.map +0 -1
- package/dist/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.d.ts.map +0 -1
- package/dist/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.js.map +0 -1
- package/dist/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.d.ts.map +0 -1
- package/dist/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js.map +0 -1
- package/dist/plugins/prometheus-time-series-query/get-time-series-data.d.ts.map +0 -1
- package/dist/plugins/prometheus-time-series-query/get-time-series-data.js.map +0 -1
- package/dist/plugins/prometheus-time-series-query/index.d.ts +0 -2
- package/dist/plugins/prometheus-time-series-query/index.d.ts.map +0 -1
- package/dist/plugins/prometheus-time-series-query/index.js.map +0 -1
- package/dist/plugins/prometheus-time-series-query/query-editor-model.d.ts.map +0 -1
- package/dist/plugins/prometheus-time-series-query/query-editor-model.js.map +0 -1
- package/dist/plugins/prometheus-time-series-query/replace-prom-builtin-variables.d.ts.map +0 -1
- package/dist/plugins/prometheus-time-series-query/replace-prom-builtin-variables.js.map +0 -1
- package/dist/plugins/prometheus-time-series-query/time-series-query-model.d.ts.map +0 -1
- package/dist/plugins/prometheus-time-series-query/time-series-query-model.js.map +0 -1
- package/dist/plugins/prometheus-variables.d.ts +0 -6
- package/dist/plugins/prometheus-variables.d.ts.map +0 -1
- package/dist/plugins/prometheus-variables.js.map +0 -1
- package/dist/plugins/types.d.ts.map +0 -1
- package/dist/plugins/types.js.map +0 -1
- package/dist/plugins/variable.d.ts.map +0 -1
- package/dist/plugins/variable.js.map +0 -1
- package/dist/test/setup-tests.d.ts.map +0 -1
- package/dist/test/setup-tests.js.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/utils.d.ts.map +0 -1
- package/dist/utils/utils.js.map +0 -1
- package/plugin.json +0 -58
- /package/{dist → lib}/cjs/components/index.js +0 -0
- /package/{dist → lib}/cjs/components/promql/format.js +0 -0
- /package/{dist → lib}/cjs/model/index.js +0 -0
- /package/{dist → lib}/cjs/model/parse-sample-values.js +0 -0
- /package/{dist → lib}/cjs/model/prometheus-selectors.js +0 -0
- /package/{dist → lib}/cjs/model/time.js +0 -0
- /package/{dist → lib}/cjs/plugins/MatcherEditor.js +0 -0
- /package/{dist → lib}/cjs/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.js +0 -0
- /package/{dist → lib}/cjs/plugins/prometheus-time-series-query/query-editor-model.js +0 -0
- /package/{dist → lib}/cjs/plugins/prometheus-time-series-query/replace-prom-builtin-variables.js +0 -0
- /package/{dist → lib}/cjs/plugins/prometheus-time-series-query/time-series-query-model.js +0 -0
- /package/{dist → lib}/cjs/plugins/types.js +0 -0
- /package/{dist → lib}/cjs/test/setup-tests.js +0 -0
- /package/{dist → lib}/cjs/utils/index.js +0 -0
- /package/{dist → lib}/components/PromQLEditor.d.ts +0 -0
- /package/{dist → lib}/components/index.d.ts +0 -0
- /package/{dist → lib}/components/index.js +0 -0
- /package/{dist → lib}/components/promql/ast.d.ts +0 -0
- /package/{dist → lib}/components/promql/format.js +0 -0
- /package/{dist → lib}/model/index.d.ts +0 -0
- /package/{dist → lib}/model/index.js +0 -0
- /package/{dist → lib}/model/parse-sample-values.d.ts +0 -0
- /package/{dist → lib}/model/parse-sample-values.js +0 -0
- /package/{dist → lib}/model/prometheus-client.d.ts +0 -0
- /package/{dist → lib}/model/prometheus-selectors.d.ts +0 -0
- /package/{dist → lib}/model/prometheus-selectors.js +0 -0
- /package/{dist → lib}/model/time.d.ts +0 -0
- /package/{dist → lib}/model/time.js +0 -0
- /package/{dist → lib}/plugins/MatcherEditor.d.ts +0 -0
- /package/{dist → lib}/plugins/MatcherEditor.js +0 -0
- /package/{dist → lib}/plugins/PrometheusDatasourceEditor.d.ts +0 -0
- /package/{dist → lib}/plugins/prometheus-datasource.d.ts +0 -0
- /package/{dist → lib}/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.d.ts +0 -0
- /package/{dist → lib}/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.js +0 -0
- /package/{dist → lib}/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.d.ts +0 -0
- /package/{dist → lib}/plugins/prometheus-time-series-query/get-time-series-data.d.ts +0 -0
- /package/{dist → lib}/plugins/prometheus-time-series-query/query-editor-model.d.ts +0 -0
- /package/{dist → lib}/plugins/prometheus-time-series-query/query-editor-model.js +0 -0
- /package/{dist → lib}/plugins/prometheus-time-series-query/replace-prom-builtin-variables.d.ts +0 -0
- /package/{dist → lib}/plugins/prometheus-time-series-query/replace-prom-builtin-variables.js +0 -0
- /package/{dist → lib}/plugins/prometheus-time-series-query/time-series-query-model.d.ts +0 -0
- /package/{dist → lib}/plugins/prometheus-time-series-query/time-series-query-model.js +0 -0
- /package/{dist → lib}/plugins/types.d.ts +0 -0
- /package/{dist → lib}/plugins/types.js +0 -0
- /package/{dist → lib}/plugins/variable.d.ts +0 -0
- /package/{dist → lib}/test/setup-tests.d.ts +0 -0
- /package/{dist → lib}/test/setup-tests.js +0 -0
- /package/{dist → lib}/utils/index.d.ts +0 -0
- /package/{dist → lib}/utils/index.js +0 -0
- /package/{dist → lib}/utils/utils.d.ts +0 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
|
3
|
+
*
|
|
4
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
* in the Software without restriction, including without limitation the rights
|
|
7
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
* furnished to do so, subject to the following conditions:
|
|
10
|
+
*
|
|
11
|
+
* The above copyright notice and this permission notice shall be included in
|
|
12
|
+
* all copies or substantial portions of the Software.
|
|
13
|
+
*
|
|
14
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
* SOFTWARE.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/*!
|
|
24
|
+
* decimal.js v10.5.0
|
|
25
|
+
* An arbitrary-precision Decimal type for JavaScript.
|
|
26
|
+
* https://github.com/MikeMcl/decimal.js
|
|
27
|
+
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
28
|
+
* MIT Licence
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* react-table
|
|
33
|
+
*
|
|
34
|
+
* Copyright (c) TanStack
|
|
35
|
+
*
|
|
36
|
+
* This source code is licensed under the MIT license found in the
|
|
37
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
38
|
+
*
|
|
39
|
+
* @license MIT
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* table-core
|
|
44
|
+
*
|
|
45
|
+
* Copyright (c) TanStack
|
|
46
|
+
*
|
|
47
|
+
* This source code is licensed under the MIT license found in the
|
|
48
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
49
|
+
*
|
|
50
|
+
* @license MIT
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @license Fraction.js v4.3.7 31/08/2023
|
|
55
|
+
* https://www.xarg.org/2014/03/rational-numbers-in-javascript/
|
|
56
|
+
*
|
|
57
|
+
* Copyright (c) 2023, Robert Eisele (robert@raw.org)
|
|
58
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
59
|
+
**/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkPrometheus=self.webpackChunkPrometheus||[]).push([["5214"],{81228:function(e,t,s){s.r(t),s.d(t,{toNestErrors:()=>a,validateFieldsNatively:()=>l});var i=s(57576);let r=(e,t,s)=>{if(e&&"reportValidity"in e){let r=(0,i.get)(s,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},l=(e,t)=>{for(let s in t.fields){let i=t.fields[s];i&&i.ref&&"reportValidity"in i.ref?r(i.ref,s,e):i.refs&&i.refs.forEach(t=>r(t,s,e))}},a=(e,t)=>{t.shouldUseNativeValidation&&l(e,t);let s={};for(let r in e){let l=(0,i.get)(t.fields,r),a=Object.assign(e[r]||{},{ref:l&&l.ref});if(f(t.names||Object.keys(e),r)){let e=Object.assign({},(0,i.get)(s,r));(0,i.set)(e,"root",a),(0,i.set)(s,r,e)}else(0,i.set)(s,r,a)}return s},f=(e,t)=>e.some(e=>e.startsWith(t+"."))}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkPrometheus=self.webpackChunkPrometheus||[]).push([["5345"],{82901:function(e,r,a){a.d(r,{P:()=>ey});var t,n,i,s,o,c=a(24246),l=a(46359),d=a(51217),p=a(69485),u=a(94776),m=a(25283),v=a(68808),g=a(32964),y=a(75094),x=a(50898),h=a(96402),T=a(54538),j=a(83941),_=a(10763),f=a(27463),b=a(6421),$=a(53034),w=a(36372),E=a(52054),Z=a(71852),S=a(2259),k=a(20791),L=a(78277),F=((t={}).aggregation="aggregation",t.binaryExpr="binaryExpr",t.call="call",t.matrixSelector="matrixSelector",t.subquery="subquery",t.numberLiteral="numberLiteral",t.parenExpr="parenExpr",t.stringLiteral="stringLiteral",t.unaryExpr="unaryExpr",t.vectorSelector="vectorSelector",t.placeholder="placeholder",t),q=((n={}).add="+",n.sub="-",n.mul="*",n.div="/",n.mod="%",n.pow="^",n.eql="==",n.neq="!=",n.gtr=">",n.lss="<",n.gte=">=",n.lte="<=",n.and="and",n.or="or",n.unless="unless",n.atan2="atan2",n),C=((i={}).oneToOne="one-to-one",i.manyToOne="many-to-one",i.oneToMany="one-to-many",i.manyToMany="many-to-many",i),P=((s={}).none="none",s.vector="vector",s.scalar="scalar",s.matrix="matrix",s.string="string",s),I=((o={}).equal="=",o.notEqual="!=",o.matchRegexp="=~",o.matchNotRegexp="!~",o);let O={[q.add]:3,[q.sub]:3,[q.mul]:2,[q.div]:2,[q.mod]:2,[q.pow]:1,[q.eql]:4,[q.neq]:4,[q.gtr]:4,[q.lss]:4,[q.gte]:4,[q.lte]:4,[q.and]:5,[q.or]:6,[q.unless]:5,[q.atan2]:2},R=(e,r)=>r.type!==F.binaryExpr||O[e]>O[r.op]?r:{type:F.parenExpr,expr:r},U=e=>{switch(e.type){case F.aggregation:return null===e.param?[e.expr]:[e.param,e.expr];case F.subquery:case F.parenExpr:return[e.expr];case F.call:return e.args;case F.matrixSelector:case F.vectorSelector:case F.numberLiteral:case F.stringLiteral:return[];case F.placeholder:return e.children;case F.unaryExpr:return[e.expr];case F.binaryExpr:return[e.lhs,e.rhs];default:throw Error("unsupported node type")}},M=["topk","bottomk","quantile","count_values","limitk","limit_ratio"],K=e=>e.replace(/([\\"])/g,"\\$1");var B=a(12709),N=a(29085);let z=(0,B.ZP)("span")(()=>({fontFamily:'"DejaVu Sans Mono", monospace'})),V=(0,B.ZP)("span")(e=>{let{theme:r}=e;return{color:"dark"===r.palette.mode?"#e5c07b":"#708"}}),Q=(0,B.ZP)("span")(e=>{let{theme:r}=e;return{color:"dark"===r.palette.mode?"#61afef":"#2a2e42"}}),Y=(0,B.ZP)("span")(e=>{let{theme:r}=e;return{color:"dark"===r.palette.mode?"#e06c75":"#2a2e42"}}),A=(0,B.ZP)("span")(e=>{let{theme:r}=e;return{color:"dark"===r.palette.mode?"#61afef":"#219"}}),D=(0,B.ZP)("span")(e=>{let{theme:r}=e;return{color:"dark"===r.palette.mode?"#98c379":"#a31515"}}),G=(0,B.ZP)("span")(()=>({color:"#aaaaaa"})),W=(0,B.ZP)("span")(e=>{let{theme:r}=e;return{color:"dark"===r.palette.mode?"#e5c07b":"#09885a"}}),X=(0,B.ZP)("span")(e=>{let{theme:r}=e;return{color:"dark"===r.palette.mode?"#e5c07b":"#164"}}),J=(0,B.ZP)("span")(e=>{let{theme:r}=e;return{color:"dark"===r.palette.mode?"#56b6c2":"#708"}}),H=e=>e.map((e,r)=>(0,c.jsxs)("span",{children:[0!==r&&", ",(0,c.jsx)(A,{children:e})]},r)),ee=(e,r,a)=>(0,c.jsxs)(c.Fragment,{children:[null!==e?(0,c.jsxs)(c.Fragment,{children:[" ",(0,c.jsx)(J,{children:"@"})," ",(0,c.jsx)(X,{children:(e/1e3).toFixed(3)})]}):null!==r?(0,c.jsxs)(c.Fragment,{children:[" ",(0,c.jsx)(J,{children:"@"})," ",(0,c.jsx)(V,{children:r}),(0,c.jsx)("span",{children:"("}),(0,c.jsx)("span",{children:")"})]}):(0,c.jsx)(c.Fragment,{}),0===a?(0,c.jsx)(c.Fragment,{}):a>0?(0,c.jsxs)(c.Fragment,{children:[" ",(0,c.jsx)(V,{children:"offset"})," ",(0,c.jsx)(W,{children:(0,N.LU)((0,N.oK)(a))})]}):(0,c.jsxs)(c.Fragment,{children:[" ",(0,c.jsx)(V,{children:"offset"})," ",(0,c.jsxs)(W,{children:["-",(0,N.LU)((0,N.oK)(-a))]})]})]}),er=e=>{let r=e.matchers.filter(r=>"__name__"!==r.name||r.type!==I.equal||r.value!==e.name).map((e,r)=>(0,c.jsxs)("span",{children:[0!==r&&",",(0,c.jsx)(A,{children:e.name}),e.type,(0,c.jsxs)(D,{children:['"',K(e.value),'"']})]},r));return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Y,{children:e.name}),r.length>0&&(0,c.jsxs)(c.Fragment,{children:["{",(0,c.jsx)("span",{children:r}),"}"]}),e.type===F.matrixSelector&&(0,c.jsxs)(c.Fragment,{children:["[",(0,c.jsx)(W,{children:(0,N.LU)((0,N.oK)(e.range))}),"]"]}),ee(e.timestamp,e.startOrEnd,e.offset)]})},ea=(0,c.jsx)(G,{children:"…"}),et=(e,r,a)=>{if(0===a)return ea;let t=void 0===a?void 0:a-1;switch(e.type){case F.aggregation:return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(J,{children:e.op}),e.without?(0,c.jsxs)(c.Fragment,{children:[" ",(0,c.jsx)(V,{children:"without"}),(0,c.jsx)("span",{children:"("}),H(e.grouping),(0,c.jsx)("span",{children:")"})," "]}):e.grouping.length>0&&(0,c.jsxs)(c.Fragment,{children:[" ",(0,c.jsx)(V,{children:"by"}),(0,c.jsx)("span",{children:"("}),H(e.grouping),(0,c.jsx)("span",{children:")"})," "]}),r&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{children:"("}),null!==e.param&&(0,c.jsxs)(c.Fragment,{children:[en(e.param,r,t),", "]}),en(e.expr,r,t),(0,c.jsx)("span",{children:")"})]})]});case F.subquery:return(0,c.jsxs)(c.Fragment,{children:[r&&en(e.expr,r,t),"[",(0,c.jsx)(W,{children:(0,N.LU)((0,N.oK)(e.range))}),":",0!==e.step&&(0,c.jsx)(W,{children:(0,N.LU)((0,N.oK)(e.step))}),"]",ee(e.timestamp,e.startOrEnd,e.offset)]});case F.parenExpr:return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{children:"("}),r&&en(e.expr,r,t),(0,c.jsx)("span",{children:")"})]});case F.call:{let a=void 0===t||t>0?e.args.map((e,a)=>(0,c.jsxs)("span",{children:[0!==a&&", ",en(e,r)]},a)):e.args.length>0?ea:"";return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Q,{children:e.func.name}),r&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{children:"("}),a,(0,c.jsx)("span",{children:")"})]})]})}case F.matrixSelector:case F.vectorSelector:return er(e);case F.numberLiteral:return(0,c.jsx)(X,{children:e.val});case F.stringLiteral:return(0,c.jsxs)(D,{children:['"',K(e.val),'"']});case F.unaryExpr:return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(J,{children:e.op}),r&&en(e.expr,r,t)]});case F.binaryExpr:{let a=(0,c.jsx)(c.Fragment,{}),n=(0,c.jsx)(c.Fragment,{}),i=e.matching;return null!==i&&(i.labels.length>0||i.on)&&(a=i.on?(0,c.jsxs)(c.Fragment,{children:[" ",(0,c.jsx)(V,{children:"on"}),(0,c.jsx)("span",{children:"("}),H(i.labels),(0,c.jsx)("span",{children:")"})]}):(0,c.jsxs)(c.Fragment,{children:[" ",(0,c.jsx)(V,{children:"ignoring"}),(0,c.jsx)("span",{children:"("}),H(i.labels),(0,c.jsx)("span",{children:")"})]}),(i.card===C.manyToOne||i.card===C.oneToMany)&&(n=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(V,{children:[" ","group_",i.card===C.manyToOne?"left":"right"]}),(0,c.jsx)("span",{children:"("}),H(i.include),(0,c.jsx)("span",{children:")"})]}))),(0,c.jsxs)(c.Fragment,{children:[r&&en(R(e.op,e.lhs),r,t)," ",(["atan2","and","or","unless"].includes(e.op),(0,c.jsx)(J,{children:e.op})),e.bool&&(0,c.jsxs)(c.Fragment,{children:[" ",(0,c.jsx)(V,{children:"bool"})]}),a,n," ",r&&en(R(e.op,e.rhs),r,t)]})}case F.placeholder:return ea;default:throw Error("unsupported node type")}},en=(e,r,a)=>(0,c.jsx)(z,{children:et(e,r,a)}),ei=(e,r,a)=>`${null!==e?` @ ${(e/1e3).toFixed(3)}`:null!==r?` @ ${r}()`:""}${0===a?"":a>0?` offset ${(0,N.LU)((0,N.oK)(a))}`:` offset -${(0,N.LU)((0,N.oK)(-a))}`}`,es=e=>{let r=e.matchers.filter(r=>"__name__"!==r.name||r.type!==I.equal||r.value!==e.name).map(e=>`${e.name}${e.type}"${K(e.value)}"`),a=e.type===F.matrixSelector?`[${(0,N.LU)((0,N.oK)(e.range))}]`:"",t=ei(e.timestamp,e.startOrEnd,e.offset);return`${e.name}${r.length>0?`{${r.join(",")}}`:""}${a}${t}`},eo=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],t=!(arguments.length>3)||void 0===arguments[3]||arguments[3],n=a?"\n":"",i=a?"\n":" ",s=r+2,o=a?" ".repeat(r):"",c=t?o:"";switch(e.type){case F.aggregation:return`${c}${e.op}${e.without?` without(${e.grouping.join(", ")}) `:e.grouping.length>0?` by(${e.grouping.join(", ")}) `:""}(${n}${M.includes(e.op)&&null!==e.param?`${eo(e.param,s,a)},${i}`:""}${eo(e.expr,s,a)}${n}${o})`;case F.subquery:return`${c}${eo(e.expr,r,a)}[${(0,N.LU)((0,N.oK)(e.range))}:${0!==e.step?(0,N.LU)((0,N.oK)(e.step)):""}]${ei(e.timestamp,e.startOrEnd,e.offset)}`;case F.parenExpr:return`${c}(${n}${eo(e.expr,s,a)}${n}${o})`;case F.call:{let r=e.args.length>0?n:"";return`${c}${e.func.name}(${r}${e.args.map(e=>eo(e,s,a)).join(","+i)}${r}${e.args.length>0?o:""})`}case F.matrixSelector:case F.vectorSelector:return`${c}${es(e)}`;case F.numberLiteral:return`${c}${e.val}`;case F.stringLiteral:return`${c}"${K(e.val)}"`;case F.unaryExpr:return`${c}${e.op}${eo(e.expr,r,a,!1)}`;case F.binaryExpr:{let r="",t="",n=e.matching;return null!==n&&(n.labels.length>0||n.on)&&(r=n.on?` on(${n.labels.join(", ")})`:` ignoring(${n.labels.join(", ")})`,(n.card===C.manyToOne||n.card===C.oneToMany)&&(t=` group_${n.card===C.manyToOne?"left":"right"}(${n.include.join(",")})`)),`${eo(R(e.op,e.lhs),s,a)}${i}${o}${e.op}${e.bool?" bool":""}${r}${t}${i}${eo(R(e.op,e.rhs),s,a)}`}case F.placeholder:return`${c}…${e.children.length>0?`(${n}${e.children.map(e=>eo(e,s,a)).join(","+i)}${n}${o})`:""}`;default:throw Error("unsupported node type")}},ec={abs:{name:"abs",argTypes:[P.vector],variadic:0,returnType:P.vector},absent:{name:"absent",argTypes:[P.vector],variadic:0,returnType:P.vector},absent_over_time:{name:"absent_over_time",argTypes:[P.matrix],variadic:0,returnType:P.vector},acos:{name:"acos",argTypes:[P.vector],variadic:0,returnType:P.vector},acosh:{name:"acosh",argTypes:[P.vector],variadic:0,returnType:P.vector},asin:{name:"asin",argTypes:[P.vector],variadic:0,returnType:P.vector},asinh:{name:"asinh",argTypes:[P.vector],variadic:0,returnType:P.vector},atan:{name:"atan",argTypes:[P.vector],variadic:0,returnType:P.vector},atanh:{name:"atanh",argTypes:[P.vector],variadic:0,returnType:P.vector},avg_over_time:{name:"avg_over_time",argTypes:[P.matrix],variadic:0,returnType:P.vector},ceil:{name:"ceil",argTypes:[P.vector],variadic:0,returnType:P.vector},changes:{name:"changes",argTypes:[P.matrix],variadic:0,returnType:P.vector},clamp:{name:"clamp",argTypes:[P.vector,P.scalar,P.scalar],variadic:0,returnType:P.vector},clamp_max:{name:"clamp_max",argTypes:[P.vector,P.scalar],variadic:0,returnType:P.vector},clamp_min:{name:"clamp_min",argTypes:[P.vector,P.scalar],variadic:0,returnType:P.vector},cos:{name:"cos",argTypes:[P.vector],variadic:0,returnType:P.vector},cosh:{name:"cosh",argTypes:[P.vector],variadic:0,returnType:P.vector},count_over_time:{name:"count_over_time",argTypes:[P.matrix],variadic:0,returnType:P.vector},day_of_month:{name:"day_of_month",argTypes:[P.vector],variadic:1,returnType:P.vector},day_of_week:{name:"day_of_week",argTypes:[P.vector],variadic:1,returnType:P.vector},day_of_year:{name:"day_of_year",argTypes:[P.vector],variadic:1,returnType:P.vector},days_in_month:{name:"days_in_month",argTypes:[P.vector],variadic:1,returnType:P.vector},deg:{name:"deg",argTypes:[P.vector],variadic:0,returnType:P.vector},delta:{name:"delta",argTypes:[P.matrix],variadic:0,returnType:P.vector},deriv:{name:"deriv",argTypes:[P.matrix],variadic:0,returnType:P.vector},exp:{name:"exp",argTypes:[P.vector],variadic:0,returnType:P.vector},floor:{name:"floor",argTypes:[P.vector],variadic:0,returnType:P.vector},histogram_avg:{name:"histogram_avg",argTypes:[P.vector],variadic:0,returnType:P.vector},histogram_count:{name:"histogram_count",argTypes:[P.vector],variadic:0,returnType:P.vector},histogram_fraction:{name:"histogram_fraction",argTypes:[P.scalar,P.scalar,P.vector],variadic:0,returnType:P.vector},histogram_quantile:{name:"histogram_quantile",argTypes:[P.scalar,P.vector],variadic:0,returnType:P.vector},histogram_stddev:{name:"histogram_stddev",argTypes:[P.vector],variadic:0,returnType:P.vector},histogram_stdvar:{name:"histogram_stdvar",argTypes:[P.vector],variadic:0,returnType:P.vector},histogram_sum:{name:"histogram_sum",argTypes:[P.vector],variadic:0,returnType:P.vector},double_exponential_smoothing:{name:"double_exponential_smoothing",argTypes:[P.matrix,P.scalar,P.scalar],variadic:0,returnType:P.vector},hour:{name:"hour",argTypes:[P.vector],variadic:1,returnType:P.vector},idelta:{name:"idelta",argTypes:[P.matrix],variadic:0,returnType:P.vector},increase:{name:"increase",argTypes:[P.matrix],variadic:0,returnType:P.vector},irate:{name:"irate",argTypes:[P.matrix],variadic:0,returnType:P.vector},label_join:{name:"label_join",argTypes:[P.vector,P.string,P.string,P.string],variadic:-1,returnType:P.vector},label_replace:{name:"label_replace",argTypes:[P.vector,P.string,P.string,P.string,P.string],variadic:0,returnType:P.vector},last_over_time:{name:"last_over_time",argTypes:[P.matrix],variadic:0,returnType:P.vector},ln:{name:"ln",argTypes:[P.vector],variadic:0,returnType:P.vector},log10:{name:"log10",argTypes:[P.vector],variadic:0,returnType:P.vector},log2:{name:"log2",argTypes:[P.vector],variadic:0,returnType:P.vector},mad_over_time:{name:"mad_over_time",argTypes:[P.matrix],variadic:0,returnType:P.vector},max_over_time:{name:"max_over_time",argTypes:[P.matrix],variadic:0,returnType:P.vector},min_over_time:{name:"min_over_time",argTypes:[P.matrix],variadic:0,returnType:P.vector},minute:{name:"minute",argTypes:[P.vector],variadic:1,returnType:P.vector},month:{name:"month",argTypes:[P.vector],variadic:1,returnType:P.vector},pi:{name:"pi",argTypes:[],variadic:0,returnType:P.scalar},predict_linear:{name:"predict_linear",argTypes:[P.matrix,P.scalar],variadic:0,returnType:P.vector},present_over_time:{name:"present_over_time",argTypes:[P.matrix],variadic:0,returnType:P.vector},quantile_over_time:{name:"quantile_over_time",argTypes:[P.scalar,P.matrix],variadic:0,returnType:P.vector},rad:{name:"rad",argTypes:[P.vector],variadic:0,returnType:P.vector},rate:{name:"rate",argTypes:[P.matrix],variadic:0,returnType:P.vector},resets:{name:"resets",argTypes:[P.matrix],variadic:0,returnType:P.vector},round:{name:"round",argTypes:[P.vector,P.scalar],variadic:1,returnType:P.vector},scalar:{name:"scalar",argTypes:[P.vector],variadic:0,returnType:P.scalar},sgn:{name:"sgn",argTypes:[P.vector],variadic:0,returnType:P.vector},sin:{name:"sin",argTypes:[P.vector],variadic:0,returnType:P.vector},sinh:{name:"sinh",argTypes:[P.vector],variadic:0,returnType:P.vector},sort:{name:"sort",argTypes:[P.vector],variadic:0,returnType:P.vector},sort_by_label:{name:"sort_by_label",argTypes:[P.vector,P.string],variadic:-1,returnType:P.vector},sort_by_label_desc:{name:"sort_by_label_desc",argTypes:[P.vector,P.string],variadic:-1,returnType:P.vector},sort_desc:{name:"sort_desc",argTypes:[P.vector],variadic:0,returnType:P.vector},sqrt:{name:"sqrt",argTypes:[P.vector],variadic:0,returnType:P.vector},stddev_over_time:{name:"stddev_over_time",argTypes:[P.matrix],variadic:0,returnType:P.vector},stdvar_over_time:{name:"stdvar_over_time",argTypes:[P.matrix],variadic:0,returnType:P.vector},sum_over_time:{name:"sum_over_time",argTypes:[P.matrix],variadic:0,returnType:P.vector},tan:{name:"tan",argTypes:[P.vector],variadic:0,returnType:P.vector},tanh:{name:"tanh",argTypes:[P.vector],variadic:0,returnType:P.vector},time:{name:"time",argTypes:[],variadic:0,returnType:P.scalar},timestamp:{name:"timestamp",argTypes:[P.vector],variadic:0,returnType:P.vector},vector:{name:"vector",argTypes:[P.scalar],variadic:0,returnType:P.vector},year:{name:"year",argTypes:[P.vector],variadic:1,returnType:P.vector}},el=e=>e.includes("error")?"error":e.includes("waiting")?"waiting":e.includes("running")?"running":"success";function ed(e){let{node:r,parentEl:a,reverse:t,datasource:n,childIdx:i,reportNodeState:s}=e,o=(0,u.Z)(),l=U(r),[d,p]=(0,T.useState)(null),v=(0,T.useCallback)(e=>p(e),[]),[g,y]=(0,T.useState)({numSeries:0,labelExamples:{},sortedLabelCards:[]}),[x,h]=(0,T.useState)({borderColor:o.palette.grey["500"],borderLeftStyle:"solid",borderLeftWidth:2,width:25,left:-25}),[j,_]=(0,T.useState)(l.map(()=>"waiting")),b=(0,T.useMemo)(()=>el(j),[j]),E=r;E.type===F.matrixSelector&&(E={type:F.call,func:ec.last_over_time,args:[r]});let{data:Z,isFetching:S,error:k}=function(e,r,a){let{data:t}=(0,f.useDatasourceClient)(r);return(0,$.useQuery)({enabled:!!t&&a,queryKey:["instantQuery",e,"datasource",r.kind],queryFn:async()=>{let r=performance.now(),a=await t.instantQuery({query:e}),n=performance.now()-r;return{...a,responseTime:n}}})}(eo(E)??"",n,"success"===b);(0,T.useEffect)(()=>{s&&("error"===b||k?s(i,"error"):S&&s(i,"running"))},[b,k,S,s,i]);let L=(0,T.useCallback)((e,r)=>{_(a=>{let t=[...a];return t[e]=r,t})},[_]);(0,T.useLayoutEffect)(()=>{if(void 0===a||null===a||null===d)return;let e=a.getBoundingClientRect(),r=d.getBoundingClientRect();t?h(a=>({...a,top:"calc(50% - 1px)",bottom:r.bottom-e.top,borderTopLeftRadius:10,borderTopStyle:"solid",borderBottomLeftRadius:void 0})):h(a=>({...a,top:e.bottom-r.top,bottom:"calc(50% - 1px)",borderBottomLeftRadius:10,borderBottomStyle:"solid",borderTopLeftRadius:void 0}))},[a,d,t,v,h]),(0,T.useEffect)(()=>{if((null==Z?void 0:Z.status)!=="success")return;s&&s(i,"success");let e=0,r={},{resultType:a,result:t}=Z.data;"scalar"===a||"string"===a?e=1:t&&t.length>0&&(e=t.length,t.forEach(e=>{Object.entries(e.metric).forEach(e=>{let[a,t]=e;"__name__"!==a&&(r[a]=r[a]??{},r[a][t]=(r[a][t]??0)+1)})}));let n={},o={};Object.entries(r).forEach(e=>{let[r,a]=e;n[r]=Object.keys(a).length,o[r]=Object.entries(a).sort((e,r)=>{let[,a]=e,[,t]=r;return t-a}).slice(0,10).map(e=>{let[r,a]=e;return{value:r,count:a}})}),y({numSeries:e,sortedLabelCards:Object.entries(n).sort((e,r)=>r[1]-e[1]),labelExamples:o})},[Z,s,i]);let q=(0,c.jsxs)(m.Z,{direction:"row",gap:2,children:[(0,c.jsxs)(w.Z,{ref:v,sx:{position:"relative",display:"inline-block",padding:1,marginBottom:1.5,borderRadius:2,backgroundColor:o.palette.background.code},children:[void 0!==a&&(0,c.jsx)(w.Z,{sx:{position:"absolute",display:"inline-block",...x}}),en(r,!1,1)]}),(0,c.jsx)(ep,{mergedChildState:b,isFetching:S,error:k,resultStats:g,responseTime:null==Z?void 0:Z.responseTime})]});return r.type===F.binaryExpr?(0,c.jsxs)("div",{children:[(0,c.jsx)(w.Z,{ml:5,children:(0,c.jsx)(ed,{node:l[0],parentEl:d,reverse:!0,datasource:n,childIdx:0,reportNodeState:L})}),q,(0,c.jsx)(w.Z,{ml:5,children:(0,c.jsx)(ed,{node:l[1],parentEl:d,reverse:!1,datasource:n,childIdx:1,reportNodeState:L})})]}):(0,c.jsxs)("div",{children:[q,l.map((e,r)=>(0,c.jsx)(w.Z,{ml:5,children:(0,c.jsx)(ed,{node:e,parentEl:d,reverse:!1,datasource:n,childIdx:r,reportNodeState:L})},r))]})}function ep(e){let{mergedChildState:r,isFetching:a,error:t,resultStats:n,responseTime:i}=e;return"waiting"===r?(0,c.jsx)(eu,{text:"Waiting for child query"}):"running"===r?(0,c.jsx)(eu,{text:"Running"}):"error"===r?(0,c.jsxs)(m.Z,{children:[(0,c.jsx)(L.default,{}),"Blocked on child query error"]}):a?(0,c.jsx)(eu,{text:"Loading"}):t?(0,c.jsxs)(w.Z,{display:"flex",alignItems:"center",gap:1,sx:{color:e=>e.palette.error.main},marginBottom:1.5,children:[(0,c.jsx)(L.default,{}),(0,c.jsxs)(E.Z,{variant:"body2",children:[(0,c.jsx)("strong",{children:"Error executing query:"})," ",t.message]})]}):(0,c.jsxs)(m.Z,{direction:"row",gap:1,alignItems:"center",marginBottom:1.5,children:[(0,c.jsxs)(E.Z,{variant:"body2",component:"span",sx:{color:e=>e.palette.grey[500]},children:[n.numSeries," result",1!==n.numSeries&&"s","\xa0\xa0–\xa0\xa0",i,"ms",n.sortedLabelCards.length>0&&(0,c.jsx)(c.Fragment,{children:"\xa0\xa0–"})]}),n.sortedLabelCards.slice(0,10).map(e=>{var r;let[a,t]=e;return(0,c.jsx)(g.Z,{title:(0,c.jsx)(w.Z,{children:(0,c.jsxs)(Z.Z,{dense:!0,children:[null===(r=n.labelExamples[a])||void 0===r?void 0:r.map(e=>{let{value:r,count:a}=e;return(0,c.jsxs)(S.ZP,{sx:{display:"flex",gap:1,py:0,px:.5},children:[(0,c.jsx)(k.default,{sx:{fontSize:8}}),(0,c.jsx)(E.Z,{variant:"body2",component:"span",sx:{color:e=>"dark"===e.palette.mode?e.palette.warning.dark:e.palette.warning.main,fontFamily:"monospace"},children:K(r)}),(0,c.jsxs)(E.Z,{variant:"body2",component:"span",children:["(",a,"x)"]})]},r)}),t>10&&(0,c.jsxs)(S.ZP,{sx:{display:"flex",gap:1,py:0,px:.5},children:[(0,c.jsx)(k.default,{sx:{fontSize:8}}),(0,c.jsx)(E.Z,{variant:"body2",children:". . ."})]})]})}),arrow:!0,children:(0,c.jsxs)("span",{style:{cursor:"pointer",whiteSpace:"nowrap"},children:[(0,c.jsx)(E.Z,{variant:"body2",component:"span",sx:{fontFamily:"monospace",color:e=>e.palette.success.main},children:a}),(0,c.jsxs)(E.Z,{variant:"body2",component:"span",sx:{color:e=>e.palette.grey[500]},children:[": ",t]})]})},a)}),n.sortedLabelCards.length>10?(0,c.jsxs)(E.Z,{variant:"body2",children:["...",n.sortedLabelCards.length-10," more..."]}):null]})}function eu(e){let{text:r}=e;return(0,c.jsxs)(w.Z,{display:"flex",alignItems:"center",gap:1,marginBottom:1.5,children:[(0,c.jsx)(x.Z,{size:16,color:"secondary"}),(0,c.jsxs)(E.Z,{variant:"body2",color:"text.secondary",children:[r,"..."]})]})}let em="Tree View",ev="Open "+em,eg="Close "+em;function ey(e){let{completeConfig:r,datasource:a,...t}=e,n=(0,u.Z)(),i="dark"===n.palette.mode,[s,o]=(0,T.useState)(!1),w=(0,T.useMemo)(()=>new d.q9().activateLinter(!1).setComplete(r).asExtension(),[r]),E=(0,f.useReplaceVariablesInString)(t.value);E&&(E=(0,b.d)(E,12345,12345));let{data:Z,isLoading:S,error:k}=function(e,r,a){let{data:t}=(0,f.useDatasourceClient)(r);return(0,$.useQuery)({enabled:!!t&&a,queryKey:["parseQuery",e,"datasource",r],queryFn:async()=>await t.parseQuery({query:e})})}(E??"",a,s);return(0,c.jsxs)(m.Z,{position:"relative",children:[(0,c.jsx)(v.Z,{shrink:!0,sx:{position:"absolute",top:"-8px",left:"10px",padding:"0 4px",color:n.palette.text.primary,zIndex:1},children:"PromQL Expression"}),(0,c.jsx)(l.ZP,{...t,style:{border:`1px solid ${n.palette.divider}`},theme:i?"dark":"light",basicSetup:{highlightActiveLine:!1,highlightActiveLineGutter:!1,foldGutter:!1},extensions:[p.tk.lineWrapping,w,p.tk.theme({".cm-content":{paddingTop:"8px",paddingBottom:"8px",paddingRight:"40px"}})],placeholder:"Example: sum(rate(http_requests_total[5m]))"}),E&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(g.Z,{title:s?eg:ev,children:(0,c.jsx)(y.Z,{"aria-label":s?eg:ev,onClick:()=>{o(!s)},sx:{position:"absolute",right:"5px",top:"5px"},size:"small",children:(0,c.jsx)(h.default,{sx:{fontSize:"18px"}})},"tree-view-button")}),s&&(0,c.jsxs)("div",{style:{border:`1px solid ${n.palette.divider}`,position:"relative"},children:[(0,c.jsx)(g.Z,{title:eg,children:(0,c.jsx)(y.Z,{"aria-label":eg,onClick:()=>o(!1),sx:{position:"absolute",top:"5px",right:"5px"},size:"small",children:(0,c.jsx)(_.default,{sx:{fontSize:"18px"}})},"tree-view-close-button")}),k?(0,c.jsx)(j.ErrorAlert,{error:{name:`${em} not available`,message:k.message}}):(0,c.jsx)("div",{style:{padding:`${n.spacing(1.5)} ${n.spacing(1.5)} 0 ${n.spacing(1.5)}`,overflowX:"auto",backgroundColor:n.palette.background.default},children:S?(0,c.jsx)(x.Z,{}):(null==Z?void 0:Z.data)?(0,c.jsx)(ed,{node:Z.data,reverse:!1,childIdx:0,datasource:a}):null})]})]})]})}},87629:function(e,r,a){function t(e){let[r,a]=e;return[1e3*r,function(e){let r;switch(e){case"+Inf":r=Number.POSITIVE_INFINITY;break;case"-Inf":r=Number.NEGATIVE_INFINITY;break;default:r=parseFloat(e)}return r}(a)]}a.d(r,{X2:()=>d,mB:()=>u,mY:()=>c,k7:()=>f,c4:()=>i,Nr:()=>s,Mm:()=>x.Mm,Fp:()=>o,Rv:()=>x.Rv,sv:()=>x.sv,ac:()=>p,qJ:()=>t,nY:()=>x.nY,Bf:()=>j,PL:()=>l,wd:()=>_});var n=a(35015);function i(e){return async()=>{let r=`${e.datasourceUrl}/-/healthy`;try{let a=await (0,n.he)(r,{headers:e.headers});return 200===a.status}catch{return!1}}}function s(e,r){return v("/api/v1/query",e,r)}function o(e,r){return v("/api/v1/query_range",e,r)}function c(e,r){return v("/api/v1/labels",e,r)}function l(e,r){let{labelName:a,...t}=e;return 0===a.length?new Promise(e=>{e({data:[]})}):m(`/api/v1/label/${encodeURIComponent(a)}/values`,t,r)}function d(e,r){return m("/api/v1/metadata",e,r)}function p(e,r){return v("/api/v1/series",e,r)}function u(e,r){return v("/api/v1/parse_query",e,r)}function m(e,r,a){let{datasourceUrl:t,headers:i}=a,s=`${t}${e}`,o=g(r).toString();return""!==o&&(s+=`?${o}`),(0,n.rd)(s,{method:"GET",headers:i})}function v(e,r,a){let{datasourceUrl:t,headers:n}=a;return y(`${t}${e}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",...n},body:g(r)})}function g(e){let r=new URLSearchParams;for(let a in e){let t=e[a];if(void 0!==t){if("string"==typeof t){r.append(a,t);continue}if("number"==typeof t){r.append(a,t.toString());continue}for(let e of t)r.append(a,e)}}return r}async function y(){for(var e=arguments.length,r=Array(e),a=0;a<e;a++)r[a]=arguments[a];let t=await (0,n.he)(...r);return{...await t.json(),rawResponse:t}}var x=a(65456),h=a(29085),T=a(20461);function j(e){let{start:r,end:a}=e;return{start:Math.ceil((0,T.getUnixTime)(r)),end:Math.ceil((0,T.getUnixTime)(a))}}function _(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=(e.end-e.start)/1e4;return n>1&&(n=Math.ceil(n)),Math.max(t/1e3*a,r,n)}function f(e){if(!e)return;let r=(0,h.Ib)(e);return Math.floor((0,T.milliseconds)(r)/1e3)}},65456:function(e,r,a){a.d(r,{Mm:()=>n,Rv:()=>i,nY:()=>t,sv:()=>s});let t="PrometheusDatasource",n={kind:t};function i(e){return void 0===e.name}function s(e){return e.kind===t}},6421:function(e,r,a){a.d(r,{d:()=>i});var t=a(27463),n=a(29085);function i(e,r,a){let i=(0,t.replaceVariable)(e,"__interval_ms",a.toString());i=(0,t.replaceVariable)(i,"__interval",(0,n.LU)((0,n.oK)(a)));let s=Math.max(a+r,4*r);return(0,t.replaceVariable)(i,"__rate_interval",(0,n.LU)((0,n.oK)(s)))}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkPrometheus=self.webpackChunkPrometheus||[]).push([["537"],{35015:function(e,t,a){async function i(...e){let t=await a.g.fetch(...e);if(!1===t.ok){let e=t.headers.get("content-type");if(e?.includes("application/json")){let e=await t.json();if(e.error)throw new o(e.error,t.status);if(e.message)throw new o(e.message,t.status)}let a=await t.text();if(a)throw new o(a,t.status);throw new n(t)}return t}async function r(...e){let t=await i(...e);return await t.json()}a.d(t,{he:()=>i,rd:()=>r});class n extends Error{status;constructor(e){super(`${e.status} ${e.statusText}`),this.status=e.status,Object.setPrototypeOf(this,n.prototype)}}class o extends Error{status;constructor(e,t){super(e),this.status=t,Object.setPrototypeOf(this,o.prototype)}}},51217:function(e,t,a){a.d(t,{q9:()=>z});var i,r,n,o,l,s,c,u,h=a(7749),p=a(94197);let O={inf:147,nan:148,bool:1,ignoring:2,on:3,group_left:4,group_right:5,offset:6},d=(e,t)=>O[e.toLowerCase()]||-1,v={avg:8,atan2:7,bottomk:9,count:10,count_values:11,group:12,max:13,min:14,quantile:15,stddev:16,stdvar:17,sum:18,topk:19,by:20,without:21,and:22,or:23,unless:24,start:25,end:26},f=(e,t)=>v[e.toLowerCase()]||-1,m=(0,p.Gv)({LineComment:p.pJ.comment,LabelName:p.pJ.labelName,StringLiteral:p.pJ.string,NumberLiteral:p.pJ.number,Duration:p.pJ.number,Identifier:p.pJ.variableName,"Abs Absent AbsentOverTime Acos Acosh Asin Asinh Atan Atanh AvgOverTime Ceil Changes Clamp ClampMax ClampMin Cos Cosh CountOverTime DaysInMonth DayOfMonth DayOfWeek DayOfYear Deg Delta Deriv Exp Floor HistogramCount HistogramFraction HistogramQuantile HistogramSum HoltWinters Hour Idelta Increase Irate LabelReplace LabelJoin LastOverTime Ln Log10 Log2 MaxOverTime MinOverTime Minute Month Pi PredictLinear PresentOverTime QuantileOverTime Rad Rate Resets Round Scalar Sgn Sin Sinh Sort SortDesc Sqrt StddevOverTime StdvarOverTime SumOverTime Tan Tanh Time Timestamp Vector Year":p.pJ.function(p.pJ.variableName),"Avg Bottomk Count Count_values Group Max Min Quantile Stddev Stdvar Sum Topk":p.pJ.operatorKeyword,"By Without Bool On Ignoring GroupLeft GroupRight Offset Start End":p.pJ.modifier,"And Unless Or":p.pJ.logicOperator,"Sub Add Mul Mod Div Atan2 Eql Neq Lte Lss Gte Gtr EqlRegex EqlSingle NeqRegex Pow At":p.pJ.operator,UnaryOp:p.pJ.arithmeticOperator,"( )":p.pJ.paren,"[ ]":p.pJ.squareBracket,"{ }":p.pJ.brace,"⚠":p.pJ.invalid}),g={__proto__:null,absent_over_time:313,absent:315,abs:317,acos:319,acosh:321,asin:323,asinh:325,atan:327,atanh:329,avg_over_time:331,ceil:333,changes:335,clamp:337,clamp_max:339,clamp_min:341,cos:343,cosh:345,count_over_time:347,days_in_month:349,day_of_month:351,day_of_week:353,day_of_year:355,deg:357,delta:359,deriv:361,exp:363,floor:365,histogram_count:367,histogram_fraction:369,histogram_quantile:371,histogram_sum:373,holt_winters:375,hour:377,idelta:379,increase:381,irate:383,label_replace:385,label_join:387,last_over_time:389,ln:391,log10:393,log2:395,max_over_time:397,min_over_time:399,minute:401,month:403,pi:405,predict_linear:407,present_over_time:409,quantile_over_time:411,rad:413,rate:415,resets:417,round:419,scalar:421,sgn:423,sin:425,sinh:427,sort:429,sort_desc:431,sqrt:433,stddev_over_time:435,stdvar_over_time:437,sum_over_time:439,tan:441,tanh:443,timestamp:445,time:447,vector:449,year:451},$=h.WQ.deserialize({version:14,states:"7pOYQPOOO'XQPOOOOQO'#Cz'#CzO'^QPO'#CyQ'iQQOOOOQO'#Da'#DaO'dQPO'#D`OOQO'#E}'#E}O(vQPO'#FTOYQPO'#FPOYQPO'#FSO/OQSO'#FVO/WQQO'#FUOOQO'#FU'#FUOOQO'#Fi'#FiOOQO'#Db'#DbOOQO'#Dd'#DdOOQO'#De'#DeOOQO'#Df'#DfOOQO'#Dg'#DgOOQO'#Dh'#DhOOQO'#Di'#DiOOQO'#Dj'#DjOOQO'#Dk'#DkOOQO'#Dl'#DlOOQO'#Dm'#DmOOQO'#Dn'#DnOOQO'#Do'#DoOOQO'#Dp'#DpOOQO'#Dq'#DqOOQO'#Dr'#DrOOQO'#Ds'#DsOOQO'#Dt'#DtOOQO'#Du'#DuOOQO'#Dv'#DvOOQO'#Dw'#DwOOQO'#Dx'#DxOOQO'#Dy'#DyOOQO'#Dz'#DzOOQO'#D{'#D{OOQO'#D|'#D|OOQO'#D}'#D}OOQO'#EO'#EOOOQO'#EP'#EPOOQO'#EQ'#EQOOQO'#ER'#EROOQO'#ES'#ESOOQO'#ET'#ETOOQO'#EU'#EUOOQO'#EV'#EVOOQO'#EW'#EWOOQO'#EX'#EXOOQO'#EY'#EYOOQO'#EZ'#EZOOQO'#E['#E[OOQO'#E]'#E]OOQO'#E^'#E^OOQO'#E_'#E_OOQO'#E`'#E`OOQO'#Ea'#EaOOQO'#Eb'#EbOOQO'#Ec'#EcOOQO'#Ed'#EdOOQO'#Ee'#EeOOQO'#Ef'#EfOOQO'#Eg'#EgOOQO'#Eh'#EhOOQO'#Ei'#EiOOQO'#Ej'#EjOOQO'#Ek'#EkOOQO'#El'#ElOOQO'#Em'#EmOOQO'#En'#EnOOQO'#Eo'#EoOOQO'#Ep'#EpOOQO'#Eq'#EqOOQO'#Er'#ErOOQO'#Es'#EsOOQO'#Et'#EtOOQO'#Eu'#EuOOQO'#Ev'#EvOOQO'#Ew'#EwOOQO'#Ex'#ExOOQO'#Ey'#EyOOQO'#Ez'#EzQOQPOOO0qQPO'#C{O0vQPO'#DOO'dQPO,59eO0}QQO,59eO2kQPO,59kO2kQPO,59kO2kQPO,59kO2kQPO,59kO2kQPO,59kO8sQQO,5;gO8xQQO,5;jO9QQPO,5;wOOQO,59z,59zOOQO,5;i,5;iO9iQQO,5;kO9pQQO,5;nO;WQPO'#FWOOQO,5;q,5;qO;fQPO,5;qOOQO,5;p,5;pO;nQSO'#C|OOQO,59g,59gOOQO,59j,59jO;vQQO,59jOOQO1G/P1G/POOQO'#DR'#DRO0qQPO'#DSOOQO'#Fm'#FmO<QQPO'#FmOYQPO1G/VOYQPO1G/VOYQPO1G/VOYQPO1G/VOYQPO1G/VOBVQSO1G1ROOQO1G1U1G1UOB_QQO1G1UOBdQPO'#E}OOQO'#F_'#F_OOQO1G1c1G1cOBoQPO1G1cOOQO1G1V1G1VOOQO'#FX'#FXOBtQPO,5;rOByQSO1G1]OCRQPO1G1]OOQO1G1]1G1]OOQO,59h,59hOCZQPO,59hOYQPO'#FbOCcQPO1G/UOOQO1G/U1G/UOCkQPO,59nOOQO,5<X,5<XOJzQQO7+$qOK[QQO7+$qOLpQQO7+$qOMWQQO7+$qONoQQO7+$qOOQO7+&m7+&mO! YQQO7+&sOOQO7+&p7+&pO! bQPO7+&}OOQO1G1^1G1^OOQO,5;},5;}OOQO7+&w7+&wO! gQSO7+&wOOQO-E9a-E9aO! oQSO1G/SO! wQPO1G/SOOQO1G/S1G/SO!!PQQO,5;|OOQO-E9`-E9`OOQO7+$p7+$pO!!ZQPO1G/YOOQO<<J_<<J_O!(YQPO<<J_OOQO<<Ji<<JiOOQO<<Jc<<JcP!(_QSO'#FcOOQO,5;{,5;{OOQO7+$n7+$nO!(dQSO7+$nOOQO-E9_-E9_OOQO7+$t7+$tOOQOAN?yAN?yOOQO<<HY<<HYP!(lQSO'#Fa",stateData:"!(q~O$[OSkOS~OWQOXQOYQOZQO[QO]QO^QO_QO`QOaQObQOcQO!V[O#t^O$XVO$YVO$^XO$b_O$c`O$daO$ebO$fcO$gdO$heO$ifO$jgO$khO$liO$mjO$nkO$olO$pmO$qnO$roO$spO$tqO$urO$vsO$wtO$xuO$yvO$zwO${xO$|yO$}zO%O{O%P|O%Q}O%R!OO%S!PO%T!QO%U!RO%V!SO%W!TO%X!UO%Y!VO%Z!WO%[!XO%]!YO%^!ZO%_![O%`!]O%a!^O%b!_O%c!`O%d!aO%e!bO%f!cO%g!dO%h!eO%i!fO%j!gO%k!hO%l!iO%m!jO%n!kO%o!lO%p!mO%q!nO%r!oO%s!pO%t!qO%u!rO%v!sO%w!tO%x!uO%y!vO%|WO%}WO&OVO&QZO~O!V!wO~Od!xOe!xO$^!yO~OU#SOV!|Of#POg#QOh#POt!|Ow!|Ox!|Oy!|Oz!}O{!}O|#OO}#OO!O#OO!P#OO!Q#OO!R#OO$Q#TO%z#RO~O$X#VO$Y#VO&O#VOW#wXX#wXY#wXZ#wX[#wX]#wX^#wX_#wX`#wXa#wXb#wXc#wX!V#wX#t#wX$X#wX$Y#wX$^#wX$b#wX$c#wX$d#wX$e#wX$f#wX$g#wX$h#wX$i#wX$j#wX$k#wX$l#wX$m#wX$n#wX$o#wX$p#wX$q#wX$r#wX$s#wX$t#wX$u#wX$v#wX$w#wX$x#wX$y#wX$z#wX${#wX$|#wX$}#wX%O#wX%P#wX%Q#wX%R#wX%S#wX%T#wX%U#wX%V#wX%W#wX%X#wX%Y#wX%Z#wX%[#wX%]#wX%^#wX%_#wX%`#wX%a#wX%b#wX%c#wX%d#wX%e#wX%f#wX%g#wX%h#wX%i#wX%j#wX%k#wX%l#wX%m#wX%n#wX%o#wX%p#wX%q#wX%r#wX%s#wX%t#wX%u#wX%v#wX%w#wX%x#wX%y#wX%|#wX%}#wX&O#wX&Q#wX~Oq#YO&R#ZO~O&QZOU#xXV#xXf#xXg#xXh#xXt#xXw#xXx#xXy#xXz#xX{#xX|#xX}#xX!O#xX!P#xX!Q#xX!R#xX$Q#xX$W#xX%z#xX$`#xX$_#xX~O$^#^O~O$`#`O~PYOd!xOe!xOUmaVmafmagmahmatmawmaxmaymazma{ma|ma}ma!Oma!Pma!Qma!Rma$Qma$Wma%zma$`ma$_ma~OP#cOQ#dOR#dOW$aPX$aPY$aPZ$aP[$aP]$aP^$aP_$aP`$aPa$aPb$aPc$aP!V$aP#t$aP$X$aP$Y$aP$^$aP$b$aP$c$aP$d$aP$e$aP$f$aP$g$aP$h$aP$i$aP$j$aP$k$aP$l$aP$m$aP$n$aP$o$aP$p$aP$q$aP$r$aP$s$aP$t$aP$u$aP$v$aP$w$aP$x$aP$y$aP$z$aP${$aP$|$aP$}$aP%O$aP%P$aP%Q$aP%R$aP%S$aP%T$aP%U$aP%V$aP%W$aP%X$aP%Y$aP%Z$aP%[$aP%]$aP%^$aP%_$aP%`$aP%a$aP%b$aP%c$aP%d$aP%e$aP%f$aP%g$aP%h$aP%i$aP%j$aP%k$aP%l$aP%m$aP%n$aP%o$aP%p$aP%q$aP%r$aP%s$aP%t$aP%u$aP%v$aP%w$aP%x$aP%y$aP%|$aP%}$aP&O$aP&Q$aP~O#p#lO~O{#nO#p#mO~Oi#pOj#pO$XVO$YVO%|#oO%}#oO&OVO~O$`#sO~P'iOt!|OU#vaV#vaf#vag#vah#vaw#vax#vay#vaz#va{#va|#va}#va!O#va!P#va!Q#va!R#va$Q#va$W#va%z#va$`#va$_#va~O!R#tO#|#tO#}#tO$O#tO~O$_#vO&R#xO~Oq#zO$`#yO~O$_#{O$`#}O~P'iOQ#dOR#dOW$aXX$aXY$aXZ$aX[$aX]$aX^$aX_$aX`$aXa$aXb$aXc$aX!V$aX#t$aX$X$aX$Y$aX$^$aX$b$aX$c$aX$d$aX$e$aX$f$aX$g$aX$h$aX$i$aX$j$aX$k$aX$l$aX$m$aX$n$aX$o$aX$p$aX$q$aX$r$aX$s$aX$t$aX$u$aX$v$aX$w$aX$x$aX$y$aX$z$aX${$aX$|$aX$}$aX%O$aX%P$aX%Q$aX%R$aX%S$aX%T$aX%U$aX%V$aX%W$aX%X$aX%Y$aX%Z$aX%[$aX%]$aX%^$aX%_$aX%`$aX%a$aX%b$aX%c$aX%d$aX%e$aX%f$aX%g$aX%h$aX%i$aX%j$aX%k$aX%l$aX%m$aX%n$aX%o$aX%p$aX%q$aX%r$aX%s$aX%t$aX%u$aX%v$aX%w$aX%x$aX%y$aX%|$aX%}$aX&O$aX&Q$aX~O%{$VO&P$WO~O#p$XO~O$X#VO$Y#VO&O#VO~O$^$YO~O#t$ZO~Oq#YO&R$]O~O$_$^O&R$]O~O$_$`O$`$bO~O$_#{O$`$eO~OS$fOT$fOWvaXvaYvaZva[va]va^va_va`vaavabvacva!Vva#tva$Xva$Yva$^va$bva$cva$dva$eva$fva$gva$hva$iva$jva$kva$lva$mva$nva$ova$pva$qva$rva$sva$tva$uva$vva$wva$xva$yva$zva${va$|va$}va%Ova%Pva%Qva%Rva%Sva%Tva%Uva%Vva%Wva%Xva%Yva%Zva%[va%]va%^va%_va%`va%ava%bva%cva%dva%eva%fva%gva%hva%iva%jva%kva%lva%mva%nva%ova%pva%qva%rva%sva%tva%uva%vva%wva%xva%yva%|va%}va&Ova&Qva~Ot!|OUsqfsqgsqhsqzsq{sq|sq}sq!Osq!Psq!Qsq!Rsq$Qsq$Wsq%zsq$`sq$_sq~OVsqwsqxsqysq~PIpOV!|Ow!|Ox!|Oy!|O~PIpOV!|Ot!|Ow!|Ox!|Oy!|Oz!}O{!}OUsqfsqgsqhsq$Qsq$Wsq%zsq$`sq$_sq~O|sq}sq!Osq!Psq!Qsq!Rsq~PKlO|#OO}#OO!O#OO!P#OO!Q#OO!R#OO~PKlOV!|Of#POh#POt!|Ow!|Ox!|Oy!|Oz!}O{!}O|#OO}#OO!O#OO!P#OO!Q#OO!R#OO~OUsqgsq$Qsq$Wsq%zsq$`sq$_sq~PMnO#p$hO%{$gO~O$`$iO~Oq#YO&R$jO~Oq$lO$`$mO~O$_$nO$`$mO~O$_$Ua$`$Ua~P'iO$^#^OWviXviYviZvi[vi]vi^vi_vi`viavibvicvi!Vvi#tvi$Xvi$Yvi$bvi$cvi$dvi$evi$fvi$gvi$hvi$ivi$jvi$kvi$lvi$mvi$nvi$ovi$pvi$qvi$rvi$svi$tvi$uvi$vvi$wvi$xvi$yvi$zvi${vi$|vi$}vi%Ovi%Pvi%Qvi%Rvi%Svi%Tvi%Uvi%Vvi%Wvi%Xvi%Yvi%Zvi%[vi%]vi%^vi%_vi%`vi%avi%bvi%cvi%dvi%evi%fvi%gvi%hvi%ivi%jvi%kvi%lvi%mvi%nvi%ovi%pvi%qvi%rvi%svi%tvi%uvi%vvi%wvi%xvi%yvi%|vi%}vi&Ovi&Qvi~O%{$qO~Oq#YO~Oq$lO$`$rO~Oq$lO~O",goto:"({$bPPPPPPPPPPPPPPPPPPPPPPPPPPPPP$c$o${%RP%[$cP%e%lPPPPPPPPPPP$c%v&SP&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S&S$cP&`$c$cP$c$c&o$c&{'['dPPP$cP'gP'j'p'vPPPPP'|PPP(le^OXY!y#g#h#i#j#k#{eROXY!y#g#h#i#j#k#{Q!zRR#b!{Q#_!xQ$O#dR$p$fQ!{RQ#UUR#b!zZ#f!|!}#O#P#QY#e!|!}#O#P#QR$P#feUOXY!y#g#h#i#j#k#{eTOXY!y#g#h#i#j#k#{d^OXY!y#g#h#i#j#k#{R#q#TeYOXY!y#g#h#i#j#k#{d]OXY!y#g#h#i#j#k#{R#][Q#[ZV$[#v$^$kR#u#YR#r#TQ$a#zR$o$aQ#|#aR$d#|Q#w#[R$_#wQSOQ#WXQ#XYQ#a!yQ$Q#gQ$R#hQ$S#iQ$T#jQ$U#kR$c#{Q#g!|Q#h!}Q#i#OQ#j#PR#k#Q",nodeNames:"⚠ Bool Ignoring On GroupLeft GroupRight Offset Atan2 Avg Bottomk Count CountValues Group Max Min Quantile Stddev Stdvar Sum Topk By Without And Or Unless Start End LineComment PromQL AggregateExpr AggregateOp AggregateModifier GroupingLabels LabelName FunctionCallBody BinaryExpr Pow BoolModifier MatchingModifierClause Mul Div Mod Add Sub Eql Gte Gtr Lte Lss Neq FunctionCall FunctionIdentifier AbsentOverTime Identifier Absent Abs Acos Acosh Asin Asinh Atan Atanh AvgOverTime Ceil Changes Clamp ClampMax ClampMin Cos Cosh CountOverTime DaysInMonth DayOfMonth DayOfWeek DayOfYear Deg Delta Deriv Exp Floor HistogramCount HistogramFraction HistogramQuantile HistogramSum HoltWinters Hour Idelta Increase Irate LabelReplace LabelJoin LastOverTime Ln Log10 Log2 MaxOverTime MinOverTime Minute Month Pi PredictLinear PresentOverTime QuantileOverTime Rad Rate Resets Round Scalar Sgn Sin Sinh Sort SortDesc Sqrt StddevOverTime StdvarOverTime SumOverTime Tan Tanh Timestamp Time Vector Year MatrixSelector Duration NumberLiteral OffsetExpr ParenExpr StringLiteral SubqueryExpr UnaryExpr UnaryOp VectorSelector LabelMatchers LabelMatcher MatchOp EqlSingle EqlRegex NeqRegex StepInvariantExpr At AtModifierPreprocessors MetricName",maxTerm:233,nodeProps:[["group",-12,29,35,50,123,125,126,127,128,129,130,132,139,"Expr"]],propSources:[m],skippedNodes:[0,27],repeatNodeCount:3,tokenData:"3s~RwX^#lpq#lqr$ars$tst&luv'Twx'Yxy({yz)Qz{)V{|)[|})c}!O)h!O!P)o!P!Q*o!Q!R*t!R![+l![!]0W!^!_1S!_!`1a!`!a1v!b!c2T!c!}2Y!}#O2p#P#Q2u#Q#R2z#R#S2Y#S#T3P#T#o2Y#o#p3i#q#r3n#y#z#l$f$g#l#BY#BZ#l$IS$I_#l$I|$JO#l$JT$JU#l$KV$KW#l&FU&FV#l~#qY$[~X^#lpq#l#y#z#l$f$g#l#BY#BZ#l$IS$I_#l$I|$JO#l$JT$JU#l$KV$KW#l&FU&FV#l~$dQ!_!`$j#r#s$o~$oO!R~~$tO$O~~$yW#t~OY$tZr$trs%cs#O$t#O#P%h#P;'S$t;'S;=`&f<%lO$t~%hO#t~~%kRO;'S$t;'S;=`%t;=`O$t~%yX#t~OY$tZr$trs%cs#O$t#O#P%h#P;'S$t;'S;=`&f;=`<%l$t<%lO$t~&iP;=`<%l$t~&qSk~OY&lZ;'S&l;'S;=`&}<%lO&l~'QP;=`<%l&l~'YOy~~'_W#t~OY'YZw'Ywx%cx#O'Y#O#P'w#P;'S'Y;'S;=`(u<%lO'Y~'zRO;'S'Y;'S;=`(T;=`O'Y~(YX#t~OY'YZw'Ywx%cx#O'Y#O#P'w#P;'S'Y;'S;=`(u;=`<%l'Y<%lO'Y~(xP;=`<%l'Y~)QO$^~~)VO$`~~)[Ow~R)cO%}PzQ~)hO$_~R)oO%|P{QP)rP!Q![)uP)zR&OP!Q![)u!g!h*T#X#Y*TP*WR{|*a}!O*a!Q![*gP*dP!Q![*gP*lP&OP!Q![*g~*tOx~R*yZ&OP!O!P)u!Q![+l!g!h*T#W#X,a#X#Y*T#[#],x#a#b-^#g#h.Q#k#l.c#l#m/l#m#n.}R+qY&OP!O!P)u!Q![+l!g!h*T#W#X,a#X#Y*T#[#],x#a#b-^#g#h.Q#k#l.c#m#n.}Q,fP#pQ!Q![,iQ,lS!Q![,i#[#],x#a#b-^#g#h.QQ,}P#pQ!Q![-QQ-TR!Q![-Q#a#b-^#g#h.QQ-cQ#pQ!Q![-i#g#h-{Q-lR!Q![-i#a#b-u#g#h.QQ-xP#g#h-{Q.QO#pQQ.VP#pQ!Q![.YQ.]Q!Q![.Y#a#b-uQ.hP#pQ!Q![.kQ.nT!Q![.k#W#X,a#[#],x#a#b-^#g#h.QQ/SP#pQ!Q![/VQ/YU!Q![/V#W#X,a#[#],x#a#b-^#g#h.Q#k#l.cP/oR!Q![/x!c!i/x#T#Z/xP/}R&OP!Q![/x!c!i/x#T#Z/xV0_T&PS!VR!Q![0n![!]0n!c!}0n#R#S0n#T#o0nR0sT!VR!Q![0n![!]0n!c!}0n#R#S0n#T#o0n~1XP!Q~!_!`1[~1aO!P~~1fQ#|P!_!`1l#r#s1qQ1qO|Q~1vO#}~~1{P!O~!_!`2O~2TO}~~2YO$Q~V2aT!VRqS!Q![2Y![!]0n!c!}2Y#R#S2Y#T#o2Y~2uO%z~~2zO%{~~3POt~~3STO#S3P#S#T%c#T;'S3P;'S;=`3c<%lO3P~3fP;=`<%l3P~3nO&Q~~3sO&R~",tokenizers:[0,1,2],topRules:{PromQL:[0,28],MetricName:[1,142]},specialized:[{term:53,get:(e,t)=>d(e)<<1,external:d},{term:53,get:(e,t)=>f(e)<<1|1,external:f,extend:!0},{term:53,get:e=>g[e]||-1}],tokenPrec:0});(i=l||(l={})).none="none",i.vector="vector",i.scalar="scalar",i.matrix="matrix",i.string="string";let y={55:{name:"abs",argTypes:[l.vector],variadic:0,returnType:l.vector},54:{name:"absent",argTypes:[l.vector],variadic:0,returnType:l.vector},52:{name:"absent_over_time",argTypes:[l.matrix],variadic:0,returnType:l.vector},56:{name:"acos",argTypes:[l.vector],variadic:0,returnType:l.vector},57:{name:"acosh",argTypes:[l.vector],variadic:0,returnType:l.vector},58:{name:"asin",argTypes:[l.vector],variadic:0,returnType:l.vector},59:{name:"asinh",argTypes:[l.vector],variadic:0,returnType:l.vector},60:{name:"atan",argTypes:[l.vector],variadic:0,returnType:l.vector},61:{name:"atanh",argTypes:[l.vector],variadic:0,returnType:l.vector},62:{name:"avg_over_time",argTypes:[l.matrix],variadic:0,returnType:l.vector},63:{name:"ceil",argTypes:[l.vector],variadic:0,returnType:l.vector},64:{name:"changes",argTypes:[l.matrix],variadic:0,returnType:l.vector},65:{name:"clamp",argTypes:[l.vector,l.scalar,l.scalar],variadic:0,returnType:l.vector},66:{name:"clamp_max",argTypes:[l.vector,l.scalar],variadic:0,returnType:l.vector},67:{name:"clamp_min",argTypes:[l.vector,l.scalar],variadic:0,returnType:l.vector},68:{name:"cos",argTypes:[l.vector],variadic:0,returnType:l.vector},69:{name:"Cosh",argTypes:[l.vector],variadic:0,returnType:l.vector},70:{name:"count_over_time",argTypes:[l.matrix],variadic:0,returnType:l.vector},71:{name:"days_in_month",argTypes:[l.vector],variadic:1,returnType:l.vector},72:{name:"day_of_month",argTypes:[l.vector],variadic:1,returnType:l.vector},73:{name:"day_of_week",argTypes:[l.vector],variadic:1,returnType:l.vector},74:{name:"day_of_year",argTypes:[l.vector],variadic:1,returnType:l.vector},75:{name:"deg",argTypes:[l.vector],variadic:0,returnType:l.vector},76:{name:"delta",argTypes:[l.matrix],variadic:0,returnType:l.vector},77:{name:"deriv",argTypes:[l.matrix],variadic:0,returnType:l.vector},78:{name:"exp",argTypes:[l.vector],variadic:0,returnType:l.vector},79:{name:"floor",argTypes:[l.vector],variadic:0,returnType:l.vector},80:{name:"histogram_count",argTypes:[l.vector],variadic:0,returnType:l.vector},81:{name:"histogram_fraction",argTypes:[l.scalar,l.scalar,l.vector],variadic:0,returnType:l.vector},82:{name:"histogram_quantile",argTypes:[l.scalar,l.vector],variadic:0,returnType:l.vector},83:{name:"histogram_sum",argTypes:[l.vector],variadic:0,returnType:l.vector},84:{name:"holt_winters",argTypes:[l.matrix,l.scalar,l.scalar],variadic:0,returnType:l.vector},85:{name:"hour",argTypes:[l.vector],variadic:1,returnType:l.vector},86:{name:"idelta",argTypes:[l.matrix],variadic:0,returnType:l.vector},87:{name:"increase",argTypes:[l.matrix],variadic:0,returnType:l.vector},88:{name:"irate",argTypes:[l.matrix],variadic:0,returnType:l.vector},89:{name:"label_replace",argTypes:[l.vector,l.string,l.string,l.string,l.string],variadic:0,returnType:l.vector},90:{name:"label_join",argTypes:[l.vector,l.string,l.string,l.string],variadic:-1,returnType:l.vector},91:{name:"last_over_time",argTypes:[l.matrix],variadic:0,returnType:l.vector},92:{name:"ln",argTypes:[l.vector],variadic:0,returnType:l.vector},93:{name:"log10",argTypes:[l.vector],variadic:0,returnType:l.vector},94:{name:"log2",argTypes:[l.vector],variadic:0,returnType:l.vector},95:{name:"max_over_time",argTypes:[l.matrix],variadic:0,returnType:l.vector},96:{name:"min_over_time",argTypes:[l.matrix],variadic:0,returnType:l.vector},97:{name:"minute",argTypes:[l.vector],variadic:1,returnType:l.vector},98:{name:"month",argTypes:[l.vector],variadic:1,returnType:l.vector},99:{name:"pi",argTypes:[],variadic:0,returnType:l.vector},100:{name:"predict_linear",argTypes:[l.matrix,l.scalar],variadic:0,returnType:l.vector},101:{name:"present_over_time",argTypes:[l.matrix],variadic:0,returnType:l.vector},102:{name:"quantile_over_time",argTypes:[l.scalar,l.matrix],variadic:0,returnType:l.vector},103:{name:"rad",argTypes:[l.vector],variadic:0,returnType:l.vector},104:{name:"rate",argTypes:[l.matrix],variadic:0,returnType:l.vector},105:{name:"resets",argTypes:[l.matrix],variadic:0,returnType:l.vector},106:{name:"round",argTypes:[l.vector,l.scalar],variadic:1,returnType:l.vector},107:{name:"scalar",argTypes:[l.vector],variadic:0,returnType:l.scalar},108:{name:"sgn",argTypes:[l.vector],variadic:0,returnType:l.vector},109:{name:"sin",argTypes:[l.vector],variadic:0,returnType:l.vector},110:{name:"Sinh",argTypes:[l.vector],variadic:0,returnType:l.vector},111:{name:"sort",argTypes:[l.vector],variadic:0,returnType:l.vector},112:{name:"sort_desc",argTypes:[l.vector],variadic:0,returnType:l.vector},113:{name:"sqrt",argTypes:[l.vector],variadic:0,returnType:l.vector},114:{name:"stddev_over_time",argTypes:[l.matrix],variadic:0,returnType:l.vector},115:{name:"stdvar_over_time",argTypes:[l.matrix],variadic:0,returnType:l.vector},116:{name:"sum_over_time",argTypes:[l.matrix],variadic:0,returnType:l.vector},117:{name:"tan",argTypes:[l.vector],variadic:0,returnType:l.vector},118:{name:"tanh",argTypes:[l.vector],variadic:0,returnType:l.vector},120:{name:"time",argTypes:[],variadic:0,returnType:l.scalar},119:{name:"timestamp",argTypes:[l.vector],variadic:0,returnType:l.vector},121:{name:"vector",argTypes:[l.scalar],variadic:0,returnType:l.vector},122:{name:"year",argTypes:[l.vector],variadic:1,returnType:l.vector}};class b{constructor(e,t,a){this.type=e,this.name=t,this.value=a}matchesEmpty(){switch(this.type){case 136:return""===this.value;case 49:return""!==this.value;default:return!1}}}function _(e,t){let a=[];return e.forEach(e=>{a.push(function(e,t){let a=new b(0,"",""),i=e.cursor();if(!i.next())return a;do switch(i.type.id){case 33:a.name=t.sliceDoc(i.from,i.to);break;case 135:let r=i.node.firstChild;r&&(a.type=r.type.id);break;case 128:a.value=t.sliceDoc(i.from,i.to).slice(1,-1)}while(i.nextSibling());return a}(e,t))}),a}function Q(e,t){for(;;){if(!e||e.type.id===t)return e;e=e.parent}return null}function P(e,...t){let a=e.cursor();if(!a.next())return!1;let i=!1;do i=t.some(e=>a.type.id===e||a.type.name===e);while(!i&&a.nextSibling());return i}function w(e,...t){let a=e.cursor();if(!a.next())return!1;let i=0;do a.type.is(t[i])&&i++;while(i<t.length&&a.nextSibling());return i>=t.length}(r=s||(s={})).CardOneToOne="one-to-one",r.CardManyToOne="many-to-one",r.CardOneToMany="one-to-many",r.CardManyToMany="many-to-many";var x=a(61262);class T{constructor(e){this.tree=(0,x.qz)(e),this.state=e,this.diagnostics=[]}getDiagnostics(){return this.diagnostics.sort((e,t)=>e.from-t.from)}analyze(){this.checkAST(this.tree.topNode.firstChild),this.diagnoseAllErrorNodes()}diagnoseAllErrorNodes(){let e=this.tree.cursor();for(;e.next();)if(0===e.type.id&&e.to!==this.tree.topNode.to){let t=e.node.parent;this.diagnostics.push({severity:"error",message:"unexpected expression",from:t?t.from:e.from,to:t?t.to:e.to})}}checkAST(e){if(!e)return l.none;switch(e.type.id){case 29:this.checkAggregationExpr(e);break;case 35:this.checkBinaryExpr(e);break;case 50:this.checkCallFunction(e);break;case 127:case 123:this.checkAST(e.getChild("Expr"));break;case 130:let t=this.checkAST(e.getChild("Expr"));t!==l.scalar&&t!==l.vector&&this.addDiagnostic(e,`unary expression only allowed on expressions of type scalar or instant vector, got ${t}`);break;case 129:let a=this.checkAST(e.getChild("Expr"));a!==l.vector&&this.addDiagnostic(e,`subquery is only allowed on instant vector, got ${a} in ${e.name} instead`);break;case 132:this.checkVectorSelector(e);break;case 139:let i=this.checkAST(e.getChild("Expr"));i!==l.vector&&i!==l.matrix&&this.addDiagnostic(e,"@ modifier must be preceded by an instant selector vector or range vector selector or a subquery")}return function e(t){var a;if(!t)return l.none;switch(t.type.id){case 29:case 132:return l.vector;case 126:return e(t.firstChild);case 128:return l.string;case 125:return l.scalar;case 123:case 129:return l.matrix;case 127:case 130:case 139:return e(t.getChild("Expr"));case 35:let i=e(t.firstChild),r=e(t.lastChild);if(i===l.scalar&&r===l.scalar)return l.scalar;return l.vector;case 50:let n=null===(a=t.firstChild)||void 0===a?void 0:a.firstChild;if(!n)return l.none;return y[n.type.id].returnType;default:return l.none}}(e)}checkAggregationExpr(e){var t;let a=null===(t=e.firstChild)||void 0===t?void 0:t.firstChild;if(!a){this.addDiagnostic(e,"aggregation operator expected in aggregation expression but got nothing");return}let i=e.getChild(34),r=i?i.getChildren("Expr"):[];if(!r.length){this.addDiagnostic(e,"unable to find the parameter for the expression");return}this.expectType(r[r.length-1],l.vector,"aggregation expression"),(19===a.type.id||9===a.type.id||15===a.type.id)&&this.expectType(r[0],l.scalar,"aggregation parameter"),11===a.type.id&&this.expectType(r[0],l.string,"aggregation parameter")}checkBinaryExpr(e){let t=e.firstChild,a=e.lastChild;if(!t||!a){this.addDiagnostic(e,"left or right expression is missing in binary expression");return}let i=this.checkAST(t),r=this.checkAST(a),n=e.getChild(37),o=P(e,44,49,47,48,45,46),c=P(e,22,23,24);n?o||this.addDiagnostic(e,"bool modifier can only be used on comparison operators"):o&&i===l.scalar&&r===l.scalar&&this.addDiagnostic(e,"comparisons between scalars must use BOOL modifier");let u=function(e,t){if(!t||35!==t.type.id)return null;let a={card:s.CardOneToOne,matchingLabels:[],on:!1,include:[]},i=t.getChild(38);if(i){a.on=null!==i.getChild(3);let t=i.getChild(32);for(let i of t?t.getChildren(33):[])a.matchingLabels.push(e.sliceDoc(i.from,i.to));let r=i.getChild(4),n=i.getChild(5),o=r||n;if(o){a.card=r?s.CardManyToOne:s.CardOneToMany;let t=o.nextSibling;for(let i of(null==t?void 0:t.getChildren(33))||[])a.include.push(e.sliceDoc(i.from,i.to))}}return P(t,22,23,24)&&a.card===s.CardOneToOne&&(a.card=s.CardManyToMany),a}(this.state,e);if(null!==u&&u.on)for(let t of u.matchingLabels)for(let a of u.include)t===a&&this.addDiagnostic(e,`label "${t}" must not occur in ON and GROUP clause at once`);i!==l.scalar&&i!==l.vector&&this.addDiagnostic(t,"binary expression must contain only scalar and instant vector types"),r!==l.scalar&&r!==l.vector&&this.addDiagnostic(a,"binary expression must contain only scalar and instant vector types"),(i!==l.vector||r!==l.vector)&&null!==u?u.matchingLabels.length>0&&this.addDiagnostic(e,"vector matching only allowed between instant vectors"):c&&(((null==u?void 0:u.card)===s.CardOneToMany||(null==u?void 0:u.card)===s.CardManyToOne)&&this.addDiagnostic(e,"no grouping allowed for set operations"),(null==u?void 0:u.card)!==s.CardManyToMany&&this.addDiagnostic(e,"set operations must always be many-to-many")),(i===l.scalar||r===l.scalar)&&c&&this.addDiagnostic(e,"set operator not allowed in binary scalar expression")}checkCallFunction(e){var t;let a=null===(t=e.firstChild)||void 0===t?void 0:t.firstChild;if(!a){this.addDiagnostic(e,"function not defined");return}let i=e.getChild(34),r=i?i.getChildren("Expr"):[],n=y[a.type.id],o=n.argTypes.length;if(0===n.variadic)r.length!==o&&this.addDiagnostic(e,`expected ${o} argument(s) in call to "${n.name}", got ${r.length}`);else{let t=o-1;if(t>r.length)this.addDiagnostic(e,`expected at least ${t} argument(s) in call to "${n.name}", got ${r.length}`);else{let a=t+n.variadic;n.variadic>0&&a<r.length&&this.addDiagnostic(e,`expected at most ${a} argument(s) in call to "${n.name}", got ${r.length}`)}}let l=0;for(let e=0;e<r.length;e++){if((l=e)>=n.argTypes.length){if(0===n.variadic)break;l=n.argTypes.length-1}this.expectType(r[e],n.argTypes[l],`call to function "${n.name}"`)}}checkVectorSelector(e){let t=e.getChild(133),a=_(t?t.getChildren(134):[],this.state),i="",r=e.getChild(53);if(r&&(i=this.state.sliceDoc(r.from,r.to)),""!==i){let t=a.find(e=>"__name__"===e.name);t&&this.addDiagnostic(e,`metric name must not be set twice: ${i} or ${t.value}`),a.push(new b(136,"__name__",i))}a.every(e=>e.matchesEmpty())&&this.addDiagnostic(e,"vector selector must contain at least one non-empty matcher")}expectType(e,t,a){let i=this.checkAST(e);i!==t&&this.addDiagnostic(e,`expected type ${t} in ${a}, got ${i}`)}addDiagnostic(e,t){this.diagnostics.push({severity:"error",message:t,from:e.from,to:e.to})}}var X=a(13018);let k=[{label:"^"},{label:"*"},{label:"/"},{label:"%"},{label:"+"},{label:"-"},{label:"=="},{label:">="},{label:">"},{label:"<"},{label:"<="},{label:"!="},{label:"atan2"},{label:"and"},{label:"or"},{label:"unless"}],S=[{label:"avg",detail:"aggregation",info:"Calculate the average over dimensions",type:"keyword"},{label:"bottomk",detail:"aggregation",info:"Smallest k elements by sample value",type:"keyword"},{label:"count",detail:"aggregation",info:"Count number of elements in the vector",type:"keyword"},{label:"count_values",detail:"aggregation",info:"Count number of elements with the same value",type:"keyword"},{label:"group",detail:"aggregation",info:"Group series, while setting the sample value to 1",type:"keyword"},{label:"max",detail:"aggregation",info:"Select maximum over dimensions",type:"keyword"},{label:"min",detail:"aggregation",info:"Select minimum over dimensions",type:"keyword"},{label:"quantile",detail:"aggregation",info:"Calculate φ-quantile (0 ≤ φ ≤ 1) over dimensions",type:"keyword"},{label:"stddev",detail:"aggregation",info:"Calculate population standard deviation over dimensions",type:"keyword"},{label:"stdvar",detail:"aggregation",info:"Calculate population standard variance over dimensions",type:"keyword"},{label:"sum",detail:"aggregation",info:"Calculate sum over dimensions",type:"keyword"},{label:"topk",detail:"aggregation",info:"Largest k elements by sample value",type:"keyword"}],E=[{label:"sum(rate(__input_vector__[5m]))",type:"function",detail:"snippet",info:"Sum over rates of increase",apply:(0,X.DB)("sum(rate(${__input_vector__}[5m]))")},{label:"histogram_quantile(__quantile__, sum by(le) (rate(__histogram_metric__[5m])))",type:"function",detail:"snippet",info:"Approximate a quantile value from an aggregated histogram",apply:(0,X.DB)("histogram_quantile(${__quantile__}, sum by(le) (rate(${__histogram_metric__}[5m])))")},{label:'label_replace(__input_vector__, "__dst__", "__replacement__", "__src__", "__regex__")',type:"function",detail:"snippet",info:"Set or replace a label value in an input vector",apply:(0,X.DB)('label_replace(${__input_vector__}, "${__dst__}", "${__replacement__}", "${__src__}", "${__regex__}")')},{label:"topk(__rank_number__, __input_vector__)",type:"function",detail:"snippet",info:"Largest k elements by sample value",apply:(0,X.DB)("topk(${__rank_number__}, ${__input_vector__})")},{label:"bottomk(__rank_number__, __input_vector__)",type:"function",detail:"snippet",info:"Smallest k elements by sample value",apply:(0,X.DB)("bottomk(${__rank_number__}, ${__input_vector__})")},{label:'count_values("__label_name__", __input_vector__)',type:"function",detail:"snippet",info:"Count the number of series per distinct sample value",apply:(0,X.DB)('count_values("${__label_name__}", ${__metric__})')}],C={matchOp:[{label:"="},{label:"!="},{label:"=~"},{label:"!~"}],binOp:k,duration:[{label:"y"},{label:"w"},{label:"d"},{label:"h"},{label:"m"},{label:"s"},{label:"ms"}],binOpModifier:[{label:"on",info:"Match only on specified labels",type:"keyword"},{label:"ignoring",info:"Ignore specified labels for matching",type:"keyword"},{label:"group_left",info:"Allow many-to-one matching",type:"keyword"},{label:"group_right",info:"Allow one-to-many matching",type:"keyword"}],atModifier:[{label:"start()",info:"resolve to the start of the query",type:"keyword"},{label:"end()",info:"resolve to the end of the query",type:"keyword"}],functionIdentifier:[{label:"abs",detail:"function",info:"Return absolute values of input series",type:"function"},{label:"absent",detail:"function",info:"Determine whether input vector is empty",type:"function"},{label:"absent_over_time",detail:"function",info:"Determine whether input range vector is empty",type:"function"},{label:"acos",detail:"function",info:"Calculate the arccosine, in radians, for input series",type:"function"},{label:"acosh",detail:"function",info:"Calculate the inverse hyperbolic cosine, in radians, for input series",type:"function"},{label:"asin",detail:"function",info:"Calculate the arcsine, in radians, for input series",type:"function"},{label:"asinh",detail:"function",info:"Calculate the inverse hyperbolic sine, in radians, for input series",type:"function"},{label:"atan",detail:"function",info:"Calculate the arctangent, in radians, for input series",type:"function"},{label:"atanh",detail:"function",info:"Calculate the inverse hyperbolic tangent, in radians, for input series",type:"function"},{label:"avg_over_time",detail:"function",info:"Average series values over time",type:"function"},{label:"ceil",detail:"function",info:"Round up values of input series to nearest integer",type:"function"},{label:"changes",detail:"function",info:"Return number of value changes in input series over time",type:"function"},{label:"clamp",detail:"function",info:"Limit the value of input series between a minimum and a maximum",type:"function"},{label:"clamp_max",detail:"function",info:"Limit the value of input series to a maximum",type:"function"},{label:"clamp_min",detail:"function",info:"Limit the value of input series to a minimum",type:"function"},{label:"cos",detail:"function",info:"Calculate the cosine, in radians, for input series",type:"function",boost:-1},{label:"cosh",detail:"function",info:"Calculate the hyperbolic cosine, in radians, for input series",type:"function",boost:-1},{label:"count_over_time",detail:"function",info:"Count the number of values for each input series",type:"function"},{label:"days_in_month",detail:"function",info:"Return the number of days in current month for provided timestamps",type:"function"},{label:"day_of_month",detail:"function",info:"Return the day of the month for provided timestamps",type:"function"},{label:"day_of_week",detail:"function",info:"Return the day of the week for provided timestamps",type:"function"},{label:"day_of_year",detail:"function",info:"Return the day of the year for provided timestamps",type:"function"},{label:"deg",detail:"function",info:"Convert radians to degrees for input series",type:"function",boost:-1},{label:"delta",detail:"function",info:"Calculate the difference between beginning and end of a range vector (for gauges)",type:"function"},{label:"deriv",detail:"function",info:"Calculate the per-second derivative over series in a range vector (for gauges)",type:"function"},{label:"exp",detail:"function",info:"Calculate exponential function for input vector values",type:"function"},{label:"floor",detail:"function",info:"Round down values of input series to nearest integer",type:"function"},{label:"histogram_count",detail:"function",info:"Return the count of observations from a native histogram (experimental feature)",type:"function"},{label:"histogram_fraction",detail:"function",info:"Calculate fractions of observations within an interval from a native histogram (experimental feature)",type:"function"},{label:"histogram_quantile",detail:"function",info:"Calculate quantiles from native histograms (experimental) and from conventional histogram buckets",type:"function"},{label:"histogram_sum",detail:"function",info:"Return the sum of observations from a native histogram (experimental feature)",type:"function"},{label:"holt_winters",detail:"function",info:"Calculate smoothed value of input series",type:"function"},{label:"hour",detail:"function",info:"Return the hour of the day for provided timestamps",type:"function"},{label:"idelta",detail:"function",info:"Calculate the difference between the last two samples of a range vector (for counters)",type:"function"},{label:"increase",detail:"function",info:"Calculate the increase in value over a range of time (for counters)",type:"function"},{label:"irate",detail:"function",info:"Calculate the per-second increase over the last two samples of a range vector (for counters)",type:"function"},{label:"label_replace",detail:"function",info:"Set or replace label values",type:"function"},{label:"label_join",detail:"function",info:"Join together label values into new label",type:"function"},{label:"last_over_time",detail:"function",info:"The most recent point value in specified interval.",type:"function"},{label:"ln",detail:"function",info:"Calculate natural logarithm of input series",type:"function"},{label:"log10",detail:"function",info:"Calulcate base-10 logarithm of input series",type:"function"},{label:"log2",detail:"function",info:"Calculate base-2 logarithm of input series",type:"function"},{label:"max_over_time",detail:"function",info:"Return the maximum value over time for input series",type:"function"},{label:"min_over_time",detail:"function",info:"Return the minimum value over time for input series",type:"function"},{label:"minute",detail:"function",info:"Return the minute of the hour for provided timestamps",type:"function"},{label:"month",detail:"function",info:"Return the month for provided timestamps",type:"function"},{label:"pi",detail:"function",info:"Return pi",type:"function"},{label:"predict_linear",detail:"function",info:"Predict the value of a gauge into the future",type:"function"},{label:"present_over_time",detail:"function",info:"the value 1 for any series in the specified interval",type:"function"},{label:"quantile_over_time",detail:"function",info:"Calculate value quantiles over time for input series",type:"function"},{label:"rad",detail:"function",info:"Convert degrees to radians for input series",type:"function",boost:-1},{label:"rate",detail:"function",info:"Calculate per-second increase over a range vector (for counters)",type:"function"},{label:"resets",detail:"function",info:"Return number of value decreases (resets) in input series of time",type:"function"},{label:"round",detail:"function",info:"Round values of input series to nearest integer",type:"function"},{label:"scalar",detail:"function",info:"Convert single-element series vector into scalar value",type:"function"},{label:"sgn",detail:"function",info:"Returns the sign of the instant vector",type:"function"},{label:"sin",detail:"function",info:"Calculate the sine, in radians, for input series",type:"function"},{label:"sinh",detail:"function",info:"Calculate the hyperbolic sine, in radians, for input series",type:"function"},{label:"sort",detail:"function",info:"Sort input series ascendingly by value",type:"function"},{label:"sort_desc",detail:"function",info:"Sort input series descendingly by value",type:"function"},{label:"sqrt",detail:"function",info:"Return the square root for input series",type:"function"},{label:"stddev_over_time",detail:"function",info:"Calculate the standard deviation within input series over time",type:"function"},{label:"stdvar_over_time",detail:"function",info:"Calculate the standard variation within input series over time",type:"function"},{label:"sum_over_time",detail:"function",info:"Calculate the sum over the values of input series over time",type:"function"},{label:"tan",detail:"function",info:"Calculate the tangent, in radians, for input series",type:"function"},{label:"tanh",detail:"function",info:"Calculate the hyperbolic tangent, in radians, for input series",type:"function"},{label:"time",detail:"function",info:"Return the Unix timestamp at the current evaluation time",type:"function"},{label:"timestamp",detail:"function",info:"Return the Unix timestamp for the samples in the input vector",type:"function"},{label:"vector",detail:"function",info:"Convert a scalar value into a single-element series vector",type:"function"},{label:"year",detail:"function",info:"Return the year for provided timestamps",type:"function"}],aggregateOp:S,aggregateOpModifier:[{label:"by",info:"Keep the listed labels, remove all others.",type:"keyword"},{label:"without",info:"Remove the listed labels, preserve all others.",type:"keyword"}],number:[{label:"nan",info:"Floating-point NaN value",type:"constant"},{label:"inf",info:"Floating-point infinity",type:"constant"}]};function D(e,t){let a=Q(e,132);return a&&(a=a.getChild(53))?t.sliceDoc(a.from,a.to):""}(n=c||(c={}))[n.MetricName=0]="MetricName",n[n.LabelName=1]="LabelName",n[n.LabelValue=2]="LabelValue",n[n.Function=3]="Function",n[n.Aggregation=4]="Aggregation",n[n.BinOpModifier=5]="BinOpModifier",n[n.BinOp=6]="BinOp",n[n.MatchOp=7]="MatchOp",n[n.AggregateOpModifier=8]="AggregateOpModifier",n[n.Duration=9]="Duration",n[n.Offset=10]="Offset",n[n.Bool=11]="Bool",n[n.AtModifiers=12]="AtModifiers",n[n.Number=13]="Number";class q{constructor(e,t=1e4){this.prometheusClient=e,this.maxMetricsMetadata=t}getPrometheusClient(){return this.prometheusClient}promQL(e){let{state:t,pos:a}=e,i=(0,x.qz)(t).resolve(a,-1),r=function(e,t){var a,i,r,n,o,l,s,u,h,p,O,d,v,f;let m=[];switch(t.type.id){case 0:if((null===(a=t.parent)||void 0===a?void 0:a.type.id)===126){m.push({kind:c.Duration});break}if((null===(i=t.parent)||void 0===i?void 0:i.type.id)===134){m.push({kind:c.MatchOp});break}if((null===(r=t.parent)||void 0===r?void 0:r.type.id)===123||(null===(n=t.parent)||void 0===n?void 0:n.type.id)===129&&P(t.parent,124)){m.push({kind:c.Duration});break}let g=e.sliceDoc(t.from,t.to);k.filter(e=>e.label.includes(g)).length>0&&m.push({kind:c.BinOp});break;case 53:if((null===(o=t.parent)||void 0===o?void 0:o.type.id)===0){let a=t.parent.parent;if((null==a?void 0:a.type.id)===139){m.push({kind:c.AtModifiers});break}if((null==a?void 0:a.type.id)===29){m.push({kind:c.AggregateOpModifier},{kind:c.BinOp});break}if((null==a?void 0:a.type.id)===132){let a=D(t,e);S.filter(e=>e.label===a).length>0&&m.push({kind:c.AggregateOpModifier}),m.push({kind:c.BinOp},{kind:c.Offset});break}if(a&&w(a,"Expr")){m.push({kind:c.BinOp},{kind:c.Offset});break}}let $=null===(l=t.parent)||void 0===l?void 0:l.parent;if(!$){m.push({kind:c.MetricName,metricName:e.sliceDoc(t.from,t.to)});break}w($,"Expr","Expr")?35!==$.type.id||P($,0)||(m.push({kind:c.MetricName,metricName:e.sliceDoc(t.from,t.to)},{kind:c.Function},{kind:c.Aggregation},{kind:c.BinOpModifier},{kind:c.Number}),P($,44,45,46,47,48,49)&&!P($,37)&&m.push({kind:c.Bool})):(m.push({kind:c.MetricName,metricName:e.sliceDoc(t.from,t.to)},{kind:c.Function},{kind:c.Aggregation}),34!==$.type.id&&123!==$.type.id&&m.push({kind:c.Number}));break;case 28:null!==t.firstChild&&0===t.firstChild.type.id&&m.push({kind:c.MetricName,metricName:""},{kind:c.Function},{kind:c.Aggregation},{kind:c.Number});break;case 32:m.push({kind:c.LabelName,metricName:function(e,t){let a=Q(e,29);if(!a)return"";let i="";return a.cursor().iterate(e=>{if(132===e.type.id&&(i=D(e.node,t)))return!1}),i}(t,e)});break;case 133:m.push({kind:c.LabelName,metricName:D(t,e)});break;case 33:(null===(s=t.parent)||void 0===s?void 0:s.type.id)===32?m.push({kind:c.LabelName}):(null===(u=t.parent)||void 0===u?void 0:u.type.id)===134&&m.push({kind:c.LabelName,metricName:D(t,e)});break;case 128:if((null===(h=t.parent)||void 0===h?void 0:h.type.id)===134){let a="";(null===(p=t.parent.firstChild)||void 0===p?void 0:p.type.id)===33&&(a=e.sliceDoc(t.parent.firstChild.from,t.parent.firstChild.to));let i=D(t,e),r=Q(t,133),n=_(r?r.getChildren(134):[],e);m.push({kind:c.LabelValue,metricName:i,labelName:a,matchers:n})}break;case 125:(null===(O=t.parent)||void 0===O?void 0:O.type.id)===0&&(null===(d=t.parent.parent)||void 0===d?void 0:d.type.id)===129?m.push({kind:c.Duration}):m.push({kind:c.Number});break;case 124:case 126:m.push({kind:c.Duration});break;case 34:m.push({kind:c.MetricName,metricName:""},{kind:c.Function},{kind:c.Aggregation});break;case 49:(null===(v=t.parent)||void 0===v?void 0:v.type.id)===135?m.push({kind:c.MatchOp}):(null===(f=t.parent)||void 0===f?void 0:f.type.id)===35&&m.push({kind:c.BinOp});break;case 136:case 137:case 138:case 135:m.push({kind:c.MatchOp});break;case 36:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 48:case 22:case 24:case 23:case 35:m.push({kind:c.BinOp})}return m}(t,i),n=Promise.resolve([]),o=!1,l=!0;for(let e of r)switch(e.kind){case c.Aggregation:o=!0,n=n.then(e=>e.concat(C.aggregateOp));break;case c.Function:o=!0,n=n.then(e=>e.concat(C.functionIdentifier));break;case c.BinOpModifier:n=n.then(e=>e.concat(C.binOpModifier));break;case c.BinOp:n=n.then(e=>e.concat(C.binOp));break;case c.MatchOp:n=n.then(e=>e.concat(C.matchOp));break;case c.AggregateOpModifier:n=n.then(e=>e.concat(C.aggregateOpModifier));break;case c.Duration:l=!1,n=n.then(e=>e.concat(C.duration));break;case c.Offset:n=n.then(e=>e.concat([{label:"offset"}]));break;case c.Bool:n=n.then(e=>e.concat([{label:"bool"}]));break;case c.AtModifiers:n=n.then(e=>e.concat(C.atModifier));break;case c.Number:n=n.then(e=>e.concat(C.number));break;case c.MetricName:n=n.then(t=>this.autocompleteMetricName(t,e));break;case c.LabelName:n=n.then(t=>this.autocompleteLabelName(t,e));break;case c.LabelValue:n=n.then(t=>this.autocompleteLabelValue(t,e))}return n.then(e=>(function(e,t,a,i=!1,r=!0){return i&&e.push(...E),{from:t,to:a,options:e,validFor:r?/^[a-zA-Z0-9_:]+$/:void 0}})(e,function(e,t){var a,i,r,n,o,l;let s=e.from;if(133===e.type.id||32===e.type.id){let a;a=e.from+1,null!==e.firstChild&&(a=t),s=a}else 34===e.type.id||128===e.type.id&&(null===(a=e.parent)||void 0===a?void 0:a.type.id)===134?s++:(126===e.type.id||125===e.type.id&&(null===(i=e.parent)||void 0===i?void 0:i.type.id)===0&&(null===(r=e.parent.parent)||void 0===r?void 0:r.type.id)===129||0===e.type.id&&((null===(n=e.parent)||void 0===n?void 0:n.type.id)===126||(null===(o=e.parent)||void 0===o?void 0:o.type.id)===123||(null===(l=e.parent)||void 0===l?void 0:l.type.id)===129&&P(e.parent,124)))&&(s=t);return s}(i,a),a,o,l))}autocompleteMetricName(e,t){if(!this.prometheusClient)return e;let a=new Map;return this.prometheusClient.metricNames(t.metricName).then(e=>{var t;for(let t of e)a.set(t,{label:t,type:"constant"});if(e.length<=this.maxMetricsMetadata)return null===(t=this.prometheusClient)||void 0===t?void 0:t.metricMetadata()}).then(t=>{if(t)for(let[e,i]of a){let a=t[e.replace(/(_count|_sum|_bucket)$/,"")];if(a){if(a.length>1)for(let e of a)""===i.detail?i.detail=e.type:i.detail!==e.type&&(i.detail="unknown",i.info="multiple different definitions for this metric"),""===i.info?i.info=e.help:i.info!==e.help&&(i.info="multiple different definitions for this metric");else if(1===a.length){let{type:t,help:r}=a[0];("histogram"===t||"summary"===t)&&(e.endsWith("_count")&&(t="counter",r=`The total number of observations for: ${r}`),e.endsWith("_sum")&&(t="counter",r=`The total sum of observations for: ${r}`),e.endsWith("_bucket")&&(t="counter",r=`The total count of observations for a bucket in the histogram: ${r}`)),i.detail=t,i.info=r}}}return e.concat(Array.from(a.values()))})}autocompleteLabelName(e,t){return this.prometheusClient?this.prometheusClient.labelNames(t.metricName).then(t=>e.concat(t.map(e=>({label:e,type:"constant"})))):e}autocompleteLabelValue(e,t){return this.prometheusClient&&t.labelName?this.prometheusClient.labelValues(t.labelName,t.metricName,t.matchers).then(t=>e.concat(t.map(e=>({label:e,type:"text"})))):e}}var M=a(54685),R=a.n(M);class A{constructor(e){this.lookbackInterval=432e5,this.httpMethod="POST",this.apiPrefix="/api/v1",this.fetchFn=(e,t)=>fetch(e,t),this.url=e.url?e.url:"",this.errorHandler=e.httpErrorHandler,e.lookbackInterval&&(this.lookbackInterval=e.lookbackInterval),e.fetchFn&&(this.fetchFn=e.fetchFn),e.httpMethod&&(this.httpMethod=e.httpMethod),e.apiPrefix&&(this.apiPrefix=e.apiPrefix)}labelNames(e){let t=new Date,a=new Date(t.getTime()-this.lookbackInterval);if(void 0===e||""===e){let e=this.buildRequest(this.labelsEndpoint(),new URLSearchParams({start:a.toISOString(),end:t.toISOString()}));return this.fetchAPI(e.uri,{method:this.httpMethod,body:e.body}).catch(e=>(this.errorHandler&&this.errorHandler(e),[]))}return this.series(e).then(e=>{let t=new Set;for(let a of e)for(let[e]of Object.entries(a))"__name__"!==e&&t.add(e);return Array.from(t)})}labelValues(e,t,a){let i=new Date,r=new Date(i.getTime()-this.lookbackInterval);if(!t||0===t.length){let t=new URLSearchParams({start:r.toISOString(),end:i.toISOString()});return this.fetchAPI(`${this.labelValuesEndpoint().replace(/:name/gi,e)}?${t}`).catch(e=>(this.errorHandler&&this.errorHandler(e),[]))}return this.series(t,a,e).then(t=>{let a=new Set;for(let i of t)for(let[t,r]of Object.entries(i))"__name__"!==t&&t===e&&a.add(r);return Array.from(a)})}metricMetadata(){return this.fetchAPI(this.metricMetadataEndpoint()).catch(e=>(this.errorHandler&&this.errorHandler(e),{}))}series(e,t,a){let i=new Date,r=new Date(i.getTime()-this.lookbackInterval),n=this.buildRequest(this.seriesEndpoint(),new URLSearchParams({start:r.toISOString(),end:i.toISOString(),"match[]":function(e,t,a){if(!t||0===t.length)return e;let i="";for(let e of t){if(e.name===a||""===e.value)continue;let t="";switch(e.type){case 136:default:t="=";break;case 49:t="!=";break;case 138:t="!~";break;case 137:t="=~"}let r=`${e.name}${t}"${e.value}"`;i=""===i?r:`${i},${r}`}return`${e}{${i}}`}(e,t,a)}));return this.fetchAPI(n.uri,{method:this.httpMethod,body:n.body}).catch(e=>(this.errorHandler&&this.errorHandler(e),[]))}metricNames(){return this.labelValues("__name__")}flags(){return this.fetchAPI(this.flagsEndpoint()).catch(e=>(this.errorHandler&&this.errorHandler(e),{}))}fetchAPI(e,t){return this.fetchFn(this.url+e,t).then(e=>{if(!e.ok&&![400,422,503].includes(e.status))throw Error(e.statusText);return e}).then(e=>e.json()).then(e=>{if("error"===e.status)throw Error(void 0!==e.error?e.error:'missing "error" field in response JSON');if(void 0===e.data)throw Error('missing "data" field in response JSON');return e.data})}buildRequest(e,t){let a=e,i=t;return"GET"===this.httpMethod&&(a=`${a}?${t}`,i=null),{uri:a,body:i}}labelsEndpoint(){return`${this.apiPrefix}/labels`}labelValuesEndpoint(){return`${this.apiPrefix}/label/:name/values`}seriesEndpoint(){return`${this.apiPrefix}/series`}metricMetadataEndpoint(){return`${this.apiPrefix}/metadata`}flagsEndpoint(){return`${this.apiPrefix}/status/flags`}}class V{constructor(e){let t=e&&e.maxAge?e.maxAge:3e5;this.completeAssociation=new(R())(t),this.metricMetadata={},this.labelValues=new(R())(t),this.labelNames=[],this.flags={},(null==e?void 0:e.initialMetricList)&&this.setLabelValues("__name__",e.initialMetricList)}setAssociations(e,t){t.forEach(t=>{let a=this.completeAssociation.get(e);for(let[i,r]of(a||(a=new Map,this.completeAssociation.set(e,a)),Object.entries(t))){if("__name__"===i)continue;let e=a.get(i);void 0===e?a.set(i,new Set([r])):e.add(r)}})}setFlags(e){this.flags=e}getFlags(){return this.flags}setMetricMetadata(e){this.metricMetadata=e}getMetricMetadata(){return this.metricMetadata}setLabelNames(e){this.labelNames=e}getLabelNames(e){if(!e||0===e.length)return this.labelNames;let t=this.completeAssociation.get(e);return t?Array.from(t.keys()):[]}setLabelValues(e,t){this.labelValues.set(e,t)}getLabelValues(e,t){if(!t||0===t.length)return this.labelValues.get(e)||[];let a=this.completeAssociation.get(t);if(a){let t=a.get(e);return t?Array.from(t):[]}return[]}}class Y{constructor(e,t){this.client=e,this.cache=new V(t)}labelNames(e){let t=this.cache.getLabelNames(e);return t&&t.length>0?Promise.resolve(t):void 0===e||""===e?this.client.labelNames().then(e=>(this.cache.setLabelNames(e),e)):this.series(e).then(()=>this.cache.getLabelNames(e))}labelValues(e,t){let a=this.cache.getLabelValues(e,t);return a&&a.length>0?Promise.resolve(a):void 0===t||""===t?this.client.labelValues(e).then(t=>(this.cache.setLabelValues(e,t),t)):this.series(t).then(()=>this.cache.getLabelValues(e,t))}metricMetadata(){let e=this.cache.getMetricMetadata();return e&&Object.keys(e).length>0?Promise.resolve(e):this.client.metricMetadata().then(e=>(this.cache.setMetricMetadata(e),e))}series(e){return this.client.series(e).then(t=>(this.cache.setAssociations(e,t),t))}metricNames(){return this.labelValues("__name__")}flags(){let e=this.cache.getFlags();return e&&Object.keys(e).length>0?Promise.resolve(e):this.client.flags().then(e=>(this.cache.setFlags(e),e))}}function N(e){if(null==e?void 0:e.completeStrategy)return e.completeStrategy;if(null==e?void 0:e.remote){var t;return"function"==typeof(t=e.remote).labelNames&&"function"==typeof t.labelValues&&"function"==typeof t.metricMetadata&&"function"==typeof t.series&&"function"==typeof t.metricNames?new q(e.remote,e.maxMetricsMetadata):new q(new Y(new A(e.remote),e.remote.cache),e.maxMetricsMetadata)}return new q}var L=a(68799);class F{promQL(){return e=>{let t=new T(e.state);return t.analyze(),t.getDiagnostics()}}}(o=u||(u={})).PromQL="PromQL",o.MetricName="MetricName";class z{constructor(){this.complete=N(),this.lint=new F,this.enableLinter=!0,this.enableCompletion=!0}setComplete(e){return this.complete=N(e),this}getComplete(){return this.complete}activateCompletion(e){return this.enableCompletion=e,this}setLinter(e){return this.lint=e,this}getLinter(){return this.lint}activateLinter(e){return this.enableLinter=e,this}asExtension(e=u.PromQL){var t,a;let i=x.qp.define({parser:$.configure({top:e}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}}),r=[i];if(this.enableCompletion){let e=i.data.of({autocomplete:e=>this.complete.promQL(e)});r=r.concat(e)}return this.enableLinter&&(r=r.concat((t=this.lint.promQL,a=this.lint,(0,L.ir)(t.call(a))))),r}}},54685:function(e,t,a){let i=a(94403),r=Symbol("max"),n=Symbol("length"),o=Symbol("lengthCalculator"),l=Symbol("allowStale"),s=Symbol("maxAge"),c=Symbol("dispose"),u=Symbol("noDisposeOnSet"),h=Symbol("lruList"),p=Symbol("cache"),O=Symbol("updateAgeOnGet"),d=()=>1,v=(e,t,a)=>{let i=e[p].get(t);if(i){let t=i.value;if(f(e,t)){if(g(e,i),!e[l])return}else a&&(e[O]&&(i.value.now=Date.now()),e[h].unshiftNode(i));return t.value}},f=(e,t)=>{if(!t||!t.maxAge&&!e[s])return!1;let a=Date.now()-t.now;return t.maxAge?a>t.maxAge:e[s]&&a>e[s]},m=e=>{if(e[n]>e[r])for(let t=e[h].tail;e[n]>e[r]&&null!==t;){let a=t.prev;g(e,t),t=a}},g=(e,t)=>{if(t){let a=t.value;e[c]&&e[c](a.key,a.value),e[n]-=a.length,e[p].delete(a.key),e[h].removeNode(t)}};class ${constructor(e,t,a,i,r){this.key=e,this.value=t,this.length=a,this.now=i,this.maxAge=r||0}}let y=(e,t,a,i)=>{let r=a.value;f(e,r)&&(g(e,a),e[l]||(r=void 0)),r&&t.call(i,r.value,r.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw TypeError("max must be a non-negative number");this[r]=e.max||1/0;let t=e.length||d;if(this[o]="function"!=typeof t?d:t,this[l]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw TypeError("maxAge must be a number");this[s]=e.maxAge||0,this[c]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[O]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw TypeError("max must be a non-negative number");this[r]=e||1/0,m(this)}get max(){return this[r]}set allowStale(e){this[l]=!!e}get allowStale(){return this[l]}set maxAge(e){if("number"!=typeof e)throw TypeError("maxAge must be a non-negative number");this[s]=e,m(this)}get maxAge(){return this[s]}set lengthCalculator(e){"function"!=typeof e&&(e=d),e!==this[o]&&(this[o]=e,this[n]=0,this[h].forEach(e=>{e.length=this[o](e.value,e.key),this[n]+=e.length})),m(this)}get lengthCalculator(){return this[o]}get length(){return this[n]}get itemCount(){return this[h].length}rforEach(e,t){t=t||this;for(let a=this[h].tail;null!==a;){let i=a.prev;y(this,e,a,t),a=i}}forEach(e,t){t=t||this;for(let a=this[h].head;null!==a;){let i=a.next;y(this,e,a,t),a=i}}keys(){return this[h].toArray().map(e=>e.key)}values(){return this[h].toArray().map(e=>e.value)}reset(){this[c]&&this[h]&&this[h].length&&this[h].forEach(e=>this[c](e.key,e.value)),this[p]=new Map,this[h]=new i,this[n]=0}dump(){return this[h].map(e=>!f(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[h]}set(e,t,a){if((a=a||this[s])&&"number"!=typeof a)throw TypeError("maxAge must be a number");let i=a?Date.now():0,l=this[o](t,e);if(this[p].has(e)){if(l>this[r])return g(this,this[p].get(e)),!1;let o=this[p].get(e).value;return this[c]&&!this[u]&&this[c](e,o.value),o.now=i,o.maxAge=a,o.value=t,this[n]+=l-o.length,o.length=l,this.get(e),m(this),!0}let O=new $(e,t,l,i,a);return O.length>this[r]?(this[c]&&this[c](e,t),!1):(this[n]+=O.length,this[h].unshift(O),this[p].set(e,this[h].head),m(this),!0)}has(e){return!!this[p].has(e)&&!f(this,this[p].get(e).value)}get(e){return v(this,e,!0)}peek(e){return v(this,e,!1)}pop(){let e=this[h].tail;return e?(g(this,e),e.value):null}del(e){g(this,this[p].get(e))}load(e){this.reset();let t=Date.now();for(let a=e.length-1;a>=0;a--){let i=e[a],r=i.e||0;if(0===r)this.set(i.k,i.v);else{let e=r-t;e>0&&this.set(i.k,i.v,e)}}}prune(){this[p].forEach((e,t)=>v(this,t,!1))}}},80663:function(e){e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},94403:function(e,t,a){function i(e){var t=this;if(t instanceof i||(t=new i),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach(function(e){t.push(e)});else if(arguments.length>0)for(var a=0,r=arguments.length;a<r;a++)t.push(arguments[a]);return t}function r(e,t,a,i){if(!(this instanceof r))return new r(e,t,a,i);this.list=i,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,a?(a.prev=this,this.next=a):this.next=null}e.exports=i,i.Node=r,i.create=i,i.prototype.removeNode=function(e){if(e.list!==this)throw Error("removing node which does not belong to this list");var t=e.next,a=e.prev;return t&&(t.prev=a),a&&(a.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=a),e.list.length--,e.next=null,e.prev=null,e.list=null,t},i.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},i.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},i.prototype.push=function(){for(var e,t,a=0,i=arguments.length;a<i;a++){e=this,t=arguments[a],e.tail=new r(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}return this.length},i.prototype.unshift=function(){for(var e,t,a=0,i=arguments.length;a<i;a++){e=this,t=arguments[a],e.head=new r(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}return this.length},i.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},i.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},i.prototype.forEach=function(e,t){t=t||this;for(var a=this.head,i=0;null!==a;i++)e.call(t,a.value,i,this),a=a.next},i.prototype.forEachReverse=function(e,t){t=t||this;for(var a=this.tail,i=this.length-1;null!==a;i--)e.call(t,a.value,i,this),a=a.prev},i.prototype.get=function(e){for(var t=0,a=this.head;null!==a&&t<e;t++)a=a.next;if(t===e&&null!==a)return a.value},i.prototype.getReverse=function(e){for(var t=0,a=this.tail;null!==a&&t<e;t++)a=a.prev;if(t===e&&null!==a)return a.value},i.prototype.map=function(e,t){t=t||this;for(var a=new i,r=this.head;null!==r;)a.push(e.call(t,r.value,this)),r=r.next;return a},i.prototype.mapReverse=function(e,t){t=t||this;for(var a=new i,r=this.tail;null!==r;)a.push(e.call(t,r.value,this)),r=r.prev;return a},i.prototype.reduce=function(e,t){var a,i=this.head;if(arguments.length>1)a=t;else if(this.head)i=this.head.next,a=this.head.value;else throw TypeError("Reduce of empty list with no initial value");for(var r=0;null!==i;r++)a=e(a,i.value,r),i=i.next;return a},i.prototype.reduceReverse=function(e,t){var a,i=this.tail;if(arguments.length>1)a=t;else if(this.tail)i=this.tail.prev,a=this.tail.value;else throw TypeError("Reduce of empty list with no initial value");for(var r=this.length-1;null!==i;r--)a=e(a,i.value,r),i=i.prev;return a},i.prototype.toArray=function(){for(var e=Array(this.length),t=0,a=this.head;null!==a;t++)e[t]=a.value,a=a.next;return e},i.prototype.toArrayReverse=function(){for(var e=Array(this.length),t=0,a=this.tail;null!==a;t++)e[t]=a.value,a=a.prev;return e},i.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var a=new i;if(t<e||t<0)return a;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=0,n=this.head;null!==n&&r<e;r++)n=n.next;for(;null!==n&&r<t;r++,n=n.next)a.push(n.value);return a},i.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var a=new i;if(t<e||t<0)return a;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=this.length,n=this.tail;null!==n&&r>t;r--)n=n.prev;for(;null!==n&&r>e;r--,n=n.prev)a.push(n.value);return a},i.prototype.splice=function(e,t,...a){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var i=0,n=this.head;null!==n&&i<e;i++)n=n.next;for(var o=[],i=0;n&&i<t;i++)o.push(n.value),n=this.removeNode(n);null===n&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(var i=0;i<a.length;i++)n=function(e,t,a){var i=t===e.head?new r(a,null,t,e):new r(a,t,t.next,e);return null===i.next&&(e.tail=i),null===i.prev&&(e.head=i),e.length++,i}(this,n,a[i]);return o},i.prototype.reverse=function(){for(var e=this.head,t=this.tail,a=e;null!==a;a=a.prev){var i=a.prev;a.prev=a.next,a.next=i}return this.head=t,this.tail=e,this};try{a(80663)(i)}catch(e){}},78277:function(e,t,a){t.default=void 0;var i,r=(i=a(30265))&&i.__esModule?i:{default:i};t.default=(0,r.default)("M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z","AlertCircle")},96402:function(e,t,a){t.default=void 0;var i,r=(i=a(30265))&&i.__esModule?i:{default:i};t.default=(0,r.default)("M3,3H9V7H3V3M15,10H21V14H15V10M15,17H21V21H15V17M13,13H7V18H13V20H7L5,20V9H7V11H13V13Z","FileTree")}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkPrometheus=self.webpackChunkPrometheus||[]).push([["5387"],{76439:function(e,t,n){n.d(t,{Z:()=>s});var r=n(54538),u=n(96858),i=n(49267),a=n(24105);let c={...r}.useSyncExternalStore;function l(e={}){let{themeId:t}=e;return function(e,n={}){let l=(0,a.Z)();l&&t&&(l=l[t]||l);let s="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:o=!1,matchMedia:d=s?window.matchMedia:null,ssrMatchMedia:h=null,noSsr:m=!1}=(0,i.Z)({name:"MuiUseMediaQuery",props:n,theme:l}),f="function"==typeof e?e(l):e;return(void 0!==c?function(e,t,n,u,i){let a=r.useCallback(()=>t,[t]),l=r.useMemo(()=>{if(i&&n)return()=>n(e).matches;if(null!==u){let{matches:t}=u(e);return()=>t}return a},[a,e,u,i,n]),[s,o]=r.useMemo(()=>{if(null===n)return[a,()=>()=>{}];let t=n(e);return[()=>t.matches,e=>(t.addEventListener("change",e),()=>{t.removeEventListener("change",e)})]},[a,n,e]);return c(o,s,l)}:function(e,t,n,i,a){let[c,l]=r.useState(()=>a&&n?n(e).matches:i?i(e).matches:t);return(0,u.Z)(()=>{if(!n)return;let t=n(e),r=()=>{l(t.matches)};return r(),t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}},[e,n]),c})(f=f.replace(/^@media( ?)/m,""),o,d,h,m)}}l();let s=l({themeId:n(92994).Z})},56050:function(){}}]);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkPrometheus=self.webpackChunkPrometheus||[]).push([["5654"],{11774:function(e,t,r){r.d(t,{Z:()=>U});var o,n,a=r(54538),i=r(90496),l=r(82267),s=r(16838),p=r(57174),d=r(75651),u=r(12709),c=r(82319),g=r(51751),h=r(51640),f=r(44124),m=r(6749);function b(e){return(0,m.ZP)("MuiListSubheader",e)}(0,f.Z)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);var v=r(24246);let y=e=>{let{classes:t,color:r,disableGutters:o,inset:n,disableSticky:a}=e,i={root:["root","default"!==r&&`color${(0,h.Z)(r)}`,!o&&"gutters",n&&"inset",!a&&"sticky"]};return(0,l.Z)(i,b,t)},x=(0,u.ZP)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,"default"!==r.color&&t[`color${(0,h.Z)(r.color)}`],!r.disableGutters&&t.gutters,r.inset&&t.inset,!r.disableSticky&&t.sticky]}})((0,c.Z)(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:72}},{props:({ownerState:e})=>!e.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),Z=a.forwardRef(function(e,t){let r=(0,g.i)({props:e,name:"MuiListSubheader"}),{className:o,color:n="default",component:a="li",disableGutters:l=!1,disableSticky:s=!1,inset:p=!1,...d}=r,u={...r,color:n,component:a,disableGutters:l,disableSticky:s,inset:p},c=y(u);return(0,v.jsx)(x,{as:a,className:(0,i.Z)(c.root,o),ref:t,ownerState:u,...d})});Z&&(Z.muiSkipListHighlight=!0);var $=r(28866),k=r(75094),C=r(52889),P=r(28678),S=r(3597),R=r(8782),w=r(6499),I=r(23049),A=r(97686);function M(e){return(0,m.ZP)("MuiAutocomplete",e)}let O=(0,f.Z)("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var z=r(16351);let L=e=>{let{classes:t,disablePortal:r,expanded:o,focused:n,fullWidth:a,hasClearIcon:i,hasPopupIcon:s,inputFocused:p,popupOpen:d,size:u}=e,c={root:["root",o&&"expanded",n&&"focused",a&&"fullWidth",i&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",p&&"inputFocused"],tag:["tag",`tagSize${(0,h.Z)(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",d&&"popupIndicatorOpen"],popper:["popper",r&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return(0,l.Z)(c,M,t)},T=(0,u.ZP)("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e,{fullWidth:o,hasClearIcon:n,hasPopupIcon:a,inputFocused:i,size:l}=r;return[{[`& .${O.tag}`]:t.tag},{[`& .${O.tag}`]:t[`tagSize${(0,h.Z)(l)}`]},{[`& .${O.inputRoot}`]:t.inputRoot},{[`& .${O.input}`]:t.input},{[`& .${O.input}`]:i&&t.inputFocused},t.root,o&&t.fullWidth,a&&t.hasPopupIcon,n&&t.hasClearIcon]}})({[`&.${O.focused} .${O.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${O.clearIndicator}`]:{visibility:"visible"}},[`& .${O.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${O.inputRoot}`]:{[`.${O.hasPopupIcon}&, .${O.hasClearIcon}&`]:{paddingRight:30},[`.${O.hasPopupIcon}.${O.hasClearIcon}&`]:{paddingRight:56},[`& .${O.input}`]:{width:0,minWidth:30}},[`& .${P.Z.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${P.Z.root}.${S.Z.sizeSmall}`]:{[`& .${P.Z.input}`]:{padding:"2px 4px 3px 0"}},[`& .${R.Z.root}`]:{padding:9,[`.${O.hasPopupIcon}&, .${O.hasClearIcon}&`]:{paddingRight:39},[`.${O.hasPopupIcon}.${O.hasClearIcon}&`]:{paddingRight:65},[`& .${O.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${O.endAdornment}`]:{right:9}},[`& .${R.Z.root}.${S.Z.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${O.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${w.Z.root}`]:{paddingTop:19,paddingLeft:8,[`.${O.hasPopupIcon}&, .${O.hasClearIcon}&`]:{paddingRight:39},[`.${O.hasPopupIcon}.${O.hasClearIcon}&`]:{paddingRight:65},[`& .${w.Z.input}`]:{padding:"7px 4px"},[`& .${O.endAdornment}`]:{right:9}},[`& .${w.Z.root}.${S.Z.sizeSmall}`]:{paddingBottom:1,[`& .${w.Z.input}`]:{padding:"2.5px 4px"}},[`& .${S.Z.hiddenLabel}`]:{paddingTop:8},[`& .${w.Z.root}.${S.Z.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${O.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${w.Z.root}.${S.Z.hiddenLabel}.${S.Z.sizeSmall}`]:{[`& .${O.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${O.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${O.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${O.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${O.inputRoot}`]:{flexWrap:"wrap"}}}]}),j=(0,u.ZP)("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),D=(0,u.ZP)(k.Z,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),N=(0,u.ZP)(k.Z,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.popupIndicator,r.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),H=(0,u.ZP)(d.Z,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[{[`& .${O.option}`]:t.option},t.popper,r.disablePortal&&t.popperDisablePortal]}})((0,c.Z)(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),F=(0,u.ZP)($.Z,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})((0,c.Z)(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),W=(0,u.ZP)("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})((0,c.Z)(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),B=(0,u.ZP)("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})((0,c.Z)(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),E=(0,u.ZP)("ul",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})((0,c.Z)(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${O.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${O.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${O.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,s.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${O.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,s.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${O.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,s.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}}))),q=(0,u.ZP)(Z,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})((0,c.Z)(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),V=(0,u.ZP)("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${O.option}`]:{paddingLeft:24}}),U=a.forwardRef(function(e,t){let r;let l=(0,g.i)({props:e,name:"MuiAutocomplete"}),{autoComplete:s=!1,autoHighlight:u=!1,autoSelect:c=!1,blurOnSelect:h=!1,ChipProps:f,className:m,clearIcon:b=o||(o=(0,v.jsx)(I.Z,{fontSize:"small"})),clearOnBlur:y=!l.freeSolo,clearOnEscape:x=!1,clearText:Z="Clear",closeText:k="Close",componentsProps:P,defaultValue:S=l.multiple?[]:null,disableClearable:R=!1,disableCloseOnSelect:w=!1,disabled:M=!1,disabledItemsFocusable:O=!1,disableListWrap:U=!1,disablePortal:G=!1,filterOptions:K,filterSelectedOptions:X=!1,forcePopupIcon:J="auto",freeSolo:_=!1,fullWidth:Q=!1,getLimitTagsText:Y=e=>`+${e}`,getOptionDisabled:ee,getOptionKey:et,getOptionLabel:er,isOptionEqualToValue:eo,groupBy:en,handleHomeEndKeys:ea=!l.freeSolo,id:ei,includeInputInList:el=!1,inputValue:es,limitTags:ep=-1,ListboxComponent:ed,ListboxProps:eu,loading:ec=!1,loadingText:eg="Loading…",multiple:eh=!1,noOptionsText:ef="No options",onChange:em,onClose:eb,onHighlightChange:ev,onInputChange:ey,onOpen:ex,open:eZ,openOnFocus:e$=!1,openText:ek="Open",options:eC,PaperComponent:eP,PopperComponent:eS,popupIcon:eR=n||(n=(0,v.jsx)(A.Z,{})),readOnly:ew=!1,renderGroup:eI,renderInput:eA,renderOption:eM,renderTags:eO,selectOnFocus:ez=!l.freeSolo,size:eL="medium",slots:eT={},slotProps:ej={},value:eD,...eN}=l,{getRootProps:eH,getInputProps:eF,getInputLabelProps:eW,getPopupIndicatorProps:eB,getClearProps:eE,getTagProps:eq,getListboxProps:eV,getOptionProps:eU,value:eG,dirty:eK,expanded:eX,id:eJ,popupOpen:e_,focused:eQ,focusedTag:eY,anchorEl:e0,setAnchorEl:e1,inputValue:e2,groupedOptions:e4}=(0,p.Z)({...l,componentName:"Autocomplete"}),e5=!R&&!M&&eK&&!ew,e6=(!_||!0===J)&&!1!==J,{onMouseDown:e9}=eF(),{ref:e8,...e7}=eV(),e3=er||(e=>e.label??e),te={...l,disablePortal:G,expanded:eX,focused:eQ,fullWidth:Q,getOptionLabel:e3,hasClearIcon:e5,hasPopupIcon:e6,inputFocused:-1===eY,popupOpen:e_,size:eL},tt=L(te),tr={slots:{paper:eP,popper:eS,...eT},slotProps:{chip:f,listbox:eu,...P,...ej}},[to,tn]=(0,z.Z)("listbox",{elementType:E,externalForwardedProps:tr,ownerState:te,className:tt.listbox,additionalProps:e7,ref:e8}),[ta,ti]=(0,z.Z)("paper",{elementType:$.Z,externalForwardedProps:tr,ownerState:te,className:tt.paper}),[tl,ts]=(0,z.Z)("popper",{elementType:d.Z,externalForwardedProps:tr,ownerState:te,className:tt.popper,additionalProps:{disablePortal:G,style:{width:e0?e0.clientWidth:null},role:"presentation",anchorEl:e0,open:e_}});if(eh&&eG.length>0){let e=e=>({className:tt.tag,disabled:M,...eq(e)});r=eO?eO(eG,e,te):eG.map((t,r)=>{let{key:o,...n}=e({index:r});return(0,v.jsx)(C.Z,{label:e3(t),size:eL,...n,...tr.slotProps.chip},o)})}if(ep>-1&&Array.isArray(r)){let e=r.length-ep;!eQ&&e>0&&(r=r.splice(0,ep)).push((0,v.jsx)("span",{className:tt.tag,children:Y(e)},r.length))}let tp=eI||(e=>(0,v.jsxs)("li",{children:[(0,v.jsx)(q,{className:tt.groupLabel,ownerState:te,component:"div",children:e.group}),(0,v.jsx)(V,{className:tt.groupUl,ownerState:te,children:e.children})]},e.key)),td=eM||((e,t)=>{let{key:r,...o}=e;return(0,v.jsx)("li",{...o,children:e3(t)},r)}),tu=(e,t)=>{let r=eU({option:e,index:t});return td({...r,className:tt.option},e,{selected:r["aria-selected"],index:t,inputValue:e2},te)},tc=tr.slotProps.clearIndicator,tg=tr.slotProps.popupIndicator;return(0,v.jsxs)(a.Fragment,{children:[(0,v.jsx)(T,{ref:t,className:(0,i.Z)(tt.root,m),ownerState:te,...eH(eN),children:eA({id:eJ,disabled:M,fullWidth:!0,size:"small"===eL?"small":void 0,InputLabelProps:eW(),InputProps:{ref:e1,className:tt.inputRoot,startAdornment:r,onMouseDown:e=>{e.target===e.currentTarget&&e9(e)},...(e5||e6)&&{endAdornment:(0,v.jsxs)(j,{className:tt.endAdornment,ownerState:te,children:[e5?(0,v.jsx)(D,{...eE(),"aria-label":Z,title:Z,ownerState:te,...tc,className:(0,i.Z)(tt.clearIndicator,tc?.className),children:b}):null,e6?(0,v.jsx)(N,{...eB(),disabled:M,"aria-label":e_?k:ek,title:e_?k:ek,ownerState:te,...tg,className:(0,i.Z)(tt.popupIndicator,tg?.className),children:eR}):null]})}},inputProps:{className:tt.input,disabled:M,readOnly:ew,...eF()}})}),e0?(0,v.jsx)(H,{as:tl,...ts,children:(0,v.jsxs)(F,{as:ta,...ti,children:[ec&&0===e4.length?(0,v.jsx)(W,{className:tt.loading,ownerState:te,children:eg}):null,0!==e4.length||_||ec?null:(0,v.jsx)(B,{className:tt.noOptions,ownerState:te,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:ef}),e4.length>0?(0,v.jsx)(to,{as:ed,...tn,children:e4.map((e,t)=>en?tp({key:e.key,group:e.group,children:e.options.map((t,r)=>tu(t,e.index+r))}):tu(e,t))}):null]})}):null]})})},82707:function(e,t,r){r.d(t,{Z:()=>A});var o=r(54538),n=r(90496),a=r(82267),i=r(16838),l=r(99140),s=r(90247),p=r(24246);let d=(0,s.Z)((0,p.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),u=(0,s.Z)((0,p.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),c=(0,s.Z)((0,p.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");var g=r(51640),h=r(73037),f=r(44124),m=r(6749);function b(e){return(0,m.ZP)("MuiCheckbox",e)}let v=(0,f.Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);var y=r(12709),x=r(82319),Z=r(90433),$=r(51751),k=r(27834),C=r(16351);let P=e=>{let{classes:t,indeterminate:r,color:o,size:n}=e,i={root:["root",r&&"indeterminate",`color${(0,g.Z)(o)}`,`size${(0,g.Z)(n)}`]},l=(0,a.Z)(i,b,t);return{...t,...l}},S=(0,y.ZP)(l.Z,{shouldForwardProp:e=>(0,h.Z)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${(0,g.Z)(r.size)}`],"default"!==r.color&&t[`color${(0,g.Z)(r.color)}`]]}})((0,x.Z)(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,i.Fq)(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter((0,Z.Z)()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,i.Fq)(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter((0,Z.Z)()).map(([t])=>({props:{color:t},style:{[`&.${v.checked}, &.${v.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${v.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),R=(0,p.jsx)(u,{}),w=(0,p.jsx)(d,{}),I=(0,p.jsx)(c,{}),A=o.forwardRef(function(e,t){let r=(0,$.i)({props:e,name:"MuiCheckbox"}),{checkedIcon:a=R,color:i="primary",icon:l=w,indeterminate:s=!1,indeterminateIcon:d=I,inputProps:u,size:c="medium",disableRipple:g=!1,className:h,slots:f={},slotProps:m={},...b}=r,v=s?d:l,y=s?d:a,x={...r,disableRipple:g,color:i,indeterminate:s,size:c},Z=P(x),A=m.input??u,[M,O]=(0,C.Z)("root",{ref:t,elementType:S,className:(0,n.Z)(Z.root,h),shouldForwardComponentProp:!0,externalForwardedProps:{slots:f,slotProps:m,...b},ownerState:x,additionalProps:{type:"checkbox",icon:o.cloneElement(v,{fontSize:v.props.fontSize??c}),checkedIcon:o.cloneElement(y,{fontSize:y.props.fontSize??c}),disableRipple:g,slots:f,slotProps:{input:(0,k.Z)("function"==typeof A?A(x):A,{"data-indeterminate":s})}}});return(0,p.jsx)(M,{...O,classes:Z})})},66224:function(e,t,r){r.d(t,{Z:()=>Z});var o=r(54538),n=r(90496),a=r(82267),i=r(16838),l=r(72116),s=r(12709),p=r(82319),d=r(51751),u=r(44124),c=r(6749);function g(e){return(0,c.ZP)("MuiSkeleton",e)}(0,u.Z)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var h=r(24246);let f=e=>{let{classes:t,variant:r,animation:o,hasChildren:n,width:i,height:l}=e;return(0,a.Z)({root:["root",r,o,n&&"withChildren",n&&!i&&"fitContent",n&&!l&&"heightAuto"]},g,t)},m=(0,l.keyframes)`
|
|
2
|
+
0% {
|
|
3
|
+
opacity: 1;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
50% {
|
|
7
|
+
opacity: 0.4;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
100% {
|
|
11
|
+
opacity: 1;
|
|
12
|
+
}
|
|
13
|
+
`,b=(0,l.keyframes)`
|
|
14
|
+
0% {
|
|
15
|
+
transform: translateX(-100%);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
50% {
|
|
19
|
+
/* +0.5s of delay between each loop */
|
|
20
|
+
transform: translateX(100%);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
100% {
|
|
24
|
+
transform: translateX(100%);
|
|
25
|
+
}
|
|
26
|
+
`,v="string"!=typeof m?(0,l.css)`
|
|
27
|
+
animation: ${m} 2s ease-in-out 0.5s infinite;
|
|
28
|
+
`:null,y="string"!=typeof b?(0,l.css)`
|
|
29
|
+
&::after {
|
|
30
|
+
animation: ${b} 2s linear 0.5s infinite;
|
|
31
|
+
}
|
|
32
|
+
`:null,x=(0,s.ZP)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],!1!==r.animation&&t[r.animation],r.hasChildren&&t.withChildren,r.hasChildren&&!r.width&&t.fitContent,r.hasChildren&&!r.height&&t.heightAuto]}})((0,p.Z)(({theme:e})=>{let t=String(e.shape.borderRadius).match(/[\d.\-+]*\s*(.*)/)[1]||"px",r=parseFloat(e.shape.borderRadius);return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:(0,i.Fq)(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${r}${t}/${Math.round(r/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:e})=>e.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:e})=>e.hasChildren&&!e.width,style:{maxWidth:"fit-content"}},{props:({ownerState:e})=>e.hasChildren&&!e.height,style:{height:"auto"}},{props:{animation:"pulse"},style:v||{animation:`${m} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient(
|
|
33
|
+
90deg,
|
|
34
|
+
transparent,
|
|
35
|
+
${(e.vars||e).palette.action.hover},
|
|
36
|
+
transparent
|
|
37
|
+
)`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:y||{"&::after":{animation:`${b} 2s linear 0.5s infinite`}}}]}})),Z=o.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiSkeleton"}),{animation:o="pulse",className:a,component:i="span",height:l,style:s,variant:p="text",width:u,...c}=r,g={...r,animation:o,component:i,variant:p,hasChildren:!!c.children},m=f(g);return(0,h.jsx)(x,{as:i,ref:t,className:(0,n.Z)(m.root,a),ownerState:g,...c,style:{width:u,height:l,...s}})})},72679:function(e,t,r){r.d(t,{Z:()=>o});let o=r(54538).createContext()},32641:function(e,t,r){r.d(t,{Z:()=>o});let o=r(54538).createContext()},96205:function(e,t,r){r.d(t,{Z:()=>x});var o=r(54538),n=r(90496),a=r(82267),i=r(16838),l=r(51640),s=r(72679),p=r(32641),d=r(12709),u=r(82319),c=r(51751),g=r(44124),h=r(6749);function f(e){return(0,h.ZP)("MuiTableCell",e)}let m=(0,g.Z)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]);var b=r(24246);let v=e=>{let{classes:t,variant:r,align:o,padding:n,size:i,stickyHeader:s}=e,p={root:["root",r,s&&"stickyHeader","inherit"!==o&&`align${(0,l.Z)(o)}`,"normal"!==n&&`padding${(0,l.Z)(n)}`,`size${(0,l.Z)(i)}`]};return(0,a.Z)(p,f,t)},y=(0,d.ZP)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],t[`size${(0,l.Z)(r.size)}`],"normal"!==r.padding&&t[`padding${(0,l.Z)(r.padding)}`],"inherit"!==r.align&&t[`align${(0,l.Z)(r.align)}`],r.stickyHeader&&t.stickyHeader]}})((0,u.Z)(({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
|
|
38
|
+
${"light"===e.palette.mode?(0,i.$n)((0,i.Fq)(e.palette.divider,1),.88):(0,i._j)((0,i.Fq)(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${m.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:e})=>e.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),x=o.forwardRef(function(e,t){let r;let a=(0,c.i)({props:e,name:"MuiTableCell"}),{align:i="inherit",className:l,component:d,padding:u,scope:g,size:h,sortDirection:f,variant:m,...x}=a,Z=o.useContext(s.Z),$=o.useContext(p.Z),k=$&&"head"===$.variant,C=g;"td"===(r=d||(k?"th":"td"))?C=void 0:!C&&k&&(C="col");let P=m||$&&$.variant,S={...a,align:i,component:r,padding:u||(Z&&Z.padding?Z.padding:"normal"),size:h||(Z&&Z.size?Z.size:"medium"),sortDirection:f,stickyHeader:"head"===P&&Z&&Z.stickyHeader,variant:P},R=v(S),w=null;return f&&(w="asc"===f?"ascending":"descending"),(0,b.jsx)(y,{as:r,ref:t,className:(0,n.Z)(R.root,l),"aria-sort":w,scope:C,ownerState:S,...x})})},57174:function(e,t,r){r.d(t,{D:()=>d,Z:()=>f});var o=r(54538),n=r(5056),a=r(9831);let i=e=>{let t=o.useRef({});return o.useEffect(()=>{t.current=e}),t.current};var l=r(81925),s=r(85817);function p(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function d(e={}){let{ignoreAccents:t=!0,ignoreCase:r=!0,limit:o,matchFrom:n="any",stringify:a,trim:i=!1}=e;return(e,{inputValue:l,getOptionLabel:s})=>{let d=i?l.trim():l;r&&(d=d.toLowerCase()),t&&(d=p(d));let u=d?e.filter(e=>{let o=(a||s)(e);return r&&(o=o.toLowerCase()),t&&(o=p(o)),"start"===n?o.startsWith(d):o.includes(d)}):e;return"number"==typeof o?u.slice(0,o):u}}let u=d(),c=e=>null!==e.current&&e.current.parentElement?.contains(document.activeElement),g=[];function h(e,t,r){if(t||null==e)return"";let o=r(e);return"string"==typeof o?o:""}let f=function(e){let{unstable_isActiveElementInListbox:t=c,unstable_classNamePrefix:r="Mui",autoComplete:p=!1,autoHighlight:d=!1,autoSelect:f=!1,blurOnSelect:m=!1,clearOnBlur:b=!e.freeSolo,clearOnEscape:v=!1,componentName:y="useAutocomplete",defaultValue:x=e.multiple?g:null,disableClearable:Z=!1,disableCloseOnSelect:$=!1,disabled:k,disabledItemsFocusable:C=!1,disableListWrap:P=!1,filterOptions:S=u,filterSelectedOptions:R=!1,freeSolo:w=!1,getOptionDisabled:I,getOptionKey:A,getOptionLabel:M=e=>e.label??e,groupBy:O,handleHomeEndKeys:z=!e.freeSolo,id:L,includeInputInList:T=!1,inputValue:j,isOptionEqualToValue:D=(e,t)=>e===t,multiple:N=!1,onChange:H,onClose:F,onHighlightChange:W,onInputChange:B,onOpen:E,open:q,openOnFocus:V=!1,options:U,readOnly:G=!1,selectOnFocus:K=!e.freeSolo,value:X}=e,J=(0,n.Z)(L),_=M;_=e=>{let t=M(e);return"string"!=typeof t?String(t):t};let Q=o.useRef(!1),Y=o.useRef(!0),ee=o.useRef(null),et=o.useRef(null),[er,eo]=o.useState(null),[en,ea]=o.useState(-1),ei=d?0:-1,el=o.useRef(ei),es=o.useRef(h(x,N,_)).current,[ep,ed]=(0,a.Z)({controlled:X,default:x,name:y}),[eu,ec]=(0,a.Z)({controlled:j,default:es,name:y,state:"inputValue"}),[eg,eh]=o.useState(!1),ef=o.useCallback((e,t,r)=>{if(!(N?ep.length<t.length:null!==t)&&!b)return;let o=h(t,N,_);eu!==o&&(ec(o),B&&B(e,o,r))},[_,eu,N,B,ec,b,ep]),[em,eb]=(0,a.Z)({controlled:q,default:!1,name:y,state:"open"}),[ev,ey]=o.useState(!0),ex=!N&&null!=ep&&eu===_(ep),eZ=em&&!G,e$=eZ?S(U.filter(e=>!(R&&(N?ep:[ep]).some(t=>null!==t&&D(e,t)))),{inputValue:ex&&ev?"":eu,getOptionLabel:_}):[],ek=i({filteredOptions:e$,value:ep,inputValue:eu});o.useEffect(()=>{let e=ep!==ek.value;(!eg||e)&&(!w||e)&&ef(null,ep,"reset")},[ep,ef,eg,ek.value,w]);let eC=em&&e$.length>0&&!G,eP=(0,l.Z)(e=>{-1===e?ee.current.focus():er.querySelector(`[data-tag-index="${e}"]`).focus()});o.useEffect(()=>{N&&en>ep.length-1&&(ea(-1),eP(-1))},[ep,N,en,eP]);let eS=(0,l.Z)(({event:e,index:t,reason:o="auto"})=>{if(el.current=t,-1===t?ee.current.removeAttribute("aria-activedescendant"):ee.current.setAttribute("aria-activedescendant",`${J}-option-${t}`),W&&W(e,-1===t?null:e$[t],o),!et.current)return;let n=et.current.querySelector(`[role="option"].${r}-focused`);n&&(n.classList.remove(`${r}-focused`),n.classList.remove(`${r}-focusVisible`));let a=et.current;if("listbox"!==et.current.getAttribute("role")&&(a=et.current.parentElement.querySelector('[role="listbox"]')),!a)return;if(-1===t){a.scrollTop=0;return}let i=et.current.querySelector(`[data-option-index="${t}"]`);if(i&&(i.classList.add(`${r}-focused`),"keyboard"===o&&i.classList.add(`${r}-focusVisible`),a.scrollHeight>a.clientHeight&&"mouse"!==o&&"touch"!==o)){let e=a.clientHeight+a.scrollTop,t=i.offsetTop+i.offsetHeight;t>e?a.scrollTop=t-a.clientHeight:i.offsetTop-i.offsetHeight*(1.3*!!O)<a.scrollTop&&(a.scrollTop=i.offsetTop-i.offsetHeight*(1.3*!!O))}}),eR=(0,l.Z)(({event:e,diff:t,direction:r="next",reason:o="auto"})=>{if(!eZ)return;let n=function(e,t){if(!et.current||e<0||e>=e$.length)return -1;let r=e;for(;;){let o=et.current.querySelector(`[data-option-index="${r}"]`),n=!C&&(!o||o.disabled||"true"===o.getAttribute("aria-disabled"));if(o&&o.hasAttribute("tabindex")&&!n)return r;if((r="next"===t?(r+1)%e$.length:(r-1+e$.length)%e$.length)===e)return -1}}((()=>{let e=e$.length-1;if("reset"===t)return ei;if("start"===t)return 0;if("end"===t)return e;let r=el.current+t;return r<0?-1===r&&T?-1:P&&-1!==el.current||Math.abs(t)>1?0:e:r>e?r===e+1&&T?-1:P||Math.abs(t)>1?e:0:r})(),r);if(eS({index:n,reason:o,event:e}),p&&"reset"!==t){if(-1===n)ee.current.value=eu;else{let e=_(e$[n]);ee.current.value=e,0===e.toLowerCase().indexOf(eu.toLowerCase())&&eu.length>0&&ee.current.setSelectionRange(eu.length,e.length)}}}),ew=()=>{var e,t;if(-1!==el.current&&ek.filteredOptions&&ek.filteredOptions.length!==e$.length&&ek.inputValue===eu&&(N?ep.length===ek.value.length&&ek.value.every((e,t)=>_(ep[t])===_(e)):(e=ek.value,t=ep,(e?_(e):"")===(t?_(t):"")))){let e=ek.filteredOptions[el.current];if(e)return e$.findIndex(t=>_(t)===_(e))}return -1},eI=o.useCallback(()=>{if(!eZ)return;let e=ew();if(-1!==e){el.current=e;return}let t=N?ep[0]:ep;if(0===e$.length||null==t){eR({diff:"reset"});return}if(et.current){if(null!=t){let e=e$[el.current];if(N&&e&&-1!==ep.findIndex(t=>D(e,t)))return;let r=e$.findIndex(e=>D(e,t));-1===r?eR({diff:"reset"}):eS({index:r});return}if(el.current>=e$.length-1){eS({index:e$.length-1});return}eS({index:el.current})}},[e$.length,!N&&ep,R,eR,eS,eZ,eu,N]),eA=(0,l.Z)(e=>{(0,s.Z)(et,e),e&&eI()});o.useEffect(()=>{eI()},[eI]);let eM=e=>{!em&&(eb(!0),ey(!0),E&&E(e))},eO=(e,t)=>{em&&(eb(!1),F&&F(e,t))},ez=(e,t,r,o)=>{if(N){if(ep.length===t.length&&ep.every((e,r)=>e===t[r]))return}else if(ep===t)return;H&&H(e,t,r,o),ed(t)},eL=o.useRef(!1),eT=(e,t,r="selectOption",o="options")=>{let n=r,a=t;if(N){let e=(a=Array.isArray(ep)?ep.slice():[]).findIndex(e=>D(t,e));-1===e?a.push(t):"freeSolo"!==o&&(a.splice(e,1),n="removeOption")}ef(e,a,n),ez(e,a,n,{option:t}),$||e&&(e.ctrlKey||e.metaKey)||eO(e,n),(!0===m||"touch"===m&&eL.current||"mouse"===m&&!eL.current)&&ee.current.blur()},ej=(e,t)=>{if(!N)return;""===eu&&eO(e,"toggleInput");let r=en;-1===en?""===eu&&"previous"===t&&(r=ep.length-1):((r+="next"===t?1:-1)<0&&(r=0),r===ep.length&&(r=-1)),ea(r=function(e,t){if(-1===e)return -1;let r=e;for(;;){if("next"===t&&r===ep.length||"previous"===t&&-1===r)return -1;let e=er.querySelector(`[data-tag-index="${r}"]`);if(e&&e.hasAttribute("tabindex")&&!e.disabled&&"true"!==e.getAttribute("aria-disabled"))return r;r+="next"===t?1:-1}}(r,t)),eP(r)},eD=e=>{Q.current=!0,ec(""),B&&B(e,"","clear"),ez(e,N?[]:null,"clear")},eN=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1===en||["ArrowLeft","ArrowRight"].includes(t.key)||(ea(-1),eP(-1)),229!==t.which))switch(t.key){case"Home":eZ&&z&&(t.preventDefault(),eR({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":eZ&&z&&(t.preventDefault(),eR({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),eR({diff:-5,direction:"previous",reason:"keyboard",event:t}),eM(t);break;case"PageDown":t.preventDefault(),eR({diff:5,direction:"next",reason:"keyboard",event:t}),eM(t);break;case"ArrowDown":t.preventDefault(),eR({diff:1,direction:"next",reason:"keyboard",event:t}),eM(t);break;case"ArrowUp":t.preventDefault(),eR({diff:-1,direction:"previous",reason:"keyboard",event:t}),eM(t);break;case"ArrowLeft":ej(t,"previous");break;case"ArrowRight":ej(t,"next");break;case"Enter":if(-1!==el.current&&eZ){let e=e$[el.current],r=!!I&&I(e);if(t.preventDefault(),r)return;eT(t,e,"selectOption"),p&&ee.current.setSelectionRange(ee.current.value.length,ee.current.value.length)}else w&&""!==eu&&!1===ex&&(N&&t.preventDefault(),eT(t,eu,"createOption","freeSolo"));break;case"Escape":eZ?(t.preventDefault(),t.stopPropagation(),eO(t,"escape")):v&&(""!==eu||N&&ep.length>0)&&(t.preventDefault(),t.stopPropagation(),eD(t));break;case"Backspace":if(N&&!G&&""===eu&&ep.length>0){let e=-1===en?ep.length-1:en,r=ep.slice();r.splice(e,1),ez(t,r,"removeOption",{option:ep[e]})}break;case"Delete":if(N&&!G&&""===eu&&ep.length>0&&-1!==en){let e=ep.slice();e.splice(en,1),ez(t,e,"removeOption",{option:ep[en]})}}},eH=e=>{eh(!0),V&&!Q.current&&eM(e)},eF=e=>{if(t(et)){ee.current.focus();return}eh(!1),Y.current=!0,Q.current=!1,f&&-1!==el.current&&eZ?eT(e,e$[el.current],"blur"):f&&w&&""!==eu?eT(e,eu,"blur","freeSolo"):b&&ef(e,ep,"blur"),eO(e,"blur")},eW=e=>{let t=e.target.value;eu!==t&&(ec(t),ey(!1),B&&B(e,t,"input")),""===t?Z||N||ez(e,null,"clear"):eM(e)},eB=e=>{let t=Number(e.currentTarget.getAttribute("data-option-index"));el.current!==t&&eS({event:e,index:t,reason:"mouse"})},eE=e=>{eS({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),eL.current=!0},eq=e=>{let t=Number(e.currentTarget.getAttribute("data-option-index"));eT(e,e$[t],"selectOption"),eL.current=!1},eV=e=>t=>{let r=ep.slice();r.splice(e,1),ez(t,r,"removeOption",{option:ep[e]})},eU=e=>{em?eO(e,"toggleInput"):eM(e)},eG=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==J&&e.preventDefault()},eK=e=>{e.currentTarget.contains(e.target)&&(ee.current.focus(),K&&Y.current&&ee.current.selectionEnd-ee.current.selectionStart==0&&ee.current.select(),Y.current=!1)},eX=e=>{k||""!==eu&&em||eU(e)},eJ=w&&eu.length>0;eJ=eJ||(N?ep.length>0:null!==ep);let e_=e$;return O&&(e_=e$.reduce((e,t,r)=>{let o=O(t);return e.length>0&&e[e.length-1].group===o?e[e.length-1].options.push(t):e.push({key:r,index:r,group:o,options:[t]}),e},[])),k&&eg&&eF(),{getRootProps:(e={})=>({...e,onKeyDown:eN(e),onMouseDown:eG,onClick:eK}),getInputLabelProps:()=>({id:`${J}-label`,htmlFor:J}),getInputProps:()=>({id:J,value:eu,onBlur:eF,onFocus:eH,onChange:eW,onMouseDown:eX,"aria-activedescendant":eZ?"":null,"aria-autocomplete":p?"both":"list","aria-controls":eC?`${J}-listbox`:void 0,"aria-expanded":eC,autoComplete:"off",ref:ee,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:k}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:eD}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:eU}),getTagProps:({index:e})=>({key:e,"data-tag-index":e,tabIndex:-1,...!G&&{onDelete:eV(e)}}),getListboxProps:()=>({role:"listbox",id:`${J}-listbox`,"aria-labelledby":`${J}-label`,ref:eA,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:({index:e,option:t})=>{let r=(N?ep:[ep]).some(e=>null!=e&&D(t,e)),o=!!I&&I(t);return{key:A?.(t)??_(t),tabIndex:-1,role:"option",id:`${J}-option-${e}`,onMouseMove:eB,onClick:eq,onTouchStart:eE,"data-option-index":e,"aria-disabled":o,"aria-selected":r}},id:J,inputValue:eu,value:ep,dirty:eJ,expanded:eZ&&er,popupOpen:eZ,focused:eg||-1!==en,anchorEl:er,setAnchorEl:eo,focusedTag:en,groupedOptions:e_}}}}]);
|