From 50487823ab89c9da58df40d279fa5f961f4ee78f Mon Sep 17 00:00:00 2001 From: f41gh7 Date: Mon, 21 Oct 2024 23:42:30 +0200 Subject: [PATCH 01/90] deployment: bump VM to v1.105.0 Signed-off-by: f41gh7 --- deployment/docker/docker-compose-cluster.yml | 56 +++++++++---------- .../docker/docker-compose-victorialogs.yml | 8 +-- deployment/docker/docker-compose.yml | 6 +- .../vmanomaly-integration/docker-compose.yml | 7 +-- deployment/logs-benchmark/docker-compose.yml | 18 +++--- 5 files changed, 47 insertions(+), 48 deletions(-) diff --git a/deployment/docker/docker-compose-cluster.yml b/deployment/docker/docker-compose-cluster.yml index 8828adcdb..088bb8681 100644 --- a/deployment/docker/docker-compose-cluster.yml +++ b/deployment/docker/docker-compose-cluster.yml @@ -4,7 +4,7 @@ services: # And forward them to --remoteWrite.url vmagent: container_name: vmagent - image: victoriametrics/vmagent:v1.104.0 + image: victoriametrics/vmagent:v1.105.0 depends_on: - "vminsert" ports: @@ -13,8 +13,8 @@ services: - vmagentdata:/vmagentdata - ./prometheus-cluster.yml:/etc/prometheus/prometheus.yml command: - - '--promscrape.config=/etc/prometheus/prometheus.yml' - - '--remoteWrite.url=http://vminsert:8480/insert/0/prometheus/' + - "--promscrape.config=/etc/prometheus/prometheus.yml" + - "--remoteWrite.url=http://vminsert:8480/insert/0/prometheus/" restart: always # Grafana instance configured with VictoriaMetrics as datasource @@ -39,7 +39,7 @@ services: # where N is number of vmstorages (2 in this case). vmstorage-1: container_name: vmstorage-1 - image: victoriametrics/vmstorage:v1.104.0-cluster + image: victoriametrics/vmstorage:v1.105.0-cluster ports: - 8482 - 8400 @@ -47,11 +47,11 @@ services: volumes: - strgdata-1:/storage command: - - '--storageDataPath=/storage' + - "--storageDataPath=/storage" restart: always vmstorage-2: container_name: vmstorage-2 - image: victoriametrics/vmstorage:v1.104.0-cluster + image: victoriametrics/vmstorage:v1.105.0-cluster ports: - 8482 - 8400 @@ -59,20 +59,20 @@ services: volumes: - strgdata-2:/storage command: - - '--storageDataPath=/storage' + - "--storageDataPath=/storage" restart: always # vminsert is ingestion frontend. It receives metrics pushed by vmagent, # pre-process them and distributes across configured vmstorage shards. vminsert: container_name: vminsert - image: victoriametrics/vminsert:v1.104.0-cluster + image: victoriametrics/vminsert:v1.105.0-cluster depends_on: - "vmstorage-1" - "vmstorage-2" command: - - '--storageNode=vmstorage-1:8400' - - '--storageNode=vmstorage-2:8400' + - "--storageNode=vmstorage-1:8400" + - "--storageNode=vmstorage-2:8400" ports: - 8480:8480 restart: always @@ -81,27 +81,27 @@ services: # vmselect collects results from configured `--storageNode` shards. vmselect-1: container_name: vmselect-1 - image: victoriametrics/vmselect:v1.104.0-cluster + image: victoriametrics/vmselect:v1.105.0-cluster depends_on: - "vmstorage-1" - "vmstorage-2" command: - - '--storageNode=vmstorage-1:8401' - - '--storageNode=vmstorage-2:8401' - - '--vmalert.proxyURL=http://vmalert:8880' + - "--storageNode=vmstorage-1:8401" + - "--storageNode=vmstorage-2:8401" + - "--vmalert.proxyURL=http://vmalert:8880" ports: - 8481 restart: always vmselect-2: container_name: vmselect-2 - image: victoriametrics/vmselect:v1.104.0-cluster + image: victoriametrics/vmselect:v1.105.0-cluster depends_on: - "vmstorage-1" - "vmstorage-2" command: - - '--storageNode=vmstorage-1:8401' - - '--storageNode=vmstorage-2:8401' - - '--vmalert.proxyURL=http://vmalert:8880' + - "--storageNode=vmstorage-1:8401" + - "--storageNode=vmstorage-2:8401" + - "--vmalert.proxyURL=http://vmalert:8880" ports: - 8481 restart: always @@ -112,14 +112,14 @@ services: # It can be used as an authentication proxy. vmauth: container_name: vmauth - image: victoriametrics/vmauth:v1.104.0 + image: victoriametrics/vmauth:v1.105.0 depends_on: - "vmselect-1" - "vmselect-2" volumes: - ./auth-cluster.yml:/etc/auth.yml command: - - '--auth.config=/etc/auth.yml' + - "--auth.config=/etc/auth.yml" ports: - 8427:8427 restart: always @@ -127,7 +127,7 @@ services: # vmalert executes alerting and recording rules vmalert: container_name: vmalert - image: victoriametrics/vmalert:v1.104.0 + image: victoriametrics/vmalert:v1.105.0 depends_on: - "vmauth" ports: @@ -138,13 +138,13 @@ services: - ./alerts-vmagent.yml:/etc/alerts/alerts-vmagent.yml - ./alerts-vmalert.yml:/etc/alerts/alerts-vmalert.yml command: - - '--datasource.url=http://vmauth:8427/select/0/prometheus' - - '--remoteRead.url=http://vmauth:8427/select/0/prometheus' - - '--remoteWrite.url=http://vminsert:8480/insert/0/prometheus' - - '--notifier.url=http://alertmanager:9093/' - - '--rule=/etc/alerts/*.yml' + - "--datasource.url=http://vmauth:8427/select/0/prometheus" + - "--remoteRead.url=http://vmauth:8427/select/0/prometheus" + - "--remoteWrite.url=http://vminsert:8480/insert/0/prometheus" + - "--notifier.url=http://alertmanager:9093/" + - "--rule=/etc/alerts/*.yml" # display source of alerts in grafana - - '-external.url=http://127.0.0.1:3000' #grafana outside container + - "-external.url=http://127.0.0.1:3000" #grafana outside container - '--external.alert.source=explore?orgId=1&left={"datasource":"VictoriaMetrics","queries":[{"expr":{{.Expr|jsonEscape|queryEscape}},"refId":"A"}],"range":{"from":"{{ .ActiveAt.UnixMilli }}","to":"now"}}' restart: always @@ -156,7 +156,7 @@ services: volumes: - ./alertmanager.yml:/config/alertmanager.yml command: - - '--config.file=/config/alertmanager.yml' + - "--config.file=/config/alertmanager.yml" ports: - 9093:9093 restart: always diff --git a/deployment/docker/docker-compose-victorialogs.yml b/deployment/docker/docker-compose-victorialogs.yml index 3e6ed02d5..b18c05718 100644 --- a/deployment/docker/docker-compose-victorialogs.yml +++ b/deployment/docker/docker-compose-victorialogs.yml @@ -36,8 +36,8 @@ services: networks: - vm_net -# VictoriaLogs instance, a single process responsible for -# storing logs and serving read queries. + # VictoriaLogs instance, a single process responsible for + # storing logs and serving read queries. victorialogs: container_name: victorialogs image: docker.io/victoriametrics/victoria-logs:v0.37.0-victorialogs @@ -55,7 +55,7 @@ services: # scraping, storing metrics and serve read requests. victoriametrics: container_name: victoriametrics - image: victoriametrics/victoria-metrics:v1.104.0 + image: victoriametrics/victoria-metrics:v1.105.0 ports: - 8428:8428 volumes: @@ -72,7 +72,7 @@ services: # vmalert executes alerting and recording rules vmalert: container_name: vmalert - image: victoriametrics/vmalert:v1.104.0 + image: victoriametrics/vmalert:v1.105.0 depends_on: - "victoriametrics" - "alertmanager" diff --git a/deployment/docker/docker-compose.yml b/deployment/docker/docker-compose.yml index 1b9584191..341b3d321 100644 --- a/deployment/docker/docker-compose.yml +++ b/deployment/docker/docker-compose.yml @@ -4,7 +4,7 @@ services: # And forward them to --remoteWrite.url vmagent: container_name: vmagent - image: victoriametrics/vmagent:v1.104.0 + image: victoriametrics/vmagent:v1.105.0 depends_on: - "victoriametrics" ports: @@ -22,7 +22,7 @@ services: # storing metrics and serve read requests. victoriametrics: container_name: victoriametrics - image: victoriametrics/victoria-metrics:v1.104.0 + image: victoriametrics/victoria-metrics:v1.105.0 ports: - 8428:8428 - 8089:8089 @@ -65,7 +65,7 @@ services: # vmalert executes alerting and recording rules vmalert: container_name: vmalert - image: victoriametrics/vmalert:v1.104.0 + image: victoriametrics/vmalert:v1.105.0 depends_on: - "victoriametrics" - "alertmanager" diff --git a/deployment/docker/vmanomaly/vmanomaly-integration/docker-compose.yml b/deployment/docker/vmanomaly/vmanomaly-integration/docker-compose.yml index 75ffe1852..7e78cd604 100644 --- a/deployment/docker/vmanomaly/vmanomaly-integration/docker-compose.yml +++ b/deployment/docker/vmanomaly/vmanomaly-integration/docker-compose.yml @@ -1,7 +1,7 @@ services: vmagent: container_name: vmagent - image: victoriametrics/vmagent:v1.104.0 + image: victoriametrics/vmagent:v1.105.0 depends_on: - "victoriametrics" ports: @@ -18,7 +18,7 @@ services: victoriametrics: container_name: victoriametrics - image: victoriametrics/victoria-metrics:v1.104.0 + image: victoriametrics/victoria-metrics:v1.105.0 ports: - 8428:8428 volumes: @@ -48,10 +48,9 @@ services: - vm_net restart: always - vmalert: container_name: vmalert - image: victoriametrics/vmalert:v1.104.0 + image: victoriametrics/vmalert:v1.105.0 depends_on: - "victoriametrics" ports: diff --git a/deployment/logs-benchmark/docker-compose.yml b/deployment/logs-benchmark/docker-compose.yml index 4b5ce36f7..aabd0fcf1 100644 --- a/deployment/logs-benchmark/docker-compose.yml +++ b/deployment/logs-benchmark/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3' +version: "3" services: # Run `make package-victoria-logs` to build victoria-logs image @@ -7,7 +7,7 @@ services: volumes: - vlogs:/vlogs ports: - - '9428:9428' + - "9428:9428" command: - -storageDataPath=/vlogs @@ -30,10 +30,10 @@ services: - /sys:/host/sys:ro - /:/rootfs:ro command: - - '--path.procfs=/host/proc' - - '--path.rootfs=/rootfs' - - '--path.sysfs=/host/sys' - - '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)' + - "--path.procfs=/host/proc" + - "--path.rootfs=/rootfs" + - "--path.sysfs=/host/sys" + - "--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)" du-exporter: image: ghcr.io/dundee/disk_usage_exporter/disk_usage_exporter-c4084307c537335c2ddb6f4b9b527422:latest @@ -43,12 +43,12 @@ services: - /var/lib/docker/volumes:/var/lib/docker/volumes:ro - ./du/config.yml:/config.yml:ro command: - - '--config=/config.yml' + - "--config=/config.yml" vmsingle: - image: victoriametrics/victoria-metrics:v1.104.0 + image: victoriametrics/victoria-metrics:v1.105.0 ports: - - '8428:8428' + - "8428:8428" command: - -storageDataPath=/vmsingle - -promscrape.config=/promscrape.yml From 7ecf68093f74d258ef53b4793ca712d96170515e Mon Sep 17 00:00:00 2001 From: Andrii Chubatiuk Date: Tue, 22 Oct 2024 13:00:07 +0300 Subject: [PATCH 02/90] docs: updated cmd flags highlight style (#7312) ### Describe Your Changes Changed highlight style for cmd flags ### Checklist The following checks are **mandatory**: - [ ] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --- docs/Cluster-VictoriaMetrics.md | 2 +- docs/README.md | 2 +- docs/vmagent.md | 2 +- docs/vmalert.md | 2 +- docs/vmauth.md | 2 +- docs/vmbackup.md | 2 +- docs/vmgateway.md | 2 +- docs/vmrestore.md | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md index e3a59bfa7..781485a2e 100644 --- a/docs/Cluster-VictoriaMetrics.md +++ b/docs/Cluster-VictoriaMetrics.md @@ -1091,7 +1091,7 @@ Report bugs and propose new features [here](https://github.com/VictoriaMetrics/V Below is the output for `/path/to/vminsert -help`: -``` +```shellhelp -blockcache.missesBeforeCaching int The number of cache misses before putting the block into cache. Higher values may reduce indexdb/dataBlocks cache size at the cost of higher CPU and disk read usage (default 2) -cacheExpireDuration duration diff --git a/docs/README.md b/docs/README.md index cf3561fa4..f6f327c20 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2790,7 +2790,7 @@ Files included in each folder: Pass `-help` to VictoriaMetrics in order to see the list of supported command-line flags with their description: -```sh +```shellhelp -bigMergeConcurrency int Deprecated: this flag does nothing -blockcache.missesBeforeCaching int diff --git a/docs/vmagent.md b/docs/vmagent.md index 15334a0ae..45a693a3e 100644 --- a/docs/vmagent.md +++ b/docs/vmagent.md @@ -1662,7 +1662,7 @@ It is safe sharing the collected profiles from security point of view, since the `vmagent` can be fine-tuned with various command-line flags. Run `./vmagent -help` in order to see the full list of these flags with their descriptions and default values: -```sh +```shellhelp ./vmagent -help vmagent collects metrics data via popular data ingestion protocols and routes them to VictoriaMetrics. diff --git a/docs/vmalert.md b/docs/vmalert.md index 61a2e6ae3..107ff7f88 100644 --- a/docs/vmalert.md +++ b/docs/vmalert.md @@ -1029,7 +1029,7 @@ command-line flags with their descriptions. The shortlist of configuration flags is the following: -```sh +```shellhelp -clusterMode If clusterMode is enabled, then vmalert automatically adds the tenant specified in config groups to -datasource.url, -remoteWrite.url and -remoteRead.url. See https://docs.victoriametrics.com/vmalert/#multitenancy . This flag is available only in Enterprise binaries. See https://docs.victoriametrics.com/enterprise/ -configCheckInterval duration diff --git a/docs/vmauth.md b/docs/vmauth.md index 5a798c229..f9e2c5614 100644 --- a/docs/vmauth.md +++ b/docs/vmauth.md @@ -1170,7 +1170,7 @@ It is safe sharing the collected profiles from security point of view, since the Pass `-help` command-line arg to `vmauth` in order to see all the configuration options: -```sh +```shellhelp ./vmauth -help vmauth authenticates and authorizes incoming requests and proxies them to VictoriaMetrics. diff --git a/docs/vmbackup.md b/docs/vmbackup.md index 365b02e7e..e58e200d3 100644 --- a/docs/vmbackup.md +++ b/docs/vmbackup.md @@ -325,7 +325,7 @@ Refer to the respective documentation for your object storage provider for more Run `vmbackup -help` in order to see all the available options: -```sh +```shellhelp -concurrency int The number of concurrent workers. Higher concurrency may reduce backup duration (default 10) -configFilePath string diff --git a/docs/vmgateway.md b/docs/vmgateway.md index ec9858085..88012b4d0 100644 --- a/docs/vmgateway.md +++ b/docs/vmgateway.md @@ -270,7 +270,7 @@ Example usage for tokens issued by Google: Below is the list of configuration flags (it can be viewed by running `./vmgateway -help`): -```sh +```shellhelp -auth.httpHeader string HTTP header name to look for JWT authorization token (default "Authorization") -auth.jwksEndpoints array diff --git a/docs/vmrestore.md b/docs/vmrestore.md index afb57d05a..f0ce35067 100644 --- a/docs/vmrestore.md +++ b/docs/vmrestore.md @@ -19,7 +19,7 @@ VictoriaMetrics must be stopped during the restore process. Run the following command to restore backup from the given `-src` into the given `-storageDataPath`: -```sh +```shellhelp ./vmrestore -src=:// -storageDataPath= ``` From b17fce3e4b2752be64c0b1690bf4e400e449b0e1 Mon Sep 17 00:00:00 2001 From: Fred Navruzov Date: Tue, 22 Oct 2024 12:42:37 +0200 Subject: [PATCH 03/90] docs/vmanomaly-release-1.17.2 (#7322) ### Describe Your Changes - release 1.17.2 updates - added sections on logging and CLI args to docs ### Checklist The following checks are **mandatory**: - [x] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --- .../vmanomaly-integration/docker-compose.yml | 2 +- docs/anomaly-detection/CHANGELOG.md | 11 +- docs/anomaly-detection/FAQ.md | 4 +- docs/anomaly-detection/Overview.md | 4 +- docs/anomaly-detection/QuickStart.md | 37 +- docs/anomaly-detection/components/models.md | 4 +- .../components/monitoring.md | 520 +++++++++++++++--- .../guides/guide-vmanomaly-vmalert/README.md | 2 +- 8 files changed, 481 insertions(+), 103 deletions(-) diff --git a/deployment/docker/vmanomaly/vmanomaly-integration/docker-compose.yml b/deployment/docker/vmanomaly/vmanomaly-integration/docker-compose.yml index 7e78cd604..e073cc2d5 100644 --- a/deployment/docker/vmanomaly/vmanomaly-integration/docker-compose.yml +++ b/deployment/docker/vmanomaly/vmanomaly-integration/docker-compose.yml @@ -72,7 +72,7 @@ services: restart: always vmanomaly: container_name: vmanomaly - image: victoriametrics/vmanomaly:v1.17.1 + image: victoriametrics/vmanomaly:v1.17.2 depends_on: - "victoriametrics" ports: diff --git a/docs/anomaly-detection/CHANGELOG.md b/docs/anomaly-detection/CHANGELOG.md index 0a4f6fee4..dd01a1df4 100644 --- a/docs/anomaly-detection/CHANGELOG.md +++ b/docs/anomaly-detection/CHANGELOG.md @@ -11,10 +11,19 @@ aliases: --- Please find the changelog for VictoriaMetrics Anomaly Detection below. +## v1.17.2 +Released: 2024-10-22 + +- IMPROVEMENT: Added `vmanomaly_version_info` (service) and `vmanomaly_ui_version_info` (vmui) gauges to self-monitoring metrics. +- IMPROVEMENT: Added `instance` and `job` labels to [pushed](https://docs.victoriametrics.com/keyconcepts/#push-model) metrics so they have the same labels as vmanomaly metrics that are [pulled](https://docs.victoriametrics.com/keyconcepts/#pull-model)/scraped. Metric labels can be customized via the [`extra_labels` argument](https://docs.victoriametrics.com/anomaly-detection/components/monitoring/?highlight=extra_labels#push-config-parameters). By default job label will be `vmanomaly` and the instance label will be `f'{hostname}:{vmanomaly_port}`. See [monitoring.push](https://docs.victoriametrics.com/anomaly-detection/components/monitoring/#push-config-parameters) for examples and details. +- IMPROVEMENT: Added a subsection to [monitoring](https://docs.victoriametrics.com/anomaly-detection/components/monitoring/#logs-generated-by-vmanomaly) page with detailed per-component service logs, including reader and writer logs, error handling, metrics updates, and multi-tenancy warnings. +- IMPROVEMENT: Added a new [Command-line arguments](https://docs.victoriametrics.com/anomaly-detection/quickstart/#command-line-arguments) subsection to the [Quickstart guide](https://docs.victoriametrics.com/anomaly-detection/quickstart/), providing details on available options for configuring `vmanomaly`. + + ## v1.17.1 Released: 2024-10-18 -- FIX: Fixed an issue occurred when [Prophet model](https://docs.victoriametrics.com/anomaly-detection/components/models/#prophet) is trained on *constant* data (data consisting of the same value and no variation across time). The bug prevented the `fit` stage from completing successfully, resulting in the model instance not being stored in the model registry, after automated model cleanup was addded in [v1.17.0](#1170). +- FIX: [Prophet models](https://docs.victoriametrics.com/anomaly-detection/components/models/#prophet) no longer fail to train on *constant* data, data consisting of the same value and no variation across time. The bug prevented the `fit` stage from completing successfully, resulting in the model instance not being stored in the model registry, after automated model cleanup was added in [v1.17.0](#1170). ## v1.17.0 Released: 2024-10-17 diff --git a/docs/anomaly-detection/FAQ.md b/docs/anomaly-detection/FAQ.md index 5202d362f..b80e5e281 100644 --- a/docs/anomaly-detection/FAQ.md +++ b/docs/anomaly-detection/FAQ.md @@ -132,7 +132,7 @@ services: # ... vmanomaly: container_name: vmanomaly - image: victoriametrics/vmanomaly:v1.17.1 + image: victoriametrics/vmanomaly:v1.17.2 # ... ports: - "8490:8490" @@ -230,7 +230,7 @@ P.s. `infer` data volume will remain the same for both models, so it does not af If you're dealing with a large query in the `queries` argument of [VmReader](https://docs.victoriametrics.com/anomaly-detection/components/reader/#vm-reader) (especially when running [within a scheduler using a long](https://docs.victoriametrics.com/anomaly-detection/components/scheduler/?highlight=fit_window#periodic-scheduler) `fit_window`), you may encounter issues such as query timeouts (due to the `search.maxQueryDuration` server limit) or rejections (if the `search.maxPointsPerTimeseries` server limit is exceeded). -We recommend upgrading to [v1.17.1](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1171), which introduced the `max_points_per_query` argument (both global and [query-specific](https://docs.victoriametrics.com/anomaly-detection/components/reader/#per-query-parameters)) for the [VmReader](https://docs.victoriametrics.com/anomaly-detection/components/reader/#vm-reader). This argument overrides how `search.maxPointsPerTimeseries` flag handling (introduced in [v1.14.1](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1141)) is used in `vmanomaly` for splitting long `fit_window` queries into smaller sub-intervals. This helps users avoid hitting the `search.maxQueryDuration` limit for individual queries by distributing initial query across multiple subquery requests with minimal overhead. +We recommend upgrading to [v1.17.2](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1171), which introduced the `max_points_per_query` argument (both global and [query-specific](https://docs.victoriametrics.com/anomaly-detection/components/reader/#per-query-parameters)) for the [VmReader](https://docs.victoriametrics.com/anomaly-detection/components/reader/#vm-reader). This argument overrides how `search.maxPointsPerTimeseries` flag handling (introduced in [v1.14.1](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1141)) is used in `vmanomaly` for splitting long `fit_window` queries into smaller sub-intervals. This helps users avoid hitting the `search.maxQueryDuration` limit for individual queries by distributing initial query across multiple subquery requests with minimal overhead. By splitting long `fit_window` queries into smaller sub-intervals, this helps avoid hitting the `search.maxQueryDuration` limit, distributing the load across multiple subquery requests with minimal overhead. To resolve the issue, reduce `max_points_per_query` to a value lower than `search.maxPointsPerTimeseries` until the problem is gone: diff --git a/docs/anomaly-detection/Overview.md b/docs/anomaly-detection/Overview.md index 1d791930b..24477da3c 100644 --- a/docs/anomaly-detection/Overview.md +++ b/docs/anomaly-detection/Overview.md @@ -229,7 +229,7 @@ This will expose metrics at `http://0.0.0.0:8080/metrics` page. To use *vmanomaly* you need to pull docker image: ```sh -docker pull victoriametrics/vmanomaly:v1.17.1 +docker pull victoriametrics/vmanomaly:v1.17.2 ``` > Note: please check what is latest release in [CHANGELOG](https://docs.victoriametrics.com/anomaly-detection/changelog/) @@ -239,7 +239,7 @@ docker pull victoriametrics/vmanomaly:v1.17.1 You can put a tag on it for your convenience: ```sh -docker image tag victoriametrics/vmanomaly:v1.17.1 vmanomaly +docker image tag victoriametrics/vmanomaly:v1.17.2 vmanomaly ``` Here is an example of how to run *vmanomaly* docker container with [license file](#licensing): diff --git a/docs/anomaly-detection/QuickStart.md b/docs/anomaly-detection/QuickStart.md index 154b30268..e82de0ad5 100644 --- a/docs/anomaly-detection/QuickStart.md +++ b/docs/anomaly-detection/QuickStart.md @@ -25,6 +25,30 @@ The following options are available: > **Note**: Starting from [v1.16.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1160), a similar optimization is available for data read from VictoriaMetrics TSDB. See instructions [here](https://docs.victoriametrics.com/anomaly-detection/faq/#on-disk-mode). +### Command-line arguments + +The `vmanomaly` service supports several command-line arguments to configure its behavior, including options for licensing, logging levels, and more. These arguments can be passed when starting the service via Docker or any other setup. Below is the list of available options: + + +```shellhelp +VictoriaMetrics Anomaly Detection Service + +positional arguments: + config YAML config file. Multiple files will override each other's top level values (aka shallow merge), so multiple configs can be combined. + +options: + -h show this help message and exit + --license STRING License key for VictoriaMetrics Enterprise. See https://victoriametrics.com/products/enterprise/trial/ to obtain a trial license. + --licenseFile PATH Path to file with license key for VictoriaMetrics Enterprise. See https://victoriametrics.com/products/enterprise/trial/ to obtain a trial license. + --license.forceOffline + Whether to force offline verification for VictoriaMetrics Enterprise license key, which has been passed either via -license or via -licenseFile command-line flag. + The issued license key must support offline verification feature. Contact info@victoriametrics.com if you need offline license verification. + --loggerLevel {FATAL,WARNING,ERROR,DEBUG,INFO} + Minimum level to log. Possible values: DEBUG, INFO, WARNING, ERROR, FATAL. +``` + +You can specify these options when running `vmanomaly` to fine-tune logging levels or handle licensing configurations, as per your requirements. + ### Docker > To run `vmanomaly`, you need to have VictoriaMetrics Enterprise license. You can get a trial license key [**here**](https://victoriametrics.com/products/enterprise/trial/). @@ -34,13 +58,13 @@ Below are the steps to get `vmanomaly` up and running inside a Docker container: 1. Pull Docker image: ```sh -docker pull victoriametrics/vmanomaly:v1.17.1 +docker pull victoriametrics/vmanomaly:v1.17.2 ``` 2. (Optional step) tag the `vmanomaly` Docker image: ```sh -docker image tag victoriametrics/vmanomaly:v1.17.1 vmanomaly +docker image tag victoriametrics/vmanomaly:v1.17.2 vmanomaly ``` 3. Start the `vmanomaly` Docker container with a *license file*, use the command below. @@ -52,7 +76,8 @@ export YOUR_CONFIG_FILE_PATH=path/to/config/file docker run -it -v $YOUR_LICENSE_FILE_PATH:/license \ -v $YOUR_CONFIG_FILE_PATH:/config.yml \ vmanomaly /config.yml \ - --licenseFile=/license + --licenseFile=/license \ + --loggerLevel=INFO ``` In case you found `PermissionError: [Errno 13] Permission denied:` in `vmanomaly` logs, set user/user group to 1000 in the run command above / in a docker-compose file: @@ -64,7 +89,8 @@ docker run -it --user 1000:1000 \ -v $YOUR_LICENSE_FILE_PATH:/license \ -v $YOUR_CONFIG_FILE_PATH:/config.yml \ vmanomaly /config.yml \ - --licenseFile=/license + --licenseFile=/license \ + --loggerLevel=INFO ``` ```yaml @@ -72,13 +98,14 @@ docker run -it --user 1000:1000 \ services: # ... vmanomaly: - image: victoriametrics/vmanomaly:v1.17.1 + image: victoriametrics/vmanomaly:v1.17.2 volumes: $YOUR_LICENSE_FILE_PATH:/license $YOUR_CONFIG_FILE_PATH:/config.yml command: - "/config.yml" - "--licenseFile=/license" + - "--loggerLevel=INFO" # ... ``` diff --git a/docs/anomaly-detection/components/models.md b/docs/anomaly-detection/components/models.md index 56ae1b4cc..85485b77e 100644 --- a/docs/anomaly-detection/components/models.md +++ b/docs/anomaly-detection/components/models.md @@ -962,7 +962,7 @@ monitoring: Let's pull the docker image for `vmanomaly`: ```sh -docker pull victoriametrics/vmanomaly:v1.17.0 +docker pull victoriametrics/vmanomaly:v1.17.2 ``` Now we can run the docker container putting as volumes both config and model file: @@ -976,7 +976,7 @@ docker run -it \ -v $(PWD)/license:/license \ -v $(PWD)/custom_model.py:/vmanomaly/model/custom.py \ -v $(PWD)/custom.yaml:/config.yaml \ -victoriametrics/vmanomaly:v1.17.0 /config.yaml \ +victoriametrics/vmanomaly:v1.17.2 /config.yaml \ --licenseFile=/license ``` diff --git a/docs/anomaly-detection/components/monitoring.md b/docs/anomaly-detection/components/monitoring.md index 235e38f0d..362717b3d 100644 --- a/docs/anomaly-detection/components/monitoring.md +++ b/docs/anomaly-detection/components/monitoring.md @@ -226,6 +226,13 @@ For detailed guidance on configuring mTLS parameters such as `verify_tls`, `tls_ ## Metrics generated by vmanomaly +- [Startup metrics](#startup-metrics) +- [Reader metrics](#reader-behaviour-metrics) +- [Model metrics](#models-behaviour-metrics) +- [Writer metrics](#writer-behaviour-metrics) + +### Startup metrics + @@ -243,10 +250,120 @@ For detailed guidance on configuring mTLS parameters such as `verify_tls`, `tls_ + + + + + + + + + +
Gauge vmanomaly start time in UNIX time
+ +`vmanomaly_version_info` + Gaugevmanomaly version information, contained in `version` label. Added in [v1.17.2](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1172)
+ +`vmanomaly_ui_version_info` + Gaugevmanomaly UI version information, contained in `version` label. Added in [v1.17.2](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1172)
-### Models Behaviour Metrics +[Back to metric sections](#metrics-generated-by-vmanomaly) + +### Reader behaviour metrics +Label names [description](#labelnames) + +> **Note**: additional labels (`scheduler_alias`, `preset`) were added to writer and reader metrics in [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170) to improve consistency across the components. Also, metrics `vmanomaly_reader_request_duration_seconds` and `vmanomaly_reader_response_parsing_seconds` changed their type to `Histogram` (was `Summary` prior to [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170)). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MetricTypeDescriptionLabelnames
+ +`vmanomaly_reader_request_duration_seconds` + `Histogram` (was `Summary` prior to [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170))The total time (in seconds) taken by queries to VictoriaMetrics `url` for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. + +`url`, `query_key`, `scheduler_alias`, `preset` +
+ +`vmanomaly_reader_responses` (named `vmanomaly_reader_response_count` prior to [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170)) + `Counter`The count of responses received from VictoriaMetrics `url` for the `query_key` query, categorized by `code`, within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. + +`url`, `query_key`, `code`, `scheduler_alias`, `preset` +
+ +`vmanomaly_reader_received_bytes` + `Counter`The total number of bytes received in responses for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. + +`query_key`, `scheduler_alias`, `preset` +
+ +`vmanomaly_reader_response_parsing_seconds` + `Histogram` (was `Summary` prior to [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170))The total time (in seconds) taken for data parsing at each `step` (json, dataframe) for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. + +`step`, `query_key`, `scheduler_alias`, `preset` +
+ +`vmanomaly_reader_timeseries_received` + `Counter`The total number of timeseries received from VictoriaMetrics for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. + +`query_key`, `scheduler_alias`, `preset` +
+ +`vmanomaly_reader_datapoints_received` + `Counter`The total number of datapoints received from VictoriaMetrics for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. + +`query_key`, `scheduler_alias`, `preset` +
+ +[Back to metric sections](#metrics-generated-by-vmanomaly) + +### Models behaviour metrics Label names [description](#labelnames) > **Note**: There is a new label key `model_alias` introduced in multi-model support [v1.10.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1100). This label key adjustment was made to preserve unique label set production during writing produced metrics back to VictoriaMetrics. @@ -349,7 +466,9 @@ Label names [description](#labelnames) -### Writer Behaviour Metrics +[Back to metric sections](#metrics-generated-by-vmanomaly) + +### Writer behaviour metrics Label names [description](#labelnames) > **Note**: additional labels (`scheduler_alias`, `preset`) were added to writer and reader metrics in [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170) to improve consistency across the components. Also, metrics `vmanomaly_writer_request_duration_seconds` and `vmanomaly_writer_request_serialize_seconds` changed their type to `Histogram` (was `Summary` prior to [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170)). @@ -439,93 +558,7 @@ Label names [description](#labelnames) -### Reader Behaviour Metrics -Label names [description](#labelnames) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MetricTypeDescriptionLabelnames
- -`vmanomaly_reader_request_duration_seconds` - `Histogram` (was `Summary` prior to [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170))The total time (in seconds) taken by queries to VictoriaMetrics `url` for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. - -`url`, `query_key`, `scheduler_alias`, `preset` -
- -`vmanomaly_reader_responses` (named `vmanomaly_reader_response_count` prior to [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170)) - `Counter`The count of responses received from VictoriaMetrics `url` for the `query_key` query, categorized by `code`, within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. - -`url`, `query_key`, `code`, `scheduler_alias`, `preset` -
- -`vmanomaly_reader_received_bytes` - `Counter`The total number of bytes received in responses for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. - -`query_key`, `scheduler_alias`, `preset` -
- -`vmanomaly_reader_response_parsing_seconds` - `Histogram` (was `Summary` prior to [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170))The total time (in seconds) taken for data parsing at each `step` (json, dataframe) for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. - -`step`, `query_key`, `scheduler_alias`, `preset` -
- -`vmanomaly_reader_timeseries_received` - `Counter`The total number of timeseries received from VictoriaMetrics for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. - -`query_key`, `scheduler_alias`, `preset` -
- -`vmanomaly_reader_datapoints_received` - `Counter`The total number of datapoints received from VictoriaMetrics for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. - -`query_key`, `scheduler_alias`, `preset` -
+[Back to metric sections](#metrics-generated-by-vmanomaly) ### Labelnames @@ -537,3 +570,312 @@ Label names [description](#labelnames) * `url` - writer or reader url endpoint. * `code` - response status code or `connection_error`, `timeout`. * `step` - json or dataframe reading step. + +[Back to metric sections](#metrics-generated-by-vmanomaly) + + +## Logs generated by vmanomaly + +The `vmanomaly` service logs operations, errors, and performance for its components (service, reader, writer), alongside [self-monitoring metrics](#metrics-generated-by-vmanomaly) updates. Below is a description of key logs for each component and the related metrics affected. + +`{{X}}` indicates a placeholder in the log message templates described below, which will be replaced with the appropriate entity during logging. + + +> **Note**: Applicable to version [v1.17.1](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1171) or newer. + +> **Note**: By default, `vmanomaly` uses the `INFO` logging level. You can change this by specifying the `--loggerLevel` argument. See command-line arguments [here](https://docs.victoriametrics.com/anomaly-detection/quickstart/#command-line-arguments). + +- [Startup logs](#startup-logs) +- [Reader logs](#reader-logs) +- [Service logs](#service-logs) +- [Writer logs](#writer-logs) + + +### Startup logs + +The `vmanomaly` service logs important information during the startup process. This includes checking for the license, validating configurations, and setting up schedulers, readers, and writers. Below are key logs that are generated during startup, which can help troubleshoot issues with the service's initial configuration or license validation. + +--- + +**License check**. If no license key or file is provided, the service will fail to start and log an error message. If a license file is provided but cannot be read, the service logs a failure. Log messages: + +```text +Please provide a license code using --license or --licenseFile arg, or as VM_LICENSE_FILE env. See https://victoriametrics.com/products/enterprise/trial/ to obtain a trial license. +``` + +```text +failed to read file {{args.license_file}}: {{error_message}} +``` + +--- + +**Config validation**. If the service's configuration fails to load or does not meet validation requirements, an error message is logged and the service will exit. If the configuration is loaded successfully, a message confirming the successful load is logged. Log messages: + +```text +Config validation failed, please fix these errors: {{error_details}} +``` + +```text +Config has been loaded successfully. +``` + +--- + +**Model and data directory setup**. The service checks the environment variables `VMANOMALY_MODEL_DUMPS_DIR` and `VMANOMALY_DATA_DUMPS_DIR` to determine where to store models and data. If these variables are not set, models and data will be stored in memory. Please find the [on-disk mode details here](https://docs.victoriametrics.com/anomaly-detection/faq/#on-disk-mode). Log messages: + +```text +Using ENV MODEL_DUMP_DIR=`{{model_dump_dir}}` to store anomaly detection models. +``` +```text +ENV MODEL_DUMP_DIR is not set. Models will be kept in RAM between consecutive `fit` calls. +``` +```text +Using ENV DATA_DUMP_DIR=`{{data_dump_dir}}` to store anomaly detection data. +``` +```text +ENV DATA_DUMP_DIR is not set. Models' training data will be stored in RAM. +``` + +--- + +**Scheduler and service initialization**. After configuration is successfully loaded, the service initializes [schedulers](https://docs.victoriametrics.com/anomaly-detection/components/scheduler/) and services for each defined `scheduler_alias`. If there are issues with a specific scheduler (e.g., no models or queries found to attach to a scheduler), a warning is logged. When schedulers are initialized, the service logs a list of active schedulers. Log messages: + +```text +Scheduler {{scheduler_alias}} wrapped and initialized with {{N}} model spec(s). +``` +```text +No model spec(s) found for scheduler `{{scheduler_alias}}`, skipping setting it up. +``` +```text +Active schedulers: {{list_of_schedulers}}. +``` + +[Back to logging sections](#logs-generated-by-vmanomaly) + +--- + +### Reader logs + +The `reader` component logs events during the process of querying VictoriaMetrics and retrieving the data necessary for anomaly detection. This includes making HTTP requests, handling SSL, parsing responses, and processing data into formats like DataFrames. The logs help to troubleshoot issues such as connection problems, timeout errors, or misconfigured queries. + +--- + +**Starting a healthcheck request**. When the `reader` component initializes, it checks whether the VictoriaMetrics endpoint is accessible by sending a request for `_vmanomaly_healthcheck`. Log messages: + +```text +[Scheduler {{scheduler_alias}}] Max points per timeseries set as: {{vm_max_datapoints_per_ts}} +``` +```text +[Scheduler {{scheduler_alias}}] Reader endpoint SSL error {{url}}: {{error_message}} +``` +```text +[Scheduler {{scheduler_alias}}] Reader endpoint inaccessible {{url}}: {{error_message}} +``` +```text +[Scheduler {{scheduler_alias}}] Reader endpoint timeout {{url}}: {{error_message}} +``` + +--- + + +**No data found (False)**. Based on [`query_from_last_seen_timestamp`](https://docs.victoriametrics.com/anomaly-detection/components/reader/?highlight=query_from_last_seen_timestamp#config-parameters) VmReader flag. A `warning` log is generated when no data is found in the requested range. This could indicate that the query was misconfigured or that no new data exists for the time period requested. Log message format: + +```text +[Scheduler {{scheduler_alias}}] No data between {{start_s}} and {{end_s}} for query "{{query_key}}" +``` + +--- + +**No unseen data found (True)**. Based on [`query_from_last_seen_timestamp`](https://docs.victoriametrics.com/anomaly-detection/components/reader/?highlight=query_from_last_seen_timestamp#config-parameters) VmReader flag. A `warning` log is generated when no new data is returned (i.e., all data has already been seen in a previous inference step(s)). This helps in identifying situations where data for inference has already been processed. Based on VmReader's `adjust` flag. Log messages: + +```text +[Scheduler {{scheduler_alias}}] No unseen data between {{start_s}} and {{end_s}} for query "{{query_key}}" +``` + +--- + +**Connection or timeout errors**. When the reader fails to retrieve data due to connection or timeout errors, a `warning` log is generated. These errors could result from network issues, incorrect query endpoints, or VictoriaMetrics being temporarily unavailable. Log message format: + +```text +[Scheduler {{scheduler_alias}}] Error querying {{query_key}} for {{url}}: {{error_message}} +``` + +--- + +**Max datapoints warning**. If the requested query range (defined by `fit_every` or `infer_every` [scheduler](https://docs.victoriametrics.com/anomaly-detection/components/scheduler/#parameters-1) args) exceeds the maximum number of datapoints allowed by VictoriaMetrics, a `warning` log is generated, and the request is split into multiple intervals (option available since [v1.14.1](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1141)). This ensures that the request does not violate VictoriaMetrics’ constraints. Log messages: + +```text +[Scheduler {{scheduler_alias}}] Query "{{query_key}}" from {{start_s}} to {{end_s}} with step {{step}} may exceed max datapoints per timeseries and will be split... +``` + +--- + +**Multi-tenancy warnings**. If the reader detects any issues related to missing or misconfigured multi-tenancy labels (supported since [v1.16.2](https://docs.victoriametrics.com/anomaly-detection/changelog/index.html#v1162)), a `warning` log is generated to indicate the issue. See additional details [here](https://docs.victoriametrics.com/anomaly-detection/components/writer/#multitenancy-support). Log message format: + +```text +The label vm_account_id was not found in the label set of {{query_key}}, but tenant_id='multitenant' is set in reader configuration... +``` + +--- + +**Metrics updated in read operations**. During successful query execution process, the following reader [self-monitoring metrics](#reader-behaviour-metrics) are updated: + +- `vmanomaly_reader_request_duration_seconds`: Records the time (in seconds) taken to complete the query request. + +- `vmanomaly_reader_responses`: Tracks the number of response codes received from VictoriaMetrics. + +- `vmanomaly_reader_received_bytes`: Counts the number of bytes received in the response. + +- `vmanomaly_reader_response_parsing_seconds`: Records the time spent parsing the response into different formats (e.g., JSON or DataFrame). + +- `vmanomaly_reader_timeseries_received`: Tracks how many timeseries were retrieved in the query result. + +- `vmanomaly_reader_datapoints_received`: Counts the number of datapoints retrieved in the query result. + +--- + +**Metrics skipped in case of failures**. If an error occurs (connection or timeout), `vmanomaly_reader_received_bytes`, `vmanomaly_reader_timeseries_received`, and `vmanomaly_reader_datapoints_received` are not incremented because no valid data was received. + +[Back to logging sections](#logs-generated-by-vmanomaly) + +### Service logs + +The `model` component (wrapped in service) logs operations during the fitting and inference stages for each model spec attached to particular [scheduler](https://docs.victoriametrics.com/anomaly-detection/components/scheduler/) `scheduler_alias`. These logs inform about skipped runs, connection or timeout issues, invalid data points, and successful or failed model operations. + +--- + +**Skipped runs**. When there are insufficient valid data points to fit or infer using a model, the run is skipped and a `warning` log is generated. This can occur when the query returns no new data or when the data contains invalid values (e.g., `NaN`, `INF`). The skipped run is also reflected in the `vmanomaly_model_runs_skipped` metric. Log messages: + +When there are insufficient valid data points (at least 1 for [online models](https://docs.victoriametrics.com/anomaly-detection/components/models#online-models) and 2 for [offline models](https://docs.victoriametrics.com/anomaly-detection/components/models#offline-models)) +```text +[Scheduler {{scheduler_alias}}] Skipping run for stage 'fit' for model '{{model_alias}}' (query_key: {{query_key}}): Not enough valid data to fit: {{valid_values_cnt}} +``` + +When all the received timestamps during an `infer` call have already been processed, meaning the [`anomaly_score`](https://docs.victoriametrics.com/anomaly-detection/faq/index.html#what-is-anomaly-score) has already been produced for those points +```text +[Scheduler {{scheduler_alias}}] Skipping run for stage 'infer' for model '{{model_alias}}' (query_key: {{query_key}}): No unseen data to infer on. +``` +When the model fails to produce any valid or finite outputs (such as [`anomaly_score`](https://docs.victoriametrics.com/anomaly-detection/faq/index.html#what-is-anomaly-score)) +```text +[Scheduler {{scheduler_alias}}] Skipping run for stage 'infer' for model '{{model_alias}}' (query_key: {{query_key}}): No (valid) datapoints produced. +``` + +--- + +**Errors during model execution**. If the model fails to fit or infer data due to internal service errors or model spec misconfigurations, an `error` log is generated and the error is also reflected in the `vmanomaly_model_run_errors` metric. This can occur during both `fit` and `infer` stages. Log messages: +```text +[Scheduler {{scheduler_alias}}] Error during stage 'fit' for model '{{model_alias}}' (query_key: {{query_key}}): {{error_message}} +``` +```text +[Scheduler {{scheduler_alias}}] Error during stage 'infer' for model '{{model_alias}}' (query_key: {{query_key}}): {{error_message}} +``` + +--- + +**Model instance created during inference**. In cases where an [online model](https://docs.victoriametrics.com/anomaly-detection/components/models#online-models) instance is created during the inference stage (without a prior fit, a feature introduced in [v1.15.2](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1152)), a `debug` log is produced. This helps track models that are created dynamically based on incoming data. Log messages: + +```text +[Scheduler {{scheduler_alias}}] Model instance '{{model_alias}}' created for '{{query_key}}' during inference. +``` +--- + +**Successful model runs**. When a model successfully fits, logs track the number of valid datapoints processed and the time taken for the operation. These logs are accompanied by updates to [self-monitoring metrics](#models-behaviour-metrics) like `vmanomaly_model_runs`, `vmanomaly_model_run_duration_seconds`, `vmanomaly_model_datapoints_accepted`, and `vmanomaly_model_datapoints_produced`. Log messages: + +For [non-rolling models](https://docs.victoriametrics.com/anomaly-detection/components/models/#non-rolling-models) +```text +[Scheduler {{scheduler_alias}}] Fitting on {{valid_values_cnt}}/{{total_values_cnt}} valid datapoints for "{{query_key}}" using model "{{model_alias}}". +``` +```text +[Scheduler {{scheduler_alias}}] Model '{{model_alias}}' fit completed in {{model_run_duration}} seconds for {{query_key}}. +``` +For [rolling models](https://docs.victoriametrics.com/anomaly-detection/components/models/#rolling-models) (combined stage) +```text +[Scheduler {{scheduler_alias}}] Fit-Infer on {{datapoint_count}} points for "{{query_key}}" using model "{{model_alias}}". +``` + +--- + +**Metrics updated in model runs**. During successful fit or infer operations, the following [self-monitoring metrics](#models-behaviour-metrics) are updated for each run: + +- `vmanomaly_model_runs`: Tracks how many times the model ran (`fit`, `infer`, or `fit_infer`) for a specific `query_key`. + +- `vmanomaly_model_run_duration_seconds`: Records the total time (in seconds) for the model invocation, based on the results of the `query_key`. + +- `vmanomaly_model_datapoints_accepted`: The number of valid datapoints processed by the model during the run. + +- `vmanomaly_model_datapoints_produced`: The number of datapoints generated by the model during inference. + +- `vmanomaly_models_active`: Tracks the number of models currently **available for infer** for a specific `query_key`. + +--- + +**Metrics skipped in case of failures**. If a model run fails due to an error or if no valid data is available, the metrics such as `vmanomaly_model_datapoints_accepted`, `vmanomaly_model_datapoints_produced`, and `vmanomaly_model_run_duration_seconds` are not updated. + +--- + +[Back to logging sections](#logs-generated-by-vmanomaly) + +### Writer logs + +The `writer` component logs events during the process of sending produced data (like `anomaly_score` [metrics](https://docs.victoriametrics.com/anomaly-detection/faq/index.html#what-is-anomaly-score)) to VictoriaMetrics. This includes data preparation, serialization, and network requests to VictoriaMetrics endpoints. The logs can help identify issues in data transmission, such as connection errors, invalid data points, and track the performance of write requests. + +--- + +**Starting a write request**. A `debug` level log is produced when the `writer` component starts the process of writing data to VictoriaMetrics. It includes details like the number of datapoints, bytes of payload, and the query being written. This is useful for tracking the payload size and performance at the start of the request. Log messages: + +```text +[Scheduler {{scheduler_alias}}] POST {{url}} with {{N}} datapoints, {{M}} bytes of payload, for {{query_key}} +``` + +--- + +**No valid data points**. A `warning` log is generated if there are no valid datapoints to write (i.e., all are `NaN` or unsupported like `INF`). This indicates that the writer will not send any data to VictoriaMetrics. Log messages: + +```text +[Scheduler {{scheduler_alias}}] No valid datapoints to save for metric: {{query_key}} +``` + +--- + +**Connection, timeout, or I/O errors**. When the writer fails to send data due to connection, timeout, or I/O errors, an `error` log is generated. These errors often arise from network problems, incorrect URLs, or VictoriaMetrics being unavailable. The log includes details of the failed request and the reason for the failure. Log messages: + +```text +[Scheduler {{scheduler_alias}}] Cannot write {{N}} points for {{query_key}}: connection error {{url}} {{error_message}} +``` +```text +[Scheduler {{scheduler_alias}}] Cannot write {{N}} points for {{query_key}}: timeout for {{url}} {{error_message}} +``` +```text +[Scheduler {{scheduler_alias}}] Cannot write {{N}} points for {{query_key}}: I/O error for {{url}} {{error_message}} +``` + +--- + +**Multi-tenancy warnings**. If the `tenant_id` is set to `multitenant` but the `vm_account_id` label is missing from the query result, or vice versa, a `warning` log is produced (supported since [v1.16.2](https://docs.victoriametrics.com/anomaly-detection/changelog/index.html#v1162)). This helps in debugging label set issues that may occur due to the multi-tenant configuration - see [this section for details](https://docs.victoriametrics.com/anomaly-detection/components/writer/#multitenancy-support). Log messages: + +```text +The label vm_account_id was not found in the label set of {{query_key}}, but tenant_id='multitenant' is set in writer... +``` +```text +The label set for the metric {{query_key}} contains multi-tenancy labels, but the write endpoint is configured for single-tenant mode (tenant_id != 'multitenant')... +``` + +--- + +**Metrics updated in write operations**. During the successful write process of *non-empty data*, the following [self-monitoring metrics](#writer-behaviour-metrics) are updated: + +- `vmanomaly_writer_request_duration_seconds`: Records the time (in seconds) taken to complete the write request. + +- `vmanomaly_writer_sent_bytes`: Tracks the number of bytes sent in the request. + +- `vmanomaly_writer_responses`: Captures the HTTP response code returned by VictoriaMetrics. In case of connection, timeout, or I/O errors, a specific error code (`connection_error`, `timeout`, or `io_error`) is recorded instead. + +- `vmanomaly_writer_request_serialize_seconds`: Records the time taken for data serialization. + +- `vmanomaly_writer_datapoints_sent`: Counts the number of valid datapoints that were successfully sent. + +- `vmanomaly_writer_timeseries_sent`: Tracks the number of timeseries sent to VictoriaMetrics. + +**Metrics skipped in case of failures**. If an error occurs (connection, timeout, or I/O error), only `vmanomaly_writer_request_duration_seconds` is updated with appropriate error code. + +[Back to logging sections](#logs-generated-by-vmanomaly) diff --git a/docs/anomaly-detection/guides/guide-vmanomaly-vmalert/README.md b/docs/anomaly-detection/guides/guide-vmanomaly-vmalert/README.md index 09cff8d90..610abd511 100644 --- a/docs/anomaly-detection/guides/guide-vmanomaly-vmalert/README.md +++ b/docs/anomaly-detection/guides/guide-vmanomaly-vmalert/README.md @@ -385,7 +385,7 @@ services: restart: always vmanomaly: container_name: vmanomaly - image: victoriametrics/vmanomaly:v1.17.1 + image: victoriametrics/vmanomaly:v1.17.2 depends_on: - "victoriametrics" ports: From e8c7d6373e82cbd86828c1f471facc58ce1c30a2 Mon Sep 17 00:00:00 2001 From: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:04:24 +0300 Subject: [PATCH 04/90] Automatic update operator docs from VictoriaMetrics/operator@b357f60 (#7319) Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Signed-off-by: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Co-authored-by: f41gh7 <18450869+f41gh7@users.noreply.github.com> --- docs/operator/CHANGELOG.md | 6 ++++++ docs/operator/api.md | 2 ++ docs/operator/vars.md | 20 ++++++++++---------- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/docs/operator/CHANGELOG.md b/docs/operator/CHANGELOG.md index 44f8be24e..d931e2ad8 100644 --- a/docs/operator/CHANGELOG.md +++ b/docs/operator/CHANGELOG.md @@ -11,7 +11,13 @@ aliases: - /operator/changelog/index.html --- +## [v0.48.4](https://github.com/VictoriaMetrics/operator/releases/tag/v0.48.4) - 15 Oct 2024 + +- [api](https://docs.victoriametrics.com/operator/api): adds new fields `maxDiskUsagePerUrl` and`forceVMProto` to the `VMagent` `remoteWriteSpec` - [vmuser](https://docs.victoriametrics.com/operator/resources/vmuser/): fixes the protocol of generated CRD target access url for vminsert and vmstorage when TLS is enabled. +- [vmagent](https://docs.victoriametrics.com/operator/resources/vmagent/): properly make transition to `statefulMode`. See [this issue](https://github.com/VictoriaMetrics/operator/issues/1127) for details. +- [vmagent](https://docs.victoriametrics.com/operator/resources/vmagent/): properly assign `OwnerRefrence` for `Role` and `RoleBinding` at `single-namespace` operator mode. +- [operator](https://docs.victoriametrics.com/operator/): fixes pod scheduling with `useStrictSecurity` enabled by removing default values for `AppArmorProfile` and `SeccompProfile`. See [this issue](https://github.com/VictoriaMetrics/operator/issues/1120) for details. ## [v0.48.3](https://github.com/VictoriaMetrics/operator/releases/tag/v0.48.3) - 29 Sep 2024 diff --git a/docs/operator/api.md b/docs/operator/api.md index 437e34d29..206db8363 100644 --- a/docs/operator/api.md +++ b/docs/operator/api.md @@ -2518,8 +2518,10 @@ _Appears in:_ | --- | --- | --- | --- | | `basicAuth` | BasicAuth allow an endpoint to authenticate over basic authentication | _[BasicAuth](#basicauth)_ | false | | `bearerTokenSecret` | Optional bearer auth token to use for -remoteWrite.url | _[SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#secretkeyselector-v1-core)_ | false | +| `forceVMProto` | ForceVMProto forces using VictoriaMetrics protocol for sending data to -remoteWrite.url | _boolean_ | false | | `headers` | Headers allow configuring custom http headers
Must be in form of semicolon separated header with value
e.g.
headerName: headerValue
vmagent supports since 1.79.0 version | _string array_ | false | | `inlineUrlRelabelConfig` | InlineUrlRelabelConfig defines relabeling config for remoteWriteURL, it can be defined at crd spec. | _[RelabelConfig](#relabelconfig) array_ | false | +| `maxDiskUsage` | MaxDiskUsage defines the maximum file-based buffer size in bytes for -remoteWrite.url | _string_ | false | | `oauth2` | OAuth2 defines auth configuration | _[OAuth2](#oauth2)_ | false | | `sendTimeout` | Timeout for sending a single block of data to -remoteWrite.url (default 1m0s) | _string_ | false | | `streamAggrConfig` | StreamAggrConfig defines stream aggregation configuration for VMAgent for -remoteWrite.url | _[StreamAggrConfig](#streamaggrconfig)_ | false | diff --git a/docs/operator/vars.md b/docs/operator/vars.md index b24d4370d..8a70c0703 100644 --- a/docs/operator/vars.md +++ b/docs/operator/vars.md @@ -10,7 +10,7 @@ aliases: - /operator/vars/index.html --- - updated at Mon Oct 7 04:29:16 UTC 2024 + updated at Mon Oct 21 21:47:16 UTC 2024 | variable name | variable default value | variable required | variable description | @@ -31,7 +31,7 @@ aliases: | VM_VLOGSDEFAULT_CONFIGRELOADERCPU | - | false | ignored | | VM_VLOGSDEFAULT_CONFIGRELOADERMEMORY | - | false | ignored | | VM_VMALERTDEFAULT_IMAGE | victoriametrics/vmalert | false | - | -| VM_VMALERTDEFAULT_VERSION | v1.104.0 | false | - | +| VM_VMALERTDEFAULT_VERSION | v1.105.0 | false | - | | VM_VMALERTDEFAULT_CONFIGRELOADIMAGE | jimmidyson/configmap-reload:v0.3.0 | false | - | | VM_VMALERTDEFAULT_PORT | 8080 | false | - | | VM_VMALERTDEFAULT_USEDEFAULTRESOURCES | true | false | - | @@ -42,7 +42,7 @@ aliases: | VM_VMALERTDEFAULT_CONFIGRELOADERCPU | 100m | false | - | | VM_VMALERTDEFAULT_CONFIGRELOADERMEMORY | 25Mi | false | - | | VM_VMAGENTDEFAULT_IMAGE | victoriametrics/vmagent | false | - | -| VM_VMAGENTDEFAULT_VERSION | v1.104.0 | false | - | +| VM_VMAGENTDEFAULT_VERSION | v1.105.0 | false | - | | VM_VMAGENTDEFAULT_CONFIGRELOADIMAGE | quay.io/prometheus-operator/prometheus-config-reloader:v0.68.0 | false | - | | VM_VMAGENTDEFAULT_PORT | 8429 | false | - | | VM_VMAGENTDEFAULT_USEDEFAULTRESOURCES | true | false | - | @@ -53,7 +53,7 @@ aliases: | VM_VMAGENTDEFAULT_CONFIGRELOADERCPU | 100m | false | - | | VM_VMAGENTDEFAULT_CONFIGRELOADERMEMORY | 25Mi | false | - | | VM_VMSINGLEDEFAULT_IMAGE | victoriametrics/victoria-metrics | false | - | -| VM_VMSINGLEDEFAULT_VERSION | v1.104.0 | false | - | +| VM_VMSINGLEDEFAULT_VERSION | v1.105.0 | false | - | | VM_VMSINGLEDEFAULT_CONFIGRELOADIMAGE | - | false | ignored | | VM_VMSINGLEDEFAULT_PORT | 8429 | false | - | | VM_VMSINGLEDEFAULT_USEDEFAULTRESOURCES | true | false | - | @@ -65,14 +65,14 @@ aliases: | VM_VMSINGLEDEFAULT_CONFIGRELOADERMEMORY | - | false | ignored | | VM_VMCLUSTERDEFAULT_USEDEFAULTRESOURCES | true | false | - | | VM_VMCLUSTERDEFAULT_VMSELECTDEFAULT_IMAGE | victoriametrics/vmselect | false | - | -| VM_VMCLUSTERDEFAULT_VMSELECTDEFAULT_VERSION | v1.104.0-cluster | false | - | +| VM_VMCLUSTERDEFAULT_VMSELECTDEFAULT_VERSION | v1.105.0-cluster | false | - | | VM_VMCLUSTERDEFAULT_VMSELECTDEFAULT_PORT | 8481 | false | - | | VM_VMCLUSTERDEFAULT_VMSELECTDEFAULT_RESOURCE_LIMIT_MEM | 1000Mi | false | - | | VM_VMCLUSTERDEFAULT_VMSELECTDEFAULT_RESOURCE_LIMIT_CPU | 500m | false | - | | VM_VMCLUSTERDEFAULT_VMSELECTDEFAULT_RESOURCE_REQUEST_MEM | 500Mi | false | - | | VM_VMCLUSTERDEFAULT_VMSELECTDEFAULT_RESOURCE_REQUEST_CPU | 100m | false | - | | VM_VMCLUSTERDEFAULT_VMSTORAGEDEFAULT_IMAGE | victoriametrics/vmstorage | false | - | -| VM_VMCLUSTERDEFAULT_VMSTORAGEDEFAULT_VERSION | v1.104.0-cluster | false | - | +| VM_VMCLUSTERDEFAULT_VMSTORAGEDEFAULT_VERSION | v1.105.0-cluster | false | - | | VM_VMCLUSTERDEFAULT_VMSTORAGEDEFAULT_VMINSERTPORT | 8400 | false | - | | VM_VMCLUSTERDEFAULT_VMSTORAGEDEFAULT_VMSELECTPORT | 8401 | false | - | | VM_VMCLUSTERDEFAULT_VMSTORAGEDEFAULT_PORT | 8482 | false | - | @@ -81,7 +81,7 @@ aliases: | VM_VMCLUSTERDEFAULT_VMSTORAGEDEFAULT_RESOURCE_REQUEST_MEM | 500Mi | false | - | | VM_VMCLUSTERDEFAULT_VMSTORAGEDEFAULT_RESOURCE_REQUEST_CPU | 250m | false | - | | VM_VMCLUSTERDEFAULT_VMINSERTDEFAULT_IMAGE | victoriametrics/vminsert | false | - | -| VM_VMCLUSTERDEFAULT_VMINSERTDEFAULT_VERSION | v1.104.0-cluster | false | - | +| VM_VMCLUSTERDEFAULT_VMINSERTDEFAULT_VERSION | v1.105.0-cluster | false | - | | VM_VMCLUSTERDEFAULT_VMINSERTDEFAULT_PORT | 8480 | false | - | | VM_VMCLUSTERDEFAULT_VMINSERTDEFAULT_RESOURCE_LIMIT_MEM | 500Mi | false | - | | VM_VMCLUSTERDEFAULT_VMINSERTDEFAULT_RESOURCE_LIMIT_CPU | 500m | false | - | @@ -100,7 +100,7 @@ aliases: | VM_VMALERTMANAGER_RESOURCE_REQUEST_CPU | 30m | false | - | | VM_DISABLESELFSERVICESCRAPECREATION | false | false | - | | VM_VMBACKUP_IMAGE | victoriametrics/vmbackupmanager | false | - | -| VM_VMBACKUP_VERSION | v1.104.0-enterprise | false | - | +| VM_VMBACKUP_VERSION | v1.105.0-enterprise | false | - | | VM_VMBACKUP_PORT | 8300 | false | - | | VM_VMBACKUP_USEDEFAULTRESOURCES | true | false | - | | VM_VMBACKUP_RESOURCE_LIMIT_MEM | 500Mi | false | - | @@ -108,7 +108,7 @@ aliases: | VM_VMBACKUP_RESOURCE_REQUEST_MEM | 200Mi | false | - | | VM_VMBACKUP_RESOURCE_REQUEST_CPU | 150m | false | - | | VM_VMAUTHDEFAULT_IMAGE | victoriametrics/vmauth | false | - | -| VM_VMAUTHDEFAULT_VERSION | v1.104.0 | false | - | +| VM_VMAUTHDEFAULT_VERSION | v1.105.0 | false | - | | VM_VMAUTHDEFAULT_CONFIGRELOADIMAGE | quay.io/prometheus-operator/prometheus-config-reloader:v0.68.0 | false | - | | VM_VMAUTHDEFAULT_PORT | 8427 | false | - | | VM_VMAUTHDEFAULT_USEDEFAULTRESOURCES | true | false | - | @@ -136,4 +136,4 @@ aliases: | VM_PODWAITREADYINTERVALCHECK | 5s | false | Defines poll interval for pods ready check at statefulset rollout update | | VM_FORCERESYNCINTERVAL | 60s | false | configures force resync interval for VMAgent, VMAlert, VMAlertmanager and VMAuth. | | VM_ENABLESTRICTSECURITY | false | false | EnableStrictSecurity will add default `securityContext` to pods and containers created by operator Default PodSecurityContext include: 1. RunAsNonRoot: true 2. RunAsUser/RunAsGroup/FSGroup: 65534 '65534' refers to 'nobody' in all the used default images like alpine, busybox. If you're using customize image, please make sure '65534' is a valid uid in there or specify SecurityContext. 3. FSGroupChangePolicy: &onRootMismatch If KubeVersion>=1.20, use `FSGroupChangePolicy="onRootMismatch"` to skip the recursive permission change when the root of the volume already has the correct permissions 4. SeccompProfile: type: RuntimeDefault Use `RuntimeDefault` seccomp profile by default, which is defined by the container runtime, instead of using the Unconfined (seccomp disabled) mode. Default container SecurityContext include: 1. AllowPrivilegeEscalation: false 2. ReadOnlyRootFilesystem: true 3. Capabilities: drop: - all turn off `EnableStrictSecurity` by default, see https://github.com/VictoriaMetrics/operator/issues/749 for details | -[envconfig-sum]: 41649232efe6d908b9a973655bf62dd3 \ No newline at end of file +[envconfig-sum]: f319004a92b62b1dad0c3e51323365dc \ No newline at end of file From ac82b5aea657de37128996cede9e376242efd79a Mon Sep 17 00:00:00 2001 From: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:04:48 +0300 Subject: [PATCH 05/90] Automatic update helm docs from VictoriaMetrics/helm-charts@999d44f (#7316) Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Signed-off-by: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Co-authored-by: f41gh7 <18450869+f41gh7@users.noreply.github.com> --- docs/helm/victoria-logs-single/CHANGELOG.md | 2 +- docs/helm/victoria-logs-single/README.md | 57 +++---------------- docs/helm/victoria-metrics-agent/CHANGELOG.md | 9 +++ docs/helm/victoria-metrics-agent/README.md | 2 +- docs/helm/victoria-metrics-alert/CHANGELOG.md | 9 +++ docs/helm/victoria-metrics-alert/README.md | 2 +- docs/helm/victoria-metrics-auth/CHANGELOG.md | 9 +++ docs/helm/victoria-metrics-auth/README.md | 2 +- .../victoria-metrics-cluster/CHANGELOG.md | 9 +++ docs/helm/victoria-metrics-cluster/README.md | 2 +- .../victoria-metrics-distributed/CHANGELOG.md | 10 ++++ .../victoria-metrics-distributed/README.md | 2 +- .../victoria-metrics-gateway/CHANGELOG.md | 9 +++ docs/helm/victoria-metrics-gateway/README.md | 2 +- .../victoria-metrics-k8s-stack/CHANGELOG.md | 10 ++++ .../helm/victoria-metrics-k8s-stack/README.md | 2 +- .../helm/victoria-metrics-single/CHANGELOG.md | 9 +++ docs/helm/victoria-metrics-single/README.md | 2 +- 18 files changed, 90 insertions(+), 59 deletions(-) diff --git a/docs/helm/victoria-logs-single/CHANGELOG.md b/docs/helm/victoria-logs-single/CHANGELOG.md index 2b0975302..c1d1504c1 100644 --- a/docs/helm/victoria-logs-single/CHANGELOG.md +++ b/docs/helm/victoria-logs-single/CHANGELOG.md @@ -1,6 +1,6 @@ ## Next release -- TODO +- Custom fluent-bit template to push data to multiple VLogs instances when replica count is greated than 1. ## 0.6.6 diff --git a/docs/helm/victoria-logs-single/README.md b/docs/helm/victoria-logs-single/README.md index a83361181..1a0dcd634 100644 --- a/docs/helm/victoria-logs-single/README.md +++ b/docs/helm/victoria-logs-single/README.md @@ -175,26 +175,15 @@ Change the values according to the need of the environment in ``victoria-logs-si Nested_under kubernetes Add_prefix kubernetes_ outputs: | - [OUTPUT] - Name http - Match kube.* - Host {{ include "victoria-logs.server.fullname" . }} - port 9428 - compress gzip - uri /insert/jsonline - format json_lines - json_date_format iso8601 - header AccountID 0 - header ProjectID 0 - header VL-Msg-Field log - header VL-Time-Field date - header VL-Stream-Fields stream,kubernetes_pod_name,kubernetes_container_name,kubernetes_namespace_name + @INCLUDE /fluent-bit/etc/conf/vl/output_*.conf daemonSetVolumeMounts: - mountPath: /var/log name: varlog - mountPath: /var/lib/docker/containers name: varlibdockercontainers readOnly: true + - mountPath: /fluent-bit/etc/conf/vl + name: victorialogs-outputs daemonSetVolumes: - hostPath: path: /var/log @@ -202,6 +191,9 @@ daemonSetVolumes: - hostPath: path: /var/lib/docker/containers name: varlibdockercontainers + - configMap: + name: victorialogs-outputs + name: victorialogs-outputs enabled: false resources: {} @@ -241,20 +233,7 @@ resources: {} tpl
 fluent-bit.config.outputs: |
-  [OUTPUT]
-      Name             http
-      Match            kube.*
-      Host             {{ include "victoria-logs.server.fullname" . }}
-      port             9428
-      compress         gzip
-      uri              /insert/jsonline
-      format           json_lines
-      json_date_format iso8601
-      header           AccountID 0
-      header           ProjectID 0
-      header           VL-Msg-Field log
-      header           VL-Time-Field date
-      header           VL-Stream-Fields stream,kubernetes_pod_name,kubernetes_container_name,kubernetes_namespace_name
+  @INCLUDE /fluent-bit/etc/conf/vl/output_*.conf
  
 
 
@@ -316,28 +295,6 @@ resources: {}

Global name override

- - - - global.victoriaLogs.server.fullnameOverride - string -
-null
-
-
- -

Overrides the full name of server component

- - - - global.victoriaLogs.server.name - string -
-server
-
-
- -

Server container name

diff --git a/docs/helm/victoria-metrics-agent/CHANGELOG.md b/docs/helm/victoria-metrics-agent/CHANGELOG.md index 89526a454..5def3c0f6 100644 --- a/docs/helm/victoria-metrics-agent/CHANGELOG.md +++ b/docs/helm/victoria-metrics-agent/CHANGELOG.md @@ -2,6 +2,15 @@ - TODO +## 0.14.3 + +**Release date:** 2024-10-21 + +![AppVersion: v1.105.0](https://img.shields.io/static/v1?label=AppVersion&message=v1.105.0&color=success&logo=) +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + +- bump version of VM components to [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0) + ## 0.14.2 **Release date:** 2024-10-11 diff --git a/docs/helm/victoria-metrics-agent/README.md b/docs/helm/victoria-metrics-agent/README.md index 674b178ee..74733c3d0 100644 --- a/docs/helm/victoria-metrics-agent/README.md +++ b/docs/helm/victoria-metrics-agent/README.md @@ -1,4 +1,4 @@ -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.14.2](https://img.shields.io/badge/Version-0.14.2-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.14.3](https://img.shields.io/badge/Version-0.14.3-informational?style=flat-square) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-agent) [![Slack](https://img.shields.io/badge/join%20slack-%23victoriametrics-brightgreen.svg)](https://slack.victoriametrics.com/) diff --git a/docs/helm/victoria-metrics-alert/CHANGELOG.md b/docs/helm/victoria-metrics-alert/CHANGELOG.md index a83f248bd..5ef621af6 100644 --- a/docs/helm/victoria-metrics-alert/CHANGELOG.md +++ b/docs/helm/victoria-metrics-alert/CHANGELOG.md @@ -2,6 +2,15 @@ - TODO +## 0.12.3 + +**Release date:** 2024-10-21 + +![AppVersion: v1.105.0](https://img.shields.io/static/v1?label=AppVersion&message=v1.105.0&color=success&logo=) +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + +- bump version of VM components to [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0) + ## 0.12.2 **Release date:** 2024-10-11 diff --git a/docs/helm/victoria-metrics-alert/README.md b/docs/helm/victoria-metrics-alert/README.md index aed4e209c..c1d27ab0b 100644 --- a/docs/helm/victoria-metrics-alert/README.md +++ b/docs/helm/victoria-metrics-alert/README.md @@ -1,4 +1,4 @@ -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.12.2](https://img.shields.io/badge/Version-0.12.2-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.12.3](https://img.shields.io/badge/Version-0.12.3-informational?style=flat-square) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-alert) [![Slack](https://img.shields.io/badge/join%20slack-%23victoriametrics-brightgreen.svg)](https://slack.victoriametrics.com/) diff --git a/docs/helm/victoria-metrics-auth/CHANGELOG.md b/docs/helm/victoria-metrics-auth/CHANGELOG.md index ae2c4ca19..8edcd95db 100644 --- a/docs/helm/victoria-metrics-auth/CHANGELOG.md +++ b/docs/helm/victoria-metrics-auth/CHANGELOG.md @@ -2,6 +2,15 @@ - TODO +## 0.7.3 + +**Release date:** 2024-10-21 + +![AppVersion: v1.105.0](https://img.shields.io/static/v1?label=AppVersion&message=v1.105.0&color=success&logo=) +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + +- bump version of VM components to [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0) + ## 0.7.2 **Release date:** 2024-10-11 diff --git a/docs/helm/victoria-metrics-auth/README.md b/docs/helm/victoria-metrics-auth/README.md index dd48bca47..9d12c7b84 100644 --- a/docs/helm/victoria-metrics-auth/README.md +++ b/docs/helm/victoria-metrics-auth/README.md @@ -1,4 +1,4 @@ -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.7.2](https://img.shields.io/badge/Version-0.7.2-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.7.3](https://img.shields.io/badge/Version-0.7.3-informational?style=flat-square) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-auth) [![Slack](https://img.shields.io/badge/join%20slack-%23victoriametrics-brightgreen.svg)](https://slack.victoriametrics.com/) diff --git a/docs/helm/victoria-metrics-cluster/CHANGELOG.md b/docs/helm/victoria-metrics-cluster/CHANGELOG.md index 413b6edcb..ce463b254 100644 --- a/docs/helm/victoria-metrics-cluster/CHANGELOG.md +++ b/docs/helm/victoria-metrics-cluster/CHANGELOG.md @@ -2,6 +2,15 @@ - TODO +## 0.14.6 + +**Release date:** 2024-10-21 + +![AppVersion: v1.105.0](https://img.shields.io/static/v1?label=AppVersion&message=v1.105.0&color=success&logo=) +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + +- bump version of VM components to [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0) + ## 0.14.5 **Release date:** 2024-10-18 diff --git a/docs/helm/victoria-metrics-cluster/README.md b/docs/helm/victoria-metrics-cluster/README.md index 5c3c140c7..05e6eba2b 100644 --- a/docs/helm/victoria-metrics-cluster/README.md +++ b/docs/helm/victoria-metrics-cluster/README.md @@ -1,4 +1,4 @@ -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.14.5](https://img.shields.io/badge/Version-0.14.5-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.14.6](https://img.shields.io/badge/Version-0.14.6-informational?style=flat-square) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-cluster) [![Slack](https://img.shields.io/badge/join%20slack-%23victoriametrics-brightgreen.svg)](https://slack.victoriametrics.com/) diff --git a/docs/helm/victoria-metrics-distributed/CHANGELOG.md b/docs/helm/victoria-metrics-distributed/CHANGELOG.md index 3f34b6ae7..68e385b4c 100644 --- a/docs/helm/victoria-metrics-distributed/CHANGELOG.md +++ b/docs/helm/victoria-metrics-distributed/CHANGELOG.md @@ -1,6 +1,16 @@ ## Next release +- TODO + +## 0.4.1 + +**Release date:** 2024-10-21 + +![AppVersion: v1.105.0](https://img.shields.io/static/v1?label=AppVersion&message=v1.105.0&color=success&logo=) +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + - Human-readable error about Helm version requirement +- bump version of VM components to [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0) ## 0.4.0 diff --git a/docs/helm/victoria-metrics-distributed/README.md b/docs/helm/victoria-metrics-distributed/README.md index 10adaf973..3a17821e4 100644 --- a/docs/helm/victoria-metrics-distributed/README.md +++ b/docs/helm/victoria-metrics-distributed/README.md @@ -1,4 +1,4 @@ -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.4.1](https://img.shields.io/badge/Version-0.4.1-informational?style=flat-square) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-distributed) [![Slack](https://img.shields.io/badge/join%20slack-%23victoriametrics-brightgreen.svg)](https://slack.victoriametrics.com/) diff --git a/docs/helm/victoria-metrics-gateway/CHANGELOG.md b/docs/helm/victoria-metrics-gateway/CHANGELOG.md index c1b6d6bee..24dfc676b 100644 --- a/docs/helm/victoria-metrics-gateway/CHANGELOG.md +++ b/docs/helm/victoria-metrics-gateway/CHANGELOG.md @@ -2,6 +2,15 @@ - TODO +## 0.5.3 + +**Release date:** 2024-10-21 + +![AppVersion: v1.105.0](https://img.shields.io/static/v1?label=AppVersion&message=v1.105.0&color=success&logo=) +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + +- bump version of VM components to [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0) + ## 0.5.2 **Release date:** 2024-10-11 diff --git a/docs/helm/victoria-metrics-gateway/README.md b/docs/helm/victoria-metrics-gateway/README.md index dc9861fcc..2def47ea7 100644 --- a/docs/helm/victoria-metrics-gateway/README.md +++ b/docs/helm/victoria-metrics-gateway/README.md @@ -1,4 +1,4 @@ -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.5.2](https://img.shields.io/badge/Version-0.5.2-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.5.3](https://img.shields.io/badge/Version-0.5.3-informational?style=flat-square) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-gateway) [![Slack](https://img.shields.io/badge/join%20slack-%23victoriametrics-brightgreen.svg)](https://slack.victoriametrics.com/) diff --git a/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md b/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md index 7889fdd35..b4d2d9bb4 100644 --- a/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md +++ b/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md @@ -1,6 +1,16 @@ ## Next release +- TODO + +## 0.27.6 + +**Release date:** 2024-10-21 + +![AppVersion: v1.105.0](https://img.shields.io/static/v1?label=AppVersion&message=v1.105.0&color=success&logo=) +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + - Add an explicit fail in case both Grafana dashboard via sidecar and `grafana.dashboards` are enabled. Previously, this configuration would be accepted and sidecar configuration would silently override `.grafana.dashboards` configuration. See [these docs](https://docs.victoriametrics.com/helm/victoriametrics-k8s-stack/#adding-external-dashboards) for information about adding external dashboards. +- bump version of VM components to [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0) ## 0.27.5 diff --git a/docs/helm/victoria-metrics-k8s-stack/README.md b/docs/helm/victoria-metrics-k8s-stack/README.md index fb51a8046..8be2e1bf7 100644 --- a/docs/helm/victoria-metrics-k8s-stack/README.md +++ b/docs/helm/victoria-metrics-k8s-stack/README.md @@ -1,4 +1,4 @@ -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.27.5](https://img.shields.io/badge/Version-0.27.5-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.27.6](https://img.shields.io/badge/Version-0.27.6-informational?style=flat-square) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-k8s-stack) Kubernetes monitoring on VictoriaMetrics stack. Includes VictoriaMetrics Operator, Grafana dashboards, ServiceScrapes and VMRules diff --git a/docs/helm/victoria-metrics-single/CHANGELOG.md b/docs/helm/victoria-metrics-single/CHANGELOG.md index 17cad4661..aa1cf9179 100644 --- a/docs/helm/victoria-metrics-single/CHANGELOG.md +++ b/docs/helm/victoria-metrics-single/CHANGELOG.md @@ -2,6 +2,15 @@ - TODO +## 0.12.3 + +**Release date:** 2024-10-21 + +![AppVersion: v1.105.0](https://img.shields.io/static/v1?label=AppVersion&message=v1.105.0&color=success&logo=) +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + +- bump version of VM components to [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0) + ## 0.12.2 **Release date:** 2024-10-11 diff --git a/docs/helm/victoria-metrics-single/README.md b/docs/helm/victoria-metrics-single/README.md index 38a708cff..fb73d7a1d 100644 --- a/docs/helm/victoria-metrics-single/README.md +++ b/docs/helm/victoria-metrics-single/README.md @@ -1,4 +1,4 @@ -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.12.2](https://img.shields.io/badge/Version-0.12.2-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.12.3](https://img.shields.io/badge/Version-0.12.3-informational?style=flat-square) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-single) Victoria Metrics Single version - high-performance, cost-effective and scalable TSDB, long-term remote storage for Prometheus From d656934d220848121bad418375f60aa9ed01b2a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Desch=C3=AAnes?= Date: Tue, 22 Oct 2024 08:13:56 -0400 Subject: [PATCH 06/90] vmalert: properly set `group_name` and `file` fields for recording rules (#7298) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit properly adds `group_name` and `file` fields for recording rules web api response at `/api/v1/rules`. Previously these fields were blank. Related issue https://github.com/victoriaMetrics/victoriaMetrics/issues/7297 Signed-off-by: Antoine DeschĂŞnes --- app/vmalert/web_types.go | 6 +++-- app/vmalert/web_types_test.go | 47 +++++++++++++++++++++++++++++++++++ docs/changelog/CHANGELOG.md | 2 ++ 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/app/vmalert/web_types.go b/app/vmalert/web_types.go index 639236591..31423b8f2 100644 --- a/app/vmalert/web_types.go +++ b/app/vmalert/web_types.go @@ -215,8 +215,10 @@ func recordingToAPI(rr *rule.RecordingRule) apiRule { Updates: rule.GetAllRuleState(rr), // encode as strings to avoid rounding - ID: fmt.Sprintf("%d", rr.ID()), - GroupID: fmt.Sprintf("%d", rr.GroupID), + ID: fmt.Sprintf("%d", rr.ID()), + GroupID: fmt.Sprintf("%d", rr.GroupID), + GroupName: rr.GroupName, + File: rr.File, } if lastState.Err != nil { r.LastError = lastState.Err.Error() diff --git a/app/vmalert/web_types_test.go b/app/vmalert/web_types_test.go index 40f5404a3..61574c170 100644 --- a/app/vmalert/web_types_test.go +++ b/app/vmalert/web_types_test.go @@ -1,9 +1,56 @@ package main import ( + "fmt" + "github.com/VictoriaMetrics/VictoriaMetrics/app/vmalert/config" + "github.com/VictoriaMetrics/VictoriaMetrics/app/vmalert/datasource" + "github.com/VictoriaMetrics/VictoriaMetrics/app/vmalert/rule" + "reflect" "testing" ) +func TestRecordingToApi(t *testing.T) { + fq := &datasource.FakeQuerier{} + fq.Add(datasource.Metric{ + Values: []float64{1}, Timestamps: []int64{0}, + }) + g := &rule.Group{ + Name: "group", + File: "rules.yaml", + Concurrency: 1, + } + + entriesLimit := 44 + rr := rule.NewRecordingRule(fq, g, config.Rule{ + ID: 1248, + Record: "record_name", + Expr: "up", + Labels: map[string]string{"label": "value"}, + UpdateEntriesLimit: &entriesLimit, + }) + + expectedRes := apiRule{ + Name: "record_name", + Query: "up", + Labels: map[string]string{"label": "value"}, + Health: "ok", + Type: ruleTypeRecording, + DatasourceType: "prometheus", + ID: "1248", + GroupID: fmt.Sprintf("%d", g.ID()), + GroupName: "group", + File: "rules.yaml", + MaxUpdates: 44, + Updates: make([]rule.StateEntry, 0), + } + + res := recordingToAPI(rr) + + if !reflect.DeepEqual(res, expectedRes) { + t.Fatalf("expected to have: \n%v;\ngot: \n%v", expectedRes, res) + } +} + func TestUrlValuesToStrings(t *testing.T) { mapQueryParams := map[string][]string{ "param1": {"param1"}, diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 4dfc658a7..50d3fb9cf 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -18,6 +18,8 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). ## tip +* BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert): properly set `group_name` and `file` fields for recording rules in `/api/v1/rules`. + ## [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0) Released at 2024-10-21 From 0204ce942dec5c8182900b629698cf0b46ef4211 Mon Sep 17 00:00:00 2001 From: Roman Khavronenko Date: Tue, 22 Oct 2024 14:43:55 +0200 Subject: [PATCH 07/90] app/vmalert: update `-remoteWrite.concurrency` and `-remoteWrite.flushInterval` (#7272) Auto-adjust `-remoteWrite.concurrency` cmd-line flags with the number of available CPU cores in the same way as vmagent does. With this change the default behavior of vmalert in high-loaded installation should become more resilient. This change also reduces `-remoteWrite.flushInterval` from `5s` to `2s` to provide better data freshness. --------- Signed-off-by: hagen1778 Co-authored-by: Nikolay --- app/vmalert/remotewrite/client.go | 10 ++++++---- app/vmalert/remotewrite/init.go | 8 ++++---- docs/changelog/CHANGELOG.md | 1 + docs/vmalert.md | 2 +- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/app/vmalert/remotewrite/client.go b/app/vmalert/remotewrite/client.go index 836a6ef85..1b2ec9d38 100644 --- a/app/vmalert/remotewrite/client.go +++ b/app/vmalert/remotewrite/client.go @@ -15,6 +15,7 @@ import ( "github.com/golang/snappy" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/cgroup" "github.com/VictoriaMetrics/VictoriaMetrics/lib/logger" "github.com/VictoriaMetrics/VictoriaMetrics/lib/netutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/promauth" @@ -22,11 +23,12 @@ import ( "github.com/VictoriaMetrics/metrics" ) +var defaultConcurrency = cgroup.AvailableCPUs() * 2 + const ( - defaultConcurrency = 4 - defaultMaxBatchSize = 1e3 - defaultMaxQueueSize = 1e5 - defaultFlushInterval = 5 * time.Second + defaultMaxBatchSize = 1e4 + defaultMaxQueueSize = 1e6 + defaultFlushInterval = 2 * time.Second defaultWriteTimeout = 30 * time.Second ) diff --git a/app/vmalert/remotewrite/init.go b/app/vmalert/remotewrite/init.go index 9112ef542..aa61cddfc 100644 --- a/app/vmalert/remotewrite/init.go +++ b/app/vmalert/remotewrite/init.go @@ -34,10 +34,10 @@ var ( idleConnectionTimeout = flag.Duration("remoteWrite.idleConnTimeout", 50*time.Second, `Defines a duration for idle (keep-alive connections) to exist. Consider settings this value less to the value of "-http.idleConnTimeout". It must prevent possible "write: broken pipe" and "read: connection reset by peer" errors.`) - maxQueueSize = flag.Int("remoteWrite.maxQueueSize", 1e6, "Defines the max number of pending datapoints to remote write endpoint") - maxBatchSize = flag.Int("remoteWrite.maxBatchSize", 1e4, "Defines max number of timeseries to be flushed at once") - concurrency = flag.Int("remoteWrite.concurrency", 4, "Defines number of writers for concurrent writing into remote write endpoint") - flushInterval = flag.Duration("remoteWrite.flushInterval", 5*time.Second, "Defines interval of flushes to remote write endpoint") + maxQueueSize = flag.Int("remoteWrite.maxQueueSize", defaultMaxQueueSize, "Defines the max number of pending datapoints to remote write endpoint") + maxBatchSize = flag.Int("remoteWrite.maxBatchSize", defaultMaxBatchSize, "Defines max number of timeseries to be flushed at once") + concurrency = flag.Int("remoteWrite.concurrency", defaultConcurrency, "Defines number of writers for concurrent writing into remote write endpoint") + flushInterval = flag.Duration("remoteWrite.flushInterval", defaultFlushInterval, "Defines interval of flushes to remote write endpoint") tlsInsecureSkipVerify = flag.Bool("remoteWrite.tlsInsecureSkipVerify", false, "Whether to skip tls verification when connecting to -remoteWrite.url") tlsCertFile = flag.String("remoteWrite.tlsCertFile", "", "Optional path to client-side TLS certificate file to use when connecting to -remoteWrite.url") diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 50d3fb9cf..02f271523 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -17,6 +17,7 @@ The sandbox cluster installation runs under the constant load generated by See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). ## tip +* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert/): `-rule` cmd-line flag now supports multi-document YAML files. This could be useful when rules are retrieved via HTTP URL where multiple rule files were merged together in one response. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6753). Thanks to @Irene-123 for [the pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6995). * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert): properly set `group_name` and `file` fields for recording rules in `/api/v1/rules`. diff --git a/docs/vmalert.md b/docs/vmalert.md index 107ff7f88..cce31e75a 100644 --- a/docs/vmalert.md +++ b/docs/vmalert.md @@ -1373,7 +1373,7 @@ The shortlist of configuration flags is the following: -remoteWrite.disablePathAppend Whether to disable automatic appending of '/api/v1/write' path to the configured -remoteWrite.url. -remoteWrite.flushInterval duration - Defines interval of flushes to remote write endpoint (default 5s) + Defines interval of flushes to remote write endpoint (default 2s) -remoteWrite.headers string Optional HTTP headers to send with each request to the corresponding -remoteWrite.url. For example, -remoteWrite.headers='My-Auth:foobar' would send 'My-Auth: foobar' HTTP header with every request to the corresponding -remoteWrite.url. Multiple headers must be delimited by '^^': -remoteWrite.headers='header1:value1^^header2:value2' -remoteWrite.idleConnTimeout duration From 5ee3bc98d6ade136cd2806fefcabcdb1d023f9a8 Mon Sep 17 00:00:00 2001 From: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Date: Wed, 23 Oct 2024 02:27:32 +0300 Subject: [PATCH 08/90] Automatic update helm docs from VictoriaMetrics/helm-charts@6237358 (#7327) Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Signed-off-by: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Co-authored-by: AndrewChubatiuk <3162380+AndrewChubatiuk@users.noreply.github.com> --- .../victoria-metrics-anomaly/CHANGELOG.md | 9 +++++++ docs/helm/victoria-metrics-anomaly/README.md | 2 +- .../victoria-metrics-k8s-stack/CHANGELOG.md | 2 +- .../helm/victoria-metrics-k8s-stack/README.md | 26 +++++++++---------- .../victoria-metrics-operator/CHANGELOG.md | 9 +++++++ docs/helm/victoria-metrics-operator/README.md | 14 +++++----- 6 files changed, 40 insertions(+), 22 deletions(-) diff --git a/docs/helm/victoria-metrics-anomaly/CHANGELOG.md b/docs/helm/victoria-metrics-anomaly/CHANGELOG.md index d1ea8fb01..2179b2834 100644 --- a/docs/helm/victoria-metrics-anomaly/CHANGELOG.md +++ b/docs/helm/victoria-metrics-anomaly/CHANGELOG.md @@ -2,6 +2,15 @@ - TODO +## 1.6.2 + +**Release date:** 2024-10-22 + +![AppVersion: v1.17.2](https://img.shields.io/static/v1?label=AppVersion&message=v1.17.2&color=success&logo=) +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + +- Upgraded [`vmanomaly`](https://docs.victoriametrics.com/anomaly-detection/) to [1.17.2](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1172) + ## 1.6.1 **Release date:** 2024-10-18 diff --git a/docs/helm/victoria-metrics-anomaly/README.md b/docs/helm/victoria-metrics-anomaly/README.md index 40df59920..2b2cf5732 100644 --- a/docs/helm/victoria-metrics-anomaly/README.md +++ b/docs/helm/victoria-metrics-anomaly/README.md @@ -1,4 +1,4 @@ -![Version: 1.6.1](https://img.shields.io/badge/Version-1.6.1-informational?style=flat-square) +![Version: 1.6.2](https://img.shields.io/badge/Version-1.6.2-informational?style=flat-square) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-anomaly) [![Slack](https://img.shields.io/badge/join%20slack-%23victoriametrics-brightgreen.svg)](https://slack.victoriametrics.com/) [![GitHub license](https://img.shields.io/github/license/VictoriaMetrics/VictoriaMetrics.svg)](https://github.com/VictoriaMetrics/helm-charts/blob/master/LICENSE) diff --git a/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md b/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md index b4d2d9bb4..a3c4eb2c3 100644 --- a/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md +++ b/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md @@ -1,6 +1,6 @@ ## Next release -- TODO +- Removed crds subchart as it's now included in operator ## 0.27.6 diff --git a/docs/helm/victoria-metrics-k8s-stack/README.md b/docs/helm/victoria-metrics-k8s-stack/README.md index 8be2e1bf7..c000576ec 100644 --- a/docs/helm/victoria-metrics-k8s-stack/README.md +++ b/docs/helm/victoria-metrics-k8s-stack/README.md @@ -638,17 +638,6 @@ selectAllByDefault: true

Spec for VMServiceScrape CRD is here

- - - - crds - object -
-enabled: true
-
-
- -

Install VM operator CRDs

@@ -2114,13 +2103,13 @@ selector: victoria-metrics-operator object
-crd:
+crds:
     cleanup:
         enabled: true
         image:
             pullPolicy: IfNotPresent
             repository: bitnami/kubectl
-    create: false
+    plain: true
 enabled: true
 operator:
     disable_prometheus_converter: false
@@ -2130,6 +2119,17 @@ serviceMonitor:
 

VictoriaMetrics Operator dependency chart configuration. More values can be found here. Also checkout here possible ENV variables to configure operator behaviour

+ + + + victoria-metrics-operator.crds.plain + bool +
+true
+
+
+ +

added temporary, till new operator version released

diff --git a/docs/helm/victoria-metrics-operator/CHANGELOG.md b/docs/helm/victoria-metrics-operator/CHANGELOG.md index 7d1da442b..56d07e8f9 100644 --- a/docs/helm/victoria-metrics-operator/CHANGELOG.md +++ b/docs/helm/victoria-metrics-operator/CHANGELOG.md @@ -2,6 +2,15 @@ - TODO +## 0.36.0 + +**Release date:** 2024-10-22 + +![AppVersion: v0.48.4](https://img.shields.io/static/v1?label=AppVersion&message=v0.48.4&color=success&logo=) +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + +- replaced `crd.enabled` property to `crds.plain`. Instead of disabling CRDs it selects if CRDs should be rendered from template or as plain CRDs + ## 0.35.5 **Release date:** 2024-10-15 diff --git a/docs/helm/victoria-metrics-operator/README.md b/docs/helm/victoria-metrics-operator/README.md index 7f04f0ad8..fe5c91682 100644 --- a/docs/helm/victoria-metrics-operator/README.md +++ b/docs/helm/victoria-metrics-operator/README.md @@ -1,4 +1,4 @@ -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.35.5](https://img.shields.io/badge/Version-0.35.5-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.36.0](https://img.shields.io/badge/Version-0.36.0-informational?style=flat-square) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-operator) Victoria Metrics Operator @@ -311,7 +311,7 @@ issuer: {} - crd.cleanup.enabled + crds.cleanup.enabled bool
 false
@@ -322,7 +322,7 @@ issuer: {}
 
     
     
-      crd.cleanup.image
+      crds.cleanup.image
       object
       
 pullPolicy: IfNotPresent
@@ -335,7 +335,7 @@ tag: ""
 
     
     
-      crd.cleanup.resources
+      crds.cleanup.resources
       object
       
 limits:
@@ -351,14 +351,14 @@ requests:
 
     
     
-      crd.create
+      crds.plain
       bool
       
-true
+false
 
 
-

Enables CRD creation and management. With this option, if you remove this chart, all CRD resources will be deleted with it.

+

check if plain or templated CRDs should be created. with this option set to false, all CRDs will be rendered from templates. with this option set to true, all CRDs are immutable and require manual upgrade.

From 7e53324f5db00a0fed5668a1931362755cce4353 Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Wed, 23 Oct 2024 11:47:50 +0200 Subject: [PATCH 09/90] docs: clarify that vminsert also supports exponential histogram parsing Signed-off-by: hagen1778 --- docs/changelog/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 02f271523..b5e0fb0c1 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -27,7 +27,7 @@ Released at 2024-10-21 **Update note 1: `-search.maxUniqueTimeseries` limit on `vmselect` can no longer exceed `-search.maxUniqueTimeseries` limit on `vmstorage`. If you don't set this flag at `vmstorage`, then it will be automatically calculated based on available resources. This can result into rejecting expensive read queries if they exceed auto-calculated limit. The limit can be overriden by manually setting `-search.maxUniqueTimeseries` at vmstorage, but for better reliability we recommend sticking to default values. Refer to the CHANGELOG below and [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6930).** -* FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent/) and [Single-node VictoriaMetrics](https://docs.victoriametrics.com/): add support of [exponential histograms](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#exponentialhistogram) ingested via [OpenTelemetry protocol for metrics](https://docs.victoriametrics.com/#sending-data-via-opentelemetry). Such histograms will be automatically converted to [VictoriaMetrics histogram format](https://valyala.medium.com/improving-histogram-usability-for-prometheus-and-grafana-bc7e5df0e350). See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6354). +* FEATURE: [vmsingle](https://docs.victoriametrics.com/single-server-victoriametrics/), `vminsert` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/) and [vmagent](https://docs.victoriametrics.com/vmagent/): add support of [exponential histograms](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#exponentialhistogram) ingested via [OpenTelemetry protocol for metrics](https://docs.victoriametrics.com/#sending-data-via-opentelemetry). Such histograms will be automatically converted to [VictoriaMetrics histogram format](https://valyala.medium.com/improving-histogram-usability-for-prometheus-and-grafana-bc7e5df0e350). See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6354). * FEATURE: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): automatically set `-search.maxUniqueTimeseries` limit based on available memory and `-search.maxConcurrentRequests`. The more memory is available to the process and the lower is `-search.maxConcurrentRequests`, the higher will be `-search.maxUniqueTimeseries` limit. This should protect vmstorage from expensive queries without the need to manually set `-search.maxUniqueTimeseries`. The calculated limit will be printed during process start-up logs and exposed as `vm_search_max_unique_timeseries` metric. Set `-search.maxUniqueTimeseries` manually to override auto calculation. Please note, `-search.maxUniqueTimeseries` on vmselect can't exceed the same name limit on vmstorage, it can only be set to lower values. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6930). * FEATURE: [vmsingle](https://docs.victoriametrics.com/single-server-victoriametrics/), `vminsert` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/) and [vmagent](https://docs.victoriametrics.com/vmagent/): disable stream processing mode for data [ingested via InfluxDB](https://docs.victoriametrics.com/#how-to-send-data-from-influxdb-compatible-agents-such-as-telegraf) HTTP endpoints by default. With this change, the data is processed in batches (see `-influx.maxRequestSize`) and user will get parsing errors immediately as they happen. This also improves users' experience and resiliency against thundering herd problems caused by clients without backoff policies like telegraf. To enable stream mode back, pass HTTP header `Stream-Mode: "1"` with each request. For data sent via TCP and UDP (see `-influxListenAddr`) protocols streaming processing remains enabled. * FEATURE: `vmselect` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): set default value for `-search.maxUniqueTimeseries` to `0`. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6930). From 6b9f57e5f7aede1c43bc64dc33eb5b5d744b6157 Mon Sep 17 00:00:00 2001 From: Artem Fetishev <149964189+rtm0@users.noreply.github.com> Date: Wed, 23 Oct 2024 11:48:21 +0200 Subject: [PATCH 10/90] lib/storage: Fix flaky test: TestStorageRotateIndexDB (#7267) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit fixes the TestStorageRotateIndexDB flaky test reported at: #6977. Sample test failure: https://pastebin.com/bTSs8HP1 The test fails because one goroutine adds items to the indexDB table while another goroutine is closing that table. This may happen if indexDB rotation happens twice during one Storage.add() operation: - Storage.add() takes the current indexDB and adds index recods to it - First index db rotation makes the current index DB a previous one (still ok at this point) - Second index db rotation removes the indexDB that was current two rotations earlier. It does this by setting the mustDrop flag to true and decrementing the ref counter. The ref counter reaches zero which cases the underlying indexdb table to release its resources gracefully. Graceful release assumes that the table is not written anymore. But Storage.add() still adds items to it. The solution is to increment the indexDB ref counters while it is used inside add(). The unit test has been changed a little so that the test fails reliably. The idea is to make add() function invocation to last much longer, therefore the test inserts not just one record at a time but thouthands of them. To see the test fail, just replace the idbsLocked() func with: ```go unc (s *Storage) idbsLocked2() (*indexDB, *indexDB, func()) {       return s.idbCurr.Load(), s.idbNext.Load(), func() {} } ``` --------- Signed-off-by: Artem Fetishev --- lib/storage/storage_test.go | 127 ++++++++++++++++++------------------ 1 file changed, 62 insertions(+), 65 deletions(-) diff --git a/lib/storage/storage_test.go b/lib/storage/storage_test.go index 5291bdb91..dcea69b36 100644 --- a/lib/storage/storage_test.go +++ b/lib/storage/storage_test.go @@ -1214,83 +1214,80 @@ func testStorageAddRows(rng *rand.Rand, s *Storage) error { } func TestStorageRotateIndexDB(t *testing.T) { - path := "TestStorageRotateIndexDB" - s := MustOpenStorage(path, 0, 0, 0) + defer testRemoveAll(t) - // Start indexDB rotater in a separate goroutine - stopCh := make(chan struct{}) - rotateDoneCh := make(chan struct{}) - go func() { - for { - select { - case <-stopCh: - close(rotateDoneCh) - return - default: - time.Sleep(time.Millisecond) - s.mustRotateIndexDB(time.Now()) - } - } - }() - - // Run concurrent workers that insert / select data from the storage. - ch := make(chan error, 3) - for i := 0; i < cap(ch); i++ { - go func(workerNum int) { - ch <- testStorageAddMetrics(s, workerNum) - }(i) + const ( + numRotations = 4 + numWorkers = 10 + numRows = 10000 + ) + tr := TimeRange{ + MinTimestamp: time.Now().UTC().Add(-numRows * time.Hour).UnixMilli(), + MaxTimestamp: time.Now().UTC().UnixMilli(), } - for i := 0; i < cap(ch); i++ { - select { - case err := <-ch: - if err != nil { - t.Fatalf("unexpected error: %s", err) - } - case <-time.After(10 * time.Second): - t.Fatalf("timeout") + s := MustOpenStorage(t.Name(), 0, 0, 0) + defer s.MustClose() + + insertAndRotateConcurrently := func(i int) (int, int) { + var wg sync.WaitGroup + for workerNum := range numWorkers { + wg.Add(1) + go func() { + time.Sleep(1 * time.Millisecond) + rng := rand.New(rand.NewSource(1)) + prefix := fmt.Sprintf("metric_%d_%d", i, workerNum) + mrs := testGenerateMetricRowsWithPrefix(rng, numRows, prefix, tr) + s.AddRows(mrs, defaultPrecisionBits) + wg.Done() + }() } + s.mustRotateIndexDB(time.Now()) + wg.Wait() + s.DebugFlush() + + idbCurr := s.idb() + idbPrev := idbCurr.extDB + isCurr := idbCurr.getIndexSearch(noDeadline) + defer idbCurr.putIndexSearch(isCurr) + isPrev := idbPrev.getIndexSearch(noDeadline) + defer idbPrev.putIndexSearch(isPrev) + + return testCountAllMetricNamesNoExtDB(isPrev, tr), testCountAllMetricNamesNoExtDB(isCurr, tr) } - close(stopCh) - <-rotateDoneCh + var oldCurr int + for i := range numRotations { + newPrev, newCurr := insertAndRotateConcurrently(i) - s.MustClose() - if err := os.RemoveAll(path); err != nil { - t.Fatalf("cannot remove %q: %s", path, err) + var m Metrics + s.UpdateMetrics(&m) + if got, want := m.TableMetrics.TotalRowsCount(), uint64(numWorkers*numRows*(i+1)); got != want { + t.Errorf("[rotation %d] unexpected row count: got %d, want %d", i, got, want) + } + + if got, want := newPrev-oldCurr+newCurr, numWorkers*numRows; got != want { + t.Errorf("[rotation %d] unexpected metric count count: got (%d - %d) + %d = %d, want %d", i, newPrev, oldCurr, newCurr, got, want) + } + oldCurr = newCurr } } -func testStorageAddMetrics(s *Storage, workerNum int) error { - rng := rand.New(rand.NewSource(1)) - const rowsCount = 1e3 - - var mn MetricName - mn.Tags = []Tag{ - {[]byte("job"), []byte(fmt.Sprintf("webservice_%d", workerNum))}, - {[]byte("instance"), []byte("1.2.3.4")}, +func testCountAllMetricNamesNoExtDB(is *indexSearch, tr TimeRange) int { + tfss := NewTagFilters() + if err := tfss.Add([]byte("__name__"), []byte(".*"), false, true); err != nil { + panic(fmt.Sprintf("unexpected error in TagFilters.Add: %v", err)) } - for i := 0; i < rowsCount; i++ { - mn.MetricGroup = []byte(fmt.Sprintf("metric_%d_%d", workerNum, rng.Intn(10))) - metricNameRaw := mn.marshalRaw(nil) - timestamp := rng.Int63n(1e10) - value := rng.NormFloat64() * 1e6 - - mr := MetricRow{ - MetricNameRaw: metricNameRaw, - Timestamp: timestamp, - Value: value, - } - s.AddRows([]MetricRow{mr}, defaultPrecisionBits) + metricIDs, err := is.searchMetricIDs(nil, []*TagFilters{tfss}, tr, 1e9) + if err != nil { + panic(fmt.Sprintf("searchMetricIDs failed unexpectedly: %v", err)) } - - // Verify the storage contains rows. - minRowsExpected := uint64(rowsCount) - var m Metrics - s.UpdateMetrics(&m) - if rowsCount := m.TableMetrics.TotalRowsCount(); rowsCount < minRowsExpected { - return fmt.Errorf("expecting at least %d rows in the table; got %d", minRowsExpected, rowsCount) + metricNames := map[string]bool{} + var metricName []byte + for _, metricID := range metricIDs { + metricName, _ = is.searchMetricName(metricName[:0], metricID) + metricNames[string(metricName)] = true } - return nil + return len(metricNames) } func TestStorageDeleteStaleSnapshots(t *testing.T) { From 6434fa2c4e516ea47ad96c33236f18b2fab7ad04 Mon Sep 17 00:00:00 2001 From: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Date: Wed, 23 Oct 2024 23:02:18 +0300 Subject: [PATCH 11/90] Automatic update Grafana datasource docs from VictoriaMetrics/victorialogs-datasource@12fc7d5 (#7340) --- docs/VictoriaLogs/victorialogs-datasource.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/VictoriaLogs/victorialogs-datasource.md b/docs/VictoriaLogs/victorialogs-datasource.md index cf78bb88e..f52bb9c9c 100644 --- a/docs/VictoriaLogs/victorialogs-datasource.md +++ b/docs/VictoriaLogs/victorialogs-datasource.md @@ -95,7 +95,7 @@ docker-compose -f docker-compose.yaml up After Grafana starts successfully, datasource should be available in the datasources tab -Configuration +![Configuration](provision_datasources.webp) ### Install in Kubernetes From ec0abe736a11329d1405134af83c72af93add605 Mon Sep 17 00:00:00 2001 From: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Date: Thu, 24 Oct 2024 07:20:06 +0300 Subject: [PATCH 12/90] Automatic update helm docs from VictoriaMetrics/helm-charts@f3aac52 (#7335) Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Signed-off-by: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Co-authored-by: AndrewChubatiuk <3162380+AndrewChubatiuk@users.noreply.github.com> Co-authored-by: Hui Wang --- docs/helm/victoria-logs-single/CHANGELOG.md | 3 +- docs/helm/victoria-logs-single/README.md | 65 +++++++- .../victoria-metrics-k8s-stack/CHANGELOG.md | 7 + .../helm/victoria-metrics-k8s-stack/README.md | 157 ++++++++++++------ 4 files changed, 180 insertions(+), 52 deletions(-) diff --git a/docs/helm/victoria-logs-single/CHANGELOG.md b/docs/helm/victoria-logs-single/CHANGELOG.md index c1d1504c1..f88c91c66 100644 --- a/docs/helm/victoria-logs-single/CHANGELOG.md +++ b/docs/helm/victoria-logs-single/CHANGELOG.md @@ -1,6 +1,7 @@ ## Next release -- Custom fluent-bit template to push data to multiple VLogs instances when replica count is greated than 1. +- Added grafana dashboard. See [this issue](https://github.com/VictoriaMetrics/helm-charts/issues/1590) +- Custom fluent-bit template to push data to multiple VLogs instances when replica count is greated than 1 ## 0.6.6 diff --git a/docs/helm/victoria-logs-single/README.md b/docs/helm/victoria-logs-single/README.md index 1a0dcd634..8f60fae62 100644 --- a/docs/helm/victoria-logs-single/README.md +++ b/docs/helm/victoria-logs-single/README.md @@ -1,4 +1,4 @@ - ![Version: 0.6.6](https://img.shields.io/badge/Version-0.6.6-informational?style=flat-square) + ![Version: 0.7.0](https://img.shields.io/badge/Version-0.7.0-informational?style=flat-square) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-logs-single) [![Slack](https://img.shields.io/badge/join%20slack-%23victoriametrics-brightgreen.svg)](https://slack.victoriametrics.com/) @@ -143,6 +143,69 @@ Change the values according to the need of the environment in ``victoria-logs-si Description + + dashboards.annotations + object +
+{}
+
+
+ +

Dashboard annotations

+ + + + dashboards.enabled + bool +
+false
+
+
+ +

Create VictoriaLogs dashboards

+ + + + dashboards.grafanaOperator.enabled + bool +
+false
+
+
+ + + + + dashboards.grafanaOperator.spec.allowCrossNamespaceImport + bool +
+false
+
+
+ + + + + dashboards.grafanaOperator.spec.instanceSelector.matchLabels.dashboards + string +
+grafana
+
+
+ + + + + dashboards.labels + object +
+{}
+
+
+ +

Dashboard labels

+ + extraObjects list diff --git a/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md b/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md index a3c4eb2c3..45a3c2a29 100644 --- a/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md +++ b/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md @@ -1,5 +1,12 @@ ## Next release +- Added alertmanager datasource. See [this issue](https://github.com/VictoriaMetrics/helm-charts/issues/1592) +- Renamed `grafana.sidecar.dashboards.additionalDashboardLabels` to `defaultDashboards.labels` +- Renamed `grafana.sidecar.dashboards.additionalDashboardAnnotations` to `defaultDashboards.annotations` +- Renamed `grafana.sidecar.datasources.default` to `defaultDatasources.victoriametrics.datasources` +- Renamed `grafana.additionalDataSources` to `defaultDatasources.extra` +- Renamed `grafana.defaultDashboardsTimezone` to `defaultDashboards.defaultTimezone` +- Removed `grafana.defaultDatasourceType` and default datasource type is picked from `defaultDatasources.victoriametrics.datasources[*].isDefault: true` - Removed crds subchart as it's now included in operator ## 0.27.6 diff --git a/docs/helm/victoria-metrics-k8s-stack/README.md b/docs/helm/victoria-metrics-k8s-stack/README.md index c000576ec..9c0e60c27 100644 --- a/docs/helm/victoria-metrics-k8s-stack/README.md +++ b/docs/helm/victoria-metrics-k8s-stack/README.md @@ -640,6 +640,16 @@ selectAllByDefault: true

Spec for VMServiceScrape CRD is here

+ + defaultDashboards.annotations + object +
+{}
+
+
+ + + defaultDashboards.dashboards object @@ -667,6 +677,16 @@ victoriametrics-vmalert:

In ArgoCD using client-side apply this dashboard reaches annotations size limit and causes k8s issues without server side apply See this issue

+ + defaultDashboards.defaultTimezone + string +
+utc
+
+
+ + + defaultDashboards.enabled bool @@ -678,16 +698,6 @@ victoriametrics-vmalert:

Enable custom dashboards installation

- - defaultDashboards.grafanaOperator.allowCrossNamespaceImport - bool -
-false
-
-
- - - defaultDashboards.grafanaOperator.enabled bool @@ -700,7 +710,17 @@ victoriametrics-vmalert: - defaultDashboards.grafanaOperator.instanceSelector.matchLabels.dashboards + defaultDashboards.grafanaOperator.spec.allowCrossNamespaceImport + bool +
+false
+
+
+ + + + + defaultDashboards.grafanaOperator.spec.instanceSelector.matchLabels.dashboards string
 grafana
@@ -709,6 +729,81 @@ victoriametrics-vmalert:
 
       
     
+    
+      defaultDashboards.labels
+      object
+      
+{}
+
+
+ + + + + defaultDatasources.alertmanager + object +
+datasources:
+    - access: proxy
+      jsonData:
+        implementation: prometheus
+      name: Alertmanager
+perReplica: false
+
+
+ +

List of alertmanager datasources. Alertmanager generated url will be added to each datasource in template if alertmanager is enabled

+ + + + defaultDatasources.alertmanager.perReplica + bool +
+false
+
+
+ +

Create per replica alertmanager compatible datasource

+ + + + defaultDatasources.extra + list +
+[]
+
+
+ +

Configure additional grafana datasources (passed through tpl). Check here for details

+ + + + defaultDatasources.victoriametrics.datasources + list +
+- isDefault: true
+  name: VictoriaMetrics
+  type: prometheus
+- isDefault: false
+  name: VictoriaMetrics (DS)
+  type: victoriametrics-datasource
+
+
+ +

List of prometheus compatible datasource configurations. VM url will be added to each of them in templates.

+ + + + defaultDatasources.victoriametrics.perReplica + bool +
+false
+
+
+ +

Create per replica prometheus compatible datasource

+ + defaultRules object @@ -1210,10 +1305,7 @@ keyRef: {} grafana object
-additionalDataSources: []
-defaultDashboardsTimezone: utc
-defaultDatasourceType: prometheus
-enabled: true
+enabled: true
 forceDeployDatasource: false
 ingress:
     annotations: {}
@@ -1227,8 +1319,6 @@ ingress:
     tls: []
 sidecar:
     dashboards:
-        additionalDashboardAnnotations: {}
-        additionalDashboardLabels: {}
         defaultFolderName: default
         enabled: true
         folder: /var/lib/grafana/dashboards
@@ -1237,13 +1327,6 @@ sidecar:
             name: default
             orgid: 1
     datasources:
-        createVMReplicasDatasources: false
-        default:
-            - isDefault: true
-              name: VictoriaMetrics
-            - isDefault: false
-              name: VictoriaMetrics (DS)
-              type: victoriametrics-datasource
         enabled: true
         initDatasources: true
 vmScrape:
@@ -1258,17 +1341,6 @@ vmScrape:
 

Grafana dependency chart configuration. For possible values refer here

- - - - grafana.additionalDataSources - list -
-[]
-
-
- -

Configure additional grafana datasources (passed through tpl). Check here for details

@@ -1291,21 +1363,6 @@ vmScrape:

Extra paths to prepend to every host configuration. This is useful when working with annotation based services.

- - - - grafana.sidecar.datasources.default - list -
-- isDefault: true
-  name: VictoriaMetrics
-- isDefault: false
-  name: VictoriaMetrics (DS)
-  type: victoriametrics-datasource
-
-
- -

List of default prometheus compatible datasource configurations. VM url will be added to each of them in templates and type will be set to defaultDatasourceType if not defined

From 53b7288e0d5da1d53779fe7919c141f242ad5165 Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Thu, 24 Oct 2024 12:09:30 +0200 Subject: [PATCH 13/90] docs: clarify that auto generated metrics can't be relabeled in scrape config Signed-off-by: hagen1778 --- docs/vmagent.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/vmagent.md b/docs/vmagent.md index 45a693a3e..74981aca8 100644 --- a/docs/vmagent.md +++ b/docs/vmagent.md @@ -567,6 +567,8 @@ and attaches `instance`, `job` and other target-specific labels to these metrics If the target exports metrics with names clashing with the automatically generated metric names, then `vmagent` automatically adds `exported_` prefix to these metric names, so they don't clash with automatically generated metric names. +Relabeling defined in `relabel_configs` or `metric_relabel_configs` of scrape config isn't applied to automatically +generated metrics. But they still can be relabeled via `-remoteWrite.relabelConfig` before sending metrics to remote address. ## Relabeling From 5fecb77f698b5e0001d9ffe450c37eac375fa58a Mon Sep 17 00:00:00 2001 From: Andrii Chubatiuk Date: Thu, 24 Oct 2024 15:57:58 +0300 Subject: [PATCH 14/90] app/vmctl: fix match expression for vm-native protocol with --vm-native-disable-per-metric-migration flag enabled (#7310) Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7309 ### Describe Your Changes Please provide a brief description of the changes you made. Be as specific as possible to help others understand the purpose and impact of your modifications. ### Checklist The following checks are **mandatory**: - [ ] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --------- Signed-off-by: hagen1778 Co-authored-by: hagen1778 --- app/vmctl/vm_native.go | 31 ++++++++++++++++--------------- app/vmctl/vm_native_test.go | 6 ++++++ docs/changelog/CHANGELOG.md | 2 ++ 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/app/vmctl/vm_native.go b/app/vmctl/vm_native.go index 618e1fdec..121a8bfa1 100644 --- a/app/vmctl/vm_native.go +++ b/app/vmctl/vm_native.go @@ -120,7 +120,7 @@ func (p *vmNativeProcessor) runSingle(ctx context.Context, f native.Filter, srcU if p.disablePerMetricRequests { pr := bar.NewProxyReader(reader) if pr != nil { - reader = bar.NewProxyReader(reader) + reader = pr fmt.Printf("Continue import process with filter %s:\n", f.String()) } } @@ -193,7 +193,15 @@ func (p *vmNativeProcessor) runBackfilling(ctx context.Context, tenantID string, var metrics = map[string][][]time.Time{ "": ranges, } + + format := nativeSingleProcessTpl + barPrefix := "Requests to make" + if p.interCluster { + barPrefix = fmt.Sprintf("Requests to make for tenant %s", tenantID) + } + if !p.disablePerMetricRequests { + format = fmt.Sprintf(nativeWithBackoffTpl, barPrefix) metrics, err = p.explore(ctx, p.src, tenantID, ranges) if err != nil { return fmt.Errorf("failed to explore metric names: %s", err) @@ -223,15 +231,7 @@ func (p *vmNativeProcessor) runBackfilling(ctx context.Context, tenantID string, log.Print(foundSeriesMsg) } - barPrefix := "Requests to make" - if p.interCluster { - barPrefix = fmt.Sprintf("Requests to make for tenant %s", tenantID) - } - - bar := barpool.NewSingleProgress(fmt.Sprintf(nativeWithBackoffTpl, barPrefix), requestsToMake) - if p.disablePerMetricRequests { - bar = barpool.NewSingleProgress(nativeSingleProcessTpl, 0) - } + bar := barpool.NewSingleProgress(format, requestsToMake) bar.Start() defer bar.Finish() @@ -362,16 +362,17 @@ func byteCountSI(b int64) string { } func buildMatchWithFilter(filter string, metricName string) (string, error) { - if filter == metricName { - return filter, nil - } - nameFilter := fmt.Sprintf("__name__=%q", metricName) - tfss, err := searchutils.ParseMetricSelector(filter) if err != nil { return "", err } + if filter == metricName || metricName == "" { + return filter, nil + } + + nameFilter := fmt.Sprintf("__name__=%q", metricName) + var filters []string for _, tfs := range tfss { var a []string diff --git a/app/vmctl/vm_native_test.go b/app/vmctl/vm_native_test.go index 74f57e3bf..fa7bf4b68 100644 --- a/app/vmctl/vm_native_test.go +++ b/app/vmctl/vm_native_test.go @@ -293,6 +293,9 @@ func TestBuildMatchWithFilter_Success(t *testing.T) { // only label with regexp f(`{cluster=~".*"}`, "http_request_count_total", `{cluster=~".*",__name__="http_request_count_total"}`) + // only label with regexp, empty metric name + f(`{cluster=~".*"}`, "", `{cluster=~".*"}`) + // many labels in filter with regexp f(`{cluster=~".*",job!=""}`, "http_request_count_total", `{cluster=~".*",job!="",__name__="http_request_count_total"}`) @@ -307,4 +310,7 @@ func TestBuildMatchWithFilter_Success(t *testing.T) { // metric name has negative regexp f(`{__name__!~".*"}`, "http_request_count_total", `{__name__="http_request_count_total"}`) + + // metric name has negative regex and metric name is empty + f(`{__name__!~".*"}`, "", `{__name__!~".*"}`) } diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index b5e0fb0c1..3d84ad75d 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -17,9 +17,11 @@ The sandbox cluster installation runs under the constant load generated by See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). ## tip + * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert/): `-rule` cmd-line flag now supports multi-document YAML files. This could be useful when rules are retrieved via HTTP URL where multiple rule files were merged together in one response. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6753). Thanks to @Irene-123 for [the pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6995). * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert): properly set `group_name` and `file` fields for recording rules in `/api/v1/rules`. +* BUGFIX: [vmctl](https://docs.victoriametrics.com/vmctl/): fix issue with series matching for `vmctl vm-native` with `--vm-native-disable-per-metric-migration` flag enabled. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7309). ## [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0) From 837d0d136dda3d4dc96ce18eecc2f24c45a2e955 Mon Sep 17 00:00:00 2001 From: Zakhar Bessarab Date: Thu, 24 Oct 2024 10:21:17 -0300 Subject: [PATCH 15/90] lib/mergeset: add sparse indexdb cache (#7269) Related issue: https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7182 - add a separate index cache for searches which might read through large amounts of random entries. Primary use-case for this is retention and downsampling filters, when applying filters background merge needs to fetch large amount of random entries which pollutes an index cache. Using different caches allows to reduce effect on memory usage and cache efficiency of the main cache while still having high cache hit rate. A separate cache size is 5% of allowed memory. - reduce size of indexdb/dataBlocks cache in order to free memory for new sparse cache. Reduced size by 5% and moved this to a separate cache. - add a separate metricName search which does not cache metric names - this is needed in order to allow disabling metric name caching when applying downsampling/retention filters. Applying filters during background merge accesses random entries, this fills up cache and does not provide an actual improvement due to random access nature. Merge performance and memory usage stats before and after the change: - before ![image](https://github.com/user-attachments/assets/485fffbb-c225-47ae-b5c5-bc8a7c57b36e) - after ![image](https://github.com/user-attachments/assets/f4ba3440-7c1c-4ec1-bc54-4d2ab431eef5) --------- Signed-off-by: Zakhar Bessarab --- app/vmstorage/main.go | 8 ++++ docs/Cluster-VictoriaMetrics.md | 3 ++ docs/README.md | 3 ++ docs/changelog/CHANGELOG.md | 1 + lib/logstorage/indexdb.go | 2 +- lib/mergeset/part.go | 21 ++++++++- lib/mergeset/part_search.go | 13 +++-- lib/mergeset/part_search_test.go | 2 +- lib/mergeset/table.go | 12 +++++ lib/mergeset/table_search.go | 4 +- lib/mergeset/table_search_test.go | 2 +- lib/mergeset/table_search_timing_test.go | 2 +- lib/mergeset/table_test.go | 6 +-- lib/storage/index_db.go | 60 ++++++++++++++++++++++-- 14 files changed, 123 insertions(+), 16 deletions(-) diff --git a/app/vmstorage/main.go b/app/vmstorage/main.go index 01235c0c2..698277502 100644 --- a/app/vmstorage/main.go +++ b/app/vmstorage/main.go @@ -67,6 +67,8 @@ var ( "See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning") cacheSizeIndexDBDataBlocks = flagutil.NewBytes("storage.cacheSizeIndexDBDataBlocks", 0, "Overrides max size for indexdb/dataBlocks cache. "+ "See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning") + cacheSizeIndexDBDataBlocksSparse = flagutil.NewBytes("storage.cacheSizeIndexDBDataBlocksSparse", 0, "Overrides max size for indexdb/dataBlocksSparse cache. "+ + "See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning") cacheSizeIndexDBTagFilters = flagutil.NewBytes("storage.cacheSizeIndexDBTagFilters", 0, "Overrides max size for indexdb/tagFiltersToMetricIDs cache. "+ "See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning") ) @@ -100,6 +102,7 @@ func Init(resetCacheIfNeeded func(mrs []storage.MetricRow)) { storage.SetTagFiltersCacheSize(cacheSizeIndexDBTagFilters.IntN()) mergeset.SetIndexBlocksCacheSize(cacheSizeIndexDBIndexBlocks.IntN()) mergeset.SetDataBlocksCacheSize(cacheSizeIndexDBDataBlocks.IntN()) + mergeset.SetDataBlocksSparseCacheSize(cacheSizeIndexDBDataBlocksSparse.IntN()) if retentionPeriod.Duration() < 24*time.Hour { logger.Fatalf("-retentionPeriod cannot be smaller than a day; got %s", retentionPeriod) @@ -581,6 +584,7 @@ func writeStorageMetrics(w io.Writer, strg *storage.Storage) { metrics.WriteGaugeUint64(w, `vm_cache_entries{type="storage/next_day_metric_ids"}`, m.NextDayMetricIDCacheSize) metrics.WriteGaugeUint64(w, `vm_cache_entries{type="storage/indexBlocks"}`, tm.IndexBlocksCacheSize) metrics.WriteGaugeUint64(w, `vm_cache_entries{type="indexdb/dataBlocks"}`, idbm.DataBlocksCacheSize) + metrics.WriteGaugeUint64(w, `vm_cache_entries{type="indexdb/dataBlocksSparse"}`, idbm.DataBlocksSparseCacheSize) metrics.WriteGaugeUint64(w, `vm_cache_entries{type="indexdb/indexBlocks"}`, idbm.IndexBlocksCacheSize) metrics.WriteGaugeUint64(w, `vm_cache_entries{type="indexdb/tagFiltersToMetricIDs"}`, idbm.TagFiltersToMetricIDsCacheSize) metrics.WriteGaugeUint64(w, `vm_cache_entries{type="storage/regexps"}`, uint64(storage.RegexpCacheSize())) @@ -592,6 +596,7 @@ func writeStorageMetrics(w io.Writer, strg *storage.Storage) { metrics.WriteGaugeUint64(w, `vm_cache_size_bytes{type="storage/metricName"}`, m.MetricNameCacheSizeBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_bytes{type="storage/indexBlocks"}`, tm.IndexBlocksCacheSizeBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_bytes{type="indexdb/dataBlocks"}`, idbm.DataBlocksCacheSizeBytes) + metrics.WriteGaugeUint64(w, `vm_cache_size_bytes{type="indexdb/dataBlocksSparse"}`, idbm.DataBlocksSparseCacheSizeBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_bytes{type="indexdb/indexBlocks"}`, idbm.IndexBlocksCacheSizeBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_bytes{type="storage/date_metricID"}`, m.DateMetricIDCacheSizeBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_bytes{type="storage/hour_metric_ids"}`, m.HourMetricIDCacheSizeBytes) @@ -606,6 +611,7 @@ func writeStorageMetrics(w io.Writer, strg *storage.Storage) { metrics.WriteGaugeUint64(w, `vm_cache_size_max_bytes{type="storage/metricName"}`, m.MetricNameCacheSizeMaxBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_max_bytes{type="storage/indexBlocks"}`, tm.IndexBlocksCacheSizeMaxBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_max_bytes{type="indexdb/dataBlocks"}`, idbm.DataBlocksCacheSizeMaxBytes) + metrics.WriteGaugeUint64(w, `vm_cache_size_max_bytes{type="indexdb/dataBlocksSparse"}`, idbm.DataBlocksSparseCacheSizeMaxBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_max_bytes{type="indexdb/indexBlocks"}`, idbm.IndexBlocksCacheSizeMaxBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_max_bytes{type="indexdb/tagFiltersToMetricIDs"}`, idbm.TagFiltersToMetricIDsCacheSizeMaxBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_max_bytes{type="storage/regexps"}`, uint64(storage.RegexpCacheMaxSizeBytes())) @@ -616,6 +622,7 @@ func writeStorageMetrics(w io.Writer, strg *storage.Storage) { metrics.WriteCounterUint64(w, `vm_cache_requests_total{type="storage/metricName"}`, m.MetricNameCacheRequests) metrics.WriteCounterUint64(w, `vm_cache_requests_total{type="storage/indexBlocks"}`, tm.IndexBlocksCacheRequests) metrics.WriteCounterUint64(w, `vm_cache_requests_total{type="indexdb/dataBlocks"}`, idbm.DataBlocksCacheRequests) + metrics.WriteCounterUint64(w, `vm_cache_requests_total{type="indexdb/dataBlocksSparse"}`, idbm.DataBlocksSparseCacheRequests) metrics.WriteCounterUint64(w, `vm_cache_requests_total{type="indexdb/indexBlocks"}`, idbm.IndexBlocksCacheRequests) metrics.WriteCounterUint64(w, `vm_cache_requests_total{type="indexdb/tagFiltersToMetricIDs"}`, idbm.TagFiltersToMetricIDsCacheRequests) metrics.WriteCounterUint64(w, `vm_cache_requests_total{type="storage/regexps"}`, storage.RegexpCacheRequests()) @@ -626,6 +633,7 @@ func writeStorageMetrics(w io.Writer, strg *storage.Storage) { metrics.WriteCounterUint64(w, `vm_cache_misses_total{type="storage/metricName"}`, m.MetricNameCacheMisses) metrics.WriteCounterUint64(w, `vm_cache_misses_total{type="storage/indexBlocks"}`, tm.IndexBlocksCacheMisses) metrics.WriteCounterUint64(w, `vm_cache_misses_total{type="indexdb/dataBlocks"}`, idbm.DataBlocksCacheMisses) + metrics.WriteCounterUint64(w, `vm_cache_misses_total{type="indexdb/dataBlocksSparse"}`, idbm.DataBlocksSparseCacheMisses) metrics.WriteCounterUint64(w, `vm_cache_misses_total{type="indexdb/indexBlocks"}`, idbm.IndexBlocksCacheMisses) metrics.WriteCounterUint64(w, `vm_cache_misses_total{type="indexdb/tagFiltersToMetricIDs"}`, idbm.TagFiltersToMetricIDsCacheMisses) metrics.WriteCounterUint64(w, `vm_cache_misses_total{type="storage/regexps"}`, storage.RegexpCacheMisses()) diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md index 781485a2e..57a7abd80 100644 --- a/docs/Cluster-VictoriaMetrics.md +++ b/docs/Cluster-VictoriaMetrics.md @@ -1910,6 +1910,9 @@ Below is the output for `/path/to/vmstorage -help`: -storage.cacheSizeIndexDBDataBlocks size Overrides max size for indexdb/dataBlocks cache. See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning Supports the following optional suffixes for size values: KB, MB, GB, TB, KiB, MiB, GiB, TiB (default 0) + -storage.cacheSizeIndexDBDataBlocksSparse size + Overrides max size for indexdb/dataBlocksSparse cache. See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning + Supports the following optional suffixes for size values: KB, MB, GB, TB, KiB, MiB, GiB, TiB (default 0) -storage.cacheSizeIndexDBIndexBlocks size Overrides max size for indexdb/indexBlocks cache. See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning Supports the following optional suffixes for size values: KB, MB, GB, TB, KiB, MiB, GiB, TiB (default 0) diff --git a/docs/README.md b/docs/README.md index f6f327c20..ae3e59f45 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3258,6 +3258,9 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -storage.cacheSizeIndexDBDataBlocks size Overrides max size for indexdb/dataBlocks cache. See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning Supports the following optional suffixes for size values: KB, MB, GB, TB, KiB, MiB, GiB, TiB (default 0) + -storage.cacheSizeIndexDBDataBlocksSparse size + Overrides max size for indexdb/dataBlocksSparse cache. See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning + Supports the following optional suffixes for size values: KB, MB, GB, TB, KiB, MiB, GiB, TiB (default 0) -storage.cacheSizeIndexDBIndexBlocks size Overrides max size for indexdb/indexBlocks cache. See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning Supports the following optional suffixes for size values: KB, MB, GB, TB, KiB, MiB, GiB, TiB (default 0) diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 3d84ad75d..09641f4da 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -19,6 +19,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). ## tip * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert/): `-rule` cmd-line flag now supports multi-document YAML files. This could be useful when rules are retrieved via HTTP URL where multiple rule files were merged together in one response. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6753). Thanks to @Irene-123 for [the pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6995). +* FEATURE: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): add a separate cache type for storing sparse entries when performing large index scans. This significantly reduces memory usage when applying [downsampling filters](https://docs.victoriametrics.com/#downsampling) and [retention filters](https://docs.victoriametrics.com/#retention-filters) during background merge. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7182) for the details. * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert): properly set `group_name` and `file` fields for recording rules in `/api/v1/rules`. * BUGFIX: [vmctl](https://docs.victoriametrics.com/vmctl/): fix issue with series matching for `vmctl vm-native` with `--vm-native-disable-per-metric-migration` flag enabled. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7309). diff --git a/lib/logstorage/indexdb.go b/lib/logstorage/indexdb.go index 811d2b536..89efb6015 100644 --- a/lib/logstorage/indexdb.go +++ b/lib/logstorage/indexdb.go @@ -166,7 +166,7 @@ func (idb *indexdb) getIndexSearch() *indexSearch { } } is := v.(*indexSearch) - is.ts.Init(idb.tb) + is.ts.Init(idb.tb, false) return is } diff --git a/lib/mergeset/part.go b/lib/mergeset/part.go index da47f1ccc..9fc6e1ed6 100644 --- a/lib/mergeset/part.go +++ b/lib/mergeset/part.go @@ -14,6 +14,7 @@ import ( var idxbCache = blockcache.NewCache(getMaxIndexBlocksCacheSize) var ibCache = blockcache.NewCache(getMaxInmemoryBlocksCacheSize) +var ibSparseCache = blockcache.NewCache(getMaxInmemoryBlocksSparseCacheSize) // SetIndexBlocksCacheSize overrides the default size of indexdb/indexBlocks cache func SetIndexBlocksCacheSize(size int) { @@ -42,15 +43,32 @@ func SetDataBlocksCacheSize(size int) { func getMaxInmemoryBlocksCacheSize() int { maxInmemoryBlockCacheSizeOnce.Do(func() { if maxInmemoryBlockCacheSize <= 0 { - maxInmemoryBlockCacheSize = int(0.25 * float64(memory.Allowed())) + maxInmemoryBlockCacheSize = int(0.20 * float64(memory.Allowed())) } }) return maxInmemoryBlockCacheSize } +// SetDataBlocksSparseCacheSize overrides the default size of indexdb/dataBlocksSparse cache +func SetDataBlocksSparseCacheSize(size int) { + maxInmemorySparseMergeCacheSize = size +} + +func getMaxInmemoryBlocksSparseCacheSize() int { + maxInmemoryBlockSparseCacheSizeOnce.Do(func() { + if maxInmemorySparseMergeCacheSize <= 0 { + maxInmemorySparseMergeCacheSize = int(0.05 * float64(memory.Allowed())) + } + }) + return maxInmemorySparseMergeCacheSize +} + var ( maxInmemoryBlockCacheSize int maxInmemoryBlockCacheSizeOnce sync.Once + + maxInmemorySparseMergeCacheSize int + maxInmemoryBlockSparseCacheSizeOnce sync.Once ) type part struct { @@ -118,6 +136,7 @@ func (p *part) MustClose() { idxbCache.RemoveBlocksForPart(p) ibCache.RemoveBlocksForPart(p) + ibSparseCache.RemoveBlocksForPart(p) } type indexBlock struct { diff --git a/lib/mergeset/part_search.go b/lib/mergeset/part_search.go index 29a0a6723..48f854b99 100644 --- a/lib/mergeset/part_search.go +++ b/lib/mergeset/part_search.go @@ -36,6 +36,8 @@ type partSearch struct { ib *inmemoryBlock ibItemIdx int + + sparse bool } func (ps *partSearch) reset() { @@ -57,10 +59,11 @@ func (ps *partSearch) reset() { // Init initializes ps for search in the p. // // Use Seek for search in p. -func (ps *partSearch) Init(p *part) { +func (ps *partSearch) Init(p *part, sparse bool) { ps.reset() ps.p = p + ps.sparse = sparse } // Seek seeks for the first item greater or equal to k in ps. @@ -299,18 +302,22 @@ func (ps *partSearch) readIndexBlock(mr *metaindexRow) (*indexBlock, error) { } func (ps *partSearch) getInmemoryBlock(bh *blockHeader) (*inmemoryBlock, error) { + cache := ibCache + if ps.sparse { + cache = ibSparseCache + } ibKey := blockcache.Key{ Part: ps.p, Offset: bh.itemsBlockOffset, } - b := ibCache.GetBlock(ibKey) + b := cache.GetBlock(ibKey) if b == nil { ib, err := ps.readInmemoryBlock(bh) if err != nil { return nil, err } b = ib - ibCache.PutBlock(ibKey, b) + cache.PutBlock(ibKey, b) } ib := b.(*inmemoryBlock) return ib, nil diff --git a/lib/mergeset/part_search_test.go b/lib/mergeset/part_search_test.go index fb141b3f7..0cd076ca2 100644 --- a/lib/mergeset/part_search_test.go +++ b/lib/mergeset/part_search_test.go @@ -54,7 +54,7 @@ func testPartSearchConcurrent(p *part, items []string) error { func testPartSearchSerial(r *rand.Rand, p *part, items []string) error { var ps partSearch - ps.Init(p) + ps.Init(p, true) var k []byte // Search for the item smaller than the items[0] diff --git a/lib/mergeset/table.go b/lib/mergeset/table.go index f4b7edcdc..6559a2c48 100644 --- a/lib/mergeset/table.go +++ b/lib/mergeset/table.go @@ -574,6 +574,12 @@ type TableMetrics struct { DataBlocksCacheRequests uint64 DataBlocksCacheMisses uint64 + DataBlocksSparseCacheSize uint64 + DataBlocksSparseCacheSizeBytes uint64 + DataBlocksSparseCacheSizeMaxBytes uint64 + DataBlocksSparseCacheRequests uint64 + DataBlocksSparseCacheMisses uint64 + IndexBlocksCacheSize uint64 IndexBlocksCacheSizeBytes uint64 IndexBlocksCacheSizeMaxBytes uint64 @@ -635,6 +641,12 @@ func (tb *Table) UpdateMetrics(m *TableMetrics) { m.DataBlocksCacheRequests = ibCache.Requests() m.DataBlocksCacheMisses = ibCache.Misses() + m.DataBlocksSparseCacheSize = uint64(ibSparseCache.Len()) + m.DataBlocksSparseCacheSizeBytes = uint64(ibSparseCache.SizeBytes()) + m.DataBlocksSparseCacheSizeMaxBytes = uint64(ibSparseCache.SizeMaxBytes()) + m.DataBlocksSparseCacheRequests = ibSparseCache.Requests() + m.DataBlocksSparseCacheMisses = ibSparseCache.Misses() + m.IndexBlocksCacheSize = uint64(idxbCache.Len()) m.IndexBlocksCacheSizeBytes = uint64(idxbCache.SizeBytes()) m.IndexBlocksCacheSizeMaxBytes = uint64(idxbCache.SizeMaxBytes()) diff --git a/lib/mergeset/table_search.go b/lib/mergeset/table_search.go index 2da5f0cca..c006f91f3 100644 --- a/lib/mergeset/table_search.go +++ b/lib/mergeset/table_search.go @@ -59,7 +59,7 @@ func (ts *TableSearch) reset() { // Init initializes ts for searching in the tb. // // MustClose must be called when the ts is no longer needed. -func (ts *TableSearch) Init(tb *Table) { +func (ts *TableSearch) Init(tb *Table, sparse bool) { if ts.needClosing { logger.Panicf("BUG: missing MustClose call before the next call to Init") } @@ -74,7 +74,7 @@ func (ts *TableSearch) Init(tb *Table) { // Initialize the psPool. ts.psPool = slicesutil.SetLength(ts.psPool, len(ts.pws)) for i, pw := range ts.pws { - ts.psPool[i].Init(pw.p) + ts.psPool[i].Init(pw.p, sparse) } } diff --git a/lib/mergeset/table_search_test.go b/lib/mergeset/table_search_test.go index 79a652ff7..5bc2ae02a 100644 --- a/lib/mergeset/table_search_test.go +++ b/lib/mergeset/table_search_test.go @@ -107,7 +107,7 @@ func testTableSearchConcurrent(tb *Table, items []string) error { func testTableSearchSerial(tb *Table, items []string) error { var ts TableSearch - ts.Init(tb) + ts.Init(tb, false) for _, key := range []string{ "", "123", diff --git a/lib/mergeset/table_search_timing_test.go b/lib/mergeset/table_search_timing_test.go index f8deb4d17..f97d55f5f 100644 --- a/lib/mergeset/table_search_timing_test.go +++ b/lib/mergeset/table_search_timing_test.go @@ -83,7 +83,7 @@ func benchmarkTableSearchKeysExt(b *testing.B, tb *Table, keys [][]byte, stripSu b.RunParallel(func(pb *testing.PB) { r := rand.New(rand.NewSource(1)) var ts TableSearch - ts.Init(tb) + ts.Init(tb, false) defer ts.MustClose() for pb.Next() { startIdx := r.Intn(len(keys) - searchKeysCount) diff --git a/lib/mergeset/table_test.go b/lib/mergeset/table_test.go index 810dd5a04..eb474471d 100644 --- a/lib/mergeset/table_test.go +++ b/lib/mergeset/table_test.go @@ -139,9 +139,9 @@ func TestTableCreateSnapshotAt(t *testing.T) { tb2 := MustOpenTable(snapshot2, nil, nil, &isReadOnly) var ts, ts1, ts2 TableSearch - ts.Init(tb) - ts1.Init(tb1) - ts2.Init(tb2) + ts.Init(tb, false) + ts1.Init(tb1, false) + ts2.Init(tb2, false) for i := 0; i < itemsCount; i++ { key := []byte(fmt.Sprintf("item %d", i)) if err := ts.FirstItemWithPrefix(key); err != nil { diff --git a/lib/storage/index_db.go b/lib/storage/index_db.go index c935e33b8..a7c4068e5 100644 --- a/lib/storage/index_db.go +++ b/lib/storage/index_db.go @@ -14,6 +14,9 @@ import ( "time" "unsafe" + "github.com/VictoriaMetrics/fastcache" + "github.com/cespare/xxhash/v2" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/bytesutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/encoding" "github.com/VictoriaMetrics/VictoriaMetrics/lib/fasttime" @@ -25,8 +28,6 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/slicesutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/uint64set" "github.com/VictoriaMetrics/VictoriaMetrics/lib/workingsetcache" - "github.com/VictoriaMetrics/fastcache" - "github.com/cespare/xxhash/v2" ) const ( @@ -520,7 +521,21 @@ type indexSearch struct { deadline uint64 } +// getIndexSearch returns an indexSearch with default configuration func (db *indexDB) getIndexSearch(deadline uint64) *indexSearch { + return db.getIndexSearchInternal(deadline, false) +} + +// getIndexSearchSparse returns an indexSearch with sparse cache +// It is useful for search operations that can scan through the large amount index entries +// Without the need to keep all the entries in the caches used for queries +// used in ENT version +// nolint:unused +func (db *indexDB) getIndexSearchSparse(deadline uint64) *indexSearch { + return db.getIndexSearchInternal(deadline, true) +} + +func (db *indexDB) getIndexSearchInternal(deadline uint64, sparse bool) *indexSearch { v := db.indexSearchPool.Get() if v == nil { v = &indexSearch{ @@ -528,7 +543,7 @@ func (db *indexDB) getIndexSearch(deadline uint64) *indexSearch { } } is := v.(*indexSearch) - is.ts.Init(db.tb) + is.ts.Init(db.tb, sparse) is.deadline = deadline return is } @@ -1564,6 +1579,45 @@ func (db *indexDB) searchMetricNameWithCache(dst []byte, metricID uint64) ([]byt return dst, false } +// searchMetricNameWithoutCache appends metric name for the given metricID to dst +// and returns the result. +// It does not cache the result and uses sparse cache for index scan. +// used in ENT version +// nolint:unused +func (db *indexDB) searchMetricNameWithoutCache(dst []byte, metricID uint64) ([]byte, bool) { + is := db.getIndexSearchSparse(noDeadline) + var ok bool + dst, ok = is.searchMetricName(dst, metricID) + db.putIndexSearch(is) + if ok { + // There is no need in verifying whether the given metricID is deleted, + // since the filtering must be performed before calling this func. + return dst, true + } + + // Try searching in the external indexDB. + db.doExtDB(func(extDB *indexDB) { + is := extDB.getIndexSearchSparse(noDeadline) + dst, ok = is.searchMetricName(dst, metricID) + extDB.putIndexSearch(is) + }) + if ok { + return dst, true + } + + if db.s.wasMetricIDMissingBefore(metricID) { + // Cannot find the MetricName for the given metricID for the last 60 seconds. + // It is likely the indexDB contains incomplete set of metricID -> metricName entries + // after unclean shutdown or after restoring from a snapshot. + // Mark the metricID as deleted, so it is created again when new sample + // for the given time series is ingested next time. + db.missingMetricNamesForMetricID.Add(1) + db.deleteMetricIDs([]uint64{metricID}) + } + + return dst, false +} + // DeleteTSIDs marks as deleted all the TSIDs matching the given tfss and // updates or resets all caches where TSIDs and the corresponding MetricIDs may // be stored. From fc537bea007c3ce05a4e89e2b6f730f0fb1c0c23 Mon Sep 17 00:00:00 2001 From: Andrii Chubatiuk Date: Thu, 24 Oct 2024 18:04:12 +0300 Subject: [PATCH 16/90] lib/promscrape/discovery/kubernetes: support kubernetes native sidecars (#7324) This commit adds Kubernetes Native Sidecar support. It's the special type of init containers, that have restartPolicy == "Always" and continue to run after container initialization. related issue https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7287 --- docs/changelog/CHANGELOG.md | 1 + .../discovery/kubernetes/endpoints.go | 77 ++++++++++++------- .../discovery/kubernetes/endpoints_test.go | 62 ++++++++++++++- .../discovery/kubernetes/endpointslice.go | 72 ++++++++++------- .../kubernetes/endpointslice_test.go | 69 ++++++++++++++++- lib/promscrape/discovery/kubernetes/pod.go | 33 ++++---- 6 files changed, 241 insertions(+), 73 deletions(-) diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 09641f4da..0f5cabafb 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -19,6 +19,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). ## tip * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert/): `-rule` cmd-line flag now supports multi-document YAML files. This could be useful when rules are retrieved via HTTP URL where multiple rule files were merged together in one response. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6753). Thanks to @Irene-123 for [the pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6995). +* FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent/): support scraping from Kubernetes Native Sidecars. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7287). * FEATURE: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): add a separate cache type for storing sparse entries when performing large index scans. This significantly reduces memory usage when applying [downsampling filters](https://docs.victoriametrics.com/#downsampling) and [retention filters](https://docs.victoriametrics.com/#retention-filters) during background merge. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7182) for the details. * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert): properly set `group_name` and `file` fields for recording rules in `/api/v1/rules`. diff --git a/lib/promscrape/discovery/kubernetes/endpoints.go b/lib/promscrape/discovery/kubernetes/endpoints.go index 4b6ca982b..0fde96237 100644 --- a/lib/promscrape/discovery/kubernetes/endpoints.go +++ b/lib/promscrape/discovery/kubernetes/endpoints.go @@ -37,7 +37,7 @@ func parseEndpoints(data []byte) (object, error) { // EndpointsList implements k8s endpoints list. // -// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#endpointslist-v1-core +// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#endpointslist-v1-core type EndpointsList struct { Metadata ListMeta Items []*Endpoints @@ -45,7 +45,7 @@ type EndpointsList struct { // Endpoints implements k8s endpoints. // -// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#endpoints-v1-core +// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#endpoints-v1-core type Endpoints struct { Metadata ObjectMeta Subsets []EndpointSubset @@ -53,7 +53,7 @@ type Endpoints struct { // EndpointSubset implements k8s endpoint subset. // -// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#endpointsubset-v1-core +// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#endpointsubset-v1-core type EndpointSubset struct { Addresses []EndpointAddress NotReadyAddresses []EndpointAddress @@ -62,7 +62,7 @@ type EndpointSubset struct { // EndpointAddress implements k8s endpoint address. // -// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#endpointaddress-v1-core +// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#endpointaddress-v1-core type EndpointAddress struct { Hostname string IP string @@ -72,7 +72,7 @@ type EndpointAddress struct { // ObjectReference implements k8s object reference. // -// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#objectreference-v1-core +// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#objectreference-v1-core type ObjectReference struct { Kind string Name string @@ -81,7 +81,7 @@ type ObjectReference struct { // EndpointPort implements k8s endpoint port. // -// See https://v1-21.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#endpointport-v1-discovery-k8s-io +// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#endpointport-v1-discovery-k8s-io type EndpointPort struct { AppProtocol string Name string @@ -123,29 +123,39 @@ func (eps *Endpoints) getTargetLabels(gw *groupWatcher) []*promutils.Labels { } return false } + appendPodMetadata := func(p *Pod, c *Container, seen []int, isInit bool) { + for _, cp := range c.Ports { + if portSeen(cp.ContainerPort, seen) { + continue + } + addr := discoveryutils.JoinHostPort(p.Status.PodIP, cp.ContainerPort) + m := promutils.GetLabels() + m.Add("__address__", addr) + p.appendCommonLabels(m, gw) + p.appendContainerLabels(m, c, &cp, isInit) + + // Prometheus sets endpoints_name and namespace labels for all endpoints + // Even if port is not matching service port. + // See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4154 + p.appendEndpointLabels(m, eps) + if svc != nil { + svc.appendCommonLabels(m) + } + // Remove possible duplicate labels, which can appear after appendCommonLabels() call + m.RemoveDuplicates() + ms = append(ms, m) + } + } for p, ports := range podPortsSeen { for _, c := range p.Spec.Containers { - for _, cp := range c.Ports { - if portSeen(cp.ContainerPort, ports) { - continue - } - addr := discoveryutils.JoinHostPort(p.Status.PodIP, cp.ContainerPort) - m := promutils.GetLabels() - m.Add("__address__", addr) - p.appendCommonLabels(m, gw) - p.appendContainerLabels(m, &c, &cp) - - // Prometheus sets endpoints_name and namespace labels for all endpoints - // Even if port is not matching service port. - // See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4154 - p.appendEndpointLabels(m, eps) - if svc != nil { - svc.appendCommonLabels(m) - } - // Remove possible duplicate labels, which can appear after appendCommonLabels() call - m.RemoveDuplicates() - ms = append(ms, m) + appendPodMetadata(p, &c, ports, false) + } + for _, c := range p.Spec.InitContainers { + // Defines native sidecar https://kubernetes.io/blog/2023/08/25/native-sidecar-containers/#what-are-sidecar-containers-in-1-28 + if c.RestartPolicy != "Always" { + continue } + appendPodMetadata(p, &c, ports, true) } } return ms @@ -189,7 +199,20 @@ func getEndpointLabelsForAddressAndPort(gw *groupWatcher, podPortsSeen map[*Pod] for _, cp := range c.Ports { if cp.ContainerPort == epp.Port { podPortsSeen[p] = append(podPortsSeen[p], cp.ContainerPort) - p.appendContainerLabels(m, &c, &cp) + p.appendContainerLabels(m, &c, &cp, false) + break + } + } + } + for _, c := range p.Spec.InitContainers { + // Defines native sidecar https://kubernetes.io/blog/2023/08/25/native-sidecar-containers/#what-are-sidecar-containers-in-1-28 + if c.RestartPolicy != "Always" { + continue + } + for _, cp := range c.Ports { + if cp.ContainerPort == epp.Port { + podPortsSeen[p] = append(podPortsSeen[p], cp.ContainerPort) + p.appendContainerLabels(m, &c, &cp, true) break } } diff --git a/lib/promscrape/discovery/kubernetes/endpoints_test.go b/lib/promscrape/discovery/kubernetes/endpoints_test.go index 36b4c5745..2288cc633 100644 --- a/lib/promscrape/discovery/kubernetes/endpoints_test.go +++ b/lib/promscrape/discovery/kubernetes/endpoints_test.go @@ -115,8 +115,9 @@ func TestParseEndpointsListSuccess(t *testing.T) { func TestGetEndpointsLabels(t *testing.T) { type testArgs struct { - containerPorts map[string][]ContainerPort - endpointPorts []EndpointPort + containerPorts map[string][]ContainerPort + initContainerPorts map[string][]ContainerPort + endpointPorts []EndpointPort } f := func(t *testing.T, args testArgs, wantLabels []*promutils.Labels) { t.Helper() @@ -177,6 +178,14 @@ func TestGetEndpointsLabels(t *testing.T) { Labels: promutils.NewLabelsFromMap(map[string]string{"node-label": "xyz"}), }, } + for cn, ports := range args.initContainerPorts { + pod.Spec.InitContainers = append(pod.Spec.InitContainers, Container{ + Name: cn, + Image: "test-init-image", + Ports: ports, + RestartPolicy: "Always", + }) + } for cn, ports := range args.containerPorts { pod.Spec.Containers = append(pod.Spec.Containers, Container{ Name: cn, @@ -301,6 +310,7 @@ func TestGetEndpointsLabels(t *testing.T) { "__meta_kubernetes_node_labelpresent_node_label": "true", "__meta_kubernetes_node_name": "test-node", "__meta_kubernetes_pod_container_image": "test-image", + "__meta_kubernetes_pod_container_init": "false", "__meta_kubernetes_pod_container_name": "metrics", "__meta_kubernetes_pod_container_port_name": "http-metrics", "__meta_kubernetes_pod_container_port_number": "8428", @@ -347,6 +357,54 @@ func TestGetEndpointsLabels(t *testing.T) { "__meta_kubernetes_node_labelpresent_node_label": "true", "__meta_kubernetes_node_name": "test-node", "__meta_kubernetes_pod_container_image": "test-image", + "__meta_kubernetes_pod_container_init": "false", + "__meta_kubernetes_pod_container_name": "metrics", + "__meta_kubernetes_pod_container_port_name": "web", + "__meta_kubernetes_pod_container_port_number": "8428", + "__meta_kubernetes_pod_container_port_protocol": "sdc", + "__meta_kubernetes_pod_host_ip": "4.5.6.7", + "__meta_kubernetes_pod_ip": "192.168.15.1", + "__meta_kubernetes_pod_name": "test-pod", + "__meta_kubernetes_pod_node_name": "test-node", + "__meta_kubernetes_pod_phase": "abc", + "__meta_kubernetes_pod_ready": "unknown", + "__meta_kubernetes_pod_uid": "pod-uid", + "__meta_kubernetes_service_cluster_ip": "1.2.3.4", + "__meta_kubernetes_service_name": "test-eps", + "__meta_kubernetes_service_type": "service-type", + }), + }) + }) + + t.Run("1 init container port from endpoint", func(t *testing.T) { + f(t, testArgs{ + initContainerPorts: map[string][]ContainerPort{"metrics": {{ + Name: "web", + ContainerPort: 8428, + Protocol: "sdc", + }}}, + endpointPorts: []EndpointPort{ + { + Name: "web", + Port: 8428, + Protocol: "xabc", + }, + }, + }, []*promutils.Labels{ + promutils.NewLabelsFromMap(map[string]string{ + "__address__": "10.13.15.15:8428", + "__meta_kubernetes_endpoint_address_target_kind": "Pod", + "__meta_kubernetes_endpoint_address_target_name": "test-pod", + "__meta_kubernetes_endpoint_port_name": "web", + "__meta_kubernetes_endpoint_port_protocol": "xabc", + "__meta_kubernetes_endpoint_ready": "true", + "__meta_kubernetes_endpoints_name": "test-eps", + "__meta_kubernetes_namespace": "default", + "__meta_kubernetes_node_label_node_label": "xyz", + "__meta_kubernetes_node_labelpresent_node_label": "true", + "__meta_kubernetes_node_name": "test-node", + "__meta_kubernetes_pod_container_image": "test-init-image", + "__meta_kubernetes_pod_container_init": "true", "__meta_kubernetes_pod_container_name": "metrics", "__meta_kubernetes_pod_container_port_name": "web", "__meta_kubernetes_pod_container_port_number": "8428", diff --git a/lib/promscrape/discovery/kubernetes/endpointslice.go b/lib/promscrape/discovery/kubernetes/endpointslice.go index e0e969afe..5cddb4ee4 100644 --- a/lib/promscrape/discovery/kubernetes/endpointslice.go +++ b/lib/promscrape/discovery/kubernetes/endpointslice.go @@ -73,30 +73,41 @@ func (eps *EndpointSlice) getTargetLabels(gw *groupWatcher) []*promutils.Labels } return false } + appendPodMetadata := func(p *Pod, c *Container, seen []int, isInit bool) { + for _, cp := range c.Ports { + if portSeen(cp.ContainerPort, seen) { + continue + } + addr := discoveryutils.JoinHostPort(p.Status.PodIP, cp.ContainerPort) + m := promutils.GetLabels() + m.Add("__address__", addr) + p.appendCommonLabels(m, gw) + p.appendContainerLabels(m, c, &cp, isInit) + + // Prometheus sets endpoints_name and namespace labels for all endpoints + // Even if port is not matching service port. + // See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4154 + p.appendEndpointSliceLabels(m, eps) + if svc != nil { + svc.appendCommonLabels(m) + } + // Remove possible duplicate labels, which can appear after appendCommonLabels() call + m.RemoveDuplicates() + ms = append(ms, m) + } + } for p, ports := range podPortsSeen { for _, c := range p.Spec.Containers { - for _, cp := range c.Ports { - if portSeen(cp.ContainerPort, ports) { - continue - } - addr := discoveryutils.JoinHostPort(p.Status.PodIP, cp.ContainerPort) - m := promutils.GetLabels() - m.Add("__address__", addr) - p.appendCommonLabels(m, gw) - p.appendContainerLabels(m, &c, &cp) - - // Prometheus sets endpoints_name and namespace labels for all endpoints - // Even if port is not matching service port. - // See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4154 - p.appendEndpointSliceLabels(m, eps) - if svc != nil { - svc.appendCommonLabels(m) - } - // Remove possible duplicate labels, which can appear after appendCommonLabels() calls - m.RemoveDuplicates() - ms = append(ms, m) - } + appendPodMetadata(p, &c, ports, false) } + for _, c := range p.Spec.InitContainers { + // Defines native sidecar https://kubernetes.io/blog/2023/08/25/native-sidecar-containers/#what-are-sidecar-containers-in-1-28 + if c.RestartPolicy != "Always" { + continue + } + appendPodMetadata(p, &c, ports, true) + } + } return ms } @@ -127,7 +138,16 @@ func getEndpointSliceLabelsForAddressAndPort(gw *groupWatcher, podPortsSeen map[ for _, cp := range c.Ports { if cp.ContainerPort == epp.Port { podPortsSeen[p] = append(podPortsSeen[p], cp.ContainerPort) - p.appendContainerLabels(m, &c, &cp) + p.appendContainerLabels(m, &c, &cp, false) + break + } + } + } + for _, c := range p.Spec.InitContainers { + for _, cp := range c.Ports { + if cp.ContainerPort == epp.Port { + podPortsSeen[p] = append(podPortsSeen[p], cp.ContainerPort) + p.appendContainerLabels(m, &c, &cp, true) break } } @@ -167,7 +187,7 @@ func getEndpointSliceLabels(eps *EndpointSlice, addr string, ea Endpoint, epp En // EndpointSliceList - implements kubernetes endpoint slice list object, that groups service endpoints slices. // -// See https://v1-21.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#endpointslicelist-v1-discovery-k8s-io +// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#endpointslicelist-v1-discovery-k8s-io type EndpointSliceList struct { Metadata ListMeta Items []*EndpointSlice @@ -175,7 +195,7 @@ type EndpointSliceList struct { // EndpointSlice - implements kubernetes endpoint slice. // -// See https://v1-21.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#endpointslice-v1-discovery-k8s-io +// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#endpointslice-v1-discovery-k8s-io type EndpointSlice struct { Metadata ObjectMeta Endpoints []Endpoint @@ -185,7 +205,7 @@ type EndpointSlice struct { // Endpoint implements kubernetes object endpoint for endpoint slice. // -// See https://v1-21.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#endpoint-v1-discovery-k8s-io +// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#endpoint-v1-discovery-k8s-io type Endpoint struct { Addresses []string Conditions EndpointConditions @@ -196,7 +216,7 @@ type Endpoint struct { // EndpointConditions implements kubernetes endpoint condition. // -// See https://v1-21.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#endpointconditions-v1-discovery-k8s-io +// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#endpointconditions-v1-discovery-k8s-io type EndpointConditions struct { Ready bool } diff --git a/lib/promscrape/discovery/kubernetes/endpointslice_test.go b/lib/promscrape/discovery/kubernetes/endpointslice_test.go index 1d8d10a70..988019fbf 100644 --- a/lib/promscrape/discovery/kubernetes/endpointslice_test.go +++ b/lib/promscrape/discovery/kubernetes/endpointslice_test.go @@ -225,8 +225,9 @@ func TestParseEndpointSliceListSuccess(t *testing.T) { func TestGetEndpointsliceLabels(t *testing.T) { type testArgs struct { - containerPorts map[string][]ContainerPort - endpointPorts []EndpointPort + initContainerPorts map[string][]ContainerPort + containerPorts map[string][]ContainerPort + endpointPorts []EndpointPort } f := func(t *testing.T, args testArgs, wantLabels []*promutils.Labels) { t.Helper() @@ -296,6 +297,14 @@ func TestGetEndpointsliceLabels(t *testing.T) { Labels: promutils.NewLabelsFromMap(map[string]string{"node-label": "xyz"}), }, } + for cn, ports := range args.initContainerPorts { + pod.Spec.InitContainers = append(pod.Spec.InitContainers, Container{ + Name: cn, + Image: "test-init-image", + Ports: ports, + RestartPolicy: "Always", + }) + } for cn, ports := range args.containerPorts { pod.Spec.Containers = append(pod.Spec.Containers, Container{ Name: cn, @@ -437,6 +446,7 @@ func TestGetEndpointsliceLabels(t *testing.T) { "__meta_kubernetes_node_labelpresent_node_label": "true", "__meta_kubernetes_node_name": "test-node", "__meta_kubernetes_pod_container_image": "test-image", + "__meta_kubernetes_pod_container_init": "false", "__meta_kubernetes_pod_container_name": "metrics", "__meta_kubernetes_pod_container_port_name": "http-metrics", "__meta_kubernetes_pod_container_port_number": "8428", @@ -490,6 +500,61 @@ func TestGetEndpointsliceLabels(t *testing.T) { "__meta_kubernetes_node_labelpresent_node_label": "true", "__meta_kubernetes_node_name": "test-node", "__meta_kubernetes_pod_container_image": "test-image", + "__meta_kubernetes_pod_container_init": "false", + "__meta_kubernetes_pod_container_name": "metrics", + "__meta_kubernetes_pod_container_port_name": "web", + "__meta_kubernetes_pod_container_port_number": "8428", + "__meta_kubernetes_pod_container_port_protocol": "sdc", + "__meta_kubernetes_pod_host_ip": "4.5.6.7", + "__meta_kubernetes_pod_ip": "192.168.15.1", + "__meta_kubernetes_pod_name": "test-pod", + "__meta_kubernetes_pod_node_name": "test-node", + "__meta_kubernetes_pod_phase": "abc", + "__meta_kubernetes_pod_ready": "unknown", + "__meta_kubernetes_pod_uid": "pod-uid", + "__meta_kubernetes_service_cluster_ip": "1.2.3.4", + "__meta_kubernetes_service_name": "test-svc", + "__meta_kubernetes_service_type": "service-type", + }), + }) + }) + + t.Run("1 init container port from endpoint", func(t *testing.T) { + f(t, testArgs{ + initContainerPorts: map[string][]ContainerPort{"metrics": {{ + Name: "web", + ContainerPort: 8428, + Protocol: "sdc", + }}}, + endpointPorts: []EndpointPort{ + { + Name: "web", + Port: 8428, + Protocol: "xabc", + }, + }, + }, []*promutils.Labels{ + promutils.NewLabelsFromMap(map[string]string{ + "__address__": "10.13.15.15:8428", + "__meta_kubernetes_endpointslice_address_target_kind": "Pod", + "__meta_kubernetes_endpointslice_address_target_name": "test-pod", + "__meta_kubernetes_endpointslice_address_type": "foobar", + "__meta_kubernetes_endpointslice_endpoint_conditions_ready": "true", + "__meta_kubernetes_endpointslice_endpoint_hostname": "foo.bar", + "__meta_kubernetes_endpointslice_endpoint_topology_present_x": "true", + "__meta_kubernetes_endpointslice_endpoint_topology_x": "y", + "__meta_kubernetes_endpointslice_label_kubernetes_io_service_name": "test-svc", + "__meta_kubernetes_endpointslice_labelpresent_kubernetes_io_service_name": "true", + "__meta_kubernetes_endpointslice_name": "test-eps", + "__meta_kubernetes_endpointslice_port": "8428", + "__meta_kubernetes_endpointslice_port_name": "web", + "__meta_kubernetes_endpointslice_port_protocol": "xabc", + "__meta_kubernetes_namespace": "default", + "__meta_kubernetes_node_label_node_label": "xyz", + "__meta_kubernetes_node_labelpresent_node_label": "true", + "__meta_kubernetes_node_name": "test-node", + "__meta_kubernetes_pod_container_image": "test-init-image", + "__meta_kubernetes_pod_container_init": "true", "__meta_kubernetes_pod_container_name": "metrics", "__meta_kubernetes_pod_container_port_name": "web", "__meta_kubernetes_pod_container_port_number": "8428", diff --git a/lib/promscrape/discovery/kubernetes/pod.go b/lib/promscrape/discovery/kubernetes/pod.go index 4ea474e5e..4b5e6111c 100644 --- a/lib/promscrape/discovery/kubernetes/pod.go +++ b/lib/promscrape/discovery/kubernetes/pod.go @@ -38,7 +38,7 @@ func parsePod(data []byte) (object, error) { // PodList implements k8s pod list. // -// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#podlist-v1-core +// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#podlist-v1-core type PodList struct { Metadata ListMeta Items []*Pod @@ -46,7 +46,7 @@ type PodList struct { // Pod implements k8s pod. // -// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#pod-v1-core +// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#pod-v1-core type Pod struct { Metadata ObjectMeta Spec PodSpec @@ -55,7 +55,7 @@ type Pod struct { // PodSpec implements k8s pod spec. // -// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#podspec-v1-core +// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#podspec-v1-core type PodSpec struct { NodeName string Containers []Container @@ -64,11 +64,12 @@ type PodSpec struct { // Container implements k8s container. // -// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#container-v1-core +// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#container-v1-core type Container struct { - Name string - Image string - Ports []ContainerPort + Name string + Image string + Ports []ContainerPort + RestartPolicy string } // ContainerPort implements k8s container port. @@ -80,7 +81,7 @@ type ContainerPort struct { // PodStatus implements k8s pod status. // -// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#podstatus-v1-core +// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#podstatus-v1-core type PodStatus struct { Phase string PodIP string @@ -92,7 +93,7 @@ type PodStatus struct { // PodCondition implements k8s pod condition. // -// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#podcondition-v1-core +// See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#podcondition-v1-core type PodCondition struct { Type string Status string @@ -198,11 +199,6 @@ func appendPodLabelsInternal(ms []*promutils.Labels, gw *groupWatcher, p *Pod, c } m := promutils.GetLabels() m.Add("__address__", addr) - isInitStr := "false" - if isInit { - isInitStr = "true" - } - m.Add("__meta_kubernetes_pod_container_init", isInitStr) containerID := getContainerID(p, c.Name, isInit) if containerID != "" { @@ -210,13 +206,18 @@ func appendPodLabelsInternal(ms []*promutils.Labels, gw *groupWatcher, p *Pod, c } p.appendCommonLabels(m, gw) - p.appendContainerLabels(m, c, cp) + p.appendContainerLabels(m, c, cp, isInit) return append(ms, m) } -func (p *Pod) appendContainerLabels(m *promutils.Labels, c *Container, cp *ContainerPort) { +func (p *Pod) appendContainerLabels(m *promutils.Labels, c *Container, cp *ContainerPort, isInit bool) { m.Add("__meta_kubernetes_pod_container_image", c.Image) m.Add("__meta_kubernetes_pod_container_name", c.Name) + isInitStr := "false" + if isInit { + isInitStr = "true" + } + m.Add("__meta_kubernetes_pod_container_init", isInitStr) if cp != nil { m.Add("__meta_kubernetes_pod_container_port_name", cp.Name) m.Add("__meta_kubernetes_pod_container_port_number", bytesutil.Itoa(cp.ContainerPort)) From 372ce74d62d7ee7e08dbcb91cd370b14e8db4841 Mon Sep 17 00:00:00 2001 From: Zakhar Bessarab Date: Thu, 24 Oct 2024 16:01:57 -0300 Subject: [PATCH 17/90] docs/guides-vmgateway-grafana: update guide (#7347) ### Describe Your Changes - update to recent versions of components - add information about the license key - add example configuration for remote write with oAuth identity for vmagent ### Checklist The following checks are **mandatory**: - [x] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). Signed-off-by: Zakhar Bessarab --- .../README.md | 98 +++++++++++++++--- .../grafana-datasource-prometheus.webp | Bin 7282 -> 23912 bytes .../vmagent-client-secret.webp | Bin 0 -> 19922 bytes .../vmagent-create-client-1.webp | Bin 0 -> 16246 bytes .../vmagent-create-client-2.webp | Bin 0 -> 22192 bytes .../vmagent-create-client-3.webp | Bin 0 -> 19408 bytes .../vmagent-sa-attributes.webp | Bin 0 -> 14598 bytes .../vmagent-sa.webp | Bin 0 -> 25336 bytes 8 files changed, 86 insertions(+), 12 deletions(-) create mode 100644 docs/guides/grafana-vmgateway-openid-configuration/vmagent-client-secret.webp create mode 100644 docs/guides/grafana-vmgateway-openid-configuration/vmagent-create-client-1.webp create mode 100644 docs/guides/grafana-vmgateway-openid-configuration/vmagent-create-client-2.webp create mode 100644 docs/guides/grafana-vmgateway-openid-configuration/vmagent-create-client-3.webp create mode 100644 docs/guides/grafana-vmgateway-openid-configuration/vmagent-sa-attributes.webp create mode 100644 docs/guides/grafana-vmgateway-openid-configuration/vmagent-sa.webp diff --git a/docs/guides/grafana-vmgateway-openid-configuration/README.md b/docs/guides/grafana-vmgateway-openid-configuration/README.md index d5496f082..063d9b701 100644 --- a/docs/guides/grafana-vmgateway-openid-configuration/README.md +++ b/docs/guides/grafana-vmgateway-openid-configuration/README.md @@ -9,6 +9,7 @@ to restrict access to metrics to only those that belong to the tenant. * [Grafana](https://grafana.com/) * VictoriaMetrics single-node or cluster version * [vmgateway](https://docs.victoriametrics.com/vmgateway/) +* An active license key. You can obtain a trial license key [here](https://victoriametrics.com/products/enterprise/trial/). ## Configure identity service @@ -96,7 +97,8 @@ Now starting vmgateway with enabled authentication is as simple as adding the `- In order to enable multi-tenant access, you must also specify the `-clusterMode=true` flag. ```sh -./bin/vmgateway -eula \ +./bin/vmgateway \ + -licenseFile=./vm-license.key -enable.auth=true \ -clusterMode=true \ -write.url=http://localhost:8480 \ @@ -162,7 +164,8 @@ vmgateway. To do this by using OpenID Connect discovery endpoint you need to specify the `-auth.oidcDiscoveryEndpoints` flag. For example: ```sh -./bin/vmgateway -eula \ +./bin/vmgateway \ + -licenseFile=./vm-license.key -enable.auth=true \ -clusterMode=true \ -write.url=http://localhost:8480 \ @@ -226,34 +229,34 @@ services: KEYCLOAK_ADMIN_PASSWORD: change_me grafana: - image: grafana/grafana-oss:9.4.3 + image: grafana/grafana:10.4.2 network_mode: host volumes: - ./grafana.ini:/etc/grafana/grafana.ini - grafana_data:/var/lib/grafana/ vmsingle: - image: victoriametrics/victoria-metrics:v1.91.0 + image: victoriametrics/victoria-metrics:v1.105.0 command: - -httpListenAddr=0.0.0.0:8429 vmstorage: - image: victoriametrics/vmstorage:v1.91.0-cluster + image: victoriametrics/vmstorage:v1.105.0-cluster vminsert: - image: victoriametrics/vminsert:v1.91.0-cluster + image: victoriametrics/vminsert:v1.105.0-cluster command: - -storageNode=vmstorage:8400 - -httpListenAddr=0.0.0.0:8480 vmselect: - image: victoriametrics/vmselect:v1.91.0-cluster + image: victoriametrics/vmselect:v1.105.0-cluster command: - -storageNode=vmstorage:8401 - -httpListenAddr=0.0.0.0:8481 vmagent: - image: victoriametrics/vmagent:v1.91.0 + image: victoriametrics/vmagent:v1.105.0 volumes: - ./scrape.yaml:/etc/vmagent/config.yaml command: @@ -262,11 +265,14 @@ services: - -remoteWrite.url=http://vmsingle:8429/api/v1/write vmgateway-cluster: - image: victoriametrics/vmgateway:v1.91.0-enterprise + image: victoriametrics/vmgateway:v1.105.0-enterprise ports: - 8431:8431 + volumes: + - ./vm-license.key:/opt/vm-license.key command: - - -eula + - -licenseFile=/opt/vm-license.key + - -license.forceOffline=true - -enable.auth=true - -clusterMode=true - -write.url=http://vminsert:8480 @@ -275,11 +281,13 @@ services: - -auth.oidcDiscoveryEndpoints=http://keycloak:8080/realms/master/.well-known/openid-configuration vmgateway-single: - image: victoriametrics/vmgateway:v1.91.0-enterprise + image: victoriametrics/vmgateway:v1.105.0-enterprise ports: - 8432:8431 + volumes: + - ./vm-license.key:/opt/vm-license.key command: - - -eula + - -licenseFile=/opt/vm-license.key - -enable.auth=true - -write.url=http://vmsingle:8429 - -read.url=http://vmsingle:8429 @@ -337,3 +345,69 @@ Both cluster and single node datasources now return metrics for `team=admin`. ![Admin cluster data](admin-cluster-data.webp) ![Admin single data](admin-single-data.webp) + +## Using oAuth for remote write with vmagent + +vmagent can be configured to use oAuth for remote write. This is in order to add authentication to the write requests. + +In order to create a client for vmagent to use, follow the steps below: + +1. Log in with admin credentials to your Keycloak instance +1. Go to `Clients` -> `Create`.
+ Use `OpenID Connect` as `Client Type`.
+ Specify `vmagent` as `Client ID`.
+ Click `Next`.
+ ![Create client 1](vmagent-create-client-1.webp) +1. Enable `Client authentication`.
+ Enable `Authorization`.
+ ![Create client 2](vmagent-create-client-2.webp) + Click `Next`.
+1. Leave URLs section empty as vmagent will not use any. + ![Create client 3](vmagent-create-client-3.webp) + Click `Save`.
+1. Go to `Clients` -> `vmagent` -> `Credentials`.
+ ![Client secret](vmagent-client-secret.webp) + Copy the value of `Client secret`. It will be used later in vmagent configuration.
+1. Go to `Clients` -> `vmagent` -> `Client scopes`.
+ Click at `vmagent-dedicated` -> `Add mapper` -> `By configuration` -> `User attribute`.
+ ![Create mapper 1](create-mapper-1.webp) + ![Create mapper 2](create-mapper-2.webp) + Configure the mapper as follows
+ - `Name` as `vm_access`. + - `Token Claim Name` as `vm_access`. + - `User Attribute` as `vm_access`. + - `Claim JSON Type` as `JSON`. + Enable `Add to ID token` and `Add to access token`.
+ + ![Create mapper 3](create-mapper-3.webp) + Click `Save`.
+1. Go to `Service account roles` -> click on `service-account-vmagent`.
+ ![vmagent service account](vmagent-sa.webp) +1. Go to `Attributes` tab and add an attribute. + Specify `vm_access` as `Key`.
+ Specify `{"tenant_id" : {"account_id": 0, "project_id": 0 }}` as a value.
+ ![User attributes](vmagent-sa-attributes.webp) + Click `Save`. + +Once iDP configuration is done, vmagent configuration needs to be updated to use oAuth for remote write: + +```yaml + vmagent: + image: victoriametrics/vmagent:v1.105.0 + volumes: + - ./scrape.yaml:/etc/vmagent/config.yaml + - ./vmagent-client-secret:/etc/vmagent/oauth2-client-secret + command: + - -promscrape.config=/etc/vmagent/config.yaml + - -remoteWrite.url=http://vmgateway-cluster:8431/api/v1/write + - -remoteWrite.url=http://vmgateway-single:8431/api/v1/write + - -remoteWrite.oauth2.clientID={CLIENT_ID} + - -remoteWrite.oauth2.clientSecretFile=/etc/vmagent/oauth2-client-secret + - -remoteWrite.oauth2.tokenUrl=http://keycloak:8080/realms/master/protocol/openid-connect/token + - -remoteWrite.oauth2.scopes=openid +``` + +It is required to replace `{CLIENT_ID}` with the client ID and provide the client secret in `vmagent-client-secret` file. +Note that vmagent will use the same token for both single-node and cluster vmgateway. vmgateway running in cluster mode +will use tenant information from the token to route the request to the correct tenant. vmgateway running in single-node mode +will just verify token validity. diff --git a/docs/guides/grafana-vmgateway-openid-configuration/grafana-datasource-prometheus.webp b/docs/guides/grafana-vmgateway-openid-configuration/grafana-datasource-prometheus.webp index a00411be98ec285a660f07f356dda33cbb88455d..fb797d992d2433060d651260d8e02305b24c53e0 100644 GIT binary patch literal 23912 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 K{H=ffm-;_x#wGdy diff --git a/docs/guides/grafana-vmgateway-openid-configuration/vmagent-client-secret.webp b/docs/guides/grafana-vmgateway-openid-configuration/vmagent-client-secret.webp new file mode 100644 index 0000000000000000000000000000000000000000..21100202b783058684bcba0a61561437b33507ee GIT binary patch literal 19922 zcmeFY^P6VDk}g`V>auOywr$(&vTfV8ZChRFGP-Qr=68GU%(;8^oW0Na2k!bM^2xO_ zBQqoNjacuKsVpTfJ|PDLq#-7(sIJIK*!Q=b@C!H>m|7Q11eD*GGgCI=uqX~8@D8_j z2j&Igrtk!){h^!FVP*b%Y_q@Qc;k-OFU{6jl*vEg2@RmJV6iw`D6p>Z;y37@=I`>= z`VtQ){m8z~{v@b?e5$|BtMkA22LN_nVZR%{F93iJiu;{Mf52C*z>D9L4~2j3WA!5t z;N>d)6BGc@1*izr064z#AMoD7pZc$Nb_FK=Z6E#b>@&VEzQUhZJ`ox*CiSU5Ctm?i z1c$y7-$KtOcYsZQ_x`>QuCI?z$m{wX0ce4|?~#wlZ_q=M`}*VlWB>N=^KYXs9q*m@ z*?YX{&XqTY=lmT3$39?Rm3NGHg&Tpcog?4sUhmKLH-asN9RL6z;%D|X{MG(qKWg8A zaA+_qu;AzDpY!(x;5z?)8&)6+Upoo{pR_;c~f`)m9duVP=@?^JuW>}JC3v>I$#)y=@I`muI$RH z9Q#5VhZ;l#JIp5pK~X-?Z$ZbN8q)_Y^(lE3^FM2CVgXvEu03MG6N)!Wq>VlXV)wHI z+Od&aZ&!HrK&6Ts5dE6^X8F{p%{k&#q-{QOd&vG^rJgf}29+qkBZ3#J`d;(VNfU`= zncKC0xX2hfsY5Z4Fd+S7ZOpVE=Q}Th+G}VVK{IH~-F{|pe-?sv2#3x4iezTN$z(d% zQ{cs0*avyklhWHQdUkp>YCK8Z2KxT6S65z==3vW4uRA0dDDQ1^giNTOjR>YIyyvvW zenDoiKPYI#G^AfuXjrJI@ESmR1$JzL6%mDYi^9VWPvsU5--ZxzRg19xZziiL4ldsy zbY{J%CtVU($3b!!$x>pK)hEP#Ka8k|8LSKpt57^1JcK+0&0mM7sFALpuy6i@jqwZs z$k2|wTVVYrsUou-f2Uv2Ah3)Ut$9ZSDId{uq@fm=vQsyc9gvn90KQobt4;F;?A0@c z(7?TQOoZ$zy+2PE6x|sGm1uPO69;3@rf{3li5$uQ5jvusDm(^^7x{@X_H)Er3dPJS zyw^feyTq{u8I0+8ipzN*!Vw_S@AxD0wcCE1DEXl8e0jJVv&7v=gbx^{ue+=<%W z2n$Qx?#In&T_rDmt`pL_*esI#WBna}1Fu)Qg~$1ILLXeSjduDvq5TiH-Pvi=DCH*S zZ{u>t;;Ie;CdgN{j&*=KRq~_+D#8cTChRTghgob}Bl(W4_tIW9!Gq)g^NHxzqzhN_ zSWP%2cAPRrLI1gH2=&b|Nov|$E;hBEese}QMCA+T1YkC62l#JLCB zzI%p4oq_^dFkmRkVX5hSMo@$}(pVM$+NiVRpu@izpsTw*s@ZbRrj}K>`*#oEoJ$S` zwUOq?HHaUr>jIa|ICL-x#BK@*_&t|GF3|=lk$5EY>CcUZyt00Z?$^FvdJ^Y3Nov-A zciC6_hB`GFP`sZV>89)ZM<~;hEvd*B9U4a;XO%vAB>EoKo1BAYrBabGQze&p^a)&K z$p~48w9?sEIT_>Sijahf(fqrC6JCc2IkDK zd|dabB|ZdQ6>cP5F(A*AfEwX`)~)Y8AxsFrU5iYCiOlI^m_}_XMP}h35Qp|@;Pto_ z*sbL9*)VN9lUv&G*hv^nEZ_ASW#PbY^SG2r{A&#PuiEyPi_SPOZKBigBK!!ie=G2& zzSwNyt>R*{OkMwni~KLV8(k$_mqA<}1i6h#CVg6CPXaNaY#*?~$?b8w+ZeO|JIend zEYr|WkkVyuRpxaq@aef$l)$R_@w~`KD;(_q@MBPVWmU&3%=EgC}+{Nc+(Xp@t zGbDnt)v_l5{T2Z3lnN7H#UJloazvc^RaYaXo2gl;vc}UYef|E)p18z0w+Xa72!3d` z{|_k6ZpY1m)i>=eXC@$AYSk!^CHcr{(3s7@w@g1(gd@iJ>0b6b^`b=KO;Pp8CdQaz z(RAWzf#S1*+Nn*P3FWNG%*tW9M4CbTbzt8UOe>$Xj4Q`&?M)xQ+x zLt~0`>OgG&7N=XrBqE0YVzV;_q%FoFa?c&!&f32)+iYlDfo5166s;A3`^Esw_gw#e z!^sxZj#5`{5X|`GuYV3ZjcriuNx#?{1PP-%zh>aTQ^;!~b%2mR2_XEa_2e}Pdt!RT z|0zV_m2vZmW3LkSq~3gZu#R8+?-7L`oy*yUM*Lq+@}DcMuf!Gi zgWyUU;cO5o2CYNbmDgm<=u+DLA#@SQh?+utrA5rBLGHAqS;6L#gg%C|MaAV>EweB;VNt4G;WY3$x zm_A2CfO`G{xs8v?BM;;}@;SELf2mB)X)r9{H8{8BG45c5BRKs^Ots~wlBIAmezFW9 zofMWw(L#_hAY7{iwf7%Z0!7(F2F3&eMM8g9(dsNEbMOW-r5K;F{Dldd51$U?p7%Cb zkkJ{iVXezN?WEflsWHYC!Qc%|=+Ylk8335OdnR~~`-jyfrf11nr&uKj304jl~I(P zfh9Y-ME`!@{pa@-`=q)Jq8@2PwSk3r|Kwu-%i(Cq1=gEjqb0m(X8m=l&?t*Fu8Of; z#IXo&JWb_e748+0uJh&#Gzq5aWc~lG?3pI zNm!KGk^QCce}kaYqq{BwjdcEl-U26dSOp+#Okg%0MPk(eA_Ca3iNg1O%%H2~u`JNz zMi5&YHgxpc2O#3iE;+V?Q6;KwVVegFA}S!CkKCQCetcIUM?Z;^ z;s`EzEsQwff13P1Ww|Cch@8}`sRx1R|A%1mpMfT*8pq~;N1=b}?f)3L{{0~S|7QOP zdH*fh`cjN(?%Kfr*t~G zsB7BA+3(M8UI}CBmX`CaC{4BP719Q<#HH6S9bu+AKa9bp_$$7btUu9&Ws2`Vq|;}u zji_mRVh3^Lpf61myR|a=B}B2^IUq9Wf@G#p85$DCejfSnPujA*){rl(H%P+5G8;G^LG`(sLchY@)D4@o zi)Im5abDzRo4xQwWEs+9R~g)~yd5q;`zLhye$bG-9IVM_KhO9WlF1_ZY~wDY>J(tt zNvfi5`$LO8(dGr$F;50iC@Y?H+Y9j^o=V1rpE#3EKD`R`(d;fO^w$a|AW%C7ZU4#v9Y74Q#AmrgffnT!~!>zP$1d4y&> zkfkYyt33M#By?M|G?zGM(gd6==}gx~>WiYgt20J zEqOcp^BZxQA!s%$LF_};oR$6MQ{&dY0v(F2)hXGH`XDHP@h{bF&>UfG_wLGt+2jLj zz!k~5EOxdc`ti>@Syz-PL+)h$SyLG82@DnRNps6Ht~-_crXv~o zIcylkJd)u7LnP5QX+iiI0L1#v$2E;jXT$~1W|tuDpn69O^q&v+D#!A%?mf;7t$fW# zp)pEasGIVrfEnn(x5boM+wmPhcAd)JjVP#_t>!WIGip z^38FF>Va&)@T3@cEmMnS7b_jR#Y6XP?H6V*ZPORVL)5-OhsbHrltQv#@w}oy9X*LQ zMR(zjj^4!~<`Lv`PI5*AIuTag54xgOn9~_|Bc2%><Zxh3YOE-9kJF+L)G#VkBxAkc2ecfDN{;<1K(jnJTC2*64S=LNn{QDaan7GDxd z17LuR!rbvqCP@%1{nJdpgs37f zRbSk%jLz>w!=p>DPnRXGks9~3wSuRdN|%_RtWop)-AxR=*8Fxo3(3-||A6(1<7=86 zvFews^K@3N&O;{wsSCylJI2bYYhR=gdm~C8a(*F^g7-qJl#@j8$Sf{0NPNo&su^t%&*HS5zDf(|Ir6n3Pe*PQHFQ^Ss|fi*A&xgw?w|EybaUgcuPk zV-Qbg1=-uv%zO8>&N8rjQ6n7ArXkr!edF8)-Z}EboQlHHd zG@^%4gM|?jxjT?3+*i{Td2wBr4;&N+kN&`6*Ep6PC?*HfmPMXp`AVasX=bwg#B{j> ztRBgpnB4?m>IqJ1pzB8XnNKy(5JKNCV^HnAzd4D0!*`mEyy*KrdiHpq<7mr9YZ9uY zpdr*gp#aIhq}2BYx!H+eGeSM7K0Iq-{J|EWB72Uw%634#ZYZfx>t@>bN0TcA=k2J} zT4UEFr;7auCF|vV5~`ny9rkQLIA%@J@{7pp*t+EhDD<2skMU-2_wcJVo*7T}qT5a+ z!4;>DwQ+$_Ypd$MjIw_$oY`iDG%n`EFvc|GJzEL%!4E%v`6)#LT>Ku0YOf~o-7hy2}LKq-M>wldh`?9FSh^ZppBMQ*5;aXsL+-swD4Wzq*O!pxP4gsMZ3Xcn0&W z{tzpb*YO)>Z-}k357E6U&tt|;I~U$O=Sm329ItX7 zL>y)4c#WPuW^4LKbf?0w^9cel&9cy`T0A2@>-Z)PykF6A@PdHdA(~klo2jD0VqRLD zRV}Ouo4hG~p)CvRNY;w!k1(QocxP|ifA%xtKy!dSNr2-eY6W1lB zS9ib{Ss!1p$E?bGWC8xXw-fChT?Dfz+pmt90u^}l4B6o*9(T??qe8pm&EJXy>B!Uv z6-G-=P^)fM_xF436aJ%~v>eJrU;^MJVsRJ&tWB*1k+6wr3I*!BnSd1NbB( z&4$Nb8cgyljWiTdFyg^0hT56TF)oDH_F89t%27nqV_3Y^=fc&_a%X@uQ>hq?J}Q25}F z-kx!=dr;BMF)K_jfacj*0L=y#1;>m((TKkMtH3|}GHi9C zSj{*{`o$JAGyj9|a#0E}fW!^bbwgul5o_7>KMA zC0WvpY8LoAka7twlLgBQPc$4RZ`4)UkR9l)BWF{omN};6rQP+VIo8pkt6XrD#xfTI z>}~6+g`;9PRbM8*XkJFK%mG{xyB&N2y=T6;MrsB4*W+0EZr)asJu=i>4(6m}EFyRL zU84qtetW-muOR|k;-u@6V-wLJZUq&(7a6ZNk^3HAdag-Aw9^6Z(TFP$($3gWyT;f+ z;C$kIMZ)$Lp*jLL6WL(-sVY(BukvjzKKbZ85S0m4lAmqyn6J<$zvmxZh)Q}peV^~4 zU8ML64P*)vsWub?W2{Jidf)VLV(=d0;c(CHox7~*H9$*OY$h+7HI!J^w_Gc>pdnTF zX?sG7w~B~93{TzGf6awH6I|WB8$)^flUSW-rfC4j8Vn<1VIpy7N>94$k4pWu|Z&-m8KQ zA$^Chg*zOMxy(F*(A$&vy@eFIbW)+V<>qz%;228P6aC~~dG`@V{qeX^m9gTodZ~Ac zQBQx0&YyRMFN`FU`J4HCa4>v0iGm_pbO62J0X1;Z+Ah+c=V=B}ox90=w~UKjl%J zLa9j$CE~C<=CsFeu93Y{)M*oC9(|!hl*7}kd*;5HrY)Toyst5BhB@P&1BNuDaLTAn zLsdk3p4VuyB&zvGTH#154Jl|{Xt2u<^NhblIY&YO7bvH7hm~!i@rjq&4>xfDtmPn) zkJlKE9=nudGhLKCJ@G?cEc}^}9C1TQPyX$O)^qZbPws zp7Pl{ir(~u_+W%;=TpGY2WosF=t)oAdczCKY{{zgBLC9|f|Cb+XwfZ9fR$19_*t09 zA92CBqiEs`12fm3tIIlM2$v=K0zd1M>}f${W;GYeI=DsX<-nyo%cxglvwSbo$NXZG z8*<&--~b7tMGEGt`N2HdfD;uyLA>SFQ*~H&oV&=E764b$==eS!3{p69m8bmF36wNs zjV4UOlB@k&<}t1;_q(fT!F!}i+ZM~W|Ww<1w9a>IRX_Jle zmnKviX6QnXaTUo{1@wUm}eWFRIEyDrg2<)##BW27_Pj-gpOr#G}tSy z)}A4d?v|XYmfySTTM2~*p=u~PH|226V9X8E08sq$w1}u)Mw<&4BF#@h*{2QlCDV{S z-!b=YTgZ}(!j2D4Run%7HZaEqWvRdnc?h2&91r&2SFOyH=oXlNw zyC9NHSmDV45y3#D7-=EXO_S#=pvFDOK;&qi+}#I<=bsQU$8r)$3ROvtNW?`woHLST zD+EY|_f{7Q<)II<7%WD(jII%tA)`8LyM`0?$02s1NijJs1UE@ zQw{eBy`8nDPaR}ReAMUZ!3+qRH|SzBq;@`00r_})vE)^rQbV%k7V)clR()Sg$Ezwj zR9>iU`A_CrwF9n_3B*QOp2XKLy$*vs>332BgsQ8C6)9!T3{a1lSH|iiRtrTHtdn<_ zd0b8a0`GEpUTbt}Wk9sIeUxXYQVi<1cw3=+ErzMAYT`|C8`a=Z^XNiFlH4oy3n^sw z>iNY?HJh}C>g4#h=pjq@kX}bkzj9GkNyR=PU}3^Jz7Bh=dPj>k98Pd_C0a}P!7mad zN2V%iSMk_97=;_ZcbkZpO|)g4*!u;XP6wr6;1{hh6a#hY)MU4Lvv8NCJm%rH>cn1E zJfJeQ@GjI(${||q9e8q@R41BWfx|5lt7aS)16d!X<0rqFl&fGcAXrD zA|__a)X_QX7xb=KM?zgDL`ECf{MR<Dve ztv~zR2P4Poex!-n`QTh+ZBxiP6UIN`bHz4gG9spGMub$Y6+e*Ze{8L3Nl26YPA`O? zdl*2LL5pydj-g7#P*);!K*pngOeefieP9FS?vpoYE_k%$leF0UfqwfdR&;6E{@@L( z*JNW}AEk!^miN|#r51YkVx&C+uPGWz4H!furmy1wX6`iJ=5;U;XNNGgg&{(bhAf1< zln3xdws5w44&qneHN0S38WlfgPb1GAff-DdWOQ4=30lqEn%nc-Tz-fM9c3~As{m&p z>#B?@(`K;udqnnS%_5T_+~E{fAsiujf3>;GGEbOh5&Q;OrKR1x)!vl3f5R`fU9wWd zjMxZ)eRvsrs(vkV{eH@|{Eqh(!#WsCLqF?a;5;+iwkNiM8iouAT6y5&=4@J&Q_LWN zc_+Q`TI1#tJOMqE6~|~qYUQ9bB}-2%O{|2#CNCR6)v=&Hi?uqC`U^`(b~TnGqKc^Y>#qKtROY&CNs7u(M0quAE-sh0BW#pdo2 zqTw89jyuKBFFinM;ojF}5``^9+z)R!yM?1}^oHQ4CxpN(73_(Eqt{R_t*As7zOh{) zC9sAvQDltZo0oYLd^rggiy`lA&jwW1l~y~4>NI!aa3>SB_=PJtz}L7i&-BB? z+o3OE*#|knwpFJ9=mZ5150zo7Sz1}Dg?k4(!m=PIVagZWt~jZ*uWwxD*gLQG;vYS~ zL}qrJ)eGns=5(u!LV)wv%^SR?Yl8_{;r7yrVbgP_U&0U(XQGos=;x2={?cC&%&Y>& z=(0uKdC-Ps99P6dd~7kvXp@x|RKF)lC*G8@GxL8}S!4!X3lOkpvN%0wnj8n*B4@JJ z{zV>(QH~|K-wP1jdoYBKVz}xp($TTQ;J(#w0_6ReFf=U6_Gx{9*6Z`n; zHI4J}?#cMSj`<*e`oCI2-RXI3V&=vkc=Gd7t`i?zfydlI(Eg?liNzInlB&GGU|UXH zm$Wk>Ew=z~S7A(6_vUy!myI<1%cA+hy=4=gC0zx}2Ssae8#xYW#f}2uoJ3^po#^%x z!>;$J>7-DGQC?L{7Us3N0CCa+pcv`bYJ!jmc78GnCTA@8izJb(!X#O>b5RRZ1O7Pu zYyy)hM&bIP=p+h9C?~`Bnd`By8y@z(gz?ab^|sd6w&_+S)`2u63 zLC+`n&U6y(9w0nx;XXfQ1^jIO5wG6SPFc}#PNcxSxPw?4(53^hb9h0%SgRiMmf9`U zjriCMyk>sJb*jbKH;4=^dznO{nUlJsSptZ5bs@zTLNrVsOx$i6 z8aR>*Ti7rctSoo^>0^pN4)GU^Dd8J-RyiEc*jrG;s=q_H`Y#UhAA$^07laIgE>7o` z$fgA4zO22vQ6cT%f_jri|5$qPt;ypMmj&V8?B=2AW~1Q^t@q~dL8n1fro;u|`yaKt)Vw6xBr@YDFCyPl8g!fjsU2k*O=y%qeoD?VrJKNS2+WSnoshrUWahhJI&Rz`Y}Qu6m~ z8m5V{+pon|Ah=yL$Q)BPY+hIJemvxUJw_DGdb;;WXfCh7{1?Lma`vCYe3X}vX2}{q zNmcB;W39FdQz2~$45Nq<_)b!FH0vu2|$h zQqgsx`&>M$7sf$;Z6mmMbQQ)vym8lIX)!kaN;TYdB2Xldx6#_IXg7oit)r@XmoPAV zAt%3si}y+kp<}prY=^b zjcY?)N{pAZ!kKc5=BEjHp&YMnS9zZy$8nR5T=)dp0oRFju~xPvuEt8qu@|5Wy|E}& zP4||_upgPZb1Sl>d80-EEIbmqz*a@zy18$E^VR1oJD#CbSG{wO>5p{iKYz{bdDbhzXo~}T^GUbCR#@x8wlUsLvV`!N4 zog}?BQ~>q|5jZ_9jmv6}=42-mrrzq@_x{|gaDZz&w*GE`zGGCvGCq?a^px2#3pcdgz8uYBKjfhJ3nZy&=d`!hNbVmv3bu<*^ha~JB6hd5`GLZuZR zG_5Fj{QVWaBtE@l(y+BY0JXSKiTAgvVtf+{8-krx!$SeSlOwKFCb`lbU66h4MMw*a?%0qhJ(Hb56yFdhU`wv1vFGC5j0BIkT7j+ zWBDABc;)Mdbe+gzC)8jCFc>x0nFu~k)T64{e^YP~+`6mUD&t>v1HlgvIsl7R7{t1C zY~?HdA_Bo(hhOr)EWEPw#*?(m;XJ9m86${IN-!Ie<#9NXbQliWApUzcFpGNlNT7?vIji*d6~dz9Eoaj zribze^wi~Z4YCM($3fUMnELH(Uk@Zy?M5YFKAji@l1gN2e{8Y1@d^r&(b6tXn)z%9%ex3kF)xj346LIT7te$kWL zdXrKXCRBT5&sd2?zEnP_Hy)v>u#s=MBT~|@044MHudYGv707&37KR~N2vJg~dLxs~ za8thX7DiFXj5t<3b?(5Tqk!yDJ5w)|vc6%g;e8?xL*z|I`z}NvpgELf;8}XxKfO$Q zzD$hfh%=IT(rEJ52{M85dDFt_;sGhN{#c*(8QAM)V1K&)V9!QNv{T+~vpz^n>KLWl zL7D<1E#g>iikrt%dvRP{euHO?!z_&OEc7jdA+TTIPYnu!`lIc69J9#KFxgaPS;jQRWv~NW==?j)8;-EeO_#@}=0sRAP>$^r#xopo! zqNz%MS(qtG4hyv5X5asgCnE?Me0B}#?Aa(*&niFB2KF*0lpX5w-2y+&OolbeCT8So zCO6fgIjDt;p`3&><*8f@Ev_Y1VB2#%C-6}m|EgpJ?zkGE3aG<&S^ej=7#6*ry*&{g z03KLkRf6|i#mKnOqNtW+7_^)|dj?!Ectq$4K!pA9HmW&X-)Iy})_`Mbzl)gUcOr9S zNijJ0{5qFQ(-}SY9)~oum@n3c=K1Q>GB)`thl{IfE8n@)>mXkJp!!XaP#eY3=K-er zs!a5RWJFSj28M)|`TBc-M2Ghi6K>Ko)@w&l<^n?Gpf$s?#r%&DQ@eg}@LV>u{dC`-4R1Q}7bW@GCsniS@EIGq|)!CHh!d{`3aBnq)z@=j=A7d(TV zN?lgtyB32uymr1g6^$c2gJk1;s2BsnYmTytSlA0ER!BfttF-VzAapEa%RDHf#2Jm9 zwmeM1_}1uMq=!vVa&3nYIA8VE?g)Qf4k3wqLiquWJRQ|5(VVw4m~2)xUH28?tHAI4 zCJf!F58Up;_e^{TU{k03>5FHc`TqWm-6i|r>&ApMc1GD6>IvcPJwnt7I5yrecHlNLj9QM) z$cCtiMhY?Qx5k0MXsri@EHK&~@$%|-JL#1>t0~PwAr1mjxhO02z4yv+I!~0I!DW#w zDttI7`pP`NC_>)};pNo2ml##ZL}Y}@ear2O-yww7FpE5vf0Px?r%mF}1a>=Z=WlJB z)o@ae+sM)^0stFvQ_}@3h@lgrC5x;It`)t@#6|fVbF>fevlu?Tu7Wnt5;;NqH3rC_ ziKU~7(}sHKF8c;fzk@!Bp2oAZaJ2LXOVOQXQgv9a=aXTHPT~y)4fDeig7SH$+w`&) zS005!-+JKkL|NAXO`p#G#wEN;YjGe>5vf%Lo1KO`c2-W)At6w%TtSu~FjxuGa!uNp zT;fMVn{mflg`_Xn;tdaig-d@3_JLKM+HQxn1CVZYCuqEUvLOo0wv$;fX+l`Z*jEJg)~8;u%e=jwQ)zKwy)NZQtiJpwj=U=`eC7|Kh$ zI!-RcASX$`Akz<0-S23j(yNF;EN{8$pQ^`ynp+B(E z5BsIw?BhUiuSBV~sg&N)Jyexym8aI}b#@pX^1gjq!HE+kAUFif98Oa6$RrKPmamLS zqqu;()UirpM+<}T$67+UFP_D%cZ4r?5*%4(qQbilUw^Oa2oG5$XMaFn>B|zqw!8B7 zh=#EL8IP}P=fS8@!Opq_TTnavVF2r{HEGFi-k751Q*xo+9*6!yQk-O}*FEt@v&WY% zoYpr3x#ScCfRTi%D4w!|dq6z_XMF9DhbSFa15imw26`!XoW|ICbt%%xsGCKO%9YV=1OHdg>b|27!JP<3V1X# zt~VXvO#jXLX$1%TZV9O?2D~L7m4AgEnWwkm$t?wr>DYtQWoNhd{7?&6+6iB9NEpg$jSMBM)jMGErw8|jM$!3xfETy4vT3fKA7g{xo#wH) zd-zI3^>(n?u(Dhan5p;?v0cAHIuUqY;T0JnDuz11d+SKSA(ef4y6$J?{dH(qE4PXY zb1y?Q+v!Wmc&Q4{JMN=IegyY${PAoJ6|H$OOq^xB9^mKo-=kuv-w zX)p7W>z(9aEdC-UaH`jeajk(6=c}m6rMbqF<=NRvXFQI)x=_*;*yVQohEB8Wj*CgrB!5(l!L~TUsaeo~+AlI!* zMpbaNcfKFx)sqMZ1;ID@gX@obv0-|@kJ`K+2;c{8BAIWzru0@wQ(ydxOzv(L1n^Fay1=Q@JefN2Hn_H;_#Ih!w! z^ZKBj&_OGhHQ6pbj?T9jfe<#5)_&5Z@BU+fyP#cX1tOtN+?!XC8GSl`Alkt@{tCf& z(XTz7PU@@ua-ZMEbKlD=02Ju_MPv%uaY`h@C;NBLefO!Ww#^Ukk~HvGoU~?@m$y25 zogqr&lS2>0Fq-7fnLtQHCEg@iS@fvUe$m%+L4DMR$FM!!n5|*qJ(ZLOLuCAIMQMbP z1@IhaHB{1l7~xrypHwWJVn3*iGoRJJ_Ya=8`}U=ie6&3}^#bc{lEuD%T$??;(%71Y z_nGPq_@`1N98ozOI*md%t9fsQ1-GIM=TDUWnq4Ir8~FL*eTi}!a6+Z|1OuSINPQIa z3l5bwiDW2MX=?)emH*vS3c;d~dOW=|<8i#0!i)!BKL05{iQc`T=3NOHV1=R~K?LES zB+z;dcI_b@OHtmyn*lV4>y}3Vdu}dXi1GopI?{-pYfObY1h?InK3<)ZFpatmE0H~# z-YK&NVC=?guuyR57ive0b${SJqti)dsk-3%BtM;+snfmwie* z*w6RSb}L@qbAMs{tm+%Cg|kJDMR~ZlkQKUBgVG&=!eQ6z}jYB!%}b5 zN}-xvp3ESab^t}qR~7vsp6Y1xydK}aA`e7d_XbNdmY`p!Z!SK09(313;az^XyGUFP z|08zDAza-WY;>rlyIgIuf$6@>eL9=+!9O4t-Qz;$&-eRa4z^jrVLA#zIfh>rpYq%# z-92%jJmGI}%c6{sJ0iybod7*x z?1Z@u#}qL%DhxCLLrUzWZQBR<=^H<~2u0DHu@L?T@dno5q3n02ZmM9)LS2od=%N5X z!4ukkh`liQ#$GqaV*oX>bV_(J8eGpDvOl-SqLc`6JDe1d$;uJ(9<=%e1V$ZU`_x)r zBhw>g>_Q%v#p#dzL4e;p1uE#H@o+Mt1wMFvOGIEbU6zqnn1wr|PIfMm_Km_#y)-)_ zz@^k@P!UAm4%OKbrQ0q2A(B?<*B`+;tM`;16>zIPv#|tQ7b?VQsfIoe@~9!hYNvve zT?l+CK*e@Yq&f75+#cGg{DFWW^g~U+^;UY0mgQI2lM4IHkm)Yuvfund41*j!knjV- z7sCKjBYg-jdB@mN?t`-~6XZZOpI!EZCpFnk((u=%rv{x&J`#UbA42qT6eHS_T@2*g zEDbn0v=__8jz16(L;xc9A7%QTn){V(y5f5gpN~Z~$g}2Nqk@Fdh`HC(S+}>tR6%IT zLgI`dK=qB5T6(wb_?O)|LMt~>8+9B!{a0FSrQg=d6{Cdx{>mn-(ydo;4C*Pn1$V5+ zG@ayBVg=Omu(?F7Es!PDPWrk~VjJ<_l+0rWjG{%kqx#4fk zJOe8bgM<=gpM62;xnii#@PFh*(%`_5VrBfya4(;1sfy-@j=ZnCgL@+L7GxV9*|{E{ zb=>N?5@zRw#w|u--kFA>`Lg@Yr{h9d@+TN&EHk3i^p>Y*N4oU9RiB(gRitIx1Ji|Zj;+Akz ztejR-pf z-VTYiEIS|0DC5Mr6n){60PIg0D?gO{WU4UbNmEFf7V%~?^#!hwY@xgLt$JoyJ)sFJ zNA`-)_?}=X{QRL!J$;-rY1o1Aq+P8uVC#bl5-XudlT(K=CA!H&F@5!jRppBVHI@yED|`APG@Q-cssIb7hP&1#?E8MF&}lH6sfyXTG{{|A0fP zW}>}zv}+3%^G+M?uRCZQaqp^1&b9@k6g z?Dp9!HnsnQWPYO3el5=?LR(gOz^uVoXaOtZPmiH5ZE}uOu-b7)Xt9_kj77i^G*oMA zK#B%}KSd6Z8!GpDpXJl;GHL1sViy`A{2CYaexl zSgwwI;&L&AGIjP}MN~VzCp=oP#f1p?-}+!>lIiYu90DYTlM4t6?|2tVwvQl@b0 z)bCqBD`a+zECiK_fLnw|-tF6qyWIS1j-8S|uz%LaCQg4j`k{JW)6AEpIHL<}39w<} zuT}6B!!d9sZokR|leUED66GJxSc?OG(l<*)cdV)!$%L3?QVKl)-sZ_Z8h+t1MZ!w# zYQ~_*Mjt&Z85%e@8HEpxS=oTbhI%g;Ha9~HkOR`{cfr~yq;cY2eIPb5(;%##e<{I7 zNrjZ861o!(l02VOkkcVBP?Ub}s`WP4w3~DxnBs`~?j~4ReH%-(CFLJ%$2sEkDr@|9 z4a$OypNuZuMH$XX2Cb?I8!vM1+8d%=SWRSw0$NJU+z5F)a{fw#7)kVwO$YB(%5hIB zSKP_D>cLnBJ|tDz6(X?=>KjXN!bQpJ)XW z$=jZvIYwRSOx1C^IgEPZ`5Y>zNS=`{qaR!ZdxyENsa+_A_re)FgSC&7l7_A#Z1-*m z<3lE=*hThC-21bg6T}kzMseV4lTG06lO4^g_2o6z@>@AsN-e_+hpalTx5+mnE5*Yp z`qHx5%xI~u+AX^qDUNb65$Vf?l_jr(3!5-RJMGh`jo`jw6n1PEzvImV#$tt2Dc*kj4H_vs^}<3@^BnMHT=fokLq;$ZTp$N zW}-}iFl}^Wu`boZ3AVoU6m=?Vi>+&vvht8XG|s2IfR|3&w6od;+HBQwx^B>t&c$Xw zVT@GPfuvZ6fGxCOSRcw7dgf$c2Js$h3^wOK7S?D|CLx*nsI)m|OM5~$-o01z2mGyh zr%?QmZ&EPR;!crz^ZT3f*eA)lGb8fQeNf=LU-Zwu$1_EcCX3?tLV9@bj+^A7-?oX_Zfwq1(`gCjxNd!$aAwL4)P7j9%`ovNVN-|I8y% zEHV~RG+G_cgKzStjwe(v&MPwPr*)Vp8HNyjE;%!HE`o#SyP(u_FNFyajXG-*Cm%ckYp+bZ93yrHlR!qQ)?eJR50_HF z9u;wU0oF9z?j|iKBP&^Ax&sbLoe;uHI^VwNME>}NVm2A!3M%;1y@uci5Z78ud|QpG z`-Oqy1Onthj50_+o=9p-(D@$8M!D|%faBTWsBc!xK@ZFbe2I2?+FIXj4Q-A=$UiX0Z^NqK1S*xvtsfTl0(o*ciqcAs>_FhPs=Up)V)|)X}nO1J_ zO35sIQYywu0>_kmd`(zCh@-{+SF!OGjIL=I(U=_1kPV1)>KP8EYs0jn3{%_IBD~aE zPQTVpfr7nri9ID3_U!%O0Ut~Hk8jGSsc54P%tw|2qTL|?A~w!f`PO-*+)B(10q-4eirnDiZ;^LBNZ4_Qg8` zlKgUwa_d@bJhCA90EeiI$9w6^l)UpMU9TVxPVK#HN-cVlZkh3|CS<#=$fKJzytWy5 zhGlSdtK{=+gepZ2k}4~1l1bic70;3#TZN4Qde+}dp*|p{0W=t9xGe2D&@n^m&e*`m zy-#G@Wt<@`P`CEC+i+A+a^B{JmJIMQ(uT?Z|F45!TQ~{ETUoI5I6r`t&+ve>-&EKVF{l0J@(kqk9)&_janYR zEzd!*;-yU&6saNOy*RR~x7%@m7JXI`PSHh0i?O@Zr`2QWu8W)Iq!@4RqBGxfGWOGjt1YUS$6m-7a`dk{3k>nMmu&EZx+KSOZPb zYN6LQQQfpr)?(tHV7%yqYl5s>=KHNhc(bg{ilZb%EZseuIHePz?|_?<7W=83ak#Y4 z#37NA0TJyf8af_R;Hh;!-4^IkX1qn``yBMR$QDXddo_xwLk)4q62Q=Of9mxIA#!}$ zmowi!rD<@=WYY!nP%r03T~z>^F5*v)$dK3^Xz}8_;EljmCEI2MR9k%zE>UGcEPL)x zC%xjHQ0_THq!OkEQpTWW@`@P#WS@$y*+@^M9AlThQDabmG z{n&sq#J#yqqdNAQVsk_60q?A^42-JPCjb+5394)uS(+XmJS^jMDFsw-8x7H~?X`-nyzx4aniWD`vB=;VM_BL-hwUpLa3WoIS>Q zE#9m=ssg3lvErJbqa+Jv_YXBpY+?6T(Brc6`R*S32634wMQNc*p{=@sq}8_TOxx8q z{BPLv;CICii`np^eClBuCxV3EF}`mrvW9nrGlHw zUW8h}sE?&tMoYWu1ywv1S(nyG{$;{H(uK2A`LV$-ftAhQ2`jLDKXsE9++?J0dI$8< z?{@1Bwf8c$#g7U7W?B(RqLIG^GvK4XV8k5~fXEoLlF4}|Z=WMS`0@yqPjJSm?yU0{ zuNx*Y*ieDNu@%|E zXo+{8mRxBm#xk0gbZqONMAs!A0tJRc$j`>)QCR%#s4noI-6kJN)hgUFZ^zB`^-0#m z+bg4A$%AwV`_+zfMpx7^!sXWBt2=eHpz{;$tG2VViE89hU)%nglHQEZesh=#0BgN z{b=j|Lf~70>YaPkqtq+l-9*f_3oKIwwKaf={y=0JG5_K$KTjQ!|ZJ+C|;gASd4z43_IMjS6GS z(LYj;Lr`Q}vF8|kzvEn&mha{IQ%}Bj+1+}3P=B>6oulg>`f45+C&L4uMK|2lo;jW-t1Hl1ZdwA?ErJh+IR#@WC7u8 zW211J8pE9s!epD@g{fJMQLv_r6N;8*U63{3H6e^Q`!eZS@*o^n^2g5n07W>*dUQ%q z$7HHX0SYg!)2}ajPB5je%emg%{F7uyLpe%xso_>%Uf(k;+F}8UAa@+-!*yf6Y?xIs zL-zU?H0cDMd^<6nAbK66U6hdMVuE%ej?9k!>p~)-9)f_?tP)ye$}Ob6Wu> zU|dgV6a*&ioGFS~g=Xr|01CGPqE@8ZO*Z!mBvbLMsa*BXk+RI8{6wrKz&1sUeAS{| zGgCn~S04%Up5|}?MRG`wONsuOHo>k;SCes4QnALx_TiLoo!j-U71PF{qT)_4d_dA? zC@cM#!zlf%+Vp;Qot@UHuYVA?IivjM<5^)HgD)~16bQj%D-oI4{I&+Q+H@0D*S1a% z=TrFi4!jO(R`}bZ>T(t}{$CZ}lUN5ns^c`$)NohqnB_vY7Uo_Jxo5LYuQDk_pGRh~ zS!Z+DG#vgLN`IIHXl`dxX^J?D|?#Jz~=p0tNsQ-I>ptd^b=$ zi3M-51OXVxK~}vvYoIAerWtY&)GZ!(JE3^pcHURfEW}nB+dJEmy!NiK2e!Cf&j*e8 z^fe<6KA>2Ha}P`2px-yCike_V2<}0x_1mAH#5P`Kb^)?;Z{oYgdIdl&9LUaqf)n6BI^M!L`vJf}`&I8jPAs)<+{Eva1ez*R?k13CF zH$>}QqVE%LM6W$l+t>OAL}NW=zzQJT`O)hYwEU?5ATaL|;=SWd{N4X%``F)wKd~nQ z*zl?RK7Dc21f1*{@?Qs1UBkSOypFsBuX_%>Q$LS@z$f>QR^TTJ4WjBtnrWPY`Aq)s zE&Gq`7_V)0IFHKxjeLdYQrd7!dgn~!{kceFZ8{mWx zZQs=V7W10SFEsyAXh)*@ueAKpyGl<#IFGI5=|I2(7F_*+(I0&T1+5x@MoST6cImgG z2JX#-zH&P8a`ft=UWWNgEMRaTjq+=!hC~p}(GaB9Klb|X$1$?neP;@qa~=?#@778= z4Q)!p@}>a$V8Nd4_tCk(iPUI+pBRm=IP%ZB{4ay}VmB@=`kg-XQ~3vOBwC7s$dg4= za?6>(Mx|7rn3vg?$aK;OOvk{Op-fVn|PiFtln;-w5&3ZY-`;2Ai4nBtRL$PpT2k_U-w}I9 zl(dzcavW6l+9e%bIhPzSp|f>sV{`EV=e1{n;{VMc{;kOdPuKtI#^=M9@1IOG&5-hU z3`y@MpPdc=Ny%UOvRI$4KI!83+%A&x#gb%f`aDL?yLc{i08`~+k|R!{GPN>CmFXnj+vu1dDuV=w+wB99hDfRxVxi~b&mW&GC$*@l~Bfa565 zvXtXlR2sIb=QTD?Aq}2{(i{H?sE1jhmj_*ckZ=Mq`1yd2qnsvFNJ>N`ecPOYg}T#IvCVhsxlcD8Yj@`>mmi)&_QMmb^uq|}TMUB;o`f$}L_WUDZ_1U~TYna5IMv0JX?LO(B zF3|p#1L#|OJfVCqtszQ*CEqFg5R1;3uK@kQ1io}Ax6HvO^Bv^d0OWRD5Ptbjppr-+ z2M@E7CGnr`uCVI+sbkhH=BKiHm4@PL}UtsLB`8(qOdkX!VPp}>-q?E>;Kz+-sElIVC zLOlgR|7Qfiu1fhgUOC8nyO#_sDwpvmCFCnp|JXI25rnsmzI zuIir=$?{t)rm=zl8w36u75;;u`@0Qpgel7+HWvLd#`lnrMgIsCF+ETj-YXMbFL~qq zgCW|#rqvb9L#pM#;@C~_U%UPvJgLCj!cTBW^^4%n#74w+n1OLQ*hIvcU|zES!QTG{TYJl=_L9$* z58_G}r2Id%zhn@}-~YrU|J_;z(f^ZG{eva{Zv*l-|BJ!@9~c0Lg^Tu5VeXOzk zkfEV(SalxGcH?f`{saH~H8}fA4P9~mKl3a9K8gQf#{NBH)&T&Y?O>qPg}b7uP6mp< z)N}H>5}J_iEU>B`dU8irw+|8%$DoS6ON3XQG6Z7ImwZd2+9LBiM(y`EZ1{(dEba`$ zmvAUq&6%|=%ecR$N?(4Q@#soJ=zOW~#`Rq#9aF`?_t=?&TG+z{^IB<)!^eidMq#p?h%uG#gmI@9D~ze6HWX^2d8U*kfD&S zOwt`LF`mY7OX$c)yV8Y>2$DR(>y^SkpcR0=vgcz({AegCSzUCW6{xg7G&Nu#MyeRq zAL-z<^F!X87}5Z*0xz%* z11bC`y{IAi}ASQP z8tu>CTZMc&`ckpA=Dn`2n#`%u8APnqUnxczP{HrHEu%y>S|Z1NQcyi1&(@cK=7hx2 zMKS&w!ET5&%~`@4ka?FCx8cXw2XtYJlba% zuy_2sU0lOEVJR>Zc!)*gO-7ROX7`{1X=1~UsaJL%;*Dka551`#`|3im&|Fi*==sEBOcmVR}fEMUQgo zKK^fymG1!SWNiH;DmRM*maYSoSY-T@tyKEAt0}dTNo1Qr#!#X!SFl^ok)+uxR^u-D zgw*8cchHKk7@SxAQUd%E9nePa7DR6P%&8ugQ$L986&i~k(1q`PhwaoBg$T%87$xTo zsciGn)>t@_crNvrSV=n~91|lGRS7EnQ})u>m*2AVc3`Lt8d@7wme>L#b7=H* z&nS(l0S1$T()Ul@^XU1nR@9@&zrw#)-a|j#C^C0>3%-9`!>H4{frlTrQ1w~w|3tPp zZ!N#VG=~)**LG`5RFTaJ^4D`jX)^FjjyOVXj|Tt%I5EDA001~TeugdEHrru!pBCSY z)p5zzImWHf7#A(HZU_WO-Ui#}l0S&fs@n;?6#cCKQ*OGog9b#|NR?L5__4=nU!Gut z{7|q7^*~jdP@yzSS?DgpO=qA&&1Q2S0@t^F7;v+$EP#uY&oMc+a@G;a58zYXodjX*+Xj@kv#y!_sAlcn1{c`ylvYgTL}x6*c)N=QdwR^X=-hjgh~b6Qq0gnO z;J_nLRuIze%Y*%hXZ4|Mo`|sRM62Z2w4!Oj!g@?y%dhPSk#9cE{+2gCV13mz+hD=; z(YIr~Ja~E}HC}2bnMMlDz__`#msrwxesP=BSFaYUafrg?R@e4=7gF@I3a5|-#~u0h zhiRS*s0AKbUG`(y|S)!Pk`A zM}IrwB7#{A9m1e$0)ID2yq4<#MM(zDQ6F_c85NFihap$_cVC6JqLf;m5yfm`!eh>Phu zO`HWz+;FZA<|Bl^?C0Ds#oq?pGM*vH>bl}F4`%x+F)w8+QyOR#hi4i{)*9Jp;kPhq zN~Pss#BQD1mWbhv(P+Ab;NiJm^PkwufF6a30MOBj$lm*;R2ewXgQ>n03?C!Od-7O+ zjOr$Nxx8`{qX8=+i1IHCL7tzYgRqB1^e#QyooG6E&%DChZQ094_bhwk_rw!kSEgh- zC`mUeI4n8+Y`T@vi9Ht+GX5`Cbs@lJJRQeurs1o&Y2feCP(!t^Ln;Pk^8^{eHZnM= zFD6QJq+@kNq&aO$jy_cT7Qf!FVWPkCSk+CwF>81r);xd`gkEWsmpS4FkI$qo1WaW7m`g^klttdL(fJ2I^>od$@GrSGYF-!&q82CO2n-`rf|QAmb=O_FIhP@0_RA)tufItyVid22bQ5Po` zc*{0x6e`IdJd5QiAmCw@ZwfxdMg7fY1v-CqLzYK!)bhpFZjbm*O+FIx*X8HOQkZfZpe`EZ4BN7YSzAh~| zL226QX2fGf3X6;rZsB-%^zyb0lAR6w9$t1ushb9kKRWl*{Rx~_Gjj^Yn>~dpH;-9G zDqRIfgPSCn_uM3uNRklIap}+qstfb!Bou8Kbs~PnhFHN-dinBxytuQ~aoQ`Vy*Hnl z`#vGQE0`Qc898%BZ$=!Zm#Iphy=OUS(6T2O>~$9ce=QB+Ew9V;XWvS=$LJ^%m?zcT z_!*T6V4CD^b}jOfB-k>otJc*rpL@FKiZ3my@l4`uRk(LXPh8$>n2Z$MooIK)EhgfG$J%sxUm4P4(_lj>v+dBwT2ZwBi!>8{BnuM4xyKp`V9^A4MSTtfl0E3UOx*;MV`sAZvuVZF#v=~BP}?QIGI zBLgvnkzy3$>-HYW@w%qj&%4L%)22%`VyKKU{&H>=~(^E?i~yWi(DOj^CZG85A1y} z*NRVE3*XXw<{FSn*PS$}Vk7(cB`{4DkwZ)9xK>le_EKZUVq!Gn>czM4_Fs8B=SLP1 z7PtFSQBCI0GW%s?3>a1-tGgjp1-g5i*Li3Q=*R|=6G^yt{a-UJdIb*l`acUc0*RiQ ztAfz_#UC)2f;tVD(|P4$VZ=6vUUl(7g=!;Kx6Wu>JruHP8j4S$+QKA`mPWSt!l z!=HaH$-^_t=1Bk-m8d#jNeOHzq@Bg(rqP|zk5MkYh10HnX>wxh%=hy)&uPX{^ru?1msvQB7Jutde3Cr6D_iS+@d5}-c=ntnab~)iUK4;# z4<-;-_QZ}!5XveDWv;5_YOuS(l56rUQso-M2jpLzd1Y+ZH4X%;!D^U54G5{Lkv?0U z3zS&qdZ(tc>A5rOs)2Y3pp%qHrQp7N!vYpnd9&;VXg9^EX4A?avLi|*1j{Nxo9RqW ztiTiYV!E3G#CkZm7>r~ghRA*N;nB)T=_9bq*O+-~Hw~YYzPUJphC`hCosh)(vplh( zLfU4LcGb0rNomK;bvp=5NL{xzFMmUPA#c&ulc_<^dp=7;{7A6Ev~G+?Z-qfo-yx=( zu5%nmv|JHlh(T}r%`X!Yor({4yL>qqREc)hyTsi$jxKz5+!cLaq=x3HaI!`%7Is(K z%$@OJ*uaiU3`YThe2vFj(z}4))^|R9YC5pVYWoz_ckjf)olSOVtZMm8?|u1u+|B;T z22r8u+R4?{bOYUjq6*E+pTUz`pmTAdf`ea75>@Z|B#LN_uPQ2RqkH^KVhqJHd1OHA z*r3N&MhVGNt<$>n;Gir49E;qQ{U`79TN)#{nxDSB(S9yOGnrJ^XG-=yXTifKS8TgdwyW zA#GLpN=f3{svV{|y7_TJ8YQ@hjSfJoiYo#|R7uobMA{S3`@#DJ5H5P_8Krj{gX5Ws zWi0GP7{@4&6B}}Raf@{`+HT5Cf;elY3?q^l8)%MqS#a(fIG`fQt&D+D(lLlvJd)Z|Ryb?&XsVR(cpvgf1J77g-$#LfI`BznxV%XnY2jZ|*)y@dbs7 zvzgrmg%Pw;52dM*l!9h#qx3PH{idt7W*BL3kaf1Bt;Ks@n%vd_)EH{t{eo0vEWOzjCWNRw5DR6IdG@YuIQb9F9 zH~Nj%!X=j2IPGIQ;F^OE`WGqcf&rKagR^Up7U~j$=qJAZyCU%CuWUE|Dn<_PHUIMM z%*h`;#r&L;r=Sn#QGt>Vg_r4}CaMwsS#sp_2CF)TF!V&8XY?CE^!AS4#OfhDGfNb@ zn?4Q%a6wtL2cYP|DqlHp1|_XQ@7Co7Sn_dDYFF3JUAdm`t}hvZ`)Tm0|%9x11PJ+m&0Fcf`S z33H9}@9V!u>kjP|!rZq`9zlsN&etDOhfR8i{ywo5YE**M?udlL{Nq$z@Kd6B7^7bn zpZ#p{sB16P7s*e^52p`sq}=j|g_n7#1^=Wc{#vY+{+uAMn0rL9N6Y8`T2+Kv{s;ij zcjQY?qBy%Jh`BH_wT@dN0ppUb(UqxyGige_O^oV>^G>WdPujgCr=nJNG)j+aZ+N0j zSeaf*y@;~<*F^nIw@7UKehbv-bBakIX_z;->*RDpCmyFj-}VE^=9}>P zLkE$o@9mV{7(uK%X&DzmoCY z1YT0%Og2$&-#EaBts*kyCTAbEAr8|32&b5Zgb5JmZJ6xIR()k={IlE$0;nbm>>oHP z(pH#}BtYp@S1CaUv_V30c;Re%xB@p=*ygTVkoWEVh-WN2j$z&ODrVA_&~7YS92X!D z5W>apwRD5cope&_&Ic&@@WrU$wOs%t=Wy&0f?p84f?i6bFdH)OR)!Q}q`G4;e5CDf z-=;>DK{p6+Cg!J8r4(KY>$eY~<0=oF|@Q!7%_;BhA8xKzySxOupNSP^W z2Le1|<<%mmCh+(wTEb8Y!bc=Xy%-(%q|Mp#v?kw(E|W{Yq8_UwdO~M?z+OoWIjn}2 zm^baalV$_8q9chfYwFA>*~?^?_eFlUsCU=u50s}^6^>w`Td&S<`UF8?|76m!)AWgs02A0l3VI^YCz{(l(_Z>a zY@3@m=zR*;(42g})(p2LzP?i3_y8MhQBBwe{o3T;ljhmq{QC&|ZIW&&L+i|AN~Jg- zDvEDs-B;G?PE=IfQ^cG`ReG>{Q$(p`yC&n+O{Y^+A@v8b_w~#k#n!rMj*v=B&%(oE zF<_IhF#bwl7(u7xQ~eF5O3fDTX?ZPX?_*CnQaXtBoYkuKcx@MB}sh6@wdDT#)P23I<|w=TMS-P5+){kXZ{8EeNQ)^3=W z(;0Y(LOZA5l3totoBLJQ6?*P+eK6MUE7F2(*H1ZTe8*bE8Ty@+wr7n94gVBG zZ-4&_45xOap`J+=P<#Ygvw1)Q@(R^xyI{Je&HFo{*FdiWRolTdy#91)v%TL`HShGr zCz>bYc4h6N-NB8soO;(cr*By#?AkSDMR+e|PM3a=y0zI#E%4R5$~ zlG`w>*fVq)6WP(WXS`R$mESSLmPTL>;RwI^YPRNlDp#acqZ7YDI+c!P#dnY8)e@HCNMZz zJeD_%SND`}2q~k85CzUHkPTeJC6I^{Mk%cY*Cwqct1uW2wVCGnBhUiGq~TYUo-%z{ z5E7cXPmhOaA7&=B3}(4QgB>#hcZtD4pV_8cPg<%pauHvr;sjQ<&PtO6K%g?-;dlPH zJ7^{M=ek#R)-Ad46CUxs!D)<#-)@`s`=}B8c3G|_V8PsP;gOO!8waTGe7)xF zPYzr>n%CevgK9>Bf=yJ0W?;8%&3Jkm5}CR#SMib@(p_prAM(ZFgN7}eXIL|FX8bJhI$SPT7Fxp0jxE^d9p6&5Ja zwzF8a6k?(vL&Mqqmy_y*Xz28)6?Q*uL~flM0|zTu&loU+gyhvA>}!Kc@qe;0H$scI z;61(AtLv%4HU@o7l8{Apifl82DR{)vw#zHuPqph2_<-+}AKkqk5-; z0^Val-c{)i5Ru<`);*W2nWlt{xPAY9cAIQkpS+b+Fx zkN)e!MYD4kwaPEL(Z);P`DvRf8|VZ;2=ZzOI>ZzK%wf58G81aH!Di=3VdE^ejtj}z zE=uS6`Wz5SmYDnoqHE6UJx*;YYh@>m**=^P5`bnvwNttwnk?)`cEGn@c^%{k$Mvgo z^z&ADqBCV?L_}sVxK!x=X$|75w2)Jc6^h4X0oAlwLnEvp55X||;PL;}nU>g>4rC4+JE z%2UQmh#8Cu75E|1%4CDb{I~w8fX9HPT-$z^i`DBY{}nPsPgI7x+|an?xCJDh?YmP| zO5-@3gRju^Q=|(Dr;t=3?X0LdDABpA2m%2shd~&}3pS@2uyHpi7Gevu(Z-=h<7Ac$ zTJt4HuP8m&e~nu~>~y}n%8p_rU0{Y zXR;67+zjYXf0QwVolBqwb#|wU-7hkg zZsRTlPo*8j672d}<<;h}vr_JU&47P8xN=mLZ;>0SMUYEGbX9oU$v~jxYw(K|x#Nje zpT%QfmiSFkx4v1-p`b$G&@JMa12$Clbt}9}%$O+XCMWP0$mDR%xIYAlXIXH6TJn3o zF|W+nh#p?`-p#Z98?-DuT39xcC}JO3fsVBYkiUlMaF|<##{Fr_SL={ySEUcH0}-rR zJSe^rc9XLTHrS@IERCBFJVk51(8i+ukZV8&*6GNoH@^ZlP zfq`qn{S##2u+j)UwL}kI7p91`M#?(__a>D(8+i3C2y9wKp)tQNuvI|iA9 zaD-wO|2b15es?37@@bgeV|rJqTSPSk_@R5_Uhf(dl^BT>hc6{2ggoOw8@6wfAia7F zUxaN~CiGFKn3pjw-jG$$P8cP_%keRra1mJPyYrb|rm0G->9JH!9OFPi+yDF{+KTaua=>O0)irly z5yzh|^4>!~3H$6EkhT)h{Wp`luWk@X8*W zn&g(48yG9(VW+}1{tUrrdMoR~JFa}x8ih-^bPfC8n8o>UF zyQLLz)sCNo!Rqh<1I#M-kv2WGH^mbcA0u!v-IF-@j?mARI#sayP>khI_9;FD7Nd~C zHqV7qG_v51v$68%I$GQcc+0rG(CA7~Do^9I_r{4IxigShvYzu#?L&Az-plw{il0exYQU2Jia)bi_mxg-rI;gBN`+~x6Fb^zR>o*OlWZF#CM z8*uLB{@B@fVsE*ej8Yl>v3C{|aq~rV_KM&>S+1{w>JkyguXPy9HdSbBh*27A;JsMy z*}kw;{F2L8dGjVQjG_G}UgfP)BNQK^`lH-Lna?)XL-vLWcO5jsHQQ_LLf_8Wq0n5A z;QH8cAJ7e~4h_#)n2`psUzJ)<<^2g6pr<*DWAG!YLFHA(niV57jr&|PnHivi$ksfs zkkAXj@xCKP-~HOP{Ij;DLWIN>638y9jAG;XoWg0tKfiP+|BU*qq*DNSxHKo!_(pQ=Eb*Zigk}CdaUssHVA?=?6HUG6D1Pa!JEcb?pMb5zh)ttPm-V3ImXfCTKjbX5xdQc4It0!+Mad}Ioc$>yb`3J$BPH@#_q%= zp&VTVtX8pIz5kNvkNSvPb5x=ALth&O+p%wn@WIvkenK<%LD9tU(Ci<`==li(1~?Ef zuCyUDf67&sgBY=F*FeLNQJ2nzla8RmTY%x~JkI%4`#QFfm8l-7KDuE`8#OKb)*k@g zw+TbKkn3k)tI@nEK(5OToi-hxs_mFJE}$s&)9_N2q;-Iuss@D7r#!BTB8J$0%#HK< z28Q?e(TW6y^Vq~K3B~K#kTABTil9JHmbz?} zoH{5bbpQbHtr{UV)&F~Uqf7u?{xapCaN%|s)sjJx==EUr3|7QFYXNLRl@QlBUkGvI zWETIjMH00xanuSn{B`w`ri#pw!d~kdWkO%;P^izfZsG%}Da~)q{{uxFB>mnZ_}U0T z=tKMBt9T9ZXt~hm?M~5?B>_aNTWOy_ZxZ62+9V)Qkw@aR7f9No8eF-r zo5PwnAjQPW+H$T2fpQ5McrL;y~X~RP6 zmkt-u1A+%O=$X>cDUz5K2J~Bq?h^H0u_!oIIfSalN;;5Er~Dbke4R4=t3xDM-7{1? zbSM{Eug`OWoSU=bNM{^wXrR@Z1?@->7-OeBcfmP(cNi!5QY2zh)Yf)^Ah(Icw=1Mq zo1-4IoS+ml*=+2Ee~B+ykt-WgN!VT;4FCqNL)|DJLp1O>w7MuXj0d1|X7<8!+y3dO zjir?@&n4a1Z!MceBuM~WIu^Hplz<9wC>sL|B7&1Y8^S>QR~;Eg)B>1ae%gMIl$iz} zi9P)kD*Y;cm~gFrnbswAw8&l&M7~s-*{jXKE=|a%pUt>gth1af;J&MF2-IviHM9~Bp z6JNA@n=S{Xc^^4%H#lES5!IKUP?&QTdNSo2UVTuqQrMjx(S&eMYpg zB)vY%wvDFJlR(u}N|>qO_uqMk)FTCos?`@F=<=L?lV;mibO_^PLnL12QiAp$B|Zcv zZ<%ek>my(a$LRB;D0)R4*3%qX z=u~>;m$_wt3cbat(&s%#{}bZ&G>{^LENZMNGIbUj&Dk1VkmzejG?t$+?7PE)Ri1O9 zKc+B86tMc`Pxke9kEq|yh^yfEGnf&(xS{NE9rw10%G}ghbtK1;J-E7E~Q?(|%+H zd$k+NN-u1t$e)Mm1r>q3(>&gWvvwPR3l7~$G!6R z5Sh!)eZf||m?>lcJ-CHc@cQ$6$DQdUkb~~kq-u8+b8@1cjYk#)61_=N|@go z=lPFDL{)-U5&IDAfoN7!oJJk5%7nv`zi&`i2Iyi7T(y1B9{T{iM65QXs;;Gs%u;L2t z{54tP#_o9JPjYMg<~C~?f7=p6tf#aL!fg;nF~w^HgPwxUz9jbN2`%RDGG)08KRg7r zGnV68cLDbym8S{jNeF?#_{M!4gi#s&GYdnq@we2z%TRaC$pgBwdjGz#iS5hP*`Itz zYA5@FEVDrn=MNvYc@7}mWL!TMteyp3&N0My79A*4h%)^OME&sR(~#sMtWpDR&&4nz zk>6~LCMo?M6P=6K#9)q+%>rIeP5c`5+8YCXVtXj+UgTraR-p@Hl?CzS-%{lk9Kmf| z>R6F|Js&|Ofww_a3qR<0oBcPsl#_EGTELuohb&qQ$pE0FV*D9%P4n$i5>{o7Rel*% zk=Zhxf919R;Q<75enc_Dx@M#cTm|GWZGk^nTrAFtR=ZL#R|0Zzalgr?xOZ@5{uI6x3?T<+>x7E58o0xR)2yKup6wC?5W!5e1L(WDsc`A|oB&U8~%SUpCp zG|ZlsS`7zwcI*!I8S!=2ofh~}X{?~G+9!T$vAR-fuA6$^1z6irwx zdYklgxaXJzoxOzWUF=(p=0d7EzjJ-oVgrKplwNH8M+WU0-*yeO2Owol{La75e<=Y? zMRjKmF<(6jWB(o`=Z-LgxnKNt6(5`|w;1^KK||)Nee-1RV-!3;KKUSD(0A{ZR97+y zkH!S!<7wk0c!%#3m-mmoUlc-DB#L6FSM2&Sv`ySvq`J1RX>8D@KctWCNUxJ`UH5k` z4@a>g89t8VT&(rw&pqD) zAc%c(@v*gSj&2{d@l>ngfQ8~MPIfGa!y2kFU6Eg1SMUQDu$jNF99^QTff9SktiJPQ kkrK}m&Br#+kS2o5yXktH#7b3xfYd~V*EZN_YwVs`uVf~`d;$jtH6at0e~maPu5R00O0f5v-?x8lOJk( zzx(-h8gTjm1o$`u1^}wI3jxdg4WEPGhn_=^y4U%e0FeN>kAyjb!7i(}oX73;oSW`O ze%S3JfWc?QA;l!X17P&2v=FnOqYohZSbvZCxW4rn^DVrQyW3vsUIN&>hrEEl*T3jJ zUtjRYXXkY<_&Q%1P6FC}+dhXs-Zn6nVzL0apO_9$0J?K5^?R9(dkNW<;@_xg=>Wfm!)UCpD3KoGjG0c8B|b!;B=5cen=I6NtV9^qf3v!#1G29m|5 ziR|~_Ua72nQd@wW;=O95E;yy|d%-V}`fdMnw^ zmZ3C>S^SM1BUxPiwmeH?gqr2of1HfEv!}+7tR8gWOh_7A-|0k0cJT@_r68;zo{Vf7 zc+pH)+N#N$DL6}$Zt9OO@FGeLWx$_)`B`U=EmUtmtrmLwcQ^lhmRW~EPX6k{zQ3Y# zp>L!^38qXU-NST#^!w{Ac}S=^eb+fakdkNmX)QM{iZK%7pF#e4_y0OKbXkuBk7j@# zy=oOA#TYrHQK(jBd~zmp#Q?**UF!;E7-T=rJem+4UWD~&Fv-Tv>%cA3xi zTmN=J5~cl*y1`Qo8-M#h$_D`?l`v^75@!+kcg2i<)DuK)h5SdwrUgiOlau*Egh4=2 zccUC$1cPFZ-oe9?148WsMEbsE3lbW!$N5uetm5q3rY1HpmBD>*lb?Sgw)K{F4p&wf z^tvID(~B*(82$Q8an+03q~8T8WyU<=3?#bhXKL&Q7AR+GmrO?N_cG)|_%t7Of$;MjSEG5wzo`d4vXUaxhAM=oq0LL-f4?rAO; z1iWX$u?&wmE_fIngJ$+AZT14++=~%0@sb<=PhaT5AN{dNG&5?KNU>HC>n5Zeqp%=E;Xn1r7lII|8dhlyP3Ow%m5Zw8Y-6d(~M{? z5m#RyjC%Mh5VOLeeM)bJt!EvOE@nq(h%quD5G!BXVVV?pAO}$P(Tw}fv^=bTzpJPA zi9*9Tm{v6+y0f2Kt=Je-NJ`B*T})BUQkW`y!0BC@14^O)BZl)mQIMtChx9-D`G5ST zhq&7M*3kCR!EcBisXP*IA#e#f*xB7eb=8GtT_#^snLdXX*#w^4ysDM|NSauifr)Gbn%yF1rUiV z9<_4>0VMu4>;D*j{|Xv%v$YC$P|(Yi6zCCb*&I~Q8|=bu0F#B4s}Xb&9v=d^u3ClC zr~QlXpnIhlIFbU6_!E4Ak2?m+yBpBYh~A7)XEoI4v&`pdXC-uh0I*LPs01ugG>*T- zAyDG<0UtaKx>w(qYzSaRKev+TFzJyk#b096|H{yf9Sb(SB7z3A&IUJvZuh4ptC7Ze zTC0^B;I{_+>rby0zo+?yx>K+OKCeS%M---L_D%`I4Oae8M8JR}TL`MB^^3r|Bolun z+I$heZKqBZIR;uy)gY{}sHqg?Zv zk~g+-Np&AVP9+GmPU+8osLvlymVy1flN#>j!EmlTt<4EaU@{YfR&!$dChl%UEzxeS z46UyUUnM0_Ic2lpukgHpSrzOF=Jkhm{mbv0fPbiv7{Xum=&usw@AbQG)d5gJru537 z58Zt_`wUD-f==W@&i(!yik4czzn(>^j7vXv2Vx6#>q=KNA#9TM6oUJp$dr+Q@zhO3KTCoZdTja~mph`=$EI;#+wLgY1z z*WwCoJN@Is_Rh_`*{hmVocMVy#JjZ&MW{gLbn~7f9T(Z;e@{h`iGf%hrf=rzX8hc)R{B? zxzhhD;Qvb(x>P~`K3e_`59R+>EdOD`bpLNt?Qen1{C(2@6L|g%L<#Co(D`dp{^doE z%3pBnzXUQl^j{bFPgu*H_;+IayNTjIwBi3Y!B_F0(Dzpp8Bza{kbj%hf@%Mi8~Zui$SZXVXvQfdt>X{js2J zO2W48u~w)adO=<|e4L}o`rq^L0};v*{MW#B|GLI-O2&Hr;NY;c-0Hc};d&W08ktVd z@%?{CXb#iIbV=jE|FbxZ@YWUqhjIU(rTL$oZYWJ$3-npsci+bhdxFOv*HcY3?Cl)o zhV5wY$}Zm}luRwiSi}s$fv*4|88jD7!MBJ2R`|gupwQwXM^t@)xPr`AC$ILsPOS-U zk>s@MaadO=a6vKh**#`i6@x5pfkO{DRfso0Y@_{$KKRuBi33u2&)mR9B1APg*te3U zloglt@gMw;_GE9Arv9+mYw-lV(i6=!Jl+Lazj)dddU@s;(uiPcjq;l?p{@(i%=eMV zAKxvL#OM!zOk|#CGSSbAzXil*=U}4-Y&wt5D5B2q3)yQ`r*Xjud3u?DgLRpw5R{OU zi-zvCZ8JWhf?lNun$}6T4px z9b|EtPtou&+rB8?$xQ`qaFhbK^7PE`fMWIyyDAD;nT@o!Vp> z?EL;?soGRO9h`AY)Xosn!}=iA!OgZ!J&>S^ZP4Q}0Tf$%vSD|o({1BQWsM&fyv4Ij8WM~UKWr!=(JnOv7~tToxurto*Ue1CSN+)S$Ao9_1cT^ET#9?3=+Xjl6SfNTj{XV?U;ThSlT;;X#?eCljAaYG8pb zV<3A!;mCiKa@oCwHh{Yor&`1bMys)se+5VHym3PRhIB26!n*Qp<7fLCGuX;0Pw2`4 zSXjd^KdR~0Arye)L^x;S_c0i_be^l5VYw*Z1>t&r(HrMyC8-kJ{pq7luK_I9k|*Oy z8o6hfk9N_o9+TduZ;&CC_Y|I#6=T|+UT6u#glrdh@bV@d0u$#?|dQ#QnY?AKu zwwg=P4B>|z$jlcZ+4c`Zt;v9>ryG(zIZFDIPP*w0&EEu`3{{LqebCOeDLjT|F$ zNyS*6bAk=!+g>+gPnIi=M(85jksZSkD%aQU#&gmpbU7uJ8ylgC&Isen2d<$ES*amQ+i=0#~D#o-5 zcn?BlCxSvE3^SCU{c&ze$DZ(TJh|>dAD@h8=v9Xfb(*Z3vf6HPQz~#k9gGDQ#OW7P z5KrfR^-ZmM?2aeUA&oi2;bBL!w+n(!Qdh8f)?hi@f|TIoiCXaA_39)6pD1Nb7za1J zE*Vp9;Q}IY^g-j)E8t#0z~KN1)aJQiDBHc>@jid$N3xZ%Eo}(YbRZr;we6O4yh*$} znPU9JX$C>?yu^4q8mnIa{+9r7?;8K~BcCt~6jDWSbT~WsChw;j;}g0_g&@svlC-8y zXiH7cp?VI|$GvQ-p$m|-`Jfujq^0lm2E9_SCvlxB5AF2AiV_PO3l6=PPGC^Msk)c! zWqEMZ`e)7=RBP)!y>t8A19`^qW)Dk~G+Ig5DN*&`L0y)#QLl){>PYR~12Vd3`d4mQ zS};$V9wo$Q!>%)PH-kp9iNB81RI zRGMGTjjXjsO<%-O9d$wMT_1amRCdviy0Mh?>yB=<9}p(A7?GAD|E|s92$fK#P+t$sygnF{RqtOkFgt4 zSJFVA*5`F7`$qCGp&};f*uJg}wSB5t#|0=QH;WK#P%dwZs44ss!K5P81Y%H$LdUTs z`-u7eqx4?itudOI%&hHU4I?PF^21pNf0?cY>QI}C?o!BlLyXer0UZMzV>HnkUX9tN ziq)B#RLVYk$*IXu5hZ>OPa`g4B_G)IY^wPk1b{lr{sQ$Jp=-FX~7iUSMiw$(|RTRuum?p`6 z>N6ZXb?N>>-Iu(iD~k`3*9|#eUsPv>6Qtiqf`&VRb;XB-Js8ql(i^l z3TTM-1`B-br=p3xxDrpV|v9V2ht5-;B z+CD>F=5mUb3q4ej)kQR$&K4#Uf)ndlTHjktT;a{`>ZQO3Uz+wXr{CWg({)wC3#L=R zZ>l?EUaR}`TO&TDls!Y!ao#ynJkiv5=rHDvvPXEbtA2DWIZ8j%c z4YoA_!j{E1X`aq5Gf}n=BnL_iag_5iQPi{vHUzf8yUU`TydQ#(KsA`{8uU)1u_#>%P*sEbv zeLwv?(Q6-_lce?;uK3xDLa+-(#HRSJw)6o#q)Gv_eOL=rRw@;sg<%7rS^}{K;ab|2 zi|%i!St~%+lGiomA{uU%q=-NvJGu^~!e`L-_2cGw_>pwjf9GC-pQ{YbeM`gONM9Ik{YRAxQMa4lQ#0x zx@xlhXd!W%1;d^lFEwgjoD*(mxJDP1Jlaa9heJI4;Hy~P*Q=gU(Hbfd41NOojJ%6h znfOAPr^Grxa=;|~-2-0NM=r1sA*$Ial$@BnLf~ExN$-m+W3M^7{|E$^zG2#O->T$KZ^tBTID`GJ z%6fB53glP??W@IWN23CP`}S76n;I2$y8#8f^jz(Tp{-p{VuqE)aGpr0@=knJ-3Q%I#%!h*ly8z1 ztYRQ{*T2f?d$F32kH7C?X$E!j+e8v|gyBnx^c>5 zVKs@(4}RfvkA7MhBInWyaB;db7Bl-r6Z$|g4eL|1$>b5f| z-%m+`nmZc4lU<(cfvoUQanf>?$AG-U>7zZ-N?xoy%MLjT7&J;ZcUV&iQft-<7xz9n zS7svmB+Fx*hRy~==*xSY^G6xptyHEYmH4w-1#l?qo}q~cNXFspwWb~?EfeXx%BA=6 zM`7kIbF`nj$IQ+0xyK$;B{2@G#>Y071$J}XFQ^ooaSk{?96xJ86XNs4bx*V*aeqU5 z5WYf=A1b%?CG;hmzM&ag@^c#q1K(kICfOXXY!s`bO+W-?r_GyOeGLzq19KbX)L#YS z0)Nqv!qZd#%xJtrq2o~UyRHexxfuXUOx|$H?7Y)jmdr-7^>A4yBIoQiNY=lzGE(tR^Vs<3#Wtd2|=nEG<(dHFdk zkRRG_GH_PlL??d>qV#1HUQit{Vh^hF2>L}})jTkD5E7O<<)29vTYgEX0MeoOEO#>`Fa9t9S7eF+)*VX&Px zf+{MwjxLaz8Zn(zxq3@i!WR%D&Jdq3x}JS zpkzq{rwtuvH+58*>FF0B*jB?{t%gqBiG&~Fy1DS*@68i2Ft+wgf6@n-+8Egru+Z1s zCf+EK2rCK5yMRQDHfmK{pBiJ>e!SdL#|-L{jpu#cbtpH@)=b>ZNBz{5-`awBvvA~& z3Wf=#MZbH?*eIsbK3uAWrG8a{-yxPk8AsX6Bp#UZQ3&fFIF-QW5=`d3r z2li>ySc0{;T{mywV4l|7XY*k}yqR+?d#yH|MU~u_=<~W|3)YnBLs5J|I?C&zP-tPw zaLrrvjxe%gk=4;1u8M0Vp(riWiz6`&p4fmkEbXI}=)^EY0x-llMuN)5AXf6>PdQ+^4dgageSMBS|{Y-V|0*n`` z4xCi+OHB1IFr)hCnRqpLNy1Xw05wJC??5babMuVKMCJeNp`u~PG zzEO2wllLjr?!Z$`?1QhRH?9S_*(nujBq67b#MYdt{NgMtkZI@J_r|`~{k%Ji0c!04 z8&Ys1I5#_Gz_gwIlV)I^jTD&@3@))!d?A&I$%doz9zh@E#4;DyK=FrgOD@i6WF|J?SLnz=${H`=K!)B35WU$rF`ImP^nAcC{n5>3G~EWf z+LqF)%XD8Z-tofKp`>%mqiiNywC%=1Duvd?GDV4$%=E)DMHB5y;L-Fe zw4TXe!NuZK1k3k~)tu2^a?(@&NXIP_PR|s;Z?@!Ud--#PX9RJ??L4Rv=IXPV_sB50 z5Vz-NKqHS8w^ziTQ^EndJ%UxETpbo-r;Q2$JOZojI>4Z6(=kh8BKlT~6+Ai7sc~~% z9a%Lut8XgOeAd4VpdMzn)Up{6O*zuvPnHk%)&j?5myR1Fv_2TC`Z-_&NBCg0{m_Uo z15OISO`Tq&4nJkC#YWpTktVnuRCC%BdVzM|O;}3wbEGdhr>N={a_6*`Uq=U< zkY`EVpNr1O4fTX-MIiRjurOcbrnVq?7iiM^aumEIH$vL!zDEztyl5%okWvsH9`{!7 zfpZs9C=l*@VV=pekIdcP)A}Hf$mmXx)|S?3(={UMsv#8|i3|A5)O}R&aI!j$$c+66 zigAV-AFy@6p|6&YOnS(l>19J-a&S=pIpDpm2M*J4YfhUBo&feE_$$qPy8NY>;v5eVsCkcMxz4V05U7C~+;zMf3QY=&5)Z3kmvfHYxuBIO zdT^aZT@@F}Ihx#W6{ySsxv@a$YosT@wAuq=k25!^1~Soujfr6Y_=XWayYyyqzN;wz zk24UhE9>D@AfT1sr=T8dep7@%AW(*k?5*yw+CiCC8V%US@Z{#N0!4;V7h5TudJ^Xv zOwhwrhti*F_arm|TVZVEJMXhsyTZUNHRSvotgi%n$UkwYEpZ99MEh!l!IV7JgW&$~aD1HQl^dd*^)Az$!VdpL4BW-X*1oXWZ+Il<3>;+o#({&F;UreobU>)m?=7B4h0Fa_H@OpjWy>UP4jGr@0Rz3c7Swl=-5o#P<# zztg-}V6Zhbk>Xb>V+&&AFOq{Gafk8Lb3p0h3 zJ1HOSmM@0eJWf@<`M?WXqV@9CkAUwU3)__Nz9z5Z9x#({&^%etJA~dD18*of(WEXL zp^+Pbt+8G?|12zRm~Ej>C7KI1^|A>pD$4Y}>_xR=opL5w1cu~RmSG>AsH=m zNVSipfc|M>52*l8_?p#4!Imj^R+egsE_q3eR5R96*h+d#ukthNko~!w+6ACekc3uE z9c*h9n@qZ}f?T)^EHm-zV({y>y^!N^rP}`D@HvInJk~fBeuAN3mJ>fRx2{Kw|E6q= zMUl!wTrm;a=xa5L^_CEh$6O^%ugnO`x!$C%;knrO1e$wbrR-MON!2NWACScX6GL-D zwEyDGb(XfE#hEYzmkD`>*h?hC$23?0*ZyvQWlskb09Xxnul;N(h;r@BQ~UnDm;dky4+q;A7hq8otiE}%|(FEk`^cUyppH3 zyHRprWiYtxaJ1w|av@6Jua_K++W9^j5KHs|CpYx`4!~Y*r|eDP4=C;*l}o0Zx-%jR z=wc0$U+$)fU{i^FNH*fe%3YeT(-Iktx5doxD+0$_;X&ORWnf*=Fxl7*oyFM!Sxqf> zO3b#z&DO{b&+nExPfs3ZhAH26=OZYIi7Gy{Znr2#bu8&-5-;AwR=iMW*TO88GU2|j zN{wRRlXz)mF;R9>g8LT@;^}??q9Z@KRMzLFJ;E2!t#S@up1Z-;X&Fq4r__+6R;6-I z61E@7JiVtLo9k%58>cG5gZ4PHzfra6K=g|Gf^U;~ z3-eZFnBT7S^KIJ!0pFvpDAPW?cVqA(vv3ICj`Ke51YbJejI4oS#aKr0rFb8@( zpMtm{$y7!cOFTCgy&WKM&TI#1a~E>yQq05-b!ck(p8gX4In1iZoDofJ>h(o9zfX>C z{b{bHA_AR&wexsAL!IhZ0g4T&m!-V~9K?%Q+-xemlRc-Kq=g~J%6q3!rW*3=~qe?@z;nOJCpmBO+(ZSVwQ9Wd0XGF~|%QI5}WCM~Qy9-ls~1Gg0+%YE&@iDygtClp`=+xFZH3w9iJJ%D-2me{2`Ub?s(Qr5*(@~)P!)Sf zUNdd15{Xhs_1vL7U!OyaqaMNNsOuf;PFyC@#v$iMAC(Q|w9AqSkA^l1&TE3_r~-Sg zykwzw9+vV8;YRDfZ~6$Y9;#Cuc%4<4A~Z4Pv$q&2bZy^+4&dcgh3=hx7B}qWTLHGv zxk-2qi0#vHnF^#ZmRAr2hs->k?aY3?B>NVtWdA6vptFj{CrA3GBLwteTDJ5Df`sH$ zn;)>@00J)iTLFTo#WaJrgn#^=%NqpOFtTs&E;bLifeY3+>088N;U}X+cv%#Z3!in#Sq$4TWbnkJ z58hYq?=-~!fdlqQ<{2dqgt+70*&PKIq9V9DM{SrzhR=A&x`SFyl?0;fZ_%f%GQWw5 z1)J8oe#JeGg0BX7Cq>>|oADz%_y&wWqVe$zgbv! z8l*rOBfZ9Eu=x<+j;s}ZHC+kkv{HygvTV}tK7cUZ4hxTq>R2~FC?AOk{?$;cTC;1A zrnbo8x-KmGk(u_ZuFWa7;iwbFVh~rLK^{bSs_gR#9%@!hpruvw+P35*dJiJ=aR7^~ ze2=MA7th@I!x8RN+6l&%e=Q*CqexNDJGGVeB7q%0aq?w}Scqvt+Ely9GiStpFO}a~ zs$AhycjFk_mQMQf_;U(kydunQPmd9N*lZrNc_i!;vh2i;sJY|_T_b(1Q@gRY&&-RX zrH=yqQ2FaH*Km+@%%T^{t#GjutfEd+)`ODwR%%`SqX2{e&qiKWv+7zYO`(_Kukz?f zZ#S@98l4Boh-I0>J3^ey{3!EU4`32ufN~A+WGcezM-fU*9D|iql&s8kKoy&UVM9Wk zTan2yK7?@07cX==gijbQk;fjJ7CB}vpH4GQQXmlVGlzUjW~G!owUKn6dXgMbG1kyD z(t^%83$JZkq5=)$6;H@LiZM%-TMjYs@!7$>LOy8TyXj;Z0z5S^oA+MeJv2>O1LizK z-^6PyUY`vgUZ|%_gaTPJEa~fW#JO@E`@S@PoUd$@HVAbZ?6=e<&i&9EU%q=jtcROV zdaL(@00&RFU7KYx*2T`L-?J`E3(;3tde;Ce4ae`@j->MLxrj4=06=+W(tv3_w zNy$xka>#r=o`>=q$4$1tJlfv#wjYi7B+Ujk5n)2@gkzH($usPdlE-b5hFd_ijLL`i zRSnHBGzss%BZ}yOOO`*(?)931@y@g!sl1cpdv6r)M#q$hhqXg=(^? zXC-|^bQG<(PT^f%804_|Ag(_2Qw5$hJlXvo!sN3F;fhtgm*Dk@y)rjLzg1dy3|D?B zr$0jmZ9`Vs51R9Pa`A_Gn9;&_?P_3xi%f0CL^B-zQNB3&6P0LnHg-#1dWszE^*SZu z_^o5l%*6*Qy!ldqagC}=G{CUG+Vxrc4xi4?NR+mJmk#^Qt8%YBDrex!W^58B2Uf;& zrSXG|@w5Y_G#lJdU}m!=G8a=Rt2+X9aW8OAL!N;H(HPRu8ch&8z1t$q%c2E(p30Z;>U5A` zbcEKl#D`%#R#atmPP349C?k;c<#=9`)2GA{fyF_~94c^)EZCXtuN0Y2h926B>6r4$ z&jKiz#lbaRQindgqEt}r7zG#gM3s6s@;@Ma4LX-p#*T-3*6b~irr>2iYm0@79Y}UH zW{8Ax!cJL-IvvaMVx+8f4|TC>CG6Sbr;aR2dfK=oF7S1jD{;xy(F6syG|pEkYNy|g zdw;UX_&|w*3h5iQBjS0%yS$<}^30n;&}b_`>m1eF*r9;a4EIdIGZyq;Ol@+X*U`2n zy+Ae(M`j1Gdp9)xXbQD|*>rwlsLs0oR&x(&aqzu2tA> zF5!CYlY2%a#t6UE_@&o6m7S*t$uIm8)(6>E%PP)Xd^DZ9kN+kPD~611Ap4fZ2PQ;S z8DM2wzSEf?nszjAFxhW6L;W1EGrq?&c89o=ReD7fm$+Q-RD zH}TzkIWY3T>rmp0YxT{q(loH-f+Dr5mmi5=W8#rxAZ->KVhF1xF_1+kB&6lijJ}kuL@fY_%>p)|Nm6$h!V8a<%>?zfp;lUG>F9~ml{bsTh5JK#i z-dT`j^!0=6!U5+(adQo?!o9cZJNNdY$ROCdc!3@_XLH7g#aRhQ|4x-6Vi_ZqwUF{SFP+)aoGsLJH@O7BL zEMi0MgQte$A4uROpceCl6~n5Rn#&(~vnoro(Z`)g=kNn}@-FA0WkM8Zv z)@B0O3FEcCr%1p2o=%qQa*UPCHR^MOiN6Hg>)vxJ0>Qzy9d3}|e~brh8cMtCLI6gW zBg=EC-@VnZ)Mjf@;O#JxwfYOU0rmco6Lvxmi(tZjAb~w?Ej^}wf4~XEAx-X2miTV% z06r-!yliTwvF!qb#WYxjpx%0pN9+5~%jFcwfuW9=L8V2+?oSb0cwhF}Hs)e8zV8$r z1Xd}N-LZXfEn5M?--i zkU z?8(~lsd?)QCGN*pB`iVs+ie6;=ON#!AikilGv{35mXaAN)w(cz+leLmA~`a@+Jgoj zhCu=DB~9P5r9$P8T5S1i@YQZnBpA-C329+ac;Y{SdA0$=jdJ6SPJTZTkN8GVkkmx- zw7N7r_sYh6Deyl?A=(JFrt5On%2oYI3oY;?A1=i%0<(qu($N5qaHslffIhWeWDz#U z=_FP(ECu{LCnM}*rIZ}$(FK;0_yHX(|JX(`CQ`|vo@fW2wX2GkwvQc-lY8fp)x1d6 zS+^0BFmoIfYl?{#1GWrUYQct|lU_Rv^i1UtfwaH;Ck>Bk6|13{ShM7b#=Mkht9xVw zXGiipB(G3r=4uRTU4GzxJ>2dUb-%JVU_`zC8iYeIT8%QGy?f34+BT$$oB*?F*%I z1l6|l0Uvkm2Vd;Y>TuX%yVzEzwD&7u2Q;3nJs)j(AlgGIp`j3-05E`Mt`^62Nh+y71*&QGEDnMmI!{L+aCtH7bnwmPOLL<-NRNU zCAR&-;!n4Z5ismBAsCQ4Jfrxmu0b!GzNp|w-#JIateB{i*m{k?4|aq??kTYS@Q`qH zgL`V>*AB|eLy1?e<{(xO>7)D@N5k3jz3e%y2%GDaLTBNAytj(mWLhr;-vp6A%2H5} zH-CU%d*@y-d>Kc=iyPV0ilGQE`_!c$dwZRgN9btfN%|X)rkMnone5N=@4w%seSPsk z2S(&!<15Nwj;XHD_mUTapn7d|O6d6ZG$;|FgIvC&%IN3HLAM)5x}WdIot0Y1D#L~3S=^**>z`CPO(@tB#^gt zb(YQIO^xptez&GE#OaWX(Ds9E-w^a>9G>GxZ{F!I`YaY>xDtOX*SO5D9o?#J0%Yc8 z^6G_Z9J=m-@BE{tC?P}+_|+%mHAyU8dc;hr?ESzlL3?>FSJ56xUuYkj@~cqc4Ca18 zv0<>hk9Xf5(l=j%$iBapnQ6|MEMw{fJhn?m1#aBX{b&_0@O~aAq0?KM@W|0QoQNOR zs?8wgNg&Q~BI9`^^Ipf8n%}eXC#YK7TRTO+O9}==|9n(Joym^6b!StjbQ8y?gyJP zvdN$V*8w$VnIT?~$P$F@K@=2pnXWnGiTF*nd$fEWkUBMrD(oThB?e5&3tHA355R3> ztODwmP>WuGCLk_bYaEQ2#e_hi<^ykoHgt~LH8)w+rA z8-ulv;2ej!$O^3K5nF*k=QmgGCu{9m8k8+(cg<>^inL2OxRIE?*y}7s*CsiCElbX< zWZNqp7+toHV$tuKec9lL@XkN_w{x)=QZF{Owa#83{Lye-0aU_*rrmAZVEzg$P zwe`3GIvi?9-L7h~1oioEA!g%c^@^G;3}wj7@8~%AlJPN9)5!@{RR^ zCASWImIX)j)f3-;O(~V%;Tl7Fo~i<(toI#n@5z`XQkD3Tlz6%X!~3{0@srDCJn_Il z2$##&bj>X7qSVC@cv5V=zc_n&Z_k8-&F*9f@e3y;xdHDONuq&@ChdL&oNpq<%dP4x z{47a#K+s_Dh2W3(oz_zCSdCML`Xb%%9_jMoIbMnL(W)oX+PT`VUaLH0_vu8&v}A#r zs>xuiSa*n|eo36-g+FO5O4)-3pCHZhDN|9mT)`{N>HXRrSsplb3{u}3c%;mAo6Dad zp#ru>f8Wp1Y^g*dEzdu{Uv@m{jOfk797|`LQ#?hbdZf$BJikx`;#68$`b4VkqiL@%;AlK(0pk=1LxR;ynH#`R1%p>+P7e?geq+M1oB0vOqgg$m{G`6kJi+ zU{bNVqyXaSEcg~kn-8_ZvNa0rrV`CPnhvs??}$7>PrjtVO0?le<03}Xumi*9qmxGP z5`U(Mayg@)MHGZXU{(etJ?@r9GW0=gxSvWLkVRqg7$0E%Yc0AbQvCG1ItLzXI@c9t zh3XF91~$$ul!41ZWTJ|hvBPx9CoaN^WzHyP2bA?zpLhgBi{K6FVc}r9@*aZ04PkZ$ zUPG`N;Y(4NitX1C!Aq_ju}tGycW)i#oKBH!s8Y-{;o4tMH@%0?Sr-=Qi|kO_Z$>Oi zu2>NT#SIbkLTeEuM_+V(o834B2Qm;YSJ?Xt#gGCq&t?l|2NY*Zc#k9n^OTAw=j{%t zJZE5j)Dh#WD5&+6tpXv75aQg!wPy&=sA>Xd(;T*7AY26+%@S5u;BC zBlOjJZZ@>$3%~(KsY|?B7d}hFIxUEy&fUXIJW|dH28!OK!KwFERqsS>$^pmf#NGTB z9X)~EcSo6OL(xJA;~f_A2d-ol5no_^VerUW(2v-KQB!Y+!7U_$bz6@%FrgZT(&?+vP5qxR*2=spaf z21=A7*2T`Un=%a|gv8&UTM@=1b&Vz@Ch7@r{VU)I?zC$2vQ=?3&-n-?PH&=KAe`yV zzvO*YRHRB^^TRtjc|t34i>ZFP_Y;C`+Gx{iBLHTsCnqm-*L!&@v~1KOD9OB2!I!jS zCsf+crb-|L8g-d@NHFxwan@GOL2hK+6s&oqhzrqCZyF)z$KO+jAa>)pIAiAt;1e#f6%gYLwE?}7mPUW?>gY?&vDl%plfWQ1vc6t z(u_Fy`=%y7!(Hu_^o*BKIe^eCiwMw@8#d%P$I28L;Hz3O?gz96r+7|~k|<{%<8%8K zuNKC7Elg!OaA&O}mH|$uTrt?v%?YG2bqi)w?-!q$g$21FUVV$16SQj&&M*!1OV z%%?5bIj{L4PzUwl6XZg{&I!Ag(NJIAf@CfpNP!&tmcGM!hiFHvyYve*o!ux_nH{8% z8{pdqiumDveA!qsF~D)LT8#)+#DO)z%+xzb!;fE-K`9=M{juOOVRB&Dp|$C2#p?>} zJ_gngwNWbxh1Rs@lNi!mt0i*7^&Y%2d#O~11rRnDrHACPkcXUa_pZafDJ!54W@fw? z2y?yH*T$!|N=bxW!ou2q9yg!8{8sMRjma)*~(U!xGbWCMDF=>5z!^~A{-%wnA(nrC@qD!d4wU=!@g8v5bb zsIFn!Qz6Sil!Yvxw%|`_S@ImB-G##= z@@gi|-<-Q@=3E;NZS~pvLd?z*t^NX{jrdh82_;9Dmo*PT^gFZXdLD1BF4JNn`Ft&#e)1X z;+lOOR+SBkx`yNA9)Y1<2&kq|n=QER^L`au`;{%GY}88OI<8AAP?oOhnBPirWUgKK zt2QttNu`5tQMTqXUF;#U)ojiA4xoc_#k12_n%erd?v zYb{`1w~u@OcA%v=BH`7!dEFU)X&u|#O;yLR(1QkrsgkSN>aLEp>xv`>y{LzYe5@Hz z=&x0~k4%EhuiL6dvt^oEAM7%uYjya{R8Wq4(UPCJnF9#VJe$rdN5OlRB>AD|xq7!B zHg7kM_#O_P-%1}!j)&9V%b=JwUwv%6N|JtZPOlvqeVU*`5&GjF>nJb6qL(9FdHf+x zm@Lw0`q8fc%6;O6WfNXo0Du_N_d@=8-Okj=Ao20D2?$EX>OZ+zRU{kP%&oPY;VkV* z!P%t~r=!n{P^;h6J-7->gGzEo|8COzepLjf!?6TKA6jZn3ouN`MVq5r1`bcUpNU!* z3|#lLlX9gWsH)II4>2tQ*gVd^P$pBxD>%l)&&K=?}%o_-{=F#7T>UTcgTFG zb)Bc6YAbxxqDuif?z?j^DX=0j;WK34qRl+=fsn>=K;>QLF^BeVLEtsy*D$cecHFPY zQa@>LYfV;w8Dmap`Oc+e)#-g~CwC7O$D&eXLXJ`6|yJI4gC zd;{4w$fPE(qBZA5I~_%IWnpg%Ybv0OV1+sR$2*hz+|z;GcF}AXLRv))cp{i?<{K8X zOYavpH=1aeLC}UKqw)pxl)*R_zO7W+%@hJ@eAWYlc0DY?K5L0g5jsRgWb#_%R-5Im ziQmu+%zWmd%PD~S|CTpxy}1o)ovB8VSW4>T1L5b9y|l~w-MH*mo)*e3C#LIn3IJ%8 zC;-Jzwc3bp{F-7Vd}$%i*MunPQZe75EB)8hqKW|?&lPXVGt3DIFPUEl<}Fa~h|97S z_l|RBwRQ zz$s6WjGJ7~D`)L@kZs(@>4K5Z!(PC31c8~O@}+Goab?A*-1AFV0gcVS1|6JzIq6+a zbpS%_Oa3LBB>|cBQPeHH>s9T3gYa@k>8>ooCN93a(b?ox)N=P(`Imj#5px8q6wQ}8 z60m$&v?hJ=5oP3^C+#&CURA}pJj(eB!kF5ixm3C8hThG}&NuMMpM(7zxW2lU)=G`+ zEe8^;4`ZwKh8Kr!!W|_MSI}dbK0}M$0FlHK$*gc`OWBAu0W7{t#1NBuj3cq(X7(N| zl;Q%VwM3N?C4qas9=geijFVq zDz0!oarXRUH+OgZmqssciaR)DBS~EaTkwhL@*`JYS6(6%Mn4T$ya+BxY;<#HOCtxq z4PO}KOD~}vgEjh0W@`Z5r_}5=muO?zE|v)wzFakS;9tc)l5Kw+F!EPy)T1p?-f5L{ ziBIf~cdlVJios)gn~n}TKLB~hfk)AIuWzf&YXDsb7ZA?%W$L^igwI&}yjlAxa54({ zvdd#wMEZG>WqLq;y9mvl!>tAH0=I@y;}yn+HG{Erj`eA6isTWwN#YqxzOOY?pudNB zk*~sL)2fNqoo0;moa2YdG}Q;!sq>i+%@|dhNIvTPT+Fk(uMD5A78$1}KtS3ZzyyQW zNBb&=7fpc6M7o}!b4OEcX{V3+VZehm)$<^au$^Bx8}UzZTeqmT6?fZShXM$~=|Ep! zz`ua5IhkJ0I38K19?rrL-pgnb;2LGyk7*6SGeL*cm#tr1KVZ-JQxBW6J^3X*kc57k zq-aW|a8N56vn0i%MAavWrwv$m|7O(R@=0s_+#0&$Td9I^3fuK=I*p`XzU^a4s>W93c{QC&+inFvIkM;4DK~dI* zfu>d5>HK~LR5H47Q2S(Um8W-q)Ap!ukO=V9d`5$&*TFD^{6I-$=^1gd2U5>ID#Mrd z;m%#Hj*1vF|K@el!bEfGr;vJR^}enek7xKM$#7pp>^S^7+UzK-%|A2oN9#HdUxQ53 z`v#jo3&kZv-E7~tB8kmk^N2wOx6ZLdl<&Wxf5JDrq2daXbbCo0t1dIt0bqb#3%aOL zK77DFbX;)TzxFSpNw*uU=ZI-vr_aBmxSVqhF}tmHIcwO-#SJwCXTKx*3SkiNeuHYQ zxRblB!Z4fRT=#DwEgn9Yxjq`bwh5soVYc`azrt64&k7jSH9zxnJ!_aQnXnm~9TI89 zGWh2taD+|oFCSVT|3v7CM5D=|gBvS{RRQQWBn}lA2MQP*J+$GuV z%U^6gKnBJy%!!48R%H{1?;n^)u^+i(@V6!|9)DcCKXn>0L>Axl#;V2e%n~@NeNPY- z$5d_yTHBg(syk)|LwB;UVUlI%3SpCm{Qs#d0O<&MH3|s;Fd+PuJw6sbE^Z`yEd&5i zjL4bphSP6*!vbi^sr0gyob<1zx|xjY{hF0|LgK>Pt_7*_lr)1H1MA??c`*#4#~GBL z8xc7qb3!P!OvMcl{G8Ck>DnIEXheK-)52R2T4{LpHn4_e)9-$W-`JVci=Hk^ z8=MP$V&~Rm67Rt`jfZ<$it36wT+#Px60UP#=xPhzBih94PKHW@r*>Nx$9etRl=7D- z;yDIqaA(`)z&Ym8!Xu{MZav3;FKz?zO!OHNpUWl(wR(O{WKs~IP(`De*$eLgdN{gA1IDgIbyH7)w5TKu9r@8tl+rx;;ipuG}F%5Behx-0r%ovmD_nbjw zq7bs^se8zT{{EE|CVUe{ZJGxu!$=Rw?FP#*N7D=gMjblu8 zo6~a0aA5e86;Kk8sgo3)Aam64gD3y zH%Kg{TA27yN+F>I`4jyI9O^1`DoavG89&nieDlik=?^bUZ!9m&hqkdvsIU`5LB+Ar zx{!5mepy;0PgsjO*F&>jSzIyWWu0S9={|t1qxJ?Zp~^ySt4Ofdk&(a!Nm|Mpj@o zBzUew5Y=~WaY`@9KP`|dnvcKc-$EBT-x3g|=^O#l#u&XYDGJ?;wVaQyV`R#yse8#K z`aoEZBkkNe=T4cf5lX$)oeAET7+=nwY$PuJMF5Wv_U3S^!74gAhnh zLPN___a*w@O+|SXJdn?p;a<3oK#F86;0{()`J?PAf&|O@0Qf;kyX0f{Ac#3&^hYi617DeLBfsO!#V7!mKSZZ4Wh=uI=LML1$=ofYmbqa%Yfvgmz#Sc{ z_2kyqkp)G

*(tW1Sz-9v~nkP$HJmtf@8QrF~&VtmwLXLA>GckE<&%vIYq}OcwuA zO+RFO#;J^&G4f8PcLD7`^aXq`Rk>gS2pgQ;{o+6nClosv@}atPf`}udb9vy>yHcJ+ zNrf;BLZnJ7`h0_s__9F*-n>q@t|=9Ro2O!`Yz4WP4u1GIr3tYmN1tlro4C!d1U4() zmR79IgZ*m33Rh}gs7BPA?jR;2RfL)JTMR<_ZOlvYo6e`=U1%aSuUHe*`mLm4F@o5p zZ&NJo+F9kuUk%FA{Yl<+URT_#!c$Q8(wB8^*6Ht)03F}ku%e#n5B#c;9GF6HLWUUZ=rsBy@O5{(fX`N=;rFE=&MQUh&N&y%MN88yNWW}45y|*1B{sIgLIH%YTh%Ya zn`c7r(pLemS&p+1#zJKv>klSE+&xpz>U`lp6 N?}q2z?0<#C{{cym4Z;8b literal 0 HcmV?d00001 diff --git a/docs/guides/grafana-vmgateway-openid-configuration/vmagent-create-client-3.webp b/docs/guides/grafana-vmgateway-openid-configuration/vmagent-create-client-3.webp new file mode 100644 index 0000000000000000000000000000000000000000..63d0ce9db1d8701c4695042e2563e40bdedab3b8 GIT binary patch literal 19408 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 literal 0 HcmV?d00001 diff --git a/docs/guides/grafana-vmgateway-openid-configuration/vmagent-sa-attributes.webp b/docs/guides/grafana-vmgateway-openid-configuration/vmagent-sa-attributes.webp new file mode 100644 index 0000000000000000000000000000000000000000..f3bff75ccf22d533a9381f93fd60e500e0491f7e GIT binary patch literal 14598 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 literal 0 HcmV?d00001 diff --git a/docs/guides/grafana-vmgateway-openid-configuration/vmagent-sa.webp b/docs/guides/grafana-vmgateway-openid-configuration/vmagent-sa.webp new file mode 100644 index 0000000000000000000000000000000000000000..fa7ea91e50fd9f258d02b801f632018520735879 GIT binary patch literal 25336 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 Date: Fri, 25 Oct 2024 09:32:20 +0200 Subject: [PATCH 18/90] vmui/logs: fix query and limit update issue (#7294) ### Describe Your Changes Fixes issues with incorrect updating of query and limit fields, and resolves the problem where the display tab resets. Related issue: #7279 and #7290 ### Checklist The following checks are **mandatory**: - [ ] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --------- Signed-off-by: hagen1778 Co-authored-by: Zakhar Bessarab --- .../src/pages/ExploreLogs/ExploreLogs.tsx | 20 ++++++++++--------- docs/VictoriaLogs/CHANGELOG.md | 2 ++ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/app/vmui/packages/vmui/src/pages/ExploreLogs/ExploreLogs.tsx b/app/vmui/packages/vmui/src/pages/ExploreLogs/ExploreLogs.tsx index 224650b7f..47827ccc7 100644 --- a/app/vmui/packages/vmui/src/pages/ExploreLogs/ExploreLogs.tsx +++ b/app/vmui/packages/vmui/src/pages/ExploreLogs/ExploreLogs.tsx @@ -28,7 +28,7 @@ const ExploreLogs: FC = () => { const [limit, setLimit] = useStateSearchParams(defaultLimit, "limit"); const [query, setQuery] = useStateSearchParams("*", "query"); - const [tmpQuery, setTmpQuery] = useState(""); + const [isUpdatingQuery, setIsUpdatingQuery] = useState(false); const [period, setPeriod] = useState(periodState); const [queryError, setQueryError] = useState(""); @@ -70,26 +70,28 @@ const ExploreLogs: FC = () => { const handleApplyFilter = (val: string) => { setQuery(prev => `_stream: ${val === "other" ? "{}" : val} AND (${prev})`); + setIsUpdatingQuery(true); }; - const handleUpdateQuery = useCallback(() => { + const handleUpdateQuery = () => { if (isLoading || dataLogHits.isLoading) { abortController.abort && abortController.abort(); dataLogHits.abortController.abort && dataLogHits.abortController.abort(); } else { - setQuery(tmpQuery); handleRunQuery(); } - }, [isLoading, dataLogHits.isLoading]); + }; useEffect(() => { - if (query) handleRunQuery(); + if (!query) return; + handleRunQuery(); }, [periodState]); useEffect(() => { + if (!isUpdatingQuery) return; handleRunQuery(); - setTmpQuery(query); - }, [query]); + setIsUpdatingQuery(false); + }, [query, isUpdatingQuery]); useEffect(() => { !hideChart && fetchLogHits(period); @@ -98,10 +100,10 @@ const ExploreLogs: FC = () => { return (

Date: Fri, 25 Oct 2024 11:16:42 +0300 Subject: [PATCH 19/90] Automatic update Grafana datasource docs from VictoriaMetrics/victorialogs-datasource@9e6db28 (#7350) --- docs/VictoriaLogs/victorialogs-datasource.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/VictoriaLogs/victorialogs-datasource.md b/docs/VictoriaLogs/victorialogs-datasource.md index f52bb9c9c..b35a65e14 100644 --- a/docs/VictoriaLogs/victorialogs-datasource.md +++ b/docs/VictoriaLogs/victorialogs-datasource.md @@ -79,7 +79,7 @@ Please find the example of provisioning Grafana instance with VictoriaLogs datas grafana: image: grafana/grafana:11.0.0 environment: - - GF_INSTALL_PLUGINS=https://github.com/VictoriaMetrics/victorialogs-datasource/releases/download/v0.2.1/victorialogs-datasource-v0.2.1.zip;victorialogs-datasource + - GF_INSTALL_PLUGINS=https://github.com/VictoriaMetrics/victorialogs-datasource/releases/download/v0.6.1/victorialogs-datasource-v0.6.1.zip;victorialogs-datasource - GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=victorialogs-datasource ports: - 3000:3000/tcp @@ -107,7 +107,7 @@ Option 1. Using Grafana provisioning: ``` yaml env: - GF_INSTALL_PLUGINS: "https://github.com/VictoriaMetrics/victorialogs-datasource/releases/download/v0.2.1/victorialogs-datasource-v0.2.1.zip;victorialogs-datasource" + GF_INSTALL_PLUGINS: "https://github.com/VictoriaMetrics/victorialogs-datasource/releases/download/v0.6.1/victorialogs-datasource-v0.6.1.zip;victorialogs-datasource" GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS: "victorialogs-datasource" ``` @@ -115,7 +115,7 @@ Option 2. Using Grafana plugins section in `values.yaml`: ``` yaml plugins: - - https://github.com/VictoriaMetrics/victorialogs-datasource/releases/download/v0.2.1/victorialogs-datasource-v0.2.1.zip;victorialogs-datasource + - https://github.com/VictoriaMetrics/victorialogs-datasource/releases/download/v0.6.1/victorialogs-datasource-v0.6.1.zip;victorialogs-datasource ``` Option 3. Using init container: From cf344f5250c951eb5e4dee813a86223cdac70460 Mon Sep 17 00:00:00 2001 From: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Date: Fri, 25 Oct 2024 11:18:06 +0300 Subject: [PATCH 20/90] Automatic update Grafana datasource docs from VictoriaMetrics/victoriametrics-datasource@ed19341 (#7352) --- docs/victoriametrics-datasource.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/victoriametrics-datasource.md b/docs/victoriametrics-datasource.md index c7e8788cb..80b5daa3c 100644 --- a/docs/victoriametrics-datasource.md +++ b/docs/victoriametrics-datasource.md @@ -124,7 +124,7 @@ Please find the example of provisioning Grafana instance with VictoriaMetrics da grafana: image: grafana/grafana:11.0.0 environment: - - GF_INSTALL_PLUGINS=https://github.com/VictoriaMetrics/victoriametrics-datasource/releases/download/v0.8.2/victoriametrics-datasource-v0.8.2.zip;victoriametrics-datasource + - GF_INSTALL_PLUGINS=https://github.com/VictoriaMetrics/victoriametrics-datasource/releases/download/v0.10.1/victoriametrics-datasource-v0.10.1.zip;victoriametrics-datasource - GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=victoriametrics-datasource ports: - 3000:3000/tcp @@ -140,7 +140,7 @@ docker-compose -f docker-compose.yaml up When Grafana starts successfully datasources should be present on the datasources tab -Configuration +![Configuration](provision_datasources.webp) ### Install in Kubernetes @@ -152,14 +152,14 @@ Option 1. Using Grafana provisioning: ``` yaml env: - GF_INSTALL_PLUGINS: "https://github.com/VictoriaMetrics/victoriametrics-datasource/releases/download/v0.8.2/victoriametrics-datasource-v0.8.2.zip;victoriametrics-datasource" + GF_INSTALL_PLUGINS: "https://github.com/VictoriaMetrics/victoriametrics-datasource/releases/download/v0.10.1/victoriametrics-datasource-v0.10.1.zip;victoriametrics-datasource" ``` Option 2. Using Grafana plugins section in `values.yaml`: ``` yaml plugins: - - https://github.com/VictoriaMetrics/victoriametrics-datasource/releases/download/v0.8.2/victoriametrics-datasource-v0.8.2.zip;victoriametrics-datasource + - https://github.com/VictoriaMetrics/victoriametrics-datasource/releases/download/v0.10.1/victoriametrics-datasource-v0.10.1.zip;victoriametrics-datasource ``` Option 3. Using init container: From 0172e65b8d0f0921123581598c01afa18d69774c Mon Sep 17 00:00:00 2001 From: Hui Wang Date: Fri, 25 Oct 2024 17:11:09 +0800 Subject: [PATCH 21/90] =?UTF-8?q?docs:=20clarify=20flags=20`-search.maxxxD?= =?UTF-8?q?uration`=20can=20only=20be=20overridden=20to=E2=80=A6=20(#7227)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … a smaller value with `timeout` arg --- app/vlselect/main.go | 2 +- app/vmselect/searchutils/searchutils.go | 2 +- docs/Cluster-VictoriaMetrics.md | 6 +++--- docs/README.md | 6 +++--- docs/VictoriaLogs/README.md | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/vlselect/main.go b/app/vlselect/main.go index c08a53884..b8d8c7e60 100644 --- a/app/vlselect/main.go +++ b/app/vlselect/main.go @@ -23,7 +23,7 @@ var ( "See also -search.maxQueueDuration") maxQueueDuration = flag.Duration("search.maxQueueDuration", 10*time.Second, "The maximum time the search request waits for execution when -search.maxConcurrentRequests "+ "limit is reached; see also -search.maxQueryDuration") - maxQueryDuration = flag.Duration("search.maxQueryDuration", time.Second*30, "The maximum duration for query execution. It can be overridden on a per-query basis via 'timeout' query arg") + maxQueryDuration = flag.Duration("search.maxQueryDuration", time.Second*30, "The maximum duration for query execution. It can be overridden to a smaller value on a per-query basis via 'timeout' query arg") ) func getDefaultMaxConcurrentRequests() int { diff --git a/app/vmselect/searchutils/searchutils.go b/app/vmselect/searchutils/searchutils.go index 4de975739..88a96864c 100644 --- a/app/vmselect/searchutils/searchutils.go +++ b/app/vmselect/searchutils/searchutils.go @@ -15,7 +15,7 @@ import ( var ( maxExportDuration = flag.Duration("search.maxExportDuration", time.Hour*24*30, "The maximum duration for /api/v1/export call") - maxQueryDuration = flag.Duration("search.maxQueryDuration", time.Second*30, "The maximum duration for query execution. It can be overridden on a per-query basis via 'timeout' query arg") + maxQueryDuration = flag.Duration("search.maxQueryDuration", time.Second*30, "The maximum duration for query execution. It can be overridden to a smaller value on a per-query basis via 'timeout' query arg") maxStatusRequestDuration = flag.Duration("search.maxStatusRequestDuration", time.Minute*5, "The maximum duration for /api/v1/status/* requests") maxLabelsAPIDuration = flag.Duration("search.maxLabelsAPIDuration", time.Second*5, "The maximum duration for /api/v1/labels, /api/v1/label/.../values and /api/v1/series requests. "+ "See also -search.maxLabelsAPISeries and -search.ignoreExtraFiltersAtLabelsAPI") diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md index 57a7abd80..1857b9e6e 100644 --- a/docs/Cluster-VictoriaMetrics.md +++ b/docs/Cluster-VictoriaMetrics.md @@ -719,7 +719,7 @@ Some workloads may need fine-grained resource usage limits. In these cases the f only to **lower value** and can't exceed it. By default, vmselect doesn't apply limit adjustments. - `-search.maxQueryDuration` at `vmselect` limits the duration of a single query. If the query takes longer than the given duration, then it is canceled. This allows saving CPU and RAM at `vmselect` and `vmstorage` when executing unexpectedly heavy queries. - The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via `-search.maxQueryDuration` command-line flag. + The limit can be overridden to a smaller value by passing `timeout` GET parameter. - `-search.maxConcurrentRequests` at `vmselect` and `vmstorage` limits the number of concurrent requests a single `vmselect` / `vmstorage` node can process. Bigger number of concurrent requests usually require bigger amounts of memory at both `vmselect` and `vmstorage`. For example, if a single query needs 100 MiB of additional memory during its execution, then 100 concurrent queries @@ -783,7 +783,7 @@ Some workloads may need fine-grained resource usage limits. In these cases the f - `-search.maxLabelsAPIDuration` at `vmselect` limits the duration for requests to [/api/v1/labels](https://docs.victoriametrics.com/url-examples/#apiv1labels), [/api/v1/label/.../values](https://docs.victoriametrics.com/url-examples/#apiv1labelvalues) or [/api/v1/series](https://docs.victoriametrics.com/url-examples/#apiv1series). - The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via cmd-line flag. + The limit can be overridden to a smaller value by passing `timeout` GET parameter. These endpoints are used mostly by Grafana for auto-completion of label names and label values. Queries to these endpoints may take big amounts of CPU time and memory when the database contains big number of unique time series because of [high churn rate](https://docs.victoriametrics.com/faq/#what-is-high-churn-rate). In this case it might be useful to set the `-search.maxLabelsAPIDuration` to quite low value in order to limit CPU and memory usage. @@ -1595,7 +1595,7 @@ Below is the output for `/path/to/vmselect -help`: -search.maxPointsSubqueryPerTimeseries int The maximum number of points per series, which can be generated by subquery. See https://valyala.medium.com/prometheus-subqueries-in-victoriametrics-9b1492b720b3 (default 100000) -search.maxQueryDuration duration - The maximum duration for query execution. It can be overridden on a per-query basis via 'timeout' query arg (default 30s) + The maximum duration for query execution. It can be overridden to a smaller value on a per-query basis via 'timeout' query arg (default 30s) -search.maxQueryLen size The maximum search query length in bytes Supports the following optional suffixes for size values: KB, MB, GB, TB, KiB, MiB, GiB, TiB (default 16384) diff --git a/docs/README.md b/docs/README.md index ae3e59f45..0d0751f96 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1715,7 +1715,7 @@ By default, VictoriaMetrics is tuned for an optimal resource usage under typical This means that the maximum memory usage and CPU usage a single query can use is proportional to `-search.maxUniqueTimeseries`. - `-search.maxQueryDuration` limits the duration of a single query. If the query takes longer than the given duration, then it is canceled. This allows saving CPU and RAM when executing unexpected heavy queries. - The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via `-search.maxQueryDuration` command-line flag. + The limit can be overridden to a smaller value by passing `timeout` GET parameter. - `-search.maxConcurrentRequests` limits the number of concurrent requests VictoriaMetrics can process. Bigger number of concurrent requests usually means bigger memory usage. For example, if a single query needs 100 MiB of additional memory during its execution, then 100 concurrent queries may need `100 * 100 MiB = 10 GiB` of additional memory. So it is better to limit the number of concurrent queries, while pausing additional incoming queries if the concurrency limit is reached. @@ -1771,7 +1771,7 @@ By default, VictoriaMetrics is tuned for an optimal resource usage under typical - `-search.maxLabelsAPIDuration` limits the duration for requests to [/api/v1/labels](https://docs.victoriametrics.com/url-examples/#apiv1labels), [/api/v1/label/.../values](https://docs.victoriametrics.com/url-examples/#apiv1labelvalues) or [/api/v1/series](https://docs.victoriametrics.com/url-examples/#apiv1series). - The limit can be altered for each query by passing `timeout` GET parameter, but can't exceed the limit specified via cmd-line flag. + The limit can be overridden to a smaller value by passing `timeout` GET parameter. These endpoints are used mostly by Grafana for auto-completion of label names and label values. Queries to these endpoints may take big amounts of CPU time and memory when the database contains big number of unique time series because of [high churn rate](https://docs.victoriametrics.com/faq/#what-is-high-churn-rate). In this case it might be useful to set the `-search.maxLabelsAPIDuration` to quite low value in order to limit CPU and memory usage. @@ -3183,7 +3183,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -search.maxPointsSubqueryPerTimeseries int The maximum number of points per series, which can be generated by subquery. See https://valyala.medium.com/prometheus-subqueries-in-victoriametrics-9b1492b720b3 (default 100000) -search.maxQueryDuration duration - The maximum duration for query execution. It can be overridden on a per-query basis via 'timeout' query arg (default 30s) + The maximum duration for query execution. It can be overridden to a smaller value on a per-query basis via 'timeout' query arg (default 30s) -search.maxQueryLen size The maximum search query length in bytes Supports the following optional suffixes for size values: KB, MB, GB, TB, KiB, MiB, GiB, TiB (default 16384) diff --git a/docs/VictoriaLogs/README.md b/docs/VictoriaLogs/README.md index b5fa462ee..dcdaff12d 100644 --- a/docs/VictoriaLogs/README.md +++ b/docs/VictoriaLogs/README.md @@ -376,7 +376,7 @@ Pass `-help` to VictoriaLogs in order to see the list of supported command-line -search.maxConcurrentRequests int The maximum number of concurrent search requests. It shouldn't be high, since a single request can saturate all the CPU cores, while many concurrently executed requests may require high amounts of memory. See also -search.maxQueueDuration (default 16) -search.maxQueryDuration duration - The maximum duration for query execution. It can be overridden on a per-query basis via 'timeout' query arg (default 30s) + The maximum duration for query execution. It can be overridden to a smaller value on a per-query basis via 'timeout' query arg (default 30s) -search.maxQueueDuration duration The maximum time the search request waits for execution when -search.maxConcurrentRequests limit is reached; see also -search.maxQueryDuration (default 10s) -storage.minFreeDiskSpaceBytes size From cd2222aa957274030770dac6a95ec5050c0a3751 Mon Sep 17 00:00:00 2001 From: Zhu Jiekun Date: Fri, 25 Oct 2024 21:09:14 +0800 Subject: [PATCH 22/90] dashboards: fix query for full ETA vm_free_disk_space_bytes - vm_free_disk_space_limit_bytes (#7355) ### Describe Your Changes Fix https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7334 available disk space should be ``` (vm_free_disk_space_bytes{job=~...} - vm_free_disk_space_limit_bytes{job=~...}) ``` instead of ``` vm_free_disk_space_bytes{job=~...} ``` ### Checklist The following checks are **mandatory**: - [x] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --- dashboards/victoriametrics-cluster.json | 10 +++++----- dashboards/victoriametrics.json | 4 ++-- dashboards/vm/victoriametrics-cluster.json | 10 +++++----- dashboards/vm/victoriametrics.json | 4 ++-- dashboards/vm/vmagent.json | 2 +- docs/changelog/CHANGELOG.md | 1 + 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/dashboards/victoriametrics-cluster.json b/dashboards/victoriametrics-cluster.json index 09d49ea3a..df30817d0 100644 --- a/dashboards/victoriametrics-cluster.json +++ b/dashboards/victoriametrics-cluster.json @@ -5037,7 +5037,7 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "min(vm_free_disk_space_bytes{job=~\"$job_storage\", instance=~\"$instance\"} \n/ \nignoring(path) (\n rate(vm_rows_added_to_storage_total{job=~\"$job_storage\", instance=~\"$instance\"}[1d])\n * scalar(\n sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type!~\"indexdb.*\"})\n / \n sum(vm_rows{job=~\"$job_storage\", instance=~\"$instance\", type!~\"indexdb.*\"})\n )\n))", + "expr": "min((vm_free_disk_space_bytes{job=~\"$job_storage\", instance=~\"$instance\"} - vm_free_disk_space_limit_bytes{job=~\"$job_storage\", instance=~\"$instance\"}) \n/ \nignoring(path) (\n rate(vm_rows_added_to_storage_total{job=~\"$job_storage\", instance=~\"$instance\"}[1d])\n * scalar(\n sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type!~\"indexdb.*\"})\n / \n sum(vm_rows{job=~\"$job_storage\", instance=~\"$instance\", type!~\"indexdb.*\"})\n )\n))", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -5927,7 +5927,7 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "max(\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) /\n (\n sum(vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) +\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)\n ) \n)", + "expr": "max(\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) /\n (\n sum(vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"}-vm_free_disk_space_limit_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) +\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)\n ) \n)", "format": "time_series", "intervalFactor": 1, "legendFormat": "max", @@ -5940,7 +5940,7 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "min(\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) /\n (\n sum(vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) +\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)\n ) \n)", + "expr": "min(\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) /\n (\n sum(vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"}-vm_free_disk_space_limit_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) +\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)\n ) \n)", "format": "time_series", "hide": false, "intervalFactor": 1, @@ -5954,7 +5954,7 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "quantile(0.5,\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) /\n (\n sum(vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) +\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)\n ) \n)", + "expr": "quantile(0.5,\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) /\n (\n sum(vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"}-vm_free_disk_space_limit_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) +\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)\n ) \n)", "format": "time_series", "hide": false, "intervalFactor": 1, @@ -9373,7 +9373,7 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "vm_free_disk_space_bytes{job=~\"$job_storage\", instance=~\"$instance\"} \n/ \nignoring(path) (\n rate(vm_rows_added_to_storage_total{job=~\"$job_storage\", instance=~\"$instance\"}[1d])\n * scalar(\n sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type!~\"indexdb.*\"})\n / \n sum(vm_rows{job=~\"$job_storage\", instance=~\"$instance\", type!~\"indexdb.*\"})\n )\n)", + "expr": "(vm_free_disk_space_bytes{job=~\"$job_storage\", instance=~\"$instance\"}-vm_free_disk_space_limit_bytes{job=~\"$job_storage\", instance=~\"$instance\"}) \n/ \nignoring(path) (\n rate(vm_rows_added_to_storage_total{job=~\"$job_storage\", instance=~\"$instance\"}[1d])\n * scalar(\n sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type!~\"indexdb.*\"})\n / \n sum(vm_rows{job=~\"$job_storage\", instance=~\"$instance\", type!~\"indexdb.*\"})\n )\n)", "format": "time_series", "interval": "", "intervalFactor": 1, diff --git a/dashboards/victoriametrics.json b/dashboards/victoriametrics.json index 39388b53b..6210a460b 100644 --- a/dashboards/victoriametrics.json +++ b/dashboards/victoriametrics.json @@ -4452,7 +4452,7 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"} \n/ ignoring(path) (\n rate(vm_rows_added_to_storage_total{job=~\"$job\", instance=~\"$instance\"}[1d]) \n * scalar(\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\", type!~\"indexdb.*\"}) \n / sum(vm_rows{job=~\"$job\", instance=~\"$instance\", type!~\"indexdb.*\"})\n )\n )", + "expr": "(vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"}-vm_free_disk_space_limit_bytes{job=~\"$job\", instance=~\"$instance\"}) \n/ ignoring(path) (\n rate(vm_rows_added_to_storage_total{job=~\"$job\", instance=~\"$instance\"}[1d]) \n * scalar(\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\", type!~\"indexdb.*\"}) \n / sum(vm_rows{job=~\"$job\", instance=~\"$instance\", type!~\"indexdb.*\"})\n )\n )", "format": "time_series", "hide": false, "interval": "", @@ -4575,7 +4575,7 @@ "type": "prometheus", "uid": "$ds" }, - "expr": "vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"}", + "expr": "vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"} - vm_free_disk_space_limit_bytes{job=~\"$job\", instance=~\"$instance\"}", "format": "time_series", "interval": "", "intervalFactor": 1, diff --git a/dashboards/vm/victoriametrics-cluster.json b/dashboards/vm/victoriametrics-cluster.json index 861d55279..bbc000252 100644 --- a/dashboards/vm/victoriametrics-cluster.json +++ b/dashboards/vm/victoriametrics-cluster.json @@ -5038,7 +5038,7 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "min(vm_free_disk_space_bytes{job=~\"$job_storage\", instance=~\"$instance\"} \n/ \nignoring(path) (\n rate(vm_rows_added_to_storage_total{job=~\"$job_storage\", instance=~\"$instance\"}[1d])\n * scalar(\n sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type!~\"indexdb.*\"})\n / \n sum(vm_rows{job=~\"$job_storage\", instance=~\"$instance\", type!~\"indexdb.*\"})\n )\n))", + "expr": "min((vm_free_disk_space_bytes{job=~\"$job_storage\", instance=~\"$instance\"} - vm_free_disk_space_limit_bytes{job=~\"$job_storage\", instance=~\"$instance\"}) \n/ \nignoring(path) (\n rate(vm_rows_added_to_storage_total{job=~\"$job_storage\", instance=~\"$instance\"}[1d])\n * scalar(\n sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type!~\"indexdb.*\"})\n / \n sum(vm_rows{job=~\"$job_storage\", instance=~\"$instance\", type!~\"indexdb.*\"})\n )\n))", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -5928,7 +5928,7 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "max(\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) /\n (\n sum(vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) +\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)\n ) \n)", + "expr": "max(\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) /\n (\n sum(vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"}-vm_free_disk_space_limit_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) +\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)\n ) \n)", "format": "time_series", "intervalFactor": 1, "legendFormat": "max", @@ -5941,7 +5941,7 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "min(\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) /\n (\n sum(vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) +\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)\n ) \n)", + "expr": "min(\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) /\n (\n sum(vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"}-vm_free_disk_space_limit_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) +\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)\n ) \n)", "format": "time_series", "hide": false, "intervalFactor": 1, @@ -5955,7 +5955,7 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "quantile(0.5,\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) /\n (\n sum(vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) +\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)\n ) \n)", + "expr": "quantile(0.5,\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) /\n (\n sum(vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"}-vm_free_disk_space_limit_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance) +\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)\n ) \n)", "format": "time_series", "hide": false, "intervalFactor": 1, @@ -9374,7 +9374,7 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "vm_free_disk_space_bytes{job=~\"$job_storage\", instance=~\"$instance\"} \n/ \nignoring(path) (\n rate(vm_rows_added_to_storage_total{job=~\"$job_storage\", instance=~\"$instance\"}[1d])\n * scalar(\n sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type!~\"indexdb.*\"})\n / \n sum(vm_rows{job=~\"$job_storage\", instance=~\"$instance\", type!~\"indexdb.*\"})\n )\n)", + "expr": "(vm_free_disk_space_bytes{job=~\"$job_storage\", instance=~\"$instance\"}-vm_free_disk_space_limit_bytes{job=~\"$job_storage\", instance=~\"$instance\"}) \n/ \nignoring(path) (\n rate(vm_rows_added_to_storage_total{job=~\"$job_storage\", instance=~\"$instance\"}[1d])\n * scalar(\n sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type!~\"indexdb.*\"})\n / \n sum(vm_rows{job=~\"$job_storage\", instance=~\"$instance\", type!~\"indexdb.*\"})\n )\n)", "format": "time_series", "interval": "", "intervalFactor": 1, diff --git a/dashboards/vm/victoriametrics.json b/dashboards/vm/victoriametrics.json index b442d513f..cbd11bfd3 100644 --- a/dashboards/vm/victoriametrics.json +++ b/dashboards/vm/victoriametrics.json @@ -4453,7 +4453,7 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"} \n/ ignoring(path) (\n rate(vm_rows_added_to_storage_total{job=~\"$job\", instance=~\"$instance\"}[1d]) \n * scalar(\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\", type!~\"indexdb.*\"}) \n / sum(vm_rows{job=~\"$job\", instance=~\"$instance\", type!~\"indexdb.*\"})\n )\n )", + "expr": "(vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"}-vm_free_disk_space_limit_bytes{job=~\"$job\", instance=~\"$instance\"}) \n/ ignoring(path) (\n rate(vm_rows_added_to_storage_total{job=~\"$job\", instance=~\"$instance\"}[1d]) \n * scalar(\n sum(vm_data_size_bytes{job=~\"$job\", instance=~\"$instance\", type!~\"indexdb.*\"}) \n / sum(vm_rows{job=~\"$job\", instance=~\"$instance\", type!~\"indexdb.*\"})\n )\n )", "format": "time_series", "hide": false, "interval": "", @@ -4576,7 +4576,7 @@ "type": "victoriametrics-datasource", "uid": "$ds" }, - "expr": "vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"}", + "expr": "vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"} - vm_free_disk_space_limit_bytes{job=~\"$job\", instance=~\"$instance\"}", "format": "time_series", "interval": "", "intervalFactor": 1, diff --git a/dashboards/vm/vmagent.json b/dashboards/vm/vmagent.json index b4cc6a9ea..9a64ed834 100644 --- a/dashboards/vm/vmagent.json +++ b/dashboards/vm/vmagent.json @@ -951,7 +951,7 @@ "type": "victoriametrics-datasource", "uid": "$ds" }, - "description": "Shows the persistent queue size of pending samples in bytes >2MB which hasn't been flushed to remote storage yet. \n\nIncreasing of value might be a sign of connectivity issues. In such cases, vmagent starts to flush pending data on disk with attempt to send it later once connection is restored.\n\nRemote write URLs are hidden by default but might be unveiled once `-remoteWrite.showURL` is set to true.\n\nClick on the line and choose Drilldown to show persistent queue size per instance.\n", + "description": "Shows the persistent queue size of pending samples in bytes >2MB which hasn't been flushed to remote storage yet. \n\nIncreasing of value might be a sign of connectivity issues. In such cases, vmagent starts to flush pending data on disk with attempt to send it later once connection is restored.\n\nRemote write URLs are hidden by default but might be unveiled once `-remoteWrite.showURL` is set to true.\n\nClick on the line and choose Drilldown to show the persistent queue size per instance.\n", "fieldConfig": { "defaults": { "color": { diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 0f5cabafb..8b5b569bf 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -22,6 +22,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent/): support scraping from Kubernetes Native Sidecars. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7287). * FEATURE: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): add a separate cache type for storing sparse entries when performing large index scans. This significantly reduces memory usage when applying [downsampling filters](https://docs.victoriametrics.com/#downsampling) and [retention filters](https://docs.victoriametrics.com/#retention-filters) during background merge. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7182) for the details. +* BUGFIX: [dashboards](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards) for Single-node VictoriaMetrics, cluster: The free disk space calculation now will subtract the size of the `-storage.minFreeDiskSpaceBytes` flag to correctly display the remaining available space of Single-node VictoriaMetrics/vmstorage rather than the actual available disk space, as well as the full ETA. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7334) for the details. * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert): properly set `group_name` and `file` fields for recording rules in `/api/v1/rules`. * BUGFIX: [vmctl](https://docs.victoriametrics.com/vmctl/): fix issue with series matching for `vmctl vm-native` with `--vm-native-disable-per-metric-migration` flag enabled. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7309). From 66971d314164bcdf909cbed6c3b2bbaf33c09323 Mon Sep 17 00:00:00 2001 From: Dan Dascalescu Date: Sun, 27 Oct 2024 09:56:42 +0200 Subject: [PATCH 23/90] Fix "loosing" typo in README.md (#7368) ### Checklist - [x] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/) --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 0d0751f96..e4bb5871c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2727,7 +2727,7 @@ Requirements for changes to docs: - Keep backward compatibility of existing links. Avoid changing anchors or deleting pages as they could have been used or posted in other docs, GitHub issues, stackoverlow answers, etc. -- Keep docs clear, concise and simple. Try using as simple wording as possible, without loosing the clarity. +- Keep docs clear, concise and simple. Try using as simple wording as possible, without sacrificing clarity. - Keep docs consistent. When modifying existing docs, verify that other places referencing to this doc are still relevant. - Prefer improving the existing docs instead of adding new ones. - Use absolute links. This simplifies moving docs between different files. From 7e60afb6fc807bd732e89f44c867f81ee2b0d056 Mon Sep 17 00:00:00 2001 From: Andrii Chubatiuk Date: Sun, 27 Oct 2024 21:36:33 +0200 Subject: [PATCH 24/90] app/vlinsert: adds journald ingestion support This commit allows to ingest logs with journald format. https://www.freedesktop.org/software/systemd/man/latest/systemd-journal-remote.service.html related issue: https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4618 --- app/vlinsert/journald/journald.go | 255 ++++++++++++++++++ app/vlinsert/journald/journald_test.go | 70 +++++ app/vlinsert/main.go | 4 + .../docker/victorialogs/compose-base.yml | 3 + .../docker/victorialogs/fluentbit/README.md | 2 + .../victorialogs/fluentbit/compose-base.yml | 7 + .../docker/victorialogs/fluentbit/nginx.conf | 16 ++ .../victorialogs/fluentbit/otlp/compose.yml | 3 + .../fluentbit/otlp/fluent-bit.conf | 33 +++ .../docker/victorialogs/journald/Dockerfile | 9 + .../docker/victorialogs/journald/README.md | 29 ++ .../victorialogs/journald/compose-base.yml | 14 + .../journald/journald/compose.yml | 3 + docs/VictoriaLogs/CHANGELOG.md | 2 + docs/VictoriaLogs/Roadmap.md | 1 - docs/VictoriaLogs/data-ingestion/Journald.md | 33 +++ docs/VictoriaLogs/data-ingestion/README.md | 27 +- go.mod | 2 +- go.sum | 2 + vendor/github.com/valyala/gozstd/gozstd.go | 7 +- vendor/modules.txt | 2 +- 21 files changed, 506 insertions(+), 18 deletions(-) create mode 100644 app/vlinsert/journald/journald.go create mode 100644 app/vlinsert/journald/journald_test.go create mode 100644 deployment/docker/victorialogs/fluentbit/nginx.conf create mode 100644 deployment/docker/victorialogs/fluentbit/otlp/compose.yml create mode 100644 deployment/docker/victorialogs/fluentbit/otlp/fluent-bit.conf create mode 100644 deployment/docker/victorialogs/journald/Dockerfile create mode 100644 deployment/docker/victorialogs/journald/README.md create mode 100644 deployment/docker/victorialogs/journald/compose-base.yml create mode 100644 deployment/docker/victorialogs/journald/journald/compose.yml create mode 100644 docs/VictoriaLogs/data-ingestion/Journald.md diff --git a/app/vlinsert/journald/journald.go b/app/vlinsert/journald/journald.go new file mode 100644 index 000000000..c337daa54 --- /dev/null +++ b/app/vlinsert/journald/journald.go @@ -0,0 +1,255 @@ +package journald + +import ( + "bytes" + "encoding/binary" + "flag" + "fmt" + "io" + "net/http" + "regexp" + "strconv" + "strings" + "time" + + "github.com/VictoriaMetrics/VictoriaMetrics/app/vlinsert/insertutils" + "github.com/VictoriaMetrics/VictoriaMetrics/app/vlstorage" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/bytesutil" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/encoding/zstd" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/flagutil" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/httpserver" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/logstorage" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/writeconcurrencylimiter" + "github.com/VictoriaMetrics/metrics" +) + +const ( + journaldEntryMaxNameLen = 64 +) + +var ( + bodyBufferPool bytesutil.ByteBufferPool + allowedJournaldEntryNameChars = regexp.MustCompile(`^[A-Z_][A-Z0-9_]+`) +) + +var ( + journaldStreamFields = flagutil.NewArrayString("journald.streamFields", "Journal fields to be used as stream fields. "+ + "See the list of allowed fields at https://www.freedesktop.org/software/systemd/man/latest/systemd.journal-fields.html.") + journaldIgnoreFields = flagutil.NewArrayString("journald.ignoreFields", "Journal fields to ignore. "+ + "See the list of allowed fields at https://www.freedesktop.org/software/systemd/man/latest/systemd.journal-fields.html.") + journaldTimeField = flag.String("journald.timeField", "__REALTIME_TIMESTAMP", "Journal field to be used as time field. "+ + "See the list of allowed fields at https://www.freedesktop.org/software/systemd/man/latest/systemd.journal-fields.html.") + journaldTenantID = flag.String("journald.tenantID", "0:0", "TenantID for logs ingested via the Journald endpoint.") + journaldIncludeEntryMetadata = flag.Bool("journald.includeEntryMetadata", false, "Include journal entry fields, which with double underscores.") +) + +func getCommonParams(r *http.Request) (*insertutils.CommonParams, error) { + cp, err := insertutils.GetCommonParams(r) + if err != nil { + return nil, err + } + if cp.TenantID.AccountID == 0 && cp.TenantID.ProjectID == 0 { + tenantID, err := logstorage.ParseTenantID(*journaldTenantID) + if err != nil { + return nil, fmt.Errorf("cannot parse -journald.tenantID=%q for journald: %w", *journaldTenantID, err) + } + cp.TenantID = tenantID + } + if cp.TimeField != "" { + cp.TimeField = *journaldTimeField + } + if len(cp.StreamFields) == 0 { + cp.StreamFields = *journaldStreamFields + } + if len(cp.IgnoreFields) == 0 { + cp.IgnoreFields = *journaldIgnoreFields + } + cp.MsgField = "MESSAGE" + return cp, nil +} + +// RequestHandler processes Journald Export insert requests +func RequestHandler(path string, w http.ResponseWriter, r *http.Request) bool { + switch path { + case "/upload": + if r.Header.Get("Content-Type") != "application/vnd.fdo.journal" { + httpserver.Errorf(w, r, "only application/vnd.fdo.journal encoding is supported for Journald") + return true + } + handleJournald(r, w) + return true + default: + return false + } +} + +// handleJournald parses Journal binary entries +func handleJournald(r *http.Request, w http.ResponseWriter) { + startTime := time.Now() + requestsJournaldTotal.Inc() + + if err := vlstorage.CanWriteData(); err != nil { + httpserver.Errorf(w, r, "%s", err) + return + } + + reader := r.Body + var err error + + wcr := writeconcurrencylimiter.GetReader(reader) + data, err := io.ReadAll(wcr) + if err != nil { + httpserver.Errorf(w, r, "cannot read request body: %s", err) + return + } + writeconcurrencylimiter.PutReader(wcr) + bb := bodyBufferPool.Get() + defer bodyBufferPool.Put(bb) + if r.Header.Get("Content-Encoding") == "zstd" { + bb.B, err = zstd.Decompress(bb.B[:0], data) + if err != nil { + httpserver.Errorf(w, r, "cannot decompress zstd-encoded request with length %d: %s", len(data), err) + return + } + data = bb.B + } + cp, err := getCommonParams(r) + if err != nil { + httpserver.Errorf(w, r, "cannot parse common params from request: %s", err) + return + } + + lmp := cp.NewLogMessageProcessor() + n, err := parseJournaldRequest(data, lmp, cp) + lmp.MustClose() + if err != nil { + errorsTotal.Inc() + httpserver.Errorf(w, r, "cannot parse Journald protobuf request: %s", err) + return + } + + rowsIngestedJournaldTotal.Add(n) + + // update requestJournaldDuration only for successfully parsed requests + // There is no need in updating requestJournaldDuration for request errors, + // since their timings are usually much smaller than the timing for successful request parsing. + requestJournaldDuration.UpdateDuration(startTime) +} + +var ( + rowsIngestedJournaldTotal = metrics.NewCounter(`vl_rows_ingested_total{type="journald", format="journald"}`) + + requestsJournaldTotal = metrics.NewCounter(`vl_http_requests_total{path="/insert/journald/upload",format="journald"}`) + errorsTotal = metrics.NewCounter(`vl_http_errors_total{path="/insert/journald/upload",format="journald"}`) + + requestJournaldDuration = metrics.NewHistogram(`vl_http_request_duration_seconds{path="/insert/journald/upload",format="journald"}`) +) + +// See https://systemd.io/JOURNAL_EXPORT_FORMATS/#journal-export-format +func parseJournaldRequest(data []byte, lmp insertutils.LogMessageProcessor, cp *insertutils.CommonParams) (rowsIngested int, err error) { + var fields []logstorage.Field + var ts int64 + var size uint64 + var name, value string + var line []byte + + currentTimestamp := time.Now().UnixNano() + + for len(data) > 0 { + idx := bytes.IndexByte(data, '\n') + switch { + case idx > 0: + // process fields + line = data[:idx] + data = data[idx+1:] + case idx == 0: + // next message or end of file + // double new line is a separator for the next message + if len(fields) > 0 { + if ts == 0 { + ts = currentTimestamp + } + lmp.AddRow(ts, fields) + rowsIngested++ + fields = fields[:0] + } + // skip newline separator + data = data[1:] + continue + case idx < 0: + return rowsIngested, fmt.Errorf("missing new line separator, unread data left=%d", len(data)) + } + + idx = bytes.IndexByte(line, '=') + // could b either e key=value\n pair + // or just key\n + // with binary data at the buffer + if idx > 0 { + name = bytesutil.ToUnsafeString(line[:idx]) + value = bytesutil.ToUnsafeString(line[idx+1:]) + } else { + name = bytesutil.ToUnsafeString(line) + if len(data) == 0 { + return rowsIngested, fmt.Errorf("unexpected zero data for binary field value of key=%s", name) + } + // size of binary data encoded as le i64 at the begging + idx, err := binary.Decode(data, binary.LittleEndian, &size) + if err != nil { + return rowsIngested, fmt.Errorf("failed to extract binary field %q value size: %w", name, err) + } + // skip binary data sise + data = data[idx:] + if size == 0 { + return rowsIngested, fmt.Errorf("unexpected zero binary data size decoded %d", size) + } + if int(size) > len(data) { + return rowsIngested, fmt.Errorf("binary data size=%d cannot exceed size of the data at buffer=%d", size, len(data)) + } + value = bytesutil.ToUnsafeString(data[:size]) + data = data[int(size):] + // binary data must has new line separator for the new line or next field + if len(data) == 0 { + return rowsIngested, fmt.Errorf("unexpected empty buffer after binary field=%s read", name) + } + lastB := data[0] + if lastB != '\n' { + return rowsIngested, fmt.Errorf("expected new line separator after binary field=%s, got=%s", name, string(lastB)) + } + data = data[1:] + } + // https://github.com/systemd/systemd/blob/main/src/libsystemd/sd-journal/journal-file.c#L1703 + if len(name) > journaldEntryMaxNameLen { + return rowsIngested, fmt.Errorf("journald entry name should not exceed %d symbols, got: %q", journaldEntryMaxNameLen, name) + } + if !allowedJournaldEntryNameChars.MatchString(name) { + return rowsIngested, fmt.Errorf("journald entry name should consist of `A-Z0-9_` characters and must start from non-digit symbol") + } + if name == cp.TimeField { + ts, err = strconv.ParseInt(value, 10, 64) + if err != nil { + return 0, fmt.Errorf("failed to parse Journald timestamp, %w", err) + } + ts *= 1e3 + continue + } + + if name == cp.MsgField { + name = "_msg" + } + + if *journaldIncludeEntryMetadata || !strings.HasPrefix(name, "__") { + fields = append(fields, logstorage.Field{ + Name: name, + Value: value, + }) + } + } + if len(fields) > 0 { + if ts == 0 { + ts = currentTimestamp + } + lmp.AddRow(ts, fields) + rowsIngested++ + } + return rowsIngested, nil +} diff --git a/app/vlinsert/journald/journald_test.go b/app/vlinsert/journald/journald_test.go new file mode 100644 index 000000000..b3d3db93c --- /dev/null +++ b/app/vlinsert/journald/journald_test.go @@ -0,0 +1,70 @@ +package journald + +import ( + "testing" + + "github.com/VictoriaMetrics/VictoriaMetrics/app/vlinsert/insertutils" +) + +func TestPushJournaldOk(t *testing.T) { + f := func(src string, timestampsExpected []int64, resultExpected string) { + t.Helper() + tlp := &insertutils.TestLogMessageProcessor{} + cp := &insertutils.CommonParams{ + TimeField: "__REALTIME_TIMESTAMP", + MsgField: "MESSAGE", + } + n, err := parseJournaldRequest([]byte(src), tlp, cp) + if err != nil { + t.Fatalf("unexpected error: %s", err) + } + + if err := tlp.Verify(n, timestampsExpected, resultExpected); err != nil { + t.Fatal(err) + } + } + // Single event + f("__REALTIME_TIMESTAMP=91723819283\nMESSAGE=Test message\n", + []int64{91723819283000}, + "{\"_msg\":\"Test message\"}", + ) + + // Multiple events + f("__REALTIME_TIMESTAMP=91723819283\nMESSAGE=Test message\n\n__REALTIME_TIMESTAMP=91723819284\nMESSAGE=Test message2\n", + []int64{91723819283000, 91723819284000}, + "{\"_msg\":\"Test message\"}\n{\"_msg\":\"Test message2\"}", + ) + + // Parse binary data + f("__CURSOR=s=e0afe8412a6a49d2bfcf66aa7927b588;i=1f06;b=f778b6e2f7584a77b991a2366612a7b5;m=300bdfd420;t=62526e1182354;x=930dc44b370963b7\n__REALTIME_TIMESTAMP=1729698775704404\n__MONOTONIC_TIMESTAMP=206357648416\n__SEQNUM=7942\n__SEQNUM_ID=e0afe8412a6a49d2bfcf66aa7927b588\n_BOOT_ID=f778b6e2f7584a77b991a2366612a7b5\n_UID=0\n_GID=0\n_MACHINE_ID=a4a970370c30a925df02a13c67167847\n_HOSTNAME=ecd5e4555787\n_RUNTIME_SCOPE=system\n_TRANSPORT=journal\n_CAP_EFFECTIVE=1ffffffffff\n_SYSTEMD_CGROUP=/init.scope\n_SYSTEMD_UNIT=init.scope\n_SYSTEMD_SLICE=-.slice\nCODE_FILE=\nCODE_LINE=1\nCODE_FUNC=\nSYSLOG_IDENTIFIER=python3\n_COMM=python3\n_EXE=/usr/bin/python3.12\n_CMDLINE=python3\nMESSAGE\n\x13\x00\x00\x00\x00\x00\x00\x00foo\nbar\n\n\nasda\nasda\n_PID=2763\n_SOURCE_REALTIME_TIMESTAMP=1729698775704375\n\n", + []int64{1729698775704404000}, + "{\"_BOOT_ID\":\"f778b6e2f7584a77b991a2366612a7b5\",\"_UID\":\"0\",\"_GID\":\"0\",\"_MACHINE_ID\":\"a4a970370c30a925df02a13c67167847\",\"_HOSTNAME\":\"ecd5e4555787\",\"_RUNTIME_SCOPE\":\"system\",\"_TRANSPORT\":\"journal\",\"_CAP_EFFECTIVE\":\"1ffffffffff\",\"_SYSTEMD_CGROUP\":\"/init.scope\",\"_SYSTEMD_UNIT\":\"init.scope\",\"_SYSTEMD_SLICE\":\"-.slice\",\"CODE_FILE\":\"\\u003cstdin>\",\"CODE_LINE\":\"1\",\"CODE_FUNC\":\"\\u003cmodule>\",\"SYSLOG_IDENTIFIER\":\"python3\",\"_COMM\":\"python3\",\"_EXE\":\"/usr/bin/python3.12\",\"_CMDLINE\":\"python3\",\"_msg\":\"foo\\nbar\\n\\n\\nasda\\nasda\",\"_PID\":\"2763\",\"_SOURCE_REALTIME_TIMESTAMP\":\"1729698775704375\"}", + ) +} + +func TestPushJournald_Failure(t *testing.T) { + f := func(data string) { + t.Helper() + tlp := &insertutils.TestLogMessageProcessor{} + cp := &insertutils.CommonParams{ + TimeField: "__REALTIME_TIMESTAMP", + MsgField: "MESSAGE", + } + _, err := parseJournaldRequest([]byte(data), tlp, cp) + if err == nil { + t.Fatalf("expected non nil error") + } + } + // missing new line terminator for binary encoded message + f("__CURSOR=s=e0afe8412a6a49d2bfcf66aa7927b588;i=1f06;b=f778b6e2f7584a77b991a2366612a7b5;m=300bdfd420;t=62526e1182354;x=930dc44b370963b7\n__REALTIME_TIMESTAMP=1729698775704404\nMESSAGE\n\x13\x00\x00\x00\x00\x00\x00\x00foo\nbar\n\n\nasdaasda2") + // missing new line terminator + f("__REALTIME_TIMESTAMP=91723819283\n=Test message") + // empty field name + f("__REALTIME_TIMESTAMP=91723819283\n=Test message\n") + // field name starting with number + f("__REALTIME_TIMESTAMP=91723819283\n1incorrect=Test message\n") + // field name exceeds 64 limit + f("__REALTIME_TIMESTAMP=91723819283\ntoolooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongcorrecooooooooooooong=Test message\n") + // Only allow A-Z0-9 and '_' + f("__REALTIME_TIMESTAMP=91723819283\nbadC!@$!@$as=Test message\n") +} diff --git a/app/vlinsert/main.go b/app/vlinsert/main.go index a5c01fb98..d784ed337 100644 --- a/app/vlinsert/main.go +++ b/app/vlinsert/main.go @@ -5,6 +5,7 @@ import ( "strings" "github.com/VictoriaMetrics/VictoriaMetrics/app/vlinsert/elasticsearch" + "github.com/VictoriaMetrics/VictoriaMetrics/app/vlinsert/journald" "github.com/VictoriaMetrics/VictoriaMetrics/app/vlinsert/jsonline" "github.com/VictoriaMetrics/VictoriaMetrics/app/vlinsert/loki" "github.com/VictoriaMetrics/VictoriaMetrics/app/vlinsert/opentelemetry" @@ -45,6 +46,9 @@ func RequestHandler(w http.ResponseWriter, r *http.Request) bool { case strings.HasPrefix(path, "/opentelemetry/"): path = strings.TrimPrefix(path, "/opentelemetry") return opentelemetry.RequestHandler(path, w, r) + case strings.HasPrefix(path, "/journald/"): + path = strings.TrimPrefix(path, "/journald") + return journald.RequestHandler(path, w, r) default: return false } diff --git a/deployment/docker/victorialogs/compose-base.yml b/deployment/docker/victorialogs/compose-base.yml index 0d6c48dcb..05da7cb9c 100644 --- a/deployment/docker/victorialogs/compose-base.yml +++ b/deployment/docker/victorialogs/compose-base.yml @@ -6,6 +6,9 @@ services: - -storageDataPath=/vlogs - -loggerFormat=json - -syslog.listenAddr.tcp=0.0.0.0:8094 + - -journald.streamFields=_HOSTNAME,_SYSTEMD_UNIT,_PID + - -journald.ignoreFields=MESSAGE_ID,INVOCATION_ID,USER_INVOCATION_ID, + - -journald.ignoreFields=_BOOT_ID,_MACHINE_ID,_SYSTEMD_INVOCATION_ID,_STREAM_ID,_UID deploy: replicas: 0 healthcheck: diff --git a/deployment/docker/victorialogs/fluentbit/README.md b/deployment/docker/victorialogs/fluentbit/README.md index c6727c206..97339e232 100644 --- a/deployment/docker/victorialogs/fluentbit/README.md +++ b/deployment/docker/victorialogs/fluentbit/README.md @@ -5,6 +5,7 @@ The folder contains examples of [FluentBit](https://docs.fluentbit.io/manual) in * [loki](./loki) * [jsonline single node](./jsonline) * [jsonline HA setup](./jsonline-ha) +* [otlp](./otlp) To spin-up environment `cd` to any of listed above directories run the following command: ``` @@ -32,5 +33,6 @@ FluentBit configuration example can be found below: * [loki](./loki/fluent-bit.conf) * [jsonline single node](./jsonline/fluent-bit.conf) * [jsonline HA setup](./jsonline-ha/fluent-bit.conf) +* [otlp](./otlp/fluent-bit.conf) Please, note that `_stream_fields` parameter must follow recommended [best practices](https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields) to achieve better performance. diff --git a/deployment/docker/victorialogs/fluentbit/compose-base.yml b/deployment/docker/victorialogs/fluentbit/compose-base.yml index c9580679f..bfa881ae5 100644 --- a/deployment/docker/victorialogs/fluentbit/compose-base.yml +++ b/deployment/docker/victorialogs/fluentbit/compose-base.yml @@ -1,6 +1,13 @@ include: - ../compose-base.yml services: + nginx: + image: nginx:1.27 + volumes: + - ./nginx.conf:/etc/nginx/nginx.conf + depends_on: [fluentbit] + ports: + - "8080:80" fluentbit: image: cr.fluentbit.io/fluent/fluent-bit:3.1.7 volumes: diff --git a/deployment/docker/victorialogs/fluentbit/nginx.conf b/deployment/docker/victorialogs/fluentbit/nginx.conf new file mode 100644 index 000000000..d0ae8edce --- /dev/null +++ b/deployment/docker/victorialogs/fluentbit/nginx.conf @@ -0,0 +1,16 @@ +events { + worker_connections 2000; +} + +http { + server { + listen 0.0.0.0; + server_name _; + location /opentelemetry/api/v1/push { + proxy_pass http://victoriametrics:8428; + } + location /insert/opentelemetry/v1/logs { + proxy_pass http://victorialogs:9428; + } + } +} diff --git a/deployment/docker/victorialogs/fluentbit/otlp/compose.yml b/deployment/docker/victorialogs/fluentbit/otlp/compose.yml new file mode 100644 index 000000000..1627ba043 --- /dev/null +++ b/deployment/docker/victorialogs/fluentbit/otlp/compose.yml @@ -0,0 +1,3 @@ +include: + - ../compose.yml +name: fluentbit-loki diff --git a/deployment/docker/victorialogs/fluentbit/otlp/fluent-bit.conf b/deployment/docker/victorialogs/fluentbit/otlp/fluent-bit.conf new file mode 100644 index 000000000..b116220c8 --- /dev/null +++ b/deployment/docker/victorialogs/fluentbit/otlp/fluent-bit.conf @@ -0,0 +1,33 @@ +[INPUT] + name tail + path /var/lib/docker/containers/**/*.log + path_key path + multiline.parser docker, cri + Parser docker + Docker_Mode On + +[INPUT] + Name syslog + Listen 0.0.0.0 + Port 5140 + Parser syslog-rfc3164 + Mode tcp + +[INPUT] + name fluentbit_metrics + tag internal_metrics + scrape_interval 2 + +[SERVICE] + Flush 1 + Parsers_File parsers.conf + +[OUTPUT] + name opentelemetry + match * + host nginx + logs_uri /insert/opentelemetry/v1/logs + metrics_uri /opentelemetry/api/v1/push + port 80 + header VL-Msg-Field log + header VL-Stream-Fields severity diff --git a/deployment/docker/victorialogs/journald/Dockerfile b/deployment/docker/victorialogs/journald/Dockerfile new file mode 100644 index 000000000..95bc96fb5 --- /dev/null +++ b/deployment/docker/victorialogs/journald/Dockerfile @@ -0,0 +1,9 @@ +FROM ubuntu:24.04 + +RUN \ + apt update && \ + apt install -y \ + systemd \ + systemd-journal-remote && \ + sed -i 's/# URL=/URL=http:\/\/victorialogs:9428\/insert\/journald/g' /etc/systemd/journal-upload.conf && \ + systemctl enable systemd-journal-upload.service diff --git a/deployment/docker/victorialogs/journald/README.md b/deployment/docker/victorialogs/journald/README.md new file mode 100644 index 000000000..096aac31f --- /dev/null +++ b/deployment/docker/victorialogs/journald/README.md @@ -0,0 +1,29 @@ +# Docker compose Journald integration with VictoriaLogs + +The folder contains examples of Journald integration with VictoriaLogs using protocols: + +* [journald](./journald) + +To spin-up environment `cd` to any of listed above directories run the following command: +``` +docker compose up -d +``` + +To shut down the docker-compose environment run the following command: +``` +docker compose down +docker compose rm -f +``` + +The docker compose file contains the following components: + +* journald - Journald logs collection agent, which is configured to collect and write data to `victorialogs` +* victorialogs - VictoriaLogs log database, which accepts the data from `journald` +* victoriametrics - VictoriaMetrics metrics database, which collects metrics from `victorialogs` and `journald` + +Querying the data + +* [vmui](https://docs.victoriametrics.com/victorialogs/querying/#vmui) - a web UI is accessible by `http://localhost:9428/select/vmui` +* for querying the data via command-line please check [these docs](https://docs.victoriametrics.com/victorialogs/querying/#command-line) + +Please, note that `_stream_fields` parameter must follow recommended [best practices](https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields) to achieve better performance. diff --git a/deployment/docker/victorialogs/journald/compose-base.yml b/deployment/docker/victorialogs/journald/compose-base.yml new file mode 100644 index 000000000..0091669dc --- /dev/null +++ b/deployment/docker/victorialogs/journald/compose-base.yml @@ -0,0 +1,14 @@ +include: + - ../compose-base.yml +services: + journald: + build: . + restart: on-failure + privileged: true + user: root + entrypoint: /lib/systemd/systemd + depends_on: + victorialogs: + condition: service_healthy + victoriametrics: + condition: service_healthy diff --git a/deployment/docker/victorialogs/journald/journald/compose.yml b/deployment/docker/victorialogs/journald/journald/compose.yml new file mode 100644 index 000000000..573ac1550 --- /dev/null +++ b/deployment/docker/victorialogs/journald/journald/compose.yml @@ -0,0 +1,3 @@ +include: + - ../compose-base.yml +name: journald-remote diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 78f05254d..574d9bf7a 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -15,6 +15,8 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta ## tip +* FEATURE: added ability to receive systemd (journald) logs over network. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4618). + * BUGFIX: [web UI](https://docs.victoriametrics.com/victorialogs/querying/#web-ui): fix various glitches with updating query responses. The issue was introduced in [v0.36.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.36.0-victorialogs). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7279). ## [v0.37.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.37.0-victorialogs) diff --git a/docs/VictoriaLogs/Roadmap.md b/docs/VictoriaLogs/Roadmap.md index 5d2f28f37..c5307ceb2 100644 --- a/docs/VictoriaLogs/Roadmap.md +++ b/docs/VictoriaLogs/Roadmap.md @@ -21,7 +21,6 @@ See [these docs](https://docs.victoriametrics.com/victorialogs/) for details. The following functionality is planned in the future versions of VictoriaLogs: - Support for [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/) from popular log collectors and formats: - - [ ] [Journald](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4618) (systemd) - [ ] [Datadog protocol for logs](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6632) - [ ] Integration with Grafana. Partially done, check the [documentation](https://docs.victoriametrics.com/victorialogs/victorialogs-datasource/) and [datasource repository](https://github.com/VictoriaMetrics/victorialogs-datasource). - [ ] Ability to make instant snapshots and backups in the way [similar to VictoriaMetrics](https://docs.victoriametrics.com/#how-to-work-with-snapshots). diff --git a/docs/VictoriaLogs/data-ingestion/Journald.md b/docs/VictoriaLogs/data-ingestion/Journald.md new file mode 100644 index 000000000..16d736b83 --- /dev/null +++ b/docs/VictoriaLogs/data-ingestion/Journald.md @@ -0,0 +1,33 @@ +--- +weight: 10 +title: Journald setup +disableToc: true +menu: + docs: + parent: "victorialogs-data-ingestion" + weight: 10 +aliases: + - /VictoriaLogs/data-ingestion/Journald.html +--- +On a client site which should already have journald please install additionally [systemd-journal-upload](https://www.freedesktop.org/software/systemd/man/latest/systemd-journal-upload.service.html) and edit `/etc/systemd/journal-upload.conf` and set `URL` to VictoriaLogs endpoint: + +``` +[Upload] +URL=http://localhost:9428/insert/journald +``` + +Substitute the `localhost:9428` address inside `endpoints` section with the real TCP address of VictoriaLogs. + +Since neither HTTP query arguments nor HTTP headers are configurable on systemd-journal-upload, +[stream fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields) and other params can be configured on VictoriaLogs using command-line flags: +- `journald.streamFields` - configures [stream fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields) for ingested data. +Here's a [list of supported Journald fields](https://www.freedesktop.org/software/systemd/man/latest/systemd.journal-fields.html) +- `journald.ignoreFields` - configures Journald fields, that should be ignored. +- `journald.tenantID` - configures TenantID for ingested data. +- `journald.timeField` - configures time field for ingested data. + +See also: + +- [Data ingestion troubleshooting](https://docs.victoriametrics.com/victorialogs/data-ingestion/#troubleshooting). +- [How to query VictoriaLogs](https://docs.victoriametrics.com/victorialogs/querying/). +- [Docker-compose demo for Journald integration with VictoriaLogs](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker/victorialogs/journald). diff --git a/docs/VictoriaLogs/data-ingestion/README.md b/docs/VictoriaLogs/data-ingestion/README.md index d84cd7603..0f912c4de 100644 --- a/docs/VictoriaLogs/data-ingestion/README.md +++ b/docs/VictoriaLogs/data-ingestion/README.md @@ -9,6 +9,7 @@ - Promtail (aka Grafana Loki) - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/promtail/). - Telegraf - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/telegraf/). - OpenTelemetry Collector - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/opentelemetry/). +- Journald - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/journald/). The ingested logs can be queried according to [these docs](https://docs.victoriametrics.com/victorialogs/querying/). @@ -25,6 +26,7 @@ VictoriaLogs supports the following data ingestion HTTP APIs: - JSON stream API aka [ndjson](https://jsonlines.org/). See [these docs](#json-stream-api). - Loki JSON API. See [these docs](#loki-json-api). - OpenTelemetry API. See [these docs](#opentelemetry-api). +- Journald export format. VictoriaLogs accepts optional [HTTP parameters](#http-parameters) at data ingestion HTTP APIs. @@ -286,16 +288,17 @@ VictoriaLogs exposes various [metrics](https://docs.victoriametrics.com/victoria Here is the list of log collectors and their ingestion formats supported by VictoriaLogs: -| How to setup the collector | Format: Elasticsearch | Format: JSON Stream | Format: Loki | Format: syslog | Format: OpenTelemetry | -|----------------------------|-----------------------|---------------------|--------------|----------------|-----------------------| -| [Rsyslog](https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/) | [Yes](https://www.rsyslog.com/doc/configuration/modules/omelasticsearch.html) | No | No | [Yes](https://www.rsyslog.com/doc/configuration/modules/omfwd.html) | No | -| [Syslog-ng](https://docs.victoriametrics.com/victorialogs/data-ingestion/filebeat/) | Yes, [v1](https://support.oneidentity.com/technical-documents/syslog-ng-open-source-edition/3.16/administration-guide/28#TOPIC-956489), [v2](https://support.oneidentity.com/technical-documents/doc/syslog-ng-open-source-edition/3.16/administration-guide/29#TOPIC-956494) | No | No | [Yes](https://support.oneidentity.com/technical-documents/doc/syslog-ng-open-source-edition/3.16/administration-guide/44#TOPIC-956553) | No | -| [Filebeat](https://docs.victoriametrics.com/victorialogs/data-ingestion/filebeat/) | [Yes](https://www.elastic.co/guide/en/beats/filebeat/current/elasticsearch-output.html) | No | No | No | No | -| [Fluentbit](https://docs.victoriametrics.com/victorialogs/data-ingestion/fluentbit/) | No | [Yes](https://docs.fluentbit.io/manual/pipeline/outputs/http) | [Yes](https://docs.fluentbit.io/manual/pipeline/outputs/loki) | [Yes](https://docs.fluentbit.io/manual/pipeline/outputs/syslog) | [Yes](https://docs.fluentbit.io/manual/pipeline/outputs/opentelemetry) | -| [Logstash](https://docs.victoriametrics.com/victorialogs/data-ingestion/logstash/) | [Yes](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html) | No | No | [Yes](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-syslog.html) | [Yes](https://github.com/paulgrav/logstash-output-opentelemetry) | -| [Vector](https://docs.victoriametrics.com/victorialogs/data-ingestion/vector/) | [Yes](https://vector.dev/docs/reference/configuration/sinks/elasticsearch/) | [Yes](https://vector.dev/docs/reference/configuration/sinks/http/) | [Yes](https://vector.dev/docs/reference/configuration/sinks/loki/) | No | [Yes](https://vector.dev/docs/reference/configuration/sources/opentelemetry/) | -| [Promtail](https://docs.victoriametrics.com/victorialogs/data-ingestion/promtail/) | No | No | [Yes](https://grafana.com/docs/loki/latest/clients/promtail/configuration/#clients) | No | No | -| [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/) | [Yes](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/elasticsearchexporter) | No | [Yes](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/lokiexporter) | [Yes](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/syslogexporter) | [Yes](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter) | -| [Telegraf](https://docs.victoriametrics.com/victorialogs/data-ingestion/telegraf/) | [Yes](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/elasticsearch) | [Yes](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/http) | [Yes](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/loki) | [Yes](https://github.com/influxdata/telegraf/blob/master/plugins/outputs/syslog) | Yes | -| [Fluentd](https://docs.victoriametrics.com/victorialogs/data-ingestion/fluentd/) | [Yes](https://github.com/uken/fluent-plugin-elasticsearch) | [Yes](https://docs.fluentd.org/output/http) | [Yes](https://grafana.com/docs/loki/latest/send-data/fluentd/) | [Yes](https://github.com/fluent-plugins-nursery/fluent-plugin-remote_syslog) | No | +| How to setup the collector | Format: Elasticsearch | Format: JSON Stream | Format: Loki | Format: syslog | Format: OpenTelemetry | Format: Journald | +|----------------------------|-----------------------|---------------------|--------------|----------------|-----------------------|------------------| +| [Rsyslog](https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/) | [Yes](https://www.rsyslog.com/doc/configuration/modules/omelasticsearch.html) | No | No | [Yes](https://www.rsyslog.com/doc/configuration/modules/omfwd.html) | No | No | +| [Syslog-ng](https://docs.victoriametrics.com/victorialogs/data-ingestion/filebeat/) | Yes, [v1](https://support.oneidentity.com/technical-documents/syslog-ng-open-source-edition/3.16/administration-guide/28#TOPIC-956489), [v2](https://support.oneidentity.com/technical-documents/doc/syslog-ng-open-source-edition/3.16/administration-guide/29#TOPIC-956494) | No | No | [Yes](https://support.oneidentity.com/technical-documents/doc/syslog-ng-open-source-edition/3.16/administration-guide/44#TOPIC-956553) | No | No | +| [Filebeat](https://docs.victoriametrics.com/victorialogs/data-ingestion/filebeat/) | [Yes](https://www.elastic.co/guide/en/beats/filebeat/current/elasticsearch-output.html) | No | No | No | No | No | +| [Fluentbit](https://docs.victoriametrics.com/victorialogs/data-ingestion/fluentbit/) | No | [Yes](https://docs.fluentbit.io/manual/pipeline/outputs/http) | [Yes](https://docs.fluentbit.io/manual/pipeline/outputs/loki) | [Yes](https://docs.fluentbit.io/manual/pipeline/outputs/syslog) | [Yes](https://docs.fluentbit.io/manual/pipeline/outputs/opentelemetry) | No | +| [Logstash](https://docs.victoriametrics.com/victorialogs/data-ingestion/logstash/) | [Yes](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html) | No | No | [Yes](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-syslog.html) | [Yes](https://github.com/paulgrav/logstash-output-opentelemetry) | No | +| [Vector](https://docs.victoriametrics.com/victorialogs/data-ingestion/vector/) | [Yes](https://vector.dev/docs/reference/configuration/sinks/elasticsearch/) | [Yes](https://vector.dev/docs/reference/configuration/sinks/http/) | [Yes](https://vector.dev/docs/reference/configuration/sinks/loki/) | No | [Yes](https://vector.dev/docs/reference/configuration/sources/opentelemetry/) | No | +| [Promtail](https://docs.victoriametrics.com/victorialogs/data-ingestion/promtail/) | No | No | [Yes](https://grafana.com/docs/loki/latest/clients/promtail/configuration/#clients) | No | No | No | +| [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/) | [Yes](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/elasticsearchexporter) | No | [Yes](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/lokiexporter) | [Yes](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/syslogexporter) | [Yes](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter) | No | +| [Telegraf](https://docs.victoriametrics.com/victorialogs/data-ingestion/telegraf/) | [Yes](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/elasticsearch) | [Yes](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/http) | [Yes](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/loki) | [Yes](https://github.com/influxdata/telegraf/blob/master/plugins/outputs/syslog) | Yes | No | +| [Fluentd](https://docs.victoriametrics.com/victorialogs/data-ingestion/fluentd/) | [Yes](https://github.com/uken/fluent-plugin-elasticsearch) | [Yes](https://docs.fluentd.org/output/http) | [Yes](https://grafana.com/docs/loki/latest/send-data/fluentd/) | [Yes](https://github.com/fluent-plugins-nursery/fluent-plugin-remote_syslog) | No | No | +| [Journald](https://docs.victoriametrics.com/victorialogs/data-ingestion/journald/) | No | No | No | No | No | Yes | diff --git a/go.mod b/go.mod index e50ce1856..0f7bb846d 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( github.com/valyala/fastjson v1.6.4 github.com/valyala/fastrand v1.1.0 github.com/valyala/fasttemplate v1.2.2 - github.com/valyala/gozstd v1.21.1 + github.com/valyala/gozstd v1.21.2 github.com/valyala/histogram v1.2.0 github.com/valyala/quicktemplate v1.8.0 golang.org/x/net v0.29.0 diff --git a/go.sum b/go.sum index 636d7402d..53089cd60 100644 --- a/go.sum +++ b/go.sum @@ -502,6 +502,8 @@ github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQ github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/gozstd v1.21.1 h1:TQFZVTk5zo7iJcX3o4XYBJujPdO31LFb4fVImwK873A= github.com/valyala/gozstd v1.21.1/go.mod h1:y5Ew47GLlP37EkTB+B4s7r6A5rdaeB7ftbl9zoYiIPQ= +github.com/valyala/gozstd v1.21.2 h1:SBZ6sYA9y+u32XSds1TwOJJatcqmA3TgfLwGtV78Fcw= +github.com/valyala/gozstd v1.21.2/go.mod h1:y5Ew47GLlP37EkTB+B4s7r6A5rdaeB7ftbl9zoYiIPQ= github.com/valyala/histogram v1.2.0 h1:wyYGAZZt3CpwUiIb9AU/Zbllg1llXyrtApRS815OLoQ= github.com/valyala/histogram v1.2.0/go.mod h1:Hb4kBwb4UxsaNbbbh+RRz8ZR6pdodR57tzWUS3BUzXY= github.com/valyala/quicktemplate v1.8.0 h1:zU0tjbIqTRgKQzFY1L42zq0qR3eh4WoQQdIdqCysW5k= diff --git a/vendor/github.com/valyala/gozstd/gozstd.go b/vendor/github.com/valyala/gozstd/gozstd.go index cc9ffa467..831b703ef 100644 --- a/vendor/github.com/valyala/gozstd/gozstd.go +++ b/vendor/github.com/valyala/gozstd/gozstd.go @@ -29,9 +29,10 @@ static size_t ZSTD_decompress_usingDDict_wrapper(uintptr_t ctx, uintptr_t dst, s return ZSTD_decompress_usingDDict((ZSTD_DCtx*)ctx, (void*)dst, dstCapacity, (const void*)src, srcSize, (const ZSTD_DDict*)ddict); } -static unsigned long long ZSTD_getFrameContentSize_wrapper(uintptr_t src, size_t srcSize) { - return ZSTD_getFrameContentSize((const void*)src, srcSize); +static unsigned long long ZSTD_findDecompressedSize_wrapper(uintptr_t src, size_t srcSize) { + return ZSTD_findDecompressedSize((const void*)src, srcSize); } + */ import "C" @@ -254,7 +255,7 @@ func decompress(dctx, dctxDict *dctxWrapper, dst, src []byte, dd *DDict) ([]byte } // Slow path - resize dst to fit decompressed data. - decompressBound := int(C.ZSTD_getFrameContentSize_wrapper( + decompressBound := int(C.ZSTD_findDecompressedSize_wrapper( C.uintptr_t(uintptr(unsafe.Pointer(&src[0]))), C.size_t(len(src)))) // Prevent from GC'ing of src during CGO call above. runtime.KeepAlive(src) diff --git a/vendor/modules.txt b/vendor/modules.txt index ec1af20a9..1807cfa2b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -580,7 +580,7 @@ github.com/valyala/fastrand # github.com/valyala/fasttemplate v1.2.2 ## explicit; go 1.12 github.com/valyala/fasttemplate -# github.com/valyala/gozstd v1.21.1 +# github.com/valyala/gozstd v1.21.2 ## explicit; go 1.12 github.com/valyala/gozstd # github.com/valyala/histogram v1.2.0 From f06c7e99fe29f671b94bcf69f398435f84be3364 Mon Sep 17 00:00:00 2001 From: Zhu Jiekun Date: Mon, 28 Oct 2024 03:38:34 +0800 Subject: [PATCH 25/90] lib/promscrape: adds support for PuppetDB service discovery This commit adds support for [PuppetDB](https://www.puppet.com/docs/puppetdb/8/overview.html) service discovery to the `vmagent` and `victoria-metrics-single` components. Related issue https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5744 --- docs/README.md | 2 + docs/sd_configs.md | 56 +++++++ docs/vmagent.md | 2 + lib/promscrape/config.go | 15 ++ lib/promscrape/discovery/puppetdb/api.go | 75 +++++++++ lib/promscrape/discovery/puppetdb/api_test.go | 25 +++ .../puppetdb/mock_puppetdb_server_test.go | 41 +++++ lib/promscrape/discovery/puppetdb/puppetdb.go | 48 ++++++ .../discovery/puppetdb/puppetdb_test.go | 119 ++++++++++++++ lib/promscrape/discovery/puppetdb/resource.go | 151 ++++++++++++++++++ lib/promscrape/scraper.go | 2 + 11 files changed, 536 insertions(+) create mode 100644 lib/promscrape/discovery/puppetdb/api.go create mode 100644 lib/promscrape/discovery/puppetdb/api_test.go create mode 100644 lib/promscrape/discovery/puppetdb/mock_puppetdb_server_test.go create mode 100644 lib/promscrape/discovery/puppetdb/puppetdb.go create mode 100644 lib/promscrape/discovery/puppetdb/puppetdb_test.go create mode 100644 lib/promscrape/discovery/puppetdb/resource.go diff --git a/docs/README.md b/docs/README.md index e4bb5871c..1a1905a9c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3090,6 +3090,8 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li Interval for checking for changes in openstack API server. This works only if openstack_sd_configs is configured in '-promscrape.config' file. See https://docs.victoriametrics.com/sd_configs/#openstack_sd_configs for details (default 30s) -promscrape.ovhcloudSDCheckInterval duration Interval for checking for changes in OVH Cloud VPS and dedicated server. This works only if ovhcloud_sd_configs is configured in '-promscrape.config' file. See https://docs.victoriametrics.com/sd_configs/#ovhcloud_sd_configs for details (default 30s) + -promscrape.puppetdbSDCheckInterval duration + Interval for checking for changes in PuppetDB API. This works only if puppetdb_sd_configs is configured in '-promscrape.config' file. See https://docs.victoriametrics.com/sd_configs/#puppetdb_sd_configs for details (default 30s) -promscrape.seriesLimitPerTarget int Optional limit on the number of unique time series a single scrape target can expose. See https://docs.victoriametrics.com/vmagent/#cardinality-limiter for more info -promscrape.streamParse diff --git a/docs/sd_configs.md b/docs/sd_configs.md index e7b81e5e7..a85fc1803 100644 --- a/docs/sd_configs.md +++ b/docs/sd_configs.md @@ -31,6 +31,7 @@ supports the following Prometheus-compatible service discovery options for Prome * `nomad_sd_configs` is for discovering and scraping targets registered in [HashiCorp Nomad](https://www.nomadproject.io/). See [these docs](#nomad_sd_configs). * `openstack_sd_configs` is for discovering and scraping OpenStack targets. See [these docs](#openstack_sd_configs). * `ovhcloud_sd_configs` is for discovering and scraping OVH Cloud VPS and dedicated server targets. See [these docs](#ovhcloud_sd_configs). +* `puppetdb_sd_configs` is for discovering and scraping PuppetDB targets. See [these docs](#puppetdb_sd_configs). * `static_configs` is for scraping statically defined targets. See [these docs](#static_configs). * `vultr_sd_configs` is for discovering and scraping [Vultr](https://www.vultr.com/) targets. See [these docs](#vultr_sd_configs). * `yandexcloud_sd_configs` is for discovering and scraping [Yandex Cloud](https://cloud.yandex.com/en/) targets. See [these docs](#yandexcloud_sd_configs). @@ -1546,6 +1547,61 @@ Dedicated servers: The list of discovered OVH Cloud targets is refreshed at the interval, which can be configured via `-promscrape.ovhcloudSDCheckInterval` command-line flag. +## puppetdb_sd_configs + +_Available from [TODO](https://docs.victoriametrics.com/changelog/#TODO) version._ + +PuppetDB SD configuration allows retrieving scrape targets from [PuppetDB](https://www.puppet.com/docs/puppetdb/8/overview.html) resources. + +This SD discovers resources and will create a target for each resource returned by the API. + +Configuration example: + +```yaml +scrape_configs: +- job_name: puppetdb_job + puppetdb_sd_configs: + # The URL of the PuppetDB root query endpoint. + - url: + + # Puppet Query Language (PQL) query. Only resources are supported. + # https://puppet.com/docs/puppetdb/latest/api/query/v4/pql.html + query: + + # Whether to include the parameters as meta labels. + # Due to the differences between parameter types and Prometheus labels, + # some parameters might not be rendered. The format of the parameters might + # also change in future releases. + # + # Note: Enabling this exposes parameters in the VMUI and API. Make sure + # that you don't have secrets exposed as parameters if you enable this. + # + # include_parameters: | default false + + # The port to scrape metrics from. + # + # port: | default = 80 + + # Additional HTTP API client options can be specified here. + # See https://docs.victoriametrics.com/sd_configs.html#http-api-client-options +``` + +The resource address is the `certname` of the resource and can be changed during relabeling. +The following meta labels are available on targets during relabeling: + +* `__meta_puppetdb_query`: the Puppet Query Language (PQL) query. +* `__meta_puppetdb_certname`: the name of the node associated with the resource. +* `__meta_puppetdb_resource`: a SHA-1 hash of the resource’s type, title, and parameters, for identification. +* `__meta_puppetdb_type`: the resource type. +* `__meta_puppetdb_title`: the resource title. +* `__meta_puppetdb_exported`: whether the resource is exported (`"true"` or `"false"`). +* `__meta_puppetdb_tags`: comma separated list of resource tags. +* `__meta_puppetdb_file`: the manifest file in which the resource was declared. +* `__meta_puppetdb_environment`: the environment of the node associated with the resource. +* `__meta_puppetdb_parameter_`: the parameters of the resource. + +The list of discovered PuppetDB targets is refreshed at the interval, which can be configured via `-promscrape.puppetdbSDCheckInterval` command-line flag. + ## static_configs A static config allows specifying a list of targets and a common label set for them. diff --git a/docs/vmagent.md b/docs/vmagent.md index 74981aca8..5525ac4c7 100644 --- a/docs/vmagent.md +++ b/docs/vmagent.md @@ -2015,6 +2015,8 @@ See the docs at https://docs.victoriametrics.com/vmagent/ . Interval for checking for changes in openstack API server. This works only if openstack_sd_configs is configured in '-promscrape.config' file. See https://docs.victoriametrics.com/sd_configs/#openstack_sd_configs for details (default 30s) -promscrape.ovhcloudSDCheckInterval duration Interval for checking for changes in OVH Cloud VPS and dedicated server. This works only if ovhcloud_sd_configs is configured in '-promscrape.config' file. See https://docs.victoriametrics.com/sd_configs/#ovhcloud_sd_configs for details (default 30s) + -promscrape.puppetdbSDCheckInterval duration + Interval for checking for changes in PuppetDB API. This works only if puppetdb_sd_configs is configured in '-promscrape.config' file. See https://docs.victoriametrics.com/sd_configs/#puppetdb_sd_configs for details (default 30s) -promscrape.seriesLimitPerTarget int Optional limit on the number of unique time series a single scrape target can expose. See https://docs.victoriametrics.com/vmagent/#cardinality-limiter for more info -promscrape.streamParse diff --git a/lib/promscrape/config.go b/lib/promscrape/config.go index 9221d7f43..9b1fcdbf0 100644 --- a/lib/promscrape/config.go +++ b/lib/promscrape/config.go @@ -38,6 +38,7 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/nomad" "github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/openstack" "github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/ovhcloud" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/puppetdb" "github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/vultr" "github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/yandexcloud" "github.com/VictoriaMetrics/VictoriaMetrics/lib/promutils" @@ -314,6 +315,7 @@ type ScrapeConfig struct { NomadSDConfigs []nomad.SDConfig `yaml:"nomad_sd_configs,omitempty"` OpenStackSDConfigs []openstack.SDConfig `yaml:"openstack_sd_configs,omitempty"` OVHCloudSDConfigs []ovhcloud.SDConfig `yaml:"ovhcloud_sd_configs,omitempty"` + PuppetDBSDConfigs []puppetdb.SDConfig `yaml:"puppetdb_sd_configs,omitempty"` StaticConfigs []StaticConfig `yaml:"static_configs,omitempty"` VultrSDConfigs []vultr.SDConfig `yaml:"vultr_configs,omitempty"` YandexCloudSDConfigs []yandexcloud.SDConfig `yaml:"yandexcloud_sd_configs,omitempty"` @@ -399,6 +401,9 @@ func (sc *ScrapeConfig) mustStop() { for i := range sc.OVHCloudSDConfigs { sc.OVHCloudSDConfigs[i].MustStop() } + for i := range sc.PuppetDBSDConfigs { + sc.PuppetDBSDConfigs[i].MustStop() + } for i := range sc.VultrSDConfigs { sc.VultrSDConfigs[i].MustStop() } @@ -772,6 +777,16 @@ func (cfg *Config) getOVHCloudSDScrapeWork(prev []*ScrapeWork) []*ScrapeWork { return cfg.getScrapeWorkGeneric(visitConfigs, "ovhcloud_sd_config", prev) } +// getPuppetDBSDScrapeWork returns `puppetdb_sd_configs` ScrapeWork from cfg. +func (cfg *Config) getPuppetDBSDScrapeWork(prev []*ScrapeWork) []*ScrapeWork { + visitConfigs := func(sc *ScrapeConfig, visitor func(sdc targetLabelsGetter)) { + for i := range sc.PuppetDBSDConfigs { + visitor(&sc.PuppetDBSDConfigs[i]) + } + } + return cfg.getScrapeWorkGeneric(visitConfigs, "puppetdb_sd_config", prev) +} + // getVultrSDScrapeWork returns `vultr_sd_configs` ScrapeWork from cfg. func (cfg *Config) getVultrSDScrapeWork(prev []*ScrapeWork) []*ScrapeWork { visitConfigs := func(sc *ScrapeConfig, visitor func(sdc targetLabelsGetter)) { diff --git a/lib/promscrape/discovery/puppetdb/api.go b/lib/promscrape/discovery/puppetdb/api.go new file mode 100644 index 000000000..499301c14 --- /dev/null +++ b/lib/promscrape/discovery/puppetdb/api.go @@ -0,0 +1,75 @@ +package puppetdb + +import ( + "errors" + "fmt" + "net/url" + + "github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discoveryutils" +) + +var configMap = discoveryutils.NewConfigMap() + +type apiConfig struct { + client *discoveryutils.Client + + query string + includeParameters bool + port int +} + +func getAPIConfig(sdc *SDConfig, baseDir string) (*apiConfig, error) { + v, err := configMap.Get(sdc, func() (interface{}, error) { return newAPIConfig(sdc, baseDir) }) + if err != nil { + return nil, err + } + return v.(*apiConfig), nil +} + +func newAPIConfig(sdc *SDConfig, baseDir string) (*apiConfig, error) { + // the following param checks align with Prometheus + if sdc.URL == "" { + return nil, errors.New("URL is missing") + } + parsedURL, err := url.Parse(sdc.URL) + if err != nil { + return nil, fmt.Errorf("parse URL %s error: %v", sdc.URL, err) + } + if parsedURL.Scheme != "http" && parsedURL.Scheme != "https" { + return nil, fmt.Errorf("URL %s scheme must be 'http' or 'https'", sdc.URL) + } + if parsedURL.Host == "" { + return nil, fmt.Errorf("host is missing in URL %s", sdc.URL) + } + if sdc.Query == "" { + return nil, errors.New("query missing") + } + + port := sdc.Port + if port == 0 { + port = 80 + } + + // other general checks + ac, err := sdc.HTTPClientConfig.NewConfig(baseDir) + if err != nil { + return nil, fmt.Errorf("cannot parse auth config: %w", err) + } + proxyAC, err := sdc.ProxyClientConfig.NewConfig(baseDir) + if err != nil { + return nil, fmt.Errorf("cannot parse proxy auth config: %w", err) + } + + client, err := discoveryutils.NewClient(parsedURL.String(), ac, sdc.ProxyURL, proxyAC, &sdc.HTTPClientConfig) + if err != nil { + return nil, fmt.Errorf("cannot create HTTP client for %q: %w", sdc.URL, err) + } + + return &apiConfig{ + client: client, + + query: sdc.Query, + includeParameters: sdc.IncludeParameters, + port: port, + }, nil +} diff --git a/lib/promscrape/discovery/puppetdb/api_test.go b/lib/promscrape/discovery/puppetdb/api_test.go new file mode 100644 index 000000000..00de2e53b --- /dev/null +++ b/lib/promscrape/discovery/puppetdb/api_test.go @@ -0,0 +1,25 @@ +package puppetdb + +import ( + "testing" +) + +func Test_newAPIConfig(t *testing.T) { + f := func(url, query string, includeParameters bool, port int, wantErr bool) { + t.Helper() + sdc := &SDConfig{ + URL: url, + Query: query, + IncludeParameters: includeParameters, + Port: port, + } + if _, err := newAPIConfig(sdc, ""); wantErr != (err != nil) { + t.Fatalf("newAPIConfig want error = %t, but error = %v", wantErr, err) + } + } + + f("https://puppetdb.example.com", `resources { type = "Class" and title = "Prometheus::Node_exporter" }`, true, 9100, false) + f("", `resources { type = "Class" and title = "Prometheus::Node_exporter" }`, true, 9100, true) + f("https://puppetdb.example.com", ``, true, 9100, true) + f("ftp://invalid.url", `resources { type = "Class" and title = "Prometheus::Node_exporter" }`, true, 9100, true) +} diff --git a/lib/promscrape/discovery/puppetdb/mock_puppetdb_server_test.go b/lib/promscrape/discovery/puppetdb/mock_puppetdb_server_test.go new file mode 100644 index 000000000..fb8e17615 --- /dev/null +++ b/lib/promscrape/discovery/puppetdb/mock_puppetdb_server_test.go @@ -0,0 +1,41 @@ +package puppetdb + +import ( + "fmt" + "net/http" + "net/http/httptest" +) + +func newMockPuppetDBServer(jsonResponse func(path string) ([]byte, error)) *puppetdbServer { + rw := &puppetdbServer{} + rw.Server = httptest.NewServer(http.HandlerFunc(rw.handler)) + rw.jsonResponse = jsonResponse + return rw +} + +type puppetdbServer struct { + *httptest.Server + jsonResponse func(path string) ([]byte, error) +} + +func (rw *puppetdbServer) err(w http.ResponseWriter, err error) { + w.WriteHeader(http.StatusBadRequest) + w.Write([]byte(err.Error())) +} + +func (rw *puppetdbServer) handler(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodPost { + rw.err(w, fmt.Errorf("bad method %q", r.Method)) + return + } + + resp, err := rw.jsonResponse(r.RequestURI) + if err != nil { + rw.err(w, err) + return + } + + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Write(resp) + w.WriteHeader(http.StatusOK) +} diff --git a/lib/promscrape/discovery/puppetdb/puppetdb.go b/lib/promscrape/discovery/puppetdb/puppetdb.go new file mode 100644 index 000000000..f566e7a21 --- /dev/null +++ b/lib/promscrape/discovery/puppetdb/puppetdb.go @@ -0,0 +1,48 @@ +package puppetdb + +import ( + "flag" + "fmt" + "time" + + "github.com/VictoriaMetrics/VictoriaMetrics/lib/promauth" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/promutils" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/proxy" +) + +// SDCheckInterval defines interval for targets refresh. +var SDCheckInterval = flag.Duration("promscrape.puppetdbSDCheckInterval", 30*time.Second, "Interval for checking for changes in PuppetDB API. "+ + "This works only if puppetdb_sd_configs is configured in '-promscrape.config' file. "+ + "See https://docs.victoriametrics.com/sd_configs/#puppetdb_sd_configs for details") + +// SDConfig is the configuration for PuppetDB based discovery. +type SDConfig struct { + URL string `yaml:"url"` + Query string `yaml:"query"` + IncludeParameters bool `yaml:"include_parameters"` + Port int `yaml:"port"` + + HTTPClientConfig promauth.HTTPClientConfig `yaml:",inline"` + ProxyURL *proxy.URL `yaml:"proxy_url,omitempty"` + ProxyClientConfig promauth.ProxyClientConfig `yaml:",inline"` +} + +// GetLabels returns labels for PuppetDB according to service discover config. +func (sdc *SDConfig) GetLabels(baseDir string) ([]*promutils.Labels, error) { + cfg, err := getAPIConfig(sdc, baseDir) + if err != nil { + return nil, fmt.Errorf("cannot get API config: %w", err) + } + + resources, err := getResourceList(cfg) + if err != nil { + return nil, err + } + + return getResourceLabels(resources, cfg), nil +} + +// MustStop stops further usage for sdc. +func (sdc *SDConfig) MustStop() { + _ = configMap.Delete(sdc) +} diff --git a/lib/promscrape/discovery/puppetdb/puppetdb_test.go b/lib/promscrape/discovery/puppetdb/puppetdb_test.go new file mode 100644 index 000000000..dc7b04dc7 --- /dev/null +++ b/lib/promscrape/discovery/puppetdb/puppetdb_test.go @@ -0,0 +1,119 @@ +package puppetdb + +import ( + "reflect" + "testing" + + "github.com/VictoriaMetrics/VictoriaMetrics/lib/promutils" +) + +var jsonResponse = `[ + { + "certname": "edinburgh.example.com", + "environment": "prod", + "exported": false, + "file": "/etc/puppetlabs/code/environments/prod/modules/upstream/apache/manifests/init.pp", + "line": 384, + "parameters": { + "access_log": true, + "access_log_file": "ssl_access_log", + "additional_includes": [ ], + "directoryindex": "", + "docroot": "/var/www/html", + "ensure": "absent", + "options": [ + "Indexes", + "FollowSymLinks", + "MultiViews" + ], + "php_flags": { }, + "labels": { + "alias": "edinburgh" + }, + "scriptaliases": [ + { + "alias": "/cgi-bin", + "path": "/var/www/cgi-bin" + } + ], + "port": 22, + "pi": 3.141592653589793, + "buckets": [ + 0, + 2, + 5 + ], + "coordinates": [ + 60.13464726551357, + -2.0513768021728893 + ] + }, + "resource": "49af83866dc5a1518968b68e58a25319107afe11", + "tags": [ + "roles::hypervisor", + "apache", + "apache::vhost", + "class", + "default-ssl", + "profile_hypervisor", + "vhost", + "profile_apache", + "hypervisor", + "__node_regexp__edinburgh", + "roles", + "node" + ], + "title": "default-ssl", + "type": "Apache::Vhost" + } +]` + +// TestSDConfig_GetLabels test example response and expect labels are from: +// https://github.com/prometheus/prometheus/blob/685493187ec5f5734777769f595cf8418d49900d/discovery/puppetdb/puppetdb_test.go#L110C6-L110C39 +func TestSDConfig_GetLabels(t *testing.T) { + mockSvr := newMockPuppetDBServer(func(_ string) ([]byte, error) { + return []byte(jsonResponse), nil + }) + + sdConfig := &SDConfig{ + URL: mockSvr.URL, + Query: "vhosts", + Port: 9100, + IncludeParameters: true, + } + + expectLabels := &promutils.Labels{} + expectLabels.Add("__address__", "edinburgh.example.com:9100") + expectLabels.Add("__meta_puppetdb_query", "vhosts") + expectLabels.Add("__meta_puppetdb_certname", "edinburgh.example.com") + expectLabels.Add("__meta_puppetdb_environment", "prod") + expectLabels.Add("__meta_puppetdb_exported", "false") + expectLabels.Add("__meta_puppetdb_file", "/etc/puppetlabs/code/environments/prod/modules/upstream/apache/manifests/init.pp") + expectLabels.Add("__meta_puppetdb_parameter_access_log", "true") + expectLabels.Add("__meta_puppetdb_parameter_access_log_file", "ssl_access_log") + expectLabels.Add("__meta_puppetdb_parameter_buckets", "0,2,5") + expectLabels.Add("__meta_puppetdb_parameter_coordinates", "60.13464726551357,-2.0513768021728893") + expectLabels.Add("__meta_puppetdb_parameter_docroot", "/var/www/html") + expectLabels.Add("__meta_puppetdb_parameter_ensure", "absent") + expectLabels.Add("__meta_puppetdb_parameter_labels_alias", "edinburgh") + expectLabels.Add("__meta_puppetdb_parameter_options", "Indexes,FollowSymLinks,MultiViews") + expectLabels.Add("__meta_puppetdb_parameter_pi", "3.141592653589793") + expectLabels.Add("__meta_puppetdb_parameter_port", "22") + expectLabels.Add("__meta_puppetdb_resource", "49af83866dc5a1518968b68e58a25319107afe11") + expectLabels.Add("__meta_puppetdb_tags", ",roles::hypervisor,apache,apache::vhost,class,default-ssl,profile_hypervisor,vhost,profile_apache,hypervisor,__node_regexp__edinburgh,roles,node,") + expectLabels.Add("__meta_puppetdb_title", "default-ssl") + expectLabels.Add("__meta_puppetdb_type", "Apache::Vhost") + + result, err := sdConfig.GetLabels("") + if err != nil { + t.Fatalf("GetLabels got err: %v", err) + } + + if len(result) != 1 { + t.Fatalf("GetLabels get result len != 1") + } + + if !reflect.DeepEqual(result[0].ToMap(), expectLabels.ToMap()) { + t.Fatalf("GetLabels incorrect, want: %v, got: %v", expectLabels.ToMap(), result[0].ToMap()) + } +} diff --git a/lib/promscrape/discovery/puppetdb/resource.go b/lib/promscrape/discovery/puppetdb/resource.go new file mode 100644 index 000000000..de148b5de --- /dev/null +++ b/lib/promscrape/discovery/puppetdb/resource.go @@ -0,0 +1,151 @@ +package puppetdb + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "net/http" + "strconv" + "strings" + + "github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discoveryutils" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/promutils" +) + +const ( + separator = "," +) + +type resource struct { + Certname string `json:"certname"` + Resource string `json:"resource"` + Type string `json:"type"` + Title string `json:"title"` + Exported bool `json:"exported"` + Tags []string `json:"tags"` + File string `json:"file"` + Environment string `json:"environment"` + Parameters parameters `json:"parameters"` +} + +type parameters map[string]interface{} + +// addToLabels add Parameters map to existing labels. +// See: https://github.com/prometheus/prometheus/blob/685493187ec5f5734777769f595cf8418d49900d/discovery/puppetdb/resources.go#L39 +func (p *parameters) addToLabels(keyPrefix string, m *promutils.Labels) { + if p == nil { + return + } + + for k, v := range *p { + var labelValue string + switch value := v.(type) { + case string: + labelValue = value + case bool: + labelValue = strconv.FormatBool(value) + case int64: + labelValue = strconv.FormatInt(value, 10) + case float64: + labelValue = strconv.FormatFloat(value, 'g', -1, 64) + case []string: + labelValue = separator + strings.Join(value, separator) + separator + case []interface{}: + if len(value) == 0 { + continue + } + values := make([]string, len(value)) + for i, v := range value { + switch value := v.(type) { + case string: + values[i] = value + case bool: + values[i] = strconv.FormatBool(value) + case int64: + values[i] = strconv.FormatInt(value, 10) + case float64: + values[i] = strconv.FormatFloat(value, 'g', -1, 64) + case []string: + values[i] = separator + strings.Join(value, separator) + separator + } + } + labelValue = strings.Join(values, separator) + case map[string]interface{}: + subParameter := parameters(value) + subParameter.addToLabels(keyPrefix+discoveryutils.SanitizeLabelName(k+"_"), m) + default: + continue + } + if labelValue == "" { + continue + } + name := discoveryutils.SanitizeLabelName(k) + m.Add(keyPrefix+name, labelValue) + } +} + +func getResourceList(cfg *apiConfig) ([]resource, error) { + body := struct { + Query string `json:"query"` + }{cfg.query} + + bodyBytes, err := json.Marshal(body) + if err != nil { + return nil, err + } + + modifyRequestFunc := func(request *http.Request) { + request.Body = io.NopCloser(bytes.NewBuffer(bodyBytes)) + request.Header.Set("Accept", "application/json") + request.Header.Set("Content-Type", "application/json") + request.Method = http.MethodPost + } + + // https://www.puppet.com/docs/puppetdb/8/api/query/v4/overview#pdbqueryv4 + resp, err := cfg.client.GetAPIResponseWithReqParams("/pdb/query/v4", modifyRequestFunc) + if err != nil { + return nil, err + } + + var resources []resource + if err = json.Unmarshal(resp, &resources); err != nil { + return nil, err + } + + return resources, nil +} + +func getResourceLabels(resources []resource, cfg *apiConfig) []*promutils.Labels { + ms := make([]*promutils.Labels, 0, len(resources)) + + for _, res := range resources { + m := promutils.NewLabels(18) + + m.Add("__address__", discoveryutils.JoinHostPort(res.Certname, cfg.port)) + m.Add("__meta_puppetdb_certname", res.Certname) + m.Add("__meta_puppetdb_environment", res.Environment) + m.Add("__meta_puppetdb_exported", fmt.Sprintf("%t", res.Exported)) + m.Add("__meta_puppetdb_file", res.File) + m.Add("__meta_puppetdb_query", cfg.query) + m.Add("__meta_puppetdb_resource", res.Resource) + m.Add("__meta_puppetdb_title", res.Title) + m.Add("__meta_puppetdb_type", res.Type) + + if len(res.Tags) > 0 { + //discoveryutils.AddTagsToLabels(m, resource.Tags, "__meta_puppetdb_tags", separator) + m.Add("__meta_puppetdb_tags", separator+strings.Join(res.Tags, separator)+separator) + } + + // Parameters are not included by default. This should only be enabled + // on select resources as it might expose secrets on the Prometheus UI + // for certain resources. + if cfg.includeParameters { + res.Parameters.addToLabels("__meta_puppetdb_parameter_", m) + } + + ms = append(ms, m) + } + + return ms +} diff --git a/lib/promscrape/scraper.go b/lib/promscrape/scraper.go index b34cf1592..d8ad2707e 100644 --- a/lib/promscrape/scraper.go +++ b/lib/promscrape/scraper.go @@ -31,6 +31,7 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/nomad" "github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/openstack" "github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/ovhcloud" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/puppetdb" "github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/vultr" "github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/yandexcloud" "github.com/VictoriaMetrics/VictoriaMetrics/lib/promutils" @@ -143,6 +144,7 @@ func runScraper(configFile string, pushData func(at *auth.Token, wr *prompbmarsh scs.add("nomad_sd_configs", *nomad.SDCheckInterval, func(cfg *Config, swsPrev []*ScrapeWork) []*ScrapeWork { return cfg.getNomadSDScrapeWork(swsPrev) }) scs.add("openstack_sd_configs", *openstack.SDCheckInterval, func(cfg *Config, swsPrev []*ScrapeWork) []*ScrapeWork { return cfg.getOpenStackSDScrapeWork(swsPrev) }) scs.add("ovhcloud_sd_configs", *ovhcloud.SDCheckInterval, func(cfg *Config, swsPrev []*ScrapeWork) []*ScrapeWork { return cfg.getOVHCloudSDScrapeWork(swsPrev) }) + scs.add("puppetdb_sd_configs", *puppetdb.SDCheckInterval, func(cfg *Config, swsPrev []*ScrapeWork) []*ScrapeWork { return cfg.getPuppetDBSDScrapeWork(swsPrev) }) scs.add("vultr_sd_configs", *vultr.SDCheckInterval, func(cfg *Config, swsPrev []*ScrapeWork) []*ScrapeWork { return cfg.getVultrSDScrapeWork(swsPrev) }) scs.add("yandexcloud_sd_configs", *yandexcloud.SDCheckInterval, func(cfg *Config, swsPrev []*ScrapeWork) []*ScrapeWork { return cfg.getYandexCloudSDScrapeWork(swsPrev) }) scs.add("static_configs", 0, func(cfg *Config, _ []*ScrapeWork) []*ScrapeWork { return cfg.getStaticScrapeWork() }) From 4e50d6eed360bba101a9592a5b60cc577985c94c Mon Sep 17 00:00:00 2001 From: Zakhar Bessarab Date: Sun, 27 Oct 2024 16:40:13 -0300 Subject: [PATCH 26/90] lib/storage/partition: prevent panic in case resulting in-memory part is empty after merge (#7329) It is possible for in-memory part to be empty if ingested samples are removed by retention filters. In this case, data will not be discarded due to retention before creating in memory part. After in-memory parts merge samples will be removed resulting in creating completely empty part at destination. This commit checks for resulting part and skips it, if it's empty. --------- Signed-off-by: Zakhar Bessarab --- docs/changelog/CHANGELOG.md | 1 + lib/storage/partition.go | 8 ++++++++ lib/storage/partition_test.go | 36 +++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 8b5b569bf..374a88eca 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -24,6 +24,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * BUGFIX: [dashboards](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards) for Single-node VictoriaMetrics, cluster: The free disk space calculation now will subtract the size of the `-storage.minFreeDiskSpaceBytes` flag to correctly display the remaining available space of Single-node VictoriaMetrics/vmstorage rather than the actual available disk space, as well as the full ETA. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7334) for the details. * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert): properly set `group_name` and `file` fields for recording rules in `/api/v1/rules`. +* BUGFIX: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): prevent panic when ingesting samples which are outisde of configured [retention filters](https://docs.victoriametrics.com/#retention-filters). This could happen when backfilling data with retention filters which exclude samples from the backfill range. * BUGFIX: [vmctl](https://docs.victoriametrics.com/vmctl/): fix issue with series matching for `vmctl vm-native` with `--vm-native-disable-per-metric-migration` flag enabled. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7309). ## [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0) diff --git a/lib/storage/partition.go b/lib/storage/partition.go index ab70c3791..3d9f01879 100644 --- a/lib/storage/partition.go +++ b/lib/storage/partition.go @@ -745,6 +745,9 @@ func (pt *partition) mustMergeInmemoryParts(pws []*partWrapper) []*partWrapper { }() pw := pt.mustMergeInmemoryPartsFinal(pwsChunk) + if pw == nil { + return + } pwsResultLock.Lock() pwsResult = append(pwsResult, pw) @@ -806,6 +809,11 @@ func (pt *partition) mustMergeInmemoryPartsFinal(pws []*partWrapper) *partWrappe } mpDst.ph = *ph + // resulting part is empty, no need to create a part wrapper + if ph.BlocksCount == 0 { + return nil + } + return newPartWrapperFromInmemoryPart(mpDst, flushToDiskDeadline) } diff --git a/lib/storage/partition_test.go b/lib/storage/partition_test.go index 2643347a5..ea234a50c 100644 --- a/lib/storage/partition_test.go +++ b/lib/storage/partition_test.go @@ -150,3 +150,39 @@ func newTestPartWrappersForSizes(sizes []uint64) []*partWrapper { } return pws } + +func TestMergeInMemoryPartsEmptyResult(t *testing.T) { + pt := &partition{} + s := newTestStorage() + s.retentionMsecs = 1000 + defer stopTestStorage(s) + pt.s = s + var pws []*partWrapper + + const ( + inMemoryPartsCount = 5 + rowsCount = 10 + ) + + for range inMemoryPartsCount { + rows := make([]rawRow, rowsCount) + for i := range rowsCount { + rows[i].TSID = TSID{ + MetricID: uint64(i), + } + rows[i].Value = float64(i) + rows[i].Timestamp = int64(i) + rows[i].PrecisionBits = 64 + } + + pws = append(pws, &partWrapper{ + mp: newTestInmemoryPart(rows), + p: &part{}, + }) + } + + pwsNew := pt.mustMergeInmemoryParts(pws) + if len(pwsNew) != 0 { + t.Fatalf("unexpected non-empty pwsNew: %d", len(pwsNew)) + } +} From 5d73b8b86646a5ded5a6880308b9f5893b133854 Mon Sep 17 00:00:00 2001 From: Fred Navruzov Date: Mon, 28 Oct 2024 16:25:24 +0100 Subject: [PATCH 27/90] docs/vmanomaly - release 1.18.0 (#7378) ### Describe Your Changes docs/vmanomaly - release 1.18.0 ### Checklist The following checks are **mandatory**: - [x] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --- .../vmanomaly-integration/docker-compose.yml | 2 +- docs/anomaly-detection/CHANGELOG.md | 11 ++++ docs/anomaly-detection/FAQ.md | 31 +++++++++- docs/anomaly-detection/Overview.md | 4 +- docs/anomaly-detection/QuickStart.md | 6 +- docs/anomaly-detection/components/models.md | 60 +++++++++++++------ docs/anomaly-detection/components/reader.md | 17 ++++++ .../guides/guide-vmanomaly-vmalert/README.md | 2 +- 8 files changed, 105 insertions(+), 28 deletions(-) diff --git a/deployment/docker/vmanomaly/vmanomaly-integration/docker-compose.yml b/deployment/docker/vmanomaly/vmanomaly-integration/docker-compose.yml index e073cc2d5..5d8189f1a 100644 --- a/deployment/docker/vmanomaly/vmanomaly-integration/docker-compose.yml +++ b/deployment/docker/vmanomaly/vmanomaly-integration/docker-compose.yml @@ -72,7 +72,7 @@ services: restart: always vmanomaly: container_name: vmanomaly - image: victoriametrics/vmanomaly:v1.17.2 + image: victoriametrics/vmanomaly:v1.18.0 depends_on: - "victoriametrics" ports: diff --git a/docs/anomaly-detection/CHANGELOG.md b/docs/anomaly-detection/CHANGELOG.md index dd01a1df4..76f335ccc 100644 --- a/docs/anomaly-detection/CHANGELOG.md +++ b/docs/anomaly-detection/CHANGELOG.md @@ -11,6 +11,17 @@ aliases: --- Please find the changelog for VictoriaMetrics Anomaly Detection below. +## v1.18.0 +Released: 2024-10-28 + +- FEATURE: Introduced timezone-aware support in `VmReader` for accurate seasonality modeling, especially during DST shifts. A new `tz` argument enables timezone offset management at both global and [query-specific levels](https://docs.victoriametrics.com/anomaly-detection/components/reader/#per-query-parameters). + - Enhanced [`ProphetModel`](https://docs.victoriametrics.com/anomaly-detection/components/models/#prophet) with a `tz_aware` argument (combined with `tz_seasonalities` and `tz_use_cyclical_encoding`) for timezone-aware timestamps. This addresses a [limitation in Prophet's native design](https://github.com/facebook/prophet/blob/dc1df4cb23a150e14858afb34c9442401c0eb2fc/python/prophet/forecaster.py#L288) that doesn't allow timezone-aware and DST-aware seasonality. + +- IMPROVEMENT: Enhanced error handling in [VmReader](https://docs.victoriametrics.com/anomaly-detection/components/reader/#vm-reader) to provide clearer diagnostics and broader coverage. + +- FIX: Updated `vmanomaly_version_info` and `vmanomaly_ui_version_info` gauges to correctly set the version label value based on image tags. +- FIX: The `n_samples_seen_` attribute now properly resets to 0 with each new `fit` call in [online model](https://docs.victoriametrics.com/anomaly-detection/components/models/#online-models) classes ([`OnlineMADModel`](https://docs.victoriametrics.com/anomaly-detection/components/models/#online-mad) and [`OnlineQuantileModel`](https://docs.victoriametrics.com/anomaly-detection/components/models/#online-seasonal-quantile)), ensuring accurate tracking of processed sample count. + ## v1.17.2 Released: 2024-10-22 diff --git a/docs/anomaly-detection/FAQ.md b/docs/anomaly-detection/FAQ.md index b80e5e281..03614fe1e 100644 --- a/docs/anomaly-detection/FAQ.md +++ b/docs/anomaly-detection/FAQ.md @@ -54,6 +54,33 @@ Respective config is defined in a [`reader`](https://docs.victoriametrics.com/an ## Handling noisy input data `vmanomaly` operates on data fetched from VictoriaMetrics using [MetricsQL](https://docs.victoriametrics.com/metricsql/) queries, so the initial data quality can be fine-tuned with aggregation, grouping, and filtering to reduce noise and improve anomaly detection accuracy. +## Handling timezones + +Starting from [v1.18.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1180), `vmanomaly` supports timezone-aware anomaly detection through a `tz` argument, available both globally (in the [`reader`](https://docs.victoriametrics.com/anomaly-detection/components/reader#vm-reader) section) and at the [query level](https://docs.victoriametrics.com/anomaly-detection/components/reader/#per-query-parameters). + +For models that depend on seasonality, such as [`ProphetModel`](https://docs.victoriametrics.com/anomaly-detection/components/models/#prophet) and [`OnlineQuantileModel`](https://docs.victoriametrics.com/anomaly-detection/components/models/#online-seasonal-quantile), handling timezone shifts is crucial. Changes like Daylight Saving Time (DST) can disrupt seasonality patterns learned by models, resulting in inaccurate anomaly predictions as the periodic patterns shift with time. Proper timezone configuration ensures that seasonal cycles align with expected intervals, even as DST changes occur. + +To enable timezone handling: +1. **Globally**: Set `tz` in the [`reader`](https://docs.victoriametrics.com/anomaly-detection/components/reader#vm-reader) section to a specific timezone (e.g., `Europe/Berlin`) to apply this setting to all queries. +2. **Per query**: Override the global setting by specifying `tz` at the individual [query level](https://docs.victoriametrics.com/anomaly-detection/components/reader/#per-query-parameters) for targeted adjustments. + +**Example:** + +```yaml +reader: + datasource_url: 'your_victoriametrics_url' + tz: 'America/New_York' # global setting for all queries + queries: + your_query: + expr: 'avg(your_metric)' + tz: 'Europe/London' # per-query override +models: + seasonal_model: + class: 'prophet' + queries: ['your_query'] + # other model params ... +``` + ## Output produced by vmanomaly `vmanomaly` models generate [metrics](https://docs.victoriametrics.com/anomaly-detection/components/models#vmanomaly-output) like `anomaly_score`, `yhat`, `yhat_lower`, `yhat_upper`, and `y`. These metrics provide a comprehensive view of the detected anomalies. The service also produces [health check metrics](https://docs.victoriametrics.com/anomaly-detection/components/monitoring#metrics-generated-by-vmanomaly) for monitoring its performance. @@ -132,7 +159,7 @@ services: # ... vmanomaly: container_name: vmanomaly - image: victoriametrics/vmanomaly:v1.17.2 + image: victoriametrics/vmanomaly:v1.18.0 # ... ports: - "8490:8490" @@ -230,7 +257,7 @@ P.s. `infer` data volume will remain the same for both models, so it does not af If you're dealing with a large query in the `queries` argument of [VmReader](https://docs.victoriametrics.com/anomaly-detection/components/reader/#vm-reader) (especially when running [within a scheduler using a long](https://docs.victoriametrics.com/anomaly-detection/components/scheduler/?highlight=fit_window#periodic-scheduler) `fit_window`), you may encounter issues such as query timeouts (due to the `search.maxQueryDuration` server limit) or rejections (if the `search.maxPointsPerTimeseries` server limit is exceeded). -We recommend upgrading to [v1.17.2](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1171), which introduced the `max_points_per_query` argument (both global and [query-specific](https://docs.victoriametrics.com/anomaly-detection/components/reader/#per-query-parameters)) for the [VmReader](https://docs.victoriametrics.com/anomaly-detection/components/reader/#vm-reader). This argument overrides how `search.maxPointsPerTimeseries` flag handling (introduced in [v1.14.1](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1141)) is used in `vmanomaly` for splitting long `fit_window` queries into smaller sub-intervals. This helps users avoid hitting the `search.maxQueryDuration` limit for individual queries by distributing initial query across multiple subquery requests with minimal overhead. +We recommend upgrading to [v1.17.2](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1171) (or newer), which introduced the `max_points_per_query` argument (both global and [query-specific](https://docs.victoriametrics.com/anomaly-detection/components/reader/#per-query-parameters)) for the [VmReader](https://docs.victoriametrics.com/anomaly-detection/components/reader/#vm-reader). This argument overrides how `search.maxPointsPerTimeseries` flag handling (introduced in [v1.14.1](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1141)) is used in `vmanomaly` for splitting long `fit_window` queries into smaller sub-intervals. This helps users avoid hitting the `search.maxQueryDuration` limit for individual queries by distributing initial query across multiple subquery requests with minimal overhead. By splitting long `fit_window` queries into smaller sub-intervals, this helps avoid hitting the `search.maxQueryDuration` limit, distributing the load across multiple subquery requests with minimal overhead. To resolve the issue, reduce `max_points_per_query` to a value lower than `search.maxPointsPerTimeseries` until the problem is gone: diff --git a/docs/anomaly-detection/Overview.md b/docs/anomaly-detection/Overview.md index 24477da3c..441aa60f3 100644 --- a/docs/anomaly-detection/Overview.md +++ b/docs/anomaly-detection/Overview.md @@ -229,7 +229,7 @@ This will expose metrics at `http://0.0.0.0:8080/metrics` page. To use *vmanomaly* you need to pull docker image: ```sh -docker pull victoriametrics/vmanomaly:v1.17.2 +docker pull victoriametrics/vmanomaly:v1.18.0 ``` > Note: please check what is latest release in [CHANGELOG](https://docs.victoriametrics.com/anomaly-detection/changelog/) @@ -239,7 +239,7 @@ docker pull victoriametrics/vmanomaly:v1.17.2 You can put a tag on it for your convenience: ```sh -docker image tag victoriametrics/vmanomaly:v1.17.2 vmanomaly +docker image tag victoriametrics/vmanomaly:v1.18.0 vmanomaly ``` Here is an example of how to run *vmanomaly* docker container with [license file](#licensing): diff --git a/docs/anomaly-detection/QuickStart.md b/docs/anomaly-detection/QuickStart.md index e82de0ad5..b9fcf78dd 100644 --- a/docs/anomaly-detection/QuickStart.md +++ b/docs/anomaly-detection/QuickStart.md @@ -58,13 +58,13 @@ Below are the steps to get `vmanomaly` up and running inside a Docker container: 1. Pull Docker image: ```sh -docker pull victoriametrics/vmanomaly:v1.17.2 +docker pull victoriametrics/vmanomaly:v1.18.0 ``` 2. (Optional step) tag the `vmanomaly` Docker image: ```sh -docker image tag victoriametrics/vmanomaly:v1.17.2 vmanomaly +docker image tag victoriametrics/vmanomaly:v1.18.0 vmanomaly ``` 3. Start the `vmanomaly` Docker container with a *license file*, use the command below. @@ -98,7 +98,7 @@ docker run -it --user 1000:1000 \ services: # ... vmanomaly: - image: victoriametrics/vmanomaly:v1.17.2 + image: victoriametrics/vmanomaly:v1.18.0 volumes: $YOUR_LICENSE_FILE_PATH:/license $YOUR_CONFIG_FILE_PATH:/config.yml diff --git a/docs/anomaly-detection/components/models.md b/docs/anomaly-detection/components/models.md index 85485b77e..4b6abb9e9 100644 --- a/docs/anomaly-detection/components/models.md +++ b/docs/anomaly-detection/components/models.md @@ -451,16 +451,20 @@ models: ### [Prophet](https://facebook.github.io/prophet/) -Here we utilize the Facebook Prophet implementation, as detailed in their [library documentation](https://facebook.github.io/prophet/docs/quick_start.html#python-api). All parameters from this library are compatible and can be passed to the model. +`vmanomaly` uses the Facebook Prophet implementation for time series forecasting, with detailed usage provided in the [Prophet library documentation](https://facebook.github.io/prophet/docs/quick_start.html#python-api). All Prophet parameters are supported and can be directly passed to the model via `args` argument. -> **Note**: `ProphetModel` is [univariate](#univariate-models), [non-rolling](#non-rolling-models), [offline](#offline-models) model. + +> **Note**: `ProphetModel` is a [univariate](#univariate-models), [non-rolling](#non-rolling-models), [offline](#offline-models) model. *Parameters specific for vmanomaly*: * `class` (string) - model class name `"model.prophet.ProphetModel"` (or `prophet` starting from [v1.13.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#1130) with class alias support) -* `seasonalities` (list[dict], optional) - Extra seasonalities to pass to Prophet. See [`add_seasonality()`](https://facebook.github.io/prophet/docs/seasonality,_holiday_effects,_and_regressors.html#modeling-holidays-and-special-events:~:text=modeling%20the%20cycle-,Specifying,-Custom%20Seasonalities) Prophet param. +* `seasonalities` (list[dict], optional): Additional seasonal components to include in Prophet. See Prophet’s [`add_seasonality()`](https://facebook.github.io/prophet/docs/seasonality,_holiday_effects,_and_regressors.html#modeling-holidays-and-special-events:~:text=modeling%20the%20cycle-,Specifying,-Custom%20Seasonalities) documentation for details. +- `tz_aware` (bool): (Available since [v1.18.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1180)) Enables handling of timezone-aware timestamps. Default is `False`. Should be used with `tz_seasonalities` and `tz_use_cyclical_encoding` parameters. +- `tz_seasonalities` (list[str]): (Available since [v1.18.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1180)) Specifies timezone-aware seasonal components. Requires `tz_aware=True`. Supported options include `minute`, `hod` (hour of the day), `dow` (day of the week), and `month` (month of the year). +- `tz_use_cyclical_encoding` (bool): (Available since [v1.18.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1180)) If set to `True`, applies [cyclical encoding technique](https://www.kaggle.com/code/avanwyk/encoding-cyclical-features-for-deep-learning) to timezone-aware seasonalities. Should be used with `tz_aware=True` and `tz_seasonalities`. -**Note**: Apart from standard `vmanomaly` output, Prophet model can provide [additional metrics](#additional-output-metrics-produced-by-fb-prophet). +> **Note**: Apart from standard [`vmanomaly` output](#vmanomaly-output), Prophet model can provide additional metrics. **Additional output metrics produced by FB Prophet** Depending on chosen `seasonality` parameter FB Prophet can return additional metrics such as: @@ -474,6 +478,8 @@ Depending on chosen `seasonality` parameter FB Prophet can return additional met *Config Example* +Timezone-unaware example: + ```yaml models: your_desired_alias_for_a_model: @@ -483,11 +489,27 @@ models: - name: 'hourly' period: 0.04166666666 fourier_order: 30 - # Inner model args (key-value pairs) accepted by + # inner model args (key-value pairs) accepted by # https://facebook.github.io/prophet/docs/quick_start.html#python-api args: - # See https://facebook.github.io/prophet/docs/uncertainty_intervals.html - interval_width: 0.98 + interval_width: 0.98 # see https://facebook.github.io/prophet/docs/uncertainty_intervals.html + country_holidays: 'US' +``` + +Timezone-aware example: + +```yaml +models: + your_desired_alias_for_a_model: + class: 'prophet' # or 'model.prophet.ProphetModel' until v1.13.0 + provide_series: ['anomaly_score', 'yhat', 'yhat_lower', 'yhat_upper', 'trend'] + tz_aware: True + tz_seasonalities: ['hod', 'dow'] # intra-day + intra-week seasonality, no intra-year / sub-hour seasonality + tz_use_cyclical_encoding: False + # inner model args (key-value pairs) accepted by + # https://facebook.github.io/prophet/docs/quick_start.html#python-api + args: + interval_width: 0.98 # see https://facebook.github.io/prophet/docs/uncertainty_intervals.html country_holidays: 'US' ``` @@ -496,7 +518,7 @@ Resulting metrics of the model are described [here](#vmanomaly-output) ### [Z-score](https://en.wikipedia.org/wiki/Standard_score) -> **Note**: `ZScoreModel` is [univariate](#univariate-models), [non-rolling](#non-rolling-models), [offline](#offline-models) model. +> **Note**: `ZScoreModel` is a [univariate](#univariate-models), [non-rolling](#non-rolling-models), [offline](#offline-models) model. Model is useful for initial testing and for simpler data ([de-trended](https://victoriametrics.com/blog/victoriametrics-anomaly-detection-handbook-chapter-1/#trend) data without strict [seasonality](https://victoriametrics.com/blog/victoriametrics-anomaly-detection-handbook-chapter-1/#seasonality) and with anomalies of similar magnitude as your "normal" data). @@ -518,7 +540,7 @@ Resulting metrics of the model are described [here](#vmanomaly-output). ### Online Z-score -> **Note**: `OnlineZScoreModel` is [univariate](#univariate-models), [non-rolling](#non-rolling-models), [online](#online-models) model. +> **Note**: `OnlineZScoreModel` is a [univariate](#univariate-models), [non-rolling](#non-rolling-models), [online](#online-models) model. Online version of existing [Z-score](#z-score) implementation with the same exact behavior and implications. Introduced in [v1.15.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1150) @@ -544,7 +566,7 @@ Resulting metrics of the model are described [here](#vmanomaly-output). ### [Holt-Winters](https://en.wikipedia.org/wiki/Exponential_smoothing) -> **Note**: `HoltWinters` is [univariate](#univariate-models), [non-rolling](#non-rolling-models), [offline](#offline-models) model. +> **Note**: `HoltWinters` is a [univariate](#univariate-models), [non-rolling](#non-rolling-models), [offline](#offline-models) model. Here we use Holt-Winters Exponential Smoothing implementation from `statsmodels` [library](https://www.statsmodels.org/dev/generated/statsmodels.tsa.holtwinters.ExponentialSmoothing.html). All parameters from this library can be passed to the model. @@ -590,7 +612,7 @@ Resulting metrics of the model are described [here](#vmanomaly-output). ### [MAD (Median Absolute Deviation)](https://en.wikipedia.org/wiki/Median_absolute_deviation) -> **Note**: `MADModel` is [univariate](#univariate-models), [non-rolling](#non-rolling-models), [offline](#offline-models) model. +> **Note**: `MADModel` is a [univariate](#univariate-models), [non-rolling](#non-rolling-models), [offline](#offline-models) model. The MAD model is a robust method for anomaly detection that is *less sensitive* to outliers in data compared to standard deviation-based models. It considers a point as an anomaly if the absolute deviation from the median is significantly large. @@ -614,7 +636,7 @@ Resulting metrics of the model are described [here](#vmanomaly-output). ### Online MAD -> **Note**: `OnlineMADModel` is [univariate](#univariate-models), [non-rolling](#non-rolling-models), [online](#online-models) model. +> **Note**: `OnlineMADModel` is a [univariate](#univariate-models), [non-rolling](#non-rolling-models), [online](#online-models) model. The MAD model is a robust method for anomaly detection that is *less sensitive* to outliers in data compared to standard deviation-based models. It considers a point as an anomaly if the absolute deviation from the median is significantly large. This is the online approximate version, based on [t-digests](https://www.sciencedirect.com/science/article/pii/S2665963820300403) for online quantile estimation. introduced in [v1.15.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1150) @@ -643,7 +665,7 @@ Resulting metrics of the model are described [here](#vmanomaly-output). ### [Rolling Quantile](https://en.wikipedia.org/wiki/Quantile) -> **Note**: `RollingQuantileModel` is [univariate](#univariate-models), [rolling](#rolling-models), [offline](#offline-models) model. +> **Note**: `RollingQuantileModel` is a [univariate](#univariate-models), [rolling](#rolling-models), [offline](#offline-models) model. This model is best used on **data with short evolving patterns** (i.e. 10-100 datapoints of particular frequency), as it adapts to changes over a rolling window. @@ -668,7 +690,7 @@ Resulting metrics of the model are described [here](#vmanomaly-output). ### Online Seasonal Quantile -> **Note**: `OnlineQuantileModel` is [univariate](#univariate-models), [non-rolling](#non-rolling-models), [online](#online-models) model. +> **Note**: `OnlineQuantileModel` is a [univariate](#univariate-models), [non-rolling](#non-rolling-models), [online](#online-models) model. Online (seasonal) quantile utilizes a set of approximate distributions, based on [t-digests](https://www.sciencedirect.com/science/article/pii/S2665963820300403) for online quantile estimation. Introduced in [v1.15.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1150). @@ -712,7 +734,7 @@ Resulting metrics of the model are described [here](#vmanomaly-output). ### [Seasonal Trend Decomposition](https://en.wikipedia.org/wiki/Seasonal_adjustment) -> **Note**: `StdModel` is [univariate](#univariate-models), [rolling](#rolling-models), [offline](#offline-models) model. +> **Note**: `StdModel` is a [univariate](#univariate-models), [rolling](#rolling-models), [offline](#offline-models) model. Here we use Seasonal Decompose implementation from `statsmodels` [library](https://www.statsmodels.org/dev/generated/statsmodels.tsa.seasonal.seasonal_decompose.html). Parameters from this library can be passed to the model. Some parameters are specifically predefined in `vmanomaly` and can't be changed by user(`model`='additive', `two_sided`=False). @@ -744,9 +766,9 @@ Resulting metrics of the model are described [here](#vmanomaly-output). ### [Isolation forest](https://en.wikipedia.org/wiki/Isolation_forest) (Multivariate) -> **Note**: `IsolationForestModel` is [univariate](#univariate-models), [non-rolling](#non-rolling-models), [offline](#offline-models) model. +> **Note**: `IsolationForestModel` is a [univariate](#univariate-models), [non-rolling](#non-rolling-models), [offline](#offline-models) model. -> **Note**: `IsolationForestMultivariateModel` is [multivariate](#multivariate-models), [non-rolling](#non-rolling-models), [offline](#offline-models) model. +> **Note**: `IsolationForestMultivariateModel` is a [multivariate](#multivariate-models), [non-rolling](#non-rolling-models), [offline](#offline-models) model. Detects anomalies using binary trees. The algorithm has a linear time complexity and a low memory requirement, which works well with high-volume data. It can be used on both univariate and multivariate data, but it is more effective in multivariate case. @@ -962,7 +984,7 @@ monitoring: Let's pull the docker image for `vmanomaly`: ```sh -docker pull victoriametrics/vmanomaly:v1.17.2 +docker pull victoriametrics/vmanomaly:v1.18.0 ``` Now we can run the docker container putting as volumes both config and model file: @@ -976,7 +998,7 @@ docker run -it \ -v $(PWD)/license:/license \ -v $(PWD)/custom_model.py:/vmanomaly/model/custom.py \ -v $(PWD)/custom.yaml:/config.yaml \ -victoriametrics/vmanomaly:v1.17.2 /config.yaml \ +victoriametrics/vmanomaly:v1.18.0 /config.yaml \ --licenseFile=/license ``` diff --git a/docs/anomaly-detection/components/reader.md b/docs/anomaly-detection/components/reader.md index 6288efd81..ffb3a2b02 100644 --- a/docs/anomaly-detection/components/reader.md +++ b/docs/anomaly-detection/components/reader.md @@ -48,6 +48,7 @@ reader: expr: 'avg(vm_blocks)' # initial MetricsQL expression step: '10s' # individual step for this query, will be filled with `sampling_period` from the root level data_range: ['-inf', 'inf'] # by default, no constraints applied on data range + tz: 'UTC' # by default, tz-free data is used throughout the model lifecycle # new query-level arguments will be added in backward-compatible way in future releases ``` @@ -69,6 +70,8 @@ Starting from [v1.13.0](https://docs.victoriametrics.com/anomaly-detection/chang - `max_points_per_query` (int): Introduced in [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170), optional arg overrides how `search.maxPointsPerTimeseries` flag (available since [v1.14.1](#v1141)) impacts `vmanomaly` on splitting long `fit_window` [queries](https://docs.victoriametrics.com/anomaly-detection/components/reader/?highlight=queries#vm-reader) into smaller sub-intervals. This helps users avoid hitting the `search.maxQueryDuration` limit for individual queries by distributing initial query across multiple subquery requests with minimal overhead. Set less than `search.maxPointsPerTimeseries` if hitting `maxQueryDuration` limits. If set on a query-level, it overrides the global `max_points_per_query` (reader-level). +- `tz` (string): Introduced in [v1.18.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1180), this optional argument enables timezone specification per query, overriding the reader’s default `tz`. This setting helps to account for local timezone shifts, such as [DST](https://en.wikipedia.org/wiki/Daylight_saving_time), in models that are sensitive to seasonal variations (e.g., [`ProphetModel`](https://docs.victoriametrics.com/anomaly-detection/components/models/#prophet) or [`OnlineQuantileModel`](https://docs.victoriametrics.com/anomaly-detection/components/models/#online-seasonal-quantile)). + ### Per-query config example ```yaml @@ -83,6 +86,7 @@ reader: step: '2m' # overrides global `sampling_period` of 1m data_range: [10, 'inf'] # meaning only positive values > 10 are expected, i.e. a value `y` < 10 will trigger anomaly score > 1 max_points_per_query: 5000 # overrides reader-level value of 10000 for `ingestion_rate` query + tz: 'America/New_York' # to override reader-wise `tz` ``` ### Config parameters @@ -308,6 +312,17 @@ Introduced in [v1.15.1](https://docs.victoriametrics.com/anomaly-detection/chang Introduced in [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170), optional arg overrides how `search.maxPointsPerTimeseries` flag (available since [v1.14.1](#v1141)) impacts `vmanomaly` on splitting long `fit_window` [queries](https://docs.victoriametrics.com/anomaly-detection/components/reader/?highlight=queries#vm-reader) into smaller sub-intervals. This helps users avoid hitting the `search.maxQueryDuration` limit for individual queries by distributing initial query across multiple subquery requests with minimal overhead. Set less than `search.maxPointsPerTimeseries` if hitting `maxQueryDuration` limits. You can also set it on [per-query](#per-query-parameters) basis to override this global one. + + +`tz` + + +`UTC` + + +Introduced in [v1.18.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1180), this optional argument specifies the [IANA](https://nodatime.org/TimeZones) timezone to account for local shifts, like [DST](https://en.wikipedia.org/wiki/Daylight_saving_time), in models sensitive to seasonal patterns (e.g., [`ProphetModel`](https://docs.victoriametrics.com/anomaly-detection/components/models/#prophet) or [`OnlineQuantileModel`](https://docs.victoriametrics.com/anomaly-detection/components/models/#online-seasonal-quantile)). Defaults to `UTC` if not set and can be overridden on a [per-query basis](#per-query-parameters). + + @@ -318,11 +333,13 @@ reader: class: "vm" # or "reader.vm.VmReader" until v1.13.0 datasource_url: "https://play.victoriametrics.com/" tenant_id: "0:0" + tz: 'America/New_York' queries: ingestion_rate: expr: 'sum(rate(vm_rows_inserted_total[5m])) by (type) > 0' step: '1m' # can override global `sampling_period` on per-query level data_range: [0, 'inf'] + tz: 'Australia/Sydney' # if set, overrides reader-wise tz sampling_period: '1m' query_from_last_seen_timestamp: True # false by default latency_offset: '1ms' diff --git a/docs/anomaly-detection/guides/guide-vmanomaly-vmalert/README.md b/docs/anomaly-detection/guides/guide-vmanomaly-vmalert/README.md index 610abd511..36f3ed8a7 100644 --- a/docs/anomaly-detection/guides/guide-vmanomaly-vmalert/README.md +++ b/docs/anomaly-detection/guides/guide-vmanomaly-vmalert/README.md @@ -385,7 +385,7 @@ services: restart: always vmanomaly: container_name: vmanomaly - image: victoriametrics/vmanomaly:v1.17.2 + image: victoriametrics/vmanomaly:v1.18.0 depends_on: - "victoriametrics" ports: From 68bad22fd26d1436ad0236b1f3ced8604c5d851c Mon Sep 17 00:00:00 2001 From: Hui Wang Date: Tue, 29 Oct 2024 23:30:39 +0800 Subject: [PATCH 28/90] vmalert: integrate with victorialogs (#7255) address https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6706. See https://github.com/VictoriaMetrics/VictoriaMetrics/blob/vmalert-support-vlog-ds/docs/VictoriaLogs/vmalert.md. Related fix https://github.com/VictoriaMetrics/VictoriaMetrics/pull/7254. Note: in this pull request, vmalert doesn't support [backfilling](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/vmalert-support-vlog-ds/docs/VictoriaLogs/vmalert.md#rules-backfilling) for rules with a customized time filter. It might be added in the future, see [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7289) for details. Feature can be tested with image `victoriametrics/vmalert:heads-vmalert-support-vlog-ds-0-g420629c-scratch`. --------- Signed-off-by: hagen1778 Co-authored-by: hagen1778 --- app/vmalert/config/config.go | 9 +- app/vmalert/config/config_test.go | 38 +- .../testdata/rules/vlog-rules0-bad.rules | 10 + .../testdata/rules/vlog-rules0-good.rules | 29 + app/vmalert/config/types.go | 19 +- app/vmalert/datasource/client.go | 333 +++++++++ ...{vm_graphite_api.go => client_graphite.go} | 2 +- .../{vm_prom_api.go => client_prom.go} | 26 +- .../datasource/{vm_test.go => client_test.go} | 305 ++++++-- app/vmalert/datasource/client_vlogs.go | 61 ++ app/vmalert/datasource/datasource.go | 14 +- app/vmalert/datasource/init.go | 3 +- app/vmalert/datasource/vm.go | 272 ------- app/vmalert/main.go | 2 +- app/vmalert/remoteread/init.go | 2 +- app/vmalert/rule/alerting.go | 11 +- app/vmalert/rule/group.go | 1 - app/vmalert/rule/recording.go | 19 +- app/vmalert/rule/recording_test.go | 22 + deployment/docker/README.md | 14 +- deployment/docker/auth-mixed-datasource.yml | 9 + deployment/docker/docker-compose-cluster.yml | 8 +- .../docker/docker-compose-victorialogs.yml | 41 +- deployment/docker/docker-compose.yml | 8 +- .../docker/{ => rules}/alerts-cluster.yml | 0 .../docker/{ => rules}/alerts-health.yml | 0 .../docker/{ => rules}/alerts-vmagent.yml | 0 .../docker/{ => rules}/alerts-vmalert.yml | 0 .../docker/{ => rules}/alerts-vmauth.yml | 0 deployment/docker/{ => rules}/alerts.yml | 0 .../docker/rules/vlogs-example-alerts.yml | 13 + docs/VictoriaLogs/vmalert.md | 207 ++++++ .../vmalert_victorialogs.excalidraw | 687 ++++++++++++++++++ docs/VictoriaLogs/vmalert_victorialogs.webp | Bin 0 -> 41810 bytes docs/changelog/CHANGELOG.md | 1 + docs/vmalert.md | 19 +- docs/vmauth.md | 2 +- lib/logstorage/parser.go | 32 + lib/logstorage/parser_test.go | 25 + 39 files changed, 1819 insertions(+), 425 deletions(-) create mode 100644 app/vmalert/config/testdata/rules/vlog-rules0-bad.rules create mode 100644 app/vmalert/config/testdata/rules/vlog-rules0-good.rules create mode 100644 app/vmalert/datasource/client.go rename app/vmalert/datasource/{vm_graphite_api.go => client_graphite.go} (95%) rename app/vmalert/datasource/{vm_prom_api.go => client_prom.go} (92%) rename app/vmalert/datasource/{vm_test.go => client_test.go} (64%) create mode 100644 app/vmalert/datasource/client_vlogs.go delete mode 100644 app/vmalert/datasource/vm.go create mode 100644 deployment/docker/auth-mixed-datasource.yml rename deployment/docker/{ => rules}/alerts-cluster.yml (100%) rename deployment/docker/{ => rules}/alerts-health.yml (100%) rename deployment/docker/{ => rules}/alerts-vmagent.yml (100%) rename deployment/docker/{ => rules}/alerts-vmalert.yml (100%) rename deployment/docker/{ => rules}/alerts-vmauth.yml (100%) rename deployment/docker/{ => rules}/alerts.yml (100%) create mode 100644 deployment/docker/rules/vlogs-example-alerts.yml create mode 100644 docs/VictoriaLogs/vmalert.md create mode 100644 docs/VictoriaLogs/vmalert_victorialogs.excalidraw create mode 100644 docs/VictoriaLogs/vmalert_victorialogs.webp diff --git a/app/vmalert/config/config.go b/app/vmalert/config/config.go index 31e16a115..353424b75 100644 --- a/app/vmalert/config/config.go +++ b/app/vmalert/config/config.go @@ -3,6 +3,7 @@ package config import ( "bytes" "crypto/md5" + "flag" "fmt" "hash/fnv" "io" @@ -17,6 +18,10 @@ import ( "gopkg.in/yaml.v2" ) +var ( + defaultRuleType = flag.String("rule.defaultRuleType", "prometheus", `Default type for rule expressions, can be overridden via "type" parameter on the group level, see https://docs.victoriametrics.com/vmalert/#groups. Supported values: "graphite", "prometheus" and "vlogs".`) +) + // Group contains list of Rules grouped into // entity with one name and evaluation interval type Group struct { @@ -59,11 +64,9 @@ func (g *Group) UnmarshalYAML(unmarshal func(any) error) error { if err != nil { return fmt.Errorf("failed to marshal group configuration for checksum: %w", err) } - // change default value to prometheus datasource. if g.Type.Get() == "" { - g.Type.Set(NewPrometheusType()) + g.Type = NewRawType(*defaultRuleType) } - h := md5.New() h.Write(b) g.Checksum = fmt.Sprintf("%x", h.Sum(nil)) diff --git a/app/vmalert/config/config_test.go b/app/vmalert/config/config_test.go index 1aa06d582..85207d53a 100644 --- a/app/vmalert/config/config_test.go +++ b/app/vmalert/config/config_test.go @@ -122,6 +122,7 @@ func TestParse_Failure(t *testing.T) { f([]string{"testdata/dir/rules3-bad.rules"}, "either `record` or `alert` must be set") f([]string{"testdata/dir/rules4-bad.rules"}, "either `record` or `alert` must be set") f([]string{"testdata/rules/rules1-bad.rules"}, "bad graphite expr") + f([]string{"testdata/rules/vlog-rules0-bad.rules"}, "bad LogsQL expr") f([]string{"testdata/dir/rules6-bad.rules"}, "missing ':' in header") f([]string{"testdata/rules/rules-multi-doc-bad.rules"}, "unknown fields") f([]string{"testdata/rules/rules-multi-doc-duplicates-bad.rules"}, "duplicate") @@ -240,7 +241,7 @@ func TestGroupValidate_Failure(t *testing.T) { }, false, "duplicate") f(&Group{ - Name: "test graphite prometheus bad expr", + Name: "test graphite with prometheus expr", Type: NewGraphiteType(), Rules: []Rule{ { @@ -267,6 +268,20 @@ func TestGroupValidate_Failure(t *testing.T) { }, }, false, "either `record` or `alert` must be set") + f(&Group{ + Name: "test vlogs with prometheus expr", + Type: NewVLogsType(), + Rules: []Rule{ + { + Expr: "sum(up == 0 ) by (host)", + For: promutils.NewDuration(10 * time.Millisecond), + }, + { + Expr: "sumSeries(time('foo.bar',10))", + }, + }, + }, false, "invalid rule") + // validate expressions f(&Group{ Name: "test", @@ -297,6 +312,16 @@ func TestGroupValidate_Failure(t *testing.T) { }}, }, }, true, "bad graphite expr") + + f(&Group{ + Name: "test vlogs", + Type: NewVLogsType(), + Rules: []Rule{ + {Alert: "alert", Expr: "stats count(*) as requests", Labels: map[string]string{ + "description": "some-description", + }}, + }, + }, true, "bad LogsQL expr") } func TestGroupValidate_Success(t *testing.T) { @@ -336,7 +361,7 @@ func TestGroupValidate_Success(t *testing.T) { }, }, false, false) - // validate annotiations + // validate annotations f(&Group{ Name: "test", Rules: []Rule{ @@ -363,6 +388,15 @@ func TestGroupValidate_Success(t *testing.T) { }}, }, }, false, true) + f(&Group{ + Name: "test victorialogs", + Type: NewVLogsType(), + Rules: []Rule{ + {Alert: "alert", Expr: " _time: 1m | stats count(*) as requests", Labels: map[string]string{ + "description": "{{ value|query }}", + }}, + }, + }, false, true) } func TestHashRule_NotEqual(t *testing.T) { diff --git a/app/vmalert/config/testdata/rules/vlog-rules0-bad.rules b/app/vmalert/config/testdata/rules/vlog-rules0-bad.rules new file mode 100644 index 000000000..91c248ae7 --- /dev/null +++ b/app/vmalert/config/testdata/rules/vlog-rules0-bad.rules @@ -0,0 +1,10 @@ +groups: + - name: InvalidStatsLogsql + type: vlogs + interval: 5m + rules: + - record: MissingFilter + expr: 'stats count(*) as requests' + - record: MissingStatsPipe + expr: 'service: "nginx"' + diff --git a/app/vmalert/config/testdata/rules/vlog-rules0-good.rules b/app/vmalert/config/testdata/rules/vlog-rules0-good.rules new file mode 100644 index 000000000..a41e44de1 --- /dev/null +++ b/app/vmalert/config/testdata/rules/vlog-rules0-good.rules @@ -0,0 +1,29 @@ +groups: + - name: RequestCount + type: vlogs + interval: 5m + rules: + - record: nginxRequestCount + expr: 'env: "test" AND service: "nginx" | stats count(*) as requests' + annotations: + description: "Service nginx on env test accepted {{$labels.requests}} requests in the last 5 minutes" + - record: prodRequestCount + expr: 'env: "prod" | stats by (service) count(*) as requests' + annotations: + description: "Service {{$labels.service}} on env prod accepted {{$labels.requests}} requests in the last 5 minutes" + - name: ServiceLog + type: vlogs + interval: 5m + rules: + - alert: HasErrorLog + expr: 'env: "prod" AND status:~"error|warn" | stats by (service) count(*) as errorLog | filter errorLog:>0' + annotations: + description: "Service {{$labels.service}} generated {{$labels.errorLog}} error logs in the last 5 minutes" + - name: ServiceRequest + type: vlogs + interval: 10m + rules: + - alert: TooManyFailedRequest + expr: '* | extract "ip= " | extract "status_code=;" | stats by (ip) count() if (code:!~200) as failed, count() as total| math failed / total as failed_percentage| filter failed_percentage :> 0.01 | fields ip,failed_percentage' + annotations: + description: "Connection from address {{$labels.ip}} has {{$value}} failed requests ratio in last 10 minutes" diff --git a/app/vmalert/config/types.go b/app/vmalert/config/types.go index cf16d0d8b..b71325ec3 100644 --- a/app/vmalert/config/types.go +++ b/app/vmalert/config/types.go @@ -5,6 +5,7 @@ import ( "strings" "github.com/VictoriaMetrics/VictoriaMetrics/app/vmselect/graphiteql" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/logstorage" "github.com/VictoriaMetrics/metricsql" ) @@ -27,6 +28,13 @@ func NewGraphiteType() Type { } } +// NewVLogsType returns victorialogs datasource type +func NewVLogsType() Type { + return Type{ + Name: "vlogs", + } +} + // NewRawType returns datasource type from raw string // without validation. func NewRawType(d string) Type { @@ -62,6 +70,10 @@ func (t *Type) ValidateExpr(expr string) error { if _, err := metricsql.Parse(expr); err != nil { return fmt.Errorf("bad prometheus expr: %q, err: %w", expr, err) } + case "vlogs": + if _, err := logstorage.ParseStatsQuery(expr); err != nil { + return fmt.Errorf("bad LogsQL expr: %q, err: %w", expr, err) + } default: return fmt.Errorf("unknown datasource type=%q", t.Name) } @@ -74,13 +86,10 @@ func (t *Type) UnmarshalYAML(unmarshal func(any) error) error { if err := unmarshal(&s); err != nil { return err } - if s == "" { - s = "prometheus" - } switch s { - case "graphite", "prometheus": + case "graphite", "prometheus", "vlogs": default: - return fmt.Errorf("unknown datasource type=%q, want %q or %q", s, "prometheus", "graphite") + return fmt.Errorf("unknown datasource type=%q, want prometheus, graphite or vlogs", s) } t.Name = s return nil diff --git a/app/vmalert/datasource/client.go b/app/vmalert/datasource/client.go new file mode 100644 index 000000000..4fa884824 --- /dev/null +++ b/app/vmalert/datasource/client.go @@ -0,0 +1,333 @@ +package datasource + +import ( + "context" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strings" + "time" + + "github.com/VictoriaMetrics/VictoriaMetrics/lib/logger" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/netutil" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/promauth" +) + +type datasourceType string + +const ( + datasourcePrometheus datasourceType = "prometheus" + datasourceGraphite datasourceType = "graphite" + datasourceVLogs datasourceType = "vlogs" +) + +func toDatasourceType(s string) datasourceType { + switch s { + case string(datasourcePrometheus): + return datasourcePrometheus + case string(datasourceGraphite): + return datasourceGraphite + case string(datasourceVLogs): + return datasourceVLogs + default: + logger.Panicf("BUG: unknown datasource type %q", s) + } + return "" +} + +// Client is a datasource entity for reading data, +// supported clients are enumerated in datasourceType. +// WARN: when adding a new field, remember to check if Clone() method needs to be updated. +type Client struct { + c *http.Client + authCfg *promauth.Config + datasourceURL string + appendTypePrefix bool + queryStep time.Duration + dataSourceType datasourceType + // ApplyIntervalAsTimeFilter is only valid for vlogs datasource. + // Set to true if there is no [timeFilter](https://docs.victoriametrics.com/victorialogs/logsql/#time-filter) in the rule expression, + // and we will add evaluation interval as an additional timeFilter when querying. + applyIntervalAsTimeFilter bool + + // evaluationInterval will help setting request's `step` param, + // or adding time filter for LogsQL expression. + evaluationInterval time.Duration + // extraParams contains params to be attached to each HTTP request + extraParams url.Values + // extraHeaders are headers to be attached to each HTTP request + extraHeaders []keyValue + + // whether to print additional log messages + // for each sent request + debug bool +} + +type keyValue struct { + key string + value string +} + +// Clone clones shared http client and other configuration to the new client. +func (c *Client) Clone() *Client { + ns := &Client{ + c: c.c, + authCfg: c.authCfg, + datasourceURL: c.datasourceURL, + appendTypePrefix: c.appendTypePrefix, + queryStep: c.queryStep, + + dataSourceType: c.dataSourceType, + evaluationInterval: c.evaluationInterval, + + // init map so it can be populated below + extraParams: url.Values{}, + + debug: c.debug, + } + if len(c.extraHeaders) > 0 { + ns.extraHeaders = make([]keyValue, len(c.extraHeaders)) + copy(ns.extraHeaders, c.extraHeaders) + } + for k, v := range c.extraParams { + ns.extraParams[k] = v + } + + return ns +} + +// ApplyParams - changes given querier params. +func (c *Client) ApplyParams(params QuerierParams) *Client { + if params.DataSourceType != "" { + c.dataSourceType = toDatasourceType(params.DataSourceType) + } + c.evaluationInterval = params.EvaluationInterval + c.applyIntervalAsTimeFilter = params.ApplyIntervalAsTimeFilter + if params.QueryParams != nil { + if c.extraParams == nil { + c.extraParams = url.Values{} + } + for k, vl := range params.QueryParams { + // custom query params are prior to default ones + if c.extraParams.Has(k) { + c.extraParams.Del(k) + } + for _, v := range vl { + // don't use .Set() instead of Del/Add since it is allowed + // for GET params to be duplicated + // see https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4908 + c.extraParams.Add(k, v) + } + } + } + if params.Headers != nil { + for key, value := range params.Headers { + kv := keyValue{key: key, value: value} + c.extraHeaders = append(c.extraHeaders, kv) + } + } + c.debug = params.Debug + return c +} + +// BuildWithParams - implements interface. +func (c *Client) BuildWithParams(params QuerierParams) Querier { + return c.Clone().ApplyParams(params) +} + +// NewPrometheusClient returns a new prometheus datasource client. +func NewPrometheusClient(baseURL string, authCfg *promauth.Config, appendTypePrefix bool, c *http.Client) *Client { + return &Client{ + c: c, + authCfg: authCfg, + datasourceURL: strings.TrimSuffix(baseURL, "/"), + appendTypePrefix: appendTypePrefix, + queryStep: *queryStep, + dataSourceType: datasourcePrometheus, + extraParams: url.Values{}, + } +} + +// Query executes the given query and returns parsed response +func (c *Client) Query(ctx context.Context, query string, ts time.Time) (Result, *http.Request, error) { + req, err := c.newQueryRequest(ctx, query, ts) + if err != nil { + return Result{}, nil, err + } + resp, err := c.do(req) + if err != nil { + if !errors.Is(err, io.EOF) && !errors.Is(err, io.ErrUnexpectedEOF) && !netutil.IsTrivialNetworkError(err) { + // Return unexpected error to the caller. + return Result{}, nil, err + } + // Something in the middle between client and datasource might be closing + // the connection. So we do a one more attempt in hope request will succeed. + req, err = c.newQueryRequest(ctx, query, ts) + if err != nil { + return Result{}, nil, fmt.Errorf("second attempt: %w", err) + } + resp, err = c.do(req) + if err != nil { + return Result{}, nil, fmt.Errorf("second attempt: %w", err) + } + } + + // Process the received response. + var parseFn func(req *http.Request, resp *http.Response) (Result, error) + switch c.dataSourceType { + case datasourcePrometheus: + parseFn = parsePrometheusResponse + case datasourceGraphite: + parseFn = parseGraphiteResponse + case datasourceVLogs: + parseFn = parseVLogsResponse + default: + logger.Panicf("BUG: unsupported datasource type %q to parse query response", c.dataSourceType) + } + result, err := parseFn(req, resp) + _ = resp.Body.Close() + return result, req, err +} + +// QueryRange executes the given query on the given time range. +// For Prometheus type see https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries +// Graphite type isn't supported. +func (c *Client) QueryRange(ctx context.Context, query string, start, end time.Time) (res Result, err error) { + if c.dataSourceType == datasourceGraphite { + return res, fmt.Errorf("%q is not supported for QueryRange", c.dataSourceType) + } + // TODO: disable range query LogsQL with time filter now + if c.dataSourceType == datasourceVLogs && !c.applyIntervalAsTimeFilter { + return res, fmt.Errorf("range query is not supported for LogsQL expression %q because it contains time filter. Remove time filter from the expression and try again", query) + } + if start.IsZero() { + return res, fmt.Errorf("start param is missing") + } + if end.IsZero() { + return res, fmt.Errorf("end param is missing") + } + req, err := c.newQueryRangeRequest(ctx, query, start, end) + if err != nil { + return res, err + } + resp, err := c.do(req) + if err != nil { + if !errors.Is(err, io.EOF) && !errors.Is(err, io.ErrUnexpectedEOF) && !netutil.IsTrivialNetworkError(err) { + // Return unexpected error to the caller. + return res, err + } + // Something in the middle between client and datasource might be closing + // the connection. So we do a one more attempt in hope request will succeed. + req, err = c.newQueryRangeRequest(ctx, query, start, end) + if err != nil { + return res, fmt.Errorf("second attempt: %w", err) + } + resp, err = c.do(req) + if err != nil { + return res, fmt.Errorf("second attempt: %w", err) + } + } + + // Process the received response. + var parseFn func(req *http.Request, resp *http.Response) (Result, error) + switch c.dataSourceType { + case datasourcePrometheus: + parseFn = parsePrometheusResponse + case datasourceVLogs: + parseFn = parseVLogsResponse + default: + logger.Panicf("BUG: unsupported datasource type %q to parse query range response", c.dataSourceType) + } + res, err = parseFn(req, resp) + _ = resp.Body.Close() + return res, err +} + +func (c *Client) do(req *http.Request) (*http.Response, error) { + ru := req.URL.Redacted() + if *showDatasourceURL { + ru = req.URL.String() + } + if c.debug { + logger.Infof("DEBUG datasource request: executing %s request with params %q", req.Method, ru) + } + resp, err := c.c.Do(req) + if err != nil { + return nil, fmt.Errorf("error getting response from %s: %w", ru, err) + } + if resp.StatusCode != http.StatusOK { + body, _ := io.ReadAll(resp.Body) + _ = resp.Body.Close() + return nil, fmt.Errorf("unexpected response code %d for %s. Response body %s", resp.StatusCode, ru, body) + } + return resp, nil +} + +func (c *Client) newQueryRangeRequest(ctx context.Context, query string, start, end time.Time) (*http.Request, error) { + req, err := c.newRequest(ctx) + if err != nil { + return nil, fmt.Errorf("cannot create query_range request to datasource %q: %w", c.datasourceURL, err) + } + switch c.dataSourceType { + case datasourcePrometheus: + c.setPrometheusRangeReqParams(req, query, start, end) + case datasourceVLogs: + c.setVLogsRangeReqParams(req, query, start, end) + default: + logger.Panicf("BUG: unsupported datasource type %q to create range query request", c.dataSourceType) + } + return req, nil +} + +func (c *Client) newQueryRequest(ctx context.Context, query string, ts time.Time) (*http.Request, error) { + req, err := c.newRequest(ctx) + if err != nil { + return nil, fmt.Errorf("cannot create query request to datasource %q: %w", c.datasourceURL, err) + } + switch c.dataSourceType { + case datasourcePrometheus: + c.setPrometheusInstantReqParams(req, query, ts) + case datasourceGraphite: + c.setGraphiteReqParams(req, query) + case datasourceVLogs: + c.setVLogsInstantReqParams(req, query, ts) + default: + logger.Panicf("BUG: unsupported datasource type %q to create query request", c.dataSourceType) + } + return req, nil +} + +func (c *Client) newRequest(ctx context.Context) (*http.Request, error) { + req, err := http.NewRequestWithContext(ctx, http.MethodPost, c.datasourceURL, nil) + if err != nil { + logger.Panicf("BUG: unexpected error from http.NewRequest(%q): %s", c.datasourceURL, err) + } + req.Header.Set("Content-Type", "application/json") + if c.authCfg != nil { + err = c.authCfg.SetHeaders(req, true) + if err != nil { + return nil, err + } + } + for _, h := range c.extraHeaders { + req.Header.Set(h.key, h.value) + } + return req, nil +} + +// setReqParams adds query and other extra params for the request. +func (c *Client) setReqParams(r *http.Request, query string) { + q := r.URL.Query() + for k, vs := range c.extraParams { + if q.Has(k) { // extraParams are prior to params in URL + q.Del(k) + } + for _, v := range vs { + q.Add(k, v) + } + } + q.Set("query", query) + r.URL.RawQuery = q.Encode() +} diff --git a/app/vmalert/datasource/vm_graphite_api.go b/app/vmalert/datasource/client_graphite.go similarity index 95% rename from app/vmalert/datasource/vm_graphite_api.go rename to app/vmalert/datasource/client_graphite.go index 699919e77..2200f6ea5 100644 --- a/app/vmalert/datasource/vm_graphite_api.go +++ b/app/vmalert/datasource/client_graphite.go @@ -46,7 +46,7 @@ const ( graphitePrefix = "/graphite" ) -func (s *VMStorage) setGraphiteReqParams(r *http.Request, query string) { +func (s *Client) setGraphiteReqParams(r *http.Request, query string) { if s.appendTypePrefix { r.URL.Path += graphitePrefix } diff --git a/app/vmalert/datasource/vm_prom_api.go b/app/vmalert/datasource/client_prom.go similarity index 92% rename from app/vmalert/datasource/vm_prom_api.go rename to app/vmalert/datasource/client_prom.go index f2b4bddee..4747e8c51 100644 --- a/app/vmalert/datasource/vm_prom_api.go +++ b/app/vmalert/datasource/client_prom.go @@ -14,7 +14,7 @@ import ( ) var ( - disablePathAppend = flag.Bool("remoteRead.disablePathAppend", false, "Whether to disable automatic appending of '/api/v1/query' path "+ + disablePathAppend = flag.Bool("remoteRead.disablePathAppend", false, "Whether to disable automatic appending of '/api/v1/query' or '/select/logsql/stats_query' path "+ "to the configured -datasource.url and -remoteRead.url") disableStepParam = flag.Bool("datasource.disableStepParam", false, "Whether to disable adding 'step' param to the issued instant queries. "+ "This might be useful when using vmalert with datasources that do not support 'step' param for instant queries, like Google Managed Prometheus. "+ @@ -171,7 +171,7 @@ const ( func parsePrometheusResponse(req *http.Request, resp *http.Response) (res Result, err error) { r := &promResponse{} if err = json.NewDecoder(resp.Body).Decode(r); err != nil { - return res, fmt.Errorf("error parsing prometheus metrics for %s: %w", req.URL.Redacted(), err) + return res, fmt.Errorf("error parsing response from %s: %w", req.URL.Redacted(), err) } if r.Status == statusError { return res, fmt.Errorf("response error, query: %s, errorType: %s, error: %s", req.URL.Redacted(), r.ErrorType, r.Error) @@ -218,7 +218,7 @@ func parsePrometheusResponse(req *http.Request, resp *http.Response) (res Result return res, nil } -func (s *VMStorage) setPrometheusInstantReqParams(r *http.Request, query string, timestamp time.Time) { +func (s *Client) setPrometheusInstantReqParams(r *http.Request, query string, timestamp time.Time) { if s.appendTypePrefix { r.URL.Path += "/prometheus" } @@ -238,10 +238,10 @@ func (s *VMStorage) setPrometheusInstantReqParams(r *http.Request, query string, q.Set("step", fmt.Sprintf("%ds", int(s.queryStep.Seconds()))) } r.URL.RawQuery = q.Encode() - s.setPrometheusReqParams(r, query) + s.setReqParams(r, query) } -func (s *VMStorage) setPrometheusRangeReqParams(r *http.Request, query string, start, end time.Time) { +func (s *Client) setPrometheusRangeReqParams(r *http.Request, query string, start, end time.Time) { if s.appendTypePrefix { r.URL.Path += "/prometheus" } @@ -257,19 +257,5 @@ func (s *VMStorage) setPrometheusRangeReqParams(r *http.Request, query string, s q.Set("step", fmt.Sprintf("%ds", int(s.evaluationInterval.Seconds()))) } r.URL.RawQuery = q.Encode() - s.setPrometheusReqParams(r, query) -} - -func (s *VMStorage) setPrometheusReqParams(r *http.Request, query string) { - q := r.URL.Query() - for k, vs := range s.extraParams { - if q.Has(k) { // extraParams are prior to params in URL - q.Del(k) - } - for _, v := range vs { - q.Add(k, v) - } - } - q.Set("query", query) - r.URL.RawQuery = q.Encode() + s.setReqParams(r, query) } diff --git a/app/vmalert/datasource/vm_test.go b/app/vmalert/datasource/client_test.go similarity index 64% rename from app/vmalert/datasource/vm_test.go rename to app/vmalert/datasource/client_test.go index 9c3519a24..35da2279a 100644 --- a/app/vmalert/datasource/vm_test.go +++ b/app/vmalert/datasource/client_test.go @@ -24,8 +24,10 @@ var ( Username: basicAuthName, Password: promauth.NewSecret(basicAuthPass), } - query = "vm_rows" - queryRender = "constantLine(10)" + vmQuery = "vm_rows" + queryRender = "constantLine(10)" + vlogsQuery = "_time: 5m | stats by (foo) count() total" + vlogsRangeQuery = "* | stats by (foo) count() total" ) func TestVMInstantQuery(t *testing.T) { @@ -42,8 +44,8 @@ func TestVMInstantQuery(t *testing.T) { if name, pass, _ := r.BasicAuth(); name != basicAuthName || pass != basicAuthPass { t.Fatalf("expected %s:%s as basic auth got %s:%s", basicAuthName, basicAuthPass, name, pass) } - if r.URL.Query().Get("query") != query { - t.Fatalf("expected %s in query param, got %s", query, r.URL.Query().Get("query")) + if r.URL.Query().Get("query") != vmQuery { + t.Fatalf("expected %s in query param, got %s", vmQuery, r.URL.Query().Get("query")) } timeParam := r.URL.Query().Get("time") if timeParam == "" { @@ -78,6 +80,31 @@ func TestVMInstantQuery(t *testing.T) { w.Write([]byte(`[{"target":"constantLine(10)","tags":{"name":"constantLine(10)"},"datapoints":[[10,1611758343],[10,1611758373],[10,1611758403]]}]`)) } }) + mux.HandleFunc("/select/logsql/stats_query", func(w http.ResponseWriter, r *http.Request) { + c++ + if r.Method != http.MethodPost { + t.Fatalf("expected POST method got %s", r.Method) + } + if name, pass, _ := r.BasicAuth(); name != basicAuthName || pass != basicAuthPass { + t.Fatalf("expected %s:%s as basic auth got %s:%s", basicAuthName, basicAuthPass, name, pass) + } + if r.URL.Query().Get("query") != vlogsQuery { + t.Fatalf("expected %s in query param, got %s", vlogsQuery, r.URL.Query().Get("query")) + } + timeParam := r.URL.Query().Get("time") + if timeParam == "" { + t.Fatalf("expected 'time' in query param, got nil instead") + } + if _, err := time.Parse(time.RFC3339, timeParam); err != nil { + t.Fatalf("failed to parse 'time' query param %q: %s", timeParam, err) + } + switch c { + case 9: + w.Write([]byte("[]")) + case 10: + w.Write([]byte(`{"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"total","foo":"bar"},"value":[1583786142,"13763"]},{"metric":{"__name__":"total","foo":"baz"},"value":[1583786140,"2000"]}]}}`)) + } + }) srv := httptest.NewServer(mux) defer srv.Close() @@ -86,13 +113,13 @@ func TestVMInstantQuery(t *testing.T) { if err != nil { t.Fatalf("unexpected: %s", err) } - s := NewVMStorage(srv.URL, authCfg, 0, false, srv.Client()) + s := NewPrometheusClient(srv.URL, authCfg, false, srv.Client()) p := datasourcePrometheus pq := s.BuildWithParams(QuerierParams{DataSourceType: string(p), EvaluationInterval: 15 * time.Second}) ts := time.Now() - expErr := func(err string) { + expErr := func(query, err string) { _, _, gotErr := pq.Query(ctx, query, ts) if gotErr == nil { t.Fatalf("expected %q got nil", err) @@ -102,13 +129,13 @@ func TestVMInstantQuery(t *testing.T) { } } - expErr("500") // 0 - expErr("error parsing prometheus metrics") // 1 - expErr("response error") // 2 - expErr("unknown status") // 3 - expErr("unexpected end of JSON input") // 4 + expErr(vmQuery, "500") // 0 + expErr(vmQuery, "error parsing response") // 1 + expErr(vmQuery, "response error") // 2 + expErr(vmQuery, "unknown status") // 3 + expErr(vmQuery, "unexpected end of JSON input") // 4 - res, _, err := pq.Query(ctx, query, ts) // 5 - vector + res, _, err := pq.Query(ctx, vmQuery, ts) // 5 - vector if err != nil { t.Fatalf("unexpected %s", err) } @@ -129,7 +156,7 @@ func TestVMInstantQuery(t *testing.T) { } metricsEqual(t, res.Data, expected) - res, req, err := pq.Query(ctx, query, ts) // 6 - scalar + res, req, err := pq.Query(ctx, vmQuery, ts) // 6 - scalar if err != nil { t.Fatalf("unexpected %s", err) } @@ -154,7 +181,7 @@ func TestVMInstantQuery(t *testing.T) { res.SeriesFetched) } - res, _, err = pq.Query(ctx, query, ts) // 7 - scalar with stats + res, _, err = pq.Query(ctx, vmQuery, ts) // 7 - scalar with stats if err != nil { t.Fatalf("unexpected %s", err) } @@ -175,6 +202,7 @@ func TestVMInstantQuery(t *testing.T) { *res.SeriesFetched) } + // test graphite gq := s.BuildWithParams(QuerierParams{DataSourceType: string(datasourceGraphite)}) res, _, err = gq.Query(ctx, queryRender, ts) // 8 - graphite @@ -192,6 +220,33 @@ func TestVMInstantQuery(t *testing.T) { }, } metricsEqual(t, res.Data, exp) + + // test victorialogs + vlogs := datasourceVLogs + pq = s.BuildWithParams(QuerierParams{DataSourceType: string(vlogs), EvaluationInterval: 15 * time.Second}) + + expErr(vlogsQuery, "error parsing response") // 9 + + res, _, err = pq.Query(ctx, vlogsQuery, ts) // 10 + if err != nil { + t.Fatalf("unexpected %s", err) + } + if len(res.Data) != 2 { + t.Fatalf("expected 2 metrics got %d in %+v", len(res.Data), res.Data) + } + expected = []Metric{ + { + Labels: []Label{{Value: "total", Name: "stats_result"}, {Value: "bar", Name: "foo"}}, + Timestamps: []int64{1583786142}, + Values: []float64{13763}, + }, + { + Labels: []Label{{Value: "total", Name: "stats_result"}, {Value: "baz", Name: "foo"}}, + Timestamps: []int64{1583786140}, + Values: []float64{2000}, + }, + } + metricsEqual(t, res.Data, expected) } func TestVMInstantQueryWithRetry(t *testing.T) { @@ -202,8 +257,8 @@ func TestVMInstantQueryWithRetry(t *testing.T) { c := -1 mux.HandleFunc("/api/v1/query", func(w http.ResponseWriter, r *http.Request) { c++ - if r.URL.Query().Get("query") != query { - t.Fatalf("expected %s in query param, got %s", query, r.URL.Query().Get("query")) + if r.URL.Query().Get("query") != vmQuery { + t.Fatalf("expected %s in query param, got %s", vmQuery, r.URL.Query().Get("query")) } switch c { case 0: @@ -225,11 +280,11 @@ func TestVMInstantQueryWithRetry(t *testing.T) { srv := httptest.NewServer(mux) defer srv.Close() - s := NewVMStorage(srv.URL, nil, 0, false, srv.Client()) + s := NewPrometheusClient(srv.URL, nil, false, srv.Client()) pq := s.BuildWithParams(QuerierParams{DataSourceType: string(datasourcePrometheus)}) expErr := func(err string) { - _, _, gotErr := pq.Query(ctx, query, time.Now()) + _, _, gotErr := pq.Query(ctx, vmQuery, time.Now()) if gotErr == nil { t.Fatalf("expected %q got nil", err) } @@ -239,7 +294,7 @@ func TestVMInstantQueryWithRetry(t *testing.T) { } expValue := func(v float64) { - res, _, err := pq.Query(ctx, query, time.Now()) + res, _, err := pq.Query(ctx, vmQuery, time.Now()) if err != nil { t.Fatalf("unexpected %s", err) } @@ -300,8 +355,8 @@ func TestVMRangeQuery(t *testing.T) { if name, pass, _ := r.BasicAuth(); name != basicAuthName || pass != basicAuthPass { t.Fatalf("expected %s:%s as basic auth got %s:%s", basicAuthName, basicAuthPass, name, pass) } - if r.URL.Query().Get("query") != query { - t.Fatalf("expected %s in query param, got %s", query, r.URL.Query().Get("query")) + if r.URL.Query().Get("query") != vmQuery { + t.Fatalf("expected %s in query param, got %s", vmQuery, r.URL.Query().Get("query")) } startTS := r.URL.Query().Get("start") if startTS == "" { @@ -326,6 +381,40 @@ func TestVMRangeQuery(t *testing.T) { w.Write([]byte(`{"status":"success","data":{"resultType":"matrix","result":[{"metric":{"__name__":"vm_rows"},"values":[[1583786142,"13763"]]}]}}`)) } }) + mux.HandleFunc("/select/logsql/stats_query_range", func(w http.ResponseWriter, r *http.Request) { + c++ + if r.Method != http.MethodPost { + t.Fatalf("expected POST method got %s", r.Method) + } + if name, pass, _ := r.BasicAuth(); name != basicAuthName || pass != basicAuthPass { + t.Fatalf("expected %s:%s as basic auth got %s:%s", basicAuthName, basicAuthPass, name, pass) + } + if r.URL.Query().Get("query") != vlogsRangeQuery { + t.Fatalf("expected %s in query param, got %s", vmQuery, r.URL.Query().Get("query")) + } + startTS := r.URL.Query().Get("start") + if startTS == "" { + t.Fatalf("expected 'start' in query param, got nil instead") + } + if _, err := time.Parse(time.RFC3339, startTS); err != nil { + t.Fatalf("failed to parse 'start' query param: %s", err) + } + endTS := r.URL.Query().Get("end") + if endTS == "" { + t.Fatalf("expected 'end' in query param, got nil instead") + } + if _, err := time.Parse(time.RFC3339, endTS); err != nil { + t.Fatalf("failed to parse 'end' query param: %s", err) + } + step := r.URL.Query().Get("step") + if step != "60s" { + t.Fatalf("expected 'step' query param to be 60s; got %q instead", step) + } + switch c { + case 1: + w.Write([]byte(`{"status":"success","data":{"resultType":"matrix","result":[{"metric":{"__name__":"total"},"values":[[1583786142,"10"]]}]}}`)) + } + }) srv := httptest.NewServer(mux) defer srv.Close() @@ -334,19 +423,19 @@ func TestVMRangeQuery(t *testing.T) { if err != nil { t.Fatalf("unexpected: %s", err) } - s := NewVMStorage(srv.URL, authCfg, *queryStep, false, srv.Client()) + s := NewPrometheusClient(srv.URL, authCfg, false, srv.Client()) pq := s.BuildWithParams(QuerierParams{DataSourceType: string(datasourcePrometheus), EvaluationInterval: 15 * time.Second}) - _, err = pq.QueryRange(ctx, query, time.Now(), time.Time{}) + _, err = pq.QueryRange(ctx, vmQuery, time.Now(), time.Time{}) expectError(t, err, "is missing") - _, err = pq.QueryRange(ctx, query, time.Time{}, time.Now()) + _, err = pq.QueryRange(ctx, vmQuery, time.Time{}, time.Now()) expectError(t, err, "is missing") start, end := time.Now().Add(-time.Minute), time.Now() - res, err := pq.QueryRange(ctx, query, start, end) + res, err := pq.QueryRange(ctx, vmQuery, start, end) if err != nil { t.Fatalf("unexpected %s", err) } @@ -363,33 +452,66 @@ func TestVMRangeQuery(t *testing.T) { t.Fatalf("unexpected metric %+v want %+v", m[0], expected) } + // test unsupported graphite gq := s.BuildWithParams(QuerierParams{DataSourceType: string(datasourceGraphite)}) _, err = gq.QueryRange(ctx, queryRender, start, end) expectError(t, err, "is not supported") + + // unsupported logsql + gq = s.BuildWithParams(QuerierParams{DataSourceType: string(datasourceVLogs), EvaluationInterval: 60 * time.Second}) + + res, err = gq.QueryRange(ctx, vlogsRangeQuery, start, end) + expectError(t, err, "is not supported") + + // supported logsql + gq = s.BuildWithParams(QuerierParams{DataSourceType: string(datasourceVLogs), EvaluationInterval: 60 * time.Second, ApplyIntervalAsTimeFilter: true}) + res, err = gq.QueryRange(ctx, vlogsRangeQuery, start, end) + if err != nil { + t.Fatalf("unexpected %s", err) + } + m = res.Data + if len(m) != 1 { + t.Fatalf("expected 1 metric got %d in %+v", len(m), m) + } + expected = Metric{ + Labels: []Label{{Value: "total", Name: "stats_result"}}, + Timestamps: []int64{1583786142}, + Values: []float64{10}, + } + if !reflect.DeepEqual(m[0], expected) { + t.Fatalf("unexpected metric %+v want %+v", m[0], expected) + } } func TestRequestParams(t *testing.T) { query := "up" + vlogsQuery := "_time: 5m | stats count() total" timestamp := time.Date(2001, 2, 3, 4, 5, 6, 0, time.UTC) - f := func(isQueryRange bool, vm *VMStorage, checkFn func(t *testing.T, r *http.Request)) { + f := func(isQueryRange bool, c *Client, checkFn func(t *testing.T, r *http.Request)) { t.Helper() - req, err := vm.newRequest(ctx) + req, err := c.newRequest(ctx) if err != nil { t.Fatalf("error in newRequest: %s", err) } - switch vm.dataSourceType { - case "", datasourcePrometheus: + switch c.dataSourceType { + case datasourcePrometheus: if isQueryRange { - vm.setPrometheusRangeReqParams(req, query, timestamp, timestamp) + c.setPrometheusRangeReqParams(req, query, timestamp, timestamp) } else { - vm.setPrometheusInstantReqParams(req, query, timestamp) + c.setPrometheusInstantReqParams(req, query, timestamp) } case datasourceGraphite: - vm.setGraphiteReqParams(req, query) + c.setGraphiteReqParams(req, query) + case datasourceVLogs: + if isQueryRange { + c.setVLogsRangeReqParams(req, vlogsQuery, timestamp, timestamp) + } else { + c.setVLogsInstantReqParams(req, vlogsQuery, timestamp) + } } checkFn(t, req) @@ -399,19 +521,19 @@ func TestRequestParams(t *testing.T) { if err != nil { t.Fatalf("unexpected error: %s", err) } - storage := VMStorage{ + storage := Client{ extraParams: url.Values{"round_digits": {"10"}}, } // prometheus path - f(false, &VMStorage{ + f(false, &Client{ dataSourceType: datasourcePrometheus, }, func(t *testing.T, r *http.Request) { checkEqualString(t, "/api/v1/query", r.URL.Path) }) // prometheus prefix - f(false, &VMStorage{ + f(false, &Client{ dataSourceType: datasourcePrometheus, appendTypePrefix: true, }, func(t *testing.T, r *http.Request) { @@ -419,14 +541,14 @@ func TestRequestParams(t *testing.T) { }) // prometheus range path - f(true, &VMStorage{ + f(true, &Client{ dataSourceType: datasourcePrometheus, }, func(t *testing.T, r *http.Request) { checkEqualString(t, "/api/v1/query_range", r.URL.Path) }) // prometheus range prefix - f(true, &VMStorage{ + f(true, &Client{ dataSourceType: datasourcePrometheus, appendTypePrefix: true, }, func(t *testing.T, r *http.Request) { @@ -434,14 +556,14 @@ func TestRequestParams(t *testing.T) { }) // graphite path - f(false, &VMStorage{ + f(false, &Client{ dataSourceType: datasourceGraphite, }, func(t *testing.T, r *http.Request) { checkEqualString(t, graphitePath, r.URL.Path) }) // graphite prefix - f(false, &VMStorage{ + f(false, &Client{ dataSourceType: datasourceGraphite, appendTypePrefix: true, }, func(t *testing.T, r *http.Request) { @@ -449,21 +571,27 @@ func TestRequestParams(t *testing.T) { }) // default params - f(false, &VMStorage{}, func(t *testing.T, r *http.Request) { + f(false, &Client{dataSourceType: datasourcePrometheus}, func(t *testing.T, r *http.Request) { + exp := url.Values{"query": {query}, "time": {timestamp.Format(time.RFC3339)}} + checkEqualString(t, exp.Encode(), r.URL.RawQuery) + }) + + f(false, &Client{dataSourceType: datasourcePrometheus, applyIntervalAsTimeFilter: true}, func(t *testing.T, r *http.Request) { exp := url.Values{"query": {query}, "time": {timestamp.Format(time.RFC3339)}} checkEqualString(t, exp.Encode(), r.URL.RawQuery) }) // default range params - f(true, &VMStorage{}, func(t *testing.T, r *http.Request) { + f(true, &Client{dataSourceType: datasourcePrometheus}, func(t *testing.T, r *http.Request) { ts := timestamp.Format(time.RFC3339) exp := url.Values{"query": {query}, "start": {ts}, "end": {ts}} checkEqualString(t, exp.Encode(), r.URL.RawQuery) }) // basic auth - f(false, &VMStorage{ - authCfg: authCfg, + f(false, &Client{ + dataSourceType: datasourcePrometheus, + authCfg: authCfg, }, func(t *testing.T, r *http.Request) { u, p, _ := r.BasicAuth() checkEqualString(t, "foo", u) @@ -471,8 +599,9 @@ func TestRequestParams(t *testing.T) { }) // basic auth range - f(true, &VMStorage{ - authCfg: authCfg, + f(true, &Client{ + dataSourceType: datasourcePrometheus, + authCfg: authCfg, }, func(t *testing.T, r *http.Request) { u, p, _ := r.BasicAuth() checkEqualString(t, "foo", u) @@ -480,7 +609,8 @@ func TestRequestParams(t *testing.T) { }) // evaluation interval - f(false, &VMStorage{ + f(false, &Client{ + dataSourceType: datasourcePrometheus, evaluationInterval: 15 * time.Second, }, func(t *testing.T, r *http.Request) { evalInterval := 15 * time.Second @@ -489,8 +619,9 @@ func TestRequestParams(t *testing.T) { }) // step override - f(false, &VMStorage{ - queryStep: time.Minute, + f(false, &Client{ + dataSourceType: datasourcePrometheus, + queryStep: time.Minute, }, func(t *testing.T, r *http.Request) { exp := url.Values{ "query": {query}, @@ -501,7 +632,8 @@ func TestRequestParams(t *testing.T) { }) // step to seconds - f(false, &VMStorage{ + f(false, &Client{ + dataSourceType: datasourcePrometheus, evaluationInterval: 3 * time.Hour, }, func(t *testing.T, r *http.Request) { evalInterval := 3 * time.Hour @@ -510,15 +642,17 @@ func TestRequestParams(t *testing.T) { }) // prometheus extra params - f(false, &VMStorage{ - extraParams: url.Values{"round_digits": {"10"}}, + f(false, &Client{ + dataSourceType: datasourcePrometheus, + extraParams: url.Values{"round_digits": {"10"}}, }, func(t *testing.T, r *http.Request) { exp := url.Values{"query": {query}, "round_digits": {"10"}, "time": {timestamp.Format(time.RFC3339)}} checkEqualString(t, exp.Encode(), r.URL.RawQuery) }) // prometheus extra params range - f(true, &VMStorage{ + f(true, &Client{ + dataSourceType: datasourcePrometheus, extraParams: url.Values{ "nocache": {"1"}, "max_lookback": {"1h"}, @@ -536,7 +670,8 @@ func TestRequestParams(t *testing.T) { // custom params overrides the original params f(false, storage.Clone().ApplyParams(QuerierParams{ - QueryParams: url.Values{"round_digits": {"2"}}, + DataSourceType: string(datasourcePrometheus), + QueryParams: url.Values{"round_digits": {"2"}}, }), func(t *testing.T, r *http.Request) { exp := url.Values{"query": {query}, "round_digits": {"2"}, "time": {timestamp.Format(time.RFC3339)}} checkEqualString(t, exp.Encode(), r.URL.RawQuery) @@ -544,14 +679,15 @@ func TestRequestParams(t *testing.T) { // allow duplicates in query params f(false, storage.Clone().ApplyParams(QuerierParams{ - QueryParams: url.Values{"extra_labels": {"env=dev", "foo=bar"}}, + DataSourceType: string(datasourcePrometheus), + QueryParams: url.Values{"extra_labels": {"env=dev", "foo=bar"}}, }), func(t *testing.T, r *http.Request) { exp := url.Values{"query": {query}, "round_digits": {"10"}, "extra_labels": {"env=dev", "foo=bar"}, "time": {timestamp.Format(time.RFC3339)}} checkEqualString(t, exp.Encode(), r.URL.RawQuery) }) // graphite extra params - f(false, &VMStorage{ + f(false, &Client{ dataSourceType: datasourceGraphite, extraParams: url.Values{ "nocache": {"1"}, @@ -563,7 +699,7 @@ func TestRequestParams(t *testing.T) { }) // graphite extra params allows to override from - f(false, &VMStorage{ + f(false, &Client{ dataSourceType: datasourceGraphite, extraParams: url.Values{ "from": {"-10m"}, @@ -572,10 +708,38 @@ func TestRequestParams(t *testing.T) { exp := fmt.Sprintf("format=json&from=-10m&target=%s&until=now", query) checkEqualString(t, exp, r.URL.RawQuery) }) + + // test vlogs + f(false, &Client{ + dataSourceType: datasourceVLogs, + evaluationInterval: time.Minute, + }, func(t *testing.T, r *http.Request) { + exp := url.Values{"query": {vlogsQuery}, "time": {timestamp.Format(time.RFC3339)}} + checkEqualString(t, exp.Encode(), r.URL.RawQuery) + }) + + f(false, &Client{ + dataSourceType: datasourceVLogs, + evaluationInterval: time.Minute, + applyIntervalAsTimeFilter: true, + }, func(t *testing.T, r *http.Request) { + ts := timestamp.Format(time.RFC3339) + exp := url.Values{"query": {vlogsQuery}, "time": {ts}, "start": {timestamp.Add(-time.Minute).Format(time.RFC3339)}, "end": {ts}} + checkEqualString(t, exp.Encode(), r.URL.RawQuery) + }) + + f(true, &Client{ + dataSourceType: datasourceVLogs, + evaluationInterval: time.Minute, + }, func(t *testing.T, r *http.Request) { + ts := timestamp.Format(time.RFC3339) + exp := url.Values{"query": {vlogsQuery}, "start": {ts}, "end": {ts}, "step": {"60s"}} + checkEqualString(t, exp.Encode(), r.URL.RawQuery) + }) } func TestHeaders(t *testing.T) { - f := func(vmFn func() *VMStorage, checkFn func(t *testing.T, r *http.Request)) { + f := func(vmFn func() *Client, checkFn func(t *testing.T, r *http.Request)) { t.Helper() vm := vmFn() @@ -587,12 +751,12 @@ func TestHeaders(t *testing.T) { } // basic auth - f(func() *VMStorage { + f(func() *Client { cfg, err := utils.AuthConfig(utils.WithBasicAuth("foo", "bar", "")) if err != nil { t.Fatalf("Error get auth config: %s", err) } - return &VMStorage{authCfg: cfg} + return NewPrometheusClient("", cfg, false, nil) }, func(t *testing.T, r *http.Request) { u, p, _ := r.BasicAuth() checkEqualString(t, "foo", u) @@ -600,12 +764,12 @@ func TestHeaders(t *testing.T) { }) // bearer auth - f(func() *VMStorage { + f(func() *Client { cfg, err := utils.AuthConfig(utils.WithBearer("foo", "")) if err != nil { t.Fatalf("Error get auth config: %s", err) } - return &VMStorage{authCfg: cfg} + return NewPrometheusClient("", cfg, false, nil) }, func(t *testing.T, r *http.Request) { reqToken := r.Header.Get("Authorization") splitToken := strings.Split(reqToken, "Bearer ") @@ -617,11 +781,13 @@ func TestHeaders(t *testing.T) { }) // custom extraHeaders - f(func() *VMStorage { - return &VMStorage{extraHeaders: []keyValue{ + f(func() *Client { + c := NewPrometheusClient("", nil, false, nil) + c.extraHeaders = []keyValue{ {key: "Foo", value: "bar"}, {key: "Baz", value: "qux"}, - }} + } + return c }, func(t *testing.T, r *http.Request) { h1 := r.Header.Get("Foo") checkEqualString(t, "bar", h1) @@ -630,17 +796,16 @@ func TestHeaders(t *testing.T) { }) // custom header overrides basic auth - f(func() *VMStorage { + f(func() *Client { cfg, err := utils.AuthConfig(utils.WithBasicAuth("foo", "bar", "")) if err != nil { t.Fatalf("Error get auth config: %s", err) } - return &VMStorage{ - authCfg: cfg, - extraHeaders: []keyValue{ - {key: "Authorization", value: "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="}, - }, + c := NewPrometheusClient("", cfg, false, nil) + c.extraHeaders = []keyValue{ + {key: "Authorization", value: "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="}, } + return c }, func(t *testing.T, r *http.Request) { u, p, _ := r.BasicAuth() checkEqualString(t, "Aladdin", u) diff --git a/app/vmalert/datasource/client_vlogs.go b/app/vmalert/datasource/client_vlogs.go new file mode 100644 index 000000000..cb6e8892c --- /dev/null +++ b/app/vmalert/datasource/client_vlogs.go @@ -0,0 +1,61 @@ +package datasource + +import ( + "fmt" + "net/http" + "time" +) + +func (s *Client) setVLogsInstantReqParams(r *http.Request, query string, timestamp time.Time) { + // there is no type path prefix in victorialogs APIs right now, ignore appendTypePrefix. + if !*disablePathAppend { + r.URL.Path += "/select/logsql/stats_query" + } + q := r.URL.Query() + // set `time` param explicitly, it will be used as the timestamp of query results. + q.Set("time", timestamp.Format(time.RFC3339)) + // set the `start` and `end` params if applyIntervalAsTimeFilter is enabled(time filter is missing in the rule expr), + // so the query will be executed in time range [timestamp - evaluationInterval, timestamp]. + if s.applyIntervalAsTimeFilter && s.evaluationInterval > 0 { + q.Set("start", timestamp.Add(-s.evaluationInterval).Format(time.RFC3339)) + q.Set("end", timestamp.Format(time.RFC3339)) + } + r.URL.RawQuery = q.Encode() + s.setReqParams(r, query) +} + +func (s *Client) setVLogsRangeReqParams(r *http.Request, query string, start, end time.Time) { + // there is no type path prefix in victorialogs APIs right now, ignore appendTypePrefix. + if !*disablePathAppend { + r.URL.Path += "/select/logsql/stats_query_range" + } + q := r.URL.Query() + q.Add("start", start.Format(time.RFC3339)) + q.Add("end", end.Format(time.RFC3339)) + // set step as evaluationInterval by default + if s.evaluationInterval > 0 { + q.Set("step", fmt.Sprintf("%ds", int(s.evaluationInterval.Seconds()))) + } + r.URL.RawQuery = q.Encode() + s.setReqParams(r, query) +} + +func parseVLogsResponse(req *http.Request, resp *http.Response) (res Result, err error) { + res, err = parsePrometheusResponse(req, resp) + if err != nil { + return Result{}, err + } + for i := range res.Data { + m := &res.Data[i] + for j := range m.Labels { + // reserve the stats func result name with a new label `stats_result` instead of dropping it, + // since there could be multiple stats results in a single query, for instance: + // _time:5m | stats quantile(0.5, request_duration_seconds) p50, quantile(0.9, request_duration_seconds) p90 + if m.Labels[j].Name == "__name__" { + m.Labels[j].Name = "stats_result" + break + } + } + } + return +} diff --git a/app/vmalert/datasource/datasource.go b/app/vmalert/datasource/datasource.go index 31e4689c4..97a0f8d49 100644 --- a/app/vmalert/datasource/datasource.go +++ b/app/vmalert/datasource/datasource.go @@ -42,11 +42,15 @@ type QuerierBuilder interface { // QuerierParams params for Querier. type QuerierParams struct { - DataSourceType string - EvaluationInterval time.Duration - QueryParams url.Values - Headers map[string]string - Debug bool + DataSourceType string + // ApplyIntervalAsTimeFilter is only valid for vlogs datasource. + // Set to true if there is no [timeFilter](https://docs.victoriametrics.com/victorialogs/logsql/#time-filter) in the rule expression, + // and we will add evaluation interval as an additional timeFilter when querying. + ApplyIntervalAsTimeFilter bool + EvaluationInterval time.Duration + QueryParams url.Values + Headers map[string]string + Debug bool } // Metric is the basic entity which should be return by datasource diff --git a/app/vmalert/datasource/init.go b/app/vmalert/datasource/init.go index a99f130e8..4e163ab71 100644 --- a/app/vmalert/datasource/init.go +++ b/app/vmalert/datasource/init.go @@ -133,13 +133,12 @@ func Init(extraParams url.Values) (QuerierBuilder, error) { return nil, fmt.Errorf("failed to set request auth header to datasource %q: %w", *addr, err) } - return &VMStorage{ + return &Client{ c: &http.Client{Transport: tr}, authCfg: authCfg, datasourceURL: strings.TrimSuffix(*addr, "/"), appendTypePrefix: *appendTypePrefix, queryStep: *queryStep, - dataSourceType: datasourcePrometheus, extraParams: extraParams, }, nil } diff --git a/app/vmalert/datasource/vm.go b/app/vmalert/datasource/vm.go deleted file mode 100644 index c8258fec4..000000000 --- a/app/vmalert/datasource/vm.go +++ /dev/null @@ -1,272 +0,0 @@ -package datasource - -import ( - "context" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strings" - "time" - - "github.com/VictoriaMetrics/VictoriaMetrics/lib/logger" - "github.com/VictoriaMetrics/VictoriaMetrics/lib/netutil" - "github.com/VictoriaMetrics/VictoriaMetrics/lib/promauth" -) - -type datasourceType string - -const ( - datasourcePrometheus datasourceType = "prometheus" - datasourceGraphite datasourceType = "graphite" -) - -func toDatasourceType(s string) datasourceType { - if s == string(datasourceGraphite) { - return datasourceGraphite - } - return datasourcePrometheus -} - -// VMStorage represents vmstorage entity with ability to read and write metrics -// WARN: when adding a new field, remember to update Clone() method. -type VMStorage struct { - c *http.Client - authCfg *promauth.Config - datasourceURL string - appendTypePrefix bool - queryStep time.Duration - dataSourceType datasourceType - - // evaluationInterval will help setting request's `step` param. - evaluationInterval time.Duration - // extraParams contains params to be attached to each HTTP request - extraParams url.Values - // extraHeaders are headers to be attached to each HTTP request - extraHeaders []keyValue - - // whether to print additional log messages - // for each sent request - debug bool -} - -type keyValue struct { - key string - value string -} - -// Clone makes clone of VMStorage, shares http client. -func (s *VMStorage) Clone() *VMStorage { - ns := &VMStorage{ - c: s.c, - authCfg: s.authCfg, - datasourceURL: s.datasourceURL, - appendTypePrefix: s.appendTypePrefix, - queryStep: s.queryStep, - - dataSourceType: s.dataSourceType, - evaluationInterval: s.evaluationInterval, - - // init map so it can be populated below - extraParams: url.Values{}, - - debug: s.debug, - } - if len(s.extraHeaders) > 0 { - ns.extraHeaders = make([]keyValue, len(s.extraHeaders)) - copy(ns.extraHeaders, s.extraHeaders) - } - for k, v := range s.extraParams { - ns.extraParams[k] = v - } - - return ns -} - -// ApplyParams - changes given querier params. -func (s *VMStorage) ApplyParams(params QuerierParams) *VMStorage { - s.dataSourceType = toDatasourceType(params.DataSourceType) - s.evaluationInterval = params.EvaluationInterval - if params.QueryParams != nil { - if s.extraParams == nil { - s.extraParams = url.Values{} - } - for k, vl := range params.QueryParams { - // custom query params are prior to default ones - if s.extraParams.Has(k) { - s.extraParams.Del(k) - } - for _, v := range vl { - // don't use .Set() instead of Del/Add since it is allowed - // for GET params to be duplicated - // see https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4908 - s.extraParams.Add(k, v) - } - } - } - if params.Headers != nil { - for key, value := range params.Headers { - kv := keyValue{key: key, value: value} - s.extraHeaders = append(s.extraHeaders, kv) - } - } - s.debug = params.Debug - return s -} - -// BuildWithParams - implements interface. -func (s *VMStorage) BuildWithParams(params QuerierParams) Querier { - return s.Clone().ApplyParams(params) -} - -// NewVMStorage is a constructor for VMStorage -func NewVMStorage(baseURL string, authCfg *promauth.Config, queryStep time.Duration, appendTypePrefix bool, c *http.Client) *VMStorage { - return &VMStorage{ - c: c, - authCfg: authCfg, - datasourceURL: strings.TrimSuffix(baseURL, "/"), - appendTypePrefix: appendTypePrefix, - queryStep: queryStep, - dataSourceType: datasourcePrometheus, - extraParams: url.Values{}, - } -} - -// Query executes the given query and returns parsed response -func (s *VMStorage) Query(ctx context.Context, query string, ts time.Time) (Result, *http.Request, error) { - req, err := s.newQueryRequest(ctx, query, ts) - if err != nil { - return Result{}, nil, err - } - resp, err := s.do(req) - if err != nil { - if !errors.Is(err, io.EOF) && !errors.Is(err, io.ErrUnexpectedEOF) && !netutil.IsTrivialNetworkError(err) { - // Return unexpected error to the caller. - return Result{}, nil, err - } - // Something in the middle between client and datasource might be closing - // the connection. So we do a one more attempt in hope request will succeed. - req, err = s.newQueryRequest(ctx, query, ts) - if err != nil { - return Result{}, nil, fmt.Errorf("second attempt: %w", err) - } - resp, err = s.do(req) - if err != nil { - return Result{}, nil, fmt.Errorf("second attempt: %w", err) - } - } - - // Process the received response. - parseFn := parsePrometheusResponse - if s.dataSourceType != datasourcePrometheus { - parseFn = parseGraphiteResponse - } - result, err := parseFn(req, resp) - _ = resp.Body.Close() - return result, req, err -} - -// QueryRange executes the given query on the given time range. -// For Prometheus type see https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries -// Graphite type isn't supported. -func (s *VMStorage) QueryRange(ctx context.Context, query string, start, end time.Time) (res Result, err error) { - if s.dataSourceType != datasourcePrometheus { - return res, fmt.Errorf("%q is not supported for QueryRange", s.dataSourceType) - } - if start.IsZero() { - return res, fmt.Errorf("start param is missing") - } - if end.IsZero() { - return res, fmt.Errorf("end param is missing") - } - req, err := s.newQueryRangeRequest(ctx, query, start, end) - if err != nil { - return res, err - } - resp, err := s.do(req) - if err != nil { - if !errors.Is(err, io.EOF) && !errors.Is(err, io.ErrUnexpectedEOF) && !netutil.IsTrivialNetworkError(err) { - // Return unexpected error to the caller. - return res, err - } - // Something in the middle between client and datasource might be closing - // the connection. So we do a one more attempt in hope request will succeed. - req, err = s.newQueryRangeRequest(ctx, query, start, end) - if err != nil { - return res, fmt.Errorf("second attempt: %w", err) - } - resp, err = s.do(req) - if err != nil { - return res, fmt.Errorf("second attempt: %w", err) - } - } - - // Process the received response. - res, err = parsePrometheusResponse(req, resp) - _ = resp.Body.Close() - return res, err -} - -func (s *VMStorage) do(req *http.Request) (*http.Response, error) { - ru := req.URL.Redacted() - if *showDatasourceURL { - ru = req.URL.String() - } - if s.debug { - logger.Infof("DEBUG datasource request: executing %s request with params %q", req.Method, ru) - } - resp, err := s.c.Do(req) - if err != nil { - return nil, fmt.Errorf("error getting response from %s: %w", ru, err) - } - if resp.StatusCode != http.StatusOK { - body, _ := io.ReadAll(resp.Body) - _ = resp.Body.Close() - return nil, fmt.Errorf("unexpected response code %d for %s. Response body %s", resp.StatusCode, ru, body) - } - return resp, nil -} - -func (s *VMStorage) newQueryRangeRequest(ctx context.Context, query string, start, end time.Time) (*http.Request, error) { - req, err := s.newRequest(ctx) - if err != nil { - return nil, fmt.Errorf("cannot create query_range request to datasource %q: %w", s.datasourceURL, err) - } - s.setPrometheusRangeReqParams(req, query, start, end) - return req, nil -} - -func (s *VMStorage) newQueryRequest(ctx context.Context, query string, ts time.Time) (*http.Request, error) { - req, err := s.newRequest(ctx) - if err != nil { - return nil, fmt.Errorf("cannot create query request to datasource %q: %w", s.datasourceURL, err) - } - switch s.dataSourceType { - case "", datasourcePrometheus: - s.setPrometheusInstantReqParams(req, query, ts) - case datasourceGraphite: - s.setGraphiteReqParams(req, query) - default: - logger.Panicf("BUG: engine not found: %q", s.dataSourceType) - } - return req, nil -} - -func (s *VMStorage) newRequest(ctx context.Context) (*http.Request, error) { - req, err := http.NewRequestWithContext(ctx, http.MethodPost, s.datasourceURL, nil) - if err != nil { - logger.Panicf("BUG: unexpected error from http.NewRequest(%q): %s", s.datasourceURL, err) - } - req.Header.Set("Content-Type", "application/json") - if s.authCfg != nil { - err = s.authCfg.SetHeaders(req, true) - if err != nil { - return nil, err - } - } - for _, h := range s.extraHeaders { - req.Header.Set(h.key, h.value) - } - return req, nil -} diff --git a/app/vmalert/main.go b/app/vmalert/main.go index 53af8f210..9e14d03dd 100644 --- a/app/vmalert/main.go +++ b/app/vmalert/main.go @@ -66,7 +66,7 @@ absolute path to all .tpl files in root. evaluationInterval = flag.Duration("evaluationInterval", time.Minute, "How often to evaluate the rules") validateTemplates = flag.Bool("rule.validateTemplates", true, "Whether to validate annotation and label templates") - validateExpressions = flag.Bool("rule.validateExpressions", true, "Whether to validate rules expressions via MetricsQL engine") + validateExpressions = flag.Bool("rule.validateExpressions", true, "Whether to validate rules expressions for different types.") externalURL = flag.String("external.url", "", "External URL is used as alert's source for sent alerts to the notifier. By default, hostname is used as address.") externalAlertSource = flag.String("external.alert.source", "", `External Alert Source allows to override the Source link for alerts sent to AlertManager `+ diff --git a/app/vmalert/remoteread/init.go b/app/vmalert/remoteread/init.go index 612db0fad..b134dad42 100644 --- a/app/vmalert/remoteread/init.go +++ b/app/vmalert/remoteread/init.go @@ -86,5 +86,5 @@ func Init() (datasource.QuerierBuilder, error) { return nil, fmt.Errorf("failed to configure auth: %w", err) } c := &http.Client{Transport: tr} - return datasource.NewVMStorage(*addr, authCfg, 0, false, c), nil + return datasource.NewPrometheusClient(*addr, authCfg, false, c), nil } diff --git a/app/vmalert/rule/alerting.go b/app/vmalert/rule/alerting.go index 5c9a17393..f0d7101a9 100644 --- a/app/vmalert/rule/alerting.go +++ b/app/vmalert/rule/alerting.go @@ -72,11 +72,12 @@ func NewAlertingRule(qb datasource.QuerierBuilder, group *Group, cfg config.Rule EvalInterval: group.Interval, Debug: cfg.Debug, q: qb.BuildWithParams(datasource.QuerierParams{ - DataSourceType: group.Type.String(), - EvaluationInterval: group.Interval, - QueryParams: group.Params, - Headers: group.Headers, - Debug: cfg.Debug, + DataSourceType: group.Type.String(), + ApplyIntervalAsTimeFilter: setIntervalAsTimeFilter(group.Type.String(), cfg.Expr), + EvaluationInterval: group.Interval, + QueryParams: group.Params, + Headers: group.Headers, + Debug: cfg.Debug, }), alerts: make(map[uint64]*notifier.Alert), metrics: &alertingRuleMetrics{}, diff --git a/app/vmalert/rule/group.go b/app/vmalert/rule/group.go index 5051a6082..5f0e42329 100644 --- a/app/vmalert/rule/group.go +++ b/app/vmalert/rule/group.go @@ -213,7 +213,6 @@ func (g *Group) restore(ctx context.Context, qb datasource.QuerierBuilder, ts ti continue } q := qb.BuildWithParams(datasource.QuerierParams{ - DataSourceType: g.Type.String(), EvaluationInterval: g.Interval, QueryParams: g.Params, Headers: g.Headers, diff --git a/app/vmalert/rule/recording.go b/app/vmalert/rule/recording.go index c015dfe06..3de0524b5 100644 --- a/app/vmalert/rule/recording.go +++ b/app/vmalert/rule/recording.go @@ -10,6 +10,7 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/app/vmalert/config" "github.com/VictoriaMetrics/VictoriaMetrics/app/vmalert/datasource" "github.com/VictoriaMetrics/VictoriaMetrics/app/vmalert/utils" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/logstorage" "github.com/VictoriaMetrics/VictoriaMetrics/lib/prompbmarshal" ) @@ -64,10 +65,11 @@ func NewRecordingRule(qb datasource.QuerierBuilder, group *Group, cfg config.Rul File: group.File, metrics: &recordingRuleMetrics{}, q: qb.BuildWithParams(datasource.QuerierParams{ - DataSourceType: group.Type.String(), - EvaluationInterval: group.Interval, - QueryParams: group.Params, - Headers: group.Headers, + DataSourceType: group.Type.String(), + ApplyIntervalAsTimeFilter: setIntervalAsTimeFilter(group.Type.String(), cfg.Expr), + EvaluationInterval: group.Interval, + QueryParams: group.Params, + Headers: group.Headers, }), } @@ -213,3 +215,12 @@ func (rr *RecordingRule) updateWith(r Rule) error { rr.q = nr.q return nil } + +// setIntervalAsTimeFilter returns true if given LogsQL has a time filter. +func setIntervalAsTimeFilter(dType, expr string) bool { + if dType != "vlogs" { + return false + } + q, _ := logstorage.ParseStatsQuery(expr) + return !q.ContainAnyTimeFilter() +} diff --git a/app/vmalert/rule/recording_test.go b/app/vmalert/rule/recording_test.go index 62b9e7265..469b4285a 100644 --- a/app/vmalert/rule/recording_test.go +++ b/app/vmalert/rule/recording_test.go @@ -266,3 +266,25 @@ func TestRecordingRuleExec_Negative(t *testing.T) { t.Fatalf("cannot execute recroding rule: %s", err) } } + +func TestSetIntervalAsTimeFilter(t *testing.T) { + f := func(s, dType string, expected bool) { + t.Helper() + + if setIntervalAsTimeFilter(dType, s) != expected { + t.Fatalf("unexpected result for hasTimeFilter(%q); want %v", s, expected) + } + } + + f(`* | count()`, "prometheus", false) + + f(`* | count()`, "vlogs", true) + f(`error OR _time:5m | count()`, "vlogs", true) + f(`(_time: 5m AND error) OR (_time: 5m AND warn) | count()`, "vlogs", true) + f(`* | error OR _time:5m | count()`, "vlogs", true) + + f(`_time:5m | count()`, "vlogs", false) + f(`_time:2023-04-25T22:45:59Z | count()`, "vlogs", false) + f(`error AND _time:5m | count()`, "vlogs", false) + f(`* | error AND _time:5m | count()`, "vlogs", false) +} diff --git a/deployment/docker/README.md b/deployment/docker/README.md index cd012c09a..d9e136af7 100644 --- a/deployment/docker/README.md +++ b/deployment/docker/README.md @@ -105,7 +105,7 @@ vmauth config is available [here](ttps://github.com/VictoriaMetrics/VictoriaMetr ## vmalert -vmalert evaluates alerting rules [alerts.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts.yml) +vmalert evaluates alerting rules [alerts.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts.yml) to track VictoriaMetrics health state. It is connected with AlertManager for firing alerts, and with VictoriaMetrics for executing queries and storing alert's state. @@ -153,17 +153,17 @@ make docker-cluster-vm-datasource-down # shutdown cluster See below a list of recommended alerting rules for various VictoriaMetrics components for running in production. Some alerting rules thresholds are just recommendations and could require an adjustment. The list of alerting rules is the following: -* [alerts-health.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-health.yml): +* [alerts-health.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-health.yml): alerting rules related to all VictoriaMetrics components for tracking their "health" state; -* [alerts.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts.yml): +* [alerts.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts.yml): alerting rules related to [single-server VictoriaMetrics](https://docs.victoriametrics.com/single-server-victoriametrics/) installation; -* [alerts-cluster.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-cluster.yml): +* [alerts-cluster.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-cluster.yml): alerting rules related to [cluster version of VictoriaMetrics](https://docs.victoriametrics.com/cluster-victoriametrics/); -* [alerts-vmagent.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-vmagent.yml): +* [alerts-vmagent.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmagent.yml): alerting rules related to [vmagent](https://docs.victoriametrics.com/vmagent/) component; -* [alerts-vmalert.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-vmalert.yml): +* [alerts-vmalert.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmalert.yml): alerting rules related to [vmalert](https://docs.victoriametrics.com/vmalert/) component; -* [alerts-vmauth.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-vmauth.yml): +* [alerts-vmauth.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmauth.yml): alerting rules related to [vmauth](https://docs.victoriametrics.com/vmauth/) component; * [alerts-vlogs.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-vlogs.yml): alerting rules related to [VictoriaLogs](https://docs.victoriametrics.com/victorialogs/); diff --git a/deployment/docker/auth-mixed-datasource.yml b/deployment/docker/auth-mixed-datasource.yml new file mode 100644 index 000000000..06eb47bbb --- /dev/null +++ b/deployment/docker/auth-mixed-datasource.yml @@ -0,0 +1,9 @@ +# route requests between VictoriaMetrics and VictoriaLogs +unauthorized_user: + url_map: + - src_paths: + - "/api/v1/query.*" + url_prefix: "http://victoriametrics:8428" + - src_paths: + - "/select/logsql/.*" + url_prefix: "http://victorialogs:9428" diff --git a/deployment/docker/docker-compose-cluster.yml b/deployment/docker/docker-compose-cluster.yml index 088bb8681..0ebe2e757 100644 --- a/deployment/docker/docker-compose-cluster.yml +++ b/deployment/docker/docker-compose-cluster.yml @@ -133,10 +133,10 @@ services: ports: - 8880:8880 volumes: - - ./alerts-cluster.yml:/etc/alerts/alerts.yml - - ./alerts-health.yml:/etc/alerts/alerts-health.yml - - ./alerts-vmagent.yml:/etc/alerts/alerts-vmagent.yml - - ./alerts-vmalert.yml:/etc/alerts/alerts-vmalert.yml + - ./rules/alerts-cluster.yml:/etc/alerts/alerts.yml + - ./rules/alerts-health.yml:/etc/alerts/alerts-health.yml + - ./rules/alerts-vmagent.yml:/etc/alerts/alerts-vmagent.yml + - ./rules/alerts-vmalert.yml:/etc/alerts/alerts-vmalert.yml command: - "--datasource.url=http://vmauth:8427/select/0/prometheus" - "--remoteRead.url=http://vmauth:8427/select/0/prometheus" diff --git a/deployment/docker/docker-compose-victorialogs.yml b/deployment/docker/docker-compose-victorialogs.yml index b18c05718..091c3655d 100644 --- a/deployment/docker/docker-compose-victorialogs.yml +++ b/deployment/docker/docker-compose-victorialogs.yml @@ -26,7 +26,7 @@ services: # and forwards them to VictoriaLogs fluentbit: container_name: fluentbit - image: cr.fluentbit.io/fluent/fluent-bit:2.1.4 + image: fluent/fluent-bit:2.1.4 volumes: - /var/lib/docker/containers:/var/lib/docker/containers:ro - ./fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf @@ -40,7 +40,7 @@ services: # storing logs and serving read queries. victorialogs: container_name: victorialogs - image: docker.io/victoriametrics/victoria-logs:v0.37.0-victorialogs + image: victoriametrics/victoria-logs:v0.37.0-victorialogs command: - "--storageDataPath=/vlogs" - "--httpListenAddr=:9428" @@ -69,29 +69,50 @@ services: - vm_net restart: always - # vmalert executes alerting and recording rules + # vmauth is a router and balancer for HTTP requests. + # It proxies query requests from vmalert to either VictoriaMetrics or VictoriaLogs, + # depending on the requested path. + vmauth: + container_name: vmauth + image: victoriametrics/vmauth:v1.105.0 + depends_on: + - "victoriametrics" + - "victorialogs" + volumes: + - ./auth-mixed-datasource.yml:/etc/auth.yml + command: + - "--auth.config=/etc/auth.yml" + ports: + - 8427:8427 + networks: + - vm_net + restart: always + + # vmalert executes alerting and recording rules according to given rule type. vmalert: container_name: vmalert image: victoriametrics/vmalert:v1.105.0 depends_on: - - "victoriametrics" + - "vmauth" - "alertmanager" + - "victoriametrics" ports: - 8880:8880 volumes: - - ./alerts.yml:/etc/alerts/alerts.yml - - ./alerts-health.yml:/etc/alerts/alerts-health.yml - - ./alerts-vlogs.yml:/etc/alerts/alerts-vlogs.yml - - ./alerts-vmalert.yml:/etc/alerts/alerts-vmalert.yml + # disable log-related rules for now, util vmalert supports vlogs type rule + # - ./rules/vlogs-example-alerts.yml:/etc/alerts/vlogs.yml + - ./rules/alerts.yml:/etc/alerts/alerts.yml + - ./rules/alerts-health.yml:/etc/alerts/alerts-health.yml + - ./rules/alerts-vmagent.yml:/etc/alerts/alerts-vmagent.yml + - ./rules/alerts-vmalert.yml:/etc/alerts/alerts-vmalert.yml command: - - "--datasource.url=http://victoriametrics:8428/" + - "--datasource.url=http://vmauth:8427/" - "--remoteRead.url=http://victoriametrics:8428/" - "--remoteWrite.url=http://victoriametrics:8428/" - "--notifier.url=http://alertmanager:9093/" - "--rule=/etc/alerts/*.yml" # display source of alerts in grafana - "--external.url=http://127.0.0.1:3000" #grafana outside container - - '--external.alert.source=explore?orgId=1&left={"datasource":"VictoriaMetrics","queries":[{"expr":{{.Expr|jsonEscape|queryEscape}},"refId":"A"}],"range":{"from":"{{ .ActiveAt.UnixMilli }}","to":"now"}}' networks: - vm_net restart: always diff --git a/deployment/docker/docker-compose.yml b/deployment/docker/docker-compose.yml index 341b3d321..8d279fba1 100644 --- a/deployment/docker/docker-compose.yml +++ b/deployment/docker/docker-compose.yml @@ -72,10 +72,10 @@ services: ports: - 8880:8880 volumes: - - ./alerts.yml:/etc/alerts/alerts.yml - - ./alerts-health.yml:/etc/alerts/alerts-health.yml - - ./alerts-vmagent.yml:/etc/alerts/alerts-vmagent.yml - - ./alerts-vmalert.yml:/etc/alerts/alerts-vmalert.yml + - ./rules/alerts.yml:/etc/alerts/alerts.yml + - ./rules/alerts-health.yml:/etc/alerts/alerts-health.yml + - ./rules/alerts-vmagent.yml:/etc/alerts/alerts-vmagent.yml + - ./rules/alerts-vmalert.yml:/etc/alerts/alerts-vmalert.yml command: - "--datasource.url=http://victoriametrics:8428/" - "--remoteRead.url=http://victoriametrics:8428/" diff --git a/deployment/docker/alerts-cluster.yml b/deployment/docker/rules/alerts-cluster.yml similarity index 100% rename from deployment/docker/alerts-cluster.yml rename to deployment/docker/rules/alerts-cluster.yml diff --git a/deployment/docker/alerts-health.yml b/deployment/docker/rules/alerts-health.yml similarity index 100% rename from deployment/docker/alerts-health.yml rename to deployment/docker/rules/alerts-health.yml diff --git a/deployment/docker/alerts-vmagent.yml b/deployment/docker/rules/alerts-vmagent.yml similarity index 100% rename from deployment/docker/alerts-vmagent.yml rename to deployment/docker/rules/alerts-vmagent.yml diff --git a/deployment/docker/alerts-vmalert.yml b/deployment/docker/rules/alerts-vmalert.yml similarity index 100% rename from deployment/docker/alerts-vmalert.yml rename to deployment/docker/rules/alerts-vmalert.yml diff --git a/deployment/docker/alerts-vmauth.yml b/deployment/docker/rules/alerts-vmauth.yml similarity index 100% rename from deployment/docker/alerts-vmauth.yml rename to deployment/docker/rules/alerts-vmauth.yml diff --git a/deployment/docker/alerts.yml b/deployment/docker/rules/alerts.yml similarity index 100% rename from deployment/docker/alerts.yml rename to deployment/docker/rules/alerts.yml diff --git a/deployment/docker/rules/vlogs-example-alerts.yml b/deployment/docker/rules/vlogs-example-alerts.yml new file mode 100644 index 000000000..7ba25c9ea --- /dev/null +++ b/deployment/docker/rules/vlogs-example-alerts.yml @@ -0,0 +1,13 @@ +groups: + - name: TestGroup + type: vlogs + interval: 1m + rules: + - record: logCount + expr: '_time: 1m | stats by (path) count () as total' + annotations: + description: "path {{$labels.path}} generated {{$value}} logs in the last 1 minute" + - alert: tooManyLogs + expr: '_time: 1m | stats by (path) count () as total | filter total:>50' + annotations: + description: "path {{$labels.path}} generated more than 50 log entries in the last 1 minute: {{$value}}" diff --git a/docs/VictoriaLogs/vmalert.md b/docs/VictoriaLogs/vmalert.md new file mode 100644 index 000000000..db1feaa1c --- /dev/null +++ b/docs/VictoriaLogs/vmalert.md @@ -0,0 +1,207 @@ +--- +weight: 10 +title: vmalert +menu: + docs: + parent: "victorialogs" + weight: 10 +aliases: +- /VictoriaLogs/vmalert.html +--- + +_Available from [TODO](https://docs.victoriametrics.com/changelog/#TODO) vmalert version and [v0.36.0](https://docs.victoriametrics.com/victorialogs/changelog/#v0360) VictoriaLogs version._ + +[vmalert](https://docs.victoriametrics.com/vmalert/) integrates with VictoriaLogs via stats APIs [`/select/logsql/stats_query`](https://docs.victoriametrics.com/victorialogs/querying/#querying-log-stats) +and [`/select/logsql/stats_query_range`](https://docs.victoriametrics.com/victorialogs/querying/#querying-log-range-stats). +These endpoints return the log stats in a format compatible with [Prometheus querying API](https://prometheus.io/docs/prometheus/latest/querying/api/#instant-queries). +It allows using VictoriaLogs as the datasource in vmalert, creating alerting and recording rules via [LogsQL](https://docs.victoriametrics.com/victorialogs/logsql/). + +_Note: This page provides only integration instructions for vmalert and VictoriaLogs. See the full textbook for vmalert [here](https://docs.victoriametrics.com/vmalert)._ + +## Quick Start + +Run vmalert with `-rule.defaultRuleType=vlogs` cmd-line flag. +``` +./bin/vmalert -rule=alert.rules \ # Path to the files or http url with alerting and/or recording rules in YAML format. + -datasource.url=http://localhost:9428 \ # VictoriaLogs address. + -rule.defaultRuleType=vlogs \ # Set default rules type to VictoriaLogs. + -notifier.url=http://localhost:9093 \ # AlertManager URL (required if alerting rules are used) + -remoteWrite.url=http://localhost:8428 \ # Remote write compatible storage to persist rules and alerts state info (required for recording rules) + -remoteRead.url=http://localhost:8428 \ # Prometheus HTTP API compatible datasource to restore alerts state from +``` + +> See the full list of configuration flags and their descriptions in [configuration](#configuration) section. + +> Each `-rule` file may contain arbitrary number of [groups](https://docs.victoriametrics.com/vmalert/#groups). +See examples in [Groups](#groups) section. + +With configuration example above, vmalert will perform the following interactions: +![vmalert](vmalert_victorialogs.webp) + +1. Rules listed in `-rule` file are executed against VictoriaLogs service configured via `-datasource.url`; +2. Triggered alerting notifications are sent to [Alertmanager](https://github.com/prometheus/alertmanager) service configured via `-notifier.url`; +3. Results of recording rules expressions and alerts state are persisted to Prometheus-compatible remote-write endpoint (i.e. VictoriaMetrics) configured via `-remoteWrite.url`; +4. On vmalert restarts, alerts state [can be restored](https://docs.victoriametrics.com/vmalert/#alerts-state-on-restarts) by querying Prometheus-compatible HTTP API endpoint (i.e. VictoriaMetrics) configured via `-remoteRead.url`. + +## Configuration + +### Flags + +For a complete list of command-line flags, visit https://docs.victoriametrics.com/vmalert/#flags or execute `./vmalert --help` command. +The following are key flags related to integration with VictoriaLogs: + +``` +-datasource.url string + Datasource address supporting log stats APIs, which can be a single VictoriaLogs node or a proxy in front of VictoriaLogs. Supports address in the form of IP address with a port (e.g., http://127.0.0.1:8428) or DNS SRV record. +-notifier.url array + Prometheus Alertmanager URL, e.g. http://127.0.0.1:9093. List all Alertmanager URLs if it runs in the cluster mode to ensure high availability. + Supports an array of values separated by comma or specified via multiple flags. + Value can contain comma inside single-quoted or double-quoted string, {}, [] and () braces. +-remoteWrite.url string + Optional URL to VictoriaMetrics or vminsert where to persist alerts state and recording rules results in form of timeseries. Supports address in the form of IP address with a port (e.g., http://127.0.0.1:8428) or DNS SRV record. For example, if -remoteWrite.url=http://127.0.0.1:8428 is specified, then the alerts state will be written to http://127.0.0.1:8428/api/v1/write . See also -remoteWrite.disablePathAppend, '-remoteWrite.showURL'. +-remoteRead.url string + Optional URL to datasource compatible with Prometheus HTTP API. It can be single node VictoriaMetrics or vmselect.Remote read is used to restore alerts state.This configuration makes sense only if vmalert was configured with `remoteWrite.url` before and has been successfully persisted its state. Supports address in the form of IP address with a port (e.g., http://127.0.0.1:8428) or DNS SRV record. See also '-remoteRead.disablePathAppend', '-remoteRead.showURL'. +-rule array + Path to the files or http url with alerting and/or recording rules in YAML format. + Supports hierarchical patterns and regexpes. + Examples: + -rule="/path/to/file". Path to a single file with alerting rules. + -rule="http:///path/to/rules". HTTP URL to a page with alerting rules. + -rule="dir/*.yaml" -rule="/*.yaml" -rule="gcs://vmalert-rules/tenant_%{TENANT_ID}/prod". + -rule="dir/**/*.yaml". Includes all the .yaml files in "dir" subfolders recursively. + Rule files support YAML multi-document. Files may contain %{ENV_VAR} placeholders, which are substituted by the corresponding env vars. + Enterprise version of vmalert supports S3 and GCS paths to rules. + For example: gs://bucket/path/to/rules, s3://bucket/path/to/rules + S3 and GCS paths support only matching by prefix, e.g. s3://bucket/dir/rule_ matches + all files with prefix rule_ in folder dir. + Supports an array of values separated by comma or specified via multiple flags. + Value can contain comma inside single-quoted or double-quoted string, {}, [] and () braces. +-rule.defaultRuleType + Default type for rule expressions, can be overridden by type parameter inside the rule group. Supported values: "graphite", "prometheus" and "vlogs". + Default is "prometheus", change it to "vlogs" if all of the rules are written with LogsQL. +-rule.evalDelay time + Adjustment of the time parameter for rule evaluation requests to compensate intentional data delay from the datasource. Normally, should be equal to `-search.latencyOffset` (cm d-line flag configured for VictoriaMetrics single-node or vmselect). + Since there is no intentional search delay in VictoriaLogs, `-rule.evalDelay` can be reduced to a few seconds to accommodate network and ingestion time. +``` + +For more configuration options, such as `notifiers`, visit https://docs.victoriametrics.com/vmalert/#configuration. + +### Groups + +Check the complete group attributes [here](https://docs.victoriametrics.com/vmalert/#groups). + +#### Alerting rules + +Examples: +``` +groups: + - name: ServiceLog + interval: 5m + rules: + - alert: HasErrorLog + expr: 'env: "prod" AND status:~"error|warn" | stats by (service) count() as errorLog | filter errorLog:>0' + annotations: + description: "Service {{$labels.service}} generated {{$labels.errorLog}} error logs in the last 5 minutes" + + - name: ServiceRequest + interval: 5m + rules: + - alert: TooManyFailedRequest + expr: '* | extract "ip= " | extract "status_code=;" | stats by (ip, code) count() if (code:~4.*) as failed, count() as total| math failed / total as failed_percentage| filter failed_percentage :> 0.01 | fields ip,failed_percentage' + annotations: + description: "Connection from address {{$labels.ip}} has {{$value}}% failed requests in last 5 minutes" +``` + +#### Recording rules + +Examples: +``` +groups: + - name: RequestCount + interval: 5m + rules: + - record: nginxRequestCount + expr: 'env: "test" AND service: "nginx" | stats count(*) as requests' + annotations: + description: "Service nginx on env test accepted {{$labels.requests}} requests in the last 5 minutes" + - record: prodRequestCount + expr: 'env: "prod" | stats by (service) count(*) as requests' + annotations: + description: "Service {{$labels.service}} on env prod accepted {{$labels.requests}} requests in the last 5 minutes" +``` + +## Time filter + +It's recommended to omit the [time filter](https://docs.victoriametrics.com/victorialogs/logsql/#time-filter) in rule expression. +By default, vmalert automatically appends the time filter `_time: ` to the expression. +For instance, the rule below will be evaluated every 5 minutes, and will return the result with logs from the last 5 minutes: +``` +groups: + interval: 5m + rules: + - alert: TooManyFailedRequest + expr: '* | extract "ip= " | extract "status_code=;" | stats by (ip, code) count() if (code:~4.*) as failed, count() as total| math failed / total as failed_percentage| filter failed_percentage :> 0.01 | fields ip,failed_percentage' + annotations: "Connection from address {{$labels.ip}} has {{$$value}}% failed requests in last 5 minutes" +``` + +User can also specify a customized time filter if needed. For example, rule below will be evaluated every 5 minutes, +but will calculate result over the logs from the last 10 minutes. +``` +groups: + interval: 5m + rules: + - alert: TooManyFailedRequest + expr: '_time: 10m | extract "ip= " | extract "status_code=;" | stats by (ip, code) count() if (code:~4.*) as failed, count() as total| math failed / total as failed_percentage| filter failed_percentage :> 0.01 | fields ip,failed_percentage' + annotations: "Connection from address {{$labels.ip}} has {{$$value}}% failed requests in last 10 minutes" +``` + +Please note, vmalert doesn't support [backfilling](#rules-backfilling) for rules with a customized time filter now. (Might be added in future) + +## Rules backfilling + +vmalert supports alerting and recording rules backfilling (aka replay) against VictoriaLogs as the datasource. +``` +./bin/vmalert -rule=path/to/your.rules \ # path to files with rules you usually use with vmalert + -datasource.url=http://localhost:9428 \ # VictoriaLogs address. + -rule.defaultRuleType=vlogs \ # Set default rule type to VictoriaLogs. + -remoteWrite.url=http://localhost:8428 \ # Remote write compatible storage to persist rules and alerts state info + -replay.timeFrom=2021-05-11T07:21:43Z \ # to start replay from + -replay.timeTo=2021-05-29T18:40:43Z # to finish replay by, is optional +``` + +See more details about backfilling [here](https://docs.victoriametrics.com/vmalert/#rules-backfilling). + +## Performance tip + +LogsQL allows users to obtain multiple stats from a single expression. +For instance, the following query calculates 50th, 90th and 99th percentiles for the `request_duration_seconds` field over logs for the last 5 minutes: + +``` +_time:5m | stats + quantile(0.5, request_duration_seconds) p50, + quantile(0.9, request_duration_seconds) p90, + quantile(0.99, request_duration_seconds) p99 +``` + +This expression can also be used in recording rules as follows: +``` +groups: + - name: requestDuration + interval: 5m + rules: + - record: requestDurationQuantile + expr: '_time:5m | stats by (service) quantile(0.5, request_duration_seconds) p50, quantile(0.9, request_duration_seconds) p90, quantile(0.99, request_duration_seconds) p99' +``` +This creates three metrics for each service: +``` +requestDurationQuantile{stats_result="p50", service="service-1"} +requestDurationQuantile{stats_result="p90", service="service-1"} +requestDurationQuantile{stats_result="p99", service="service-1"} + +requestDurationQuantile{stats_result="p50", service="service-2"} +requestDurationQuantile{stats_result="p90", service="service-2"} +requestDurationQuantile{stats_result="p00", service="service-2"} +... +``` + +For additional tips on writing LogsQL, refer to this [doc](https://docs.victoriametrics.com/victorialogs/logsql/#performance-tips). \ No newline at end of file diff --git a/docs/VictoriaLogs/vmalert_victorialogs.excalidraw b/docs/VictoriaLogs/vmalert_victorialogs.excalidraw new file mode 100644 index 000000000..a3bc8bbb5 --- /dev/null +++ b/docs/VictoriaLogs/vmalert_victorialogs.excalidraw @@ -0,0 +1,687 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://excalidraw.com", + "elements": [ + { + "type": "rectangle", + "version": 803, + "versionNonce": 1128884469, + "index": "a0", + "isDeleted": false, + "id": "VgBUzo0blGR-Ijd2mQEEf", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 422.3502197265625, + "y": 215.55953979492188, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 123.7601318359375, + "height": 72.13211059570312, + "seed": 1194011660, + "groupIds": [ + "iBaXgbpyifSwPplm_GO5b" + ], + "frameId": null, + "roundness": null, + "boundElements": [ + { + "type": "arrow", + "id": "sxEhnxlbT7ldlSsmHDUHp" + }, + { + "id": "wRO0q9xKPHc8e8XPPsQWh", + "type": "arrow" + }, + { + "id": "Bpy5by47XGKB4yS99ZkuA", + "type": "arrow" + } + ], + "updated": 1728889265677, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 660, + "versionNonce": 130510869, + "index": "a1", + "isDeleted": false, + "id": "e9TDm09y-GhPm84XWt0Jv", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 443.89678955078125, + "y": 236.64378356933594, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 82, + "height": 24, + "seed": 327273100, + "groupIds": [ + "iBaXgbpyifSwPplm_GO5b" + ], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1728889112138, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": "vmalert", + "textAlign": "center", + "verticalAlign": "middle", + "containerId": null, + "originalText": "vmalert", + "autoResize": true, + "lineHeight": 1.2 + }, + { + "type": "rectangle", + "version": 2608, + "versionNonce": 1050127035, + "index": "a2", + "isDeleted": false, + "id": "dd52BjHfPMPRji9Tws7U-", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 774.7067312730577, + "y": 231.9532470703125, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 275.7981470513237, + "height": 39.621179787868925, + "seed": 1779959692, + "groupIds": [ + "2Lijjn3PwPQW_8KrcDmdu" + ], + "frameId": null, + "roundness": null, + "boundElements": [ + { + "id": "Bpy5by47XGKB4yS99ZkuA", + "type": "arrow" + } + ], + "updated": 1728889420961, + "link": null, + "locked": false + }, + { + "type": "rectangle", + "version": 1099, + "versionNonce": 499029243, + "index": "a6", + "isDeleted": false, + "id": "8-XFSbd6Zw96EUSJbJXZv", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 371.7434387207031, + "y": 398.50787353515625, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 240.10644531249997, + "height": 44.74725341796875, + "seed": 99322124, + "groupIds": [ + "6obQBPHIfExBKfejeLLVO" + ], + "frameId": null, + "roundness": null, + "boundElements": [ + { + "type": "arrow", + "id": "sxEhnxlbT7ldlSsmHDUHp" + } + ], + "updated": 1728889112138, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 865, + "versionNonce": 316509237, + "index": "a7", + "isDeleted": false, + "id": "GUs816aggGqUSdoEsSmea", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 393.73809814453125, + "y": 410.5976257324219, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 199, + "height": 24, + "seed": 1194745268, + "groupIds": [ + "6obQBPHIfExBKfejeLLVO" + ], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1728889112138, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": "alertmanager:9093", + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "alertmanager:9093", + "autoResize": true, + "lineHeight": 1.2 + }, + { + "type": "arrow", + "version": 3377, + "versionNonce": 359177051, + "index": "a8", + "isDeleted": false, + "id": "Bpy5by47XGKB4yS99ZkuA", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 556.6860961914062, + "y": 252.95352770712083, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 202.02063508165145, + "height": 0.22881326742660235, + "seed": 357577356, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1728889420962, + "link": null, + "locked": false, + "startBinding": { + "elementId": "VgBUzo0blGR-Ijd2mQEEf", + "focus": 0.0344528515859526, + "gap": 10.57574462890625 + }, + "endBinding": { + "elementId": "dd52BjHfPMPRji9Tws7U-", + "focus": -0.039393828258510157, + "gap": 16 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 202.02063508165145, + -0.22881326742660235 + ] + ] + }, + { + "type": "arrow", + "version": 1460, + "versionNonce": 492906299, + "index": "a9", + "isDeleted": false, + "id": "wRO0q9xKPHc8e8XPPsQWh", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 406.0439244722469, + "y": 246.6775563467225, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 161.00829839007181, + "height": 2.320722012761223, + "seed": 656189364, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1728889313672, + "link": null, + "locked": false, + "startBinding": { + "elementId": "VgBUzo0blGR-Ijd2mQEEf", + "focus": 0.13736472619498497, + "gap": 16.306295254315614 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -161.00829839007181, + -2.320722012761223 + ] + ] + }, + { + "type": "text", + "version": 567, + "versionNonce": 737159899, + "index": "aA", + "isDeleted": false, + "id": "RbVSa4PnOgAMtzoKb-DhW", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 552.4987182617188, + "y": 212.27996826171875, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 187.75, + "height": 95, + "seed": 1989838604, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [ + { + "id": "ijEBAhsESSoR3zLPouUVM", + "type": "arrow" + } + ], + "updated": 1728889402055, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "persist alerts state\nand recording rules\n\n\n", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "persist alerts state\nand recording rules\n\n\n", + "autoResize": true, + "lineHeight": 1.1875 + }, + { + "type": "text", + "version": 830, + "versionNonce": 1996455189, + "index": "aB", + "isDeleted": false, + "id": "ia2QzZNl_tuvfY3ymLjyJ", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 279.55224609375, + "y": 218.88568115234375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 122, + "height": 19, + "seed": 157304972, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [ + { + "type": "arrow", + "id": "wRO0q9xKPHc8e8XPPsQWh" + } + ], + "updated": 1728889440112, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "execute rules", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "execute rules", + "autoResize": true, + "lineHeight": 1.1875 + }, + { + "type": "arrow", + "version": 1476, + "versionNonce": 1814378875, + "index": "aC", + "isDeleted": false, + "id": "sxEhnxlbT7ldlSsmHDUHp", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 484.18669893674246, + "y": 302.3424013553929, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 1.0484739253853945, + "height": 84.72775855671654, + "seed": 1818348300, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1728889265678, + "link": null, + "locked": false, + "startBinding": { + "elementId": "VgBUzo0blGR-Ijd2mQEEf", + "focus": 0.010768924644894236, + "gap": 14.650750964767894 + }, + "endBinding": { + "elementId": "8-XFSbd6Zw96EUSJbJXZv", + "focus": -0.051051952959743775, + "gap": 11.437713623046818 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 1.0484739253853945, + 84.72775855671654 + ] + ] + }, + { + "type": "text", + "version": 631, + "versionNonce": 1909410773, + "index": "aD", + "isDeleted": false, + "id": "E9Run6wCm2chQ6JHrmc_y", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 504.27996826171875, + "y": 322.13031005859375, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 122, + "height": 38, + "seed": 1836541708, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [ + { + "type": "arrow", + "id": "sxEhnxlbT7ldlSsmHDUHp" + } + ], + "updated": 1728889430719, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "send alert \nnotifications", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "send alert \nnotifications", + "autoResize": true, + "lineHeight": 1.1875 + }, + { + "type": "text", + "version": 579, + "versionNonce": 326648123, + "index": "aE", + "isDeleted": false, + "id": "ff5OkfgmkKLifS13_TFj3", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 591.5895843505859, + "y": 269.2361297607422, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 121.875, + "height": 19, + "seed": 264004620, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [ + { + "type": "arrow", + "id": "wRO0q9xKPHc8e8XPPsQWh" + } + ], + "updated": 1728889436228, + "link": null, + "locked": false, + "fontSize": 16, + "fontFamily": 3, + "text": "restore state", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "restore state", + "autoResize": true, + "lineHeight": 1.1875 + }, + { + "type": "text", + "version": 1141, + "versionNonce": 39140603, + "index": "aG", + "isDeleted": false, + "id": "J2AqHIHYjG3cvxrBLonQW", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 782.2813415527344, + "y": 238.312045541553, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 254.41375732421875, + "height": 26.05968577236269, + "seed": 254079515, + "groupIds": [ + "fw8b83Mw6tGXQ80jfC5Jx" + ], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1728889417069, + "link": null, + "locked": false, + "fontSize": 21.716404810302244, + "fontFamily": 3, + "text": "victoriametrics:8428", + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "victoriametrics:8428", + "autoResize": true, + "lineHeight": 1.2 + }, + { + "type": "rectangle", + "version": 2824, + "versionNonce": 1550880827, + "index": "aH", + "isDeleted": false, + "id": "Whj4hd3Al6CbvGs7cQuWk", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": -11.824915810818197, + "y": 223.79106415879994, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 248.85674080132372, + "height": 40.562586037868925, + "seed": 1519267323, + "groupIds": [ + "skPAIqL9ijNA0WE5GV8Gv" + ], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1728889342561, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1290, + "versionNonce": 1222168987, + "index": "aI", + "isDeleted": false, + "id": "NJgvtn8_Kzy1quxMqyfAr", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 8.194007518174999, + "y": 231.4272063800404, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 216.25169372558594, + "height": 26.05968577236269, + "seed": 1311553179, + "groupIds": [ + "3JfeRMxXtVafxucZgxKNy" + ], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1728889339478, + "link": null, + "locked": false, + "fontSize": 21.716404810302244, + "fontFamily": 3, + "text": "victorialogs:9428", + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "victorialogs:9428", + "autoResize": true, + "lineHeight": 1.2 + }, + { + "id": "ijEBAhsESSoR3zLPouUVM", + "type": "arrow", + "x": 754.5486716336245, + "y": 263.63184005775634, + "width": 200.78701391878076, + "height": 0.03213913002196023, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "aJ", + "roundness": { + "type": 2 + }, + "seed": 1284919637, + "version": 349, + "versionNonce": 186313781, + "isDeleted": false, + "boundElements": null, + "updated": 1728889427809, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -200.78701391878076, + -0.03213913002196023 + ] + ], + "lastCommittedPoint": null, + "startBinding": { + "elementId": "RbVSa4PnOgAMtzoKb-DhW", + "focus": -0.0807019799085118, + "gap": 14.299953371905758, + "fixedPoint": null + }, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + } + ], + "appState": { + "gridSize": 20, + "gridStep": 5, + "gridModeEnabled": false, + "viewBackgroundColor": "#ffffff" + }, + "files": {} +} \ No newline at end of file diff --git a/docs/VictoriaLogs/vmalert_victorialogs.webp b/docs/VictoriaLogs/vmalert_victorialogs.webp new file mode 100644 index 0000000000000000000000000000000000000000..f199a054ea6486c9501b1c9cdbc3b5f0e76c50fe GIT binary patch literal 41810 zcmdqHbCjmdvM2hMZQJa!ZJS-TZM(Xv%eKuf+je!?wry8Uf8Rc{&$(yz+_m=1{p)6~ z%!tU0Hx>D2{4&?0Bq=5)RR92}i3%xvSKv^G1^@trf07L(01p@-DJ-lo0`x}&0FC^W zgEIW7v2}J-5*H#=*U%({*aiUoiGK$JBPaWRaQ`y@qxHD>58XN1f2r~RUI=Au;$-wk z<@!$|b^O!$pE05S;Ze>0!BhUl8~%gm`HOdRws-!cqwp8+sG=nNhd2JiQ=0u3-tfQh zM)r<>=|}$2;jyuH`KzzL!e6t4HL+Dy{zD=EBwTN zVA>5h3y9hl5+9fk3pQAY2$Vd41{7dGOS=`}#G`KX3_gg|m(!j95ghZ0@x?&j!%iL7 z&EY5PhxbnNVfQk6lQYYo;AizA@Hz2m_fFCD75e_;cIvWwyF1@c?@Rbo`O55AZ~E)o zN7%ji8^VaZ6MxtT>r2cd|CQd{SEFCg7w5CuL-jF1l-}~!m|yK<^{)J7PEz-dpDkan zAKWL(d;J^2Q}wCe^4H2&=99%2#4Sj_uo)$da8%Wut>|MTpV{T%niE|I@Gdx%(yOk>Iv_`)k5) z;0xjF=;P^_{w8LBYvrr~#(;`Ptbjs)FK&xf<6>c7Yd;T;D-2`26E)+cgJrT*-YoEqA> z4^FQ7hui&&HDE?@O3++9)WG`^y~;Owv|xZ&P%=C}ThthG?!urSG8fnh8UJCfBFVg$KMQX+OlsF#Mw|^KDxI>IvWKh=O2GI1D{p_ ze)W=oT~vN)HY9<97>D^}AX!U>z;Qa6e)VVzT9hAczk42pYFAjENdoLPmQUo;x%>G( z{*rP>f2jAnJI#;j)8u{p)Dp^+NFOuYtX>7&R~H4*rM2^K9U7&q`LB70EdAl@9M%v&vHA3Se}KbcGW;t7H}Vix{%>zhBVys+=fwD;x3iQF6%=SC2GiTZjFKKrP(UENDkOCGcnLU+uc=&PSM zx_fp#s`V|vOILB4KaXjCrpDm_>}3ov^%!b zWUVaYP+hYl3y%ou$sd0Z64<`)BG>8Rpa!x;8%BbDnFI$Q0)msG0is#G*FA}sHp{;DUKNofgL_ zlKL=6eu5aqKvMX?yL?_h6H1$x_UcH360PJLJU{xJL~nuR28hXfkj75}+!f=8rgi|3 zzUlF8=A0&;a)QVsSt<#n(5r>uw5<>p_oy8L%e{DtNPQlnDuyqw^izbarVH}}ygs6x z*_Aas*ed&ksOB4~Kcp3mcMHD&fyeO_prAy2^AmroKRQ(2TTT(68r$1-rFRE=XlK3c z-Dz|zR9E|xhT>qJBHFAKzCq0yYIw`lRlwbZkJ*np1LCJnJXM{jgTQZ6)dW*$K9dS1 zldlLrcyJdsGIy;WS5~2^8s2egiT7nmka&8+sA5TXanW`6q+6G87NUB0E4T+wc%vc& zmU0KG5;%oiHjBVYc^%}b$-o9Fg~RTdkFZOcqFc8)9cR<|;ug}!QCg$-kGywLNSFp1 z=5Ltc(t6vH&5?-uLqkOJ#hoF5qNfInfVNYj z^L;*2>&DNeamhs|Wi7tc>;C@2wDj1z%Jroc1rFpsN`Z92FZFL&r8NjWZ)x<#zLq;W zL>?9Z;+>%QniFZlcDfBPsG(&+z4Yi0SBHt?Q3{zUW6yJ1g;vdn2_jv2R&tqRd9eT% zLV1(m343X+u4gOHy%*eI=n7XTV+kjo0vic9r{a@SJEKfbUV7?n6u>;Ld*zehjSUsE z^W)#)-TzS(t>@F(V|Igg)l01}6*)0X6rjxGJo;H{tNDgLek)}1?7OIsa~%<-lliVR zeli*Ay(Cam95r@bSi>kK8Ds{DD$;$!gMSahRZ)0cEUn+`KT#T`xJzqJ_BfF!6Hkix z4Rms@2?jDHQ2H6mo8ExtgN2{BV$I3cz#{l;aSjr1*uj69O<^Z!GtTQj&McF*I*so) zt#ojCo>B^2=?P*OrCa{u525h#H&rkQ_lJX$$Df(?WjjYvmSFEY+IFIMyOjAh;D$J4 zD0=vZ#L0g1HwfBPtZ>P7UVk4VU5%FK=n4fw85fX>=x6Kvj`_-;gOEvHc?j2q2@JV||8mK$Qt`P3uv zAAExYnL^yc!b+rm;zCjckSf`xXMa~U8-EkgPL}|-sQS&W7jj4|J^@wTUlUAZ z`-mFAyk~8wc{I9Y07it&lZT^3!)*s7pdHh~l#w{1kS7!jjY|0+1c&{9Nzu`$m5uuFD-zWJTZ?TumW7-Ats@Y!$`y6l4F#FSA{w5d=4+R9PiRA07{#K`w zLO6Ba4Ub$!gli;lH=bb;zUpui(i)|GUigA%I1V@eHcdaIVc>D|TPc?G?RRRnpB|RI zv-`SAbwvRTghr={9&GKPx?B1(keIJU__9^K7|qis0U!h_1*472#E);l`U1lXl(#mn zkeyvUsfdgZQalMZov^oK9AMi>#Qz&a6)}?a*MN(y`MCT^U`AxT8_EEv*{ERT%yco0 zjvGXUepX8;(o=c_GXt=$+1x9HCHEb_p>ScWB=MlI$)lE3onO)1<{MViOZ_P5p>ol7XlDh9obZ8ucxrv`D$R9-y_1VZqxc1;`4`(c~ zxUpbAo=oSiIj!iKzT_f0vdbz8ZuIsn#(fI zGu&kfh4M-ruRK-J8P)$sb`A~jGAvkfFOD{#w}MguSFQ5nKbKUT%P@#zinnf%SQ#tt z{2BsmfX-HrE&`xzw)mALrJNlM%sU%?SYgIGj7ZbnOmR#n%{&SO(%l=oDPuGzJOw~h zp`@IUSjdh%im^<5ySGia)cTJj>fc)mN4Y%F>f~syA#`96pX#xDjaK4^GnF9dDt-Cm z(%~LVC#qjCX2yqmNFFl(6J-CZzw$rr`u{}aKgM}-X9fUQBm4+PXe&vQe!hP|`oHn} z|Ef$s2MxO9k|_mKvW|A}H`@O{YzXQlWW(QfzbyFU|FD67bpA^9PrvhTjRsO)8X#XF z7KP1XKJ(v6*EpHLP_~z0B%=CIwc}g4Y3x~t zg3fi+5OeYbd4_-LP}PxY>dA~RhXwJj?fH%KQ-1BxA?BWyVMze=NWUZo_*T#CV$Dn?zPLGCSZ9Cl$_;%$o{^4YmlKNT;~~AxrJw5CecBEZ!C| zrd&~hg%8EnWuiPSE#OE&-M0zVcojU8vQc|)NZ{j_GxiDc8}YadA;@f7Z3)&_%}rRzw>wh^6>~00QmgG z|NC9`A8&&|ri)c?rI~;}&M4&iBMv)df-_C=l;Q8N^+34g7&|_UJ<-@a#&29h2M*1a zmK?(U$`XwfAWWlCfzWl96emlYmYAa7Fylc&?eEtAzW1SE^ob_%etH*Sq{u95kl|_}UU$-%{i=9NH{uf0v{vk$Z@AG2zAf# z%VUiUA-}~h1T@@_q{P&}Fn2I(rTw-s*{680JvQLjITXuT-k4u1uQw*9cinl)&ch`) zN`AEfl(9Js^9Hj^;Vb8+o2>*v_kDGX!(P<{nrSF>MwF<#OP)L+%{LI#%_ZDWt-Ikw zyZDi_^M->a)a}lnnymILG`2$Q+cvR3I|JN3K5KBnIO*lqVTYO42_blEVZXs7OUW$a?4Jp{kand?BZJ4SCZX)~;fTZO5|Hz%d|+DTnI z5JQNbcvETy!`*Se<8knm0y!9qif}gpyjOr4IrhW2S6chvxFQbIL}y+XiM3tI@&wLAfqBPke=0<&Uz}MpFT1m2Ru6Z)lwRLcw zE^oINx%8jb;DY-dG(w`gqJif`s>%_0v!jO4Xy|`n@)l__>V?2ZB8W_1pM$31bD;?G z;r_#h+J8H$a--1gcOp1smg!Dw(vpGss(MOiefc{n2-U9uMnXvQc}Om_FUq8Yls*@J z&)StZR_&Yv2urL{QTWHR^EY6=%ik#nLal5<_xG;{Rq*2CJTu z3i{ODlD=!gyO&*3XYSk>XKH;$#|4`7o}8`Fv`?B2jAQfGesk<;jJVDRV!-)eOkvXZ zDH!xNW`<7;JxJiD@*Va(t#nK5BbZIv$t2bI z;Zh?Ww%XTSTq&H6R-B15N$-_oyFW^#U@!ad`;Z&E%kB*~A#1RGT`xXT-0rt3$~iN% zYd`esboR{gSCKnE<%4{0e#TPzul+BG`O3A;_KLL8i0@p?tZm1JKV3oXi+`RhLeKjU zJQmBiN@&;R{Ms+VoX_TWlWt@dRUK%QKUxjDQZ0aqzou1QNgl@|s+^c!`S~p2vtY2H z=CRSa6*0~|wSnoVpG`D5mxHvX#2cy0=Dw_t{bQG>Qo9rTz8BoL6lwG~h#iUed!`p| zkmYJkp!?vk>N@!gPoLK9rO7P+5O$~JxiO*g!6afovOOub?=&-HLA65UdmrumK9R-z zXuB$U^Z2ithFH8dbKn{7pbGD3-JAzfkIqH0Zwy|&38S&5(!bP1s2q{}>fDmpxSdh6 zawo?!lugFnmqp&y-6%)E{CW2j2M)*rE}dpNu^7od6M zm@(_Wcc>*nTxeUyU>lRlCk%Y-!+j34J2cks?fSI+Z zM_^W))k&OS@r+*63Vee=Bf!eAg5%FJ$1%hMAhnf`1KwwA&=YFND8tNvn-d19d&Wcn z?CnOkSa}e6qK^l1JH_euee$YK=Gr)~45lJ&GYM=uK@b+mkr?_ULS-VKOlo z5TA)EOfuVLr&6FJGAQrm70~di?o}$-rt-kS$?6o7EYt5TpaOQ%JdGJHN4H5S zTuJlL@H=~Dy5+NkVbiut0k0KAWjb*%<1xe<-1upa9vkQnoZK<`jPEEsd+_aDh_Rz7|$aAc5GT;WI3G=ey{p~ z2A`+O!2}2013|-GQ{U*(3T28|FX3f`sGV?L))F^-#BIi&xg%65rOk|2%tOy;F@sgQ zL&2_Im__0+jmX|%l^DDTNiJhBBGhA*%A(dhkB7h%#>H&vs9Zg!4_YWv*6?O0q$W3Q z#+(S$Z|u!?3B0*FXoi2as5v#Aglvq>cz3c?9w}?=54Z2LWz+aSQB^7y|e_>g^afqS0 z9?6TD!y>wc#LeshC`}kns7pXZo_tL($n?;~)i7xT#J^?xG`g-n_kywjGb(Q+QXn_^ zIllEjKf}CTXpp+5H)g{HNvB;LoXn&|jLv`YW-GIjuJa1K!iFV!W}xUuGq?Jbcj@i= zq$f*q11o2L>#uYGRVlnx;_N&wHAohke^-npjzk*XV2dVf6m>vICAoi_`pC)=777u# zSoEfdMaMx&F!+X@{A*8!J_3lhTLGmWyo`u!m3o}TWjT7Aomcy(tH=o~8PQ>SWVXMs zNQE$7y3qr*7|x;j#|x)Hh@ckkajZjlJme$|$4z9@sNV;nZI+e1s!auir6B(h(B6^X zwV?jQPczCRr=ND8<0%dP?>C)j#e1y#`7z>28tbt`y(XrEZe1-)1FkPwF~~AT3X4Kt z+D(VAU>A0zz-9%nY0LVwxUkFFP)oTYJlhPxNfnRpvHSyFdT6>cFJ|3-A?u(A%}>;trcz`+dGlvhA?Vtq^pKF39bL=a zT~gHbV0Vkq><(UMXL_rpp+G(43kj;De&h4=N0_XR4rM5OwZpLlvF?cUTCt=}LiD?wJ&Gv*BP z82#n*_mI|^RdxzFJ$qV4VZE}CmpZFGmr+FSwsPl!Zcubn%M=t!3v5-3_1Cdh_~umm zyUN#bts$Iz#Ek+p%qf4|^_hsA>KJC$-9;AfrcWZc3A991?~pAjJHU1LWa9Zr&vcJR zB~qO`bahTXh;h3E5qvTd?}kD+gGln@Y;IJJBsDIF`LDybuQ9cdP24U;+y3;HnpHOB zjuf!{M*9|f@P3RGa$r2(VJ;=#=;7lm+1%SMoPe0a74$~<{j@V<(r|0^DsRg$z({Nn zPQIej`QS#FyhcD4PH%9@h{9{^r&>1%JUS^9h{2WVFZT!!l+Y6oCfyY{3uChFws&at zr}z=biRXt5-6^Io!^V znxpmbWnM1Ql9c6;BoC!eO~`^34MLuS@9Oa<Ii=;&JXybz0s2 zl2kfnw5TgMzKQTpK)nVoE$5h?D}$uTExdOY3IERd7)j;(Nh~PWNh{_Xlt#B8Y2hDC z=_1t#!+_@F5rq%U^J8EqKDIi27R~{_<@@*(gWk8Jnav)a-d#IsfFTeagT{~~Q5^~r zM{*JQmaiTukn5RCP)3@GDGYcdN-t1)1gE1|*1N3=WCS2$e4~H>$vZ&X})AxNBB~K5H=RYDg$8m zD!FV|*S_<1xIcnt*h->r#IF#|+PHTw;WHVz<|~l-ni`B0hifAk_*pi$`w`N_=1U1W z+5&b*F~s=VbqaTep?m$=`?F$tM;%v}N%N<^C}|(!6in#TU`t7J8Nj7u{h#_AkSCR} z$f^##KGOVS&L5Y~_9{y%fKGFB#$sJqD39kRO!B@Tm$ivm`2s*x1|H|N=8|yjL;3)7 zDWg9CPtQnr&jwlAk#U0XdMDxHW6au7nAHFn9#kesGZPG3F*3TLwdFdUykQy`4GGnB z82AG~hMPr3=;E-GzTOcUhI#m*s+|+n(zk@`r?kek4OI?QBh-eaQv&@A=dkxc59M>^ zw!lpG%$#Q4sTv`qALvin};7UO^U5#?9n(O)-;EY zli_@-R?fo)Q-v*a@yW@DAU*qE_5A|a^hU#!+uLEUs@<o44@-JP$tD_V(VxcM7ip<@GIU$Og?D?EVH>*5Es21EwVGO>6KR(;zyxH zH|7ntsq;)eP9m{yNI+mmL(eF5LFrNBD$lK(#9)|)97l<{N^Tk!jBwVp;au6JyINkv zqBEP~^zvX2GdKyFJ=htyb@zRcpP)2J;&p3kD_s2A##@K&K->@LAOJqx@r-+Deg_(M zdYKaDd88kne8qu=3aDLa@C*0xSYV@2Ygo$a6qaMv_YAx#oH-o&Q*o?apx@3{)4<9` z0ExyrcUIJl$BBr();heNfQKkWBS4Y?!1Gpx7jo`QYKZ;I(Jq0X~m1`_@ zd5dNE&Ca#gS3=e zkR2xSw8jJo?fqN4pMNF+){9}98h*2YJ5fshl<~;4jK#8vA{dFM=uFt1)ww1)j;!+u zWw9=3`$1_$-nH;+O>V?<#?td+^bxKgnwYXI_4|~)6lb3gTl!(!)P449U2M;f=PeGd zkxnx@$`Dc!Y42W--rqk&kX8I6;5w=&qx8Q*V;u6~{KxpJqeTdV)_GkC9JSL84hVybJ24Z&_KnfWbh+a-g=y3bw%8bo>pV>$^^xNag{xzZ2;KaX`tH&) z9b)bTwD&o(WH%CS6v)F-#fR#dvJ7uQR3OQ1g)+CB>Y5GaX0V!Pug=SRG>7q=mmU{*h5yprEIOH%GgGDd_G^*n2iF3ZqsHsnLC5HGbyVh#BuP#fud6Yd=Cl4iBaKvH}*oTpC`R36cbuzb!`9lx5!^p8|y_3P$I@x z&r{%$^%UHd`xT&8xCl5=)sdPcx-+9i9fT>UF<9wJHPu~dUm z2A#hZKX;2vFFkLM(u);>og5qvP|*>w*{Z7JN>M0X-Hj0Cp5R=aq#3dC7J3<}8LW<% zzSKu4owu9wPk-AJ0o6F;A@&#&eX>~?bui8s&M$UE5k`uh4IneHcHJ?k-SgYzB_#v6|(`i_;D8K zzWkfaJMvYQ<-n9bWT2TSMUhk$VSP)#qjFRJ_k_->`-RclUf1{*fjmPrY!u0kiSy+^8 z>*;!O@a@(7ObiE+-i>~bUSsW2y3@mPmry24pz_!LKOa*KLhL}McR*ME`M4<$ETN{S zF;U*gFn0ptIX{FDPZcxh^=u5Ms|s_K4eX4wgp;RGnU-P!bIS!NU&_iDF5QvFq`wt8 z-3PZtygZ4UDU;wM_F)w41#50FJ0?pHRXC};w$2XYFZ4R>>W;!C*uk<37hSPP?moF^*@q;nz056Dyf4mxm#PTPw?C-xRjVA-JR!xjMt^^D zvF?dZffhK1=W|%8KIQ0Z0rtpu0C)%0Ca@Hrw-2AYb;3&%-^Tgrq*{#(K2qc!tSLK) zrxKLmH3-|ofA;+Xs@F*#9$Z$Dse~ivHqN*% z;GeC=?2Z((iDGST7SlwU*wJkIQpa;5s}$viRWcvV1ELBNipJpVp4lxJJL0&b&L5s$ zHd;~#GC}t;+Le<^5js!DA)ywpXcjaEO{FoTd?cz-tqD~Oo~nIj)2y@KV<^Lrmf5#( zuZ@v%ubBc#ljvCU-YwCJkXZn<8{`wc_|WYB&~*D&529=PLnF?& z@Df;f`gc#R;xFNH;KBl8$V6KuQKcvlY8-->jN`)^R@FYN(|Ao{fsu$Cb8$)(7V-Hk ziQFCR?diuYa3-AX?`)kLmv+E|`)k3No%A=7J!0~d3=qDZRD$jH02&zY+^^?Co7YSk=_s;t<}XXZyMA~OGwU8LVZzaSj@5FbU!k3PE9=AgrNHP5v> zjO+U8XihK=WUk=`Rq^eCyxrI&1^L@aPT~S?zrVO35zaD@@Q&`%rV*r!_Bs)U(y&~; zv}_mekr{vG=P%B3%ICSu)?9=WSam^g?c$8?N5?6dtvS|1!>S)=AIg;67wkQ+NJLiI z{?uma_S^a$M_i$kBQ~YH%=u}Q{Ayad*A+u)kHEK83WApUP^K^vZ~oI=rw4iv`%GzY zm?9%i1l_u1Cdg<;-kvjEGyyz@ob_So`>L}oQD@-v!V*5WA%s-|xfEWrkoukXV=v&|Jxn4}he_Vs;7gb(Sw$o9a0^Y)1#^7qx|h_)=#V3JV*3 z1=s7fm0+my+R9-^3ZuCIh?t9P5uOJwwZimIa@nBX)9b3RN-q0mZe}eNU~*Lv`I!Oh zcsb3TIR0n+Z)9V;N7Ob|RP5}HS6Bt>SP6U5A7U6CwF0?ovW4cnImNt#_+2W}~WUxn-n3HYj7u zYsF(3d;&UnkzBI?#aI?6mo4iG8dK|Ov=6XuCUyNSAjS3%1RXX=Z&v$HM!=rtQGJwN zlM1t)CVq+J0+-K@AE_K}>lb_M4>Q6AE`I1nlEKlF!uQTV9Rf>%pqc`Yi@&elEx511 z3mIk1>ESYp=Ew2u-;1PNsmCBmj`WgQb7E-rXCO6l2RPa)$CnY7*$p5t zK!kgeVfKd$4d+Z9GW31&rgZIZHI`Yx&H$&5U{@7S*+#{7Ji{`Z9?@wXcX-Smhg_z2 zznv$JQcp6b80XmkuAYtt#acA;D}`w-DOb#yg^93jS5w~2ZdSQpXP;IXDw5=XtrK+2 z`TS0+jx>*4GBCMj_zotq?Efq-S-=j=M88k~LFrD7)W+;?`?GH1_{3Kb2PCRIn{DLQ z*`n5|PmHIBxWILDs>5)N9`T;9jk=B-1dJG{fDnaj{O#2Di&&C;I~?abBP3 zTr0}vBw>KAu9JzMg6B`FPW7gPTH2k1B6BxPQ`yc7K1ioUOe+9O-JG)f1aa%3nI%s; zqN0MMWs&MJUDrqWf~J&lpaC%-4pgAUV%N(J%Z2;Mz*EQR)}dl)^K!}*SZ%*(biRXz zE4&(m6IqfI#6JZg)`?ADp7Zu17e0@qr3#qgS+qWnaH8OzC$Uwd9b^!;wWX?kY;SyL zzYK#_3Oh<*@(VTWvlZZ7mXhB$B^C*I@2_lwY+6;TmrQWIYkoyE+Y0J3Nxq6v|2+o^ z@;WNwIMq*JE=wY%1^RDaO&7!%%fUWo&ifwo?L9v z7aeYFxZ_~v-|G)co~Guubv4jfH(ZXnMDOpLotA4iB!py*qg^&WKFhyuxq)EXEoSSz zp*u$!YRjD-&PDq{On2x%p8w%W`*BL!9hc{w<_8KdsL$IVjCM{m5Z=rMS5CP{O6~y* z`xWkj4&TQ+i-gKOtdc^|8-x|4jSt=P@*7F{D`2p zAzFk=*^j+dY+>aw7tQ6}pwxAzz)To1NvXHRNd$rS#um1q*uV_k+vCugLF^HoH*-;& zr%th?AmH=97i{kXlFy5P>)_x*%;i-j&Hd^Q9VzX zCgq{Nsx{I=W8dU~?;>^s(8WZ6m1`($uWMy@F zXS+O8tGC?RbJ1cHZR}|zpn#=|5Y0_`tz&hok?`79nDzIw3+nTBaQyX^Hr6b0S)i`A zD9o7nXT%vP>54rXWjdcJid+_xcvDGq>@4{d!+tmYF~#p%?Daxj;bOJ{>}`r{aa=jM z*o~hpy@=4T+A3v-QAX?wS2lk72d}f@S(Y#s!>(Bzk@SZoh3@?$piumMtzRhN(UW6ONn-Pwq#DYr zkJm$`{yt5OxPpd64(?yY^*^V~q2-2Pn7Ou%wvCynH6>=D1+rSdi7tHlo>+0LuU)MQ z1+jJmgAZ$v>&z&pVZEd$?i*VodIq`V$S|A1-wibG4tZZJ)p(b|H%m0S&|F+81&6o* zqJ&8c1)7=nGS<;#-}L;=AdY^e3or%Y1b~QmEU*{GkjfnEIBt&XS7_u(nvX|>s0Ie} zwwhPoC6-QBOVLaY{d4i5o>@EHe?L2HNWViV_|G5y{ePPmitty7mBa z=QK21*rklce#6}lPQh4%McV)Q8iJTpS>Ict!Ga8O9jRh?=s-r*>(-Nl$u$1p`%$=V zqJFShUK!BfZh+Ul2=bRZ7$;~gs-!o(Uqqq{ zKK;udZZ-v4&{@NMCD+@Jo3Fce04C$2xFL=gn^c66&rGW$c?gUAHH{pV$3wn)qzbOnea#`w^>QL= zT(aA?2>dsWs1U4{am4TONIqDNi;+)in@j2?{#zqd7G`B*ob}w3LrLG-Dwa%A_19iB)3sA zO%*{eos+YzcJiT05?mt}Ilhu!?;d{{Od54>_Z-7A7J!0gj;`=jIjE-4u0oW_?fKEF zG7}pdaf{qTZu3qFKq+5)U<3K_t!19yw`^df@xfuu_TyU9FnB44u^M6zzG^%$t0d`n12{fZMv}?bbggI<)OPL1 zF3@pMlNe_N0&hv5X^GwmPuptaxv*H&mJO}&Nv$YEeVfMDURYSEC&#YYXHv9Y z3(Q(qZqV}yLr0HmC#urJ)MjTK*!#Y#q1a-HBh$61#KJZeD{j-57n5Zn@Y@trjDUl3 z#g*sV=6;g#H>^4?)=nk&@Da44eeACIB51{Zr*}Oqq#ws~3YFfLY>iMfY1yx?)D(_R zpl}&_<%sh`A1JU;-YCRI!V!871`uG+=}z;C%ZuCXqMbOXQJWT_8seV%#?Y;3`{+Ml zMrESI%_Aofoj4zl5qkT&8F3ka(Ii$5=)boLCK1cJIrGdpKZrJ+_?RJfsID#YWvue< zCoqOyQqS$T^q5yU_((VkxhMmx;xPw8^`hH89F#CA&<|ns WU<91mGN3@_?TgD1 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 bZw=IP-#y8-Snf?bGynhq0000000000oQbk| literal 0 HcmV?d00001 diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 374a88eca..2b9d9b811 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -18,6 +18,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). ## tip +* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert/): support [VictoriaLogs](https://docs.victoriametrics.com/victorialogs/) as a datasource. See [this doc](https://docs.victoriametrics.com/victorialogs/vmalert/) for details. * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert/): `-rule` cmd-line flag now supports multi-document YAML files. This could be useful when rules are retrieved via HTTP URL where multiple rule files were merged together in one response. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6753). Thanks to @Irene-123 for [the pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6995). * FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent/): support scraping from Kubernetes Native Sidecars. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7287). * FEATURE: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): add a separate cache type for storing sparse entries when performing large index scans. This significantly reduces memory usage when applying [downsampling filters](https://docs.victoriametrics.com/#downsampling) and [retention filters](https://docs.victoriametrics.com/#retention-filters) during background merge. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7182) for the details. diff --git a/docs/vmalert.md b/docs/vmalert.md index cce31e75a..94e03a03b 100644 --- a/docs/vmalert.md +++ b/docs/vmalert.md @@ -10,7 +10,7 @@ aliases: --- `vmalert` executes a list of the given [alerting](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) or [recording](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/) -rules against configured `-datasource.url` compatible with Prometheus HTTP API. For sending alerting notifications +rules against configured `-datasource.url`. For sending alerting notifications `vmalert` relies on [Alertmanager](https://github.com/prometheus/alertmanager) configured via `-notifier.url` flag. Recording rules results are persisted via [remote write](https://prometheus.io/docs/prometheus/latest/storage/#remote-storage-integrations) protocol and require `-remoteWrite.url` to be configured. @@ -31,9 +31,8 @@ please refer to the [VictoriaMetrics Cloud documentation](https://docs.victoriam ## Features -* Integration with [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics) TSDB; -* VictoriaMetrics [MetricsQL](https://docs.victoriametrics.com/metricsql/) - support and expressions validation; +* Integration with [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics) and [MetricsQL](https://docs.victoriametrics.com/metricsql/); +* Integration with [VictoriaLogs](https://docs.victoriametrics.com/victorialogs/) and [LogsQL](https://docs.victoriametrics.com/victorialogs/logsql/). See [this doc](https://docs.victoriametrics.com/victorialogs/vmalert/); * Prometheus [alerting rules definition format](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/#defining-alerting-rules) support; * Integration with [Alertmanager](https://github.com/prometheus/alertmanager) starting from [Alertmanager v0.16.0-alpha](https://github.com/prometheus/alertmanager/releases/tag/v0.16.0-alpha.0); @@ -458,7 +457,7 @@ In this example, `-external.alert.source` will lead to Grafana's Explore page wi and time range will be selected starting from `"from":"{{ .ActiveAt.UnixMilli }}"` when alert became active. In addition to `source` link, some extra links could be added to alert's [annotations](https://docs.victoriametrics.com/vmalert/#alerting-rules) -field. See [how we use them](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/839596c00df123c639d1244b28ee8137dfc9609c/deployment/docker/alerts-cluster.yml#L43) +field. See [how we use them](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/839596c00df123c639d1244b28ee8137dfc9609c/deployment/docker/rules/alerts-cluster.yml#L43) to link alerting rule and the corresponding panel on Grafana dashboard. ### Multitenancy @@ -728,6 +727,10 @@ implements [Graphite Render API](https://graphite.readthedocs.io/en/stable/rende When using vmalert with both `graphite` and `prometheus` rules configured against cluster version of VM do not forget to set `-datasource.appendTypePrefix` flag to `true`, so vmalert can adjust URL prefix automatically based on the query type. +## VictoriaLogs + +vmalert supports [VictoriaLogs](https://docs.victoriametrics.com/victorialogs/) as a datasource for writing alerting and recording rules using [LogsQL](https://docs.victoriametrics.com/victorialogs/logsql/). See [this doc](https://docs.victoriametrics.com/victorialogs/vmalert/) for details. + ## Rules backfilling vmalert supports alerting and recording rules backfilling (aka `replay`). In replay mode vmalert @@ -1323,7 +1326,7 @@ The shortlist of configuration flags is the following: -remoteRead.bearerTokenFile string Optional path to bearer token file to use for -remoteRead.url. -remoteRead.disablePathAppend - Whether to disable automatic appending of '/api/v1/query' path to the configured -datasource.url and -remoteRead.url + Whether to disable automatic appending of '/api/v1/query' or '/select/logsql/stats_query' path to the configured -datasource.url and -remoteRead.url -remoteRead.headers string Optional HTTP headers to send with each request to the corresponding -remoteRead.url. For example, -remoteRead.headers='My-Auth:foobar' would send 'My-Auth: foobar' HTTP header with every request to the corresponding -remoteRead.url. Multiple headers must be delimited by '^^': -remoteRead.headers='header1:value1^^header2:value2' -remoteRead.idleConnTimeout duration @@ -1356,7 +1359,7 @@ The shortlist of configuration flags is the following: Optional path to client-side TLS certificate key to use when connecting to -remoteRead.url -remoteRead.tlsServerName string Optional TLS server name to use for connections to -remoteRead.url. By default, the server name from -remoteRead.url is used - -remoteRead.url vmalert + -remoteRead.url string Optional URL to datasource compatible with Prometheus HTTP API. It can be single node VictoriaMetrics or vmselect.Remote read is used to restore alerts state.This configuration makes sense only if vmalert was configured with `remoteWrite.url` before and has been successfully persisted its state. Supports address in the form of IP address with a port (e.g., http://127.0.0.1:8428) or DNS SRV record. See also '-remoteRead.disablePathAppend', '-remoteRead.showURL'. -remoteWrite.basicAuth.password string Optional basic auth password for -remoteWrite.url @@ -1441,6 +1444,8 @@ The shortlist of configuration flags is the following: all files with prefix rule_ in folder dir. Supports an array of values separated by comma or specified via multiple flags. Value can contain comma inside single-quoted or double-quoted string, {}, [] and () braces. + -rule.defaultRuleType string + Default type for rule expressions, can be overridden by type parameter inside the rule group. Supported values: "graphite", "prometheus" and "vlogs". (default: "prometheus") -rule.evalDelay time Adjustment of the time parameter for rule evaluation requests to compensate intentional data delay from the datasource.Normally, should be equal to `-search.latencyOffset` (cmd-line flag configured for VictoriaMetrics single-node or vmselect). (default 30s) -rule.maxResolveDuration duration diff --git a/docs/vmauth.md b/docs/vmauth.md index f9e2c5614..9a478d3db 100644 --- a/docs/vmauth.md +++ b/docs/vmauth.md @@ -1059,7 +1059,7 @@ See also [security recommendations](#security). `vmauth` exports various metrics in Prometheus exposition format at `http://vmauth-host:8427/metrics` page. It is recommended setting up regular scraping of this page either via [vmagent](https://docs.victoriametrics.com/vmagent/) or via Prometheus-compatible scraper, so the exported metrics could be analyzed later. -Use the official [Grafana dashboard](https://grafana.com/grafana/dashboards/21394) and [alerting rules](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-vmauth.yml) +Use the official [Grafana dashboard](https://grafana.com/grafana/dashboards/21394) and [alerting rules](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmauth.yml) for `vmauth` monitoring. If you use Google Cloud Managed Prometheus for scraping metrics from VictoriaMetrics components, then pass `-metrics.exposeMetadata` diff --git a/lib/logstorage/parser.go b/lib/logstorage/parser.go index 46ed4cc4f..2d98b90cf 100644 --- a/lib/logstorage/parser.go +++ b/lib/logstorage/parser.go @@ -786,6 +786,38 @@ func ParseStatsQuery(s string) (*Query, error) { return q, nil } +// ContainAnyTimeFilter returns true when query contains a global time filter. +func (q *Query) ContainAnyTimeFilter() bool { + if hasTimeFilter(q.f) { + return true + } + for _, p := range q.pipes { + if pf, ok := p.(*pipeFilter); ok { + if hasTimeFilter(pf.f) { + return true + } + } + } + return false +} + +func hasTimeFilter(f filter) bool { + if f == nil { + return false + } + switch t := f.(type) { + case *filterAnd: + for _, subF := range t.filters { + if hasTimeFilter(subF) { + return true + } + } + case *filterTime: + return true + } + return false +} + // ParseQueryAtTimestamp parses s in the context of the given timestamp. // // E.g. _time:duration filters are adjusted according to the provided timestamp as _time:[timestamp-duration, duration]. diff --git a/lib/logstorage/parser_test.go b/lib/logstorage/parser_test.go index 642b88364..9cbcce2b8 100644 --- a/lib/logstorage/parser_test.go +++ b/lib/logstorage/parser_test.go @@ -2384,3 +2384,28 @@ func TestQueryGetStatsByFields_Failure(t *testing.T) { // format to the remaining metric field f(`* | by (x) count() y | format 'foo' as y`) } + +func TestHasTimeFilter(t *testing.T) { + f := func(qStr string, expected bool) { + t.Helper() + + q, err := ParseStatsQuery(qStr) + if err != nil { + t.Fatalf("cannot parse [%s]: %s", qStr, err) + } + if q.ContainAnyTimeFilter() != expected { + t.Fatalf("unexpected result for hasTimeFilter(%q); want %v", qStr, expected) + } + } + + f(`* | count()`, false) + f(`error OR _time:5m | count()`, false) + f(`(_time: 5m AND error) OR (_time: 5m AND warn) | count()`, false) + f(`* | error OR _time:5m | count()`, false) + + f(`_time:5m | count()`, true) + f(`_time:2023-04-25T22:45:59Z | count()`, true) + f(`error AND _time:5m | count()`, true) + f(`error AND (_time: 5m AND warn) | count()`, true) + f(`* | error AND _time:5m | count()`, true) +} From 8d968acd0aea3691bbc5ca10786e8f7a59d48de1 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 28 Oct 2024 20:49:50 +0100 Subject: [PATCH 29/90] lib/logstorage: avoid reading columnsHeader data when `field_values` pipe is applied directly to log filters This improves performance of `field_values` pipe when it is applied to large number of data blocks. This also improves performance of /select/logsql/field_values HTTP API. --- docs/VictoriaLogs/CHANGELOG.md | 1 + lib/logstorage/block_search.go | 8 ++++ lib/logstorage/parser_test.go | 14 +++--- lib/logstorage/pipe_field_names.go | 71 ++++++++++++++++++------------ 4 files changed, 58 insertions(+), 36 deletions(-) diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 574d9bf7a..7cdaa08b3 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -16,6 +16,7 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta ## tip * FEATURE: added ability to receive systemd (journald) logs over network. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4618). +* FEATURE: improve performance for [`field_values` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#field_values-pipe) when it is applied directly to [log filter](https://docs.victoriametrics.com/victorialogs/logsql/#filters). * BUGFIX: [web UI](https://docs.victoriametrics.com/victorialogs/querying/#web-ui): fix various glitches with updating query responses. The issue was introduced in [v0.36.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.36.0-victorialogs). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7279). diff --git a/lib/logstorage/block_search.go b/lib/logstorage/block_search.go index c932cbc8d..c2e40f9d6 100644 --- a/lib/logstorage/block_search.go +++ b/lib/logstorage/block_search.go @@ -337,6 +337,14 @@ func (bs *blockSearch) getColumnNameID(name string) (uint64, bool) { return id, ok } +func (bs *blockSearch) getColumnNameByID(columnNameID uint64) string { + columnNames := bs.bsw.p.columnNames + if columnNameID >= uint64(len(columnNames)) { + logger.Panicf("FATAL: %s: too big columnNameID=%d; it must be smaller than %d", bs.bsw.p.path, columnNameID, len(columnNames)) + } + return columnNames[columnNameID] +} + func (bs *blockSearch) getColumnsHeaderIndex() *columnsHeaderIndex { if bs.partFormatVersion() < 1 { logger.Panicf("BUG: getColumnsHeaderIndex() can be called only for part encoding v1+, while it has been called for v%d", bs.partFormatVersion()) diff --git a/lib/logstorage/parser_test.go b/lib/logstorage/parser_test.go index 9cbcce2b8..ee3bc7652 100644 --- a/lib/logstorage/parser_test.go +++ b/lib/logstorage/parser_test.go @@ -1885,12 +1885,12 @@ func TestQueryGetNeededColumns(t *testing.T) { f(`* | fields x,f1 | filter foo f1:bar | rm f2`, `f1,x`, ``) f(`* | rm x,f1 | filter foo f1:bar`, `*`, `f1,x`) - f(`* | field_names as foo`, `*`, `_time`) - f(`* | field_names foo | fields bar`, `*`, `_time`) - f(`* | field_names foo | fields foo`, `*`, `_time`) - f(`* | field_names foo | rm foo`, `*`, `_time`) - f(`* | field_names foo | rm bar`, `*`, `_time`) - f(`* | field_names foo | rm _time`, `*`, `_time`) + f(`* | field_names as foo`, ``, ``) + f(`* | field_names foo | fields bar`, ``, ``) + f(`* | field_names foo | fields foo`, ``, ``) + f(`* | field_names foo | rm foo`, ``, ``) + f(`* | field_names foo | rm bar`, ``, ``) + f(`* | field_names foo | rm _time`, ``, ``) f(`* | fields x,y | field_names as bar | fields baz`, `x,y`, ``) f(`* | rm x,y | field_names as bar | fields baz`, `*`, `x,y`) @@ -2012,7 +2012,7 @@ func TestQueryGetNeededColumns(t *testing.T) { f(`* | extract if (q:w p:a) "bar" from x | count() r1`, `p,q`, ``) f(`* | extract_regexp "(?P.*)bar" from x | count() r1`, ``, ``) f(`* | extract_regexp if (q:w p:a) "(?P.*)bar" from x | count() r1`, `p,q`, ``) - f(`* | field_names | count() r1`, `*`, `_time`) + f(`* | field_names | count() r1`, ``, ``) f(`* | limit 10 | field_names as abc | count() r1`, `*`, ``) f(`* | blocks_count | count() r1`, ``, ``) f(`* | limit 10 | blocks_count as abc | count() r1`, ``, ``) diff --git a/lib/logstorage/pipe_field_names.go b/lib/logstorage/pipe_field_names.go index 8d6e393fb..283cb7675 100644 --- a/lib/logstorage/pipe_field_names.go +++ b/lib/logstorage/pipe_field_names.go @@ -14,9 +14,7 @@ type pipeFieldNames struct { // By default results are written into 'name' column. resultName string - // isFirstPipe is set to true if '| field_names' pipe is the first in the query. - // - // This allows skipping loading of _time column. + // if isFirstPipe is set, then there is no need in loading columnsHeader in writeBlock(). isFirstPipe bool } @@ -33,12 +31,12 @@ func (pf *pipeFieldNames) canLiveTail() bool { } func (pf *pipeFieldNames) updateNeededFields(neededFields, unneededFields fieldsSet) { - neededFields.add("*") - unneededFields.reset() - if pf.isFirstPipe { - unneededFields.add("_time") + neededFields.reset() + } else { + neededFields.add("*") } + unneededFields.reset() } func (pf *pipeFieldNames) optimize() { @@ -98,25 +96,48 @@ func (pfp *pipeFieldNamesProcessor) writeBlock(workerID uint, br *blockResult) { return } + // Assume that the column is set for all the rows in the block. + // This is much faster than reading all the column values and counting non-empty rows. + hits := uint64(br.rowsLen) + shard := &pfp.shards[workerID] - m := shard.getM() - - cs := br.getColumns() - for _, c := range cs { - pHits := m[c.name] - if pHits == nil { - nameCopy := strings.Clone(c.name) - hits := uint64(0) - pHits = &hits - m[nameCopy] = pHits + if !pfp.pf.isFirstPipe || br.bs == nil || br.bs.partFormatVersion() < 1 { + cs := br.getColumns() + for _, c := range cs { + shard.updateColumnHits(c.name, hits) } - - // Assume that the column is set for all the rows in the block. - // This is much faster than reading all the column values and counting non-empty rows. - *pHits += uint64(br.rowsLen) + } else { + cshIndex := br.bs.getColumnsHeaderIndex() + shard.updateHits(cshIndex.columnHeadersRefs, br, hits) + shard.updateHits(cshIndex.constColumnsRefs, br, hits) + shard.updateColumnHits("_time", hits) + shard.updateColumnHits("_stream", hits) + shard.updateColumnHits("_stream_id", hits) } } +func (shard *pipeFieldNamesProcessorShard) updateHits(refs []columnHeaderRef, br *blockResult, hits uint64) { + for _, cr := range refs { + columnName := br.bs.getColumnNameByID(cr.columnNameID) + shard.updateColumnHits(columnName, hits) + } +} + +func (shard *pipeFieldNamesProcessorShard) updateColumnHits(columnName string, hits uint64) { + if columnName == "" { + columnName = "_msg" + } + m := shard.getM() + pHits := m[columnName] + if pHits == nil { + nameCopy := strings.Clone(columnName) + hits := uint64(0) + pHits = &hits + m[nameCopy] = pHits + } + *pHits += hits +} + func (pfp *pipeFieldNamesProcessor) flush() error { if needStop(pfp.stopCh) { return nil @@ -136,14 +157,6 @@ func (pfp *pipeFieldNamesProcessor) flush() error { } } } - if pfp.pf.isFirstPipe { - pHits := m["_stream"] - if pHits == nil { - hits := uint64(0) - pHits = &hits - } - m["_time"] = pHits - } // write result wctx := &pipeFieldNamesWriteContext{ From 67b4059aa43b4aa64b93d139a7eab46ad7384fa7 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 29 Oct 2024 11:23:20 +0100 Subject: [PATCH 30/90] docs/VictoriaLogs/README.md: add `tuning` chapter --- docs/VictoriaLogs/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/VictoriaLogs/README.md b/docs/VictoriaLogs/README.md index dcdaff12d..a818b7b95 100644 --- a/docs/VictoriaLogs/README.md +++ b/docs/VictoriaLogs/README.md @@ -31,6 +31,20 @@ you can join it via [Slack Inviter](https://slack.victoriametrics.com/). See [Quick start docs](https://docs.victoriametrics.com/victorialogs/quickstart/) for start working with VictoriaLogs. +## Tuning + +* No need in tuning for VictoriaLogs - it uses reasonable defaults for command-line flags, which are automatically adjusted for the available CPU and RAM resources. +* No need in tuning for Operating System - VictoriaLogs is optimized for default OS settings. + The only option is increasing the limit on [the number of open files in the OS](https://medium.com/@muhammadtriwibowo/set-permanently-ulimit-n-open-files-in-ubuntu-4d61064429a). +* The recommended filesystem is `ext4`, the recommended persistent storage is [persistent HDD-based disk on GCP](https://cloud.google.com/compute/docs/disks/#pdspecs), + since it is protected from hardware failures via internal replication and it can be [resized on the fly](https://cloud.google.com/compute/docs/disks/add-persistent-disk#resize_pd). + If you plan to store more than 1TB of data on `ext4` partition or plan extending it to more than 16TB, + then the following options are recommended to pass to `mkfs.ext4`: + +```sh +mkfs.ext4 ... -O 64bit,huge_file,extent -T huge +``` + ## Monitoring VictoriaLogs exposes internal metrics in Prometheus exposition format at `http://localhost:9428/metrics` page. From 7a62eefa341b89b8471654f35045135480580e36 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 29 Oct 2024 11:28:41 +0100 Subject: [PATCH 31/90] lib/logstorage: dynamically adjust the number of (bloom, values) shards in a part depending on the number of non-const columns This allows reducing the amounts of data, which must be read during queries over logs with big number of fields (aka "wide events"). This, in turn, improves query performance when the data, which needs to be scanned during the query, doesn't fit OS page cache. --- docs/VictoriaLogs/CHANGELOG.md | 2 + lib/logstorage/block.go | 4 -- lib/logstorage/block_data.go | 4 -- lib/logstorage/block_header.go | 4 -- lib/logstorage/block_stream_reader.go | 34 +++++++++------ lib/logstorage/block_stream_writer.go | 61 +++++++++++++++++++++------ lib/logstorage/consts.go | 8 ++-- lib/logstorage/datadb.go | 13 ++++-- lib/logstorage/inmemory_part.go | 18 +++----- lib/logstorage/part.go | 27 +++++++----- lib/logstorage/part_header.go | 27 +++++++++++- 11 files changed, 131 insertions(+), 71 deletions(-) diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 7cdaa08b3..36affa5b7 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -16,6 +16,8 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta ## tip * FEATURE: added ability to receive systemd (journald) logs over network. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4618). +* FEATURE: improve performance for queries over large volume of logs with big number of [fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) (aka `wide events`). +* FEATURE: improve performance for [`/select/logsql/field_values` HTTP endpoint](https://docs.victoriametrics.com/victorialogs/querying/#querying-field-values). * FEATURE: improve performance for [`field_values` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#field_values-pipe) when it is applied directly to [log filter](https://docs.victoriametrics.com/victorialogs/logsql/#filters). * BUGFIX: [web UI](https://docs.victoriametrics.com/victorialogs/querying/#web-ui): fix various glitches with updating query responses. The issue was introduced in [v0.36.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.36.0-victorialogs). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7279). diff --git a/lib/logstorage/block.go b/lib/logstorage/block.go index 3670991d1..3c23e17e0 100644 --- a/lib/logstorage/block.go +++ b/lib/logstorage/block.go @@ -432,10 +432,6 @@ func (b *block) InitFromBlockData(bd *blockData, sbu *stringsBlockUnmarshaler, v // mustWriteTo writes b with the given sid to sw and updates bh accordingly. func (b *block) mustWriteTo(sid *streamID, bh *blockHeader, sw *streamWriters, g *columnNameIDGenerator) { - // Do not store the version used for encoding directly in the block data, since: - // - all the blocks in the same part use the same encoding - // - the block encoding version can be put in metadata file for the part (aka metadataFilename) - b.assertValid() bh.reset() diff --git a/lib/logstorage/block_data.go b/lib/logstorage/block_data.go index 5c76ec3f0..fd315659b 100644 --- a/lib/logstorage/block_data.go +++ b/lib/logstorage/block_data.go @@ -94,10 +94,6 @@ func (bd *blockData) unmarshalRows(dst *rows, sbu *stringsBlockUnmarshaler, vd * // mustWriteTo writes bd to sw and updates bh accordingly func (bd *blockData) mustWriteTo(bh *blockHeader, sw *streamWriters, g *columnNameIDGenerator) { - // Do not store the version used for encoding directly in the block data, since: - // - all the blocks in the same part use the same encoding - // - the block encoding version can be put in metadata file for the part (aka metadataFilename) - bh.reset() bh.streamID = bd.streamID diff --git a/lib/logstorage/block_header.go b/lib/logstorage/block_header.go index 03ab0ebb3..da620e3c0 100644 --- a/lib/logstorage/block_header.go +++ b/lib/logstorage/block_header.go @@ -67,10 +67,6 @@ func (bh *blockHeader) copyFrom(src *blockHeader) { // marshal appends the marshaled bh to dst and returns the result. func (bh *blockHeader) marshal(dst []byte) []byte { - // Do not store the version used for encoding directly in the block header, since: - // - all the block headers in the same part use the same encoding - // - the format encoding version is stored in metadata file for the part (aka metadataFilename) - dst = bh.streamID.marshal(dst) dst = encoding.MarshalVarUint64(dst, bh.uncompressedSizeBytes) dst = encoding.MarshalVarUint64(dst, bh.rowsCount) diff --git a/lib/logstorage/block_stream_reader.go b/lib/logstorage/block_stream_reader.go index f8f3af015..7b706954c 100644 --- a/lib/logstorage/block_stream_reader.go +++ b/lib/logstorage/block_stream_reader.go @@ -10,6 +10,7 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/filestream" "github.com/VictoriaMetrics/VictoriaMetrics/lib/fs" "github.com/VictoriaMetrics/VictoriaMetrics/lib/logger" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/slicesutil" ) type readerWithStats struct { @@ -63,7 +64,7 @@ type streamReaders struct { messageBloomValuesReader bloomValuesReader oldBloomValuesReader bloomValuesReader - bloomValuesShards [bloomValuesShardsCount]bloomValuesReader + bloomValuesShards []bloomValuesReader } type bloomValuesReader struct { @@ -105,13 +106,14 @@ func (sr *streamReaders) reset() { sr.messageBloomValuesReader.reset() sr.oldBloomValuesReader.reset() - for i := range sr.bloomValuesShards[:] { + for i := range sr.bloomValuesShards { sr.bloomValuesShards[i].reset() } + sr.bloomValuesShards = sr.bloomValuesShards[:0] } func (sr *streamReaders) init(columnNamesReader, metaindexReader, indexReader, columnsHeaderIndexReader, columnsHeaderReader, timestampsReader filestream.ReadCloser, - messageBloomValuesReader, oldBloomValuesReader bloomValuesStreamReader, bloomValuesShards [bloomValuesShardsCount]bloomValuesStreamReader, + messageBloomValuesReader, oldBloomValuesReader bloomValuesStreamReader, bloomValuesShards []bloomValuesStreamReader, ) { sr.columnNamesReader.init(columnNamesReader) sr.metaindexReader.init(metaindexReader) @@ -122,7 +124,9 @@ func (sr *streamReaders) init(columnNamesReader, metaindexReader, indexReader, c sr.messageBloomValuesReader.init(messageBloomValuesReader) sr.oldBloomValuesReader.init(oldBloomValuesReader) - for i := range sr.bloomValuesShards[:] { + + sr.bloomValuesShards = slicesutil.SetLength(sr.bloomValuesShards, len(bloomValuesShards)) + for i := range sr.bloomValuesShards { sr.bloomValuesShards[i].init(bloomValuesShards[i]) } } @@ -139,7 +143,7 @@ func (sr *streamReaders) totalBytesRead() uint64 { n += sr.messageBloomValuesReader.totalBytesRead() n += sr.oldBloomValuesReader.totalBytesRead() - for i := range sr.bloomValuesShards[:] { + for i := range sr.bloomValuesShards { n += sr.bloomValuesShards[i].totalBytesRead() } @@ -156,7 +160,7 @@ func (sr *streamReaders) MustClose() { sr.messageBloomValuesReader.MustClose() sr.oldBloomValuesReader.MustClose() - for i := range sr.bloomValuesShards[:] { + for i := range sr.bloomValuesShards { sr.bloomValuesShards[i].MustClose() } } @@ -169,8 +173,12 @@ func (sr *streamReaders) getBloomValuesReaderForColumnName(name string, partForm return &sr.oldBloomValuesReader } - h := xxhash.Sum64(bytesutil.ToUnsafeBytes(name)) - idx := h % uint64(len(sr.bloomValuesShards)) + n := len(sr.bloomValuesShards) + idx := uint64(0) + if n > 1 { + h := xxhash.Sum64(bytesutil.ToUnsafeBytes(name)) + idx = h % uint64(n) + } return &sr.bloomValuesShards[idx] } @@ -280,9 +288,8 @@ func (bsr *blockStreamReader) MustInitFromInmemoryPart(mp *inmemoryPart) { messageBloomValuesReader := mp.messageBloomValues.NewStreamReader() var oldBloomValuesReader bloomValuesStreamReader - var bloomValuesShards [bloomValuesShardsCount]bloomValuesStreamReader - for i := range bloomValuesShards[:] { - bloomValuesShards[i] = mp.bloomValuesShards[i].NewStreamReader() + bloomValuesShards := []bloomValuesStreamReader{ + mp.fieldBloomValues.NewStreamReader(), } bsr.streamReaders.init(columnNamesReader, metaindexReader, indexReader, columnsHeaderIndexReader, columnsHeaderReader, timestampsReader, @@ -333,7 +340,7 @@ func (bsr *blockStreamReader) MustInitFromFilePart(path string) { values: filestream.MustOpen(messageValuesPath, nocache), } var oldBloomValuesReader bloomValuesStreamReader - var bloomValuesShards [bloomValuesShardsCount]bloomValuesStreamReader + var bloomValuesShards []bloomValuesStreamReader if bsr.ph.FormatVersion < 1 { bloomPath := filepath.Join(path, oldBloomFilename) oldBloomValuesReader.bloom = filestream.MustOpen(bloomPath, nocache) @@ -341,7 +348,8 @@ func (bsr *blockStreamReader) MustInitFromFilePart(path string) { valuesPath := filepath.Join(path, oldValuesFilename) oldBloomValuesReader.values = filestream.MustOpen(valuesPath, nocache) } else { - for i := range bloomValuesShards[:] { + bloomValuesShards = make([]bloomValuesStreamReader, bsr.ph.BloomValuesShardsCount) + for i := range bloomValuesShards { shard := &bloomValuesShards[i] bloomPath := getBloomFilePath(path, uint64(i)) diff --git a/lib/logstorage/block_stream_writer.go b/lib/logstorage/block_stream_writer.go index a95a419ec..3d3a54382 100644 --- a/lib/logstorage/block_stream_writer.go +++ b/lib/logstorage/block_stream_writer.go @@ -1,6 +1,7 @@ package logstorage import ( + "math/bits" "path/filepath" "sync" @@ -10,6 +11,7 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/filestream" "github.com/VictoriaMetrics/VictoriaMetrics/lib/fs" "github.com/VictoriaMetrics/VictoriaMetrics/lib/logger" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/slicesutil" ) // writerWithStats writes data to w and tracks the total amounts of data written at bytesWritten. @@ -53,7 +55,7 @@ type streamWriters struct { timestampsWriter writerWithStats messageBloomValuesWriter bloomValuesWriter - bloomValuesShards [bloomValuesShardsCount]bloomValuesWriter + bloomValuesShards []bloomValuesWriter } type bloomValuesWriter struct { @@ -94,13 +96,14 @@ func (sw *streamWriters) reset() { sw.timestampsWriter.reset() sw.messageBloomValuesWriter.reset() - for i := range sw.bloomValuesShards[:] { + for i := range sw.bloomValuesShards { sw.bloomValuesShards[i].reset() } + sw.bloomValuesShards = sw.bloomValuesShards[:0] } func (sw *streamWriters) init(columnNamesWriter, metaindexWriter, indexWriter, columnsHeaderIndexWriter, columnsHeaderWriter, timestampsWriter filestream.WriteCloser, - messageBloomValuesWriter bloomValuesStreamWriter, bloomValuesShards [bloomValuesShardsCount]bloomValuesStreamWriter, + messageBloomValuesWriter bloomValuesStreamWriter, bloomValuesShards []bloomValuesStreamWriter, ) { sw.columnNamesWriter.init(columnNamesWriter) sw.metaindexWriter.init(metaindexWriter) @@ -110,7 +113,8 @@ func (sw *streamWriters) init(columnNamesWriter, metaindexWriter, indexWriter, c sw.timestampsWriter.init(timestampsWriter) sw.messageBloomValuesWriter.init(messageBloomValuesWriter) - for i := range sw.bloomValuesShards[:] { + sw.bloomValuesShards = slicesutil.SetLength(sw.bloomValuesShards, len(bloomValuesShards)) + for i := range sw.bloomValuesShards { sw.bloomValuesShards[i].init(bloomValuesShards[i]) } } @@ -126,7 +130,7 @@ func (sw *streamWriters) totalBytesWritten() uint64 { n += sw.timestampsWriter.bytesWritten n += sw.messageBloomValuesWriter.totalBytesWritten() - for i := range sw.bloomValuesShards[:] { + for i := range sw.bloomValuesShards { n += sw.bloomValuesShards[i].totalBytesWritten() } @@ -142,7 +146,7 @@ func (sw *streamWriters) MustClose() { sw.timestampsWriter.MustClose() sw.messageBloomValuesWriter.MustClose() - for i := range sw.bloomValuesShards[:] { + for i := range sw.bloomValuesShards { sw.bloomValuesShards[i].MustClose() } } @@ -152,8 +156,12 @@ func (sw *streamWriters) getBloomValuesWriterForColumnName(name string) *bloomVa return &sw.messageBloomValuesWriter } - h := xxhash.Sum64(bytesutil.ToUnsafeBytes(name)) - idx := h % uint64(len(sw.bloomValuesShards)) + n := len(sw.bloomValuesShards) + idx := uint64(0) + if n > 1 { + h := xxhash.Sum64(bytesutil.ToUnsafeBytes(name)) + idx = h % uint64(n) + } return &sw.bloomValuesShards[idx] } @@ -168,6 +176,9 @@ type blockStreamWriter struct { // sidFirst is the streamID for the first block in the current indexBlock sidFirst streamID + // bloomValuesFieldsCount is the number of fields with (bloom, values) pairs in the output part. + bloomValuesFieldsCount uint64 + // minTimestampLast is the minimum timestamp seen for the last written block minTimestampLast int64 @@ -213,6 +224,7 @@ func (bsw *blockStreamWriter) reset() { bsw.streamWriters.reset() bsw.sidLast.reset() bsw.sidFirst.reset() + bsw.bloomValuesFieldsCount = 0 bsw.minTimestampLast = 0 bsw.minTimestamp = 0 bsw.maxTimestamp = 0 @@ -243,9 +255,8 @@ func (bsw *blockStreamWriter) MustInitForInmemoryPart(mp *inmemoryPart) { messageBloomValues := mp.messageBloomValues.NewStreamWriter() - var bloomValuesShards [bloomValuesShardsCount]bloomValuesStreamWriter - for i := range bloomValuesShards[:] { - bloomValuesShards[i] = mp.bloomValuesShards[i].NewStreamWriter() + bloomValuesShards := []bloomValuesStreamWriter{ + mp.fieldBloomValues.NewStreamWriter(), } bsw.streamWriters.init(&mp.columnNames, &mp.metaindex, &mp.index, &mp.columnsHeaderIndex, &mp.columnsHeader, &mp.timestamps, messageBloomValues, bloomValuesShards) @@ -254,7 +265,7 @@ func (bsw *blockStreamWriter) MustInitForInmemoryPart(mp *inmemoryPart) { // MustInitForFilePart initializes bsw for writing data to file part located at path. // // if nocache is true, then the written data doesn't go to OS page cache. -func (bsw *blockStreamWriter) MustInitForFilePart(path string, nocache bool) { +func (bsw *blockStreamWriter) MustInitForFilePart(path string, nocache bool, bloomValuesShardsCount uint64) { bsw.reset() fs.MustMkdirFailIfExist(path) @@ -284,8 +295,9 @@ func (bsw *blockStreamWriter) MustInitForFilePart(path string, nocache bool) { values: filestream.MustCreate(messageValuesPath, nocache), } - var bloomValuesShards [bloomValuesShardsCount]bloomValuesStreamWriter - for i := range bloomValuesShards[:] { + bloomValuesShardsCount = adjustBloomValuesShardsCount(bloomValuesShardsCount) + bloomValuesShards := make([]bloomValuesStreamWriter, bloomValuesShardsCount) + for i := range bloomValuesShards { shard := &bloomValuesShards[i] bloomPath := getBloomFilePath(path, uint64(i)) @@ -298,6 +310,18 @@ func (bsw *blockStreamWriter) MustInitForFilePart(path string, nocache bool) { bsw.streamWriters.init(columnNamesWriter, metaindexWriter, indexWriter, columnsHeaderIndexWriter, columnsHeaderWriter, timestampsWriter, messageBloomValuesWriter, bloomValuesShards) } +func adjustBloomValuesShardsCount(n uint64) uint64 { + if n == 0 { + return n + } + + n = 1 << bits.Len64(n-1) + if n > bloomValuesMaxShardsCount { + n = bloomValuesMaxShardsCount + } + return n +} + // MustWriteRows writes timestamps with rows under the given sid to bsw. // // timestamps must be sorted. @@ -348,11 +372,18 @@ func (bsw *blockStreamWriter) mustWriteBlockInternal(sid *streamID, b *block, bd bsw.sidLast = *sid bh := getBlockHeader() + columnsLen := 0 if b != nil { b.mustWriteTo(sid, bh, &bsw.streamWriters, &bsw.columnNameIDGenerator) + columnsLen = len(b.columns) } else { bd.mustWriteTo(bh, &bsw.streamWriters, &bsw.columnNameIDGenerator) + columnsLen = len(bd.columnsData) } + if bsw.bloomValuesFieldsCount < uint64(columnsLen) { + bsw.bloomValuesFieldsCount = uint64(columnsLen) + } + th := &bh.timestampsHeader if bsw.globalRowsCount == 0 || th.minTimestamp < bsw.globalMinTimestamp { bsw.globalMinTimestamp = th.minTimestamp @@ -407,6 +438,8 @@ func (bsw *blockStreamWriter) Finalize(ph *partHeader) { ph.BlocksCount = bsw.globalBlocksCount ph.MinTimestamp = bsw.globalMinTimestamp ph.MaxTimestamp = bsw.globalMaxTimestamp + ph.BloomValuesShardsCount = uint64(len(bsw.streamWriters.bloomValuesShards)) + ph.BloomValuesFieldsCount = bsw.bloomValuesFieldsCount bsw.mustFlushIndexBlock(bsw.indexBlockData) diff --git a/lib/logstorage/consts.go b/lib/logstorage/consts.go index 49a38470d..d1de8faea 100644 --- a/lib/logstorage/consts.go +++ b/lib/logstorage/consts.go @@ -3,12 +3,12 @@ package logstorage // partFormatLatestVersion is the latest format version for parts. // // See partHeader.FormatVersion for details. -const partFormatLatestVersion = 1 +const partFormatLatestVersion = 2 -// bloomValuesShardsCount is the number of shards for bloomFilename and valuesFilename files. +// bloomValuesMaxShardsCount is the number of shards for bloomFilename and valuesFilename files. // -// The partHeader.FormatVersion must be updated when this number changes. -const bloomValuesShardsCount = 8 +// The partHeader.FormatVersion and partFormatLatestVersion must be updated when this number changes. +const bloomValuesMaxShardsCount = 128 // maxUncompressedIndexBlockSize contains the maximum length of uncompressed block with blockHeader entries aka index block. // diff --git a/lib/logstorage/datadb.go b/lib/logstorage/datadb.go index 99a1d6f7a..aaf006200 100644 --- a/lib/logstorage/datadb.go +++ b/lib/logstorage/datadb.go @@ -530,10 +530,15 @@ func (ddb *datadb) mustMergeParts(pws []*partWrapper, isFinal bool) { srcSize := uint64(0) srcRowsCount := uint64(0) srcBlocksCount := uint64(0) + bloomValuesShardsCount := uint64(0) for _, pw := range pws { - srcSize += pw.p.ph.CompressedSizeBytes - srcRowsCount += pw.p.ph.RowsCount - srcBlocksCount += pw.p.ph.BlocksCount + ph := &pw.p.ph + srcSize += ph.CompressedSizeBytes + srcRowsCount += ph.RowsCount + srcBlocksCount += ph.BlocksCount + if ph.BloomValuesFieldsCount > bloomValuesShardsCount { + bloomValuesShardsCount = ph.BloomValuesFieldsCount + } } bsw := getBlockStreamWriter() var mpNew *inmemoryPart @@ -542,7 +547,7 @@ func (ddb *datadb) mustMergeParts(pws []*partWrapper, isFinal bool) { bsw.MustInitForInmemoryPart(mpNew) } else { nocache := dstPartType == partBig - bsw.MustInitForFilePart(dstPartPath, nocache) + bsw.MustInitForFilePart(dstPartPath, nocache, bloomValuesShardsCount) } // Merge source parts to destination part. diff --git a/lib/logstorage/inmemory_part.go b/lib/logstorage/inmemory_part.go index fd50b7ccd..ff98bb1cf 100644 --- a/lib/logstorage/inmemory_part.go +++ b/lib/logstorage/inmemory_part.go @@ -22,7 +22,7 @@ type inmemoryPart struct { timestamps bytesutil.ByteBuffer messageBloomValues bloomValuesBuffer - bloomValuesShards [bloomValuesShardsCount]bloomValuesBuffer + fieldBloomValues bloomValuesBuffer } type bloomValuesBuffer struct { @@ -61,9 +61,7 @@ func (mp *inmemoryPart) reset() { mp.timestamps.Reset() mp.messageBloomValues.reset() - for i := range mp.bloomValuesShards[:] { - mp.bloomValuesShards[i].reset() - } + mp.fieldBloomValues.reset() } // mustInitFromRows initializes mp from lr. @@ -127,15 +125,11 @@ func (mp *inmemoryPart) MustStoreToDisk(path string) { fs.MustWriteSync(messageBloomFilterPath, mp.messageBloomValues.bloom.B) fs.MustWriteSync(messageValuesPath, mp.messageBloomValues.values.B) - for i := range mp.bloomValuesShards[:] { - shard := &mp.bloomValuesShards[i] + bloomPath := getBloomFilePath(path, 0) + fs.MustWriteSync(bloomPath, mp.fieldBloomValues.bloom.B) - bloomPath := getBloomFilePath(path, uint64(i)) - fs.MustWriteSync(bloomPath, shard.bloom.B) - - valuesPath := getValuesFilePath(path, uint64(i)) - fs.MustWriteSync(valuesPath, shard.values.B) - } + valuesPath := getValuesFilePath(path, 0) + fs.MustWriteSync(valuesPath, mp.fieldBloomValues.values.B) mp.ph.mustWriteMetadata(path) diff --git a/lib/logstorage/part.go b/lib/logstorage/part.go index 6598ebdbc..4fe325abf 100644 --- a/lib/logstorage/part.go +++ b/lib/logstorage/part.go @@ -41,7 +41,8 @@ type part struct { messageBloomValues bloomValuesReaderAt oldBloomValues bloomValuesReaderAt - bloomValuesShards [bloomValuesShardsCount]bloomValuesReaderAt + + bloomValuesShards []bloomValuesReaderAt } type bloomValuesReaderAt struct { @@ -76,14 +77,15 @@ func mustOpenInmemoryPart(pt *partition, mp *inmemoryPart) *part { p.columnsHeaderFile = &mp.columnsHeader p.timestampsFile = &mp.timestamps + // Open files with bloom filters and column values p.messageBloomValues.bloom = &mp.messageBloomValues.bloom p.messageBloomValues.values = &mp.messageBloomValues.values - // Open files with bloom filters and column values - for i := range p.bloomValuesShards[:] { - shard := &p.bloomValuesShards[i] - shard.bloom = &mp.bloomValuesShards[i].bloom - shard.values = &mp.bloomValuesShards[i].values + p.bloomValuesShards = []bloomValuesReaderAt{ + { + bloom: &mp.fieldBloomValues.bloom, + values: &mp.fieldBloomValues.values, + }, } return &p @@ -140,7 +142,8 @@ func mustOpenFilePart(pt *partition, path string) *part { valuesPath := filepath.Join(path, oldValuesFilename) p.oldBloomValues.values = fs.MustOpenReaderAt(valuesPath) } else { - for i := range p.bloomValuesShards[:] { + p.bloomValuesShards = make([]bloomValuesReaderAt, p.ph.BloomValuesShardsCount) + for i := range p.bloomValuesShards { shard := &p.bloomValuesShards[i] bloomPath := getBloomFilePath(path, uint64(i)) @@ -166,7 +169,7 @@ func mustClosePart(p *part) { if p.ph.FormatVersion < 1 { p.oldBloomValues.MustClose() } else { - for i := range p.bloomValuesShards[:] { + for i := range p.bloomValuesShards { p.bloomValuesShards[i].MustClose() } } @@ -183,8 +186,12 @@ func (p *part) getBloomValuesFileForColumnName(name string) *bloomValuesReaderAt return &p.oldBloomValues } - h := xxhash.Sum64(bytesutil.ToUnsafeBytes(name)) - idx := h % uint64(len(p.bloomValuesShards)) + n := len(p.bloomValuesShards) + idx := uint64(0) + if n > 1 { + h := xxhash.Sum64(bytesutil.ToUnsafeBytes(name)) + idx = h % uint64(n) + } return &p.bloomValuesShards[idx] } diff --git a/lib/logstorage/part_header.go b/lib/logstorage/part_header.go index 05baf4195..f6d782749 100644 --- a/lib/logstorage/part_header.go +++ b/lib/logstorage/part_header.go @@ -34,6 +34,12 @@ type partHeader struct { // MaxTimestamp is the maximum timestamp seen in the part MaxTimestamp int64 + + // BloomValuesShardsCount is the number of (bloom, values) shards in the part. + BloomValuesShardsCount uint64 + + // BloomValuesFieldsCount is the number of fields with (bloom, values) pairs in the given part. + BloomValuesFieldsCount uint64 } // reset resets ph for subsequent re-use @@ -45,12 +51,16 @@ func (ph *partHeader) reset() { ph.BlocksCount = 0 ph.MinTimestamp = 0 ph.MaxTimestamp = 0 + ph.BloomValuesShardsCount = 0 + ph.BloomValuesFieldsCount = 0 } // String returns string represenation for ph. func (ph *partHeader) String() string { - return fmt.Sprintf("{FormatVersion=%d, CompressedSizeBytes=%d, UncompressedSizeBytes=%d, RowsCount=%d, BlocksCount=%d, MinTimestamp=%s, MaxTimestamp=%s}", - ph.FormatVersion, ph.CompressedSizeBytes, ph.UncompressedSizeBytes, ph.RowsCount, ph.BlocksCount, timestampToString(ph.MinTimestamp), timestampToString(ph.MaxTimestamp)) + return fmt.Sprintf("{FormatVersion=%d, CompressedSizeBytes=%d, UncompressedSizeBytes=%d, RowsCount=%d, BlocksCount=%d, "+ + "MinTimestamp=%s, MaxTimestamp=%s, BloomValuesShardsCount=%d, BloomValuesFieldsCount=%d}", + ph.FormatVersion, ph.CompressedSizeBytes, ph.UncompressedSizeBytes, ph.RowsCount, ph.BlocksCount, + timestampToString(ph.MinTimestamp), timestampToString(ph.MaxTimestamp), ph.BloomValuesShardsCount, ph.BloomValuesFieldsCount) } func (ph *partHeader) mustReadMetadata(partPath string) { @@ -65,6 +75,19 @@ func (ph *partHeader) mustReadMetadata(partPath string) { logger.Panicf("FATAL: cannot parse %q: %s", metadataPath, err) } + if ph.FormatVersion <= 1 { + if ph.BloomValuesShardsCount != 0 { + logger.Panicf("FATAL: unexpected BloomValuesShardsCount for FormatVersion<=1; got %d; want 0", ph.BloomValuesShardsCount) + } + if ph.BloomValuesFieldsCount != 0 { + logger.Panicf("FATAL: unexpected BloomValuesFieldsCount for FormatVersion<=1; got %d; want 0", ph.BloomValuesFieldsCount) + } + if ph.FormatVersion == 1 { + ph.BloomValuesShardsCount = 8 + ph.BloomValuesFieldsCount = bloomValuesMaxShardsCount + } + } + // Perform various checks if ph.FormatVersion > partFormatLatestVersion { logger.Panicf("FATAL: unsupported part format version; got %d; mustn't exceed %d", partFormatLatestVersion) From 3c06d083ea90715b0c8d3ba71fb7dad3ea5e96c6 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 29 Oct 2024 15:37:07 +0100 Subject: [PATCH 32/90] lib/logstorage: add an ability to return rank from `top` pipe results --- docs/VictoriaLogs/CHANGELOG.md | 1 + docs/VictoriaLogs/LogsQL.md | 12 +++++++ lib/logstorage/pipe_top.go | 54 +++++++++++++++++++++++++--- lib/logstorage/pipe_top_test.go | 63 +++++++++++++++++++++++++++++++++ 4 files changed, 126 insertions(+), 4 deletions(-) diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 36affa5b7..9ce8cbbe6 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -19,6 +19,7 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta * FEATURE: improve performance for queries over large volume of logs with big number of [fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) (aka `wide events`). * FEATURE: improve performance for [`/select/logsql/field_values` HTTP endpoint](https://docs.victoriametrics.com/victorialogs/querying/#querying-field-values). * FEATURE: improve performance for [`field_values` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#field_values-pipe) when it is applied directly to [log filter](https://docs.victoriametrics.com/victorialogs/logsql/#filters). +* FEATURE: add an ability to return `rank` field from [`top` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#top-pipe). For example, the following query returns `1..5` rank per each returned `ip` with the biggest number of logs over the last 5 minute: `_time:5m | top 5 by (ip) with rank`. * BUGFIX: [web UI](https://docs.victoriametrics.com/victorialogs/querying/#web-ui): fix various glitches with updating query responses. The issue was introduced in [v0.36.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.36.0-victorialogs). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7279). diff --git a/docs/VictoriaLogs/LogsQL.md b/docs/VictoriaLogs/LogsQL.md index be981f085..f610d909c 100644 --- a/docs/VictoriaLogs/LogsQL.md +++ b/docs/VictoriaLogs/LogsQL.md @@ -2400,6 +2400,18 @@ For example, the following query is equivalent to the previous one: _time:5m | fields ip | top ``` +It is possible to set `rank` field per each returned entry for `top` pipe by adding `with rank`. For example, the following query sets the `rank` field per each returned `ip`: + +```logsql +_time:5m | top 10 by (ip) with rank +``` + +The `rank` field can have other name. For example, the following query uses the `position` field name instead of `rank` field name in the output: + +```logsql +_time:5m | top 10 by (ip) with rank as position +``` + See also: - [`uniq` pipe](#uniq-pipe) diff --git a/lib/logstorage/pipe_top.go b/lib/logstorage/pipe_top.go index df1f59a3c..915f35a83 100644 --- a/lib/logstorage/pipe_top.go +++ b/lib/logstorage/pipe_top.go @@ -5,6 +5,7 @@ import ( "fmt" "slices" "sort" + "strconv" "strings" "sync" "sync/atomic" @@ -34,8 +35,11 @@ type pipeTop struct { // limitStr is string representation of the limit. limitStr string - // if hitsFieldName isn't empty, then the number of hits per each unique value is returned in this field. + // the number of hits per each unique value is returned in this field. hitsFieldName string + + // if rankFieldName isn't empty, then the rank per each unique value is returned in this field. + rankFieldName string } func (pt *pipeTop) String() string { @@ -46,6 +50,12 @@ func (pt *pipeTop) String() string { if len(pt.byFields) > 0 { s += " by (" + fieldNamesString(pt.byFields) + ")" } + if pt.rankFieldName != "" { + s += " with rank" + if pt.rankFieldName != "rank" { + s += " as " + pt.rankFieldName + } + } return s } @@ -273,8 +283,20 @@ func (ptp *pipeTopProcessor) flush() error { return dst } + addRankField := func(dst []Field, rank int) []Field { + if ptp.pt.rankFieldName == "" { + return dst + } + rankStr := strconv.Itoa(rank + 1) + dst = append(dst, Field{ + Name: ptp.pt.rankFieldName, + Value: rankStr, + }) + return dst + } + if len(byFields) == 0 { - for _, e := range entries { + for i, e := range entries { if needStop(ptp.stopCh) { return nil } @@ -300,11 +322,12 @@ func (ptp *pipeTopProcessor) flush() error { }) } rowFields = addHitsField(rowFields, e.hits) + rowFields = addRankField(rowFields, i) wctx.writeRow(rowFields) } } else if len(byFields) == 1 { fieldName := byFields[0] - for _, e := range entries { + for i, e := range entries { if needStop(ptp.stopCh) { return nil } @@ -314,10 +337,11 @@ func (ptp *pipeTopProcessor) flush() error { Value: e.k, }) rowFields = addHitsField(rowFields, e.hits) + rowFields = addRankField(rowFields, i) wctx.writeRow(rowFields) } } else { - for _, e := range entries { + for i, e := range entries { if needStop(ptp.stopCh) { return nil } @@ -339,6 +363,7 @@ func (ptp *pipeTopProcessor) flush() error { fieldIdx++ } rowFields = addHitsField(rowFields, e.hits) + rowFields = addRankField(rowFields, i) wctx.writeRow(rowFields) } } @@ -660,5 +685,26 @@ func parsePipeTop(lex *lexer) (*pipeTop, error) { hitsFieldName: hitsFieldName, } + if !lex.isKeyword("with") { + return pt, nil + } + + lex.nextToken() + if !lex.isKeyword("rank") { + return nil, fmt.Errorf("missing 'rank' word after 'with' in [%s]", pt) + } + lex.nextToken() + pt.rankFieldName = "rank" + if lex.isKeyword("as") { + lex.nextToken() + if lex.isKeyword("", "|", ")", "(") { + return nil, fmt.Errorf("missing rank name in [%s as]", pt) + } + } + if !lex.isKeyword("", "|", ")") { + pt.rankFieldName = lex.token + lex.nextToken() + } + return pt, nil } diff --git a/lib/logstorage/pipe_top_test.go b/lib/logstorage/pipe_top_test.go index edcd4db46..42c2d6be5 100644 --- a/lib/logstorage/pipe_top_test.go +++ b/lib/logstorage/pipe_top_test.go @@ -11,11 +11,15 @@ func TestParsePipeTopSuccess(t *testing.T) { } f(`top`) + f(`top with rank`) f(`top 5`) + f(`top 5 with rank as foo`) f(`top by (x)`) f(`top 5 by (x)`) f(`top by (x, y)`) f(`top 5 by (x, y)`) + f(`top by (x) with rank`) + f(`top by (x) with rank as foo`) } func TestParsePipeTopFailure(t *testing.T) { @@ -30,6 +34,8 @@ func TestParsePipeTopFailure(t *testing.T) { f(`top 5foo`) f(`top foo`) f(`top by`) + f(`top (x) with`) + f(`top (x) with rank as`) } func TestPipeTop(t *testing.T) { @@ -66,6 +72,36 @@ func TestPipeTop(t *testing.T) { }, }) + f("top with rank", [][]Field{ + { + {"a", `2`}, + {"b", `3`}, + }, + { + {"a", "2"}, + {"b", "3"}, + }, + { + {"a", `2`}, + {"b", `54`}, + {"c", "d"}, + }, + }, [][]Field{ + { + {"a", "2"}, + {"b", "3"}, + {"hits", "2"}, + {"rank", "1"}, + }, + { + {"a", `2`}, + {"b", `54`}, + {"c", "d"}, + {"hits", "1"}, + {"rank", "2"}, + }, + }) + f("top 1", [][]Field{ { {"a", `2`}, @@ -134,6 +170,33 @@ func TestPipeTop(t *testing.T) { }, }) + f("top by (b) with rank as x", [][]Field{ + { + {"a", `2`}, + {"b", `3`}, + }, + { + {"a", "2"}, + {"b", "3"}, + }, + { + {"a", `2`}, + {"b", `54`}, + {"c", "d"}, + }, + }, [][]Field{ + { + {"b", "3"}, + {"hits", "2"}, + {"x", "1"}, + }, + { + {"b", "54"}, + {"hits", "1"}, + {"x", "2"}, + }, + }) + f("top by (hits)", [][]Field{ { {"a", `2`}, From 8faee6b4463db9fb3be1ee3c90301117e500f355 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 29 Oct 2024 15:42:00 +0100 Subject: [PATCH 33/90] app/vlogscli: print hint on how to see available commands when starting vlogscli This should improve the first-time experience with vlogscli --- app/vlogscli/main.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/vlogscli/main.go b/app/vlogscli/main.go index 36acb1720..8799ab199 100644 --- a/app/vlogscli/main.go +++ b/app/vlogscli/main.go @@ -69,8 +69,8 @@ func main() { fatalf("cannot initialize readline: %s", err) } - fmt.Fprintf(rl, "sending queries to %s\n", *datasourceURL) - + fmt.Fprintf(rl, "sending queries to -datasource.url=%s\n", *datasourceURL) + fmt.Fprintf(rl, `type ? and press enter to see available commands`+"\n") runReadlineLoop(rl, &incompleteLine) if err := rl.Close(); err != nil { @@ -252,7 +252,7 @@ func isHelpCommand(s string) bool { } func printCommandsHelp(w io.Writer) { - fmt.Fprintf(w, "%s", `List of available commands: + fmt.Fprintf(w, "%s", `Available commands: \q - quit \h - show this help \s - singleline json output mode @@ -260,6 +260,8 @@ func printCommandsHelp(w io.Writer) { \c - compact output \logfmt - logfmt output mode \tail - live tail results + +See https://docs.victoriametrics.com/victorialogs/querying/vlogscli/ for more details `) } From 7a623c225fca6f21e6c74a6d95e9c1d86ec624a3 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 29 Oct 2024 16:43:07 +0100 Subject: [PATCH 34/90] lib/logstorage: follow-up for af831a6c906158f371f1b6810706fa0a54b78386 Sync the code between top and sort pipes regarding the code related to rank. --- docs/VictoriaLogs/LogsQL.md | 6 +++-- lib/logstorage/pipe_sort.go | 30 ++++++++++------------ lib/logstorage/pipe_sort_test.go | 2 +- lib/logstorage/pipe_sort_topk.go | 10 ++++---- lib/logstorage/pipe_top.go | 44 +++++++++++++++++++++----------- lib/logstorage/pipe_top_test.go | 15 +++++------ 6 files changed, 59 insertions(+), 48 deletions(-) diff --git a/docs/VictoriaLogs/LogsQL.md b/docs/VictoriaLogs/LogsQL.md index f610d909c..9e71c20c0 100644 --- a/docs/VictoriaLogs/LogsQL.md +++ b/docs/VictoriaLogs/LogsQL.md @@ -2169,6 +2169,7 @@ It is recommended limiting the number of logs before sorting with the following See also: +- [`top` pipe](#top-pipe) - [`stats` pipe](#stats-pipe) - [`limit` pipe](#limit-pipe) - [`offset` pipe](#offset-pipe) @@ -2403,19 +2404,20 @@ _time:5m | fields ip | top It is possible to set `rank` field per each returned entry for `top` pipe by adding `with rank`. For example, the following query sets the `rank` field per each returned `ip`: ```logsql -_time:5m | top 10 by (ip) with rank +_time:5m | top 10 by (ip) rank ``` The `rank` field can have other name. For example, the following query uses the `position` field name instead of `rank` field name in the output: ```logsql -_time:5m | top 10 by (ip) with rank as position +_time:5m | top 10 by (ip) rank as position ``` See also: - [`uniq` pipe](#uniq-pipe) - [`stats` pipe](#stats-pipe) +- [`sort` pipe](#sort-pipe) ### uniq pipe diff --git a/lib/logstorage/pipe_sort.go b/lib/logstorage/pipe_sort.go index cffb12c56..7a0567339 100644 --- a/lib/logstorage/pipe_sort.go +++ b/lib/logstorage/pipe_sort.go @@ -36,7 +36,7 @@ type pipeSort struct { limit uint64 // The name of the field to store the row rank. - rankName string + rankFieldName string } func (ps *pipeSort) String() string { @@ -57,8 +57,8 @@ func (ps *pipeSort) String() string { if ps.limit > 0 { s += fmt.Sprintf(" limit %d", ps.limit) } - if ps.rankName != "" { - s += " rank as " + quoteTokenIfNeeded(ps.rankName) + if ps.rankFieldName != "" { + s += rankFieldNameString(ps.rankFieldName) } return s } @@ -72,10 +72,10 @@ func (ps *pipeSort) updateNeededFields(neededFields, unneededFields fieldsSet) { return } - if ps.rankName != "" { - neededFields.remove(ps.rankName) + if ps.rankFieldName != "" { + neededFields.remove(ps.rankFieldName) if neededFields.contains("*") { - unneededFields.add(ps.rankName) + unneededFields.add(ps.rankFieldName) } } @@ -533,9 +533,9 @@ type pipeSortWriteContext struct { func (wctx *pipeSortWriteContext) writeNextRow(shard *pipeSortProcessorShard) { ps := shard.ps - rankName := ps.rankName + rankFieldName := ps.rankFieldName rankFields := 0 - if rankName != "" { + if rankFieldName != "" { rankFields = 1 } @@ -567,8 +567,8 @@ func (wctx *pipeSortWriteContext) writeNextRow(shard *pipeSortProcessorShard) { wctx.flush() rcs = wctx.rcs[:0] - if rankName != "" { - rcs = appendResultColumnWithName(rcs, rankName) + if rankFieldName != "" { + rcs = appendResultColumnWithName(rcs, rankFieldName) } for _, bf := range byFields { rcs = appendResultColumnWithName(rcs, bf.name) @@ -579,7 +579,7 @@ func (wctx *pipeSortWriteContext) writeNextRow(shard *pipeSortProcessorShard) { wctx.rcs = rcs } - if rankName != "" { + if rankFieldName != "" { bufLen := len(wctx.buf) wctx.buf = marshalUint64String(wctx.buf, wctx.rowsWritten) v := bytesutil.ToUnsafeString(wctx.buf[bufLen:]) @@ -798,15 +798,11 @@ func parsePipeSort(lex *lexer) (*pipeSort, error) { } ps.limit = n case lex.isKeyword("rank"): - lex.nextToken() - if lex.isKeyword("as") { - lex.nextToken() - } - rankName, err := getCompoundToken(lex) + rankFieldName, err := parseRankFieldName(lex) if err != nil { return nil, fmt.Errorf("cannot read rank field name: %s", err) } - ps.rankName = rankName + ps.rankFieldName = rankFieldName default: return &ps, nil } diff --git a/lib/logstorage/pipe_sort_test.go b/lib/logstorage/pipe_sort_test.go index 0385a51c0..8d2dbf27b 100644 --- a/lib/logstorage/pipe_sort_test.go +++ b/lib/logstorage/pipe_sort_test.go @@ -11,6 +11,7 @@ func TestParsePipeSortSuccess(t *testing.T) { } f(`sort`) + f(`sort rank`) f(`sort rank as foo`) f(`sort by (x)`) f(`sort by (x) limit 10`) @@ -26,7 +27,6 @@ func TestParsePipeSortFailure(t *testing.T) { } f(`sort a`) - f(`sort rank`) f(`sort by`) f(`sort by(x) foo`) f(`sort by(x) limit`) diff --git a/lib/logstorage/pipe_sort_topk.go b/lib/logstorage/pipe_sort_topk.go index ccccd6e0f..29cd24e8a 100644 --- a/lib/logstorage/pipe_sort_topk.go +++ b/lib/logstorage/pipe_sort_topk.go @@ -440,9 +440,9 @@ type pipeTopkWriteContext struct { func (wctx *pipeTopkWriteContext) writeNextRow(shard *pipeTopkProcessorShard) bool { ps := shard.ps - rankName := ps.rankName + rankFieldName := ps.rankFieldName rankFields := 0 - if rankName != "" { + if rankFieldName != "" { rankFields = 1 } @@ -476,8 +476,8 @@ func (wctx *pipeTopkWriteContext) writeNextRow(shard *pipeTopkProcessorShard) bo wctx.flush() rcs = wctx.rcs[:0] - if rankName != "" { - rcs = appendResultColumnWithName(rcs, rankName) + if rankFieldName != "" { + rcs = appendResultColumnWithName(rcs, rankFieldName) } for _, bf := range byFields { rcs = appendResultColumnWithName(rcs, bf.name) @@ -488,7 +488,7 @@ func (wctx *pipeTopkWriteContext) writeNextRow(shard *pipeTopkProcessorShard) bo wctx.rcs = rcs } - if rankName != "" { + if rankFieldName != "" { bufLen := len(wctx.buf) wctx.buf = marshalUint64String(wctx.buf, wctx.rowsWritten) v := bytesutil.ToUnsafeString(wctx.buf[bufLen:]) diff --git a/lib/logstorage/pipe_top.go b/lib/logstorage/pipe_top.go index 915f35a83..e33a57840 100644 --- a/lib/logstorage/pipe_top.go +++ b/lib/logstorage/pipe_top.go @@ -51,10 +51,7 @@ func (pt *pipeTop) String() string { s += " by (" + fieldNamesString(pt.byFields) + ")" } if pt.rankFieldName != "" { - s += " with rank" - if pt.rankFieldName != "rank" { - s += " as " + pt.rankFieldName - } + s += rankFieldNameString(pt.rankFieldName) } return s } @@ -685,26 +682,43 @@ func parsePipeTop(lex *lexer) (*pipeTop, error) { hitsFieldName: hitsFieldName, } - if !lex.isKeyword("with") { - return pt, nil + if lex.isKeyword("rank") { + rankFieldName, err := parseRankFieldName(lex) + if err != nil { + return nil, fmt.Errorf("cannot parse rank field name in [%s]: %w", pt, err) + } + pt.rankFieldName = rankFieldName } + return pt, nil +} - lex.nextToken() +func parseRankFieldName(lex *lexer) (string, error) { if !lex.isKeyword("rank") { - return nil, fmt.Errorf("missing 'rank' word after 'with' in [%s]", pt) + return "", fmt.Errorf("unexpected token: %q; want 'rank'", lex.token) } lex.nextToken() - pt.rankFieldName = "rank" + + rankFieldName := "rank" if lex.isKeyword("as") { lex.nextToken() if lex.isKeyword("", "|", ")", "(") { - return nil, fmt.Errorf("missing rank name in [%s as]", pt) + return "", fmt.Errorf("missing rank name") } } - if !lex.isKeyword("", "|", ")") { - pt.rankFieldName = lex.token - lex.nextToken() + if !lex.isKeyword("", "|", ")", "limit") { + s, err := getCompoundToken(lex) + if err != nil { + return "", err + } + rankFieldName = s } - - return pt, nil + return rankFieldName, nil +} + +func rankFieldNameString(rankFieldName string) string { + s := " rank" + if rankFieldName != "rank" { + s += " as " + rankFieldName + } + return s } diff --git a/lib/logstorage/pipe_top_test.go b/lib/logstorage/pipe_top_test.go index 42c2d6be5..a7ea9f569 100644 --- a/lib/logstorage/pipe_top_test.go +++ b/lib/logstorage/pipe_top_test.go @@ -11,15 +11,15 @@ func TestParsePipeTopSuccess(t *testing.T) { } f(`top`) - f(`top with rank`) + f(`top rank`) f(`top 5`) - f(`top 5 with rank as foo`) + f(`top 5 rank as foo`) f(`top by (x)`) f(`top 5 by (x)`) f(`top by (x, y)`) f(`top 5 by (x, y)`) - f(`top by (x) with rank`) - f(`top by (x) with rank as foo`) + f(`top by (x) rank`) + f(`top by (x) rank as foo`) } func TestParsePipeTopFailure(t *testing.T) { @@ -34,8 +34,7 @@ func TestParsePipeTopFailure(t *testing.T) { f(`top 5foo`) f(`top foo`) f(`top by`) - f(`top (x) with`) - f(`top (x) with rank as`) + f(`top (x) rank a b`) } func TestPipeTop(t *testing.T) { @@ -72,7 +71,7 @@ func TestPipeTop(t *testing.T) { }, }) - f("top with rank", [][]Field{ + f("top rank", [][]Field{ { {"a", `2`}, {"b", `3`}, @@ -170,7 +169,7 @@ func TestPipeTop(t *testing.T) { }, }) - f("top by (b) with rank as x", [][]Field{ + f("top by (b) rank as x", [][]Field{ { {"a", `2`}, {"b", `3`}, From 4f057e5669787078b48bf77f70f7c52d2f9e2a3b Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 29 Oct 2024 18:06:48 +0100 Subject: [PATCH 35/90] app/vlselect/vmui: run `make vmui-logs-update` after dd89745a3402c0e18c1a4850fffb67de905520f3 Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/7294 Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7279 Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7290 --- app/vlselect/vmui/asset-manifest.json | 4 ++-- app/vlselect/vmui/index.html | 2 +- .../vmui/static/js/{main.2810cc52.js => main.64aea685.js} | 4 ++-- ...n.2810cc52.js.LICENSE.txt => main.64aea685.js.LICENSE.txt} | 0 4 files changed, 5 insertions(+), 5 deletions(-) rename app/vlselect/vmui/static/js/{main.2810cc52.js => main.64aea685.js} (77%) rename app/vlselect/vmui/static/js/{main.2810cc52.js.LICENSE.txt => main.64aea685.js.LICENSE.txt} (100%) diff --git a/app/vlselect/vmui/asset-manifest.json b/app/vlselect/vmui/asset-manifest.json index a49effb32..7f7c1a14f 100644 --- a/app/vlselect/vmui/asset-manifest.json +++ b/app/vlselect/vmui/asset-manifest.json @@ -1,13 +1,13 @@ { "files": { "main.css": "./static/css/main.faf86aa5.css", - "main.js": "./static/js/main.2810cc52.js", + "main.js": "./static/js/main.64aea685.js", "static/js/685.f772060c.chunk.js": "./static/js/685.f772060c.chunk.js", "static/media/MetricsQL.md": "./static/media/MetricsQL.a00044c91d9781cf8557.md", "index.html": "./index.html" }, "entrypoints": [ "static/css/main.faf86aa5.css", - "static/js/main.2810cc52.js" + "static/js/main.64aea685.js" ] } \ No newline at end of file diff --git a/app/vlselect/vmui/index.html b/app/vlselect/vmui/index.html index d90c31e1f..165edef93 100644 --- a/app/vlselect/vmui/index.html +++ b/app/vlselect/vmui/index.html @@ -1 +1 @@ -UI for VictoriaLogs
\ No newline at end of file +UI for VictoriaLogs
\ No newline at end of file diff --git a/app/vlselect/vmui/static/js/main.2810cc52.js b/app/vlselect/vmui/static/js/main.64aea685.js similarity index 77% rename from app/vlselect/vmui/static/js/main.2810cc52.js rename to app/vlselect/vmui/static/js/main.64aea685.js index 008a667a7..5fec423a3 100644 --- a/app/vlselect/vmui/static/js/main.2810cc52.js +++ b/app/vlselect/vmui/static/js/main.64aea685.js @@ -1,2 +1,2 @@ -/*! For license information please see main.2810cc52.js.LICENSE.txt */ -(()=>{var e={61:(e,t,n)=>{"use strict";var r=n(375),o=n(629),a=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&a(e,".prototype.")>-1?o(n):n}},629:(e,t,n)=>{"use strict";var r=n(989),o=n(375),a=n(259),i=n(277),l=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,l),u=n(709),d=o("%Math.max%");e.exports=function(e){if("function"!==typeof e)throw new i("a function is required");var t=c(r,s,arguments);return a(t,1+d(0,e.length-(arguments.length-1)),!0)};var h=function(){return c(r,l,arguments)};u?u(e.exports,"apply",{value:h}):e.exports.apply=h},159:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",a="minute",i="hour",l="day",s="week",c="month",u="quarter",d="year",h="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},v={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()1)return e(i[0])}else{var l=t.name;b[l]=t,o=l}return!r&&o&&(y=o),o||!r&&y},S=function(e,t){if(k(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new A(n)},C=v;C.l=x,C.i=k,C.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var A=function(){function _(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=_.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(C.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(f);if(r){var o=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return C},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return S(e)=0&&(a[d]=parseInt(u,10))}var h=a[3],p=24===h?0:h,f=a[0]+"-"+a[1]+"-"+a[2]+" "+p+":"+a[4]+":"+a[5]+":000",m=+t;return(o.utc(f).valueOf()-(m-=m%1e3))/6e4},s=r.prototype;s.tz=function(e,t){void 0===e&&(e=a);var n,r=this.utcOffset(),i=this.toDate(),l=i.toLocaleString("en-US",{timeZone:e}),s=Math.round((i-new Date(l))/1e3/60),c=15*-Math.round(i.getTimezoneOffset()/15)-s;if(Number(c)){if(n=o(l,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var u=n.utcOffset();n=n.add(r-u,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},s.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=i(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return n&&n.value};var c=s.startOf;s.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var r=n&&t,i=n||t||a,s=l(+o(),i);if("string"!=typeof e)return o(e).tz(i);var c=function(e,t,n){var r=e-60*t*1e3,o=l(r,n);if(t===o)return[r,t];var a=l(r-=60*(o-t)*1e3,n);return o===a?[r,o]:[e-60*Math.min(o,a)*1e3,Math.max(o,a)]}(o.utc(e,r).valueOf(),s,i),u=c[0],d=c[1],h=o(u).utcOffset(d);return h.$x.$timezone=i,h},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){a=e}}}()},220:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,a){var i=o.prototype;a.utc=function(e){return new o({date:e,utc:!0,args:arguments})},i.utc=function(t){var n=a(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var l=i.parse;i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),l.call(this,e)};var s=i.init;i.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else s.call(this)};var c=i.utcOffset;i.utcOffset=function(r,o){var a=this.$utils().u;if(a(r))return this.$u?0:a(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],a=o[0],i=60*+o[1]+ +o[2];return 0===i?0:"+"===a?i:-i}(r),null===r))return this;var i=Math.abs(r)<=16?60*r:r,l=this;if(o)return l.$offset=i,l.$u=0===r,l;if(0!==r){var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(l=this.local().add(i+s,e)).$offset=i,l.$x.$localOffset=s}else l=this.utc();return l};var u=i.format;i.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(e){return"s"===e&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=i.diff;i.diff=function(e,t,n){if(e&&this.$u===e.$u)return h.call(this,e,t,n);var r=this.local(),o=a(e).local();return h.call(r,o,t,n)}}}()},411:(e,t,n)=>{"use strict";var r=n(709),o=n(430),a=n(277),i=n(553);e.exports=function(e,t,n){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new a("`obj` must be an object or a function`");if("string"!==typeof t&&"symbol"!==typeof t)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!i&&i(e,t);if(r)r(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===l&&d?d.enumerable:!l,value:n,writable:null===s&&d?d.writable:!s});else{if(!u&&(l||s||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},709:(e,t,n)=>{"use strict";var r=n(375)("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(o){r=!1}e.exports=r},123:e=>{"use strict";e.exports=EvalError},953:e=>{"use strict";e.exports=Error},780:e=>{"use strict";e.exports=RangeError},768:e=>{"use strict";e.exports=ReferenceError},430:e=>{"use strict";e.exports=SyntaxError},277:e=>{"use strict";e.exports=TypeError},619:e=>{"use strict";e.exports=URIError},307:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r{"use strict";var r=n(307);e.exports=Function.prototype.bind||r},375:(e,t,n)=>{"use strict";var r,o=n(953),a=n(123),i=n(780),l=n(768),s=n(430),c=n(277),u=n(619),d=Function,h=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(t){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(L){p=null}var f=function(){throw new c},m=p?function(){try{return f}catch(e){try{return p(arguments,"callee").get}catch(t){return f}}}():f,_=n(757)(),g=n(442)(),v=Object.getPrototypeOf||(g?function(e){return e.__proto__}:null),y={},b="undefined"!==typeof Uint8Array&&v?v(Uint8Array):r,w={__proto__:null,"%AggregateError%":"undefined"===typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":_&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"===typeof Atomics?r:Atomics,"%BigInt%":"undefined"===typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":a,"%Float32Array%":"undefined"===typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":y,"%Int8Array%":"undefined"===typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"===typeof JSON?JSON:r,"%Map%":"undefined"===typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&_&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?r:Promise,"%Proxy%":"undefined"===typeof Proxy?r:Proxy,"%RangeError%":i,"%ReferenceError%":l,"%Reflect%":"undefined"===typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&_&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&v?v(""[Symbol.iterator]()):r,"%Symbol%":_?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":b,"%TypeError%":c,"%Uint8Array%":"undefined"===typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"===typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(L){var k=v(v(L));w["%Error.prototype%"]=k}var x=function e(t){var n;if("%AsyncFunction%"===t)n=h("async function () {}");else if("%GeneratorFunction%"===t)n=h("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=h("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return w[t]=n,n},S={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(989),A=n(155),E=C.call(Function.call,Array.prototype.concat),M=C.call(Function.apply,Array.prototype.splice),N=C.call(Function.call,String.prototype.replace),T=C.call(Function.call,String.prototype.slice),$=C.call(Function.call,RegExp.prototype.exec),P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,O=function(e,t){var n,r=e;if(A(S,r)&&(r="%"+(n=S[r])[0]+"%"),A(w,r)){var o=w[r];if(o===y&&(o=x(r)),"undefined"===typeof o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===$(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=T(e,0,1),n=T(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return N(e,P,(function(e,t,n,o){r[r.length]=n?N(o,D,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=O("%"+r+"%",t),a=o.name,i=o.value,l=!1,u=o.alias;u&&(r=u[0],M(n,E([0,1],u)));for(var d=1,h=!0;d=n.length){var g=p(i,f);i=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:i[f]}else h=A(i,f),i=i[f];h&&!l&&(w[a]=i)}}return i}},553:(e,t,n)=>{"use strict";var r=n(375)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(o){r=null}e.exports=r},734:(e,t,n)=>{"use strict";var r=n(709),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},442:e=>{"use strict";var t={__proto__:null,foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof n)}},757:(e,t,n)=>{"use strict";var r="undefined"!==typeof Symbol&&Symbol,o=n(175);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&o())))}},175:e=>{"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},155:(e,t,n)=>{"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,a=n(989);e.exports=a.call(r,o)},267:(e,t,n)=>{var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,l=parseInt,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,f=function(){return u.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function _(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=a.test(e);return n||i.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,a,i,l,s,c=0,u=!1,d=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,a=o;return r=o=void 0,c=t,i=e.apply(a,n)}function y(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-c>=a}function b(){var e=f();if(y(e))return w(e);l=setTimeout(b,function(e){var n=t-(e-s);return d?p(n,a-(e-c)):n}(e))}function w(e){return l=void 0,g&&r?v(e):(r=o=void 0,i)}function k(){var e=f(),n=y(e);if(r=arguments,o=this,s=e,n){if(void 0===l)return function(e){return c=e,l=setTimeout(b,t),u?v(e):i}(s);if(d)return l=setTimeout(b,t),v(s)}return void 0===l&&(l=setTimeout(b,t)),i}return t=_(t)||0,m(n)&&(u=!!n.leading,a=(d="maxWait"in n)?h(_(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g),k.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=s=o=l=void 0},k.flush=function(){return void 0===l?i:w(f())},k}},424:(e,t,n)=>{var r="__lodash_hash_undefined__",o="[object Function]",a="[object GeneratorFunction]",i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,s=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,d=/^\[object .+?Constructor\]$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,p="object"==typeof self&&self&&self.Object===Object&&self,f=h||p||Function("return this")();var m=Array.prototype,_=Function.prototype,g=Object.prototype,v=f["__core-js_shared__"],y=function(){var e=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=_.toString,w=g.hasOwnProperty,k=g.toString,x=RegExp("^"+b.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=f.Symbol,C=m.splice,A=z(f,"Map"),E=z(Object,"create"),M=S?S.prototype:void 0,N=M?M.toString:void 0;function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},$.prototype.set=function(e,t){var n=this.__data__,r=D(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},P.prototype.clear=function(){this.__data__={hash:new T,map:new(A||$),string:new T}},P.prototype.delete=function(e){return R(this,e).delete(e)},P.prototype.get=function(e){return R(this,e).get(e)},P.prototype.has=function(e){return R(this,e).has(e)},P.prototype.set=function(e,t){return R(this,e).set(e,t),this};var I=F((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(B(e))return N?N.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return s.test(e)&&n.push(""),e.replace(c,(function(e,t,r,o){n.push(r?o.replace(u,"$1"):t||e)})),n}));function j(e){if("string"==typeof e||B(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function F(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i),i};return n.cache=new(F.Cache||P),n}F.Cache=P;var H=Array.isArray;function V(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function B(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==k.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:O(e,t);return void 0===r?n:r}},141:(e,t,n)=>{var r="function"===typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,a=r&&o&&"function"===typeof o.get?o.get:null,i=r&&Map.prototype.forEach,l="function"===typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&l?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=l&&s&&"function"===typeof s.get?s.get:null,u=l&&Set.prototype.forEach,d="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,m=Object.prototype.toString,_=Function.prototype.toString,g=String.prototype.match,v=String.prototype.slice,y=String.prototype.replace,b=String.prototype.toUpperCase,w=String.prototype.toLowerCase,k=RegExp.prototype.test,x=Array.prototype.concat,S=Array.prototype.join,C=Array.prototype.slice,A=Math.floor,E="function"===typeof BigInt?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,N="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"===typeof Symbol&&"object"===typeof Symbol.iterator,$="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T||"symbol")?Symbol.toStringTag:null,P=Object.prototype.propertyIsEnumerable,D=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function O(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||k.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var r=e<0?-A(-e):A(e);if(r!==e){var o=String(r),a=v.call(t,o.length+1);return y.call(o,n,"$&_")+"."+y.call(y.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return y.call(t,n,"$&_")}var L=n(634),R=L.custom,z=V(R)?R:null;function I(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function j(e){return y.call(String(e),/"/g,""")}function F(e){return"[object Array]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}function H(e){return"[object RegExp]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}function V(e){if(T)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!N)return!1;try{return N.call(e),!0}catch(t){}return!1}e.exports=function e(t,r,o,l){var s=r||{};if(U(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(U(s,"maxStringLength")&&("number"===typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!U(s,"customInspect")||s.customInspect;if("boolean"!==typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(U(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(U(s,"numericSeparator")&&"boolean"!==typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var b=s.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return q(t,s);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var k=String(t);return b?O(t,k):k}if("bigint"===typeof t){var A=String(t)+"n";return b?O(t,A):A}var M="undefined"===typeof s.depth?5:s.depth;if("undefined"===typeof o&&(o=0),o>=M&&M>0&&"object"===typeof t)return F(t)?"[Array]":"[Object]";var R=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=S.call(Array(e.indent+1)," ")}return{base:n,prev:S.call(Array(t+1),n)}}(s,o);if("undefined"===typeof l)l=[];else if(W(l,t)>=0)return"[Circular]";function B(t,n,r){if(n&&(l=C.call(l)).push(n),r){var a={depth:s.depth};return U(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,o+1,l)}return e(t,s,o+1,l)}if("function"===typeof t&&!H(t)){var K=function(e){if(e.name)return e.name;var t=g.call(_.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=X(t,B);return"[Function"+(K?": "+K:" (anonymous)")+"]"+(ee.length>0?" { "+S.call(ee,", ")+" }":"")}if(V(t)){var te=T?y.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):N.call(t);return"object"!==typeof t||T?te:Z(te)}if(function(e){if(!e||"object"!==typeof e)return!1;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"===typeof e.nodeName&&"function"===typeof e.getAttribute}(t)){for(var ne="<"+w.call(String(t.nodeName)),re=t.attributes||[],oe=0;oe"}if(F(t)){if(0===t.length)return"[]";var ae=X(t,B);return R&&!function(e){for(var t=0;t=0)return!1;return!0}(ae)?"["+J(ae,R)+"]":"[ "+S.call(ae,", ")+" ]"}if(function(e){return"[object Error]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t)){var ie=X(t,B);return"cause"in Error.prototype||!("cause"in t)||P.call(t,"cause")?0===ie.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(ie,", ")+" }":"{ ["+String(t)+"] "+S.call(x.call("[cause]: "+B(t.cause),ie),", ")+" }"}if("object"===typeof t&&m){if(z&&"function"===typeof t[z]&&L)return L(t,{depth:M-o});if("symbol"!==m&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!a||!e||"object"!==typeof e)return!1;try{a.call(e);try{c.call(e)}catch(ne){return!0}return e instanceof Map}catch(t){}return!1}(t)){var le=[];return i&&i.call(t,(function(e,n){le.push(B(n,t,!0)+" => "+B(e,t))})),Q("Map",a.call(t),le,R)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{a.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(B(e,t))})),Q("Set",c.call(t),se,R)}if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(ne){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return G("WeakMap");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(ne){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return G("WeakSet");if(function(e){if(!p||!e||"object"!==typeof e)return!1;try{return p.call(e),!0}catch(t){}return!1}(t))return G("WeakRef");if(function(e){return"[object Number]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t))return Z(B(Number(t)));if(function(e){if(!e||"object"!==typeof e||!E)return!1;try{return E.call(e),!0}catch(t){}return!1}(t))return Z(B(E.call(t)));if(function(e){return"[object Boolean]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t))return Z(f.call(t));if(function(e){return"[object String]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t))return Z(B(String(t)));if("undefined"!==typeof window&&t===window)return"{ [object Window] }";if("undefined"!==typeof globalThis&&t===globalThis||"undefined"!==typeof n.g&&t===n.g)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t)&&!H(t)){var ce=X(t,B),ue=D?D(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",he=!ue&&$&&Object(t)===t&&$ in t?v.call(Y(t),8,-1):de?"Object":"",pe=(ue||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(he||de?"["+S.call(x.call([],he||[],de||[]),": ")+"] ":"");return 0===ce.length?pe+"{}":R?pe+"{"+J(ce,R)+"}":pe+"{ "+S.call(ce,", ")+" }"}return String(t)};var B=Object.prototype.hasOwnProperty||function(e){return e in this};function U(e,t){return B.call(e,t)}function Y(e){return m.call(e)}function W(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return q(v.call(e,0,t.maxStringLength),t)+r}return I(y.call(y.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",t)}function K(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+b.call(t.toString(16))}function Z(e){return"Object("+e+")"}function G(e){return e+" { ? }"}function Q(e,t,n,r){return e+" ("+t+") {"+(r?J(n,r):S.call(n,", "))+"}"}function J(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+S.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=F(e),r=[];if(n){r.length=e.length;for(var o=0;o{"use strict";n.r(t),n.d(t,{Children:()=>U,Component:()=>l.uA,Fragment:()=>l.FK,PureComponent:()=>I,StrictMode:()=>$e,Suspense:()=>Z,SuspenseList:()=>J,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>be,cloneElement:()=>Ae,createContext:()=>l.q6,createElement:()=>l.n,createFactory:()=>ke,createPortal:()=>ne,createRef:()=>l._3,default:()=>je,findDOMNode:()=>Me,flushSync:()=>Te,forwardRef:()=>V,hydrate:()=>ue,isElement:()=>Re,isFragment:()=>Se,isMemo:()=>Ce,isValidElement:()=>xe,lazy:()=>Q,memo:()=>j,render:()=>ce,startTransition:()=>Pe,unmountComponentAtNode:()=>Ee,unstable_batchedUpdates:()=>Ne,useCallback:()=>C,useContext:()=>A,useDebugValue:()=>E,useDeferredValue:()=>De,useEffect:()=>b,useErrorBoundary:()=>M,useId:()=>N,useImperativeHandle:()=>x,useInsertionEffect:()=>Le,useLayoutEffect:()=>w,useMemo:()=>S,useReducer:()=>y,useRef:()=>k,useState:()=>v,useSyncExternalStore:()=>ze,useTransition:()=>Oe,version:()=>we});var r,o,a,i,l=n(746),s=0,c=[],u=l.fF,d=u.__b,h=u.__r,p=u.diffed,f=u.__c,m=u.unmount,_=u.__;function g(e,t){u.__h&&u.__h(o,e,s||t),s=0;var n=o.__H||(o.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function v(e){return s=1,y(R,e)}function y(e,t,n){var a=g(r++,2);if(a.t=e,!a.__c&&(a.__=[n?n(t):R(void 0,t),function(e){var t=a.__N?a.__N[0]:a.__[0],n=a.t(t,e);t!==n&&(a.__N=[n,a.__[1]],a.__c.setState({}))}],a.__c=o,!o.u)){var i=function(e,t,n){if(!a.__c.__H)return!0;var r=a.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!l||l.call(this,e,t,n);var o=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),!(!o&&a.__c.props===e)&&(!l||l.call(this,e,t,n))};o.u=!0;var l=o.shouldComponentUpdate,s=o.componentWillUpdate;o.componentWillUpdate=function(e,t,n){if(this.__e){var r=l;l=void 0,i(e,t,n),l=r}s&&s.call(this,e,t,n)},o.shouldComponentUpdate=i}return a.__N||a.__}function b(e,t){var n=g(r++,3);!u.__s&&L(n.__H,t)&&(n.__=e,n.i=t,o.__H.__h.push(n))}function w(e,t){var n=g(r++,4);!u.__s&&L(n.__H,t)&&(n.__=e,n.i=t,o.__h.push(n))}function k(e){return s=5,S((function(){return{current:e}}),[])}function x(e,t,n){s=6,w((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function S(e,t){var n=g(r++,7);return L(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function C(e,t){return s=8,S((function(){return e}),t)}function A(e){var t=o.context[e.__c],n=g(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(o)),t.props.value):e.__}function E(e,t){u.useDebugValue&&u.useDebugValue(t?t(e):e)}function M(e){var t=g(r++,10),n=v();return t.__=e,o.componentDidCatch||(o.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function N(){var e=g(r++,11);if(!e.__){for(var t=o.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function T(){for(var e;e=c.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(D),e.__H.__h.forEach(O),e.__H.__h=[]}catch(r){e.__H.__h=[],u.__e(r,e.__v)}}u.__b=function(e){o=null,d&&d(e)},u.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),_&&_(e,t)},u.__r=function(e){h&&h(e),r=0;var t=(o=e.__c).__H;t&&(a===o?(t.__h=[],o.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(D),t.__h.forEach(O),t.__h=[],r=0)),a=o},u.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==c.push(t)&&i===u.requestAnimationFrame||((i=u.requestAnimationFrame)||P)(T)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),a=o=null},u.__c=function(e,t){t.some((function(e){try{e.__h.forEach(D),e.__h=e.__h.filter((function(e){return!e.__||O(e)}))}catch(o){t.some((function(e){e.__h&&(e.__h=[])})),t=[],u.__e(o,e.__v)}})),f&&f(e,t)},u.unmount=function(e){m&&m(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{D(e)}catch(e){t=e}})),n.__H=void 0,t&&u.__e(t,n.__v))};var $="function"==typeof requestAnimationFrame;function P(e){var t,n=function(){clearTimeout(r),$&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);$&&(t=requestAnimationFrame(n))}function D(e){var t=o,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),o=t}function O(e){var t=o;e.__c=e.__(),o=t}function L(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function R(e,t){return"function"==typeof t?t(e):t}function z(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function I(e,t){this.props=e,this.context=t}function j(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:z(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,l.n)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(I.prototype=new l.uA).isPureReactComponent=!0,I.prototype.shouldComponentUpdate=function(e,t){return z(this.props,e)||z(this.state,t)};var F=l.fF.__b;l.fF.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),F&&F(e)};var H="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function V(e){function t(t){if(!("ref"in t))return e(t,null);var n=t.ref;delete t.ref;var r=e(t,n);return t.ref=n,r}return t.$$typeof=H,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var B=function(e,t){return null==e?null:(0,l.v2)((0,l.v2)(e).map(t))},U={map:B,forEach:B,count:function(e){return e?(0,l.v2)(e).length:0},only:function(e){var t=(0,l.v2)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:l.v2},Y=l.fF.__e;l.fF.__e=function(e,t,n,r){if(e.then)for(var o,a=t;a=a.__;)if((o=a.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);Y(e,t,n,r)};var W=l.fF.unmount;function q(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return q(e,t,n)}))),e}function K(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return K(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Z(){this.__u=0,this.t=null,this.__b=null}function G(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Q(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,l.n)(n,o)}return o.displayName="Lazy",o.__f=!0,o}function J(){this.u=null,this.o=null}l.fF.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),W&&W(e)},(Z.prototype=new l.uA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=G(r.__v),a=!1,i=function(){a||(a=!0,n.__R=null,o?o(l):l())};n.__R=i;var l=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=K(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},Z.prototype.componentWillUnmount=function(){this.t=[]},Z.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=q(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&(0,l.n)(l.FK,null,e.fallback);return o&&(o.__u&=-33),[(0,l.n)(l.FK,null,t.__a?null:e.children),o]};var X=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),(0,l.XX)((0,l.n)(ee,{context:t.context},e.__v),t.l)}function ne(e,t){var n=(0,l.n)(te,{__v:e,i:t});return n.containerInfo=t,n}(J.prototype=new l.uA).__a=function(e){var t=this,n=G(t.__v),r=t.o.get(e);return r[0]++,function(o){var a=function(){t.props.revealOrder?(r.push(o),X(t,e,r)):o()};n?n(a):a()}},J.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,l.v2)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},J.prototype.componentDidUpdate=J.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){X(e,n,t)}))};var re="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,oe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ae=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ie=/[A-Z0-9]/g,le="undefined"!=typeof document,se=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function ce(e,t,n){return null==t.__k&&(t.textContent=""),(0,l.XX)(e,t),"function"==typeof n&&n(),e?e.__c:null}function ue(e,t,n){return(0,l.Qv)(e,t),"function"==typeof n&&n(),e?e.__c:null}l.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(l.uA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var de=l.fF.event;function he(){}function pe(){return this.cancelBubble}function fe(){return this.defaultPrevented}l.fF.event=function(e){return de&&(e=de(e)),e.persist=he,e.isPropagationStopped=pe,e.isDefaultPrevented=fe,e.nativeEvent=e};var me,_e={enumerable:!1,configurable:!0,get:function(){return this.class}},ge=l.fF.vnode;l.fF.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1===n.indexOf("-");for(var a in t){var i=t[a];if(!("value"===a&&"defaultValue"in t&&null==i||le&&"children"===a&&"noscript"===n||"class"===a||"className"===a)){var s=a.toLowerCase();"defaultValue"===a&&"value"in t&&null==t.value?a="value":"download"===a&&!0===i?i="":"translate"===s&&"no"===i?i=!1:"o"===s[0]&&"n"===s[1]?"ondoubleclick"===s?a="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||se(t.type)?"onfocus"===s?a="onfocusin":"onblur"===s?a="onfocusout":ae.test(a)&&(a=s):s=a="oninput":o&&oe.test(a)?a=a.replace(ie,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===s&&r[a=s]&&(a="oninputCapture"),r[a]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",_e)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=re,ge&&ge(e)};var ve=l.fF.__r;l.fF.__r=function(e){ve&&ve(e),me=e.__c};var ye=l.fF.diffed;l.fF.diffed=function(e){ye&&ye(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),me=null};var be={ReactCurrentDispatcher:{current:{readContext:function(e){return me.__n[e.__c].props.value},useCallback:C,useContext:A,useDebugValue:E,useDeferredValue:De,useEffect:b,useId:N,useImperativeHandle:x,useInsertionEffect:Le,useLayoutEffect:w,useMemo:S,useReducer:y,useRef:k,useState:v,useSyncExternalStore:ze,useTransition:Oe}}},we="18.3.1";function ke(e){return l.n.bind(null,e)}function xe(e){return!!e&&e.$$typeof===re}function Se(e){return xe(e)&&e.type===l.FK}function Ce(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ae(e){return xe(e)?l.Ob.apply(null,arguments):e}function Ee(e){return!!e.__k&&((0,l.XX)(null,e),!0)}function Me(e){return e&&(e.base||1===e.nodeType&&e)||null}var Ne=function(e,t){return e(t)},Te=function(e,t){return e(t)},$e=l.FK;function Pe(e){e()}function De(e){return e}function Oe(){return[!1,Pe]}var Le=w,Re=xe;function ze(e,t){var n=t(),r=v({h:{__:n,v:t}}),o=r[0].h,a=r[1];return w((function(){o.__=n,o.v=t,Ie(o)&&a({h:o})}),[e,n,t]),b((function(){return Ie(o)&&a({h:o}),e((function(){Ie(o)&&a({h:o})}))}),[e]),n}function Ie(e){var t,n,r=e.v,o=e.__;try{var a=r();return!((t=o)===(n=a)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}var je={useState:v,useId:N,useReducer:y,useEffect:b,useLayoutEffect:w,useInsertionEffect:Le,useTransition:Oe,useDeferredValue:De,useSyncExternalStore:ze,startTransition:Pe,useRef:k,useImperativeHandle:x,useMemo:S,useCallback:C,useContext:A,useDebugValue:E,version:"18.3.1",Children:U,render:ce,hydrate:ue,unmountComponentAtNode:Ee,createPortal:ne,createElement:l.n,createContext:l.q6,createFactory:ke,cloneElement:Ae,createRef:l._3,Fragment:l.FK,isValidElement:xe,isElement:Re,isFragment:Se,isMemo:Ce,findDOMNode:Me,Component:l.uA,PureComponent:I,memo:j,forwardRef:V,flushSync:Te,unstable_batchedUpdates:Ne,StrictMode:$e,Suspense:Z,SuspenseList:J,lazy:Q,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:be}},746:(e,t,n)=>{"use strict";n.d(t,{FK:()=>x,Ob:()=>Y,Qv:()=>U,XX:()=>B,_3:()=>k,fF:()=>o,n:()=>b,q6:()=>W,uA:()=>S,v2:()=>P});var r,o,a,i,l,s,c,u,d,h,p,f={},m=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function v(e,t){for(var n in t)e[n]=t[n];return e}function y(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function b(e,t,n){var o,a,i,l={};for(i in t)"key"==i?o=t[i]:"ref"==i?a=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return w(e,l,o,a,null)}function w(e,t,n,r,i){var l={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++a:i,__i:-1,__u:0};return null==i&&null!=o.vnode&&o.vnode(l),l}function k(){return{current:null}}function x(e){return e.children}function S(e,t){this.props=e,this.context=t}function C(e,t){if(null==t)return e.__?C(e.__,e.__i+1):null;for(var n;tt&&i.sort(c));M.__r=0}function N(e,t,n,r,o,a,i,l,s,c,u){var d,h,p,_,g,v=r&&r.__k||m,y=t.length;for(n.__d=s,T(n,t,v),s=n.__d,d=0;d0?w(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,a=null,-1!==(l=o.__i=D(o,n,i,u))&&(u--,(a=n[l])&&(a.__u|=131072)),null==a||null===a.__v?(-1==l&&d--,"function"!=typeof o.type&&(o.__u|=65536)):l!==i&&(l==i-1?d--:l==i+1?d++:(l>i?d--:d++,o.__u|=65536))):o=e.__k[r]=null;if(u)for(r=0;r(null!=s&&0==(131072&s.__u)?1:0))for(;i>=0||l=0){if((s=t[i])&&0==(131072&s.__u)&&o==s.key&&a===s.type)return i;i--}if(l2&&(s.children=arguments.length>3?r.call(arguments,2):n),w(e.type,s,o||e.key,a||e.ref,null)}function W(e,t){var n={__c:t="__cC"+p++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,E(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=m.slice,o={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&null!=a.getDerivedStateFromError&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(t){e=t}throw e}},a=0,S.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=v({},this.state),"function"==typeof e&&(e=e(v({},n),this.props)),e&&v(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),E(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),E(this))},S.prototype.render=x,i=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},M.__r=0,u=0,d=R(!1),h=R(!0),p=0},640:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",o="RFC3986";e.exports={default:o,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:o}},215:(e,t,n)=>{"use strict";var r=n(518),o=n(968),a=n(640);e.exports={formats:a,parse:o,stringify:r}},968:(e,t,n)=>{"use strict";var r=n(570),o=Object.prototype.hasOwnProperty,a=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},l=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,l=n.depth>0&&/(\[[^[\]]*])/.exec(a),c=l?a.slice(0,l.index):a,u=[];if(c){if(!n.plainObjects&&o.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var d=0;n.depth>0&&null!==(l=i.exec(a))&&d=0;--a){var i,l=e[a];if("[]"===l&&n.parseArrays)i=n.allowEmptyArrays&&(""===o||n.strictNullHandling&&null===o)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var c="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,u=n.decodeDotInKeys?c.replace(/%2E/g,"."):c,d=parseInt(u,10);n.parseArrays||""!==u?!isNaN(d)&&l!==u&&String(d)===u&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(i=[])[d]=o:"__proto__"!==u&&(i[u]=o):i={0:o}}o=i}return o}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return i;if("undefined"!==typeof e.allowEmptyArrays&&"boolean"!==typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if("undefined"!==typeof e.decodeDotInKeys&&"boolean"!==typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&"undefined"!==typeof e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?i.charset:e.charset,n="undefined"===typeof e.duplicates?i.duplicates:e.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:"undefined"===typeof e.allowDots?!0===e.decodeDotInKeys||i.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"===typeof e.allowEmptyArrays?!!e.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:i.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:i.comma,decodeDotInKeys:"boolean"===typeof e.decodeDotInKeys?e.decodeDotInKeys:i.decodeDotInKeys,decoder:"function"===typeof e.decoder?e.decoder:i.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:i.depth,duplicates:n,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:i.plainObjects,strictDepth:"boolean"===typeof e.strictDepth?!!e.strictDepth:i.strictDepth,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var u="string"===typeof e?function(e,t){var n={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=c.split(t.delimiter,d),p=-1,f=t.charset;if(t.charsetSentinel)for(u=0;u-1&&(_=a(_)?[_]:_);var b=o.call(n,m);b&&"combine"===t.duplicates?n[m]=r.combine(n[m],_):b&&"last"!==t.duplicates||(n[m]=_)}return n}(e,n):e,d=n.plainObjects?Object.create(null):{},h=Object.keys(u),p=0;p{"use strict";var r=n(670),o=n(570),a=n(640),i=Object.prototype.hasOwnProperty,l={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,s(t)?t:[t])},d=Date.prototype.toISOString,h=a.default,p={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o.encode,encodeValuesOnly:!1,format:h,formatter:a.formatters[h],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},f={},m=function e(t,n,a,i,l,c,d,h,m,_,g,v,y,b,w,k,x,S){for(var C,A=t,E=S,M=0,N=!1;void 0!==(E=E.get(f))&&!N;){var T=E.get(t);if(M+=1,"undefined"!==typeof T){if(T===M)throw new RangeError("Cyclic object value");N=!0}"undefined"===typeof E.get(f)&&(M=0)}if("function"===typeof _?A=_(n,A):A instanceof Date?A=y(A):"comma"===a&&s(A)&&(A=o.maybeMap(A,(function(e){return e instanceof Date?y(e):e}))),null===A){if(c)return m&&!k?m(n,p.encoder,x,"key",b):n;A=""}if("string"===typeof(C=A)||"number"===typeof C||"boolean"===typeof C||"symbol"===typeof C||"bigint"===typeof C||o.isBuffer(A))return m?[w(k?n:m(n,p.encoder,x,"key",b))+"="+w(m(A,p.encoder,x,"value",b))]:[w(n)+"="+w(String(A))];var $,P=[];if("undefined"===typeof A)return P;if("comma"===a&&s(A))k&&m&&(A=o.maybeMap(A,m)),$=[{value:A.length>0?A.join(",")||null:void 0}];else if(s(_))$=_;else{var D=Object.keys(A);$=g?D.sort(g):D}var O=h?n.replace(/\./g,"%2E"):n,L=i&&s(A)&&1===A.length?O+"[]":O;if(l&&s(A)&&0===A.length)return L+"[]";for(var R=0;R<$.length;++R){var z=$[R],I="object"===typeof z&&"undefined"!==typeof z.value?z.value:A[z];if(!d||null!==I){var j=v&&h?z.replace(/\./g,"%2E"):z,F=s(A)?"function"===typeof a?a(L,j):L:L+(v?"."+j:"["+j+"]");S.set(t,M);var H=r();H.set(f,S),u(P,e(I,F,a,i,l,c,d,h,"comma"===a&&k&&s(A)?null:m,_,g,v,y,b,w,k,x,H))}}return P};e.exports=function(e,t){var n,o=e,c=function(e){if(!e)return p;if("undefined"!==typeof e.allowEmptyArrays&&"boolean"!==typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if("undefined"!==typeof e.encodeDotInKeys&&"boolean"!==typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&"undefined"!==typeof e.encoder&&"function"!==typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=a.default;if("undefined"!==typeof e.format){if(!i.call(a.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r,o=a.formatters[n],c=p.filter;if(("function"===typeof e.filter||s(e.filter))&&(c=e.filter),r=e.arrayFormat in l?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":p.arrayFormat,"commaRoundTrip"in e&&"boolean"!==typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u="undefined"===typeof e.allowDots?!0===e.encodeDotInKeys||p.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"===typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:u,allowEmptyArrays:"boolean"===typeof e.allowEmptyArrays?!!e.allowEmptyArrays:p.allowEmptyArrays,arrayFormat:r,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:"undefined"===typeof e.delimiter?p.delimiter:e.delimiter,encode:"boolean"===typeof e.encode?e.encode:p.encode,encodeDotInKeys:"boolean"===typeof e.encodeDotInKeys?e.encodeDotInKeys:p.encodeDotInKeys,encoder:"function"===typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"===typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:c,format:n,formatter:o,serializeDate:"function"===typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"===typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"===typeof e.sort?e.sort:null,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"===typeof c.filter?o=(0,c.filter)("",o):s(c.filter)&&(n=c.filter);var d=[];if("object"!==typeof o||null===o)return"";var h=l[c.arrayFormat],f="comma"===h&&c.commaRoundTrip;n||(n=Object.keys(o)),c.sort&&n.sort(c.sort);for(var _=r(),g=0;g0?b+y:""}},570:(e,t,n)=>{"use strict";var r=n(640),o=Object.prototype.hasOwnProperty,a=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),l=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(a(n)){for(var r=[],o=0;o=s?l.slice(u,u+s):l,h=[],p=0;p=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||a===r.RFC1738&&(40===f||41===f)?h[h.length]=d.charAt(p):f<128?h[h.length]=i[f]:f<2048?h[h.length]=i[192|f>>6]+i[128|63&f]:f<55296||f>=57344?h[h.length]=i[224|f>>12]+i[128|f>>6&63]+i[128|63&f]:(p+=1,f=65536+((1023&f)<<10|1023&d.charCodeAt(p)),h[h.length]=i[240|f>>18]+i[128|f>>12&63]+i[128|f>>6&63]+i[128|63&f])}c+=h.join("")}return c},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var n=[],r=0;r{e.exports=n(204)},204:(e,t,n)=>{"use strict";var r=function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(n(609)),o=n(609);function a(){return(a=Object.assign||function(e){for(var t=1;tr.length&&h(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var o=r.length,a=t.length;a>=r.length;a--){var i=t[a];if(!h(e,a)&&p(e,a,i)){o=a+1;break}}return o}function _(e,t){return m(e,t)===e.mask.length}function g(e,t){var n=e.maskChar,r=e.mask,o=e.prefix;if(!n){for((t=v(e,"",t,0)).lengtht.length&&(t+=o.slice(t.length,r)),l.every((function(n){for(;u=n,h(e,c=r)&&u!==o[c];){if(r>=t.length&&(t+=o[r]),l=n,a&&h(e,r)&&l===a)return!0;if(++r>=o.length)return!1}var l,c,u;return!p(e,r,n)&&n!==a||(ro.start?d=(u=function(e,t,n,r){var o=e.mask,a=e.maskChar,i=n.split(""),l=r;return i.every((function(t){for(;i=t,h(e,n=r)&&i!==o[n];)if(++r>=o.length)return!1;var n,i;return(p(e,r,t)||t===a)&&r++,r=a.length?f=a.length:f=i.length&&f{"use strict";var r=n(375),o=n(411),a=n(734)(),i=n(553),l=n(277),s=r("%Math.floor%");e.exports=function(e,t){if("function"!==typeof e)throw new l("`fn` is not a function");if("number"!==typeof t||t<0||t>4294967295||s(t)!==t)throw new l("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&i){var u=i(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(a?o(e,"length",t,!0,!0):o(e,"length",t)),e}},670:(e,t,n)=>{"use strict";var r=n(375),o=n(61),a=n(141),i=n(277),l=r("%WeakMap%",!0),s=r("%Map%",!0),c=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),d=o("WeakMap.prototype.has",!0),h=o("Map.prototype.get",!0),p=o("Map.prototype.set",!0),f=o("Map.prototype.has",!0),m=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new i("Side channel does not contain "+a(e))},get:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return c(e,r)}else if(s){if(t)return h(t,r)}else if(n)return function(e,t){var n=m(e,t);return n&&n.value}(n,r)},has:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return d(e,r)}else if(s){if(t)return f(t,r)}else if(n)return function(e,t){return!!m(e,t)}(n,r);return!1},set:function(r,o){l&&r&&("object"===typeof r||"function"===typeof r)?(e||(e=new l),u(e,r,o)):s?(t||(t=new s),p(t,r,o)):(n||(n={key:{},next:null}),function(e,t,n){var r=m(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,o))}};return r}},634:()=>{},738:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+e+".f772060c.chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="vmui:";n.l=(r,o,a,i)=>{if(e[r])e[r].push(o);else{var l,s;if(void 0!==a)for(var c=document.getElementsByTagName("script"),u=0;u{l.onerror=l.onload=null,clearTimeout(p);var o=e[r];if(delete e[r],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(n))),t)return t(n)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=h.bind(null,l.onerror),l.onload=h.bind(null,l.onload),s&&document.head.appendChild(l)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="./",(()=>{var e={792:0};n.f.j=(t,r)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var a=new Promise(((n,r)=>o=e[t]=[n,r]));r.push(o[2]=a);var i=n.p+n.u(t),l=new Error;n.l(i,(r=>{if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var a=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",l.name="ChunkLoadError",l.type=a,l.request=i,o[1](l)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,a,i=r[0],l=r[1],s=r[2],c=0;if(i.some((t=>0!==e[t]))){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(s)s(n)}for(t&&t(r);c{"use strict";var e,t=n(609),r=n(159),o=n.n(r),a=n(7),i=n.n(a),l=n(648),s=n.n(l),c=n(220),u=n.n(c);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function y(t,n,r,o){void 0===o&&(o={});let{window:a=document.defaultView,v5Compat:i=!1}=o,l=a.history,s=e.Pop,c=null,u=f();function f(){return(l.state||{idx:null}).idx}function v(){s=e.Pop;let t=f(),n=null==t?null:t-u;u=t,c&&c({action:s,location:b.location,delta:n})}function y(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,n="string"===typeof e?e:g(e);return n=n.replace(/ $/,"%20"),p(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==u&&(u=0,l.replaceState(d({},l.state,{idx:u}),""));let b={get action(){return s},get location(){return t(a,l)},listen(e){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(h,v),c=e,()=>{a.removeEventListener(h,v),c=null}},createHref:e=>n(a,e),createURL:y,encodeLocation(e){let t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(t,n){s=e.Push;let o=_(b.location,t,n);r&&r(o,t),u=f()+1;let d=m(o,u),h=b.createHref(o);try{l.pushState(d,"",h)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;a.location.assign(h)}i&&c&&c({action:s,location:b.location,delta:1})},replace:function(t,n){s=e.Replace;let o=_(b.location,t,n);r&&r(o,t),u=f();let a=m(o,u),d=b.createHref(o);l.replaceState(a,"",d),i&&c&&c({action:s,location:b.location,delta:0})},go:e=>l.go(e)};return b}var b;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(b||(b={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function w(e,t,n){return void 0===n&&(n="/"),k(e,t,n,!1)}function k(e,t,n,r){let o=R(("string"===typeof t?v(t):t).pathname||"/",n);if(null==o)return null;let a=x(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let i=null;for(let l=0;null==i&&l{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(p(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));let l=H([r,i.relativePath]),s=n.concat(i);e.children&&e.children.length>0&&(p(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),x(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:P(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of S(e.path))o(e,t,r);else o(e,t)})),t}function S(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return o?[a,""]:[a];let i=S(r.join("/")),l=[];return l.push(...i.map((e=>""===e?a:[a,e].join("/")))),o&&l.push(...i),l.map((t=>e.startsWith("/")&&""===t?"/":t))}const C=/^:[\w-]+$/,A=3,E=2,M=1,N=10,T=-2,$=e=>"*"===e;function P(e,t){let n=e.split("/"),r=n.length;return n.some($)&&(r+=T),t&&(r+=E),n.filter((e=>!$(e))).reduce(((e,t)=>e+(C.test(t)?A:""===t?M:N)),r)}function D(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},a="/",i=[];for(let l=0;l(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let a=new RegExp(o,t?void 0:"i");return[a,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=l[n]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const s=l[n];return e[r]=o&&!s?void 0:(s||"").replace(/%2F/g,"/"),e}),{}),pathname:a,pathnameBase:i,pattern:e}}function L(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return f(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function R(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function z(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function I(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function j(e,t){let n=I(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function F(e,t,n,r){let o;void 0===r&&(r=!1),"string"===typeof e?o=v(e):(o=d({},e),p(!o.pathname||!o.pathname.includes("?"),z("?","pathname","search",o)),p(!o.pathname||!o.pathname.includes("#"),z("#","pathname","hash",o)),p(!o.search||!o.search.includes("#"),z("#","search","hash",o)));let a,i=""===e||""===o.pathname,l=i?"/":o.pathname;if(null==l)a=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"===typeof e?v(e):e,a=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:a,search:B(r),hash:U(o)}}(o,a),c=l&&"/"!==l&&l.endsWith("/"),u=(i||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!c&&!u||(s.pathname+="/"),s}const H=e=>e.join("/").replace(/\/\/+/g,"/"),V=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",U=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function Y(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const W=["post","put","patch","delete"],q=(new Set(W),["get",...W]);new Set(q),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r.current=!0}));let o=t.useCallback((function(t,o){void 0===o&&(o={}),r.current&&("number"===typeof t?e.navigate(t):e.navigate(t,K({fromRouteId:n},o)))}),[e,n]);return o}():function(){te()||p(!1);let e=t.useContext(Z),{basename:n,future:r,navigator:o}=t.useContext(Q),{matches:a}=t.useContext(X),{pathname:i}=ne(),l=JSON.stringify(j(a,r.v7_relativeSplatPath)),s=t.useRef(!1);re((()=>{s.current=!0}));let c=t.useCallback((function(t,r){if(void 0===r&&(r={}),!s.current)return;if("number"===typeof t)return void o.go(t);let a=F(t,JSON.parse(l),i,"path"===r.relative);null==e&&"/"!==n&&(a.pathname="/"===a.pathname?n:H([n,a.pathname])),(r.replace?o.replace:o.push)(a,r.state,r)}),[n,o,l,i,e]);return c}()}const ae=t.createContext(null);function ie(e,n){let{relative:r}=void 0===n?{}:n,{future:o}=t.useContext(Q),{matches:a}=t.useContext(X),{pathname:i}=ne(),l=JSON.stringify(j(a,o.v7_relativeSplatPath));return t.useMemo((()=>F(e,JSON.parse(l),i,"path"===r)),[e,l,i,r])}function le(n,r,o,a){te()||p(!1);let{navigator:i}=t.useContext(Q),{matches:l}=t.useContext(X),s=l[l.length-1],c=s?s.params:{},u=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let d,h=ne();if(r){var f;let e="string"===typeof r?v(r):r;"/"===u||(null==(f=e.pathname)?void 0:f.startsWith(u))||p(!1),d=e}else d=h;let m=d.pathname||"/",_=m;if("/"!==u){let e=u.replace(/^\//,"").split("/");_="/"+m.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=w(n,{pathname:_});let y=he(g&&g.map((e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:H([u,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:H([u,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,o,a);return r&&y?t.createElement(J.Provider,{value:{location:K({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:e.Pop}},y):y}function se(){let e=function(){var e;let n=t.useContext(ee),r=_e(fe.UseRouteError),o=ge(fe.UseRouteError);if(void 0!==n)return n;return null==(e=r.errors)?void 0:e[o]}(),n=Y(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:o};return t.createElement(t.Fragment,null,t.createElement("h2",null,"Unexpected Application Error!"),t.createElement("h3",{style:{fontStyle:"italic"}},n),r?t.createElement("pre",{style:a},r):null,null)}const ce=t.createElement(se,null);class ue extends t.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?t.createElement(X.Provider,{value:this.props.routeContext},t.createElement(ee.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function de(e){let{routeContext:n,match:r,children:o}=e,a=t.useContext(Z);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),t.createElement(X.Provider,{value:n},o)}function he(e,n,r,o){var a;if(void 0===n&&(n=[]),void 0===r&&(r=null),void 0===o&&(o=null),null==e){var i;if(!r)return null;if(r.errors)e=r.matches;else{if(!(null!=(i=o)&&i.v7_partialHydration&&0===n.length&&!r.initialized&&r.matches.length>0))return null;e=r.matches}}let l=e,s=null==(a=r)?void 0:a.errors;if(null!=s){let e=l.findIndex((e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id])));e>=0||p(!1),l=l.slice(0,Math.min(l.length,e+1))}let c=!1,u=-1;if(r&&o&&o.v7_partialHydration)for(let t=0;t=0?l.slice(0,u+1):[l[0]];break}}}return l.reduceRight(((e,o,a)=>{let i,d=!1,h=null,p=null;var f;r&&(i=s&&o.route.id?s[o.route.id]:void 0,h=o.route.errorElement||ce,c&&(u<0&&0===a?(f="route-fallback",!1||ve[f]||(ve[f]=!0),d=!0,p=null):u===a&&(d=!0,p=o.route.hydrateFallbackElement||null)));let m=n.concat(l.slice(0,a+1)),_=()=>{let n;return n=i?h:d?p:o.route.Component?t.createElement(o.route.Component,null):o.route.element?o.route.element:e,t.createElement(de,{match:o,routeContext:{outlet:e,matches:m,isDataRoute:null!=r},children:n})};return r&&(o.route.ErrorBoundary||o.route.errorElement||0===a)?t.createElement(ue,{location:r.location,revalidation:r.revalidation,component:h,error:i,children:_(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):_()}),null)}var pe=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(pe||{}),fe=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(fe||{});function me(e){let n=t.useContext(Z);return n||p(!1),n}function _e(e){let n=t.useContext(G);return n||p(!1),n}function ge(e){let n=function(){let e=t.useContext(X);return e||p(!1),e}(),r=n.matches[n.matches.length-1];return r.route.id||p(!1),r.route.id}const ve={};t.startTransition;function ye(e){return function(e){let n=t.useContext(X).outlet;return n?t.createElement(ae.Provider,{value:e},n):n}(e.context)}function be(e){p(!1)}function we(n){let{basename:r="/",children:o=null,location:a,navigationType:i=e.Pop,navigator:l,static:s=!1,future:c}=n;te()&&p(!1);let u=r.replace(/^\/*/,"/"),d=t.useMemo((()=>({basename:u,navigator:l,static:s,future:K({v7_relativeSplatPath:!1},c)})),[u,c,l,s]);"string"===typeof a&&(a=v(a));let{pathname:h="/",search:f="",hash:m="",state:_=null,key:g="default"}=a,y=t.useMemo((()=>{let e=R(h,u);return null==e?null:{location:{pathname:e,search:f,hash:m,state:_,key:g},navigationType:i}}),[u,h,f,m,_,g,i]);return null==y?null:t.createElement(Q.Provider,{value:d},t.createElement(J.Provider,{children:o,value:y}))}function ke(e){let{children:t,location:n}=e;return le(xe(t),n)}new Promise((()=>{}));t.Component;function xe(e,n){void 0===n&&(n=[]);let r=[];return t.Children.forEach(e,((e,o)=>{if(!t.isValidElement(e))return;let a=[...n,o];if(e.type===t.Fragment)return void r.push.apply(r,xe(e.props.children,a));e.type!==be&&p(!1),e.props.index&&e.props.children&&p(!1);let i={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=xe(e.props.children,a)),r.push(i)})),r}function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function Ae(e){return void 0===e&&(e=""),new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Ee=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Me=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(Id){}const Ne=t.createContext({isTransitioning:!1});new Map;const Te=t.startTransition;t.flushSync,t.useId;function $e(e){let{basename:n,children:r,future:o,window:a}=e,i=t.useRef();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),y((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=v(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),_("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"===typeof t?t:g(t))}),(function(e,t){f("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:a,v5Compat:!0}));let l=i.current,[s,c]=t.useState({action:l.action,location:l.location}),{v7_startTransition:u}=o||{},d=t.useCallback((e=>{u&&Te?Te((()=>c(e))):c(e)}),[c,u]);return t.useLayoutEffect((()=>l.listen(d)),[l,d]),t.createElement(we,{basename:n,children:r,location:s.location,navigationType:s.action,navigator:l,future:o})}const Pe="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,De=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Oe=t.forwardRef((function(e,n){let r,{onClick:o,relative:a,reloadDocument:i,replace:l,state:s,target:c,to:u,preventScrollReset:d,unstable_viewTransition:h}=e,f=Ce(e,Ee),{basename:m}=t.useContext(Q),_=!1;if("string"===typeof u&&De.test(u)&&(r=u,Pe))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=R(t.pathname,m);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:_=!0}catch(Id){}let v=function(e,n){let{relative:r}=void 0===n?{}:n;te()||p(!1);let{basename:o,navigator:a}=t.useContext(Q),{hash:i,pathname:l,search:s}=ie(e,{relative:r}),c=l;return"/"!==o&&(c="/"===l?o:H([o,l])),a.createHref({pathname:c,search:s,hash:i})}(u,{relative:a}),y=function(e,n){let{target:r,replace:o,state:a,preventScrollReset:i,relative:l,unstable_viewTransition:s}=void 0===n?{}:n,c=oe(),u=ne(),d=ie(e,{relative:l});return t.useCallback((t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,r)){t.preventDefault();let n=void 0!==o?o:g(u)===g(d);c(e,{replace:n,state:a,preventScrollReset:i,relative:l,unstable_viewTransition:s})}}),[u,c,d,o,a,r,e,i,l,s])}(u,{replace:l,state:s,target:c,preventScrollReset:d,relative:a,unstable_viewTransition:h});return t.createElement("a",Se({},f,{href:r||v,onClick:_||i?o:function(e){o&&o(e),e.defaultPrevented||y(e)},ref:n,target:c}))}));const Le=t.forwardRef((function(e,n){let{"aria-current":r="page",caseSensitive:o=!1,className:a="",end:i=!1,style:l,to:s,unstable_viewTransition:c,children:u}=e,d=Ce(e,Me),h=ie(s,{relative:d.relative}),f=ne(),m=t.useContext(G),{navigator:_,basename:g}=t.useContext(Q),v=null!=m&&function(e,n){void 0===n&&(n={});let r=t.useContext(Ne);null==r&&p(!1);let{basename:o}=Ie(Re.useViewTransitionState),a=ie(e,{relative:n.relative});if(!r.isTransitioning)return!1;let i=R(r.currentLocation.pathname,o)||r.currentLocation.pathname,l=R(r.nextLocation.pathname,o)||r.nextLocation.pathname;return null!=O(a.pathname,l)||null!=O(a.pathname,i)}(h)&&!0===c,y=_.encodeLocation?_.encodeLocation(h).pathname:h.pathname,b=f.pathname,w=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;o||(b=b.toLowerCase(),w=w?w.toLowerCase():null,y=y.toLowerCase()),w&&g&&(w=R(w,g)||w);const k="/"!==y&&y.endsWith("/")?y.length-1:y.length;let x,S=b===y||!i&&b.startsWith(y)&&"/"===b.charAt(k),C=null!=w&&(w===y||!i&&w.startsWith(y)&&"/"===w.charAt(y.length)),A={isActive:S,isPending:C,isTransitioning:v},E=S?r:void 0;x="function"===typeof a?a(A):[a,S?"active":null,C?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let M="function"===typeof l?l(A):l;return t.createElement(Oe,Se({},d,{"aria-current":E,className:x,ref:n,style:M,to:s,unstable_viewTransition:c}),"function"===typeof u?u(A):u)}));var Re,ze;function Ie(e){let n=t.useContext(Z);return n||p(!1),n}function je(e){let n=t.useRef(Ae(e)),r=t.useRef(!1),o=ne(),a=t.useMemo((()=>function(e,t){let n=Ae(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(o.search,r.current?null:n.current)),[o.search]),i=oe(),l=t.useCallback(((e,t)=>{const n=Ae("function"===typeof e?e(a):e);r.current=!0,i("?"+n,t)}),[i,a]);return[a,l]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Re||(Re={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(ze||(ze={}));const Fe=()=>{var e;const t=(null===(e=document.getElementById("root"))||void 0===e?void 0:e.dataset.params)||"{}";try{return JSON.parse(t)}catch(Id){return console.error(Id),{}}},He=()=>!!Object.keys(Fe()).length,Ve=/(\/select\/)(\d+|\d.+)(\/)(.+)/,Be=e=>{var t;return(null===(t=e.match(Ve))||void 0===t?void 0:t[2])||""};let Ue=function(e){return e.logs="logs",e.anomaly="anomaly",e}({});const Ye=(e,t)=>{t?window.localStorage.setItem(e,JSON.stringify({value:t})):qe([e]),window.dispatchEvent(new Event("storage"))},We=e=>{const t=window.localStorage.getItem(e);if(null!==t)try{var n;return null===(n=JSON.parse(t))||void 0===n?void 0:n.value}catch(Id){return t}},qe=e=>e.forEach((e=>window.localStorage.removeItem(e))),{REACT_APP_TYPE:Ke}={REACT_APP_TYPE:"logs"};var Ze=n(215),Ge=n.n(Ze),Qe=n(424),Je=n.n(Qe);const Xe={table:100,chart:20,code:1e3},et=(e,t)=>{const n=window.location.hash.split("?")[1],r=Ge().parse(n,{ignoreQueryPrefix:!0});return Je()(r,e,t||"")};let tt=function(e){return e.yhat="yhat",e.yhatUpper="yhat_upper",e.yhatLower="yhat_lower",e.anomaly="vmui_anomalies_points",e.training="vmui_training_data",e.actual="actual",e.anomalyScore="anomaly_score",e}({}),nt=function(e){return e.table="table",e.chart="chart",e.code="code",e}({}),rt=function(e){return e.emptyServer="Please enter Server URL",e.validServer="Please provide a valid Server URL",e.validQuery="Please enter a valid Query and execute it",e.traceNotFound="Not found the tracing information",e.emptyTitle="Please enter title",e.positiveNumber="Please enter positive number",e.validStep="Please enter a valid step",e.unknownType="Unknown server response format: must have 'errorType'",e}({}),ot=function(e){return e.system="system",e.light="light",e.dark="dark",e}({}),at=function(e){return e.empty="empty",e.metricsql="metricsql",e.label="label",e.labelValue="labelValue",e}({});const it=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),lt=(e,t)=>{document.documentElement.style.setProperty(`--${e}`,t)},st=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,ct=e=>e.replace(/\/$/,""),ut=et("g0.tenantID",""),dt={serverUrl:ct((e=>{const{serverURL:t}=Fe(),n=We("SERVER_URL"),r=window.location.href.replace(/\/(select\/)?(vmui)\/.*/,""),o=`${window.location.origin}${window.location.pathname.replace(/^\/vmui/,"")}`,a=window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),i=t||n||a;switch(Ke){case Ue.logs:return r;case Ue.anomaly:return n||o;default:return e?((e,t)=>e.replace(Ve,`$1${t}/$4`))(i,e):i}})(ut)),tenantId:ut,theme:We("THEME")||ot.system,isDarkTheme:null,flags:{},appConfig:{}};function ht(e,t){switch(t.type){case"SET_SERVER":return{...e,serverUrl:ct(t.payload)};case"SET_TENANT_ID":return{...e,tenantId:t.payload};case"SET_THEME":return Ye("THEME",t.payload),{...e,theme:t.payload};case"SET_DARK_THEME":return{...e,isDarkTheme:(n=e.theme,n===ot.system&&st()||n===ot.dark)};case"SET_FLAGS":return{...e,flags:t.payload};case"SET_APP_CONFIG":return{...e,appConfig:t.payload};default:throw new Error}var n}var pt=n(746);var ft=0;Array.isArray;function mt(e,t,n,r,o,a){t||(t={});var i,l,s=t;"ref"in t&&(i=t.ref,delete t.ref);var c={type:e,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--ft,__i:-1,__u:0,__source:o,__self:a};if("function"==typeof e&&(i=e.defaultProps))for(l in i)void 0===s[l]&&(s[l]=i[l]);return pt.fF.vnode&&pt.fF.vnode(c),c}const _t=(0,t.createContext)({}),gt=()=>(0,t.useContext)(_t).state,vt=()=>(0,t.useContext)(_t).dispatch,yt=Object.entries(dt).reduce(((e,t)=>{let[n,r]=t;return{...e,[n]:et(n)||r}}),{}),bt="YYYY-MM-DD",wt="YYYY-MM-DD HH:mm:ss",kt="YYYY-MM-DD[T]HH:mm:ss",xt=window.innerWidth/4,St=window.innerWidth/40,Ct=1,At=1578e8,Et=Intl.supportedValuesOf,Mt=Et?Et("timeZone"):["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Katmandu","Asia/Khandyga","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis"],Nt=[{long:"years",short:"y",possible:"year"},{long:"weeks",short:"w",possible:"week"},{long:"days",short:"d",possible:"day"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}],Tt=Nt.map((e=>e.short)),$t=e=>{let t=(n=e,Math.round(1e3*n)/1e3);var n;const r=Math.round(e);e>=100&&(t=r-r%10),e<100&&e>=10&&(t=r-r%5),e<10&&e>=1&&(t=r),e<1&&e>.01&&(t=Math.round(40*e)/40);const a=(e=>zt(o().duration(e,"seconds").asMilliseconds()))(t||.001);return a.replace(/\s/g,"")},Pt=e=>{const t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Tt.includes(n[0]))return{[n[0]]:t[0]}},Dt=(e,t)=>$t(e/(t?St:xt)),Ot=(e,t)=>{const n=(t||o()().toDate()).valueOf()/1e3,r=(e=>{const t=Nt.map((e=>e.short)).join("|"),n=new RegExp(`\\d+(\\.\\d+)?[${t}]+`,"g"),r=(e.match(n)||[]).reduce(((e,t)=>{const n=Pt(t);return n?{...e,...n}:{...e}}),{});return o().duration(r).asSeconds()})(e);return{start:n-r,end:n,step:Dt(r),date:Lt(t||o()().toDate())}},Lt=e=>o().tz(e).utc().format(kt),Rt=e=>o().tz(e).format(kt),zt=e=>{const t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),o=Math.floor(e/1e3/3600%24),a=Math.floor(e/864e5),i=["d","h","m","s","ms"],l=[a,o,r,n,t].map(((e,t)=>e?`${e}${i[t]}`:""));return l.filter((e=>e)).join("")},It=e=>{const t=o()(1e3*e);return t.isValid()?t.toDate():new Date},jt="logs"===Ue.logs,Ft=[{title:"Last 5 minutes",duration:"5m",isDefault:jt},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!jt},{title:"Last 1 hour",duration:"1h"},{title:"Last 3 hours",duration:"3h"},{title:"Last 6 hours",duration:"6h"},{title:"Last 12 hours",duration:"12h"},{title:"Last 24 hours",duration:"24h"},{title:"Last 2 days",duration:"2d"},{title:"Last 7 days",duration:"7d"},{title:"Last 30 days",duration:"30d"},{title:"Last 90 days",duration:"90d"},{title:"Last 180 days",duration:"180d"},{title:"Last 1 year",duration:"1y"},{title:"Yesterday",duration:"1d",until:()=>o()().tz().subtract(1,"day").endOf("day").toDate()},{title:"Today",duration:"1d",until:()=>o()().tz().endOf("day").toDate()}].map((e=>({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:()=>o()().tz().toDate(),...e}))),Ht=e=>{var t;let{relativeTimeId:n,defaultDuration:r,defaultEndInput:o}=e;const a=null===(t=Ft.find((e=>e.isDefault)))||void 0===t?void 0:t.id,i=n||et("g0.relative_time",a),l=Ft.find((e=>e.id===i));return{relativeTimeId:l?i:"none",duration:l?l.duration:r,endInput:l?l.until():o}},Vt=e=>`UTC${o()().tz(e).format("Z")}`,Bt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=new RegExp(e,"i");return Mt.reduce(((n,r)=>{const o=(r.match(/^(.*?)\//)||[])[1]||"unknown",a=Vt(r),i=a.replace(/UTC|0/,""),l=r.replace(/[/_]/g," "),s={region:r,utc:a,search:`${r} ${a} ${l} ${i}`},c=!e||e&&t.test(s.search);return c&&n[o]?n[o].push(s):c&&(n[o]=[s]),n}),{})},Ut=e=>{o().tz.setDefault(e)},Yt=()=>{const e=o().tz.guess(),t=(e=>{try{return o()().tz(e),!0}catch(Id){return!1}})(e);return{isValid:t,title:t?`Browser Time (${e})`:"Browser timezone (UTC)",region:t?e:"UTC"}},Wt=We("TIMEZONE")||Yt().region;Ut(Wt);const qt={...(()=>{const e=et("g0.range_input"),{duration:t,endInput:n,relativeTimeId:r}=Ht({defaultDuration:e||"1h",defaultEndInput:(a=et("g0.end_input",o()().utc().format(kt)),o()(a).utcOffset(0,!0).toDate()),relativeTimeId:e?et("g0.relative_time","none"):void 0});var a;return{duration:t,period:Ot(t,n),relativeTime:r}})(),timezone:Wt};function Kt(e,t){switch(t.type){case"SET_TIME_STATE":return{...e,...t.payload};case"SET_DURATION":return{...e,duration:t.payload,period:Ot(t.payload,It(e.period.end)),relativeTime:"none"};case"SET_RELATIVE_TIME":return{...e,duration:t.payload.duration,period:Ot(t.payload.duration,t.payload.until),relativeTime:t.payload.id};case"SET_PERIOD":const n=(e=>{const t=e.to.valueOf()-e.from.valueOf();return zt(t)})(t.payload);return{...e,duration:n,period:Ot(n,t.payload.to),relativeTime:"none"};case"RUN_QUERY":const{duration:r,endInput:o}=Ht({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:It(e.period.end)});return{...e,period:Ot(r,o)};case"RUN_QUERY_TO_NOW":return{...e,period:Ot(e.duration)};case"SET_TIMEZONE":return Ut(t.payload),Ye("TIMEZONE",t.payload),e.defaultTimezone&&Ye("DISABLED_DEFAULT_TIMEZONE",t.payload!==e.defaultTimezone),{...e,timezone:t.payload};case"SET_DEFAULT_TIMEZONE":return{...e,defaultTimezone:t.payload};default:throw new Error}}const Zt=(0,t.createContext)({}),Gt=()=>(0,t.useContext)(Zt).state,Qt=()=>(0,t.useContext)(Zt).dispatch,Jt=e=>{const t=e.map((e=>e.values[e.index])),n=(e=>{const t=We(e);return t?JSON.parse(t):[]})("QUERY_HISTORY");n[0]||(n[0]=[]);const r=n[0];t.forEach((e=>{!r.includes(e)&&e&&r.unshift(e),r.length>250&&r.shift()})),Ye("QUERY_HISTORY",JSON.stringify(n))},Xt=50,en=1e3,tn=1e3;const nn=(()=>{var e;const t=(null===(e=(window.location.hash.split("?")[1]||"").match(/g\d+\.expr/g))||void 0===e?void 0:e.length)||1;return new Array(t>10?10:t).fill(1).map(((e,t)=>et(`g${t}.expr`,"")))})(),rn={query:nn,queryHistory:nn.map((e=>({index:0,values:[e]}))),autocomplete:We("AUTOCOMPLETE")||!1,autocompleteQuick:!1,autocompleteCache:new class{constructor(){this.maxSize=void 0,this.map=void 0,this.maxSize=tn,this.map=new Map}get(e){for(const[t,n]of this.map){const r=JSON.parse(t),o=r.start===e.start&&r.end===e.end,a=r.type===e.type,i=e.value&&r.value&&e.value.includes(r.value),l=r.match===e.match||i,s=n.length=this.maxSize){const e=this.map.keys().next().value;this.map.delete(e)}this.map.set(JSON.stringify(e),t)}},metricsQLFunctions:[]};function on(e,t){switch(t.type){case"SET_QUERY":return{...e,query:t.payload.map((e=>e))};case"SET_QUERY_HISTORY":return Jt(t.payload),{...e,queryHistory:t.payload};case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),{...e,queryHistory:e.queryHistory};case"TOGGLE_AUTOCOMPLETE":return Ye("AUTOCOMPLETE",!e.autocomplete),{...e,autocomplete:!e.autocomplete};case"SET_AUTOCOMPLETE_QUICK":return{...e,autocompleteQuick:t.payload};case"SET_AUTOCOMPLETE_CACHE":return e.autocompleteCache.put(t.payload.key,t.payload.value),{...e};case"SET_METRICSQL_FUNCTIONS":return{...e,metricsQLFunctions:t.payload};default:throw new Error}}const an=(0,t.createContext)({}),ln=()=>(0,t.useContext)(an).state,sn=()=>(0,t.useContext)(an).dispatch,cn=()=>mt("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:mt("path",{d:"M6.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29C15.73 4.1 12.46 3.01 7.43 3h-.06C2.33 3-.93 4.1.24 5.18c0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a454.94 454.94 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44a454.4 454.4 0 0 0 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM35 5l-5.84 14.46h-2.43L20.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H35Zm17.18 0v14.46H49.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L38.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H36.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15Z"})}),un=()=>mt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:[mt("path",{d:"M11.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29 1.17-1.09-2.1-2.17-7.13-2.18h-.06c-5.04 0-8.3 1.1-7.13 2.18 0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a455.13 455.13 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44 2.05-1.82 4.09-3.65 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM40 5l-5.84 14.46h-2.43L25.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H40Zm17.18 0v14.46H54.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L43.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H41.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15ZM1.73 36v-5.17l-.67-.07a.6.6 0 0 1-.21-.1.23.23 0 0 1-.08-.18v-.44h.96v-.59c0-.34.05-.65.14-.92a1.79 1.79 0 0 1 1.08-1.11 2.45 2.45 0 0 1 1.62-.02l-.03.53c0 .1-.06.15-.16.16H4c-.18 0-.35.03-.5.08a.95.95 0 0 0-.39.23c-.1.11-.19.25-.25.43-.05.18-.08.4-.08.65v.56h1.75v.78H2.8V36H1.73Zm6.17-6.17c.45 0 .85.07 1.2.22a2.57 2.57 0 0 1 1.5 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.86-.07-1.22-.21a2.57 2.57 0 0 1-1.5-1.62c-.12-.38-.19-.81-.19-1.3 0-.47.07-.9.2-1.28a2.57 2.57 0 0 1 1.5-1.62c.35-.15.76-.22 1.2-.22Zm0 5.42c.6 0 1.05-.2 1.35-.6.3-.4.44-.97.44-1.69s-.15-1.28-.44-1.69c-.3-.4-.75-.6-1.35-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.33.73-.08.28-.11.6-.11.96 0 .72.15 1.29.44 1.69.3.4.76.6 1.36.6Zm5.26-4.11c.2-.42.43-.74.71-.97.28-.24.62-.36 1.03-.36.13 0 .25.02.36.05.12.02.23.07.32.13l-.08.8c-.02.1-.08.15-.18.15l-.24-.04a1.7 1.7 0 0 0-.88.05c-.15.05-.29.14-.4.25-.12.1-.23.24-.32.4-.1.17-.18.35-.26.56V36h-1.07v-6.08h.61c.12 0 .2.02.24.07.05.04.08.12.1.23l.06.92Zm13.73-3.82L23.39 36h-1.46l-3.5-8.68h1.29a.54.54 0 0 1 .54.37l2.04 5.3a11.31 11.31 0 0 1 .37 1.21 11.65 11.65 0 0 1 .35-1.22l2.03-5.29c.03-.1.1-.18.19-.25.1-.08.21-.12.35-.12h1.3Zm2.2 2.52V36H27.6v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.08.36a1 1 0 0 1-.51.5.96.96 0 0 1-.73 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .37.08c.12.05.22.11.3.2a.94.94 0 0 1 .3.67Zm5.72 3.1a.68.68 0 0 1-.13.13c-.04.03-.1.05-.18.05a.42.42 0 0 1-.22-.07 3.95 3.95 0 0 0-.62-.31c-.14-.05-.3-.07-.51-.07-.26 0-.5.04-.69.14-.2.1-.36.23-.49.4-.13.18-.22.4-.29.64-.06.25-.1.53-.1.85 0 .33.04.62.1.88.08.25.18.47.32.64.13.18.29.3.48.4.18.09.4.13.63.13a1.6 1.6 0 0 0 .94-.27l.26-.2a.4.4 0 0 1 .25-.09.3.3 0 0 1 .27.14l.43.54a2.76 2.76 0 0 1-1.77.96c-.22.03-.43.05-.65.05a2.57 2.57 0 0 1-1.96-.83c-.25-.28-.45-.6-.6-1-.14-.4-.21-.85-.21-1.35 0-.45.06-.87.2-1.25a2.61 2.61 0 0 1 1.51-1.67c.37-.16.8-.24 1.28-.24.46 0 .86.07 1.2.22.35.15.66.36.94.64l-.4.54Zm3.43 4.95c-.54 0-.95-.15-1.24-.45-.28-.3-.42-.73-.42-1.26v-3.44h-.63a.29.29 0 0 1-.2-.07c-.06-.06-.09-.13-.09-.24v-.59l.99-.16.31-1.68a.33.33 0 0 1 .12-.18.34.34 0 0 1 .21-.07h.77v1.94h1.64v1.05h-1.64v3.34c0 .2.05.34.14.45.1.1.22.16.39.16a.73.73 0 0 0 .39-.1l.12-.07a.2.2 0 0 1 .11-.03c.05 0 .08.01.11.03l.09.1.44.72c-.21.18-.46.32-.74.4-.28.1-.57.15-.87.15Zm5.09-6.35c.46 0 .87.07 1.24.22a2.7 2.7 0 0 1 1.58 1.63c.14.39.22.83.22 1.31 0 .49-.08.93-.22 1.32-.14.4-.35.73-.62 1-.26.28-.58.49-.96.64-.37.15-.78.22-1.24.22a3.4 3.4 0 0 1-1.25-.22 2.71 2.71 0 0 1-1.59-1.64 3.8 3.8 0 0 1-.21-1.32c0-.48.07-.92.21-1.31a2.75 2.75 0 0 1 1.58-1.63c.38-.15.8-.22 1.26-.22Zm0 5.2c.51 0 .89-.17 1.13-.52.25-.34.38-.84.38-1.5a2.6 2.6 0 0 0-.38-1.53c-.24-.34-.62-.52-1.13-.52-.52 0-.9.18-1.16.53-.25.35-.37.85-.37 1.51s.12 1.17.37 1.51c.25.35.64.52 1.16.52Zm5.56-4.04c.2-.37.42-.65.69-.86.26-.21.57-.32.94-.32.28 0 .5.06.68.19l-.1 1.1a.3.3 0 0 1-.09.16.24.24 0 0 1-.15.04 1.8 1.8 0 0 1-.27-.03 2.01 2.01 0 0 0-.34-.03c-.16 0-.3.03-.44.08a1.1 1.1 0 0 0-.34.2c-.1.1-.2.2-.27.33-.08.13-.15.27-.22.44V36H47.7v-6.16h.87c.15 0 .26.03.31.09.06.05.1.15.13.29l.09.7Zm4.62-1.07V36h-1.49v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.07.36a1 1 0 0 1-.51.5.96.96 0 0 1-.74 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .38.08c.11.05.21.11.3.2a.94.94 0 0 1 .28.67Zm4.56 5.32a7.8 7.8 0 0 0-1.08.12c-.29.05-.52.12-.7.2a.92.92 0 0 0-.38.3.64.64 0 0 0-.11.36c0 .26.07.45.23.56.15.11.35.17.6.17.3 0 .57-.06.79-.17.22-.1.44-.28.65-.5v-1.04Zm-3.4-2.67c.71-.65 1.57-.97 2.56-.97.36 0 .68.06.97.18a1.99 1.99 0 0 1 1.16 1.24c.1.3.16.61.16.96V36h-.67a.7.7 0 0 1-.33-.06c-.07-.04-.13-.13-.18-.26l-.13-.44c-.16.14-.3.26-.46.37a2.8 2.8 0 0 1-.97.43 2.77 2.77 0 0 1-1.32-.05 1.62 1.62 0 0 1-.57-.31 1.41 1.41 0 0 1-.38-.53 1.85 1.85 0 0 1-.05-1.18c.05-.16.14-.3.25-.45.12-.14.28-.27.46-.4a3 3 0 0 1 .7-.32 9.19 9.19 0 0 1 2.2-.33v-.36c0-.41-.09-.71-.26-.91-.18-.2-.43-.3-.76-.3a1.84 1.84 0 0 0-1.02.28l-.33.18c-.1.06-.2.09-.32.09-.1 0-.2-.03-.27-.08a.72.72 0 0 1-.17-.2l-.26-.47Zm11.49 4.32V36h-4.88v-8.6h1.16v7.62h3.72Zm3.16-5.2c.44 0 .84.08 1.2.23a2.57 2.57 0 0 1 1.49 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.85-.07-1.21-.21a2.57 2.57 0 0 1-1.5-1.62c-.13-.38-.2-.81-.2-1.3 0-.47.07-.9.2-1.28.14-.39.33-.72.59-1 .25-.26.55-.47.9-.62.37-.15.77-.22 1.22-.22Zm0 5.43c.6 0 1.05-.2 1.34-.6.3-.4.45-.97.45-1.69s-.15-1.28-.45-1.69c-.3-.4-.74-.6-1.34-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.34.73-.07.28-.1.6-.1.96 0 .72.14 1.29.44 1.69.3.4.75.6 1.36.6Zm6.33-2.22c.22 0 .4-.03.57-.09.16-.06.3-.14.41-.25.12-.11.2-.24.26-.39.05-.15.08-.31.08-.5 0-.37-.11-.66-.34-.88-.23-.22-.55-.33-.98-.33-.43 0-.76.1-.99.33-.22.22-.34.51-.34.89 0 .18.03.34.09.5a1.1 1.1 0 0 0 .67.63c.16.06.35.09.57.09Zm1.93 3.3a.51.51 0 0 0-.13-.36.84.84 0 0 0-.34-.22 8.57 8.57 0 0 0-1.73-.2 7.5 7.5 0 0 1-.62-.05c-.23.1-.41.23-.56.4a.8.8 0 0 0-.1.92c.07.12.18.22.32.3.14.1.32.16.54.21a3.5 3.5 0 0 0 1.55 0c.23-.05.42-.12.57-.22.16-.1.29-.21.37-.34a.8.8 0 0 0 .13-.44Zm1.08-6.17v.4c0 .13-.08.21-.25.25l-.69.09c.14.26.2.56.2.88a1.86 1.86 0 0 1-1.36 1.82 3.07 3.07 0 0 1-1.72.04c-.12.08-.22.16-.29.25a.44.44 0 0 0-.1.27c0 .15.06.26.17.33.12.08.28.13.47.16a5 5 0 0 0 .66.06 16.56 16.56 0 0 1 1.5.13c.26.05.48.12.67.22.19.1.34.24.46.41.12.18.18.4.18.69 0 .26-.07.5-.2.75s-.31.46-.56.65c-.24.2-.54.34-.9.46a4.57 4.57 0 0 1-2.36.04c-.33-.09-.6-.2-.82-.36a1.56 1.56 0 0 1-.5-.51c-.1-.2-.16-.4-.16-.6 0-.3.1-.56.28-.77.19-.2.45-.37.77-.5a1.15 1.15 0 0 1-.43-.32.88.88 0 0 1-.15-.54c0-.09.01-.18.04-.27.04-.1.08-.2.15-.28a1.55 1.55 0 0 1 .58-.5c-.3-.16-.53-.39-.7-.66-.17-.28-.25-.6-.25-.97 0-.3.05-.57.16-.8.12-.25.28-.46.48-.63.2-.17.45-.3.73-.4a3 3 0 0 1 2.3.21h1.64Zm4.65.76a.24.24 0 0 1-.23.14.42.42 0 0 1-.2-.07 3.59 3.59 0 0 0-.67-.3 1.8 1.8 0 0 0-1.03 0c-.14.05-.27.11-.37.2a.87.87 0 0 0-.23.27.75.75 0 0 0-.08.35c0 .15.04.28.13.39.1.1.21.19.36.27.15.07.32.14.5.2a13.63 13.63 0 0 1 1.16.4c.2.08.36.18.5.3a1.33 1.33 0 0 1 .5 1.07 2 2 0 0 1-.15.78c-.1.24-.25.44-.45.62-.2.17-.43.3-.72.4a3.1 3.1 0 0 1-2.14-.05 2.97 2.97 0 0 1-.87-.53l.25-.41c.04-.05.07-.1.12-.12a.3.3 0 0 1 .17-.04.4.4 0 0 1 .22.08l.3.19a1.91 1.91 0 0 0 1.03.27c.2 0 .38-.03.54-.08.16-.06.29-.13.4-.22a.96.96 0 0 0 .3-.7c0-.17-.05-.31-.14-.42-.09-.11-.2-.2-.36-.28a2.6 2.6 0 0 0-.5-.2l-.59-.19c-.2-.06-.39-.14-.58-.22a2.14 2.14 0 0 1-.5-.3 1.45 1.45 0 0 1-.36-.46c-.1-.19-.14-.41-.14-.67a1.6 1.6 0 0 1 .57-1.23c.18-.16.4-.3.68-.39.26-.1.57-.14.91-.14a2.84 2.84 0 0 1 1.9.7l-.23.4Z"}),mt("defs",{children:mt("path",{d:"M0 0h85v38H0z"})})]}),dn=()=>mt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:mt("path",{d:"M11.118 10.476c.36.28.801.433 1.257.436h.052c.48-.007.961-.192 1.25-.444 1.509-1.279 5.88-5.287 5.88-5.287 1.168-1.087-2.093-2.174-7.13-2.181h-.06c-5.036.007-8.298 1.094-7.13 2.181 0 0 4.372 4.008 5.88 5.295zm2.559 2.166c-.359.283-.801.439-1.258.444h-.044a2.071 2.071 0 0 1-1.257-.444C10.082 11.755 6.384 8.42 5 7.148v1.93c0 .215.081.496.222.629l.07.064c1.045.955 4.546 4.154 5.825 5.245.358.283.8.438 1.257.444h.044c.489-.015.962-.2 1.258-.444 1.309-1.11 4.948-4.444 5.887-5.31.148-.132.222-.413.222-.628v-1.93a455.127 455.127 0 0 1-6.11 5.494zm-1.258 4.984a2.071 2.071 0 0 0 1.258-.436c2.053-1.815 4.09-3.65 6.11-5.502v1.938c0 .207-.075.488-.223.621-.94.873-4.578 4.2-5.887 5.31-.296.25-.77.436-1.258.443h-.044a2.071 2.071 0 0 1-1.257-.436c-1.204-1.027-4.376-3.928-5.616-5.062l-.28-.255c-.14-.133-.221-.414-.221-.621v-1.938c1.383 1.265 5.081 4.607 6.117 5.495.358.282.8.438 1.257.443h.044zM40 5l-5.84 14.46h-2.43L25.89 5h2.16c.233 0 .423.057.57.17.146.113.256.26.33.44l3.41 8.82c.113.287.22.603.32.95.106.34.206.697.3 1.07.08-.373.166-.73.26-1.07a8.84 8.84 0 0 1 .31-.95l3.39-8.82a.959.959 0 0 1 .31-.42.906.906 0 0 1 .58-.19H40zm17.176 0v14.46h-2.37v-9.34c0-.373.02-.777.06-1.21l-4.37 8.21c-.206.393-.523.59-.95.59h-.38c-.426 0-.743-.197-.95-.59l-4.42-8.24c.02.22.037.437.05.65.014.213.02.41.02.59v9.34h-2.37V5h2.03c.12 0 .224.003.31.01a.778.778 0 0 1 .23.05c.074.027.137.07.19.13.06.06.117.14.17.24l4.33 8.03c.114.213.217.433.31.66.1.227.197.46.29.7.094-.247.19-.483.29-.71.1-.233.207-.457.32-.67l4.27-8.01c.054-.1.11-.18.17-.24a.57.57 0 0 1 .19-.13.903.903 0 0 1 .24-.05c.087-.007.19-.01.31-.01h2.03zm8.887 13.73c.68 0 1.286-.117 1.82-.35.54-.24.996-.57 1.37-.99a4.28 4.28 0 0 0 .85-1.48c.2-.573.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.124 1.51-.37 2.19a5.248 5.248 0 0 1-1.07 1.77c-.46.5-1.024.893-1.69 1.18-.66.287-1.404.43-2.23.43-.827 0-1.574-.143-2.24-.43a5.012 5.012 0 0 1-1.69-1.18 5.33 5.33 0 0 1-1.06-1.77 6.373 6.373 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.096 1.277.29 1.85.2.567.483 1.06.85 1.48.373.42.826.75 1.36.99.54.24 1.15.36 1.83.36zm10.38.73h-1.03V5.31h1.03v14.15zM4.242 35v-5.166l-.672-.078a.595.595 0 0 1-.21-.09.23.23 0 0 1-.078-.186v-.438h.96v-.588c0-.348.048-.656.144-.924.1-.272.24-.5.42-.684a1.79 1.79 0 0 1 .66-.426c.256-.096.544-.144.864-.144.272 0 .522.04.75.12l-.024.534c-.008.096-.062.148-.162.156a4.947 4.947 0 0 1-.39.012c-.184 0-.352.024-.504.072a.949.949 0 0 0-.384.234c-.108.108-.192.25-.252.426a2.184 2.184 0 0 0-.084.654v.558h1.752v.774H5.316V35H4.242zM10.416 28.826a3.1 3.1 0 0 1 1.2.222c.356.148.66.358.912.63s.444.602.576.99c.136.384.204.814.204 1.29 0 .48-.068.912-.204 1.296a2.735 2.735 0 0 1-.576.984 2.572 2.572 0 0 1-.912.63 3.175 3.175 0 0 1-1.2.216c-.448 0-.852-.072-1.212-.216a2.572 2.572 0 0 1-.912-.63 2.805 2.805 0 0 1-.582-.984 3.972 3.972 0 0 1-.198-1.296c0-.476.066-.906.198-1.29.136-.388.33-.718.582-.99.252-.272.556-.482.912-.63.36-.148.764-.222 1.212-.222zm0 5.424c.6 0 1.048-.2 1.344-.6.296-.404.444-.966.444-1.686 0-.724-.148-1.288-.444-1.692-.296-.404-.744-.606-1.344-.606-.304 0-.57.052-.798.156a1.507 1.507 0 0 0-.564.45c-.148.196-.26.438-.336.726a3.941 3.941 0 0 0-.108.966c0 .72.148 1.282.444 1.686.3.4.754.6 1.362.6zM15.677 30.14c.192-.416.428-.74.708-.972.28-.236.622-.354 1.026-.354.128 0 .25.014.366.042.12.028.226.072.318.132l-.078.798c-.024.1-.084.15-.18.15-.056 0-.138-.012-.246-.036a1.694 1.694 0 0 0-.366-.036c-.192 0-.364.028-.516.084-.148.056-.282.14-.402.252a1.782 1.782 0 0 0-.318.408c-.092.16-.176.344-.252.552V35h-1.074v-6.078h.612c.116 0 .196.022.24.066.044.044.074.12.09.228l.072.924zM26.761 28.922 24.283 35h-.96l-2.478-6.078h.87a.33.33 0 0 1 .33.222l1.542 3.912c.048.148.09.292.126.432.036.14.07.28.102.42.032-.14.066-.28.102-.42.036-.14.08-.284.132-.432l1.56-3.912a.33.33 0 0 1 .12-.156.311.311 0 0 1 .198-.066h.834zM27.74 35v-6.078h.643c.152 0 .246.074.282.222l.078.624c.224-.276.476-.502.756-.678.28-.176.604-.264.972-.264.408 0 .738.114.99.342.256.228.44.536.552.924.088-.22.2-.41.336-.57a1.987 1.987 0 0 1 1.014-.624c.196-.048.394-.072.594-.072.32 0 .604.052.852.156.252.1.464.248.636.444.176.196.31.438.402.726.092.284.138.61.138.978V35H34.91v-3.87c0-.476-.104-.836-.312-1.08-.208-.248-.508-.372-.9-.372-.176 0-.344.032-.504.096-.156.06-.294.15-.414.27-.12.12-.216.272-.288.456-.068.18-.102.39-.102.63V35h-1.074v-3.87c0-.488-.098-.852-.294-1.092-.196-.24-.482-.36-.858-.36-.264 0-.508.072-.732.216a2.38 2.38 0 0 0-.618.576V35H27.74zM40.746 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM44.974 29.6c.124-.124.254-.238.39-.342a2.395 2.395 0 0 1 .936-.444c.176-.044.368-.066.576-.066.336 0 .634.058.894.174.26.112.476.272.648.48.176.204.308.45.396.738.092.284.138.598.138.942V35H47.47v-3.918c0-.376-.086-.666-.258-.87-.172-.208-.434-.312-.786-.312-.256 0-.496.058-.72.174a2.58 2.58 0 0 0-.636.474V35h-1.482v-6.156h.906c.192 0 .318.09.378.27l.102.486zM53.085 28.748c.456 0 .87.074 1.242.222a2.692 2.692 0 0 1 1.578 1.626c.144.392.216.83.216 1.314 0 .488-.072.928-.216 1.32-.144.392-.35.726-.618 1.002a2.653 2.653 0 0 1-.96.636 3.333 3.333 0 0 1-1.242.222c-.46 0-.878-.074-1.254-.222a2.712 2.712 0 0 1-.966-.636 2.922 2.922 0 0 1-.618-1.002 3.807 3.807 0 0 1-.216-1.32c0-.484.072-.922.216-1.314.148-.392.354-.724.618-.996.268-.272.59-.482.966-.63a3.397 3.397 0 0 1 1.254-.222zm0 5.202c.512 0 .89-.172 1.134-.516.248-.344.372-.848.372-1.512s-.124-1.17-.372-1.518c-.244-.348-.622-.522-1.134-.522-.52 0-.906.176-1.158.528-.248.348-.372.852-.372 1.512s.124 1.164.372 1.512c.252.344.638.516 1.158.516zM57.252 35v-6.156h.906c.192 0 .318.09.378.27l.096.456c.108-.12.22-.23.336-.33a2.017 2.017 0 0 1 1.32-.492c.388 0 .706.106.954.318.252.208.44.486.564.834a1.93 1.93 0 0 1 .834-.882c.172-.092.354-.16.546-.204.196-.044.392-.066.588-.066.34 0 .642.052.906.156.264.104.486.256.666.456.18.2.316.444.408.732.096.288.144.618.144.99V35h-1.482v-3.918c0-.392-.086-.686-.258-.882-.172-.2-.424-.3-.756-.3-.152 0-.294.026-.426.078a1.026 1.026 0 0 0-.342.228 1.019 1.019 0 0 0-.228.366 1.435 1.435 0 0 0-.084.51V35h-1.488v-3.918c0-.412-.084-.712-.252-.9-.164-.188-.406-.282-.726-.282-.216 0-.418.054-.606.162a1.979 1.979 0 0 0-.516.432V35h-1.482zM70.558 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM74.9 26.084V35h-1.482v-8.916H74.9zM81.969 28.844l-3.354 7.848a.538.538 0 0 1-.174.234c-.068.056-.174.084-.318.084h-1.104l1.152-2.472-2.49-5.694h1.302c.116 0 .206.028.27.084.068.056.118.12.15.192l1.308 3.192c.044.108.08.216.108.324.032.108.062.218.09.33a32.3 32.3 0 0 1 .108-.33c.036-.112.076-.222.12-.33l1.236-3.186a.437.437 0 0 1 .408-.276h1.188z"})}),hn=()=>mt("svg",{viewBox:"0 0 15 17",fill:"currentColor",children:mt("path",{d:"M6.11767 7.47586C6.47736 7.75563 6.91931 7.90898 7.37503 7.91213H7.42681C7.90756 7.90474 8.38832 7.71987 8.67677 7.46846C10.1856 6.18921 14.5568 2.18138 14.5568 2.18138C15.7254 1.09438 12.4637 0.00739 7.42681 0H7.36764C2.3308 0.00739 -0.930935 1.09438 0.237669 2.18138C0.237669 2.18138 4.60884 6.18921 6.11767 7.47586ZM8.67677 9.64243C8.31803 9.92483 7.87599 10.0808 7.41941 10.0861H7.37503C6.91845 10.0808 6.47641 9.92483 6.11767 9.64243C5.0822 8.75513 1.38409 5.42018 0.000989555 4.14832V6.07829C0.000989555 6.29273 0.0823481 6.57372 0.222877 6.70682L0.293316 6.7712L0.293344 6.77122C1.33784 7.72579 4.83903 10.9255 6.11767 12.0161C6.47641 12.2985 6.91845 12.4545 7.37503 12.4597H7.41941C7.90756 12.4449 8.38092 12.2601 8.67677 12.0161C9.9859 10.9069 13.6249 7.57198 14.5642 6.70682C14.7121 6.57372 14.7861 6.29273 14.7861 6.07829V4.14832C12.7662 5.99804 10.7297 7.82949 8.67677 9.64243ZM7.41941 14.6263C7.87513 14.6232 8.31708 14.4698 8.67677 14.19C10.7298 12.3746 12.7663 10.5407 14.7861 8.68853V10.6259C14.7861 10.8329 14.7121 11.1139 14.5642 11.247C13.6249 12.1196 9.9859 15.4471 8.67677 16.5563C8.38092 16.8077 7.90756 16.9926 7.41941 17H7.37503C6.91931 16.9968 6.47736 16.8435 6.11767 16.5637C4.91427 15.5373 1.74219 12.6364 0.502294 11.5025C0.393358 11.4029 0.299337 11.3169 0.222877 11.247C0.0823481 11.1139 0.000989555 10.8329 0.000989555 10.6259V8.68853C1.38409 9.95303 5.0822 13.2953 6.11767 14.1827C6.47641 14.4651 6.91845 14.6211 7.37503 14.6263H7.41941Z"})}),pn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"})}),fn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),mn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zm-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z"})}),_n=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})}),gn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),vn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),yn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),bn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"})}),wn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),kn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"m7 10 5 5 5-5z"})}),xn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[mt("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),mt("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),Sn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"})}),Cn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"})}),An=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"})}),En=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M8 5v14l11-7z"})}),Mn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"})}),Nn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10H3v9z"})}),Tn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"})}),$n=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M8.9999 14.7854L18.8928 4.8925C19.0803 4.70497 19.3347 4.59961 19.5999 4.59961C19.8651 4.59961 20.1195 4.70497 20.307 4.8925L21.707 6.2925C22.0975 6.68303 22.0975 7.31619 21.707 7.70672L9.70701 19.7067C9.31648 20.0972 8.68332 20.0972 8.2928 19.7067L2.6928 14.1067C2.50526 13.9192 2.3999 13.6648 2.3999 13.3996C2.3999 13.1344 2.50526 12.88 2.6928 12.6925L4.0928 11.2925C4.48332 10.902 5.11648 10.902 5.50701 11.2925L8.9999 14.7854Z"})}),Pn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})}),Dn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"})}),On=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),Ln=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})}),Rn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 5C19.89 4.65 18.67 4.5 17.5 4.5C15.55 4.5 13.45 4.9 12 6C10.55 4.9 8.45 4.5 6.5 4.5C5.33 4.5 4.11 4.65 3 5C2.25 5.25 1.6 5.55 1 6V20.6C1 20.85 1.25 21.1 1.5 21.1C1.6 21.1 1.65 21.1 1.75 21.05C3.15 20.3 4.85 20 6.5 20C8.2 20 10.65 20.65 12 21.5C13.35 20.65 15.8 20 17.5 20C19.15 20 20.85 20.3 22.25 21.05C22.35 21.1 22.4 21.1 22.5 21.1C22.75 21.1 23 20.85 23 20.6V6C22.4 5.55 21.75 5.25 21 5ZM21 18.5C19.9 18.15 18.7 18 17.5 18C15.8 18 13.35 18.65 12 19.5C10.65 18.65 8.2 18 6.5 18C5.3 18 4.1 18.15 3 18.5V7C4.1 6.65 5.3 6.5 6.5 6.5C8.2 6.5 10.65 7.15 12 8C13.35 7.15 15.8 6.5 17.5 6.5C18.7 6.5 19.9 6.65 21 7V18.5Z"}),mt("path",{d:"M17.5 10.5C18.38 10.5 19.23 10.59 20 10.76V9.24C19.21 9.09 18.36 9 17.5 9C15.8 9 14.26 9.29 13 9.83V11.49C14.13 10.85 15.7 10.5 17.5 10.5ZM13 12.49V14.15C14.13 13.51 15.7 13.16 17.5 13.16C18.38 13.16 19.23 13.25 20 13.42V11.9C19.21 11.75 18.36 11.66 17.5 11.66C15.8 11.66 14.26 11.96 13 12.49ZM17.5 14.33C15.8 14.33 14.26 14.62 13 15.16V16.82C14.13 16.18 15.7 15.83 17.5 15.83C18.38 15.83 19.23 15.92 20 16.09V14.57C19.21 14.41 18.36 14.33 17.5 14.33Z"}),mt("path",{d:"M6.5 10.5C5.62 10.5 4.77 10.59 4 10.76V9.24C4.79 9.09 5.64 9 6.5 9C8.2 9 9.74 9.29 11 9.83V11.49C9.87 10.85 8.3 10.5 6.5 10.5ZM11 12.49V14.15C9.87 13.51 8.3 13.16 6.5 13.16C5.62 13.16 4.77 13.25 4 13.42V11.9C4.79 11.75 5.64 11.66 6.5 11.66C8.2 11.66 9.74 11.96 11 12.49ZM6.5 14.33C8.2 14.33 9.74 14.62 11 15.16V16.82C9.87 16.18 8.3 15.83 6.5 15.83C5.62 15.83 4.77 15.92 4 16.09V14.57C4.79 14.41 5.64 14.33 6.5 14.33Z"})]}),zn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 6C9.79 6 8 7.79 8 10H10C10 8.9 10.9 8 12 8C13.1 8 14 8.9 14 10C14 10.8792 13.4202 11.3236 12.7704 11.8217C11.9421 12.4566 11 13.1787 11 15H13C13 13.9046 13.711 13.2833 14.4408 12.6455C15.21 11.9733 16 11.2829 16 10C16 7.79 14.21 6 12 6ZM13 16V18H11V16H13Z"})}),In=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2zm4 1H4V5h2v2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2z"})}),jn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),Fn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M7 20h4c0 1.1-.9 2-2 2s-2-.9-2-2zm-2-1h8v-2H5v2zm11.5-9.5c0 3.82-2.66 5.86-3.77 6.5H5.27c-1.11-.64-3.77-2.68-3.77-6.5C1.5 5.36 4.86 2 9 2s7.5 3.36 7.5 7.5zm4.87-2.13L20 8l1.37.63L22 10l.63-1.37L24 8l-1.37-.63L22 6l-.63 1.37zM19 6l.94-2.06L22 3l-2.06-.94L19 0l-.94 2.06L16 3l2.06.94L19 6z"})}),Hn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M3 14h4v-4H3v4zm0 5h4v-4H3v4zM3 9h4V5H3v4zm5 5h13v-4H8v4zm0 5h13v-4H8v4zM8 5v4h13V5H8z"})}),Vn=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-error"),children:mt("path",{d:"M13.5095 4L8.50952 1H7.50952L2.50952 4L2.01953 4.85999V10.86L2.50952 11.71L7.50952 14.71H8.50952L13.5095 11.71L13.9995 10.86V4.85999L13.5095 4ZM7.50952 13.5601L3.00952 10.86V5.69995L7.50952 8.15002V13.5601ZM3.26953 4.69995L8.00952 1.85999L12.7495 4.69995L8.00952 7.29004L3.26953 4.69995ZM13.0095 10.86L8.50952 13.5601V8.15002L13.0095 5.69995V10.86Z"})}),Bn=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-primary"),children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 5H4V4H1.5L1 4.5V12.5L1.5 13H4V12H2V5ZM14.5 4H12V5H14V12H12V13H14.5L15 12.5V4.5L14.5 4ZM11.76 6.56995L12 7V9.51001L11.7 9.95996L7.19995 11.96H6.73999L4.23999 10.46L4 10.03V7.53003L4.30005 7.06995L8.80005 5.06995H9.26001L11.76 6.56995ZM5 9.70996L6.5 10.61V9.28003L5 8.38V9.70996ZM5.57996 7.56006L7.03003 8.43005L10.42 6.93005L8.96997 6.06006L5.57996 7.56006ZM7.53003 10.73L11.03 9.17004V7.77002L7.53003 9.31995V10.73Z"})}),Un=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-warning"),children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 2H8L7 3V6H8V3H14V8H10V9H14L15 8V3L14 2ZM9 6H13V7H9.41L9 6.59V6ZM7 7H2L1 8V13L2 14H8L9 13V8L8 7H7ZM8 13H2V8H8V9V13ZM3 9H7V10H3V9ZM3 11H7V12H3V11ZM9 4H13V5H9V4Z"})}),Yn=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-primary"),children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 3L8 2H14L15 3V8L14 9H10V8H14V3H8V6H7V3ZM9 9V8L8 7H7H2L1 8V13L2 14H8L9 13V9ZM8 8V9V13H2V8H7H8ZM9.41421 7L9 6.58579V6H13V7H9.41421ZM9 4H13V5H9V4ZM7 10H3V11H7V10Z"})}),Wn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"})}),qn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z"})}),Kn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"})}),Zn=()=>mt("svg",{viewBox:"0 0 24 24",children:mt("path",{fill:"currentColor",d:"M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z",children:mt("animateTransform",{attributeName:"transform",dur:"0.75s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})})});var Gn=n(738),Qn=n.n(Gn);const Jn=e=>{let{to:t,isNavLink:n,children:r,...o}=e;return n?mt(Le,{to:t,...o,children:r}):mt("div",{...o,children:r})},Xn=e=>{let{activeItem:t,item:n,color:r=it("color-primary"),activeNavRef:o,onChange:a,isNavLink:i}=e;return mt(Jn,{className:Qn()({"vm-tabs-item":!0,"vm-tabs-item_active":t===n.value,[n.className||""]:n.className}),isNavLink:i,to:n.value,style:{color:r},onClick:(l=n.value,()=>{a&&a(l)}),ref:t===n.value?o:void 0,children:[n.icon&&mt("div",{className:Qn()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!n.label}),children:n.icon}),n.label]});var l};const er=function(e,n,r,o){const a=(0,t.useRef)(n);(0,t.useEffect)((()=>{a.current=n}),[n]),(0,t.useEffect)((()=>{var t;const n=null!==(t=null===r||void 0===r?void 0:r.current)&&void 0!==t?t:window;if(!n||!n.addEventListener)return;const i=e=>a.current(e);return n.addEventListener(e,i,o),()=>{n.removeEventListener(e,i,o)}}),[e,r,o])},tr=()=>{const[e,n]=(0,t.useState)({width:0,height:0}),r=()=>{n({width:window.innerWidth,height:window.innerHeight})};return er("resize",r),(0,t.useEffect)(r,[]),e},nr=e=>{let{activeItem:n,items:r,color:o=it("color-primary"),onChange:a,indicatorPlacement:i="bottom",isNavLink:l}=e;const s=tr(),c=(0,t.useRef)(null),[u,d]=(0,t.useState)({left:0,width:0,bottom:0});return(0,t.useEffect)((()=>{var e;if((null===(e=c.current)||void 0===e?void 0:e.base)instanceof HTMLElement){const{offsetLeft:e,offsetWidth:t,offsetHeight:n}=c.current.base;d({left:e,width:t,bottom:"top"===i?n-2:0})}}),[s,n,c,r]),mt("div",{className:"vm-tabs",children:[r.map((e=>mt(Xn,{activeItem:n,item:e,onChange:a,color:o,activeNavRef:c,isNavLink:l},e.value))),mt("div",{className:"vm-tabs__indicator",style:{...u,borderColor:o}})]})},rr=[{value:nt.chart,icon:mt(Mn,{}),label:"Graph",prometheusCode:0},{value:nt.code,icon:mt(Tn,{}),label:"JSON",prometheusCode:3},{value:nt.table,icon:mt(Nn,{}),label:"Table",prometheusCode:1}],or=We("SERIES_LIMITS"),ar={displayType:(()=>{const e=et("g0.tab",0),t=rr.find((t=>t.prometheusCode===+e||t.value===e));return(null===t||void 0===t?void 0:t.value)||nt.chart})(),nocache:!1,isTracingEnabled:!1,seriesLimits:or?JSON.parse(or):Xe,tableCompact:We("TABLE_COMPACT")||!1};function ir(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return{...e,displayType:t.payload};case"SET_SERIES_LIMITS":return Ye("SERIES_LIMITS",JSON.stringify(t.payload)),{...e,seriesLimits:t.payload};case"TOGGLE_QUERY_TRACING":return{...e,isTracingEnabled:!e.isTracingEnabled};case"TOGGLE_NO_CACHE":return{...e,nocache:!e.nocache};case"TOGGLE_TABLE_COMPACT":return Ye("TABLE_COMPACT",!e.tableCompact),{...e,tableCompact:!e.tableCompact};default:throw new Error}}const lr=(0,t.createContext)({}),sr={customStep:et("g0.step_input",""),yaxis:{limits:{enable:!1,range:{1:[0,0]}}},isHistogram:!1,spanGaps:!1};function cr(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,enable:!e.yaxis.limits.enable}}};case"SET_CUSTOM_STEP":return{...e,customStep:t.payload};case"SET_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,range:t.payload}}};case"SET_IS_HISTOGRAM":return{...e,isHistogram:t.payload};case"SET_SPAN_GAPS":return{...e,spanGaps:t.payload};default:throw new Error}}const ur=(0,t.createContext)({}),dr={dashboardsSettings:[],dashboardsLoading:!1,dashboardsError:""};function hr(e,t){switch(t.type){case"SET_DASHBOARDS_SETTINGS":return{...e,dashboardsSettings:t.payload};case"SET_DASHBOARDS_LOADING":return{...e,dashboardsLoading:t.payload};case"SET_DASHBOARDS_ERROR":return{...e,dashboardsError:t.payload};default:throw new Error}}const pr=(0,t.createContext)({}),fr={markdownParsing:"true"===We("LOGS_MARKDOWN")};function mr(e,t){if("SET_MARKDOWN_PARSING"===t.type)return Ye("LOGS_MARKDOWN",`${t.payload}`),{...e,markdownParsing:t.payload};throw new Error}const _r=(0,t.createContext)({}),gr=()=>(0,t.useContext)(_r).state,vr={windows:"Windows",mac:"Mac OS",linux:"Linux"},yr=()=>(Object.values(vr).find((e=>navigator.userAgent.indexOf(e)>=0))||"unknown")===vr.mac;function br(){const e=tr(),n=()=>{const e=["Android","webOS","iPhone","iPad","iPod","BlackBerry","Windows Phone"].map((e=>navigator.userAgent.match(new RegExp(e,"i")))).some((e=>e)),t=window.innerWidth<500;return e||t},[r,o]=(0,t.useState)(n());return(0,t.useEffect)((()=>{o(n())}),[e]),{isMobile:r}}const wr={success:mt(yn,{}),error:mt(vn,{}),warning:mt(gn,{}),info:mt(_n,{})},kr=e=>{let{variant:t,children:n}=e;const{isDarkTheme:r}=gt(),{isMobile:o}=br();return mt("div",{className:Qn()({"vm-alert":!0,[`vm-alert_${t}`]:t,"vm-alert_dark":r,"vm-alert_mobile":o}),children:[mt("div",{className:"vm-alert__icon",children:wr[t||"info"]}),mt("div",{className:"vm-alert__content",children:n})]})},xr=(0,t.createContext)({showInfoMessage:()=>{}}),Sr=function(){for(var e=arguments.length,t=new Array(e),n=0;nn=>{let{children:r}=n;return mt(e,{children:mt(t,{children:r})})}),(e=>{let{children:t}=e;return mt(pt.FK,{children:t})}))}(...[e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(ht,yt),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(_t.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(Kt,qt),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(Zt.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(on,rn),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(an.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(ir,ar),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(lr.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(cr,sr),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(ur.Provider,{value:a,children:n})},e=>{let{children:n}=e;const{isMobile:r}=br(),[o,a]=(0,t.useState)({}),[i,l]=(0,t.useState)(!1),[s,c]=(0,t.useState)(void 0);(0,t.useEffect)((()=>{if(!s)return;a({message:s.text,variant:s.type,key:Date.now()}),l(!0);const e=setTimeout(u,4e3);return()=>clearTimeout(e)}),[s]);const u=()=>{c(void 0),l(!1)};return mt(xr.Provider,{value:{showInfoMessage:c},children:[i&&mt("div",{className:Qn()({"vm-snackbar":!0,"vm-snackbar_mobile":r}),children:mt(kr,{variant:o.variant,children:mt("div",{className:"vm-snackbar-content",children:[mt("span",{children:o.message}),mt("div",{className:"vm-snackbar-content__close",onClick:u,children:mt(fn,{})})]})})}),n]})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(hr,dr),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(pr.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(mr,fr),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(_r.Provider,{value:a,children:n})}]),Cr=e=>{if(7!=e.length)return"0, 0, 0";return`${parseInt(e.slice(1,3),16)}, ${parseInt(e.slice(3,5),16)}, ${parseInt(e.slice(5,7),16)}`},Ar={[tt.yhatUpper]:"#7126a1",[tt.yhatLower]:"#7126a1",[tt.yhat]:"#da42a6",[tt.anomaly]:"#da4242",[tt.anomalyScore]:"#7126a1",[tt.actual]:"#203ea9",[tt.training]:`rgba(${Cr("#203ea9")}, 0.2)`},Er={"color-primary":"#589DF6","color-secondary":"#316eca","color-error":"#e5534b","color-warning":"#c69026","color-info":"#539bf5","color-success":"#57ab5a","color-background-body":"#22272e","color-background-block":"#2d333b","color-background-tooltip":"rgba(22, 22, 22, 0.8)","color-text":"#cdd9e5","color-text-secondary":"#768390","color-text-disabled":"#636e7b","box-shadow":"rgba(0, 0, 0, 0.16) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.2) 0px 2px 8px 0px","border-divider":"1px solid rgba(99, 110, 123, 0.5)","color-hover-black":"rgba(0, 0, 0, 0.12)","color-log-hits-bar-0":"rgba(255, 255, 255, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},Mr={"color-primary":"#3F51B5","color-secondary":"#E91E63","color-error":"#FD080E","color-warning":"#FF8308","color-info":"#03A9F4","color-success":"#4CAF50","color-background-body":"#FEFEFF","color-background-block":"#FFFFFF","color-background-tooltip":"rgba(80,80,80,0.9)","color-text":"#110f0f","color-text-secondary":"#706F6F","color-text-disabled":"#A09F9F","box-shadow":"rgba(0, 0, 0, 0.08) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.1) 0px 2px 8px 0px","border-divider":"1px solid rgba(0, 0, 0, 0.15)","color-hover-black":"rgba(0, 0, 0, 0.06)","color-log-hits-bar-0":"rgba(0, 0, 0, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},Nr=()=>{const[e,n]=(0,t.useState)(st()),r=e=>{n(e.matches)};return(0,t.useEffect)((()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");return e.addEventListener("change",r),()=>e.removeEventListener("change",r)}),[]),e},Tr=["primary","secondary","error","warning","info","success"],$r=e=>{let{onLoaded:n}=e;const r=He(),{palette:o={}}=Fe(),{theme:a}=gt(),i=Nr(),l=vt(),s=tr(),[c,u]=(0,t.useState)({[ot.dark]:Er,[ot.light]:Mr,[ot.system]:st()?Er:Mr}),d=()=>{const{innerWidth:e,innerHeight:t}=window,{clientWidth:n,clientHeight:r}=document.documentElement;lt("scrollbar-width",e-n+"px"),lt("scrollbar-height",t-r+"px"),lt("vh",.01*t+"px")},h=()=>{Tr.forEach(((e,t)=>{const r=(e=>{let t=e.replace("#","").trim();if(3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length)throw new Error("Invalid HEX color.");return(299*parseInt(t.slice(0,2),16)+587*parseInt(t.slice(2,4),16)+114*parseInt(t.slice(4,6),16))/1e3>=128?"#000000":"#FFFFFF"})(it(`color-${e}`));lt(`${e}-text`,r),t===Tr.length-1&&(l({type:"SET_DARK_THEME"}),n(!0))}))},p=()=>{const e=We("THEME")||ot.system,t=c[e];Object.entries(t).forEach((e=>{let[t,n]=e;lt(t,n)})),h(),r&&(Tr.forEach((e=>{const t=o[e];t&<(`color-${e}`,t)})),h())};return(0,t.useEffect)((()=>{d(),p()}),[c]),(0,t.useEffect)(d,[s]),(0,t.useEffect)((()=>{const e=st()?Er:Mr;c[ot.system]!==e?u((t=>({...t,[ot.system]:e}))):p()}),[a,i]),(0,t.useEffect)((()=>{r&&l({type:"SET_THEME",payload:ot.light})}),[]),null},Pr=()=>{const{showInfoMessage:e}=(0,t.useContext)(xr);return async(t,n)=>{var r;if(null===(r=navigator)||void 0===r||!r.clipboard)return e({text:"Clipboard not supported",type:"error"}),console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(t),n&&e({text:n,type:"success"}),!0}catch(o){return o instanceof Error&&e({text:`${o.name}: ${o.message}`,type:"error"}),console.warn("Copy failed",o),!1}}},Dr=e=>{let{variant:t="contained",color:n="primary",size:r="medium",ariaLabel:o,children:a,endIcon:i,startIcon:l,fullWidth:s=!1,className:c,disabled:u,onClick:d,onMouseDown:h}=e;return mt("button",{className:Qn()({"vm-button":!0,[`vm-button_${t}_${n}`]:!0,[`vm-button_${r}`]:r,"vm-button_icon":(l||i)&&!a,"vm-button_full-width":s,"vm-button_with-icon":l||i,"vm-button_disabled":u,[c||""]:c}),disabled:u,"aria-label":o,onClick:d,onMouseDown:h,children:mt(pt.FK,{children:[l&&mt("span",{className:"vm-button__start-icon",children:l}),a&&mt("span",{children:a}),i&&mt("span",{className:"vm-button__end-icon",children:i})]})})},Or=e=>{let{data:n}=e;const r=Pr(),o=(0,t.useMemo)((()=>`[\n${n.map((e=>1===Object.keys(e).length?JSON.stringify(e):JSON.stringify(e,null,2))).join(",\n").replace(/^/gm," ")}\n]`),[n]);return mt("div",{className:"vm-json-view",children:[mt("div",{className:"vm-json-view__copy",children:mt(Dr,{variant:"outlined",onClick:async()=>{await r(o,"Formatted JSON has been copied")},children:"Copy JSON"})}),mt("pre",{className:"vm-json-view__code",children:mt("code",{children:o})})]})},Lr=(e,n)=>{const[r]=je(),o=r.get(n)?r.get(n):e,[a,i]=(0,t.useState)(o);return(0,t.useEffect)((()=>{o!==a&&i(o)}),[o]),[a,i]},Rr=()=>{const e=oe(),[n,r]=je();return{setSearchParamsFromKeys:(0,t.useCallback)((t=>{const o=!!Array.from(n.values()).length;let a=!1;Object.entries(t).forEach((e=>{let[t,r]=e;n.get(t)!==`${r}`&&(n.set(t,`${r}`),a=!0)})),a&&(o?r(n):e(`?${n.toString()}`,{replace:!0}))}),[n,e])}},zr=e=>{let{checked:t=!1,disabled:n=!1,label:r,color:o="secondary",onChange:a}=e;return mt("div",{className:Qn()({"vm-checkbox":!0,"vm-checkbox_disabled":n,"vm-checkbox_active":t,[`vm-checkbox_${o}_active`]:t,[`vm-checkbox_${o}`]:o}),onClick:()=>{n||a(!t)},children:[mt("div",{className:"vm-checkbox-track",children:mt("div",{className:"vm-checkbox-track__thumb",children:mt($n,{})})}),r&&mt("span",{className:"vm-checkbox__label",children:r})]})},Ir=e=>{let{children:n,title:r,open:o,placement:a="bottom-center",offset:i={top:6,left:0}}=e;const{isMobile:l}=br(),[s,c]=(0,t.useState)(!1),[u,d]=(0,t.useState)({width:0,height:0}),h=(0,t.useRef)(null),p=(0,t.useRef)(null),f=()=>c(!1);(0,t.useEffect)((()=>{if(p.current&&s)return d({width:p.current.clientWidth,height:p.current.clientHeight}),window.addEventListener("scroll",f),()=>{window.removeEventListener("scroll",f)}}),[s,r]);const m=(0,t.useMemo)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(!t||!s)return{};const n=t.getBoundingClientRect(),r={top:0,left:0},o="bottom-right"===a||"top-right"===a,l="bottom-left"===a||"top-left"===a,c=null===a||void 0===a?void 0:a.includes("top"),d=(null===i||void 0===i?void 0:i.top)||0,p=(null===i||void 0===i?void 0:i.left)||0;r.left=n.left-(u.width-n.width)/2+p,r.top=n.height+n.top+d,o&&(r.left=n.right-u.width),l&&(r.left=n.left+p),c&&(r.top=n.top-u.height-d);const{innerWidth:f,innerHeight:m}=window,_=r.top+u.height+20>m,g=r.top-20<0,v=r.left+u.width+20>f,y=r.left-20<0;return _&&(r.top=n.top-u.height-d),g&&(r.top=n.height+n.top+d),v&&(r.left=n.right-u.width-p),y&&(r.left=n.left+p),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[h,a,s,u]),_=()=>{"boolean"!==typeof o&&c(!0)},g=()=>{c(!1)};return(0,t.useEffect)((()=>{"boolean"===typeof o&&c(o)}),[o]),(0,t.useEffect)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",_),t.addEventListener("mouseleave",g),()=>{t.removeEventListener("mouseenter",_),t.removeEventListener("mouseleave",g)}}),[h]),mt(pt.FK,{children:[mt(t.Fragment,{ref:h,children:n}),!l&&s&&t.default.createPortal(mt("div",{className:"vm-tooltip",ref:p,style:m,children:r}),document.body)]})},jr=e=>{let{value:t=!1,disabled:n=!1,label:r,color:o="secondary",fullWidth:a,onChange:i}=e;return mt("div",{className:Qn()({"vm-switch":!0,"vm-switch_full-width":a,"vm-switch_disabled":n,"vm-switch_active":t,[`vm-switch_${o}_active`]:t,[`vm-switch_${o}`]:o}),onClick:()=>{n||i(!t)},children:[mt("div",{className:"vm-switch-track",children:mt("div",{className:"vm-switch-track__thumb"})}),r&&mt("span",{className:"vm-switch__label",children:r})]})};const Fr=e=>{const[n,r]=(0,t.useState)(!!e),o=(0,t.useCallback)((()=>r(!0)),[]),a=(0,t.useCallback)((()=>r(!1)),[]),i=(0,t.useCallback)((()=>r((e=>!e))),[]);return{value:n,setValue:r,setTrue:o,setFalse:a,toggle:i}},Hr=e=>{let{error:n,warning:r,info:o}=e;const a=(0,t.useRef)(null),[i,l]=(0,t.useState)(!1),[s,c]=(0,t.useState)(!1),u=`${(0,t.useMemo)((()=>n?"ERROR: ":r?"WARNING: ":""),[n,r])}${n||r||o}`,d=()=>{const e=a.current;if(e){const{offsetWidth:t,scrollWidth:n,offsetHeight:r,scrollHeight:o}=e;l(t+1{c(!1),d()}),[a,u]),er("resize",d),n||r||o?mt("span",{className:Qn()({"vm-text-field__error":!0,"vm-text-field__warning":r&&!n,"vm-text-field__helper-text":!r&&!n,"vm-text-field__error_overflowed":i,"vm-text-field__error_full":s}),"data-show":!!u,ref:a,onClick:()=>{i&&(c(!0),l(!1))},children:u}):null},Vr=e=>{let{label:n,value:r,type:o="text",error:a="",warning:i="",helperText:l="",placeholder:s,endIcon:c,startIcon:u,disabled:d=!1,autofocus:h=!1,inputmode:p="text",caretPosition:f,onChange:m,onEnter:_,onKeyDown:g,onFocus:v,onBlur:y,onChangeCaret:b}=e;const{isDarkTheme:w}=gt(),{isMobile:k}=br(),x=(0,t.useRef)(null),S=(0,t.useRef)(null),C=(0,t.useMemo)((()=>"textarea"===o?S:x),[o]),[A,E]=(0,t.useState)([0,0]),M=Qn()({"vm-text-field__input":!0,"vm-text-field__input_error":a,"vm-text-field__input_warning":!a&&i,"vm-text-field__input_icon-start":u,"vm-text-field__input_disabled":d,"vm-text-field__input_textarea":"textarea"===o}),N=e=>{const{selectionStart:t,selectionEnd:n}=e;E([t||0,n||0])},T=e=>{N(e.currentTarget)},$=e=>{g&&g(e);const{key:t,ctrlKey:n,metaKey:r}=e,a="Enter"===t;("textarea"!==o?a:a&&(r||n))&&_&&(e.preventDefault(),_())},P=e=>{N(e.currentTarget)},D=e=>{d||(m&&m(e.currentTarget.value),N(e.currentTarget))},O=()=>{v&&v()},L=()=>{y&&y()},R=e=>{try{C.current&&C.current.setSelectionRange(e[0],e[1])}catch(Id){return Id}};return(0,t.useEffect)((()=>{var e;h&&!k&&(null===C||void 0===C||null===(e=C.current)||void 0===e?void 0:e.focus)&&C.current.focus()}),[C,h]),(0,t.useEffect)((()=>{b&&b(A)}),[A]),(0,t.useEffect)((()=>{R(A)}),[r]),(0,t.useEffect)((()=>{f&&R(f)}),[f]),mt("label",{className:Qn()({"vm-text-field":!0,"vm-text-field_textarea":"textarea"===o,"vm-text-field_dark":w}),"data-replicated-value":r,children:[u&&mt("div",{className:"vm-text-field__icon-start",children:u}),c&&mt("div",{className:"vm-text-field__icon-end",children:c}),"textarea"===o?mt("textarea",{className:M,disabled:d,ref:S,value:r,rows:1,inputMode:p,placeholder:s,autoCapitalize:"none",onInput:D,onKeyDown:$,onKeyUp:P,onFocus:O,onBlur:L,onMouseUp:T}):mt("input",{className:M,disabled:d,ref:x,value:r,type:o,placeholder:s,inputMode:p,autoCapitalize:"none",onInput:D,onKeyDown:$,onKeyUp:P,onFocus:O,onBlur:L,onMouseUp:T}),n&&mt("span",{className:"vm-text-field__label",children:n}),mt(Hr,{error:a,warning:i,info:l})]})},Br=e=>{let{title:n,children:r,onClose:o,className:a,isOpen:i=!0}=e;const{isMobile:l}=br(),s=oe(),c=ne(),u=(0,t.useCallback)((e=>{i&&"Escape"===e.key&&o()}),[i]),d=e=>{e.stopPropagation()},h=(0,t.useCallback)((()=>{i&&(s(c,{replace:!0}),o())}),[i,c,o]);return(0,t.useEffect)((()=>{if(i)return document.body.style.overflow="hidden",()=>{document.body.style.overflow="auto"}}),[i]),er("popstate",h),er("keyup",u),t.default.createPortal(mt("div",{className:Qn()({"vm-modal":!0,"vm-modal_mobile":l,[`${a}`]:a}),onMouseDown:o,children:mt("div",{className:"vm-modal-content",children:[mt("div",{className:"vm-modal-content-header",onMouseDown:d,children:[n&&mt("div",{className:"vm-modal-content-header__title",children:n}),mt("div",{className:"vm-modal-header__close",children:mt(Dr,{variant:"text",size:"small",onClick:o,ariaLabel:"close",children:mt(fn,{})})})]}),mt("div",{className:"vm-modal-content-body",onMouseDown:d,tabIndex:0,children:r})]})}),document.body)},Ur="Table settings",Yr=e=>{let{columns:n,selectedColumns:r=[],tableCompact:o,onChangeColumns:a,toggleTableCompact:i}=e;const l=(0,t.useRef)(null),{value:s,toggle:c,setFalse:u}=Fr(!1),{value:d,toggle:h}=Fr(Boolean(We("TABLE_COLUMNS"))),[p,f]=(0,t.useState)(""),[m,_]=(0,t.useState)(-1),g=(0,t.useMemo)((()=>r.filter((e=>!n.includes(e)))),[n,r]),v=(0,t.useMemo)((()=>{const e=g.concat(n);return p?e.filter((e=>e.includes(p))):e}),[n,g,p]),y=(0,t.useMemo)((()=>v.every((e=>r.includes(e)))),[r,v]),b=e=>{a(r.includes(e)?r.filter((t=>t!==e)):[...r,e])};return(0,t.useEffect)((()=>{((e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n])))(n,r)||d||a(n)}),[n]),(0,t.useEffect)((()=>{d?r.length&&Ye("TABLE_COLUMNS",r.join(",")):qe(["TABLE_COLUMNS"])}),[d,r]),(0,t.useEffect)((()=>{const e=We("TABLE_COLUMNS");e&&a(e.split(","))}),[]),mt("div",{className:"vm-table-settings",children:[mt(Ir,{title:Ur,children:mt("div",{ref:l,children:mt(Dr,{variant:"text",startIcon:mt(pn,{}),onClick:c,ariaLabel:Ur})})}),s&&mt(Br,{title:Ur,className:"vm-table-settings-modal",onClose:u,children:[mt("div",{className:"vm-table-settings-modal-section",children:[mt("div",{className:"vm-table-settings-modal-section__title",children:"Customize columns"}),mt("div",{className:"vm-table-settings-modal-columns",children:[mt("div",{className:"vm-table-settings-modal-columns__search",children:mt(Vr,{placeholder:"Search columns",startIcon:mt(Kn,{}),value:p,onChange:f,onBlur:()=>{_(-1)},onKeyDown:e=>{const t="ArrowUp"===e.key,n="ArrowDown"===e.key,r="Enter"===e.key;(n||t||r)&&e.preventDefault(),n?_((e=>e+1>v.length-1?e:e+1)):t?_((e=>e-1<0?e:e-1)):r&&b(v[m])},type:"search"})}),mt("div",{className:"vm-table-settings-modal-columns-list",children:[!!v.length&&mt("div",{className:"vm-table-settings-modal-columns-list__item vm-table-settings-modal-columns-list__item_all",children:mt(zr,{checked:y,onChange:()=>{a(y?r.filter((e=>!v.includes(e))):v)},label:y?"Uncheck all":"Check all",disabled:o})}),!v.length&&mt("div",{className:"vm-table-settings-modal-columns-no-found",children:mt("p",{className:"vm-table-settings-modal-columns-no-found__info",children:"No columns found."})}),v.map(((e,t)=>{return mt("div",{className:Qn()({"vm-table-settings-modal-columns-list__item":!0,"vm-table-settings-modal-columns-list__item_focus":t===m,"vm-table-settings-modal-columns-list__item_custom":g.includes(e)}),children:mt(zr,{checked:r.includes(e),onChange:(n=e,()=>{b(n)}),label:e,disabled:o})},e);var n}))]}),mt("div",{className:"vm-table-settings-modal-preserve",children:[mt(zr,{checked:d,onChange:h,label:"Preserve column settings",disabled:o,color:"primary"}),mt("p",{className:"vm-table-settings-modal-preserve__info",children:"This label indicates that when the checkbox is activated, the current column configurations will not be reset."})]})]})]}),mt("div",{className:"vm-table-settings-modal-section",children:[mt("div",{className:"vm-table-settings-modal-section__title",children:"Table view"}),mt("div",{className:"vm-table-settings-modal-columns-list__item",children:mt(jr,{label:"Compact view",value:o,onChange:i})})]})]})]})},Wr=["date","timestamp","time"];function qr(e,t,n){const r=e[n],a=t[n],i=Wr.includes(`${n}`)?o()(`${r}`).unix():r,l=Wr.includes(`${n}`)?o()(`${a}`).unix():a;return li?1:0}const Kr=e=>{let{rows:n,columns:r,defaultOrderBy:o,defaultOrderDir:a,copyToClipboard:i,paginationOffset:l}=e;const[s,c]=(0,t.useState)(o),[u,d]=(0,t.useState)(a||"desc"),[h,p]=(0,t.useState)(null),f=(0,t.useMemo)((()=>{const{startIndex:e,endIndex:t}=l;return function(e,t){const n=e.map(((e,t)=>[e,t]));return n.sort(((e,n)=>{const r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((e=>e[0]))}(n,function(e,t){return"desc"===e?(e,n)=>qr(e,n,t):(e,n)=>-qr(e,n,t)}(u,s)).slice(e,t)}),[n,s,u,l]),m=(e,t)=>async()=>{if(h!==t)try{await navigator.clipboard.writeText(String(e)),p(t)}catch(Id){console.error(Id)}};return(0,t.useEffect)((()=>{if(null===h)return;const e=setTimeout((()=>p(null)),2e3);return()=>clearTimeout(e)}),[h]),mt("table",{className:"vm-table",children:[mt("thead",{className:"vm-table-header",children:mt("tr",{className:"vm-table__row vm-table__row_header",children:[r.map((e=>{return mt("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:(t=e.key,()=>{d((e=>"asc"===e&&s===t?"desc":"asc")),c(t)}),children:mt("div",{className:"vm-table-cell__content",children:[mt("div",{children:String(e.title||e.key)}),mt("div",{className:Qn()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":s===e.key,"vm-table__sort-icon_desc":"desc"===u&&s===e.key}),children:mt(kn,{})})]})},String(e.key));var t})),i&&mt("th",{className:"vm-table-cell vm-table-cell_header"})]})}),mt("tbody",{className:"vm-table-body",children:f.map(((e,t)=>mt("tr",{className:"vm-table__row",children:[r.map((t=>mt("td",{className:Qn()({"vm-table-cell":!0,[`${t.className}`]:t.className}),children:e[t.key]||"-"},String(t.key)))),i&&mt("td",{className:"vm-table-cell vm-table-cell_right",children:e[i]&&mt("div",{className:"vm-table-cell__content",children:mt(Ir,{title:h===t?"Copied":"Copy row",children:mt(Dr,{variant:"text",color:h===t?"success":"gray",size:"small",startIcon:mt(h===t?$n:On,{}),onClick:m(e[i],t),ariaLabel:"copy row"})})})})]},t)))})]})},Zr=e=>{let{logs:n,displayColumns:r,tableCompact:o,columns:a}=e;const i=e=>{switch(e){case"_time":return"vm-table-cell_logs-time";case"_vmui_data":return"vm-table-cell_logs vm-table-cell_pre";default:return"vm-table-cell_logs"}},l=(0,t.useMemo)((()=>o?[{key:"_vmui_data",title:"Data",className:i("_vmui_data")}]:a.map((e=>({key:e,title:e,className:i(e)})))),[o,a]),s=(0,t.useMemo)((()=>o?l:null!==r&&void 0!==r&&r.length?l.filter((e=>r.includes(e.key))):[]),[l,r,o]);return mt(pt.FK,{children:mt(Kr,{rows:n,columns:s,defaultOrderBy:"_time",defaultOrderDir:"desc",copyToClipboard:"_vmui_data",paginationOffset:{startIndex:0,endIndex:1/0}})})},Gr=e=>{let{defaultExpanded:n=!1,onChange:r,title:o,children:a}=e;const[i,l]=(0,t.useState)(n);return(0,t.useEffect)((()=>{r&&r(i)}),[i]),mt(pt.FK,{children:[mt("header",{className:`vm-accordion-header ${i&&"vm-accordion-header_open"}`,onClick:()=>{l((e=>!e))},children:[o,mt("div",{className:`vm-accordion-header__arrow ${i&&"vm-accordion-header__arrow_open"}`,children:mt(wn,{})})]}),i&&mt("section",{className:"vm-accordion-section",children:a},"content")]})},Qr=e=>{let{log:n}=e;const{value:r,toggle:o}=Fr(!1),{markdownParsing:a}=gr(),i=["_msg","_vmui_time","_vmui_data","_vmui_markdown"],l=Object.entries(n).filter((e=>{let[t]=e;return!i.includes(t)})),s=l.length>0,c=(0,t.useMemo)((()=>{if(n._msg)return n._msg;if(!s)return;const e=l.reduce(((e,t)=>{let[n,r]=t;return e[n]=r,e}),{});return JSON.stringify(e)}),[n,l,s]),u=Pr(),[d,h]=(0,t.useState)(null);return(0,t.useEffect)((()=>{if(null===d)return;const e=setTimeout((()=>h(null)),2e3);return()=>clearTimeout(e)}),[d]),mt("div",{className:"vm-group-logs-row",children:[mt("div",{className:"vm-group-logs-row-content",onClick:o,children:[s&&mt("div",{className:Qn()({"vm-group-logs-row-content__arrow":!0,"vm-group-logs-row-content__arrow_open":r}),children:mt(wn,{})}),mt("div",{className:Qn()({"vm-group-logs-row-content__time":!0,"vm-group-logs-row-content__time_missing":!n._vmui_time}),children:n._vmui_time||"timestamp missing"}),mt("div",{className:Qn()({"vm-group-logs-row-content__msg":!0,"vm-group-logs-row-content__msg_empty-msg":!n._msg,"vm-group-logs-row-content__msg_missing":!c}),dangerouslySetInnerHTML:a&&n._vmui_markdown?{__html:n._vmui_markdown}:void 0,children:c||"-"})]},`${n._msg}${n._time}`),s&&r&&mt("div",{className:"vm-group-logs-row-fields",children:mt("table",{children:mt("tbody",{children:l.map(((e,t)=>{let[n,r]=e;return mt("tr",{className:"vm-group-logs-row-fields-item",children:[mt("td",{className:"vm-group-logs-row-fields-item-controls",children:mt("div",{className:"vm-group-logs-row-fields-item-controls__wrapper",children:mt(Ir,{title:d===t?"Copied":"Copy to clipboard",children:mt(Dr,{variant:"text",color:"gray",size:"small",startIcon:mt(On,{}),onClick:(o=`${n}: "${r}"`,a=t,async()=>{if(d!==a)try{await u(o),h(a)}catch(Id){console.error(Id)}}),ariaLabel:"copy to clipboard"})})})}),mt("td",{className:"vm-group-logs-row-fields-item__key",children:n}),mt("td",{className:"vm-group-logs-row-fields-item__value",children:r})]},n);var o,a}))})})})]})},Jr=(e,n,r)=>{const o=(0,t.useCallback)((t=>{const o=null===e||void 0===e?void 0:e.current,a=t.target,i=(null===r||void 0===r?void 0:r.current)&&r.current.contains(a);!o||o.contains((null===t||void 0===t?void 0:t.target)||null)||i||n(t)}),[e,n]);er("mousedown",o),er("touchstart",o)},Xr=e=>{let{children:n,buttonRef:r,placement:o="bottom-left",open:a=!1,onClose:i,offset:l={top:6,left:0},clickOutside:s=!0,fullWidth:c,title:u,disabledFullScreen:d,variant:h}=e;const{isMobile:p}=br(),f=oe(),m=ne(),[_,g]=(0,t.useState)({width:0,height:0}),[v,y]=(0,t.useState)(!1),b=(0,t.useRef)(null);(0,t.useEffect)((()=>(y(a),!a&&i&&i(),a&&p&&!d&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="auto"})),[a]),(0,t.useEffect)((()=>{var e,t;g({width:(null===b||void 0===b||null===(e=b.current)||void 0===e?void 0:e.clientWidth)||0,height:(null===b||void 0===b||null===(t=b.current)||void 0===t?void 0:t.clientHeight)||0}),y(!1)}),[b]);const w=(0,t.useMemo)((()=>{const e=r.current;if(!e||!v)return{};const t=e.getBoundingClientRect(),n={top:0,left:0,width:"auto"},a="bottom-right"===o||"top-right"===o,i=null===o||void 0===o?void 0:o.includes("top"),s=(null===l||void 0===l?void 0:l.top)||0,u=(null===l||void 0===l?void 0:l.left)||0;n.left=n.left=t.left+u,n.top=t.height+t.top+s,a&&(n.left=t.right-_.width),i&&(n.top=t.top-_.height-s);const{innerWidth:d,innerHeight:h}=window,p=n.top+_.height+20>h,f=n.top-20<0,m=n.left+_.width+20>d,g=n.left-20<0;return p&&(n.top=t.top-_.height-s),f&&(n.top=t.height+t.top+s),m&&(n.left=t.right-_.width-u),g&&(n.left=t.left+u),c&&(n.width=`${t.width}px`),n.top<0&&(n.top=20),n.left<0&&(n.left=20),n}),[r,o,v,n,c]),k=()=>{y(!1),i()};(0,t.useEffect)((()=>{if(!b.current||!v||p&&!d)return;const{right:e,width:t}=b.current.getBoundingClientRect();if(e>window.innerWidth){const e=window.innerWidth-20-t;b.current.style.left=e{v&&p&&!d&&(f(m,{replace:!0}),i())}),[v,p,d,m,i]);return er("scroll",k),er("popstate",x),Jr(b,(()=>{s&&k()}),r),mt(pt.FK,{children:(v||!_.width)&&t.default.createPortal(mt("div",{className:Qn()({"vm-popper":!0,[`vm-popper_${h}`]:h,"vm-popper_mobile":p&&!d,"vm-popper_open":(p||Object.keys(w).length)&&v}),ref:b,style:p&&!d?{}:w,children:[(u||p&&!d)&&mt("div",{className:"vm-popper-header",children:[mt("p",{className:"vm-popper-header__title",children:u}),mt(Dr,{variant:"text",color:"dark"===h?"white":"primary",size:"small",onClick:e=>{e.stopPropagation(),i()},ariaLabel:"close",children:mt(fn,{})})]}),n]}),document.body)})},eo=e=>(/^{.+}$/.test(e)?e.slice(1,-1).split(","):[e]).filter(Boolean),to=e=>{const t=o()(1e3*e.start),n=o()(1e3*e.end),r=n.diff(t,"milliseconds");return{start:t,end:n,step:Math.ceil(r/100)||1}},no="No Grouping",ro=e=>{let{logs:n,settingsRef:r}=e;const{isDarkTheme:o}=gt(),a=Pr(),[i,l]=je(),[s,c]=(0,t.useState)([]),[u,d]=Lr("_stream","groupBy"),[h,p]=(0,t.useState)(null),[f,m]=(0,t.useState)(""),_=(0,t.useRef)(null),{value:g,toggle:v,setFalse:y}=Fr(!1),b=(0,t.useMemo)((()=>s.every(Boolean)),[s]),w=(0,t.useMemo)((()=>{const e=["_msg","_time","_vmui_time","_vmui_data","_vmui_markdown"],t=Array.from(new Set(n.map((e=>Object.keys(e))).flat())),r=[no,...t.filter((t=>!e.includes(t)))];if(!f)return r;try{const e=new RegExp(f,"i");return r.filter((t=>e.test(t))).sort(((t,n)=>{var r,o;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(o=n.match(e))||void 0===o?void 0:o.index)||0)}))}catch(Id){return[]}}),[n,f]),k=(0,t.useMemo)((()=>function(e,t){const n=e.reduce(((e,n)=>{const r=t.map((e=>`${e}: ${n[e]||"-"}`)).join("|");return(e[r]=e[r]||[]).push(n),e}),{});return Object.entries(n).map((e=>{let[t,n]=e;return{keys:t.split("|"),values:n}}))}(n,[u]).map((e=>{var t;const n=(null===(t=e.values[0])||void 0===t?void 0:t[u])||"",r=eo(n);return{...e,pairs:r}}))),[n,u]),x=(0,t.useCallback)((()=>{c(new Array(k.length).fill(!b))}),[b]),S=e=>t=>{c((n=>{const r=[...n];return r[e]=t,r}))};return(0,t.useEffect)((()=>{if(null===h)return;const e=setTimeout((()=>p(null)),2e3);return()=>clearTimeout(e)}),[h]),(0,t.useEffect)((()=>{c(new Array(k.length).fill(!0))}),[k]),mt(pt.FK,{children:[mt("div",{className:"vm-group-logs",children:k.map(((e,t)=>mt("div",{className:"vm-group-logs-section",children:mt(Gr,{defaultExpanded:s[t],onChange:S(t),title:u!==no&&mt("div",{className:"vm-group-logs-section-keys",children:[mt("span",{className:"vm-group-logs-section-keys__title",children:["Group by ",mt("code",{children:u}),":"]}),e.pairs.map((t=>{return mt(Ir,{title:h===t?"Copied":"Copy to clipboard",placement:"top-center",children:mt("div",{className:Qn()({"vm-group-logs-section-keys__pair":!0,"vm-group-logs-section-keys__pair_dark":o}),onClick:(n=t,async e=>{e.stopPropagation();const t=/(.+)?=(".+")/.test(n)?`${n.replace(/=/,": ")}`:`${u}: "${n}"`;await a(t)&&p(n)}),children:t})},`${e.keys.join("")}_${t}`);var n})),mt("span",{className:"vm-group-logs-section-keys__count",children:[e.values.length," entries"]})]}),children:mt("div",{className:"vm-group-logs-section-rows",children:e.values.map((e=>mt(Qr,{log:e},`${e._msg}${e._time}`)))})},String(s[t]))},e.keys.join(""))))}),r.current&&t.default.createPortal(mt("div",{className:"vm-group-logs-header",children:[mt(Ir,{title:b?"Collapse All":"Expand All",children:mt(Dr,{variant:"text",startIcon:mt(b?qn:Wn,{}),onClick:x,ariaLabel:b?"Collapse All":"Expand All"})}),mt(Ir,{title:"Group by",children:mt("div",{ref:_,children:mt(Dr,{variant:"text",startIcon:mt(In,{}),onClick:v,ariaLabel:"Group by"})})}),mt(Xr,{open:g,placement:"bottom-right",onClose:y,buttonRef:_,children:mt("div",{className:"vm-list vm-group-logs-header-keys",children:[mt("div",{className:"vm-group-logs-header-keys__search",children:mt(Vr,{label:"Search key",value:f,onChange:m,type:"search"})}),w.map((e=>{return mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_active":e===u}),onClick:(t=e,()=>{d(t),i.set("groupBy",t),l(i),y()}),children:e},e);var t}))]})})]}),r.current)]})};function oo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let ao={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function io(e){ao=e}const lo=/[&<>"']/,so=new RegExp(lo.source,"g"),co=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,uo=new RegExp(co.source,"g"),ho={"&":"&","<":"<",">":">",'"':""","'":"'"},po=e=>ho[e];function fo(e,t){if(t){if(lo.test(e))return e.replace(so,po)}else if(co.test(e))return e.replace(uo,po);return e}const mo=/(^|[^\[])\^/g;function _o(e,t){let n="string"===typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let o="string"===typeof t?t:t.source;return o=o.replace(mo,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}function go(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const vo={exec:()=>null};function yo(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:bo(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=bo(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:bo(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=bo(t[0],"\n").split("\n"),n="",r="";const o=[];for(;e.length>0;){let t=!1;const a=[];let i;for(i=0;i/.test(e[i]))a.push(e[i]),t=!0;else{if(t)break;a.push(e[i])}e=e.slice(i);const l=a.join("\n"),s=l.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");n=n?`${n}\n${l}`:l,r=r?`${r}\n${s}`:s;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(s,o,!0),this.lexer.state.top=c,0===e.length)break;const u=o[o.length-1];if("code"===u?.type)break;if("blockquote"===u?.type){const t=u,a=t.raw+"\n"+e.join("\n"),i=this.blockquote(a);o[o.length-1]=i,n=n.substring(0,n.length-t.raw.length)+i.raw,r=r.substring(0,r.length-t.text.length)+i.text;break}if("list"!==u?.type);else{const t=u,a=t.raw+"\n"+e.join("\n"),i=this.list(a);o[o.length-1]=i,n=n.substring(0,n.length-u.raw.length)+i.raw,r=r.substring(0,r.length-t.raw.length)+i.raw,e=a.substring(o[o.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const a=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let i=!1;for(;e;){let n=!1,r="",l="";if(!(t=a.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let s=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],u=!s.trim(),d=0;if(this.options.pedantic?(d=2,l=s.trimStart()):u?d=t[1].length+1:(d=t[2].search(/[^ ]/),d=d>4?1:d,l=s.slice(d),d+=t[1].length),u&&/^[ \t]*$/.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,d-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:\`\`\`|~~~)`),a=new RegExp(`^ {0,${Math.min(3,d-1)}}#`),i=new RegExp(`^ {0,${Math.min(3,d-1)}}<[a-z].*>`,"i");for(;e;){const h=e.split("\n",1)[0];let p;if(c=h,this.options.pedantic?(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),p=c):p=c.replace(/\t/g," "),o.test(c))break;if(a.test(c))break;if(i.test(c))break;if(t.test(c))break;if(n.test(c))break;if(p.search(/[^ ]/)>=d||!c.trim())l+="\n"+p.slice(d);else{if(u)break;if(s.replace(/\t/g," ").search(/[^ ]/)>=4)break;if(o.test(s))break;if(a.test(s))break;if(n.test(s))break;l+="\n"+c}u||c.trim()||(u=!0),r+=h+"\n",e=e.substring(h.length+1),s=p.slice(d)}}o.loose||(i?o.loose=!0:/\n[ \t]*\n[ \t]*$/.test(r)&&(i=!0));let h,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(l),p&&(h="[ ] "!==p[0],l=l.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:r,task:!!p,checked:h,loose:!1,text:l,tokens:[]}),o.raw+=r}o.items[o.items.length-1].raw=o.items[o.items.length-1].raw.trimEnd(),o.items[o.items.length-1].text=o.items[o.items.length-1].text.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));o.loose=n}if(o.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=yo(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?a.align.push("right"):/^ *:-+: *$/.test(e)?a.align.push("center"):/^ *:-+ *$/.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]}))));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:fo(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^
/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=bo(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),wo(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return wo(n,e,n[0],this.lexer)}}emStrong(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let o,a,i=n,l=0;const s="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=s.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(a=[...o].length,r[3]||r[4]){i+=a;continue}if((r[5]||r[6])&&n%3&&!((n+a)%3)){l+=a;continue}if(i-=a,i>0)continue;a=Math.min(a,a+i+l);const t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){const e=s.slice(1,-1);return{type:"em",raw:s,text:e,tokens:this.lexer.inlineTokens(e)}}const c=s.slice(2,-2);return{type:"strong",raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=fo(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=fo(t[1]),n="mailto:"+e):(e=fo(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])e=fo(t[0]),r="mailto:"+e;else{let o;do{var n;o=t[0],t[0]=null!==(n=this.rules.inline._backpedal.exec(t[0])?.[0])&&void 0!==n?n:""}while(o!==t[0]);e=fo(t[0]),r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:fo(t[0]),{type:"text",raw:t[0],text:e}}}}const xo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,So=/(?:[*+-]|\d{1,9}[.)])/,Co=_o(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,So).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Ao=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Eo=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Mo=_o(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Eo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),No=_o(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,So).getRegex(),To="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",$o=/|$))/,Po=_o("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",$o).replace("tag",To).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Do=_o(Ao).replace("hr",xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",To).getRegex(),Oo={blockquote:_o(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Do).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Mo,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:xo,html:Po,lheading:Co,list:No,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Do,table:vo,text:/^[^\n]+/},Lo=_o("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",To).getRegex(),Ro={...Oo,table:Lo,paragraph:_o(Ao).replace("hr",xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Lo).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",To).getRegex()},zo={...Oo,html:_o("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",$o).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:vo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_o(Ao).replace("hr",xo).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Co).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Io=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,jo=/^( {2,}|\\)\n(?!\s*$)/,Fo="\\p{P}\\p{S}",Ho=_o(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Fo).getRegex(),Vo=_o(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Fo).getRegex(),Bo=_o("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Fo).getRegex(),Uo=_o("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Fo).getRegex(),Yo=_o(/\\([punct])/,"gu").replace(/punct/g,Fo).getRegex(),Wo=_o(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),qo=_o($o).replace("(?:--\x3e|$)","--\x3e").getRegex(),Ko=_o("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",qo).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Zo=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Go=_o(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Zo).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Qo=_o(/^!?\[(label)\]\[(ref)\]/).replace("label",Zo).replace("ref",Eo).getRegex(),Jo=_o(/^!?\[(ref)\](?:\[\])?/).replace("ref",Eo).getRegex(),Xo={_backpedal:vo,anyPunctuation:Yo,autolink:Wo,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:jo,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:vo,emStrongLDelim:Vo,emStrongRDelimAst:Bo,emStrongRDelimUnd:Uo,escape:Io,link:Go,nolink:Jo,punctuation:Ho,reflink:Qo,reflinkSearch:_o("reflink|nolink(?!\\()","g").replace("reflink",Qo).replace("nolink",Jo).getRegex(),tag:Ko,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(/\t/g," ").replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(t=n.call({lexer:this},e,o))&&(e=e.substring(t.raw.length),o.push(t),!0)))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&o.length>0?o[o.length-1].raw+="\n":o.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),n=o[o.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?o.push(t):(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),n=o[o.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(n.raw+="\n"+t.raw,n.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),o.push(t);else{if(r=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let o;this.options.extensions.startBlock.forEach((e=>{o=e.call({lexer:this},n),"number"===typeof o&&o>=0&&(t=Math.min(t,o))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(r)))n=o[o.length-1],a&&"paragraph"===n?.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):o.push(t),a=r.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),n=o[o.length-1],n&&"text"===n.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):o.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,o}inline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){let t,n,r,o,a,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(s));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(s));)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(i=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(t=n.call({lexer:this},e,l))&&(e=e.substring(t.raw.length),l.push(t),!0)))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,s,i))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.autolink(e))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e))){if(r=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let o;this.options.extensions.startInline.forEach((e=>{o=e.call({lexer:this},n),"number"===typeof o&&o>=0&&(t=Math.min(t,o))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(t=this.tokenizer.inlineText(r))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(i=t.raw.slice(-1)),a=!0,n=l[l.length-1],n&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(t.raw.length),l.push(t);return l}}class ia{options;parser;constructor(e){this.options=e||ao}space(e){return""}code(e){let{text:t,lang:n,escaped:r}=e;const o=(n||"").match(/^\S*/)?.[0],a=t.replace(/\n$/,"")+"\n";return o?'
'+(r?a:fo(a,!0))+"
\n":"
"+(r?a:fo(a,!0))+"
\n"}blockquote(e){let{tokens:t}=e;return`
\n${this.parser.parse(t)}
\n`}html(e){let{text:t}=e;return t}heading(e){let{tokens:t,depth:n}=e;return`${this.parser.parseInline(t)}\n`}hr(e){return"
\n"}list(e){const t=e.ordered,n=e.start;let r="";for(let a=0;a\n"+r+"\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox(e){let{checked:t}=e;return"'}paragraph(e){let{tokens:t}=e;return`

    ${this.parser.parseInline(t)}

    \n`}table(e){let t="",n="";for(let o=0;o${r}`),"\n\n"+t+"\n"+r+"
    \n"}tablerow(e){let{text:t}=e;return`\n${t}\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}em(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}codespan(e){let{text:t}=e;return`${t}`}br(e){return"
    "}del(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}link(e){let{href:t,title:n,tokens:r}=e;const o=this.parser.parseInline(r),a=go(t);if(null===a)return o;t=a;let i='
    ",i}image(e){let{href:t,title:n,text:r}=e;const o=go(t);if(null===o)return r;t=o;let a=`${r}1&&void 0!==arguments[1])||arguments[1],n="";for(let r=0;rnew Set(["preprocess","postprocess","processAllTokens"]))();preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?aa.lex:aa.lexInline}provideParser(){return this.block?sa.parse:sa.parseInline}}const ua=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=(()=>sa)();Renderer=(()=>ia)();TextRenderer=(()=>la)();Lexer=(()=>aa)();Tokenizer=(()=>ko)();Hooks=(()=>ca)();constructor(){this.use(...arguments)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const o=e[r].flat(1/0);n=n.concat(this.walkTokens(o,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(){const e=this.defaults.extensions||{renderers:{},childTokens:{}};for(var t=arguments.length,n=new Array(t),r=0;r{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const n=e.renderers[t.name];e.renderers[t.name]=n?function(){for(var e=arguments.length,r=new Array(e),o=0;o{if(this.defaults.async)return Promise.resolve(o.call(e,t)).then((t=>a.call(e,t)));const n=o.call(e,t);return a.call(e,n)}:e[r]=function(){for(var t=arguments.length,n=new Array(t),r=0;r{const r={...n},o={...this.defaults,...r},a=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===r.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("undefined"===typeof t||null===t)return a(new Error("marked(): input parameter is undefined or null"));if("string"!==typeof t)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const i=o.hooks?o.hooks.provideLexer():e?aa.lex:aa.lexInline,l=o.hooks?o.hooks.provideParser():e?sa.parse:sa.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then((e=>i(e,o))).then((e=>o.hooks?o.hooks.processAllTokens(e):e)).then((e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then((()=>e)):e)).then((e=>l(e,o))).then((e=>o.hooks?o.hooks.postprocess(e):e)).catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let e=i(t,o);o.hooks&&(e=o.hooks.processAllTokens(e)),o.walkTokens&&this.walkTokens(e,o.walkTokens);let n=l(e,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(Id){return a(Id)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+fo(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function da(e,t){return ua.parse(e,t)}da.options=da.setOptions=function(e){return ua.setOptions(e),da.defaults=ua.defaults,io(da.defaults),da},da.getDefaults=oo,da.defaults=ao,da.use=function(){return ua.use(...arguments),da.defaults=ua.defaults,io(da.defaults),da},da.walkTokens=function(e,t){return ua.walkTokens(e,t)},da.parseInline=ua.parseInline,da.Parser=sa,da.parser=sa.parse,da.Renderer=ia,da.TextRenderer=la,da.Lexer=aa,da.lexer=aa.lex,da.Tokenizer=ko,da.Hooks=ca,da.parse=da;da.options,da.setOptions,da.use,da.walkTokens,da.parseInline,sa.parse,aa.lex;const ha=()=>mt("div",{className:"vm-line-loader",children:[mt("div",{className:"vm-line-loader__background"}),mt("div",{className:"vm-line-loader__line"})]});var pa=function(e){return e.group="group",e.table="table",e.json="json",e}(pa||{});const fa=[{label:"Group",value:pa.group,icon:mt(Hn,{})},{label:"Table",value:pa.table,icon:mt(Nn,{})},{label:"JSON",value:pa.json,icon:mt(Tn,{})}],ma=e=>{let{data:n,isLoading:r}=e;const{isMobile:a}=br(),{timezone:i}=Gt(),{setSearchParamsFromKeys:l}=Rr(),s=(0,t.useRef)(null),[c,u]=Lr(pa.group,"view"),[d,h]=(0,t.useState)([]),{value:p,toggle:f}=Fr(!1),m=(0,t.useMemo)((()=>n.map((e=>({...e,_vmui_time:e._time?o()(e._time).tz().format(`${wt}.SSS`):"",_vmui_data:JSON.stringify(e,null,2),_vmui_markdown:e._msg?da(e._msg.replace(/```/g,"\n```\n")):""})))),[n,i]),_=(0,t.useMemo)((()=>{if(null===m||void 0===m||!m.length)return[];const e=["_vmui_data","_vmui_time","_vmui_markdown"],t=new Set;for(const n of m)for(const e in n)t.add(e);return Array.from(t).filter((t=>!e.includes(t)))}),[m]);return mt("div",{className:Qn()({"vm-explore-logs-body":!0,"vm-block":!0,"vm-block_mobile":a}),children:[r&&mt(ha,{}),mt("div",{className:Qn()({"vm-explore-logs-body-header":!0,"vm-section-header":!0,"vm-explore-logs-body-header_mobile":a}),children:[mt("div",{className:"vm-section-header__tabs",children:[mt(nr,{activeItem:String(c),items:fa,onChange:e=>{u(e),l({view:e})}}),mt("div",{className:"vm-explore-logs-body-header__log-info",children:["Total logs returned: ",mt("b",{children:n.length})]})]}),c===pa.table&&mt("div",{className:"vm-explore-logs-body-header__settings",children:mt(Yr,{columns:_,selectedColumns:d,onChangeColumns:h,tableCompact:p,toggleTableCompact:f})}),c===pa.group&&mt("div",{className:"vm-explore-logs-body-header__settings",ref:s})]}),mt("div",{className:Qn()({"vm-explore-logs-body__table":!0,"vm-explore-logs-body__table_mobile":a}),children:[!n.length&&mt("div",{className:"vm-explore-logs-body__empty",children:"No logs found"}),!!n.length&&mt(pt.FK,{children:[c===pa.table&&mt(Zr,{logs:m,displayColumns:d,tableCompact:p,columns:_}),c===pa.group&&mt(ro,{logs:m,columns:_,settingsRef:s}),c===pa.json&&mt(Or,{data:n})]})]})]})},_a=(e,n,r)=>{const[a]=je(),[i,l]=(0,t.useState)([]),[s,c]=(0,t.useState)([]),[u,d]=(0,t.useState)(),h=(0,t.useRef)(new AbortController),p=(0,t.useMemo)((()=>(e=>`${e}/select/logsql/query`)(e)),[e]),f=e=>{try{return JSON.parse(e)}catch(Id){return null}},m=(0,t.useCallback)((async e=>{h.current.abort(),h.current=new AbortController;const{signal:t}=h.current,i=Date.now();c((e=>({...e,[i]:!0}))),d(void 0);try{const s=((e,t,n,r)=>({signal:r,method:"POST",headers:{Accept:"application/stream+json",AccountID:a.get("accountID")||"0",ProjectID:a.get("projectID")||"0"},body:new URLSearchParams({query:e.trim(),limit:`${n}`,start:o()(1e3*t.start).tz().toISOString(),end:o()(1e3*t.end).tz().toISOString()})}))(n,e,r,t),u=await fetch(p,s),h=await u.text();if(!u.ok||!u.body)return d(h),l([]),c((e=>({...e,[i]:!1}))),!1;const m=h.split("\n").filter((e=>e)).slice(0,r).map(f).filter((e=>e));return l(m),c((e=>({...e,[i]:!1}))),!0}catch(Id){return c((e=>({...e,[i]:!1}))),Id instanceof Error&&"AbortError"!==Id.name&&(d(String(Id)),console.error(Id),l([])),!1}}),[p,n,r,a]);return{logs:i,isLoading:Object.values(s).some((e=>e)),error:u,fetchLogs:m,abortController:h.current}};var ga=function(e){return e[e.mouse=0]="mouse",e[e.keyboard=1]="keyboard",e}(ga||{});const va=e=>{var n;let{value:r,options:o,anchor:a,disabled:i,minLength:l=2,fullWidth:s,selected:c,noOptionsText:u,label:d,disabledFullScreen:h,offset:p,maxDisplayResults:f,loading:m,onSelect:_,onOpenAutocomplete:g,onFoundOptions:v,onChangeWrapperRef:y}=e;const{isMobile:b}=br(),w=(0,t.useRef)(null),[k,x]=(0,t.useState)({index:-1}),[S,C]=(0,t.useState)(""),[A,E]=(0,t.useState)(0),{value:M,setValue:N,setFalse:T}=Fr(!1),$=(0,t.useMemo)((()=>{if(!M)return[];try{const e=new RegExp(String(r.trim()),"i"),t=o.filter((t=>e.test(t.value))).sort(((t,n)=>{var o,a;return t.value.toLowerCase()===r.trim().toLowerCase()?-1:n.value.toLowerCase()===r.trim().toLowerCase()?1:((null===(o=t.value.match(e))||void 0===o?void 0:o.index)||0)-((null===(a=n.value.match(e))||void 0===a?void 0:a.index)||0)}));return E(t.length),C(t.length>Number(null===f||void 0===f?void 0:f.limit)&&(null===f||void 0===f?void 0:f.message)||""),null!==f&&void 0!==f&&f.limit?t.slice(0,f.limit):t}catch(Id){return[]}}),[M,o,r]),P=(0,t.useMemo)((()=>{var e;return 1===$.length&&(null===(e=$[0])||void 0===e?void 0:e.value)===r}),[$]),D=(0,t.useMemo)((()=>u&&!$.length),[u,$]),O=()=>{x({index:-1})},L=(0,t.useCallback)((e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:o}=e,a=n||r||o,i=$.length&&!P;if("ArrowUp"===t&&!a&&i&&(e.preventDefault(),x((e=>{let{index:t}=e;return{index:t<=0?0:t-1,type:ga.keyboard}}))),"ArrowDown"===t&&!a&&i){e.preventDefault();const t=$.length-1;x((e=>{let{index:n}=e;return{index:n>=t?t:n+1,type:ga.keyboard}}))}if("Enter"===t){const e=$[k.index];e&&_(e.value),c||T()}"Escape"===t&&T()}),[k,$,P,T,_,c]);return(0,t.useEffect)((()=>{N(r.length>=l)}),[r,o]),er("keydown",L),(0,t.useEffect)((()=>{if(!w.current||k.type===ga.mouse)return;const e=w.current.childNodes[k.index];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}),[k,$]),(0,t.useEffect)((()=>{x({index:-1})}),[$]),(0,t.useEffect)((()=>{g&&g(M)}),[M]),(0,t.useEffect)((()=>{v&&v(P?[]:$)}),[$,P]),(0,t.useEffect)((()=>{y&&y(w)}),[w]),mt(Xr,{open:M,buttonRef:a,placement:"bottom-left",onClose:T,fullWidth:s,title:b?d:void 0,disabledFullScreen:h,offset:p,children:[mt("div",{className:Qn()({"vm-autocomplete":!0,"vm-autocomplete_mobile":b&&!h}),ref:w,children:[m&&mt("div",{className:"vm-autocomplete__loader",children:[mt(bn,{}),mt("span",{children:"Loading..."})]}),D&&mt("div",{className:"vm-autocomplete__no-options",children:u}),!P&&$.map(((e,t)=>{return mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_mobile":b,"vm-list-item_active":t===k.index,"vm-list-item_multiselect":c,"vm-list-item_multiselect_selected":null===c||void 0===c?void 0:c.includes(e.value),"vm-list-item_with-icon":e.icon}),id:`$autocomplete$${e.value}`,onClick:(r=e.value,()=>{i||(_(r),c||T())}),onMouseEnter:(n=t,()=>{x({index:n,type:ga.mouse})}),onMouseLeave:O,children:[(null===c||void 0===c?void 0:c.includes(e.value))&&mt($n,{}),mt(pt.FK,{children:e.icon}),mt("span",{children:e.value})]},`${t}${e.value}`);var n,r}))]}),S&&mt("div",{className:"vm-autocomplete-message",children:["Shown ",null===f||void 0===f?void 0:f.limit," results out of ",A,". ",S]}),(null===(n=$[k.index])||void 0===n?void 0:n.description)&&mt("div",{className:"vm-autocomplete-info",children:[mt("div",{className:"vm-autocomplete-info__type",children:$[k.index].type}),mt("div",{className:"vm-autocomplete-info__description",dangerouslySetInnerHTML:{__html:$[k.index].description||""}})]})]})};var ya=n(267),ba=n.n(ya);const wa=e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&"),ka=e=>JSON.stringify(e).slice(1,-1),xa=e=>{const t=e.match(/["`']/g);return!!t&&t.length%2!==0};var Sa=function(e){return e.metric="metric",e.label="label",e.labelValue="labelValue",e}(Sa||{});const Ca={[Sa.metric]:mt(Vn,{}),[Sa.label]:mt(Un,{}),[Sa.labelValue]:mt(Yn,{})},Aa=n.p+"static/media/MetricsQL.a00044c91d9781cf8557.md",Ea=e=>{let t="";return Array.from(e).map((e=>{var n;const r="h3"===e.tagName.toLowerCase();return t=r?null!==(n=e.textContent)&&void 0!==n?n:"":t,r?null:((e,t)=>{var n;const r=null!==(n=t.textContent)&&void 0!==n?n:"",o=(e=>{const t=[];let n=e.nextElementSibling;for(;n&&"p"===n.tagName.toLowerCase();)n&&t.push(n),n=n.nextElementSibling;return t})(t).map((e=>{var t;return null!==(t=e.outerHTML)&&void 0!==t?t:""})).join("\n");return{type:e,value:r,description:(a=o,a.replace(/({const{metricsQLFunctions:e}=ln(),n=sn();return(0,t.useEffect)((()=>{e.length||(async()=>{try{const e=await fetch(Aa),t=(e=>{const t=document.createElement("div");t.innerHTML=da(e);const n=t.querySelectorAll("h3, h4");return Ea(n)})(await e.text());n({type:"SET_METRICSQL_FUNCTIONS",payload:t})}catch(Id){console.error("Error fetching or processing the MetricsQL.md file:",Id)}})()}),[]),e},Na=e=>{let{value:n,anchorEl:r,caretPosition:a,hasHelperText:i,onSelect:l,onFoundOptions:s}=e;const[c,u]=(0,t.useState)({top:0,left:0}),d=Ma(),h=(0,t.useMemo)((()=>{if(a[0]!==a[1])return{beforeCursor:n,afterCursor:""};return{beforeCursor:n.substring(0,a[0]),afterCursor:n.substring(a[1])}}),[n,a]),p=(0,t.useMemo)((()=>{const e=h.beforeCursor.split(/\s(or|and|unless|default|ifnot|if|group_left|group_right)\s|}|\+|\|-|\*|\/|\^/i);return e[e.length-1]}),[h]),f=(0,t.useMemo)((()=>{const e=[...p.matchAll(/\w+\((?[^)]+)\)\s+(by|without|on|ignoring)\s*\(\w*/gi)];if(e.length>0&&e[0].groups&&e[0].groups.metricName)return e[0].groups.metricName;const t=[...p.matchAll(/^\s*\b(?[^{}(),\s]+)(?={|$)/g)];return t.length>0&&t[0].groups&&t[0].groups.metricName?t[0].groups.metricName:""}),[p]),m=(0,t.useMemo)((()=>{const e=p.match(/[a-z_:-][\w\-.:/]*\b(?=\s*(=|!=|=~|!~))/g);return e?e[e.length-1]:""}),[p]),_=(0,t.useMemo)((()=>{const e=h.beforeCursor.trim(),t=["}",")"].some((t=>e.endsWith(t))),n=!xa(e)&&["`","'",'"'].some((t=>e.endsWith(t)));if(!h.beforeCursor||t||n||(e=>{const t=e.split(/\s+/),n=t.length,r=t[n-1],o=t[n-2],a=!r&&xa(e),i=(!r||t.length>1)&&!/([{(),+\-*/^]|\b(?:or|and|unless|default|ifnot|if|group_left|group_right|by|without|on|ignoring)\b)/i.test(o);return a||i})(h.beforeCursor))return at.empty;const r=/(?:by|without|on|ignoring)\s*\(\s*[^)]*$|\{[^}]*$/i,o=`(${wa(f)})?{?.+${wa(m)}(=|!=|=~|!~)"?([^"]*)$`;switch(!0){case new RegExp(o,"g").test(h.beforeCursor):return at.labelValue;case r.test(h.beforeCursor):return at.label;default:return at.metricsql}}),[h,f,m]),g=(0,t.useMemo)((()=>{const e=h.beforeCursor.match(/([\w_.:]+(?![},]))$/);return e?e[0]:""}),[h.beforeCursor]),{metrics:v,labels:y,labelValues:b,loading:w}=(e=>{let{valueByContext:n,metric:r,label:a,context:i}=e;const{serverUrl:l}=gt(),{period:{start:s,end:c}}=Gt(),{autocompleteCache:u}=ln(),d=sn(),[h,p]=(0,t.useState)(!1),[f,m]=(0,t.useState)(n),_=ba()(m,500);(0,t.useEffect)((()=>(_(n),_.cancel)),[n,_]);const[g,v]=(0,t.useState)([]),[y,b]=(0,t.useState)([]),[w,k]=(0,t.useState)([]),x=(0,t.useRef)(new AbortController),S=(0,t.useCallback)((e=>{const t=o()(1e3*s).startOf("day").valueOf()/1e3,n=o()(1e3*c).endOf("day").valueOf()/1e3;return new URLSearchParams({...e||{},limit:`${en}`,start:`${t}`,end:`${n}`})}),[s,c]),C=(e,t)=>e.map((e=>({value:e,type:`${t}`,icon:Ca[t]}))),A=async e=>{let{value:t,urlSuffix:n,setter:r,type:o,params:a}=e;if(!t&&o===Sa.metric)return;x.current.abort(),x.current=new AbortController;const{signal:i}=x.current,s={type:o,value:t,start:(null===a||void 0===a?void 0:a.get("start"))||"",end:(null===a||void 0===a?void 0:a.get("end"))||"",match:(null===a||void 0===a?void 0:a.get("match[]"))||""};p(!0);try{const e=u.get(s);if(e)return r(C(e,o)),void p(!1);const t=await fetch(`${l}/api/v1/${n}?${a}`,{signal:i});if(t.ok){const{data:e}=await t.json();r(C(e,o)),d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:e}})}p(!1)}catch(Id){Id instanceof Error&&"AbortError"!==Id.name&&(d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:[]}}),p(!1),console.error(Id))}};return(0,t.useEffect)((()=>{const e=i!==at.metricsql&&i!==at.empty;if(!l||!r||e)return;v([]);const t=ka(wa(r));return A({value:f,urlSuffix:"label/__name__/values",setter:v,type:Sa.metric,params:S({"match[]":`{__name__=~".*${t}.*"}`})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,f,i,r]),(0,t.useEffect)((()=>{if(!l||i!==at.label)return;b([]);const e=ka(r);return A({value:f,urlSuffix:"labels",setter:b,type:Sa.label,params:S(r?{"match[]":`{__name__="${e}"}`}:void 0)}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,f,i,r]),(0,t.useEffect)((()=>{if(!l||!a||i!==at.labelValue)return;k([]);const e=ka(r),t=ka(wa(f)),n=[r?`__name__="${e}"`:"",`${a}=~".*${t}.*"`].filter(Boolean).join(",");return A({value:f,urlSuffix:`label/${a}/values`,setter:k,type:Sa.labelValue,params:S({"match[]":`{${n}}`})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,f,i,r,a]),{metrics:g,labels:y,labelValues:w,loading:h}})({valueByContext:g,metric:f,label:m,context:_}),k=(0,t.useMemo)((()=>{switch(_){case at.metricsql:return[...v,...d];case at.label:return y;case at.labelValue:return b;default:return[]}}),[_,v,y,b]),x=(0,t.useCallback)((e=>{const t=h.beforeCursor;let n=h.afterCursor;const r=t.lastIndexOf(g,a[0]),o=r+g.length,i=t.substring(0,r),s=t.substring(o);if(_===at.labelValue){const t='"';n=n.replace(/^[^\s"|},]*/,"");e=`${/(?:=|!=|=~|!~)$/.test(i)?t:""}${e}${'"'!==n.trim()[0]?t:""}`}_===at.label&&(n=n.replace(/^[^\s=!,{}()"|+\-/*^]*/,"")),_===at.metricsql&&(n=n.replace(/^[^\s[\]{}()"|+\-/*^]*/,""));l(`${i}${e}${s}${n}`,i.length+e.length)}),[h]);return(0,t.useEffect)((()=>{if(!r.current)return void u({top:0,left:0});const e=r.current.querySelector("textarea")||r.current,t=window.getComputedStyle(e),n=`${t.getPropertyValue("font-size")}`,o=`${t.getPropertyValue("font-family")}`,a=parseInt(`${t.getPropertyValue("line-height")}`),l=document.createElement("div");l.style.font=`${n} ${o}`,l.style.padding=t.getPropertyValue("padding"),l.style.lineHeight=`${a}px`,l.style.width=`${e.offsetWidth}px`,l.style.maxWidth=`${e.offsetWidth}px`,l.style.whiteSpace=t.getPropertyValue("white-space"),l.style.overflowWrap=t.getPropertyValue("overflow-wrap");const s=document.createElement("span");l.appendChild(document.createTextNode(h.beforeCursor)),l.appendChild(s),l.appendChild(document.createTextNode(h.afterCursor)),document.body.appendChild(l);const c=l.getBoundingClientRect(),d=s.getBoundingClientRect(),p=d.left-c.left,f=d.bottom-c.bottom-(i?a:0);u({top:f,left:p}),l.remove(),s.remove()}),[r,a,i]),mt(pt.FK,{children:mt(va,{loading:w,disabledFullScreen:!0,value:g,options:k,anchor:r,minLength:0,offset:c,onSelect:x,onFoundOptions:s,maxDisplayResults:{limit:Xt,message:"Please, specify the query more precisely."}})})},Ta="No match! \nThis query hasn't selected any time series from database.\nEither the requested metrics are missing in the database,\nor there is a typo in series selector.",$a="The shown results are marked as PARTIAL.\nThe result is marked as partial if one or more vmstorage nodes failed to respond to the query.",Pa=e=>{let{value:n,onChange:r,onEnter:o,onArrowUp:a,onArrowDown:i,autocomplete:l,error:s,stats:c,label:u,disabled:d=!1}=e;const{autocompleteQuick:h}=ln(),{isMobile:p}=br(),[f,m]=(0,t.useState)(!1),[_,g]=(0,t.useState)([0,0]),v=(0,t.useRef)(null),[y,b]=(0,t.useState)(l),w=(0,t.useRef)(ba()(b,500)).current,k=[{show:"0"===(null===c||void 0===c?void 0:c.seriesFetched)&&!c.resultLength,text:Ta},{show:null===c||void 0===c?void 0:c.isPartial,text:$a}].filter((e=>e.show)).map((e=>e.text)).join("");c&&(u=`${u} (${c.executionTimeMsec||0}ms)`);return(0,t.useEffect)((()=>{m(l)}),[h]),(0,t.useEffect)((()=>{b(!1),w(!0)}),[_]),mt("div",{className:"vm-query-editor",ref:v,children:[mt(Vr,{value:n,label:u,type:"textarea",autofocus:!p,error:s,warning:k,onKeyDown:e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:l}=e,s=(e.target.value||"").split("\n").length>1,c=n||r,u="ArrowDown"===t,d="Enter"===t;"ArrowUp"===t&&c&&(e.preventDefault(),a()),u&&c&&(e.preventDefault(),i()),d&&f&&e.preventDefault(),!d||l||s&&!c||f||(e.preventDefault(),o())},onChange:r,onChangeCaret:e=>{g((t=>t[0]===e[0]&&t[1]===e[1]?t:e))},disabled:d,inputmode:"search",caretPosition:_}),y&&l&&mt(Na,{value:n,anchorEl:v,caretPosition:_,hasHelperText:Boolean(k||s),onSelect:(e,t)=>{r(e),g([t,t])},onFoundOptions:e=>{m(!!e.length)}})]})},Da=e=>{let{query:n,limit:r,error:o,isLoading:a,onChange:i,onChangeLimit:l,onRun:s}=e;const{isMobile:c}=br(),[u,d]=(0,t.useState)(""),[h,p]=(0,t.useState)(r);return(0,t.useEffect)((()=>{p(r)}),[r]),mt("div",{className:Qn()({"vm-explore-logs-header":!0,"vm-block":!0,"vm-block_mobile":c}),children:[mt("div",{className:"vm-explore-logs-header-top",children:[mt(Pa,{value:n,autocomplete:!1,onArrowUp:()=>null,onArrowDown:()=>null,onEnter:s,onChange:i,label:"Log query",error:o}),mt(Vr,{label:"Limit entries",type:"number",value:h,error:u,onChange:e=>{const t=+e;p(t),isNaN(t)||t<0?d("Number must be bigger than zero"):(d(""),l(t))},onEnter:s})]}),mt("div",{className:"vm-explore-logs-header-bottom",children:[mt("div",{className:"vm-explore-logs-header-bottom-contols"}),mt("div",{className:"vm-explore-logs-header-bottom-helpful",children:[mt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/victorialogs/logsql/",rel:"help noreferrer",children:[mt(_n,{}),"Query language docs"]}),mt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/victorialogs/",rel:"help noreferrer",children:[mt(Rn,{}),"Documentation"]})]}),mt("div",{className:"vm-explore-logs-header-bottom-execute",children:mt(Dr,{startIcon:mt(a?Zn:En,{}),onClick:s,fullWidth:!0,children:[mt("span",{className:"vm-explore-logs-header-bottom-execute__text",children:a?"Cancel Query":"Execute Query"}),mt("span",{className:"vm-explore-logs-header-bottom-execute__text_hidden",children:"Execute Query"})]})})]})]})},Oa=()=>{const[e,n]=(0,t.useState)(null),[r,o]=(0,t.useState)({width:0,height:0}),a=(0,t.useCallback)((()=>{o({width:(null===e||void 0===e?void 0:e.offsetWidth)||0,height:(null===e||void 0===e?void 0:e.offsetHeight)||0})}),[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]);return er("resize",a),(0,t.useEffect)(a,[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]),[n,r]},La="u-off",Ra="u-label",za="width",Ia="height",ja="top",Fa="bottom",Ha="left",Va="right",Ba="#000",Ua=Ba+"0",Ya="mousemove",Wa="mousedown",qa="mouseup",Ka="mouseenter",Za="mouseleave",Ga="dblclick",Qa="change",Ja="dppxchange",Xa="--",ei="undefined"!=typeof window,ti=ei?document:null,ni=ei?window:null,ri=ei?navigator:null;let oi,ai;function ii(e,t){if(null!=t){let n=e.classList;!n.contains(t)&&n.add(t)}}function li(e,t){let n=e.classList;n.contains(t)&&n.remove(t)}function si(e,t,n){e.style[t]=n+"px"}function ci(e,t,n,r){let o=ti.createElement(e);return null!=t&&ii(o,t),null!=n&&n.insertBefore(o,r),o}function ui(e,t){return ci("div",e,t)}const di=new WeakMap;function hi(e,t,n,r,o){let a="translate("+t+"px,"+n+"px)";a!=di.get(e)&&(e.style.transform=a,di.set(e,a),t<0||n<0||t>r||n>o?ii(e,La):li(e,La))}const pi=new WeakMap;function fi(e,t,n){let r=t+n;r!=pi.get(e)&&(pi.set(e,r),e.style.background=t,e.style.borderColor=n)}const mi=new WeakMap;function _i(e,t,n,r){let o=t+""+n;o!=mi.get(e)&&(mi.set(e,o),e.style.height=n+"px",e.style.width=t+"px",e.style.marginLeft=r?-t/2+"px":0,e.style.marginTop=r?-n/2+"px":0)}const gi={passive:!0},vi={...gi,capture:!0};function yi(e,t,n,r){t.addEventListener(e,n,r?vi:gi)}function bi(e,t,n,r){t.removeEventListener(e,n,gi)}function wi(e,t,n,r){let o;n=n||0;let a=(r=r||t.length-1)<=2147483647;for(;r-n>1;)o=a?n+r>>1:Ri((n+r)/2),t[o]=t&&o<=n;o+=r)if(null!=e[o])return o;return-1}function xi(e,t,n,r){let o=Vi(e),a=Vi(t);e==t&&(-1==o?(e*=n,t/=n):(e/=n,t*=n));let i=10==n?Bi:Ui,l=1==a?Ii:Ri,s=(1==o?Ri:Ii)(i(Li(e))),c=l(i(Li(t))),u=Hi(n,s),d=Hi(n,c);return 10==n&&(s<0&&(u=il(u,-s)),c<0&&(d=il(d,-c))),r||2==n?(e=u*o,t=d*a):(e=al(e,u),t=ol(t,d)),[e,t]}function Si(e,t,n,r){let o=xi(e,t,n,r);return 0==e&&(o[0]=0),0==t&&(o[1]=0),o}ei&&function e(){let t=devicePixelRatio;oi!=t&&(oi=t,ai&&bi(Qa,ai,e),ai=matchMedia(`(min-resolution: ${oi-.001}dppx) and (max-resolution: ${oi+.001}dppx)`),yi(Qa,ai,e),ni.dispatchEvent(new CustomEvent(Ja)))}();const Ci={mode:3,pad:.1},Ai={pad:0,soft:null,mode:0},Ei={min:Ai,max:Ai};function Mi(e,t,n,r){return _l(n)?Ti(e,t,n):(Ai.pad=n,Ai.soft=r?0:null,Ai.mode=r?3:0,Ti(e,t,Ei))}function Ni(e,t){return null==e?t:e}function Ti(e,t,n){let r=n.min,o=n.max,a=Ni(r.pad,0),i=Ni(o.pad,0),l=Ni(r.hard,-Wi),s=Ni(o.hard,Wi),c=Ni(r.soft,Wi),u=Ni(o.soft,-Wi),d=Ni(r.mode,0),h=Ni(o.mode,0),p=t-e,f=Bi(p),m=Fi(Li(e),Li(t)),_=Bi(m),g=Li(_-f);(p<1e-24||g>10)&&(p=0,0!=e&&0!=t||(p=1e-24,2==d&&c!=Wi&&(a=0),2==h&&u!=-Wi&&(i=0)));let v=p||m||1e3,y=Bi(v),b=Hi(10,Ri(y)),w=il(al(e-v*(0==p?0==e?.1:1:a),b/10),24),k=e>=c&&(1==d||3==d&&w<=c||2==d&&w>=c)?c:Wi,x=Fi(l,w=k?k:ji(k,w)),S=il(ol(t+v*(0==p?0==t?.1:1:i),b/10),24),C=t<=u&&(1==h||3==h&&S>=u||2==h&&S<=u)?u:-Wi,A=ji(s,S>C&&t<=C?C:Fi(C,S));return x==A&&0==x&&(A=100),[x,A]}const $i=new Intl.NumberFormat(ei?ri.language:"en-US"),Pi=e=>$i.format(e),Di=Math,Oi=Di.PI,Li=Di.abs,Ri=Di.floor,zi=Di.round,Ii=Di.ceil,ji=Di.min,Fi=Di.max,Hi=Di.pow,Vi=Di.sign,Bi=Di.log10,Ui=Di.log2,Yi=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Di.asinh(e/t)},Wi=1/0;function qi(e){return 1+(0|Bi((e^e>>31)-(e>>31)))}function Ki(e,t,n){return ji(Fi(e,t),n)}function Zi(e){return"function"==typeof e?e:()=>e}const Gi=e=>e,Qi=(e,t)=>t,Ji=e=>null,Xi=e=>!0,el=(e,t)=>e==t,tl=/\.\d*?(?=9{6,}|0{6,})/gm,nl=e=>{if(fl(e)||ll.has(e))return e;const t=`${e}`,n=t.match(tl);if(null==n)return e;let r=n[0].length-1;if(-1!=t.indexOf("e-")){let[e,n]=t.split("e");return+`${nl(e)}e${n}`}return il(e,r)};function rl(e,t){return nl(il(nl(e/t))*t)}function ol(e,t){return nl(Ii(nl(e/t))*t)}function al(e,t){return nl(Ri(nl(e/t))*t)}function il(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(fl(e))return e;let n=10**t,r=e*n*(1+Number.EPSILON);return zi(r)/n}const ll=new Map;function sl(e){return((""+e).split(".")[1]||"").length}function cl(e,t,n,r){let o=[],a=r.map(sl);for(let i=t;i=0?0:t)+(i>=a[l]?0:a[l]),u=10==e?s:il(s,c);o.push(u),ll.set(u,c)}}return o}const ul={},dl=[],hl=[null,null],pl=Array.isArray,fl=Number.isInteger;function ml(e){return"string"==typeof e}function _l(e){let t=!1;if(null!=e){let n=e.constructor;t=null==n||n==Object}return t}function gl(e){return null!=e&&"object"==typeof e}const vl=Object.getPrototypeOf(Uint8Array),yl="__proto__";function bl(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_l;if(pl(e)){let r=e.find((e=>null!=e));if(pl(r)||n(r)){t=Array(e.length);for(let r=0;ra){for(r=i-1;r>=0&&null==e[r];)e[r--]=null;for(r=i+1;rPromise.resolve().then(e):queueMicrotask;const Sl=["January","February","March","April","May","June","July","August","September","October","November","December"],Cl=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Al(e){return e.slice(0,3)}const El=Cl.map(Al),Ml=Sl.map(Al),Nl={MMMM:Sl,MMM:Ml,WWWW:Cl,WWW:El};function Tl(e){return(e<10?"0":"")+e}const $l={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,t)=>t.MMMM[e.getMonth()],MMM:(e,t)=>t.MMM[e.getMonth()],MM:e=>Tl(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>Tl(e.getDate()),D:e=>e.getDate(),WWWW:(e,t)=>t.WWWW[e.getDay()],WWW:(e,t)=>t.WWW[e.getDay()],HH:e=>Tl(e.getHours()),H:e=>e.getHours(),h:e=>{let t=e.getHours();return 0==t?12:t>12?t-12:t},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>Tl(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>Tl(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>{return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Pl(e,t){t=t||Nl;let n,r=[],o=/\{([a-z]+)\}|[^{]+/gi;for(;n=o.exec(e);)r.push("{"==n[0][0]?$l[n[1]]:n[0]);return e=>{let n="";for(let o=0;oe%1==0,Ll=[1,2,2.5,5],Rl=cl(10,-32,0,Ll),zl=cl(10,0,32,Ll),Il=zl.filter(Ol),jl=Rl.concat(zl),Fl="{YYYY}",Hl="\n"+Fl,Vl="{M}/{D}",Bl="\n"+Vl,Ul=Bl+"/{YY}",Yl="{aa}",Wl="{h}:{mm}"+Yl,ql="\n"+Wl,Kl=":{ss}",Zl=null;function Gl(e){let t=1e3*e,n=60*t,r=60*n,o=24*r,a=30*o,i=365*o;return[(1==e?cl(10,0,3,Ll).filter(Ol):cl(10,-3,0,Ll)).concat([t,5*t,10*t,15*t,30*t,n,5*n,10*n,15*n,30*n,r,2*r,3*r,4*r,6*r,8*r,12*r,o,2*o,3*o,4*o,5*o,6*o,7*o,8*o,9*o,10*o,15*o,a,2*a,3*a,4*a,6*a,i,2*i,5*i,10*i,25*i,50*i,100*i]),[[i,Fl,Zl,Zl,Zl,Zl,Zl,Zl,1],[28*o,"{MMM}",Hl,Zl,Zl,Zl,Zl,Zl,1],[o,Vl,Hl,Zl,Zl,Zl,Zl,Zl,1],[r,"{h}"+Yl,Ul,Zl,Bl,Zl,Zl,Zl,1],[n,Wl,Ul,Zl,Bl,Zl,Zl,Zl,1],[t,Kl,Ul+" "+Wl,Zl,Bl+" "+Wl,Zl,ql,Zl,1],[e,Kl+".{fff}",Ul+" "+Wl,Zl,Bl+" "+Wl,Zl,ql,Zl,1]],function(t){return(l,s,c,u,d,h)=>{let p=[],f=d>=i,m=d>=a&&d=o?o:d,i=y+(Ri(c)-Ri(g))+ol(g-y,a);p.push(i);let f=t(i),m=f.getHours()+f.getMinutes()/n+f.getSeconds()/r,_=d/r,v=h/l.axes[s]._space;for(;i=il(i+d,1==e?0:3),!(i>u);)if(_>1){let e=Ri(il(m+_,6))%24,n=t(i).getHours()-e;n>1&&(n=-1),i-=n*r,m=(m+_)%24,il((i-p[p.length-1])/d,3)*v>=.7&&p.push(i)}else p.push(i)}return p}}]}const[Ql,Jl,Xl]=Gl(1),[es,ts,ns]=Gl(.001);function rs(e,t){return e.map((e=>e.map(((n,r)=>0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)))))}function os(e,t){return(n,r,o,a,i)=>{let l,s,c,u,d,h,p=t.find((e=>i>=e[0]))||t[t.length-1];return r.map((t=>{let n=e(t),r=n.getFullYear(),o=n.getMonth(),a=n.getDate(),i=n.getHours(),f=n.getMinutes(),m=n.getSeconds(),_=r!=l&&p[2]||o!=s&&p[3]||a!=c&&p[4]||i!=u&&p[5]||f!=d&&p[6]||m!=h&&p[7]||p[1];return l=r,s=o,c=a,u=i,d=f,h=m,_(n)}))}}function as(e,t,n){return new Date(e,t,n)}function is(e,t){return t(e)}cl(2,-53,53,[1]);function ls(e,t){return(n,r,o,a)=>null==a?Xa:t(e(r))}const ss={show:!0,live:!0,isolate:!1,mount:()=>{},markers:{show:!0,width:2,stroke:function(e,t){let n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null},fill:function(e,t){return e.series[t].fill(e,t)},dash:"solid"},idx:null,idxs:null,values:[]};const cs=[0,0];function us(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{0==e.button&&(!r||e.target==t)&&n(e)}}function ds(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{(!r||e.target==t)&&n(e)}}const hs={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return cs[0]=t,cs[1]=n,cs},points:{one:!1,show:function(e,t){let n=e.cursor.points,r=ui(),o=n.size(e,t);si(r,za,o),si(r,Ia,o);let a=o/-2;si(r,"marginLeft",a),si(r,"marginTop",a);let i=n.width(e,t,o);return i&&si(r,"borderWidth",i),r},size:function(e,t){return e.series[t].points.size},width:0,stroke:function(e,t){let n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){let n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:us,mouseup:us,click:us,dblclick:us,mousemove:ds,mouseleave:ds,mouseenter:ds},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,t,n,r,o)=>r-o,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},ps={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},fs=wl({},ps,{filter:Qi}),ms=wl({},fs,{size:10}),_s=wl({},ps,{show:!1}),gs='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',vs="bold "+gs,ys={show:!0,scale:"x",stroke:Ba,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:vs,side:2,grid:fs,ticks:ms,border:_s,font:gs,lineGap:1.5,rotate:0},bs={show:!0,scale:"x",auto:!1,sorted:1,min:Wi,max:-Wi,idxs:[]};function ws(e,t,n,r,o){return t.map((e=>null==e?"":Pi(e)))}function ks(e,t,n,r,o,a,i){let l=[],s=ll.get(o)||0;for(let c=n=i?n:il(ol(n,o),s);c<=r;c=il(c+o,s))l.push(Object.is(c,-0)?0:c);return l}function xs(e,t,n,r,o,a,i){const l=[],s=e.scales[e.axes[t].scale].log,c=Ri((10==s?Bi:Ui)(n));o=Hi(s,c),10==s&&(o=jl[wi(o,jl)]);let u=n,d=o*s;10==s&&(d=jl[wi(d,jl)]);do{l.push(u),u+=o,10!=s||ll.has(u)||(u=il(u,ll.get(o))),u>=d&&(d=(o=u)*s,10==s&&(d=jl[wi(d,jl)]))}while(u<=r);return l}function Ss(e,t,n,r,o,a,i){let l=e.scales[e.axes[t].scale].asinh,s=r>l?xs(e,t,Fi(l,n),r,o):[l],c=r>=0&&n<=0?[0]:[];return(n<-l?xs(e,t,Fi(l,-r),-n,o):[l]).reverse().map((e=>-e)).concat(c,s)}const Cs=/./,As=/[12357]/,Es=/[125]/,Ms=/1/,Ns=(e,t,n,r)=>e.map(((e,o)=>4==t&&0==e||o%r==0&&n.test(e.toExponential()[e<0?1:0])?e:null));function Ts(e,t,n,r,o){let a=e.axes[n],i=a.scale,l=e.scales[i],s=e.valToPos,c=a._space,u=s(10,i),d=s(9,i)-u>=c?Cs:s(7,i)-u>=c?As:s(5,i)-u>=c?Es:Ms;if(d==Ms){let e=Li(s(1,i)-u);if(eo,Rs={show:!0,auto:!0,sorted:0,gaps:Ls,alpha:1,facets:[wl({},Os,{scale:"x"}),wl({},Os,{scale:"y"})]},zs={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Ls,alpha:1,points:{show:function(e,t){let{scale:n,idxs:r}=e.series[0],o=e._data[0],a=e.valToPos(o[r[0]],n,!0),i=e.valToPos(o[r[1]],n,!0),l=Li(i-a)/(e.series[t].points.space*oi);return r[1]-r[0]<=l},filter:null},values:null,min:Wi,max:-Wi,idxs:[],path:null,clip:null};function Is(e,t,n,r,o){return n/10}const js={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Fs=wl({},js,{time:!1,ori:1}),Hs={};function Vs(e,t){let n=Hs[e];return n||(n={key:e,plots:[],sub(e){n.plots.push(e)},unsub(e){n.plots=n.plots.filter((t=>t!=e))},pub(e,t,r,o,a,i,l){for(let s=0;s{let m=e.pxRound;const _=l.dir*(0==l.ori?1:-1),g=0==l.ori?Xs:ec;let v,y;1==_?(v=n,y=r):(v=r,y=n);let b=m(c(t[v],l,p,d)),w=m(u(i[v],s,f,h)),k=m(c(t[y],l,p,d)),x=m(u(1==a?s.max:s.min,s,f,h)),S=new Path2D(o);return g(S,k,x),g(S,b,x),g(S,b,w),S}))}function qs(e,t,n,r,o,a){let i=null;if(e.length>0){i=new Path2D;const l=0==t?tc:nc;let s=n;for(let t=0;tn[0]){let e=n[0]-s;e>0&&l(i,s,r,e,r+a),s=n[1]}}let c=n+o-s,u=10;c>0&&l(i,s,r-u/2,c,r+a+u)}return i}function Ks(e,t,n,r,o,a,i){let l=[],s=e.length;for(let c=1==o?n:r;c>=n&&c<=r;c+=o){if(null===t[c]){let u=c,d=c;if(1==o)for(;++c<=r&&null===t[c];)d=c;else for(;--c>=n&&null===t[c];)d=c;let h=a(e[u]),p=d==u?h:a(e[d]),f=u-o;h=i<=0&&f>=0&&f=0&&m>=0&&m=h&&l.push([h,p])}}return l}function Zs(e){return 0==e?Gi:1==e?zi:t=>rl(t,e)}function Gs(e){let t=0==e?Qs:Js,n=0==e?(e,t,n,r,o,a)=>{e.arcTo(t,n,r,o,a)}:(e,t,n,r,o,a)=>{e.arcTo(n,t,o,r,a)},r=0==e?(e,t,n,r,o)=>{e.rect(t,n,r,o)}:(e,t,n,r,o)=>{e.rect(n,t,o,r)};return function(e,o,a,i,l){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;0==s&&0==c?r(e,o,a,i,l):(s=ji(s,i/2,l/2),c=ji(c,i/2,l/2),t(e,o+s,a),n(e,o+i,a,o+i,a+l,s),n(e,o+i,a+l,o,a+l,c),n(e,o,a+l,o,a,c),n(e,o,a,o+i,a,s),e.closePath())}}const Qs=(e,t,n)=>{e.moveTo(t,n)},Js=(e,t,n)=>{e.moveTo(n,t)},Xs=(e,t,n)=>{e.lineTo(t,n)},ec=(e,t,n)=>{e.lineTo(n,t)},tc=Gs(0),nc=Gs(1),rc=(e,t,n,r,o,a)=>{e.arc(t,n,r,o,a)},oc=(e,t,n,r,o,a)=>{e.arc(n,t,r,o,a)},ac=(e,t,n,r,o,a,i)=>{e.bezierCurveTo(t,n,r,o,a,i)},ic=(e,t,n,r,o,a,i)=>{e.bezierCurveTo(n,t,o,r,i,a)};function lc(e){return(e,t,n,r,o)=>Bs(e,t,((t,a,i,l,s,c,u,d,h,p,f)=>{let m,_,{pxRound:g,points:v}=t;0==l.ori?(m=Qs,_=rc):(m=Js,_=oc);const y=il(v.width*oi,3);let b=(v.size-v.width)/2*oi,w=il(2*b,3),k=new Path2D,x=new Path2D,{left:S,top:C,width:A,height:E}=e.bbox;tc(x,S-w,C-w,A+2*w,E+2*w);const M=e=>{if(null!=i[e]){let t=g(c(a[e],l,p,d)),n=g(u(i[e],s,f,h));m(k,t+b,n),_(k,t,n,b,0,2*Oi)}};if(o)o.forEach(M);else for(let e=n;e<=r;e++)M(e);return{stroke:y>0?k:null,fill:k,clip:x,flags:3}}))}function sc(e){return(t,n,r,o,a,i)=>{r!=o&&(a!=r&&i!=r&&e(t,n,r),a!=o&&i!=o&&e(t,n,o),e(t,n,i))}}const cc=sc(Xs),uc=sc(ec);function dc(e){const t=Ni(e?.alignGaps,0);return(e,n,r,o)=>Bs(e,n,((a,i,l,s,c,u,d,h,p,f,m)=>{let _,g,v=a.pxRound,y=e=>v(u(e,s,f,h)),b=e=>v(d(e,c,m,p));0==s.ori?(_=Xs,g=cc):(_=ec,g=uc);const w=s.dir*(0==s.ori?1:-1),k={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},x=k.stroke;let S,C,A,E=Wi,M=-Wi,N=y(i[1==w?r:o]),T=ki(l,r,o,1*w),$=ki(l,r,o,-1*w),P=y(i[T]),D=y(i[$]),O=!1;for(let e=1==w?r:o;e>=r&&e<=o;e+=w){let t=y(i[e]),n=l[e];t==N?null!=n?(C=b(n),E==Wi&&(_(x,t,C),S=C),E=ji(C,E),M=Fi(C,M)):null===n&&(O=!0):(E!=Wi&&(g(x,N,E,M,S,C),A=N),null!=n?(C=b(n),_(x,t,C),E=M=S=C):(E=Wi,M=-Wi,null===n&&(O=!0)),N=t)}E!=Wi&&E!=M&&A!=N&&g(x,N,E,M,S,C);let[L,R]=Us(e,n);if(null!=a.fill||0!=L){let t=k.fill=new Path2D(x),r=b(a.fillTo(e,n,a.min,a.max,L));_(t,D,r),_(t,P,r)}if(!a.spanGaps){let c=[];O&&c.push(...Ks(i,l,r,o,w,y,t)),k.gaps=c=a.gaps(e,n,r,o,c),k.clip=qs(c,s.ori,h,p,f,m)}return 0!=R&&(k.band=2==R?[Ws(e,n,r,o,x,-1),Ws(e,n,r,o,x,1)]:Ws(e,n,r,o,x,R)),k}))}function hc(e,t,n,r,o,a){let i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Wi;if(e.length>1){let l=null;for(let s=0,c=1/0;s0!==r[e]>0?n[e]=0:(n[e]=3*(s[e-1]+s[e])/((2*s[e]+s[e-1])/r[e-1]+(s[e]+2*s[e-1])/r[e]),isFinite(n[e])||(n[e]=0));n[i-1]=r[i-2];for(let c=0;c{Tc.pxRatio=oi})));const _c=dc(),gc=lc();function vc(e,t,n,r){return(r?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map(((e,r)=>yc(e,r,t,n)))}function yc(e,t,n,r){return wl({},0==t?n:r,e)}function bc(e,t,n){return null==t?hl:[t,n]}const wc=bc;function kc(e,t,n){return null==t?hl:Mi(t,n,.1,!0)}function xc(e,t,n,r){return null==t?hl:xi(t,n,e.scales[r].log,!1)}const Sc=xc;function Cc(e,t,n,r){return null==t?hl:Si(t,n,e.scales[r].log,!1)}const Ac=Cc;function Ec(e,t,n,r,o){let a=Fi(qi(e),qi(t)),i=t-e,l=wi(o/r*i,n);do{let e=n[l],t=r*e/i;if(t>=o&&a+(e<5?ll.get(e):0)<=17)return[e,t]}while(++l(t=zi((n=+r)*oi))+"px")),t,n]}function Nc(e){e.show&&[e.font,e.labelFont].forEach((e=>{let t=il(e[2]*oi,1);e[0]=e[0].replace(/[0-9.]+px/,t+"px"),e[1]=t}))}function Tc(e,t,n){const r={mode:Ni(e.mode,1)},o=r.mode;function a(e,t){return((3==t.distr?Bi(e>0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?Yi(e,t.asinh):100==t.distr?t.fwd(e):e)-t._min)/(t._max-t._min)}function i(e,t,n,r){let o=a(e,t);return r+n*(-1==t.dir?1-o:o)}function l(e,t,n,r){let o=a(e,t);return r+n*(-1==t.dir?o:1-o)}function s(e,t,n,r){return 0==t.ori?i(e,t,n,r):l(e,t,n,r)}r.valToPosH=i,r.valToPosV=l;let c=!1;r.status=0;const u=r.root=ui("uplot");if(null!=e.id&&(u.id=e.id),ii(u,e.class),e.title){ui("u-title",u).textContent=e.title}const d=ci("canvas"),h=r.ctx=d.getContext("2d"),p=ui("u-wrap",u);yi("click",p,(e=>{if(e.target===m){(Tt!=At||$t!=Et)&&Ft.click(r,e)}}),!0);const f=r.under=ui("u-under",p);p.appendChild(d);const m=r.over=ui("u-over",p),_=+Ni((e=bl(e)).pxAlign,1),g=Zs(_);(e.plugins||[]).forEach((t=>{t.opts&&(e=t.opts(r,e)||e)}));const v=e.ms||.001,y=r.series=1==o?vc(e.series||[],bs,zs,!1):(b=e.series||[null],w=Rs,b.map(((e,t)=>0==t?{}:wl({},w,e))));var b,w;const k=r.axes=vc(e.axes||[],ys,Ds,!0),x=r.scales={},S=r.bands=e.bands||[];S.forEach((e=>{e.fill=Zi(e.fill||null),e.dir=Ni(e.dir,-1)}));const C=2==o?y[1].facets[0].scale:y[0].scale,A={axes:function(){for(let e=0;ent[e])):v,b=2==p.distr?nt[v[1]]-nt[v[0]]:u,w=t.ticks,S=t.border,C=w.show?zi(w.size*oi):0,A=t._rotate*-Oi/180,E=g(t._pos*oi),M=E+(C+_)*c;o=0==i?M:0,n=1==i?M:0,lt(t.font[0],l,1==t.align?Ha:2==t.align?Va:A>0?Ha:A<0?Va:0==i?"center":3==a?Va:Ha,A||1==i?"middle":2==a?ja:Fa);let N=t.font[1]*t.lineGap,T=v.map((e=>g(s(e,p,f,m)))),$=t._values;for(let e=0;e<$.length;e++){let t=$[e];if(null!=t){0==i?n=T[e]:o=T[e],t=""+t;let r=-1==t.indexOf("\n")?[t]:t.split(/\n/gm);for(let e=0;e0&&(y.forEach(((e,n)=>{if(n>0&&e.show&&(ut(n,!1),ut(n,!0),null==e._paths)){tt!=e.alpha&&(h.globalAlpha=tt=e.alpha);let a=2==o?[0,t[n][0].length-1]:function(e){let t=Ki(Be-1,0,Ve-1),n=Ki(Ue+1,0,Ve-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n{if(t>0&&e.show){tt!=e.alpha&&(h.globalAlpha=tt=e.alpha),null!=e._paths&&dt(t,!1);{let n=null!=e._paths?e._paths.gaps:null,o=e.points.show(r,t,Be,Ue,n),a=e.points.filter(r,t,o,n);(o||a)&&(e.points._paths=e.points.paths(r,t,Be,Ue,a),dt(t,!0))}1!=tt&&(h.globalAlpha=tt=1),xn("drawSeries",t)}})))}},E=(e.drawOrder||["axes","series"]).map((e=>A[e]));function M(t){let n=x[t];if(null==n){let r=(e.scales||ul)[t]||ul;if(null!=r.from)M(r.from),x[t]=wl({},x[r.from],r,{key:t});else{n=x[t]=wl({},t==C?js:Fs,r),n.key=t;let e=n.time,a=n.range,i=pl(a);if((t!=C||2==o&&!e)&&(!i||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?Ci:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?Ci:{mode:1,hard:a[1],soft:a[1]}},i=!1),!i&&_l(a))){let e=a;a=(t,n,r)=>null==n?hl:Mi(n,r,e)}n.range=Zi(a||(e?wc:t==C?3==n.distr?Sc:4==n.distr?Ac:bc:3==n.distr?xc:4==n.distr?Cc:kc)),n.auto=Zi(!i&&n.auto),n.clamp=Zi(n.clamp||Is),n._min=n._max=null}}}M("x"),M("y"),1==o&&y.forEach((e=>{M(e.scale)})),k.forEach((e=>{M(e.scale)}));for(let Tn in e.scales)M(Tn);const N=x[C],T=N.distr;let $,P;0==N.ori?(ii(u,"u-hz"),$=i,P=l):(ii(u,"u-vt"),$=l,P=i);const D={};for(let Tn in x){let e=x[Tn];null==e.min&&null==e.max||(D[Tn]={min:e.min,max:e.max},e.min=e.max=null)}const O=e.tzDate||(e=>new Date(zi(e/v))),L=e.fmtDate||Pl,R=1==v?Xl(O):ns(O),z=os(O,rs(1==v?Jl:ts,L)),I=ls(O,is("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",L)),j=[],F=r.legend=wl({},ss,e.legend),H=F.show,V=F.markers;let B,U,Y;F.idxs=j,V.width=Zi(V.width),V.dash=Zi(V.dash),V.stroke=Zi(V.stroke),V.fill=Zi(V.fill);let W,q=[],K=[],Z=!1,G={};if(F.live){const e=y[1]?y[1].values:null;Z=null!=e,W=Z?e(r,1,0):{_:0};for(let t in W)G[t]=Xa}if(H)if(B=ci("table","u-legend",u),Y=ci("tbody",null,B),F.mount(r,B),Z){U=ci("thead",null,B,Y);let e=ci("tr",null,U);for(var Q in ci("th",null,e),W)ci("th",Ra,e).textContent=Q}else ii(B,"u-inline"),F.live&&ii(B,"u-live");const J={show:!0},X={show:!1};const ee=new Map;function te(e,t,n){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const a=ee.get(t)||{},i=Ae.bind[e](r,t,n,o);i&&(yi(e,t,a[e]=i),ee.set(t,a))}function ne(e,t,n){const r=ee.get(t)||{};for(let o in r)null!=e&&o!=e||(bi(o,t,r[o]),delete r[o]);null==e&&ee.delete(t)}let re=0,oe=0,ae=0,ie=0,le=0,se=0,ce=le,ue=se,de=ae,he=ie,pe=0,fe=0,me=0,_e=0;r.bbox={};let ge=!1,ve=!1,ye=!1,be=!1,we=!1,ke=!1;function xe(e,t,n){(n||e!=r.width||t!=r.height)&&Se(e,t),yt(!1),ye=!0,ve=!0,Rt()}function Se(e,t){r.width=re=ae=e,r.height=oe=ie=t,le=se=0,function(){let e=!1,t=!1,n=!1,r=!1;k.forEach(((o,a)=>{if(o.show&&o._show){let{side:a,_size:i}=o,l=a%2,s=i+(null!=o.label?o.labelSize:0);s>0&&(l?(ae-=s,3==a?(le+=s,r=!0):n=!0):(ie-=s,0==a?(se+=s,e=!0):t=!0))}})),Ie[0]=e,Ie[1]=n,Ie[2]=t,Ie[3]=r,ae-=He[1]+He[3],le+=He[3],ie-=He[2]+He[0],se+=He[0]}(),function(){let e=le+ae,t=se+ie,n=le,r=se;function o(o,a){switch(o){case 1:return e+=a,e-a;case 2:return t+=a,t-a;case 3:return n-=a,n+a;case 0:return r-=a,r+a}}k.forEach(((e,t)=>{if(e.show&&e._show){let t=e.side;e._pos=o(t,e._size),null!=e.label&&(e._lpos=o(t,e.labelSize))}}))}();let n=r.bbox;pe=n.left=rl(le*oi,.5),fe=n.top=rl(se*oi,.5),me=n.width=rl(ae*oi,.5),_e=n.height=rl(ie*oi,.5)}const Ce=3;r.setSize=function(e){let{width:t,height:n}=e;xe(t,n)};const Ae=r.cursor=wl({},hs,{drag:{y:2==o}},e.cursor);if(null==Ae.dataIdx){var Ee;let e=Ae.hover,n=e.skip=new Set(null!==(Ee=e.skip)&&void 0!==Ee?Ee:[]);n.add(void 0);let r=e.prox=Zi(e.prox),o=e.bias??=0;Ae.dataIdx=(e,a,i,l)=>{var s;if(0==a)return i;let c=i,u=null!==(s=r(e,a,i,l))&&void 0!==s?s:Wi,d=u>=0&&u0;)n.has(m[e])||(t=e);if(0==o||1==o)for(e=i;null==r&&e++u&&(c=null)}return c}}const Me=e=>{Ae.event=e};Ae.idxs=j,Ae._lock=!1;let Ne=Ae.points;Ne.show=Zi(Ne.show),Ne.size=Zi(Ne.size),Ne.stroke=Zi(Ne.stroke),Ne.width=Zi(Ne.width),Ne.fill=Zi(Ne.fill);const Te=r.focus=wl({},e.focus||{alpha:.3},Ae.focus),$e=Te.prox>=0,Pe=$e&&Ne.one;let De=[],Oe=[],Le=[];function Re(e,t){let n=Ne.show(r,t);if(n)return ii(n,"u-cursor-pt"),ii(n,e.class),hi(n,-10,-10,ae,ie),m.insertBefore(n,De[t]),n}function ze(e,t){if(1==o||t>0){let t=1==o&&x[e.scale].time,n=e.value;e.value=t?ml(n)?ls(O,is(n,L)):n||I:n||Ps,e.label=e.label||(t?"Time":"Value")}if(Pe||t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||_c||Ji,e.fillTo=Zi(e.fillTo||Ys),e.pxAlign=+Ni(e.pxAlign,_),e.pxRound=Zs(e.pxAlign),e.stroke=Zi(e.stroke||null),e.fill=Zi(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;let t=il((3+2*(Fi(1,e.width)||1))*1,3),n=e.points=wl({},{size:t,width:Fi(1,.2*t),stroke:e.stroke,space:2*t,paths:gc,_stroke:null,_fill:null},e.points);n.show=Zi(n.show),n.filter=Zi(n.filter),n.fill=Zi(n.fill),n.stroke=Zi(n.stroke),n.paths=Zi(n.paths),n.pxAlign=e.pxAlign}if(H){let n=function(e,t){if(0==t&&(Z||!F.live||2==o))return hl;let n=[],a=ci("tr","u-series",Y,Y.childNodes[t]);ii(a,e.class),e.show||ii(a,La);let i=ci("th",null,a);if(V.show){let e=ui("u-marker",i);if(t>0){let n=V.width(r,t);n&&(e.style.border=n+"px "+V.dash(r,t)+" "+V.stroke(r,t)),e.style.background=V.fill(r,t)}}let l=ui(Ra,i);for(var s in l.textContent=e.label,t>0&&(V.show||(l.style.color=e.width>0?V.stroke(r,t):V.fill(r,t)),te("click",i,(t=>{if(Ae._lock)return;Me(t);let n=y.indexOf(e);if((t.ctrlKey||t.metaKey)!=F.isolate){let e=y.some(((e,t)=>t>0&&t!=n&&e.show));y.forEach(((t,r)=>{r>0&&qt(r,e?r==n?J:X:J,!0,Cn.setSeries)}))}else qt(n,{show:!e.show},!0,Cn.setSeries)}),!1),$e&&te(Ka,i,(t=>{Ae._lock||(Me(t),qt(y.indexOf(e),Qt,!0,Cn.setSeries))}),!1)),W){let e=ci("td","u-value",a);e.textContent="--",n.push(e)}return[a,n]}(e,t);q.splice(t,0,n[0]),K.splice(t,0,n[1]),F.values.push(null)}if(Ae.show){j.splice(t,0,null);let n=null;Pe?0==t&&(n=Re(e,t)):t>0&&(n=Re(e,t)),De.splice(t,0,n),Oe.splice(t,0,0),Le.splice(t,0,0)}xn("addSeries",t)}r.addSeries=function(e,t){t=null==t?y.length:t,e=1==o?yc(e,t,bs,zs):yc(e,t,{},Rs),y.splice(t,0,e),ze(y[t],t)},r.delSeries=function(e){if(y.splice(e,1),H){F.values.splice(e,1),K.splice(e,1);let t=q.splice(e,1)[0];ne(null,t.firstChild),t.remove()}Ae.show&&(j.splice(e,1),De.splice(e,1)[0].remove(),Oe.splice(e,1),Le.splice(e,1)),xn("delSeries",e)};const Ie=[!1,!1,!1,!1];function je(e,t,n,r){let[o,a,i,l]=n,s=t%2,c=0;return 0==s&&(l||a)&&(c=0==t&&!o||2==t&&!i?zi(ys.size/3):0),1==s&&(o||i)&&(c=1==t&&!a||3==t&&!l?zi(Ds.size/2):0),c}const Fe=r.padding=(e.padding||[je,je,je,je]).map((e=>Zi(Ni(e,je)))),He=r._padding=Fe.map(((e,t)=>e(r,t,Ie,0)));let Ve,Be=null,Ue=null;const Ye=1==o?y[0].idxs:null;let We,qe,Ke,Ze,Ge,Qe,Je,Xe,et,tt,nt=null,rt=!1;function ot(e,n){if(t=null==e?[]:e,r.data=r._data=t,2==o){Ve=0;for(let e=1;e=0,ke=!0,Rt()}}function at(){let e,n;rt=!0,1==o&&(Ve>0?(Be=Ye[0]=0,Ue=Ye[1]=Ve-1,e=t[0][Be],n=t[0][Ue],2==T?(e=Be,n=Ue):e==n&&(3==T?[e,n]=xi(e,e,N.log,!1):4==T?[e,n]=Si(e,e,N.log,!1):N.time?n=e+zi(86400/v):[e,n]=Mi(e,n,.1,!0))):(Be=Ye[0]=e=null,Ue=Ye[1]=n=null)),Wt(C,e,n)}function it(e,t,n,r,o,a){e??=Ua,n??=dl,r??="butt",o??=Ua,a??="round",e!=We&&(h.strokeStyle=We=e),o!=qe&&(h.fillStyle=qe=o),t!=Ke&&(h.lineWidth=Ke=t),a!=Ge&&(h.lineJoin=Ge=a),r!=Qe&&(h.lineCap=Qe=r),n!=Ze&&h.setLineDash(Ze=n)}function lt(e,t,n,r){t!=qe&&(h.fillStyle=qe=t),e!=Je&&(h.font=Je=e),n!=Xe&&(h.textAlign=Xe=n),r!=et&&(h.textBaseline=et=r)}function st(e,t,n,o){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(o.length>0&&e.auto(r,rt)&&(null==t||null==t.min)){let t=Ni(Be,0),r=Ni(Ue,o.length-1),i=null==n.min?3==e.distr?function(e,t,n){let r=Wi,o=-Wi;for(let a=t;a<=n;a++){let t=e[a];null!=t&&t>0&&(to&&(o=t))}return[r,o]}(o,t,r):function(e,t,n,r){let o=Wi,a=-Wi;if(1==r)o=e[t],a=e[n];else if(-1==r)o=e[n],a=e[t];else for(let i=t;i<=n;i++){let t=e[i];null!=t&&(ta&&(a=t))}return[o,a]}(o,t,r,a):[n.min,n.max];e.min=ji(e.min,n.min=i[0]),e.max=Fi(e.max,n.max=i[1])}}r.setData=ot;const ct={min:null,max:null};function ut(e,t){let n=t?y[e].points:y[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function dt(e,n){let o=n?y[e].points:y[e],{stroke:a,fill:i,clip:l,flags:s,_stroke:c=o._stroke,_fill:u=o._fill,_width:d=o.width}=o._paths;d=il(d*oi,3);let p=null,f=d%2/2;n&&null==u&&(u=d>0?"#fff":c);let m=1==o.pxAlign&&f>0;if(m&&h.translate(f,f),!n){let e=pe-d/2,t=fe-d/2,n=me+d,r=_e+d;p=new Path2D,p.rect(e,t,n,r)}n?pt(c,d,o.dash,o.cap,u,a,i,s,l):function(e,n,o,a,i,l,s,c,u,d,h){let p=!1;0!=u&&S.forEach(((f,m)=>{if(f.series[0]==e){let e,_=y[f.series[1]],g=t[f.series[1]],v=(_._paths||ul).band;pl(v)&&(v=1==f.dir?v[0]:v[1]);let b=null;_.show&&v&&function(e,t,n){for(t=Ni(t,0),n=Ni(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,Be,Ue)?(b=f.fill(r,m)||l,e=_._paths.clip):v=null,pt(n,o,a,i,b,s,c,u,d,h,e,v),p=!0}})),p||pt(n,o,a,i,l,s,c,u,d,h)}(e,c,d,o.dash,o.cap,u,a,i,s,p,l),m&&h.translate(-f,-f)}const ht=3;function pt(e,t,n,r,o,a,i,l,s,c,u,d){it(e,t,n,r,o),(s||c||d)&&(h.save(),s&&h.clip(s),c&&h.clip(c)),d?(l&ht)==ht?(h.clip(d),u&&h.clip(u),mt(o,i),ft(e,a,t)):2&l?(mt(o,i),h.clip(d),ft(e,a,t)):1&l&&(h.save(),h.clip(d),u&&h.clip(u),mt(o,i),h.restore(),ft(e,a,t)):(mt(o,i),ft(e,a,t)),(s||c||d)&&h.restore()}function ft(e,t,n){n>0&&(t instanceof Map?t.forEach(((e,t)=>{h.strokeStyle=We=t,h.stroke(e)})):null!=t&&e&&h.stroke(t))}function mt(e,t){t instanceof Map?t.forEach(((e,t)=>{h.fillStyle=qe=t,h.fill(e)})):null!=t&&e&&h.fill(t)}function _t(e,t,n,r,o,a,i,l,s,c){let u=i%2/2;1==_&&h.translate(u,u),it(l,i,s,c,l),h.beginPath();let d,p,f,m,g=o+(0==r||3==r?-a:a);0==n?(p=o,m=g):(d=o,f=g);for(let _=0;_{if(!n.show)return;let a=x[n.scale];if(null==a.min)return void(n._show&&(t=!1,n._show=!1,yt(!1)));n._show||(t=!1,n._show=!0,yt(!1));let i=n.side,l=i%2,{min:s,max:c}=a,[u,d]=function(e,t,n,o){let a,i=k[e];if(o<=0)a=[0,0];else{let l=i._space=i.space(r,e,t,n,o);a=Ec(t,n,i._incrs=i.incrs(r,e,t,n,o,l),o,l)}return i._found=a}(o,s,c,0==l?ae:ie);if(0==d)return;let h=2==a.distr,p=n._splits=n.splits(r,o,s,c,u,d,h),f=2==a.distr?p.map((e=>nt[e])):p,m=2==a.distr?nt[p[1]]-nt[p[0]]:u,_=n._values=n.values(r,n.filter(r,f,o,d,m),o,d,m);n._rotate=2==i?n.rotate(r,_,o,d):0;let g=n._size;n._size=Ii(n.size(r,_,o,e)),null!=g&&n._size!=g&&(t=!1)})),t}function vt(e){let t=!0;return Fe.forEach(((n,o)=>{let a=n(r,o,Ie,e);a!=He[o]&&(t=!1),He[o]=a})),t}function yt(e){y.forEach(((t,n)=>{n>0&&(t._paths=null,e&&(1==o?(t.min=null,t.max=null):t.facets.forEach((e=>{e.min=null,e.max=null}))))}))}let bt,wt,kt,xt,St,Ct,At,Et,Mt,Nt,Tt,$t,Pt=!1,Dt=!1,Ot=[];function Lt(){Dt=!1;for(let e=0;e0){y.forEach(((n,a)=>{if(1==o){let o=n.scale,i=D[o];if(null==i)return;let l=e[o];if(0==a){let e=l.range(r,l.min,l.max,o);l.min=e[0],l.max=e[1],Be=wi(l.min,t[0]),Ue=wi(l.max,t[0]),Ue-Be>1&&(t[0][Be]l.max&&Ue--),n.min=nt[Be],n.max=nt[Ue]}else n.show&&n.auto&&st(l,i,n,t[a],n.sorted);n.idxs[0]=Be,n.idxs[1]=Ue}else if(a>0&&n.show&&n.auto){let[r,o]=n.facets,i=r.scale,l=o.scale,[s,c]=t[a],u=e[i],d=e[l];null!=u&&st(u,D[i],r,s,r.sorted),null!=d&&st(d,D[l],o,c,o.sorted),n.min=o.min,n.max=o.max}}));for(let t in e){let n=e[t],o=D[t];if(null==n.from&&(null==o||null==o.min)){let e=n.range(r,n.min==Wi?null:n.min,n.max==-Wi?null:n.max,t);n.min=e[0],n.max=e[1]}}}for(let t in e){let n=e[t];if(null!=n.from){let o=e[n.from];if(null==o.min)n.min=n.max=null;else{let e=n.range(r,o.min,o.max,t);n.min=e[0],n.max=e[1]}}}let n={},a=!1;for(let t in e){let r=e[t],o=x[t];if(o.min!=r.min||o.max!=r.max){o.min=r.min,o.max=r.max;let e=o.distr;o._min=3==e?Bi(o.min):4==e?Yi(o.min,o.asinh):100==e?o.fwd(o.min):o.min,o._max=3==e?Bi(o.max):4==e?Yi(o.max,o.asinh):100==e?o.fwd(o.max):o.max,n[t]=a=!0}}if(a){y.forEach(((e,t)=>{2==o?t>0&&n.y&&(e._paths=null):n[e.scale]&&(e._paths=null)}));for(let e in n)ye=!0,xn("setScale",e);Ae.show&&Ae.left>=0&&(be=ke=!0)}for(let t in D)D[t]=null}(),ge=!1),ye&&(!function(){let e=!1,t=0;for(;!e;){t++;let n=gt(t),o=vt(t);e=t==Ce||n&&o,e||(Se(r.width,r.height),ve=!0)}}(),ye=!1),ve){if(si(f,Ha,le),si(f,ja,se),si(f,za,ae),si(f,Ia,ie),si(m,Ha,le),si(m,ja,se),si(m,za,ae),si(m,Ia,ie),si(p,za,re),si(p,Ia,oe),d.width=zi(re*oi),d.height=zi(oe*oi),k.forEach((e=>{let{_el:t,_show:n,_size:r,_pos:o,side:a}=e;if(null!=t)if(n){let e=a%2==1;si(t,e?"left":"top",o-(3===a||0===a?r:0)),si(t,e?"width":"height",r),si(t,e?"top":"left",e?se:le),si(t,e?"height":"width",e?ie:ae),li(t,La)}else ii(t,La)})),We=qe=Ke=Ge=Qe=Je=Xe=et=Ze=null,tt=1,sn(!0),le!=ce||se!=ue||ae!=de||ie!=he){yt(!1);let e=ae/de,t=ie/he;if(Ae.show&&!be&&Ae.left>=0){Ae.left*=e,Ae.top*=t,kt&&hi(kt,zi(Ae.left),0,ae,ie),xt&&hi(xt,0,zi(Ae.top),ae,ie);for(let n=0;n=0&&Bt.width>0){Bt.left*=e,Bt.width*=e,Bt.top*=t,Bt.height*=t;for(let e in dn)si(Ut,e,Bt[e])}ce=le,ue=se,de=ae,he=ie}xn("setSize"),ve=!1}re>0&&oe>0&&(h.clearRect(0,0,d.width,d.height),xn("drawClear"),E.forEach((e=>e())),xn("draw")),Bt.show&&we&&(Yt(Bt),we=!1),Ae.show&&be&&(an(null,!0,!1),be=!1),F.show&&F.live&&ke&&(rn(),ke=!1),c||(c=!0,r.status=1,xn("ready")),rt=!1,Pt=!1}function It(e,n){let o=x[e];if(null==o.from){if(0==Ve){let t=o.range(r,n.min,n.max,e);n.min=t[0],n.max=t[1]}if(n.min>n.max){let e=n.min;n.min=n.max,n.max=e}if(Ve>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==C&&2==o.distr&&Ve>0&&(n.min=wi(n.min,t[0]),n.max=wi(n.max,t[0]),n.min==n.max&&n.max++),D[e]=n,ge=!0,Rt()}}r.batch=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Pt=!0,Dt=t,e(r),zt(),t&&Ot.length>0&&queueMicrotask(Lt)},r.redraw=(e,t)=>{ye=t||!1,!1!==e?Wt(C,N.min,N.max):Rt()},r.setScale=It;let jt=!1;const Ft=Ae.drag;let Ht=Ft.x,Vt=Ft.y;Ae.show&&(Ae.x&&(bt=ui("u-cursor-x",m)),Ae.y&&(wt=ui("u-cursor-y",m)),0==N.ori?(kt=bt,xt=wt):(kt=wt,xt=bt),Tt=Ae.left,$t=Ae.top);const Bt=r.select=wl({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Ut=Bt.show?ui("u-select",Bt.over?m:f):null;function Yt(e,t){if(Bt.show){for(let t in e)Bt[t]=e[t],t in dn&&si(Ut,t,e[t]);!1!==t&&xn("setSelect")}}function Wt(e,t,n){It(e,{min:t,max:n})}function qt(e,t,n,a){null!=t.focus&&function(e){if(e!=Gt){let t=null==e,n=1!=Te.alpha;y.forEach(((r,a)=>{if(1==o||a>0){let o=t||0==a||a==e;r._focus=t?null:o,n&&function(e,t){y[e].alpha=t,Ae.show&&De[e]&&(De[e].style.opacity=t);H&&q[e]&&(q[e].style.opacity=t)}(a,o?1:Te.alpha)}})),Gt=e,n&&Rt()}}(e),null!=t.show&&y.forEach(((n,r)=>{r>0&&(e==r||null==e)&&(n.show=t.show,function(e){let t=y[e],n=H?q[e]:null;t.show?n&&li(n,La):(n&&ii(n,La),hi(Pe?De[0]:De[e],-10,-10,ae,ie))}(r,t.show),2==o?(Wt(n.facets[0].scale,null,null),Wt(n.facets[1].scale,null,null)):Wt(n.scale,null,null),Rt())})),!1!==n&&xn("setSeries",e,t),a&&Mn("setSeries",r,e,t)}let Kt,Zt,Gt;r.setSelect=Yt,r.setSeries=qt,r.addBand=function(e,t){e.fill=Zi(e.fill||null),e.dir=Ni(e.dir,-1),t=null==t?S.length:t,S.splice(t,0,e)},r.setBand=function(e,t){wl(S[e],t)},r.delBand=function(e){null==e?S.length=0:S.splice(e,1)};const Qt={focus:!0};function Jt(e,t,n){let r=x[t];n&&(e=e/oi-(1==r.ori?se:le));let o=ae;1==r.ori&&(o=ie,e=o-e),-1==r.dir&&(e=o-e);let a=r._min,i=a+(r._max-a)*(e/o),l=r.distr;return 3==l?Hi(10,i):4==l?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Di.sinh(e)*t}(i,r.asinh):100==l?r.bwd(i):i}function Xt(e,t){si(Ut,Ha,Bt.left=e),si(Ut,za,Bt.width=t)}function en(e,t){si(Ut,ja,Bt.top=e),si(Ut,Ia,Bt.height=t)}H&&$e&&te(Za,B,(e=>{Ae._lock||(Me(e),null!=Gt&&qt(null,Qt,!0,Cn.setSeries))})),r.valToIdx=e=>wi(e,t[0]),r.posToIdx=function(e,n){return wi(Jt(e,C,n),t[0],Be,Ue)},r.posToVal=Jt,r.valToPos=(e,t,n)=>0==x[t].ori?i(e,x[t],n?me:ae,n?pe:0):l(e,x[t],n?_e:ie,n?fe:0),r.setCursor=(e,t,n)=>{Tt=e.left,$t=e.top,an(null,t,n)};let tn=0==N.ori?Xt:en,nn=1==N.ori?Xt:en;function rn(e,t){if(null!=e&&(e.idxs?e.idxs.forEach(((e,t)=>{j[t]=e})):void 0!==e.idx&&j.fill(e.idx),F.idx=j[0]),H&&F.live){for(let e=0;e0||1==o&&!Z)&&on(e,j[e]);!function(){if(H&&F.live)for(let e=2==o?1:0;eUe;Kt=Wi,Zt=null;let s=0==N.ori?ae:ie,c=1==N.ori?ae:ie;if(Tt<0||0==Ve||l){i=Ae.idx=null;for(let e=0;e0&&e.show){let t=null==w?-10:P(w,1==o?x[e.scale]:x[e.facets[1].scale],c,0);if($e&&null!=w){let n=1==N.ori?Tt:$t,o=Li(Te.dist(r,_,b,t,n));if(o=0?1:-1;a==(w>=0?1:-1)&&(1==a?1==t?w>=r:w<=r:1==t?w<=r:w>=r)&&(Kt=o,Zt=_)}else Kt=o,Zt=_}}if(ke||Pe){let e,n;0==N.ori?(e=k,n=t):(e=t,n=k);let o,a,i,s,c,g,v=!0,y=Ne.bbox;if(null!=y){v=!1;let e=y(r,_);i=e.left,s=e.top,o=e.width,a=e.height}else i=e,s=n,o=a=Ne.size(r,_);if(g=Ne.fill(r,_),c=Ne.stroke(r,_),Pe)_==Zt&&Kt<=Te.prox&&(l=i,u=s,d=o,h=a,p=v,f=g,m=c);else{let e=De[_];null!=e&&(Oe[_]=i,Le[_]=s,_i(e,o,a,v),fi(e,g,c),hi(e,Ii(i),Ii(s),ae,ie))}}}}if(Pe){let e=Te.prox;if(ke||(null==Gt?Kt<=e:Kt>e||Zt!=Gt)){let e=De[0];Oe[0]=l,Le[0]=u,_i(e,d,h,p),fi(e,f,m),hi(e,Ii(l),Ii(u),ae,ie)}}}if(Bt.show&&jt)if(null!=e){let[t,n]=Cn.scales,[r,o]=Cn.match,[a,i]=e.cursor.sync.scales,l=e.cursor.drag;if(Ht=l._x,Vt=l._y,Ht||Vt){let l,u,d,h,p,{left:f,top:m,width:_,height:g}=e.select,v=e.scales[a].ori,y=e.posToVal,b=null!=t&&r(t,a),w=null!=n&&o(n,i);b&&Ht?(0==v?(l=f,u=_):(l=m,u=g),d=x[t],h=$(y(l,a),d,s,0),p=$(y(l+u,a),d,s,0),tn(ji(h,p),Li(p-h))):tn(0,s),w&&Vt?(1==v?(l=f,u=_):(l=m,u=g),d=x[n],h=P(y(l,i),d,c,0),p=P(y(l+u,i),d,c,0),nn(ji(h,p),Li(p-h))):nn(0,c)}else hn()}else{let e=Li(Mt-St),t=Li(Nt-Ct);if(1==N.ori){let n=e;e=t,t=n}Ht=Ft.x&&e>=Ft.dist,Vt=Ft.y&&t>=Ft.dist;let n,r,o=Ft.uni;null!=o?Ht&&Vt&&(Ht=e>=o,Vt=t>=o,Ht||Vt||(t>e?Vt=!0:Ht=!0)):Ft.x&&Ft.y&&(Ht||Vt)&&(Ht=Vt=!0),Ht&&(0==N.ori?(n=At,r=Tt):(n=Et,r=$t),tn(ji(n,r),Li(r-n)),Vt||nn(0,c)),Vt&&(1==N.ori?(n=At,r=Tt):(n=Et,r=$t),nn(ji(n,r),Li(r-n)),Ht||tn(0,s)),Ht||Vt||(tn(0,0),nn(0,0))}if(Ft._x=Ht,Ft._y=Vt,null==e){if(a){if(null!=An){let[e,t]=Cn.scales;Cn.values[0]=null!=e?Jt(0==N.ori?Tt:$t,e):null,Cn.values[1]=null!=t?Jt(1==N.ori?Tt:$t,t):null}Mn(Ya,r,Tt,$t,ae,ie,i)}if($e){let e=a&&Cn.setSeries,t=Te.prox;null==Gt?Kt<=t&&qt(Zt,Qt,!0,e):Kt>t?qt(null,Qt,!0,e):Zt!=Gt&&qt(Zt,Qt,!0,e)}}ke&&(F.idx=i,rn()),!1!==n&&xn("setCursor")}r.setLegend=rn;let ln=null;function sn(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?ln=null:(ln=m.getBoundingClientRect(),xn("syncRect",ln))}function cn(e,t,n,r,o,a,i){Ae._lock||jt&&null!=e&&0==e.movementX&&0==e.movementY||(un(e,t,n,r,o,a,i,!1,null!=e),null!=e?an(null,!0,!0):an(t,!0,!1))}function un(e,t,n,o,a,i,l,c,u){if(null==ln&&sn(!1),Me(e),null!=e)n=e.clientX-ln.left,o=e.clientY-ln.top;else{if(n<0||o<0)return Tt=-10,void($t=-10);let[e,r]=Cn.scales,l=t.cursor.sync,[c,u]=l.values,[d,h]=l.scales,[p,f]=Cn.match,m=t.axes[0].side%2==1,_=0==N.ori?ae:ie,g=1==N.ori?ae:ie,v=m?i:a,y=m?a:i,b=m?o:n,w=m?n:o;if(n=null!=d?p(e,d)?s(c,x[e],_,0):-10:_*(b/v),o=null!=h?f(r,h)?s(u,x[r],g,0):-10:g*(w/y),1==N.ori){let e=n;n=o,o=e}}u&&((n<=1||n>=ae-1)&&(n=rl(n,ae)),(o<=1||o>=ie-1)&&(o=rl(o,ie))),c?(St=n,Ct=o,[At,Et]=Ae.move(r,n,o)):(Tt=n,$t=o)}Object.defineProperty(r,"rect",{get:()=>(null==ln&&sn(!1),ln)});const dn={width:0,height:0,left:0,top:0};function hn(){Yt(dn,!1)}let pn,fn,mn,_n;function gn(e,t,n,o,a,i,l){jt=!0,Ht=Vt=Ft._x=Ft._y=!1,un(e,t,n,o,a,i,0,!0,!1),null!=e&&(te(qa,ti,vn,!1),Mn(Wa,r,At,Et,ae,ie,null));let{left:s,top:c,width:u,height:d}=Bt;pn=s,fn=c,mn=u,_n=d,hn()}function vn(e,t,n,o,a,i,l){jt=Ft._x=Ft._y=!1,un(e,t,n,o,a,i,0,!1,!0);let{left:s,top:c,width:u,height:d}=Bt,h=u>0||d>0,p=pn!=s||fn!=c||mn!=u||_n!=d;if(h&&p&&Yt(Bt),Ft.setScale&&h&&p){let e=s,t=u,n=c,r=d;if(1==N.ori&&(e=c,t=d,n=s,r=u),Ht&&Wt(C,Jt(e,C),Jt(e+t,C)),Vt)for(let o in x){let e=x[o];o!=C&&null==e.from&&e.min!=Wi&&Wt(o,Jt(n+r,o),Jt(n,o))}hn()}else Ae.lock&&(Ae._lock=!Ae._lock,an(null,!0,!1));null!=e&&(ne(qa,ti),Mn(qa,r,Tt,$t,ae,ie,null))}function yn(e,t,n,o,a,i,l){Ae._lock||(Me(e),at(),hn(),null!=e&&Mn(Ga,r,Tt,$t,ae,ie,null))}function bn(){k.forEach(Nc),xe(r.width,r.height,!0)}yi(Ja,ni,bn);const wn={};wn.mousedown=gn,wn.mousemove=cn,wn.mouseup=vn,wn.dblclick=yn,wn.setSeries=(e,t,n,o)=>{-1!=(n=(0,Cn.match[2])(r,t,n))&&qt(n,o,!0,!1)},Ae.show&&(te(Wa,m,gn),te(Ya,m,cn),te(Ka,m,(e=>{Me(e),sn(!1)})),te(Za,m,(function(e,t,n,r,o,a,i){if(Ae._lock)return;Me(e);let l=jt;if(jt){let e,t,n=!0,r=!0,o=10;0==N.ori?(e=Ht,t=Vt):(e=Vt,t=Ht),e&&t&&(n=Tt<=o||Tt>=ae-o,r=$t<=o||$t>=ie-o),e&&n&&(Tt=Tt{e.call(null,r,t,n)}))}(e.plugins||[]).forEach((e=>{for(let t in e.hooks)kn[t]=(kn[t]||[]).concat(e.hooks[t])}));const Sn=(e,t,n)=>n,Cn=wl({key:null,setSeries:!1,filters:{pub:Xi,sub:Xi},scales:[C,y[1]?y[1].scale:null],match:[el,el,Sn],values:[null,null]},Ae.sync);2==Cn.match.length&&Cn.match.push(Sn),Ae.sync=Cn;const An=Cn.key,En=Vs(An);function Mn(e,t,n,r,o,a,i){Cn.filters.pub(e,t,n,r,o,a,i)&&En.pub(e,t,n,r,o,a,i)}function Nn(){xn("init",e,t),ot(t||e.data,!1),D[C]?It(C,D[C]):at(),we=Bt.show&&(Bt.width>0||Bt.height>0),be=ke=!0,xe(e.width,e.height)}return En.sub(r),r.pub=function(e,t,n,r,o,a,i){Cn.filters.sub(e,t,n,r,o,a,i)&&wn[e](null,t,n,r,o,a,i)},r.destroy=function(){En.unsub(r),fc.delete(r),ee.clear(),bi(Ja,ni,bn),u.remove(),B?.remove(),xn("destroy")},y.forEach(ze),k.forEach((function(e,t){if(e._show=e.show,e.show){let n=e.side%2,o=x[e.scale];null==o&&(e.scale=n?y[1].scale:C,o=x[e.scale]);let a=o.time;e.size=Zi(e.size),e.space=Zi(e.space),e.rotate=Zi(e.rotate),pl(e.incrs)&&e.incrs.forEach((e=>{!ll.has(e)&&ll.set(e,sl(e))})),e.incrs=Zi(e.incrs||(2==o.distr?Il:a?1==v?Ql:es:jl)),e.splits=Zi(e.splits||(a&&1==o.distr?R:3==o.distr?xs:4==o.distr?Ss:ks)),e.stroke=Zi(e.stroke),e.grid.stroke=Zi(e.grid.stroke),e.ticks.stroke=Zi(e.ticks.stroke),e.border.stroke=Zi(e.border.stroke);let i=e.values;e.values=pl(i)&&!pl(i[0])?Zi(i):a?pl(i)?os(O,rs(i,L)):ml(i)?function(e,t){let n=Pl(t);return(t,r,o,a,i)=>r.map((t=>n(e(t))))}(O,i):i||z:i||ws,e.filter=Zi(e.filter||(o.distr>=3&&10==o.log?Ts:3==o.distr&&2==o.log?$s:Qi)),e.font=Mc(e.font),e.labelFont=Mc(e.labelFont),e._size=e.size(r,null,t,0),e._space=e._rotate=e._incrs=e._found=e._splits=e._values=null,e._size>0&&(Ie[t]=!0,e._el=ui("u-axis",p))}})),n?n instanceof HTMLElement?(n.appendChild(u),Nn()):n(r,Nn):Nn(),r}Tc.assign=wl,Tc.fmtNum=Pi,Tc.rangeNum=Mi,Tc.rangeLog=xi,Tc.rangeAsinh=Si,Tc.orient=Bs,Tc.pxRatio=oi,Tc.join=function(e,t){if(function(e){let t=e[0][0],n=t.length;for(let r=1;r1&&void 0!==arguments[1]?arguments[1]:100;const n=e.length;if(n<=1)return!0;let r=0,o=n-1;for(;r<=o&&null==e[r];)r++;for(;o>=r&&null==e[o];)o--;if(o<=r)return!0;const a=Fi(1,Ri((o-r+1)/t));for(let i=e[r],l=r+a;l<=o;l+=a){const t=e[l];if(null!=t){if(t<=i)return!1;i=t}}return!0}(t[0])||(t=function(e){let t=e[0],n=t.length,r=Array(n);for(let a=0;at[e]-t[n]));let o=[];for(let a=0;ae-t))],o=r[0].length,a=new Map;for(let i=0;iBs(e,a,((s,c,u,d,h,p,f,m,_,g,v)=>{let y=s.pxRound,{left:b,width:w}=e.bbox,k=e=>y(p(e,d,g,m)),x=e=>y(f(e,h,v,_)),S=0==d.ori?Xs:ec;const C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},A=C.stroke,E=d.dir*(0==d.ori?1:-1);i=ki(u,i,l,1),l=ki(u,i,l,-1);let M=x(u[1==E?i:l]),N=k(c[1==E?i:l]),T=N,$=N;o&&-1==t&&($=b,S(A,$,M)),S(A,N,M);for(let e=1==E?i:l;e>=i&&e<=l;e+=E){let n=u[e];if(null==n)continue;let r=k(c[e]),o=x(n);1==t?S(A,r,M):S(A,T,o),S(A,r,o),M=o,T=r}let P=T;o&&1==t&&(P=b+w,S(A,P,M));let[D,O]=Us(e,a);if(null!=s.fill||0!=D){let t=C.fill=new Path2D(A),n=x(s.fillTo(e,a,s.min,s.max,D));S(t,P,n),S(t,$,n)}if(!s.spanGaps){let o=[];o.push(...Ks(c,u,i,l,E,k,r));let h=s.width*oi/2,p=n||1==t?h:-h,f=n||-1==t?-h:h;o.forEach((e=>{e[0]+=p,e[1]+=f})),C.gaps=o=s.gaps(e,a,i,l,o),C.clip=qs(o,d.ori,m,_,g,v)}return 0!=O&&(C.band=2==O?[Ws(e,a,i,l,A,-1),Ws(e,a,i,l,A,1)]:Ws(e,a,i,l,A,O)),C}))},e.bars=function(e){const t=Ni((e=e||ul).size,[.6,Wi,1]),n=e.align||0,r=e.gap||0;let o=e.radius;o=null==o?[0,0]:"number"==typeof o?[o,0]:o;const a=Zi(o),i=1-t[0],l=Ni(t[1],Wi),s=Ni(t[2],1),c=Ni(e.disp,ul),u=Ni(e.each,(e=>{})),{fill:d,stroke:h}=c;return(e,t,o,p)=>Bs(e,t,((f,m,_,g,v,y,b,w,k,x,S)=>{let C,A,E=f.pxRound,M=n,N=r*oi,T=l*oi,$=s*oi;0==g.ori?[C,A]=a(e,t):[A,C]=a(e,t);const P=g.dir*(0==g.ori?1:-1);let D,O,L,R=0==g.ori?tc:nc,z=0==g.ori?u:(e,t,n,r,o,a,i)=>{u(e,t,n,o,r,i,a)},I=Ni(e.bands,dl).find((e=>e.series[0]==t)),j=null!=I?I.dir:0,F=f.fillTo(e,t,f.min,f.max,j),H=E(b(F,v,S,k)),V=x,B=E(f.width*oi),U=!1,Y=null,W=null,q=null,K=null;null==d||0!=B&&null==h||(U=!0,Y=d.values(e,t,o,p),W=new Map,new Set(Y).forEach((e=>{null!=e&&W.set(e,new Path2D)})),B>0&&(q=h.values(e,t,o,p),K=new Map,new Set(q).forEach((e=>{null!=e&&K.set(e,new Path2D)}))));let{x0:Z,size:G}=c;if(null!=Z&&null!=G){M=1,m=Z.values(e,t,o,p),2==Z.unit&&(m=m.map((t=>e.posToVal(w+t*x,g.key,!0))));let n=G.values(e,t,o,p);O=2==G.unit?n[0]*x:y(n[0],g,x,w)-y(0,g,x,w),V=hc(m,_,y,g,x,w,V),L=V-O+N}else V=hc(m,_,y,g,x,w,V),L=V*i+N,O=V-L;L<1&&(L=0),B>=O/2&&(B=0),L<5&&(E=Gi);let Q=L>0;O=E(Ki(V-L-(Q?B:0),$,T)),D=(0==M?O/2:M==P?0:O)-M*P*((0==M?N/2:0)+(Q?B/2:0));const J={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},X=U?null:new Path2D;let ee=null;if(null!=I)ee=e.data[I.series[1]];else{let{y0:n,y1:r}=c;null!=n&&null!=r&&(_=r.values(e,t,o,p),ee=n.values(e,t,o,p))}let te=C*O,ne=A*O;for(let n=1==P?o:p;n>=o&&n<=p;n+=P){let r=_[n];if(null==r)continue;if(null!=ee){var re;let e=null!==(re=ee[n])&&void 0!==re?re:0;if(r-e==0)continue;H=b(e,v,S,k)}let o=y(2!=g.distr||null!=c?m[n]:n,g,x,w),a=b(Ni(r,F),v,S,k),i=E(o-D),l=E(Fi(a,H)),s=E(ji(a,H)),u=l-s;if(null!=r){let o=r<0?ne:te,a=r<0?te:ne;U?(B>0&&null!=q[n]&&R(K.get(q[n]),i,s+Ri(B/2),O,Fi(0,u-B),o,a),null!=Y[n]&&R(W.get(Y[n]),i,s+Ri(B/2),O,Fi(0,u-B),o,a)):R(X,i,s+Ri(B/2),O,Fi(0,u-B),o,a),z(e,t,n,i-B/2,s,O+B,u)}}if(B>0)J.stroke=U?K:X;else if(!U){var oe;J._fill=0==f.width?f._fill:null!==(oe=f._stroke)&&void 0!==oe?oe:f._fill,J.width=0}return J.fill=U?W:X,J}))},e.spline=function(e){return function(e,t){const n=Ni(t?.alignGaps,0);return(t,r,o,a)=>Bs(t,r,((i,l,s,c,u,d,h,p,f,m,_)=>{let g,v,y,b=i.pxRound,w=e=>b(d(e,c,m,p)),k=e=>b(h(e,u,_,f));0==c.ori?(g=Qs,y=Xs,v=ac):(g=Js,y=ec,v=ic);const x=c.dir*(0==c.ori?1:-1);o=ki(s,o,a,1),a=ki(s,o,a,-1);let S=w(l[1==x?o:a]),C=S,A=[],E=[];for(let e=1==x?o:a;e>=o&&e<=a;e+=x)if(null!=s[e]){let t=w(l[e]);A.push(C=t),E.push(k(s[e]))}const M={stroke:e(A,E,g,y,v,b),fill:null,clip:null,band:null,gaps:null,flags:1},N=M.stroke;let[T,$]=Us(t,r);if(null!=i.fill||0!=T){let e=M.fill=new Path2D(N),n=k(i.fillTo(t,r,i.min,i.max,T));y(e,C,n),y(e,S,n)}if(!i.spanGaps){let e=[];e.push(...Ks(l,s,o,a,x,w,n)),M.gaps=e=i.gaps(t,r,o,a,e),M.clip=qs(e,c.ori,p,f,m,_)}return 0!=$&&(M.band=2==$?[Ws(t,r,o,a,N,-1),Ws(t,r,o,a,N,1)]:Ws(t,r,o,a,N,$)),M}))}(pc,e)}}const $c=(e,t,n)=>{if(void 0===e||null===e)return"";n=n||0,t=t||0;const r=Math.abs(n-t);if(isNaN(r)||0==r)return Math.abs(e)>=1e3?e.toLocaleString("en-US"):e.toString();let o=3+Math.floor(1+Math.log10(Math.max(Math.abs(t),Math.abs(n)))-Math.log10(r));return(isNaN(o)||o>20)&&(o=20),e.toLocaleString("en-US",{minimumSignificantDigits:1,maximumSignificantDigits:o})},Pc=[[31536e3,"{YYYY}",null,null,null,null,null,null,1],[2419200,"{MMM}","\n{YYYY}",null,null,null,null,null,1],[86400,"{MM}-{DD}","\n{YYYY}",null,null,null,null,null,1],[3600,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[60,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[1,"{HH}:{mm}:{ss}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD} {HH}:{mm}",null,null,null,1],[.001,":{ss}.{fff}","\n{YYYY}-{MM}-{DD} {HH}:{mm}",null,"\n{MM}-{DD} {HH}:{mm}",null,"\n{HH}:{mm}",null,1]],Dc=(e,t)=>Array.from(new Set(e.map((e=>e.scale)))).map((e=>{const n="10px Arial",r=it("color-text"),o={scale:e,show:!0,size:Oc,stroke:r,font:n,values:(e,n)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=t[0],o=t[t.length-1];return n?t.map((e=>`${$c(e,r,o)} ${n}`)):t.map((e=>$c(e,r,o)))}(e,n,t)};return e?Number(e)%2||"y"===e?o:{...o,side:1}:{space:80,values:Pc,stroke:r,font:n}})),Oc=(e,t,n,r)=>{var o;const a=e.axes[n];if(r>1)return a._size||60;let i=6+((null===a||void 0===a||null===(o=a.ticks)||void 0===o?void 0:o.size)||0)+(a.gap||0);const l=(null!==t&&void 0!==t?t:[]).reduce(((e,t)=>(null===t||void 0===t?void 0:t.length)>e.length?t:e),"");return""!=l&&(i+=((e,t)=>{const n=document.createElement("span");n.innerText=e,n.style.cssText=`position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ${t}`,document.body.appendChild(n);const r=n.offsetWidth;return n.remove(),r})(l,"10px Arial")),Math.ceil(i)},Lc=(((e,t,n)=>{const r=[];for(let o=0;oMath.round(e))).join(", "))}r.map((e=>`rgb(${e})`))})([246,226,219],[127,39,4],16),e=>{for(let t=e.series.length-1;t>=0;t--)t&&e.delSeries(t)}),Rc=e=>{Lc(e),(e=>{Object.keys(e.hooks).forEach((t=>{e.hooks[t]=[]}))})(e),e.setData([])},zc=e=>t=>{const n=t.posToVal(t.select.left,"x"),r=t.posToVal(t.select.left+t.select.width,"x");e({min:n,max:r})};function Ic(e){return`rgba(${Cr(Ar[e])}, 0.05)`}let jc=function(e){return e.BAR="Bars",e.LINE="Lines",e.LINE_STEPPED="Stepped lines",e.POINTS="Points",e}({});const Fc=(e,t,n,r)=>{var o,a;const i=e.under.clientWidth/100-1,l=null===Tc||void 0===Tc||null===(o=Tc.paths)||void 0===o||null===(a=o.bars)||void 0===a?void 0:a.call(o,{size:[.96,i]});return l?l(e,t,n,r):null},Hc=(e,t,n,r)=>{var o,a;const i=null===Tc||void 0===Tc||null===(o=Tc.paths)||void 0===o||null===(a=o.stepped)||void 0===a?void 0:a.call(o,{align:1});return i?i(e,t,n,r):null},Vc=e=>{switch(e){case jc.BAR:return Fc;case jc.LINE_STEPPED:return Hc;default:return}},Bc=["color-log-hits-bar-1","color-log-hits-bar-2","color-log-hits-bar-3","color-log-hits-bar-4","color-log-hits-bar-5"],Uc={[jc.BAR]:1,[jc.LINE_STEPPED]:2,[jc.LINE]:1.2,[jc.POINTS]:0},Yc=e=>{let{data:n,logHits:r,xRange:a,bands:i,containerSize:l,onReadyChart:s,setPlotScale:c,graphOptions:u}=e;const{isDarkTheme:d}=gt(),[h,p]=(0,t.useState)(-1),f=e=>{var t;const n=null!==(t=e.cursor.idx)&&void 0!==t?t:-1;p(n)},m=(0,t.useMemo)((()=>{let e=0;return n.map(((t,n)=>{var o;if(0===n)return{};const a=Object.values((null===r||void 0===r||null===(o=r[n-1])||void 0===o?void 0:o.fields)||{}).map((e=>e||'""')).join(", "),i=it(a?Bc[e]:"color-log-hits-bar-0");return a&&e++,{label:a||"other",width:Uc[u.graphStyle],spanGaps:!0,stroke:i,fill:u.fill?i+"80":"",paths:Vc(u.graphStyle)}}))}),[d,n,u]),_=(0,t.useMemo)((()=>({series:m,bands:i,width:l.width||window.innerWidth/2,height:l.height||200,cursor:{points:{width:(e,t,n)=>n/4,size:(e,t)=>{var n,r,o;return 1.5*((null===(n=e.series)||void 0===n||null===(r=n[t])||void 0===r||null===(o=r.points)||void 0===o?void 0:o.size)||1)},stroke:(e,t)=>{var n;return`${(null===m||void 0===m||null===(n=m[t])||void 0===n?void 0:n.stroke)||"#ffffff"}`},fill:()=>"#ffffff"}},scales:{x:{time:!0,range:()=>[a.min,a.max]}},hooks:{drawSeries:[],ready:[s],setCursor:[f],setSelect:[zc(c)],destroy:[Rc]},legend:{show:!1},axes:Dc([{},{scale:"y"}]),tzDate:e=>o()(Rt(It(e))).local().toDate()})),[d,m,i]);return{options:_,series:m,focusDataIdx:h}},Wc=e=>o()(1e3*e).tz().format(wt),qc=e=>{let{data:n,focusDataIdx:r,uPlotInst:o}=e;const a=(0,t.useRef)(null),i=(0,t.useMemo)((()=>{var e,t;const a=(null===o||void 0===o?void 0:o.series)||[],[i,...l]=n.map((e=>e[r]||0)),s=i+(n[0][1]-n[0][0]),c=l.map(((e,t)=>{var n;const r=a[t+1],o=null===r||void 0===r||null===(n=r.stroke)||void 0===n?void 0:n.call(r);return{label:(null===r||void 0===r?void 0:r.label)||"other",stroke:o,value:e,show:null===r||void 0===r?void 0:r.show}})).filter((e=>e.value>0&&e.show)).sort(((e,t)=>t.value-e.value));return{point:{top:c[0]&&(null===o||void 0===o||null===(e=o.valToPos)||void 0===e?void 0:e.call(o,c[0].value,"y"))||0,left:(null===o||void 0===o||null===(t=o.valToPos)||void 0===t?void 0:t.call(o,i,"x"))||0},values:c,total:c.reduce(((e,t)=>e+t.value),0),timestamp:`${Wc(i)} - ${Wc(s)}`}}),[r,o,n]),l=(0,t.useMemo)((()=>{if(!o||!i.total||!a.current)return;const{top:e,left:t}=i.point,n=parseFloat(o.over.style.left),r=parseFloat(o.over.style.top),{width:l,height:s}=o.over.getBoundingClientRect(),{width:c,height:u}=a.current.getBoundingClientRect(),d={top:e+r+50-(e+u>=s?u+100:0),left:t+n+50-(t+c>=l?c+100:0)};return d.left<0&&(d.left=20),d.top<0&&(d.top=20),d}),[i,o,a.current]);return mt("div",{className:Qn()({"vm-chart-tooltip":!0,"vm-chart-tooltip_hits":!0,"vm-bar-hits-tooltip":!0,"vm-bar-hits-tooltip_visible":-1!==r&&i.values.length}),ref:a,style:l,children:[mt("div",{children:i.values.map(((e,t)=>mt("div",{className:"vm-chart-tooltip-data",children:[mt("span",{className:"vm-chart-tooltip-data__marker",style:{background:e.stroke}}),mt("p",{children:[e.label,": ",mt("b",{children:e.value})]})]},t)))}),i.values.length>1&&mt("div",{className:"vm-chart-tooltip-data",children:mt("p",{children:["Total records: ",mt("b",{children:i.total})]})}),mt("div",{className:"vm-chart-tooltip-header",children:mt("div",{className:"vm-chart-tooltip-header__title",children:i.timestamp})})]})},Kc=e=>{let{period:n,setPeriod:r}=e;const[a,i]=(0,t.useState)({min:n.start,max:n.end});return(0,t.useEffect)((()=>{i({min:n.start,max:n.end})}),[n]),{xRange:a,setPlotScale:e=>{let{min:t,max:n}=e;const a=1e3*(n-t);aAt||r({from:o()(1e3*t).toDate(),to:o()(1e3*n).toDate()})}}},Zc=e=>(e=>e instanceof MouseEvent)(e)?e.clientX:e.touches[0].clientX,Gc=e=>{let{dragSpeed:n=.85,setPanning:r,setPlotScale:o}=e;const a=(0,t.useRef)({leftStart:0,xUnitsPerPx:0,scXMin:0,scXMax:0}),i=e=>{e.preventDefault();const t=Zc(e),{leftStart:r,xUnitsPerPx:i,scXMin:l,scXMax:s}=a.current,c=i*((t-r)*n);o({min:l-c,max:s-c})},l=()=>{r(!1),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",l),document.removeEventListener("touchmove",i),document.removeEventListener("touchend",l)};return e=>{let{e:t,u:n}=e;t.preventDefault(),r(!0),a.current={leftStart:Zc(t),xUnitsPerPx:n.posToVal(1,"x")-n.posToVal(0,"x"),scXMin:n.scales.x.min||0,scXMax:n.scales.x.max||0},document.addEventListener("mousemove",i),document.addEventListener("mouseup",l),document.addEventListener("touchmove",i),document.addEventListener("touchend",l)}},Qc=e=>{const[n,r]=(0,t.useState)(!1),o=Gc({dragSpeed:.9,setPanning:r,setPlotScale:e});return{onReadyChart:t=>{const n=e=>{const n=e instanceof MouseEvent&&(e=>{const{ctrlKey:t,metaKey:n,button:r}=e;return 0===r&&(t||n)})(e),r=window.TouchEvent&&e instanceof TouchEvent&&e.touches.length>1;(n||r)&&o({u:t,e:e})};t.over.addEventListener("mousedown",n),t.over.addEventListener("touchstart",n),t.over.addEventListener("wheel",(n=>{if(!n.ctrlKey&&!n.metaKey)return;n.preventDefault();const{width:r}=t.over.getBoundingClientRect(),o=t.cursor.left&&t.cursor.left>0?t.cursor.left:0,a=t.posToVal(o,"x"),i=(t.scales.x.max||0)-(t.scales.x.min||0),l=n.deltaY<0?.9*i:i/.9,s=a-o/r*l,c=s+l;t.batch((()=>e({min:s,max:c})))}))},isPanning:n}},Jc=e=>{const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)},Xc=e=>{let{uPlotInst:n,xRange:r,setPlotScale:o}=e;const[a,i]=(0,t.useState)(0),l=(0,t.useCallback)((e=>{const{target:t,ctrlKey:a,metaKey:i,key:l}=e,s=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;if(!n||s)return;const c="+"===l||"="===l;if(("-"===l||c)&&!(a||i)){e.preventDefault();const t=(r.max-r.min)/10*(c?1:-1);o({min:r.min+t,max:r.max-t})}}),[n,r]),s=(0,t.useCallback)((e=>{if(!n||2!==e.touches.length)return;e.preventDefault();const t=Jc(e.touches),i=a-t,l=n.scales.x.max||r.max,s=n.scales.x.min||r.min,c=(l-s)/50*(i>0?-1:1);n.batch((()=>o({min:s+c,max:l-c})))}),[n,a,r]);return er("keydown",l),er("touchmove",s),er("touchstart",(e=>{2===e.touches.length&&(e.preventDefault(),i(Jc(e.touches)))})),null},eu=e=>{let{onChange:n}=e;const[r,o]=je(),a=(0,t.useRef)(null),{value:i,toggle:l,setFalse:s}=Fr(!1),[c,u]=Lr(jc.LINE_STEPPED,"graph"),[d,h]=Lr(!1,"stacked"),[p,f]=Lr(!1,"fill"),[m,_]=Lr(!1,"hide_chart"),g=(0,t.useMemo)((()=>({graphStyle:c,stacked:d,fill:p,hideChart:m})),[c,d,p,m]);return(0,t.useEffect)((()=>{n(g)}),[g]),mt("div",{className:"vm-bar-hits-options",children:[mt(Ir,{title:m?"Show chart and resume hits updates":"Hide chart and pause hits updates",children:mt(Dr,{variant:"text",color:"primary",startIcon:mt(m?Dn:Pn,{}),onClick:()=>{_((e=>{const t=!e;return t?r.set("hide_chart","true"):r.delete("hide_chart"),o(r),t}))},ariaLabel:"settings"})}),mt("div",{ref:a,children:mt(Ir,{title:"Graph settings",children:mt(Dr,{variant:"text",color:"primary",startIcon:mt(pn,{}),onClick:l,ariaLabel:"settings"})})}),mt(Xr,{open:i,placement:"bottom-right",onClose:s,buttonRef:a,title:"Graph settings",children:mt("div",{className:"vm-bar-hits-options-settings",children:[mt("div",{className:"vm-bar-hits-options-settings-item vm-bar-hits-options-settings-item_list",children:[mt("p",{className:"vm-bar-hits-options-settings-item__title",children:"Graph style:"}),Object.values(jc).map((e=>{return mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_active":c===e}),onClick:(t=e,()=>{u(t),r.set("graph",t),o(r)}),children:e},e);var t}))]}),mt("div",{className:"vm-bar-hits-options-settings-item",children:mt(jr,{label:"Stacked",value:d,onChange:e=>{h(e),e?r.set("stacked","true"):r.delete("stacked"),o(r)}})}),mt("div",{className:"vm-bar-hits-options-settings-item",children:mt(jr,{label:"Fill",value:p,onChange:e=>{f(e),e?r.set("fill","true"):r.delete("fill"),o(r)}})})]})})]})};const tu=function(e,t){const n=[];let r=[];const o=e[0].length,a=Array(o);for(let i=0;ia[t]+=+(null!==e&&void 0!==e?e:0))));for(let i=1;in>i&&!t(n))),i]});return r=r.filter((e=>e.series[1]>-1)),{data:[e[0]].concat(n),bands:r}},nu=e=>{let{uPlotInst:n,onApplyFilter:r}=e;const[o,a]=(0,t.useState)([]),[i,l]=(0,t.useState)([]),s=(0,t.useCallback)((()=>{const e=n.series.filter((e=>"x"!==e.scale));a(e),l(e.map((e=>eo(e.label||""))))}),[n]),c=e=>t=>{(t.metaKey||t.ctrlKey)&&(r(`{${e}}`||""),s(),n.redraw())};return(0,t.useEffect)(s,[n]),mt("div",{className:"vm-bar-hits-legend",children:o.map(((e,t)=>{var r,o;return mt(Ir,{title:mt("ul",{className:"vm-bar-hits-legend-info",children:[mt("li",{children:["Click to ",e.show?"hide":"show"," the _stream."]}),mt("li",{children:[yr()?"Cmd":"Ctrl"," + Click to filter by the _stream."]})]}),children:mt("div",{className:Qn()({"vm-bar-hits-legend-item":!0,"vm-bar-hits-legend-item_hide":!e.show}),onClick:(o=e,e=>{e.metaKey||e.ctrlKey||(o.show=!o.show,s(),n.redraw())}),children:[mt("div",{className:"vm-bar-hits-legend-item__marker",style:{backgroundColor:`${null===e||void 0===e||null===(r=e.stroke)||void 0===r?void 0:r.call(e)}`}}),mt("div",{className:"vm-bar-hits-legend-item-pairs",children:i[t].map((e=>mt("span",{className:"vm-bar-hits-legend-item-pairs__value",onClick:c(e),children:e},e)))})]})},e.label)}))})},ru=e=>{let{logHits:n,data:r,period:o,setPeriod:a,onApplyFilter:i}=e;const[l,s]=Oa(),c=(0,t.useRef)(null),[u,d]=(0,t.useState)(),[h,p]=(0,t.useState)({graphStyle:jc.LINE_STEPPED,stacked:!1,fill:!1,hideChart:!1}),{xRange:f,setPlotScale:m}=Kc({period:o,setPeriod:a}),{onReadyChart:_,isPanning:g}=Qc(m);Xc({uPlotInst:u,xRange:f,setPlotScale:m});const v=(0,t.useMemo)((()=>r.every((e=>0===e.length))),[r]),{data:y,bands:b}=(0,t.useMemo)((()=>h.stacked?tu(r,(()=>!1)):{data:r,bands:[]}),[h,r]),{options:w,series:k,focusDataIdx:x}=Yc({data:y,logHits:n,bands:b,xRange:f,containerSize:s,onReadyChart:_,setPlotScale:m,graphOptions:h});return(0,t.useEffect)((()=>{u&&(Lc(u),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(((t,r)=>{t.label&&(t.spanGaps=n),r&&e.addSeries(t)}))}(u,k,!0),((e,t)=>{if(e.delBand(),t.length<2)return;const n=t.map(((e,t)=>({...e,index:t}))),r=n.filter((e=>e.forecast===tt.yhatUpper)),o=n.filter((e=>e.forecast===tt.yhatLower)),a=r.map((e=>{const t=o.find((t=>t.forecastGroup===e.forecastGroup));return t?{series:[e.index,t.index],fill:Ic(tt.yhatUpper)}:null})).filter((e=>null!==e));a.length&&a.forEach((t=>{e.addBand(t)}))})(u,k),u.redraw())}),[k]),(0,t.useEffect)((()=>{if(!c.current)return;const e=new Tc(w,y,c.current);return d(e),()=>e.destroy()}),[c.current,w]),(0,t.useEffect)((()=>{u&&(u.scales.x.range=()=>[f.min,f.max],u.redraw())}),[f]),(0,t.useEffect)((()=>{u&&(u.setSize(s),u.redraw())}),[s]),(0,t.useEffect)((()=>{u&&(u.setData(y),u.redraw())}),[y]),mt("div",{className:Qn()({"vm-bar-hits-chart__wrapper":!0,"vm-bar-hits-chart__wrapper_hidden":h.hideChart}),children:[!h.hideChart&&mt("div",{className:Qn()({"vm-bar-hits-chart":!0,"vm-bar-hits-chart_panning":g}),ref:l,children:[mt("div",{className:"vm-line-chart__u-plot",ref:c}),mt(qc,{uPlotInst:u,data:r,focusDataIdx:x})]}),mt(eu,{onChange:p}),u&&!v&&!h.hideChart&&mt(nu,{uPlotInst:u,onApplyFilter:i})]})},ou=e=>{let{logHits:n,period:r,error:a,isLoading:i,onApplyFilter:l}=e;const{isMobile:s}=br(),c=Qt(),[u]=je(),d=(0,t.useMemo)((()=>u.get("hide_chart")),[u]),h=(0,t.useCallback)((e=>{const t=[],{start:n,end:o,step:a}=to(r),i=Math.ceil(n.diff(e,"milliseconds")/a);let l=e.add(i*a,"milliseconds");l.isBefore(n)&&(l=n.clone());const s=Math.floor(o.diff(l,"milliseconds")/a);for(let r=0;r<=s;r++)t.push(l.add(r*a,"milliseconds").unix());return t}),[r]),p=(0,t.useMemo)((()=>{if(!n.length)return[[],[]];const e=h(o()(n[0].timestamps[0])),t=((e,t)=>e.map((e=>{const n=new Map;return e.timestamps.forEach(((t,r)=>{const a=o()(t).unix();n.set(a,e.values[r]||null)})),t.map((e=>n.get(e)||null))})))(n,e);return[e,...t]}),[n]),f=(0,t.useMemo)((()=>{const e=p.every((e=>0===e.length)),t=0===p[0].length,n=0===p[1].length;return d?"Chart hidden. Hits updates paused.":e?"No logs volume available\nNo volume information available for the current queries and time range.":t?"No timestamp information available for the current queries and time range.":n?"No value information available for the current queries and time range.":""}),[p,d]);return mt("section",{className:Qn()({"vm-explore-logs-chart":!0,"vm-block":!0,"vm-block_mobile":s}),children:[i&&mt(ha,{}),!a&&f&&mt("div",{className:"vm-explore-logs-chart__empty",children:mt(kr,{variant:"info",children:f})}),a&&f&&mt("div",{className:"vm-explore-logs-chart__empty",children:mt(kr,{variant:"error",children:a})}),p&&mt(ru,{logHits:n,data:p,period:r,setPeriod:e=>{let{from:t,to:n}=e;c({type:"SET_PERIOD",payload:{from:t,to:n}})},onApplyFilter:l})]})},au=(e,n)=>{const[r]=je(),[o,a]=(0,t.useState)([]),[i,l]=(0,t.useState)([]),[s,c]=(0,t.useState)(),u=(0,t.useRef)(new AbortController),d=(0,t.useMemo)((()=>(e=>`${e}/select/logsql/hits`)(e)),[e]),h=(e,t)=>(e.total=(e.total||0)+(t.total||0),t.timestamps.forEach(((n,r)=>{const o=e.timestamps.findIndex((e=>e===n));-1===o?(e.timestamps.push(n),e.values.push(t.values[r])):e.values[o]+=t.values[r]})),e),p=(0,t.useCallback)((async e=>{u.current.abort(),u.current=new AbortController;const{signal:t}=u.current,o=Date.now();l((e=>({...e,[o]:!0}))),c(void 0);try{const i=((e,t,n)=>{const{start:o,end:a,step:i}=to(t);return{signal:n,method:"POST",headers:{AccountID:r.get("accountID")||"0",ProjectID:r.get("projectID")||"0"},body:new URLSearchParams({query:e.trim(),step:`${i}ms`,start:o.toISOString(),end:a.toISOString(),field:"_stream"})}})(n,e,t),s=await fetch(d,i);if(!s.ok||!s.body){const e=await s.text();return c(e),a([]),void l((e=>({...e,[o]:!1})))}const u=await s.json(),p=null===u||void 0===u?void 0:u.hits;if(!p){c("Error: No 'hits' field in response")}a(p?(e=>{const t=e.sort(((e,t)=>(t.total||0)-(e.total||0))),n=[],r=t.slice(5).reduce(h,{fields:{},timestamps:[],values:[],total:0});r.total&&n.push(r);const o=t.slice(0,5);return o.length&&n.push(...o),n})(p):[])}catch(Id){Id instanceof Error&&"AbortError"!==Id.name&&(c(String(Id)),console.error(Id),a([]))}l((e=>({...e,[o]:!1})))}),[d,n,r]);return{logHits:o,isLoading:Object.values(i).some((e=>e)),error:s,fetchLogHits:p,abortController:u.current}},iu=Number(We("LOGS_LIMIT")),lu=isNaN(iu)?50:iu,su=()=>{const{serverUrl:e}=gt(),{duration:n,relativeTime:r,period:o}=Gt(),{setSearchParamsFromKeys:a}=Rr(),[i]=je(),l=(0,t.useMemo)((()=>i.get("hide_chart")),[i]),[s,c]=Lr(lu,"limit"),[u,d]=Lr("*","query"),[h,p]=(0,t.useState)(""),[f,m]=(0,t.useState)(o),[_,g]=(0,t.useState)(""),{logs:v,isLoading:y,error:b,fetchLogs:w,abortController:k}=_a(e,u,s),{fetchLogHits:x,...S}=au(e,u),C=(0,t.useCallback)((()=>{const e=Ft.find((e=>e.id===r));if(!e)return o;const{duration:t,until:n}=e;return Ot(t,n())}),[o,r]),A=()=>{if(!u)return void g(rt.validQuery);g("");const e=C();m(e),w(e).then((t=>{t&&!l&&x(e)})).catch((e=>e)),a({query:u,"g0.range_input":n,"g0.end_input":e.date,"g0.relative_time":r||"none"})},E=(0,t.useCallback)((()=>{y||S.isLoading?(k.abort&&k.abort(),S.abortController.abort&&S.abortController.abort()):(d(h),A())}),[y,S.isLoading]);return(0,t.useEffect)((()=>{u&&A()}),[o]),(0,t.useEffect)((()=>{A(),p(u)}),[u]),(0,t.useEffect)((()=>{!l&&x(f)}),[l]),mt("div",{className:"vm-explore-logs",children:[mt(Da,{query:h,error:_,limit:s,onChange:p,onChangeLimit:e=>{c(e),a({limit:e}),Ye("LOGS_LIMIT",`${e}`)},onRun:E,isLoading:y||S.isLoading}),b&&mt(kr,{variant:"error",children:b}),!b&&mt(ou,{...S,query:u,period:f,onApplyFilter:e=>{d((t=>`_stream: ${"other"===e?"{}":e} AND (${t})`))}}),mt(ma,{data:v,isLoading:y})]})},cu={home:"/",metrics:"/metrics",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries",trace:"/trace",withTemplate:"/expand-with-exprs",relabel:"/relabeling",logs:"/logs",activeQueries:"/active-queries",queryAnalyzer:"/query-analyzer",icons:"/icons",anomaly:"/anomaly",query:"/query",downsamplingDebug:"/downsampling-filters-debug",retentionDebug:"/retention-filters-debug"},{REACT_APP_TYPE:uu}={REACT_APP_TYPE:"logs"},du=uu===Ue.logs,hu={header:{tenant:!0,stepControl:!du,timeSelector:!du,executionControls:!du}},pu={[cu.home]:{title:"Query",...hu},[cu.metrics]:{title:"Explore Prometheus metrics",header:{tenant:!0,stepControl:!0,timeSelector:!0}},[cu.cardinality]:{title:"Explore cardinality",header:{tenant:!0,cardinalityDatePicker:!0}},[cu.topQueries]:{title:"Top queries",header:{tenant:!0}},[cu.trace]:{title:"Trace analyzer",header:{}},[cu.queryAnalyzer]:{title:"Query analyzer",header:{}},[cu.dashboards]:{title:"Dashboards",...hu},[cu.withTemplate]:{title:"WITH templates",header:{}},[cu.relabel]:{title:"Metric relabel debug",header:{}},[cu.logs]:{title:"Logs Explorer",header:{}},[cu.activeQueries]:{title:"Active Queries",header:{}},[cu.icons]:{title:"Icons",header:{}},[cu.anomaly]:{title:"Anomaly exploration",...hu},[cu.query]:{title:"Query",...hu},[cu.downsamplingDebug]:{title:"Downsampling filters debug",header:{}},[cu.retentionDebug]:{title:"Retention filters debug",header:{}}},fu=cu;let mu=function(e){return e[e.internalLink=0]="internalLink",e[e.externalLink=1]="externalLink",e}({});const _u=(e,t)=>({label:"Alerts",value:`${e}/vmalert`,type:mu.externalLink,hide:!t}),gu=e=>[{value:fu.trace},{value:fu.queryAnalyzer},{value:fu.withTemplate},{value:fu.relabel},{value:fu.downsamplingDebug,hide:!e},{value:fu.retentionDebug,hide:!e}],vu=e=>{let{activeMenu:t,label:n,value:r,type:o,color:a}=e;return o===mu.externalLink?mt("a",{className:Qn()({"vm-header-nav-item":!0,"vm-header-nav-item_active":t===r}),style:{color:a},href:r,target:"_blank",rel:"noreferrer",children:n}):mt(Le,{className:Qn()({"vm-header-nav-item":!0,"vm-header-nav-item_active":t===r}),style:{color:a},to:r,children:n})},yu=e=>{let{activeMenu:n,label:r,color:o,background:a,submenu:i,direction:l}=e;const{pathname:s}=ne(),[c,u]=(0,t.useState)(null),d=(0,t.useRef)(null),{value:h,setFalse:p,setTrue:f}=Fr(!1),m=()=>{c&&clearTimeout(c);const e=setTimeout(p,300);u(e)};return(0,t.useEffect)((()=>{p()}),[s]),"column"===l?mt(pt.FK,{children:i.map((e=>mt(vu,{activeMenu:n,value:e.value||"",label:e.label||"",type:e.type||mu.internalLink},e.value)))}):mt("div",{className:Qn()({"vm-header-nav-item":!0,"vm-header-nav-item_sub":!0,"vm-header-nav-item_open":h,"vm-header-nav-item_active":i.find((e=>e.value===n))}),style:{color:o},onMouseEnter:()=>{f(),c&&clearTimeout(c)},onMouseLeave:m,ref:d,children:[r,mt(kn,{}),mt(Xr,{open:h,placement:"bottom-left",offset:{top:12,left:0},onClose:p,buttonRef:d,children:mt("div",{className:"vm-header-nav-item-submenu",style:{background:a},onMouseLeave:m,onMouseEnter:()=>{c&&clearTimeout(c)},children:i.map((e=>mt(vu,{activeMenu:n,value:e.value||"",label:e.label||"",color:o,type:e.type||mu.internalLink},e.value)))})})]})},bu=e=>e.filter((e=>!e.hide)).map((e=>{const t={...e};var n;t.value&&!t.label&&(t.label=(null===(n=pu[t.value])||void 0===n?void 0:n.title)||(e=>{try{return e.replace(/^\/+/,"").replace(/-/g," ").trim().replace(/^\w/,(e=>e.toUpperCase()))}catch(Id){return e}})(t.value));return t.submenu&&t.submenu.length>0&&(t.submenu=bu(t.submenu)),t})),wu=()=>{var e;const n=He(),{dashboardsSettings:r}=(0,t.useContext)(pr).state,{serverUrl:o,flags:a,appConfig:i}=gt(),l="enterprise"===(null===(e=i.license)||void 0===e?void 0:e.type),s=Boolean(a["vmalert.proxyURL"]),c=Boolean(!n&&r.length),u=(0,t.useMemo)((()=>({serverUrl:o,isEnterpriseLicense:l,showAlertLink:s,showPredefinedDashboards:c})),[o,l,s,c]),d=(0,t.useMemo)((()=>{switch("logs"){case Ue.logs:return[{label:pu[fu.logs].title,value:fu.home}];case Ue.anomaly:return[{label:pu[fu.anomaly].title,value:fu.home}];default:return(e=>{let{serverUrl:t,isEnterpriseLicense:n,showPredefinedDashboards:r,showAlertLink:o}=e;return[{value:fu.home},{label:"Explore",submenu:[{value:fu.metrics},{value:fu.cardinality},{value:fu.topQueries},{value:fu.activeQueries}]},{label:"Tools",submenu:gu(n)},{value:fu.dashboards,hide:!r},_u(t,o)]})(u)}}),[u]);return bu(d)},ku=e=>{let{color:n,background:r,direction:o}=e;const{pathname:a}=ne(),[i,l]=(0,t.useState)(a),s=wu();return(0,t.useEffect)((()=>{l(a)}),[a]),mt("nav",{className:Qn()({"vm-header-nav":!0,[`vm-header-nav_${o}`]:o}),children:s.map((e=>e.submenu?mt(yu,{activeMenu:i,label:e.label||"",submenu:e.submenu,color:n,background:r,direction:o},e.label):mt(vu,{activeMenu:i,value:e.value||"",label:e.label||"",color:n,type:e.type||mu.internalLink},e.value)))})},xu=mt("code",{children:yr()?"Cmd":"Ctrl"}),Su=[{title:"Zoom in",description:mt(pt.FK,{children:["To zoom in, hold down the ",xu," + ",mt("code",{children:"scroll up"}),", or press the ",mt("code",{children:"+"}),". Also, you can zoom in on a range on the graph by holding down your mouse button and selecting the range."]})},{title:"Zoom out",description:mt(pt.FK,{children:["To zoom out, hold down the ",xu," + ",mt("code",{children:"scroll down"}),", or press the ",mt("code",{children:"-"}),"."]})},{title:"Move horizontal axis",description:mt(pt.FK,{children:["To move the graph, hold down the ",xu," + ",mt("code",{children:"drag"})," the graph to the right or left."]})},{title:"Fixing a tooltip",description:mt(pt.FK,{children:["To fix the tooltip, ",mt("code",{children:"click"})," mouse when it's open. Then, you can drag the fixed tooltip by ",mt("code",{children:"clicking"})," and ",mt("code",{children:"dragging"})," on the ",mt(Ln,{})," icon."]})},{title:"Set a custom range for the vertical axis",description:mt(pt.FK,{children:["To set a custom range for the vertical axis, click on the ",mt(pn,{})," icon located in the upper right corner of the graph, activate the toggle, and set the values."]})}],Cu=[{title:"Show/hide a legend item",description:mt(pt.FK,{children:[mt("code",{children:"click"})," on a legend item to isolate it on the graph.",xu," + ",mt("code",{children:"click"})," on a legend item to remove it from the graph. To revert to the previous state, click again."]})},{title:"Copy label key-value pairs",description:mt(pt.FK,{children:[mt("code",{children:"click"})," on a label key-value pair to save it to the clipboard."]})},{title:"Collapse/Expand the legend group",description:mt(pt.FK,{children:[mt("code",{children:"click"})," on the group name (e.g. ",mt("b",{children:'Query 1: {__name__!=""}'}),") to collapse or expand the legend."]})}],Au=Su.concat(Cu),Eu=()=>{const{value:e,setFalse:t,setTrue:n}=Fr(!1);return mt(pt.FK,{children:[mt(Ir,{title:"Show tips on working with the graph",children:mt(Dr,{variant:"text",color:"gray",startIcon:mt(Fn,{}),onClick:n,ariaLabel:"open the tips"})}),e&&mt(Br,{title:"Tips on working with the graph and the legend",onClose:t,children:mt("div",{className:"fc-graph-tips",children:Au.map((e=>{let{title:t,description:n}=e;return mt("div",{className:"fc-graph-tips-item",children:[mt("h4",{className:"fc-graph-tips-item__action",children:t}),mt("p",{className:"fc-graph-tips-item__description",children:n})]},t)}))})})]})},Mu=mt("code",{children:yr()?"Cmd":"Ctrl"}),Nu=mt(pt.FK,{children:[mt("code",{children:yr()?"Option":"Ctrl"})," + ",mt("code",{children:"Space"})]}),Tu=[{title:"Query",list:[{keys:mt("code",{children:"Enter"}),description:"Run"},{keys:mt(pt.FK,{children:[mt("code",{children:"Shift"})," + ",mt("code",{children:"Enter"})]}),description:"Multi-line queries"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"Arrow Up"})]}),description:"Previous command from the Query history"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"Arrow Down"})]}),description:"Next command from the Query history"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"click"})," by ",mt(Pn,{})]}),description:"Toggle multiple queries"},{keys:Nu,description:"Show quick autocomplete tips"}]},{title:"Graph",readMore:mt(Eu,{}),list:[{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"scroll Up"})," or ",mt("code",{children:"+"})]}),description:"Zoom in"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"scroll Down"})," or ",mt("code",{children:"-"})]}),description:"Zoom out"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"drag"})]}),description:"Move the graph left/right"},{keys:mt(pt.FK,{children:mt("code",{children:"click"})}),description:"Select the series in the legend"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"click"})]}),description:"Toggle multiple series in the legend"}]}],$u="Shortcut keys",Pu=yr(),Du=Pu?"Cmd + /":"F1",Ou=e=>{let{showTitle:n}=e;const r=He(),{value:o,setTrue:a,setFalse:i}=Fr(!1),l=(0,t.useCallback)((e=>{const t=Pu&&"/"===e.key&&e.metaKey,n=!Pu&&"F1"===e.key&&!e.metaKey;(t||n)&&a()}),[a]);return er("keydown",l),mt(pt.FK,{children:[mt(Ir,{open:!0!==n&&void 0,title:`${$u} (${Du})`,placement:"bottom-center",children:mt(Dr,{className:r?"":"vm-header-button",variant:"contained",color:"primary",startIcon:mt(An,{}),onClick:a,ariaLabel:$u,children:n&&$u})}),o&&mt(Br,{title:"Shortcut keys",onClose:i,children:mt("div",{className:"vm-shortcuts",children:Tu.map((e=>mt("div",{className:"vm-shortcuts-section",children:[e.readMore&&mt("div",{className:"vm-shortcuts-section__read-more",children:e.readMore}),mt("h3",{className:"vm-shortcuts-section__title",children:e.title}),mt("div",{className:"vm-shortcuts-section-list",children:e.list.map(((t,n)=>mt("div",{className:"vm-shortcuts-section-list-item",children:[mt("div",{className:"vm-shortcuts-section-list-item__key",children:t.keys}),mt("p",{className:"vm-shortcuts-section-list-item__description",children:t.description})]},`${e.title}_${n}`)))})]},e.title)))})})]})},Lu=e=>{let{open:t}=e;return mt("button",{className:Qn()({"vm-menu-burger":!0,"vm-menu-burger_opened":t}),"aria-label":"menu",children:mt("span",{})})},{REACT_APP_TYPE:Ru}={REACT_APP_TYPE:"logs"},zu=Ru===Ue.logs,Iu=e=>{let{background:n,color:r}=e;const{pathname:o}=ne(),{isMobile:a}=br(),i=(0,t.useRef)(null),{value:l,toggle:s,setFalse:c}=Fr(!1);return(0,t.useEffect)(c,[o]),Jr(i,c),mt("div",{className:"vm-header-sidebar",ref:i,children:[mt("div",{className:Qn()({"vm-header-sidebar-button":!0,"vm-header-sidebar-button_open":l}),onClick:s,children:mt(Lu,{open:l})}),mt("div",{className:Qn()({"vm-header-sidebar-menu":!0,"vm-header-sidebar-menu_open":l}),children:[mt("div",{children:mt(ku,{color:r,background:n,direction:"column"})}),mt("div",{className:"vm-header-sidebar-menu-settings",children:!a&&!zu&&mt(Ou,{showTitle:!0})})]})]})},ju=e=>{let{controlsComponent:n,isMobile:r,...o}=e;const a=He(),{pathname:i}=ne(),{accountIds:l}=(()=>{const{useTenantID:e}=Fe(),n=He(),{serverUrl:r}=gt(),[o,a]=(0,t.useState)(!1),[i,l]=(0,t.useState)(),[s,c]=(0,t.useState)([]),u=(0,t.useMemo)((()=>`${r.replace(/^(.+)(\/select.+)/,"$1")}/admin/tenants`),[r]),d=(0,t.useMemo)((()=>!!Be(r)),[r]),h=n?!e:!d;return(0,t.useEffect)((()=>{h||(async()=>{a(!0);try{const e=await fetch(u),t=await e.json(),n=t.data||[];c(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?l(void 0):l(`${t.errorType}\r\n${null===t||void 0===t?void 0:t.error}`)}catch(Id){Id instanceof Error&&l(`${Id.name}: ${Id.message}`)}a(!1)})().catch(console.error)}),[u]),{accountIds:s,isLoading:o,error:i}})(),{value:s,toggle:c,setFalse:u}=Fr(!1),d=mt(n,{...o,isMobile:r,accountIds:l,headerSetup:(0,t.useMemo)((()=>(pu[i]||{}).header||{}),[i])});return r?mt(pt.FK,{children:[mt("div",{children:mt(Dr,{className:Qn()({"vm-header-button":!a}),startIcon:mt(jn,{}),onClick:c,ariaLabel:"controls"})}),mt(Br,{title:"Controls",onClose:u,isOpen:s,className:Qn()({"vm-header-controls-modal":!0,"vm-header-controls-modal_open":s}),children:d})]}):d},{REACT_APP_TYPE:Fu}={REACT_APP_TYPE:"logs"},Hu=Fu===Ue.logs||Fu===Ue.anomaly,Vu=()=>{switch(Fu){case Ue.logs:return mt(un,{});case Ue.anomaly:return mt(dn,{});default:return mt(cn,{})}},Bu=e=>{let{controlsComponent:n}=e;const{isMobile:r}=br(),o=tr(),a=(0,t.useMemo)((()=>window.innerWidth<1e3),[o]),{isDarkTheme:i}=gt(),l=He(),s=(0,t.useMemo)((()=>it(i?"color-background-block":"color-primary")),[i]),{background:c,color:u}=(0,t.useMemo)((()=>{const{headerStyles:{background:e=(l?"#FFF":s),color:t=(l?s:"#FFF")}={}}=Fe();return{background:e,color:t}}),[s]),d=oe(),h=()=>{d({pathname:fu.home}),window.location.reload()};return mt("header",{className:Qn()({"vm-header":!0,"vm-header_app":l,"vm-header_dark":i,"vm-header_sidebar":a,"vm-header_mobile":r}),style:{background:c,color:u},children:[a?mt(Iu,{background:c,color:u}):mt(pt.FK,{children:[!l&&mt("div",{className:Qn()({"vm-header-logo":!0,"vm-header-logo_logs":Hu}),onClick:h,style:{color:u},children:mt(Vu,{})}),mt(ku,{color:u,background:c})]}),a&&mt("div",{className:Qn()({"vm-header-logo":!0,"vm-header-logo_mobile":!0,"vm-header-logo_logs":Hu}),onClick:h,style:{color:u},children:mt(Vu,{})}),mt(ju,{controlsComponent:n,displaySidebar:a,isMobile:r})]})},Uu={href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new/choose",Icon:()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z"})}),title:"Create an issue"},Yu=[{href:"https://docs.victoriametrics.com/MetricsQL.html",Icon:Tn,title:"MetricsQL"},{href:"https://docs.victoriametrics.com/#vmui",Icon:Rn,title:"Documentation"},Uu],Wu=[{href:"https://docs.victoriametrics.com/victorialogs/logsql/",Icon:Tn,title:"LogsQL"},{href:"https://docs.victoriametrics.com/victorialogs/",Icon:Rn,title:"Documentation"},Uu],qu=(0,t.memo)((e=>{let{links:t=Yu}=e;const n=`2019-${(new Date).getFullYear()}`;return mt("footer",{className:"vm-footer",children:[mt("a",{className:"vm-link vm-footer__website",target:"_blank",href:"https://victoriametrics.com/",rel:"me noreferrer",children:[mt(hn,{}),"victoriametrics.com"]}),t.map((e=>{let{href:t,Icon:n,title:r}=e;return mt("a",{className:"vm-link vm-footer__link",target:"_blank",href:t,rel:"help noreferrer",children:[mt(n,{}),r]},`${t}-${r}`)})),mt("div",{className:"vm-footer__copyright",children:["\xa9 ",n," VictoriaMetrics"]})]})})),Ku=qu,Zu="Enable to save the modified server URL to local storage, preventing reset upon page refresh.",Gu="Disable to stop saving the server URL to local storage, reverting to the default URL on page refresh.",Qu=(0,t.forwardRef)(((e,n)=>{let{onClose:r}=e;const{serverUrl:o}=gt(),a=vt(),{value:i,toggle:l}=Fr(!!We("SERVER_URL")),[s,c]=(0,t.useState)(o),[u,d]=(0,t.useState)(""),h=(0,t.useCallback)((()=>{const e=Be(s);""!==e&&a({type:"SET_TENANT_ID",payload:e}),a({type:"SET_SERVER",payload:s}),r()}),[s]);return(0,t.useEffect)((()=>{o||d(rt.emptyServer),(e=>{let t;try{t=new URL(e)}catch(n){return!1}return"http:"===t.protocol||"https:"===t.protocol})(o)||d(rt.validServer)}),[o]),(0,t.useEffect)((()=>{i?Ye("SERVER_URL",s):qe(["SERVER_URL"])}),[i]),(0,t.useEffect)((()=>{i&&Ye("SERVER_URL",s)}),[s]),(0,t.useEffect)((()=>{o!==s&&c(o)}),[o]),(0,t.useImperativeHandle)(n,(()=>({handleApply:h})),[h]),mt("div",{children:[mt("div",{className:"vm-server-configurator__title",children:"Server URL"}),mt("div",{className:"vm-server-configurator-url",children:[mt(Vr,{autofocus:!0,value:s,error:u,onChange:e=>{c(e||""),d("")},onEnter:h,inputmode:"url"}),mt(Ir,{title:i?Gu:Zu,children:mt(Dr,{className:"vm-server-configurator-url__button",variant:"text",color:i?"primary":"gray",onClick:l,startIcon:mt(In,{})})})]})]})})),Ju=[{label:"Graph",type:nt.chart},{label:"JSON",type:nt.code},{label:"Table",type:nt.table}],Xu=(0,t.forwardRef)(((e,n)=>{let{onClose:r}=e;const{isMobile:o}=br(),{seriesLimits:a}=(0,t.useContext)(lr).state,i=(0,t.useContext)(lr).dispatch,[l,s]=(0,t.useState)(a),[c,u]=(0,t.useState)({table:"",chart:"",code:""}),d=(0,t.useCallback)((()=>{i({type:"SET_SERIES_LIMITS",payload:l}),r()}),[l]);return(0,t.useImperativeHandle)(n,(()=>({handleApply:d})),[d]),mt("div",{className:"vm-limits-configurator",children:[mt("div",{className:"vm-server-configurator__title",children:["Series limits by tabs",mt(Ir,{title:"Set to 0 to disable the limit",children:mt(Dr,{variant:"text",color:"primary",size:"small",startIcon:mt(_n,{})})}),mt("div",{className:"vm-limits-configurator-title__reset",children:mt(Dr,{variant:"text",color:"primary",size:"small",startIcon:mt(mn,{}),onClick:()=>{s(Xe)},children:"Reset limits"})})]}),mt("div",{className:Qn()({"vm-limits-configurator__inputs":!0,"vm-limits-configurator__inputs_mobile":o}),children:Ju.map((e=>{return mt("div",{children:mt(Vr,{label:e.label,value:l[e.type],error:c[e.type],onChange:(t=e.type,e=>{const n=e||"";u((e=>({...e,[t]:+n<0?rt.positiveNumber:""}))),s({...l,[t]:n||1/0})}),onEnter:d,type:"number"})},e.type);var t}))})]})})),ed=Xu,td=()=>mt(Ir,{title:"Browser timezone is not recognized, supported, or could not be determined.",children:mt(gn,{})}),nd=Yt(),rd=(0,t.forwardRef)(((e,n)=>{const{isMobile:r}=br(),o=Bt(),{timezone:a,defaultTimezone:i}=Gt(),l=Qt(),[s,c]=(0,t.useState)(a),[u,d]=(0,t.useState)(""),h=(0,t.useRef)(null),{value:p,toggle:f,setFalse:m}=Fr(!1),_=(0,t.useMemo)((()=>[{title:`Default time (${i})`,region:i,utc:i?Vt(i):"UTC"},{title:nd.title,region:nd.region,utc:Vt(nd.region),isInvalid:!nd.isValid},{title:"UTC (Coordinated Universal Time)",region:"UTC",utc:"UTC"}].filter((e=>e.region))),[i]),g=(0,t.useMemo)((()=>{if(!u)return o;try{return Bt(u)}catch(Id){return{}}}),[u,o]),v=(0,t.useMemo)((()=>Object.keys(g)),[g]),y=(0,t.useMemo)((()=>({region:s,utc:Vt(s)})),[s]),b=e=>()=>{(e=>{c(e.region),d(""),m()})(e)};return(0,t.useEffect)((()=>{c(a)}),[a]),(0,t.useImperativeHandle)(n,(()=>({handleApply:()=>{l({type:"SET_TIMEZONE",payload:s})}})),[s]),mt("div",{className:"vm-timezones",children:[mt("div",{className:"vm-server-configurator__title",children:"Time zone"}),mt("div",{className:"vm-timezones-item vm-timezones-item_selected",onClick:f,ref:h,children:[mt("div",{className:"vm-timezones-item__title",children:y.region}),mt("div",{className:"vm-timezones-item__utc",children:y.utc}),mt("div",{className:Qn()({"vm-timezones-item__icon":!0,"vm-timezones-item__icon_open":p}),children:mt(kn,{})})]}),mt(Xr,{open:p,buttonRef:h,placement:"bottom-left",onClose:m,fullWidth:!0,title:r?"Time zone":void 0,children:mt("div",{className:Qn()({"vm-timezones-list":!0,"vm-timezones-list_mobile":r}),children:[mt("div",{className:"vm-timezones-list-header",children:[mt("div",{className:"vm-timezones-list-header__search",children:mt(Vr,{autofocus:!0,label:"Search",value:u,onChange:e=>{d(e)}})}),_.map(((e,t)=>e&&mt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[mt("div",{className:"vm-timezones-item__title",children:[e.title,e.isInvalid&&mt(td,{})]}),mt("div",{className:"vm-timezones-item__utc",children:e.utc})]},`${t}_${e.region}`)))]}),v.map((e=>mt("div",{className:"vm-timezones-list-group",children:mt(Gr,{defaultExpanded:!0,title:mt("div",{className:"vm-timezones-list-group__title",children:e}),children:mt("div",{className:"vm-timezones-list-group-options",children:g[e]&&g[e].map((e=>mt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[mt("div",{className:"vm-timezones-item__title",children:e.region}),mt("div",{className:"vm-timezones-item__utc",children:e.utc})]},e.search)))})})},e)))]})})]})})),od=rd,ad=e=>{let{options:n,value:r,label:o,onChange:a}=e;const i=(0,t.useRef)(null),[l,s]=(0,t.useState)({width:"0px",left:"0px",borderRadius:"0px"}),c=e=>()=>{a(e)};return(0,t.useEffect)((()=>{if(!i.current)return void s({width:"0px",left:"0px",borderRadius:"0px"});const e=n.findIndex((e=>e.value===r)),{width:t}=i.current.getBoundingClientRect();let o=t,a=e*o,l="0";0===e&&(l="16px 0 0 16px"),e===n.length-1&&(l="10px",a-=1,l="0 16px 16px 0"),0!==e&&e!==n.length-1&&(o+=1,a-=1),s({width:`${o}px`,left:`${a}px`,borderRadius:l})}),[i,r,n]),mt("div",{className:"vm-toggles",children:[o&&mt("label",{className:"vm-toggles__label",children:o}),mt("div",{className:"vm-toggles-group",style:{gridTemplateColumns:`repeat(${n.length}, 1fr)`},children:[l.borderRadius&&mt("div",{className:"vm-toggles-group__highlight",style:l}),n.map(((e,t)=>mt("div",{className:Qn()({"vm-toggles-group-item":!0,"vm-toggles-group-item_first":0===t,"vm-toggles-group-item_active":e.value===r,"vm-toggles-group-item_icon":e.icon&&e.title}),onClick:c(e.value),ref:e.value===r?i:null,children:[e.icon,e.title]},e.value)))]})]})},id=Object.values(ot).map((e=>({title:e,value:e}))),ld=()=>{const{isMobile:e}=br(),t=vt(),{theme:n}=gt();return mt("div",{className:Qn()({"vm-theme-control":!0,"vm-theme-control_mobile":e}),children:[mt("div",{className:"vm-server-configurator__title",children:"Theme preferences"}),mt("div",{className:"vm-theme-control__toggle",children:mt(ad,{options:id,value:n,onChange:e=>{t({type:"SET_THEME",payload:e})}})},`${e}`)]})},sd=()=>{const{isMobile:e}=br(),{markdownParsing:n}=gr(),r=(0,t.useContext)(_r).dispatch;return mt("div",{children:[mt("div",{className:"vm-server-configurator__title",children:"Markdown Parsing for Logs"}),mt(jr,{label:n?"Disable markdown parsing":"Enable markdown parsing",value:n,onChange:e=>{r({type:"SET_MARKDOWN_PARSING",payload:e})},fullWidth:e}),mt("div",{className:"vm-server-configurator__info",children:"Toggle this switch to enable or disable the Markdown formatting for log entries. Enabling this will parse log texts to Markdown."})]})},cd="Settings",{REACT_APP_TYPE:ud}={REACT_APP_TYPE:"logs"},dd=ud===Ue.logs,hd=()=>{const{isMobile:e}=br(),n=He(),r=(0,t.useRef)(null),o=(0,t.useRef)(null),a=(0,t.useRef)(null),{value:i,setTrue:l,setFalse:s}=Fr(!1),c=[{show:!n&&!dd,component:mt(Qu,{ref:r,onClose:s})},{show:!dd,component:mt(ed,{ref:o,onClose:s})},{show:dd,component:mt(sd,{})},{show:!0,component:mt(od,{ref:a})},{show:!n,component:mt(ld,{})}].filter((e=>e.show));return mt(pt.FK,{children:[e?mt("div",{className:"vm-mobile-option",onClick:l,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(pn,{})}),mt("div",{className:"vm-mobile-option-text",children:mt("span",{className:"vm-mobile-option-text__label",children:cd})}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Ir,{title:cd,children:mt(Dr,{className:Qn()({"vm-header-button":!n}),variant:"contained",color:"primary",startIcon:mt(pn,{}),onClick:l,ariaLabel:"settings"})}),i&&mt(Br,{title:cd,onClose:s,children:mt("div",{className:Qn()({"vm-server-configurator":!0,"vm-server-configurator_mobile":e}),children:[c.map(((e,t)=>mt("div",{className:"vm-server-configurator__input",children:e.component},t))),mt("div",{className:"vm-server-configurator-footer",children:[mt(Dr,{color:"error",variant:"outlined",onClick:s,children:"Cancel"}),mt(Dr,{color:"primary",variant:"contained",onClick:()=>{r.current&&r.current.handleApply(),o.current&&o.current.handleApply(),a.current&&a.current.handleApply(),s()},children:"Apply"})]})]})})]})},pd=e=>{let{relativeTime:t,setDuration:n}=e;const{isMobile:r}=br();return mt("div",{className:Qn()({"vm-time-duration":!0,"vm-time-duration_mobile":r}),children:Ft.map((e=>{let{id:o,duration:a,until:i,title:l}=e;return mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_mobile":r,"vm-list-item_active":o===t}),onClick:(s={duration:a,until:i(),id:o},()=>{n(s)}),children:l||a},o);var s}))})},fd=e=>{let{viewDate:t,showArrowNav:n,onChangeViewDate:r,toggleDisplayYears:o}=e;return mt("div",{className:"vm-calendar-header",children:[mt("div",{className:"vm-calendar-header-left",onClick:o,children:[mt("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),mt("div",{className:"vm-calendar-header-left__select-year",children:mt(kn,{})})]}),n&&mt("div",{className:"vm-calendar-header-right",children:[mt("div",{className:"vm-calendar-header-right__prev",onClick:()=>{r(t.subtract(1,"month"))},children:mt(wn,{})}),mt("div",{className:"vm-calendar-header-right__next",onClick:()=>{r(t.add(1,"month"))},children:mt(wn,{})})]})]})},md=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],_d=e=>{let{viewDate:n,selectDate:r,onChangeSelectDate:a}=e;const i="YYYY-MM-DD",l=o().tz(),s=o()(n.format(i)),c=(0,t.useMemo)((()=>{const e=new Array(42).fill(null),t=s.startOf("month"),n=s.endOf("month").diff(t,"day")+1,r=new Array(n).fill(t).map(((e,t)=>e.add(t,"day"))),o=t.day();return e.splice(o,n,...r),e}),[s]),u=e=>()=>{e&&a(e)};return mt("div",{className:"vm-calendar-body",children:[md.map((e=>mt(Ir,{title:e,children:mt("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]})},e))),c.map(((e,t)=>mt("div",{className:Qn()({"vm-calendar-body-cell":!0,"vm-calendar-body-cell_day":!0,"vm-calendar-body-cell_day_empty":!e,"vm-calendar-body-cell_day_active":(e&&e.format(i))===r.format(i),"vm-calendar-body-cell_day_today":(e&&e.format(i))===l.format(i)}),onClick:u(e),children:e&&e.format("D")},e?e.format(i):t)))]})},gd=e=>{let{viewDate:n,onChangeViewDate:r}=e;const a=o()().format("YYYY"),i=(0,t.useMemo)((()=>n.format("YYYY")),[n]),l=(0,t.useMemo)((()=>{const e=o()().subtract(9,"year");return new Array(18).fill(e).map(((e,t)=>e.add(t,"year")))}),[n]);(0,t.useEffect)((()=>{const e=document.getElementById(`vm-calendar-year-${i}`);e&&e.scrollIntoView({block:"center"})}),[]);return mt("div",{className:"vm-calendar-years",children:l.map((e=>{return mt("div",{className:Qn()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===i,"vm-calendar-years__year_today":e.format("YYYY")===a}),id:`vm-calendar-year-${e.format("YYYY")}`,onClick:(t=e,()=>{r(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})},vd=e=>{let{viewDate:n,selectDate:r,onChangeViewDate:a}=e;const i=o()().format("MM"),l=(0,t.useMemo)((()=>r.format("MM")),[r]),s=(0,t.useMemo)((()=>new Array(12).fill("").map(((e,t)=>o()(n).month(t)))),[n]);(0,t.useEffect)((()=>{const e=document.getElementById(`vm-calendar-year-${l}`);e&&e.scrollIntoView({block:"center"})}),[]);return mt("div",{className:"vm-calendar-years",children:s.map((e=>{return mt("div",{className:Qn()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("MM")===l,"vm-calendar-years__year_today":e.format("MM")===i}),id:`vm-calendar-year-${e.format("MM")}`,onClick:(t=e,()=>{a(t)}),children:e.format("MMMM")},e.format("MM"));var t}))})};var yd=function(e){return e[e.days=0]="days",e[e.months=1]="months",e[e.years=2]="years",e}(yd||{});const bd=e=>{let{date:n,format:r=wt,onChange:a}=e;const[i,l]=(0,t.useState)(yd.days),[s,c]=(0,t.useState)(o().tz(n)),[u,d]=(0,t.useState)(o().tz(n)),h=o().tz(),p=h.format(bt)===s.format(bt),{isMobile:f}=br(),m=e=>{c(e),l((e=>e===yd.years?yd.months:yd.days))};return(0,t.useEffect)((()=>{u.format()!==o().tz(n).format()&&a(u.format(r))}),[u]),(0,t.useEffect)((()=>{const e=o().tz(n);c(e),d(e)}),[n]),mt("div",{className:Qn()({"vm-calendar":!0,"vm-calendar_mobile":f}),children:[mt(fd,{viewDate:s,onChangeViewDate:m,toggleDisplayYears:()=>{l((e=>e===yd.years?yd.days:yd.years))},showArrowNav:i===yd.days}),i===yd.days&&mt(_d,{viewDate:s,selectDate:u,onChangeSelectDate:e=>{d(e)}}),i===yd.years&&mt(gd,{viewDate:s,onChangeViewDate:m}),i===yd.months&&mt(vd,{selectDate:u,viewDate:s,onChangeViewDate:m}),!p&&i===yd.days&&mt("div",{className:"vm-calendar-footer",children:mt(Dr,{variant:"text",size:"small",onClick:()=>{c(h)},children:"show today"})})]})},wd=(0,t.forwardRef)(((e,n)=>{let{date:r,targetRef:a,format:i=wt,onChange:l,label:s}=e;const c=(0,t.useMemo)((()=>o()(r).isValid()?o().tz(r):o()().tz()),[r]),{isMobile:u}=br(),{value:d,toggle:h,setFalse:p}=Fr(!1);return er("click",h,a),er("keyup",(e=>{"Escape"!==e.key&&"Enter"!==e.key||p()})),mt(pt.FK,{children:mt(Xr,{open:d,buttonRef:a,placement:"bottom-right",onClose:p,title:u?s:void 0,children:mt("div",{ref:n,children:mt(bd,{date:c,format:i,onChange:e=>{l(e),p()}})})})})}));var kd=n(494),xd=n.n(kd);const Sd=e=>o()(e).isValid()?o().tz(e).format(wt):e,Cd=e=>{let{value:n="",label:r,pickerLabel:a,pickerRef:i,onChange:l,onEnter:s}=e;const c=(0,t.useRef)(null),[u,d]=(0,t.useState)(null),[h,p]=(0,t.useState)(Sd(n)),[f,m]=(0,t.useState)(!1),[_,g]=(0,t.useState)(!1),v=o()(h).isValid()?"":"Invalid date format";return(0,t.useEffect)((()=>{const e=Sd(n);e!==h&&p(e),_&&(s(),g(!1))}),[n]),(0,t.useEffect)((()=>{f&&u&&(u.focus(),u.setSelectionRange(11,11),m(!1))}),[f]),mt("div",{className:Qn()({"vm-date-time-input":!0,"vm-date-time-input_error":v}),children:[mt("label",{children:r}),mt(xd(),{tabIndex:1,inputRef:d,mask:"9999-99-99 99:99:99",placeholder:"YYYY-MM-DD HH:mm:ss",value:h,autoCapitalize:"none",inputMode:"numeric",maskChar:null,onChange:e=>{p(e.currentTarget.value)},onBlur:()=>{l(h)},onKeyUp:e=>{"Enter"===e.key&&(l(h),g(!0))}}),v&&mt("span",{className:"vm-date-time-input__error-text",children:v}),mt("div",{className:"vm-date-time-input__icon",ref:c,children:mt(Dr,{variant:"text",color:"gray",size:"small",startIcon:mt(Sn,{}),ariaLabel:"calendar"})}),mt(wd,{label:a,ref:i,date:h,onChange:e=>{p(e),m(!0)},targetRef:c})]})};const Ad=function(e){const n=(0,t.useRef)();return(0,t.useEffect)((()=>{n.current=e}),[e]),n.current},Ed=()=>{const{isMobile:e}=br(),{isDarkTheme:n}=gt(),r=(0,t.useRef)(null),a=tr(),i=(0,t.useMemo)((()=>a.width>1120),[a]),[l,s]=(0,t.useState)(),[c,u]=(0,t.useState)(),{period:{end:d,start:h},relativeTime:p,timezone:f,duration:m}=Gt(),_=Qt(),g=He(),v=Ad(f),{value:y,toggle:b,setFalse:w}=Fr(!1),k=(0,t.useMemo)((()=>({region:f,utc:Vt(f)})),[f]);(0,t.useEffect)((()=>{s(Rt(It(d)))}),[f,d]),(0,t.useEffect)((()=>{u(Rt(It(h)))}),[f,h]);const x=e=>{let{duration:t,until:n,id:r}=e;_({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),w()},S=(0,t.useMemo)((()=>({start:o().tz(It(h)).format(wt),end:o().tz(It(d)).format(wt)})),[h,d,f]),C=(0,t.useMemo)((()=>p&&"none"!==p?p.replace(/_/g," "):`${S.start} - ${S.end}`),[p,S]),A=(0,t.useRef)(null),E=(0,t.useRef)(null),M=(0,t.useRef)(null),N=()=>{c&&l&&_({type:"SET_PERIOD",payload:{from:o().tz(c).toDate(),to:o().tz(l).toDate()}}),w()};return(0,t.useEffect)((()=>{const e=Ht({relativeTimeId:p,defaultDuration:m,defaultEndInput:It(d)});v&&f!==v&&x({id:e.relativeTimeId,duration:e.duration,until:e.endInput})}),[f,v]),Jr(r,(t=>{var n,r;if(e)return;const o=t.target,a=(null===A||void 0===A?void 0:A.current)&&(null===A||void 0===A||null===(n=A.current)||void 0===n?void 0:n.contains(o)),i=(null===E||void 0===E?void 0:E.current)&&(null===E||void 0===E||null===(r=E.current)||void 0===r?void 0:r.contains(o));a||i||w()})),mt(pt.FK,{children:[mt("div",{ref:M,children:e?mt("div",{className:"vm-mobile-option",onClick:b,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(xn,{})}),mt("div",{className:"vm-mobile-option-text",children:[mt("span",{className:"vm-mobile-option-text__label",children:"Time range"}),mt("span",{className:"vm-mobile-option-text__value",children:C})]}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Ir,{title:i?"Time range controls":C,children:mt(Dr,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:mt(xn,{}),onClick:b,ariaLabel:"time range controls",children:i&&mt("span",{children:C})})})}),mt(Xr,{open:y,buttonRef:M,placement:"bottom-right",onClose:w,clickOutside:!1,title:e?"Time range controls":"",children:mt("div",{className:Qn()({"vm-time-selector":!0,"vm-time-selector_mobile":e}),ref:r,children:[mt("div",{className:"vm-time-selector-left",children:[mt("div",{className:Qn()({"vm-time-selector-left-inputs":!0,"vm-time-selector-left-inputs_dark":n}),children:[mt(Cd,{value:c,label:"From:",pickerLabel:"Date From",pickerRef:A,onChange:u,onEnter:N}),mt(Cd,{value:l,label:"To:",pickerLabel:"Date To",pickerRef:E,onChange:s,onEnter:N})]}),mt("div",{className:"vm-time-selector-left-timezone",children:[mt("div",{className:"vm-time-selector-left-timezone__title",children:k.region}),mt("div",{className:"vm-time-selector-left-timezone__utc",children:k.utc})]}),mt(Dr,{variant:"text",startIcon:mt(Cn,{}),onClick:()=>_({type:"RUN_QUERY_TO_NOW"}),children:"switch to now"}),mt("div",{className:"vm-time-selector-left__controls",children:[mt(Dr,{color:"error",variant:"outlined",onClick:()=>{s(Rt(It(d))),u(Rt(It(h))),w()},children:"Cancel"}),mt(Dr,{color:"primary",onClick:N,children:"Apply"})]})]}),mt(pd,{relativeTime:p||"",setDuration:x})]})})]})},Md=()=>{const e=He(),{isMobile:n}=br(),r=Qt(),[o,a]=je(),[i,l]=Lr("0","accountID"),[s,c]=Lr("0","projectID"),u=`${i}:${s}`,d=(0,t.useRef)(null),{value:h,toggle:p,setFalse:f}=Fr(!1);return(0,t.useEffect)((()=>{h||(l(o.get("accountID")||"0"),c(o.get("projectID")||"0"))}),[h]),mt("div",{className:"vm-tenant-input",children:[mt(Ir,{title:"Define Tenant ID if you need request to another storage",children:mt("div",{ref:d,children:n?mt("div",{className:"vm-mobile-option",onClick:p,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(In,{})}),mt("div",{className:"vm-mobile-option-text",children:[mt("span",{className:"vm-mobile-option-text__label",children:"Tenant ID"}),mt("span",{className:"vm-mobile-option-text__value",children:u})]}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Dr,{className:e?"":"vm-header-button",variant:"contained",color:"primary",fullWidth:!0,startIcon:mt(In,{}),endIcon:mt("div",{className:Qn()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":h}),children:mt(wn,{})}),onClick:p,children:u})})}),mt(Xr,{open:h,placement:"bottom-right",onClose:f,buttonRef:d,title:n?"Define Tenant ID":void 0,children:mt("div",{className:Qn()({"vm-list vm-tenant-input-list":!0,"vm-list vm-tenant-input-list_mobile":n,"vm-tenant-input-list_inline":!0}),children:[mt(Vr,{autofocus:!0,label:"accountID",value:i,onChange:l,type:"number"}),mt(Vr,{autofocus:!0,label:"projectID",value:s,onChange:c,type:"number"}),mt("div",{className:"vm-tenant-input-list__buttons",children:[mt(Ir,{title:"Multitenancy in VictoriaLogs documentation",children:mt("a",{href:"https://docs.victoriametrics.com/victorialogs/#multitenancy",target:"_blank",rel:"help noreferrer",children:mt(Dr,{variant:"text",color:"gray",startIcon:mt(zn,{})})})}),mt(Dr,{variant:"contained",color:"primary",onClick:()=>{o.set("accountID",i),o.set("projectID",s),a(o),f(),r({type:"RUN_QUERY"})},children:"Apply"})]})]})})]})},Nd=[{seconds:0,title:"Off"},{seconds:1,title:"1s"},{seconds:2,title:"2s"},{seconds:5,title:"5s"},{seconds:10,title:"10s"},{seconds:30,title:"30s"},{seconds:60,title:"1m"},{seconds:300,title:"5m"},{seconds:900,title:"15m"},{seconds:1800,title:"30m"},{seconds:3600,title:"1h"},{seconds:7200,title:"2h"}],Td=()=>{const{isMobile:e}=br(),n=Qt(),r=He(),[o,a]=(0,t.useState)(!1),[i,l]=(0,t.useState)(Nd[0]),{value:s,toggle:c,setFalse:u}=Fr(!1),d=(0,t.useRef)(null);(0,t.useEffect)((()=>{const e=i.seconds;let t;return o?t=setInterval((()=>{n({type:"RUN_QUERY"})}),1e3*e):l(Nd[0]),()=>{t&&clearInterval(t)}}),[i,o]);const h=e=>()=>{(e=>{(o&&!e.seconds||!o&&e.seconds)&&a((e=>!e)),l(e),u()})(e)};return mt(pt.FK,{children:[mt("div",{className:"vm-execution-controls",children:mt("div",{className:Qn()({"vm-execution-controls-buttons":!0,"vm-execution-controls-buttons_mobile":e,"vm-header-button":!r}),children:[!e&&mt(Ir,{title:"Refresh dashboard",children:mt(Dr,{variant:"contained",color:"primary",onClick:()=>{n({type:"RUN_QUERY"})},startIcon:mt(bn,{}),ariaLabel:"refresh dashboard"})}),e?mt("div",{className:"vm-mobile-option",onClick:c,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(mn,{})}),mt("div",{className:"vm-mobile-option-text",children:[mt("span",{className:"vm-mobile-option-text__label",children:"Auto-refresh"}),mt("span",{className:"vm-mobile-option-text__value",children:i.title})]}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Ir,{title:"Auto-refresh control",children:mt("div",{ref:d,children:mt(Dr,{variant:"contained",color:"primary",fullWidth:!0,endIcon:mt("div",{className:Qn()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":s}),children:mt(wn,{})}),onClick:c,children:i.title})})})]})}),mt(Xr,{open:s,placement:"bottom-right",onClose:u,buttonRef:d,title:e?"Auto-refresh duration":void 0,children:mt("div",{className:Qn()({"vm-execution-controls-list":!0,"vm-execution-controls-list_mobile":e}),children:Nd.map((t=>mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_mobile":e,"vm-list-item_active":t.seconds===i.seconds}),onClick:h(t),children:t.title},t.seconds)))})})]})},$d=e=>{let{isMobile:t}=e;return mt("div",{className:Qn()({"vm-header-controls":!0,"vm-header-controls_mobile":t}),children:[mt(Md,{}),mt(Ed,{}),mt(Td,{}),mt(hd,{})]})},Pd=(Boolean(We("DISABLED_DEFAULT_TIMEZONE")),()=>{const{serverUrl:e}=gt(),[n,r]=(Qt(),(0,t.useState)(!1)),[o,a]=(0,t.useState)(""),i=async()=>{};return(0,t.useEffect)((()=>{i()}),[e]),{isLoading:n,error:o}}),Dd=()=>{const e=He(),{isMobile:n}=br(),{pathname:r}=ne();Pd();return(0,t.useEffect)((()=>{var e;const t="vmui for VictoriaLogs",n=null===(e=pu[fu.logs])||void 0===e?void 0:e.title;document.title=n?`${n} - ${t}`:t}),[r]),mt("section",{className:"vm-container",children:[mt(Bu,{controlsComponent:$d}),mt("div",{className:Qn()({"vm-container-body":!0,"vm-container-body_mobile":n,"vm-container-body_app":e}),children:mt(ye,{})}),!e&&mt(Ku,{links:Wu})]})},Od={unicode:!1,renderer:void 0};da.use(function(e){if(!(e={...Od,...e}).emojis)throw new Error("Must provide emojis to markedEmoji");const t=Object.keys(e.emojis).map((e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))).join("|"),n=new RegExp(`:(${t}):`),r=new RegExp(`^${n.source}`);return{extensions:[{name:"emoji",level:"inline",start:e=>e.match(n)?.index,tokenizer(t,n){const o=r.exec(t);if(!o)return;const a=o[1];let i=e.emojis[a],l=e.renderer?void 0:e.unicode;if("string"!==typeof i&&!e.renderer)if("string"===typeof i.char)i=i.char,l=!0;else{if("string"!==typeof i.url)return;i=i.url,l=!1}return{type:"emoji",raw:o[0],name:a,emoji:i,unicode:l}},renderer:t=>e.renderer?e.renderer(t):t.unicode?t.emoji:`${t.name}`}]}}({emojis:{100:"\ud83d\udcaf",1234:"\ud83d\udd22",grinning:"\ud83d\ude00",smiley:"\ud83d\ude03",smile:"\ud83d\ude04",grin:"\ud83d\ude01",laughing:"\ud83d\ude06",satisfied:"\ud83d\ude06",sweat_smile:"\ud83d\ude05",rofl:"\ud83e\udd23",joy:"\ud83d\ude02",slightly_smiling_face:"\ud83d\ude42",upside_down_face:"\ud83d\ude43",melting_face:"\ud83e\udee0",wink:"\ud83d\ude09",blush:"\ud83d\ude0a",innocent:"\ud83d\ude07",smiling_face_with_three_hearts:"\ud83e\udd70",heart_eyes:"\ud83d\ude0d",star_struck:"\ud83e\udd29",kissing_heart:"\ud83d\ude18",kissing:"\ud83d\ude17",relaxed:"\u263a\ufe0f",kissing_closed_eyes:"\ud83d\ude1a",kissing_smiling_eyes:"\ud83d\ude19",smiling_face_with_tear:"\ud83e\udd72",yum:"\ud83d\ude0b",stuck_out_tongue:"\ud83d\ude1b",stuck_out_tongue_winking_eye:"\ud83d\ude1c",zany_face:"\ud83e\udd2a",stuck_out_tongue_closed_eyes:"\ud83d\ude1d",money_mouth_face:"\ud83e\udd11",hugs:"\ud83e\udd17",hand_over_mouth:"\ud83e\udd2d",face_with_open_eyes_and_hand_over_mouth:"\ud83e\udee2",face_with_peeking_eye:"\ud83e\udee3",shushing_face:"\ud83e\udd2b",thinking:"\ud83e\udd14",saluting_face:"\ud83e\udee1",zipper_mouth_face:"\ud83e\udd10",raised_eyebrow:"\ud83e\udd28",neutral_face:"\ud83d\ude10",expressionless:"\ud83d\ude11",no_mouth:"\ud83d\ude36",dotted_line_face:"\ud83e\udee5",face_in_clouds:"\ud83d\ude36\u200d\ud83c\udf2b\ufe0f",smirk:"\ud83d\ude0f",unamused:"\ud83d\ude12",roll_eyes:"\ud83d\ude44",grimacing:"\ud83d\ude2c",face_exhaling:"\ud83d\ude2e\u200d\ud83d\udca8",lying_face:"\ud83e\udd25",shaking_face:"\ud83e\udee8",relieved:"\ud83d\ude0c",pensive:"\ud83d\ude14",sleepy:"\ud83d\ude2a",drooling_face:"\ud83e\udd24",sleeping:"\ud83d\ude34",mask:"\ud83d\ude37",face_with_thermometer:"\ud83e\udd12",face_with_head_bandage:"\ud83e\udd15",nauseated_face:"\ud83e\udd22",vomiting_face:"\ud83e\udd2e",sneezing_face:"\ud83e\udd27",hot_face:"\ud83e\udd75",cold_face:"\ud83e\udd76",woozy_face:"\ud83e\udd74",dizzy_face:"\ud83d\ude35",face_with_spiral_eyes:"\ud83d\ude35\u200d\ud83d\udcab",exploding_head:"\ud83e\udd2f",cowboy_hat_face:"\ud83e\udd20",partying_face:"\ud83e\udd73",disguised_face:"\ud83e\udd78",sunglasses:"\ud83d\ude0e",nerd_face:"\ud83e\udd13",monocle_face:"\ud83e\uddd0",confused:"\ud83d\ude15",face_with_diagonal_mouth:"\ud83e\udee4",worried:"\ud83d\ude1f",slightly_frowning_face:"\ud83d\ude41",frowning_face:"\u2639\ufe0f",open_mouth:"\ud83d\ude2e",hushed:"\ud83d\ude2f",astonished:"\ud83d\ude32",flushed:"\ud83d\ude33",pleading_face:"\ud83e\udd7a",face_holding_back_tears:"\ud83e\udd79",frowning:"\ud83d\ude26",anguished:"\ud83d\ude27",fearful:"\ud83d\ude28",cold_sweat:"\ud83d\ude30",disappointed_relieved:"\ud83d\ude25",cry:"\ud83d\ude22",sob:"\ud83d\ude2d",scream:"\ud83d\ude31",confounded:"\ud83d\ude16",persevere:"\ud83d\ude23",disappointed:"\ud83d\ude1e",sweat:"\ud83d\ude13",weary:"\ud83d\ude29",tired_face:"\ud83d\ude2b",yawning_face:"\ud83e\udd71",triumph:"\ud83d\ude24",rage:"\ud83d\ude21",pout:"\ud83d\ude21",angry:"\ud83d\ude20",cursing_face:"\ud83e\udd2c",smiling_imp:"\ud83d\ude08",imp:"\ud83d\udc7f",skull:"\ud83d\udc80",skull_and_crossbones:"\u2620\ufe0f",hankey:"\ud83d\udca9",poop:"\ud83d\udca9",shit:"\ud83d\udca9",clown_face:"\ud83e\udd21",japanese_ogre:"\ud83d\udc79",japanese_goblin:"\ud83d\udc7a",ghost:"\ud83d\udc7b",alien:"\ud83d\udc7d",space_invader:"\ud83d\udc7e",robot:"\ud83e\udd16",smiley_cat:"\ud83d\ude3a",smile_cat:"\ud83d\ude38",joy_cat:"\ud83d\ude39",heart_eyes_cat:"\ud83d\ude3b",smirk_cat:"\ud83d\ude3c",kissing_cat:"\ud83d\ude3d",scream_cat:"\ud83d\ude40",crying_cat_face:"\ud83d\ude3f",pouting_cat:"\ud83d\ude3e",see_no_evil:"\ud83d\ude48",hear_no_evil:"\ud83d\ude49",speak_no_evil:"\ud83d\ude4a",love_letter:"\ud83d\udc8c",cupid:"\ud83d\udc98",gift_heart:"\ud83d\udc9d",sparkling_heart:"\ud83d\udc96",heartpulse:"\ud83d\udc97",heartbeat:"\ud83d\udc93",revolving_hearts:"\ud83d\udc9e",two_hearts:"\ud83d\udc95",heart_decoration:"\ud83d\udc9f",heavy_heart_exclamation:"\u2763\ufe0f",broken_heart:"\ud83d\udc94",heart_on_fire:"\u2764\ufe0f\u200d\ud83d\udd25",mending_heart:"\u2764\ufe0f\u200d\ud83e\ude79",heart:"\u2764\ufe0f",pink_heart:"\ud83e\ude77",orange_heart:"\ud83e\udde1",yellow_heart:"\ud83d\udc9b",green_heart:"\ud83d\udc9a",blue_heart:"\ud83d\udc99",light_blue_heart:"\ud83e\ude75",purple_heart:"\ud83d\udc9c",brown_heart:"\ud83e\udd0e",black_heart:"\ud83d\udda4",grey_heart:"\ud83e\ude76",white_heart:"\ud83e\udd0d",kiss:"\ud83d\udc8b",anger:"\ud83d\udca2",boom:"\ud83d\udca5",collision:"\ud83d\udca5",dizzy:"\ud83d\udcab",sweat_drops:"\ud83d\udca6",dash:"\ud83d\udca8",hole:"\ud83d\udd73\ufe0f",speech_balloon:"\ud83d\udcac",eye_speech_bubble:"\ud83d\udc41\ufe0f\u200d\ud83d\udde8\ufe0f",left_speech_bubble:"\ud83d\udde8\ufe0f",right_anger_bubble:"\ud83d\uddef\ufe0f",thought_balloon:"\ud83d\udcad",zzz:"\ud83d\udca4",wave:"\ud83d\udc4b",raised_back_of_hand:"\ud83e\udd1a",raised_hand_with_fingers_splayed:"\ud83d\udd90\ufe0f",hand:"\u270b",raised_hand:"\u270b",vulcan_salute:"\ud83d\udd96",rightwards_hand:"\ud83e\udef1",leftwards_hand:"\ud83e\udef2",palm_down_hand:"\ud83e\udef3",palm_up_hand:"\ud83e\udef4",leftwards_pushing_hand:"\ud83e\udef7",rightwards_pushing_hand:"\ud83e\udef8",ok_hand:"\ud83d\udc4c",pinched_fingers:"\ud83e\udd0c",pinching_hand:"\ud83e\udd0f",v:"\u270c\ufe0f",crossed_fingers:"\ud83e\udd1e",hand_with_index_finger_and_thumb_crossed:"\ud83e\udef0",love_you_gesture:"\ud83e\udd1f",metal:"\ud83e\udd18",call_me_hand:"\ud83e\udd19",point_left:"\ud83d\udc48",point_right:"\ud83d\udc49",point_up_2:"\ud83d\udc46",middle_finger:"\ud83d\udd95",fu:"\ud83d\udd95",point_down:"\ud83d\udc47",point_up:"\u261d\ufe0f",index_pointing_at_the_viewer:"\ud83e\udef5","+1":"\ud83d\udc4d",thumbsup:"\ud83d\udc4d","-1":"\ud83d\udc4e",thumbsdown:"\ud83d\udc4e",fist_raised:"\u270a",fist:"\u270a",fist_oncoming:"\ud83d\udc4a",facepunch:"\ud83d\udc4a",punch:"\ud83d\udc4a",fist_left:"\ud83e\udd1b",fist_right:"\ud83e\udd1c",clap:"\ud83d\udc4f",raised_hands:"\ud83d\ude4c",heart_hands:"\ud83e\udef6",open_hands:"\ud83d\udc50",palms_up_together:"\ud83e\udd32",handshake:"\ud83e\udd1d",pray:"\ud83d\ude4f",writing_hand:"\u270d\ufe0f",nail_care:"\ud83d\udc85",selfie:"\ud83e\udd33",muscle:"\ud83d\udcaa",mechanical_arm:"\ud83e\uddbe",mechanical_leg:"\ud83e\uddbf",leg:"\ud83e\uddb5",foot:"\ud83e\uddb6",ear:"\ud83d\udc42",ear_with_hearing_aid:"\ud83e\uddbb",nose:"\ud83d\udc43",brain:"\ud83e\udde0",anatomical_heart:"\ud83e\udec0",lungs:"\ud83e\udec1",tooth:"\ud83e\uddb7",bone:"\ud83e\uddb4",eyes:"\ud83d\udc40",eye:"\ud83d\udc41\ufe0f",tongue:"\ud83d\udc45",lips:"\ud83d\udc44",biting_lip:"\ud83e\udee6",baby:"\ud83d\udc76",child:"\ud83e\uddd2",boy:"\ud83d\udc66",girl:"\ud83d\udc67",adult:"\ud83e\uddd1",blond_haired_person:"\ud83d\udc71",man:"\ud83d\udc68",bearded_person:"\ud83e\uddd4",man_beard:"\ud83e\uddd4\u200d\u2642\ufe0f",woman_beard:"\ud83e\uddd4\u200d\u2640\ufe0f",red_haired_man:"\ud83d\udc68\u200d\ud83e\uddb0",curly_haired_man:"\ud83d\udc68\u200d\ud83e\uddb1",white_haired_man:"\ud83d\udc68\u200d\ud83e\uddb3",bald_man:"\ud83d\udc68\u200d\ud83e\uddb2",woman:"\ud83d\udc69",red_haired_woman:"\ud83d\udc69\u200d\ud83e\uddb0",person_red_hair:"\ud83e\uddd1\u200d\ud83e\uddb0",curly_haired_woman:"\ud83d\udc69\u200d\ud83e\uddb1",person_curly_hair:"\ud83e\uddd1\u200d\ud83e\uddb1",white_haired_woman:"\ud83d\udc69\u200d\ud83e\uddb3",person_white_hair:"\ud83e\uddd1\u200d\ud83e\uddb3",bald_woman:"\ud83d\udc69\u200d\ud83e\uddb2",person_bald:"\ud83e\uddd1\u200d\ud83e\uddb2",blond_haired_woman:"\ud83d\udc71\u200d\u2640\ufe0f",blonde_woman:"\ud83d\udc71\u200d\u2640\ufe0f",blond_haired_man:"\ud83d\udc71\u200d\u2642\ufe0f",older_adult:"\ud83e\uddd3",older_man:"\ud83d\udc74",older_woman:"\ud83d\udc75",frowning_person:"\ud83d\ude4d",frowning_man:"\ud83d\ude4d\u200d\u2642\ufe0f",frowning_woman:"\ud83d\ude4d\u200d\u2640\ufe0f",pouting_face:"\ud83d\ude4e",pouting_man:"\ud83d\ude4e\u200d\u2642\ufe0f",pouting_woman:"\ud83d\ude4e\u200d\u2640\ufe0f",no_good:"\ud83d\ude45",no_good_man:"\ud83d\ude45\u200d\u2642\ufe0f",ng_man:"\ud83d\ude45\u200d\u2642\ufe0f",no_good_woman:"\ud83d\ude45\u200d\u2640\ufe0f",ng_woman:"\ud83d\ude45\u200d\u2640\ufe0f",ok_person:"\ud83d\ude46",ok_man:"\ud83d\ude46\u200d\u2642\ufe0f",ok_woman:"\ud83d\ude46\u200d\u2640\ufe0f",tipping_hand_person:"\ud83d\udc81",information_desk_person:"\ud83d\udc81",tipping_hand_man:"\ud83d\udc81\u200d\u2642\ufe0f",sassy_man:"\ud83d\udc81\u200d\u2642\ufe0f",tipping_hand_woman:"\ud83d\udc81\u200d\u2640\ufe0f",sassy_woman:"\ud83d\udc81\u200d\u2640\ufe0f",raising_hand:"\ud83d\ude4b",raising_hand_man:"\ud83d\ude4b\u200d\u2642\ufe0f",raising_hand_woman:"\ud83d\ude4b\u200d\u2640\ufe0f",deaf_person:"\ud83e\uddcf",deaf_man:"\ud83e\uddcf\u200d\u2642\ufe0f",deaf_woman:"\ud83e\uddcf\u200d\u2640\ufe0f",bow:"\ud83d\ude47",bowing_man:"\ud83d\ude47\u200d\u2642\ufe0f",bowing_woman:"\ud83d\ude47\u200d\u2640\ufe0f",facepalm:"\ud83e\udd26",man_facepalming:"\ud83e\udd26\u200d\u2642\ufe0f",woman_facepalming:"\ud83e\udd26\u200d\u2640\ufe0f",shrug:"\ud83e\udd37",man_shrugging:"\ud83e\udd37\u200d\u2642\ufe0f",woman_shrugging:"\ud83e\udd37\u200d\u2640\ufe0f",health_worker:"\ud83e\uddd1\u200d\u2695\ufe0f",man_health_worker:"\ud83d\udc68\u200d\u2695\ufe0f",woman_health_worker:"\ud83d\udc69\u200d\u2695\ufe0f",student:"\ud83e\uddd1\u200d\ud83c\udf93",man_student:"\ud83d\udc68\u200d\ud83c\udf93",woman_student:"\ud83d\udc69\u200d\ud83c\udf93",teacher:"\ud83e\uddd1\u200d\ud83c\udfeb",man_teacher:"\ud83d\udc68\u200d\ud83c\udfeb",woman_teacher:"\ud83d\udc69\u200d\ud83c\udfeb",judge:"\ud83e\uddd1\u200d\u2696\ufe0f",man_judge:"\ud83d\udc68\u200d\u2696\ufe0f",woman_judge:"\ud83d\udc69\u200d\u2696\ufe0f",farmer:"\ud83e\uddd1\u200d\ud83c\udf3e",man_farmer:"\ud83d\udc68\u200d\ud83c\udf3e",woman_farmer:"\ud83d\udc69\u200d\ud83c\udf3e",cook:"\ud83e\uddd1\u200d\ud83c\udf73",man_cook:"\ud83d\udc68\u200d\ud83c\udf73",woman_cook:"\ud83d\udc69\u200d\ud83c\udf73",mechanic:"\ud83e\uddd1\u200d\ud83d\udd27",man_mechanic:"\ud83d\udc68\u200d\ud83d\udd27",woman_mechanic:"\ud83d\udc69\u200d\ud83d\udd27",factory_worker:"\ud83e\uddd1\u200d\ud83c\udfed",man_factory_worker:"\ud83d\udc68\u200d\ud83c\udfed",woman_factory_worker:"\ud83d\udc69\u200d\ud83c\udfed",office_worker:"\ud83e\uddd1\u200d\ud83d\udcbc",man_office_worker:"\ud83d\udc68\u200d\ud83d\udcbc",woman_office_worker:"\ud83d\udc69\u200d\ud83d\udcbc",scientist:"\ud83e\uddd1\u200d\ud83d\udd2c",man_scientist:"\ud83d\udc68\u200d\ud83d\udd2c",woman_scientist:"\ud83d\udc69\u200d\ud83d\udd2c",technologist:"\ud83e\uddd1\u200d\ud83d\udcbb",man_technologist:"\ud83d\udc68\u200d\ud83d\udcbb",woman_technologist:"\ud83d\udc69\u200d\ud83d\udcbb",singer:"\ud83e\uddd1\u200d\ud83c\udfa4",man_singer:"\ud83d\udc68\u200d\ud83c\udfa4",woman_singer:"\ud83d\udc69\u200d\ud83c\udfa4",artist:"\ud83e\uddd1\u200d\ud83c\udfa8",man_artist:"\ud83d\udc68\u200d\ud83c\udfa8",woman_artist:"\ud83d\udc69\u200d\ud83c\udfa8",pilot:"\ud83e\uddd1\u200d\u2708\ufe0f",man_pilot:"\ud83d\udc68\u200d\u2708\ufe0f",woman_pilot:"\ud83d\udc69\u200d\u2708\ufe0f",astronaut:"\ud83e\uddd1\u200d\ud83d\ude80",man_astronaut:"\ud83d\udc68\u200d\ud83d\ude80",woman_astronaut:"\ud83d\udc69\u200d\ud83d\ude80",firefighter:"\ud83e\uddd1\u200d\ud83d\ude92",man_firefighter:"\ud83d\udc68\u200d\ud83d\ude92",woman_firefighter:"\ud83d\udc69\u200d\ud83d\ude92",police_officer:"\ud83d\udc6e",cop:"\ud83d\udc6e",policeman:"\ud83d\udc6e\u200d\u2642\ufe0f",policewoman:"\ud83d\udc6e\u200d\u2640\ufe0f",detective:"\ud83d\udd75\ufe0f",male_detective:"\ud83d\udd75\ufe0f\u200d\u2642\ufe0f",female_detective:"\ud83d\udd75\ufe0f\u200d\u2640\ufe0f",guard:"\ud83d\udc82",guardsman:"\ud83d\udc82\u200d\u2642\ufe0f",guardswoman:"\ud83d\udc82\u200d\u2640\ufe0f",ninja:"\ud83e\udd77",construction_worker:"\ud83d\udc77",construction_worker_man:"\ud83d\udc77\u200d\u2642\ufe0f",construction_worker_woman:"\ud83d\udc77\u200d\u2640\ufe0f",person_with_crown:"\ud83e\udec5",prince:"\ud83e\udd34",princess:"\ud83d\udc78",person_with_turban:"\ud83d\udc73",man_with_turban:"\ud83d\udc73\u200d\u2642\ufe0f",woman_with_turban:"\ud83d\udc73\u200d\u2640\ufe0f",man_with_gua_pi_mao:"\ud83d\udc72",woman_with_headscarf:"\ud83e\uddd5",person_in_tuxedo:"\ud83e\udd35",man_in_tuxedo:"\ud83e\udd35\u200d\u2642\ufe0f",woman_in_tuxedo:"\ud83e\udd35\u200d\u2640\ufe0f",person_with_veil:"\ud83d\udc70",man_with_veil:"\ud83d\udc70\u200d\u2642\ufe0f",woman_with_veil:"\ud83d\udc70\u200d\u2640\ufe0f",bride_with_veil:"\ud83d\udc70\u200d\u2640\ufe0f",pregnant_woman:"\ud83e\udd30",pregnant_man:"\ud83e\udec3",pregnant_person:"\ud83e\udec4",breast_feeding:"\ud83e\udd31",woman_feeding_baby:"\ud83d\udc69\u200d\ud83c\udf7c",man_feeding_baby:"\ud83d\udc68\u200d\ud83c\udf7c",person_feeding_baby:"\ud83e\uddd1\u200d\ud83c\udf7c",angel:"\ud83d\udc7c",santa:"\ud83c\udf85",mrs_claus:"\ud83e\udd36",mx_claus:"\ud83e\uddd1\u200d\ud83c\udf84",superhero:"\ud83e\uddb8",superhero_man:"\ud83e\uddb8\u200d\u2642\ufe0f",superhero_woman:"\ud83e\uddb8\u200d\u2640\ufe0f",supervillain:"\ud83e\uddb9",supervillain_man:"\ud83e\uddb9\u200d\u2642\ufe0f",supervillain_woman:"\ud83e\uddb9\u200d\u2640\ufe0f",mage:"\ud83e\uddd9",mage_man:"\ud83e\uddd9\u200d\u2642\ufe0f",mage_woman:"\ud83e\uddd9\u200d\u2640\ufe0f",fairy:"\ud83e\uddda",fairy_man:"\ud83e\uddda\u200d\u2642\ufe0f",fairy_woman:"\ud83e\uddda\u200d\u2640\ufe0f",vampire:"\ud83e\udddb",vampire_man:"\ud83e\udddb\u200d\u2642\ufe0f",vampire_woman:"\ud83e\udddb\u200d\u2640\ufe0f",merperson:"\ud83e\udddc",merman:"\ud83e\udddc\u200d\u2642\ufe0f",mermaid:"\ud83e\udddc\u200d\u2640\ufe0f",elf:"\ud83e\udddd",elf_man:"\ud83e\udddd\u200d\u2642\ufe0f",elf_woman:"\ud83e\udddd\u200d\u2640\ufe0f",genie:"\ud83e\uddde",genie_man:"\ud83e\uddde\u200d\u2642\ufe0f",genie_woman:"\ud83e\uddde\u200d\u2640\ufe0f",zombie:"\ud83e\udddf",zombie_man:"\ud83e\udddf\u200d\u2642\ufe0f",zombie_woman:"\ud83e\udddf\u200d\u2640\ufe0f",troll:"\ud83e\uddcc",massage:"\ud83d\udc86",massage_man:"\ud83d\udc86\u200d\u2642\ufe0f",massage_woman:"\ud83d\udc86\u200d\u2640\ufe0f",haircut:"\ud83d\udc87",haircut_man:"\ud83d\udc87\u200d\u2642\ufe0f",haircut_woman:"\ud83d\udc87\u200d\u2640\ufe0f",walking:"\ud83d\udeb6",walking_man:"\ud83d\udeb6\u200d\u2642\ufe0f",walking_woman:"\ud83d\udeb6\u200d\u2640\ufe0f",standing_person:"\ud83e\uddcd",standing_man:"\ud83e\uddcd\u200d\u2642\ufe0f",standing_woman:"\ud83e\uddcd\u200d\u2640\ufe0f",kneeling_person:"\ud83e\uddce",kneeling_man:"\ud83e\uddce\u200d\u2642\ufe0f",kneeling_woman:"\ud83e\uddce\u200d\u2640\ufe0f",person_with_probing_cane:"\ud83e\uddd1\u200d\ud83e\uddaf",man_with_probing_cane:"\ud83d\udc68\u200d\ud83e\uddaf",woman_with_probing_cane:"\ud83d\udc69\u200d\ud83e\uddaf",person_in_motorized_wheelchair:"\ud83e\uddd1\u200d\ud83e\uddbc",man_in_motorized_wheelchair:"\ud83d\udc68\u200d\ud83e\uddbc",woman_in_motorized_wheelchair:"\ud83d\udc69\u200d\ud83e\uddbc",person_in_manual_wheelchair:"\ud83e\uddd1\u200d\ud83e\uddbd",man_in_manual_wheelchair:"\ud83d\udc68\u200d\ud83e\uddbd",woman_in_manual_wheelchair:"\ud83d\udc69\u200d\ud83e\uddbd",runner:"\ud83c\udfc3",running:"\ud83c\udfc3",running_man:"\ud83c\udfc3\u200d\u2642\ufe0f",running_woman:"\ud83c\udfc3\u200d\u2640\ufe0f",woman_dancing:"\ud83d\udc83",dancer:"\ud83d\udc83",man_dancing:"\ud83d\udd7a",business_suit_levitating:"\ud83d\udd74\ufe0f",dancers:"\ud83d\udc6f",dancing_men:"\ud83d\udc6f\u200d\u2642\ufe0f",dancing_women:"\ud83d\udc6f\u200d\u2640\ufe0f",sauna_person:"\ud83e\uddd6",sauna_man:"\ud83e\uddd6\u200d\u2642\ufe0f",sauna_woman:"\ud83e\uddd6\u200d\u2640\ufe0f",climbing:"\ud83e\uddd7",climbing_man:"\ud83e\uddd7\u200d\u2642\ufe0f",climbing_woman:"\ud83e\uddd7\u200d\u2640\ufe0f",person_fencing:"\ud83e\udd3a",horse_racing:"\ud83c\udfc7",skier:"\u26f7\ufe0f",snowboarder:"\ud83c\udfc2",golfing:"\ud83c\udfcc\ufe0f",golfing_man:"\ud83c\udfcc\ufe0f\u200d\u2642\ufe0f",golfing_woman:"\ud83c\udfcc\ufe0f\u200d\u2640\ufe0f",surfer:"\ud83c\udfc4",surfing_man:"\ud83c\udfc4\u200d\u2642\ufe0f",surfing_woman:"\ud83c\udfc4\u200d\u2640\ufe0f",rowboat:"\ud83d\udea3",rowing_man:"\ud83d\udea3\u200d\u2642\ufe0f",rowing_woman:"\ud83d\udea3\u200d\u2640\ufe0f",swimmer:"\ud83c\udfca",swimming_man:"\ud83c\udfca\u200d\u2642\ufe0f",swimming_woman:"\ud83c\udfca\u200d\u2640\ufe0f",bouncing_ball_person:"\u26f9\ufe0f",bouncing_ball_man:"\u26f9\ufe0f\u200d\u2642\ufe0f",basketball_man:"\u26f9\ufe0f\u200d\u2642\ufe0f",bouncing_ball_woman:"\u26f9\ufe0f\u200d\u2640\ufe0f",basketball_woman:"\u26f9\ufe0f\u200d\u2640\ufe0f",weight_lifting:"\ud83c\udfcb\ufe0f",weight_lifting_man:"\ud83c\udfcb\ufe0f\u200d\u2642\ufe0f",weight_lifting_woman:"\ud83c\udfcb\ufe0f\u200d\u2640\ufe0f",bicyclist:"\ud83d\udeb4",biking_man:"\ud83d\udeb4\u200d\u2642\ufe0f",biking_woman:"\ud83d\udeb4\u200d\u2640\ufe0f",mountain_bicyclist:"\ud83d\udeb5",mountain_biking_man:"\ud83d\udeb5\u200d\u2642\ufe0f",mountain_biking_woman:"\ud83d\udeb5\u200d\u2640\ufe0f",cartwheeling:"\ud83e\udd38",man_cartwheeling:"\ud83e\udd38\u200d\u2642\ufe0f",woman_cartwheeling:"\ud83e\udd38\u200d\u2640\ufe0f",wrestling:"\ud83e\udd3c",men_wrestling:"\ud83e\udd3c\u200d\u2642\ufe0f",women_wrestling:"\ud83e\udd3c\u200d\u2640\ufe0f",water_polo:"\ud83e\udd3d",man_playing_water_polo:"\ud83e\udd3d\u200d\u2642\ufe0f",woman_playing_water_polo:"\ud83e\udd3d\u200d\u2640\ufe0f",handball_person:"\ud83e\udd3e",man_playing_handball:"\ud83e\udd3e\u200d\u2642\ufe0f",woman_playing_handball:"\ud83e\udd3e\u200d\u2640\ufe0f",juggling_person:"\ud83e\udd39",man_juggling:"\ud83e\udd39\u200d\u2642\ufe0f",woman_juggling:"\ud83e\udd39\u200d\u2640\ufe0f",lotus_position:"\ud83e\uddd8",lotus_position_man:"\ud83e\uddd8\u200d\u2642\ufe0f",lotus_position_woman:"\ud83e\uddd8\u200d\u2640\ufe0f",bath:"\ud83d\udec0",sleeping_bed:"\ud83d\udecc",people_holding_hands:"\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1",two_women_holding_hands:"\ud83d\udc6d",couple:"\ud83d\udc6b",two_men_holding_hands:"\ud83d\udc6c",couplekiss:"\ud83d\udc8f",couplekiss_man_woman:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68",couplekiss_man_man:"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68",couplekiss_woman_woman:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69",couple_with_heart:"\ud83d\udc91",couple_with_heart_woman_man:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc68",couple_with_heart_man_man:"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68",couple_with_heart_woman_woman:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc69",family:"\ud83d\udc6a",family_man_woman_boy:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66",family_man_woman_girl:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67",family_man_woman_girl_boy:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",family_man_woman_boy_boy:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",family_man_woman_girl_girl:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",family_man_man_boy:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66",family_man_man_girl:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67",family_man_man_girl_boy:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc66",family_man_man_boy_boy:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66",family_man_man_girl_girl:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc67",family_woman_woman_boy:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66",family_woman_woman_girl:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67",family_woman_woman_girl_boy:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",family_woman_woman_boy_boy:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",family_woman_woman_girl_girl:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",family_man_boy:"\ud83d\udc68\u200d\ud83d\udc66",family_man_boy_boy:"\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66",family_man_girl:"\ud83d\udc68\u200d\ud83d\udc67",family_man_girl_boy:"\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc66",family_man_girl_girl:"\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc67",family_woman_boy:"\ud83d\udc69\u200d\ud83d\udc66",family_woman_boy_boy:"\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",family_woman_girl:"\ud83d\udc69\u200d\ud83d\udc67",family_woman_girl_boy:"\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",family_woman_girl_girl:"\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",speaking_head:"\ud83d\udde3\ufe0f",bust_in_silhouette:"\ud83d\udc64",busts_in_silhouette:"\ud83d\udc65",people_hugging:"\ud83e\udec2",footprints:"\ud83d\udc63",monkey_face:"\ud83d\udc35",monkey:"\ud83d\udc12",gorilla:"\ud83e\udd8d",orangutan:"\ud83e\udda7",dog:"\ud83d\udc36",dog2:"\ud83d\udc15",guide_dog:"\ud83e\uddae",service_dog:"\ud83d\udc15\u200d\ud83e\uddba",poodle:"\ud83d\udc29",wolf:"\ud83d\udc3a",fox_face:"\ud83e\udd8a",raccoon:"\ud83e\udd9d",cat:"\ud83d\udc31",cat2:"\ud83d\udc08",black_cat:"\ud83d\udc08\u200d\u2b1b",lion:"\ud83e\udd81",tiger:"\ud83d\udc2f",tiger2:"\ud83d\udc05",leopard:"\ud83d\udc06",horse:"\ud83d\udc34",moose:"\ud83e\udece",donkey:"\ud83e\udecf",racehorse:"\ud83d\udc0e",unicorn:"\ud83e\udd84",zebra:"\ud83e\udd93",deer:"\ud83e\udd8c",bison:"\ud83e\uddac",cow:"\ud83d\udc2e",ox:"\ud83d\udc02",water_buffalo:"\ud83d\udc03",cow2:"\ud83d\udc04",pig:"\ud83d\udc37",pig2:"\ud83d\udc16",boar:"\ud83d\udc17",pig_nose:"\ud83d\udc3d",ram:"\ud83d\udc0f",sheep:"\ud83d\udc11",goat:"\ud83d\udc10",dromedary_camel:"\ud83d\udc2a",camel:"\ud83d\udc2b",llama:"\ud83e\udd99",giraffe:"\ud83e\udd92",elephant:"\ud83d\udc18",mammoth:"\ud83e\udda3",rhinoceros:"\ud83e\udd8f",hippopotamus:"\ud83e\udd9b",mouse:"\ud83d\udc2d",mouse2:"\ud83d\udc01",rat:"\ud83d\udc00",hamster:"\ud83d\udc39",rabbit:"\ud83d\udc30",rabbit2:"\ud83d\udc07",chipmunk:"\ud83d\udc3f\ufe0f",beaver:"\ud83e\uddab",hedgehog:"\ud83e\udd94",bat:"\ud83e\udd87",bear:"\ud83d\udc3b",polar_bear:"\ud83d\udc3b\u200d\u2744\ufe0f",koala:"\ud83d\udc28",panda_face:"\ud83d\udc3c",sloth:"\ud83e\udda5",otter:"\ud83e\udda6",skunk:"\ud83e\udda8",kangaroo:"\ud83e\udd98",badger:"\ud83e\udda1",feet:"\ud83d\udc3e",paw_prints:"\ud83d\udc3e",turkey:"\ud83e\udd83",chicken:"\ud83d\udc14",rooster:"\ud83d\udc13",hatching_chick:"\ud83d\udc23",baby_chick:"\ud83d\udc24",hatched_chick:"\ud83d\udc25",bird:"\ud83d\udc26",penguin:"\ud83d\udc27",dove:"\ud83d\udd4a\ufe0f",eagle:"\ud83e\udd85",duck:"\ud83e\udd86",swan:"\ud83e\udda2",owl:"\ud83e\udd89",dodo:"\ud83e\udda4",feather:"\ud83e\udeb6",flamingo:"\ud83e\udda9",peacock:"\ud83e\udd9a",parrot:"\ud83e\udd9c",wing:"\ud83e\udebd",black_bird:"\ud83d\udc26\u200d\u2b1b",goose:"\ud83e\udebf",frog:"\ud83d\udc38",crocodile:"\ud83d\udc0a",turtle:"\ud83d\udc22",lizard:"\ud83e\udd8e",snake:"\ud83d\udc0d",dragon_face:"\ud83d\udc32",dragon:"\ud83d\udc09",sauropod:"\ud83e\udd95","t-rex":"\ud83e\udd96",whale:"\ud83d\udc33",whale2:"\ud83d\udc0b",dolphin:"\ud83d\udc2c",flipper:"\ud83d\udc2c",seal:"\ud83e\uddad",fish:"\ud83d\udc1f",tropical_fish:"\ud83d\udc20",blowfish:"\ud83d\udc21",shark:"\ud83e\udd88",octopus:"\ud83d\udc19",shell:"\ud83d\udc1a",coral:"\ud83e\udeb8",jellyfish:"\ud83e\udebc",snail:"\ud83d\udc0c",butterfly:"\ud83e\udd8b",bug:"\ud83d\udc1b",ant:"\ud83d\udc1c",bee:"\ud83d\udc1d",honeybee:"\ud83d\udc1d",beetle:"\ud83e\udeb2",lady_beetle:"\ud83d\udc1e",cricket:"\ud83e\udd97",cockroach:"\ud83e\udeb3",spider:"\ud83d\udd77\ufe0f",spider_web:"\ud83d\udd78\ufe0f",scorpion:"\ud83e\udd82",mosquito:"\ud83e\udd9f",fly:"\ud83e\udeb0",worm:"\ud83e\udeb1",microbe:"\ud83e\udda0",bouquet:"\ud83d\udc90",cherry_blossom:"\ud83c\udf38",white_flower:"\ud83d\udcae",lotus:"\ud83e\udeb7",rosette:"\ud83c\udff5\ufe0f",rose:"\ud83c\udf39",wilted_flower:"\ud83e\udd40",hibiscus:"\ud83c\udf3a",sunflower:"\ud83c\udf3b",blossom:"\ud83c\udf3c",tulip:"\ud83c\udf37",hyacinth:"\ud83e\udebb",seedling:"\ud83c\udf31",potted_plant:"\ud83e\udeb4",evergreen_tree:"\ud83c\udf32",deciduous_tree:"\ud83c\udf33",palm_tree:"\ud83c\udf34",cactus:"\ud83c\udf35",ear_of_rice:"\ud83c\udf3e",herb:"\ud83c\udf3f",shamrock:"\u2618\ufe0f",four_leaf_clover:"\ud83c\udf40",maple_leaf:"\ud83c\udf41",fallen_leaf:"\ud83c\udf42",leaves:"\ud83c\udf43",empty_nest:"\ud83e\udeb9",nest_with_eggs:"\ud83e\udeba",mushroom:"\ud83c\udf44",grapes:"\ud83c\udf47",melon:"\ud83c\udf48",watermelon:"\ud83c\udf49",tangerine:"\ud83c\udf4a",orange:"\ud83c\udf4a",mandarin:"\ud83c\udf4a",lemon:"\ud83c\udf4b",banana:"\ud83c\udf4c",pineapple:"\ud83c\udf4d",mango:"\ud83e\udd6d",apple:"\ud83c\udf4e",green_apple:"\ud83c\udf4f",pear:"\ud83c\udf50",peach:"\ud83c\udf51",cherries:"\ud83c\udf52",strawberry:"\ud83c\udf53",blueberries:"\ud83e\uded0",kiwi_fruit:"\ud83e\udd5d",tomato:"\ud83c\udf45",olive:"\ud83e\uded2",coconut:"\ud83e\udd65",avocado:"\ud83e\udd51",eggplant:"\ud83c\udf46",potato:"\ud83e\udd54",carrot:"\ud83e\udd55",corn:"\ud83c\udf3d",hot_pepper:"\ud83c\udf36\ufe0f",bell_pepper:"\ud83e\uded1",cucumber:"\ud83e\udd52",leafy_green:"\ud83e\udd6c",broccoli:"\ud83e\udd66",garlic:"\ud83e\uddc4",onion:"\ud83e\uddc5",peanuts:"\ud83e\udd5c",beans:"\ud83e\uded8",chestnut:"\ud83c\udf30",ginger_root:"\ud83e\udeda",pea_pod:"\ud83e\udedb",bread:"\ud83c\udf5e",croissant:"\ud83e\udd50",baguette_bread:"\ud83e\udd56",flatbread:"\ud83e\uded3",pretzel:"\ud83e\udd68",bagel:"\ud83e\udd6f",pancakes:"\ud83e\udd5e",waffle:"\ud83e\uddc7",cheese:"\ud83e\uddc0",meat_on_bone:"\ud83c\udf56",poultry_leg:"\ud83c\udf57",cut_of_meat:"\ud83e\udd69",bacon:"\ud83e\udd53",hamburger:"\ud83c\udf54",fries:"\ud83c\udf5f",pizza:"\ud83c\udf55",hotdog:"\ud83c\udf2d",sandwich:"\ud83e\udd6a",taco:"\ud83c\udf2e",burrito:"\ud83c\udf2f",tamale:"\ud83e\uded4",stuffed_flatbread:"\ud83e\udd59",falafel:"\ud83e\uddc6",egg:"\ud83e\udd5a",fried_egg:"\ud83c\udf73",shallow_pan_of_food:"\ud83e\udd58",stew:"\ud83c\udf72",fondue:"\ud83e\uded5",bowl_with_spoon:"\ud83e\udd63",green_salad:"\ud83e\udd57",popcorn:"\ud83c\udf7f",butter:"\ud83e\uddc8",salt:"\ud83e\uddc2",canned_food:"\ud83e\udd6b",bento:"\ud83c\udf71",rice_cracker:"\ud83c\udf58",rice_ball:"\ud83c\udf59",rice:"\ud83c\udf5a",curry:"\ud83c\udf5b",ramen:"\ud83c\udf5c",spaghetti:"\ud83c\udf5d",sweet_potato:"\ud83c\udf60",oden:"\ud83c\udf62",sushi:"\ud83c\udf63",fried_shrimp:"\ud83c\udf64",fish_cake:"\ud83c\udf65",moon_cake:"\ud83e\udd6e",dango:"\ud83c\udf61",dumpling:"\ud83e\udd5f",fortune_cookie:"\ud83e\udd60",takeout_box:"\ud83e\udd61",crab:"\ud83e\udd80",lobster:"\ud83e\udd9e",shrimp:"\ud83e\udd90",squid:"\ud83e\udd91",oyster:"\ud83e\uddaa",icecream:"\ud83c\udf66",shaved_ice:"\ud83c\udf67",ice_cream:"\ud83c\udf68",doughnut:"\ud83c\udf69",cookie:"\ud83c\udf6a",birthday:"\ud83c\udf82",cake:"\ud83c\udf70",cupcake:"\ud83e\uddc1",pie:"\ud83e\udd67",chocolate_bar:"\ud83c\udf6b",candy:"\ud83c\udf6c",lollipop:"\ud83c\udf6d",custard:"\ud83c\udf6e",honey_pot:"\ud83c\udf6f",baby_bottle:"\ud83c\udf7c",milk_glass:"\ud83e\udd5b",coffee:"\u2615",teapot:"\ud83e\uded6",tea:"\ud83c\udf75",sake:"\ud83c\udf76",champagne:"\ud83c\udf7e",wine_glass:"\ud83c\udf77",cocktail:"\ud83c\udf78",tropical_drink:"\ud83c\udf79",beer:"\ud83c\udf7a",beers:"\ud83c\udf7b",clinking_glasses:"\ud83e\udd42",tumbler_glass:"\ud83e\udd43",pouring_liquid:"\ud83e\uded7",cup_with_straw:"\ud83e\udd64",bubble_tea:"\ud83e\uddcb",beverage_box:"\ud83e\uddc3",mate:"\ud83e\uddc9",ice_cube:"\ud83e\uddca",chopsticks:"\ud83e\udd62",plate_with_cutlery:"\ud83c\udf7d\ufe0f",fork_and_knife:"\ud83c\udf74",spoon:"\ud83e\udd44",hocho:"\ud83d\udd2a",knife:"\ud83d\udd2a",jar:"\ud83e\uded9",amphora:"\ud83c\udffa",earth_africa:"\ud83c\udf0d",earth_americas:"\ud83c\udf0e",earth_asia:"\ud83c\udf0f",globe_with_meridians:"\ud83c\udf10",world_map:"\ud83d\uddfa\ufe0f",japan:"\ud83d\uddfe",compass:"\ud83e\udded",mountain_snow:"\ud83c\udfd4\ufe0f",mountain:"\u26f0\ufe0f",volcano:"\ud83c\udf0b",mount_fuji:"\ud83d\uddfb",camping:"\ud83c\udfd5\ufe0f",beach_umbrella:"\ud83c\udfd6\ufe0f",desert:"\ud83c\udfdc\ufe0f",desert_island:"\ud83c\udfdd\ufe0f",national_park:"\ud83c\udfde\ufe0f",stadium:"\ud83c\udfdf\ufe0f",classical_building:"\ud83c\udfdb\ufe0f",building_construction:"\ud83c\udfd7\ufe0f",bricks:"\ud83e\uddf1",rock:"\ud83e\udea8",wood:"\ud83e\udeb5",hut:"\ud83d\uded6",houses:"\ud83c\udfd8\ufe0f",derelict_house:"\ud83c\udfda\ufe0f",house:"\ud83c\udfe0",house_with_garden:"\ud83c\udfe1",office:"\ud83c\udfe2",post_office:"\ud83c\udfe3",european_post_office:"\ud83c\udfe4",hospital:"\ud83c\udfe5",bank:"\ud83c\udfe6",hotel:"\ud83c\udfe8",love_hotel:"\ud83c\udfe9",convenience_store:"\ud83c\udfea",school:"\ud83c\udfeb",department_store:"\ud83c\udfec",factory:"\ud83c\udfed",japanese_castle:"\ud83c\udfef",european_castle:"\ud83c\udff0",wedding:"\ud83d\udc92",tokyo_tower:"\ud83d\uddfc",statue_of_liberty:"\ud83d\uddfd",church:"\u26ea",mosque:"\ud83d\udd4c",hindu_temple:"\ud83d\uded5",synagogue:"\ud83d\udd4d",shinto_shrine:"\u26e9\ufe0f",kaaba:"\ud83d\udd4b",fountain:"\u26f2",tent:"\u26fa",foggy:"\ud83c\udf01",night_with_stars:"\ud83c\udf03",cityscape:"\ud83c\udfd9\ufe0f",sunrise_over_mountains:"\ud83c\udf04",sunrise:"\ud83c\udf05",city_sunset:"\ud83c\udf06",city_sunrise:"\ud83c\udf07",bridge_at_night:"\ud83c\udf09",hotsprings:"\u2668\ufe0f",carousel_horse:"\ud83c\udfa0",playground_slide:"\ud83d\udedd",ferris_wheel:"\ud83c\udfa1",roller_coaster:"\ud83c\udfa2",barber:"\ud83d\udc88",circus_tent:"\ud83c\udfaa",steam_locomotive:"\ud83d\ude82",railway_car:"\ud83d\ude83",bullettrain_side:"\ud83d\ude84",bullettrain_front:"\ud83d\ude85",train2:"\ud83d\ude86",metro:"\ud83d\ude87",light_rail:"\ud83d\ude88",station:"\ud83d\ude89",tram:"\ud83d\ude8a",monorail:"\ud83d\ude9d",mountain_railway:"\ud83d\ude9e",train:"\ud83d\ude8b",bus:"\ud83d\ude8c",oncoming_bus:"\ud83d\ude8d",trolleybus:"\ud83d\ude8e",minibus:"\ud83d\ude90",ambulance:"\ud83d\ude91",fire_engine:"\ud83d\ude92",police_car:"\ud83d\ude93",oncoming_police_car:"\ud83d\ude94",taxi:"\ud83d\ude95",oncoming_taxi:"\ud83d\ude96",car:"\ud83d\ude97",red_car:"\ud83d\ude97",oncoming_automobile:"\ud83d\ude98",blue_car:"\ud83d\ude99",pickup_truck:"\ud83d\udefb",truck:"\ud83d\ude9a",articulated_lorry:"\ud83d\ude9b",tractor:"\ud83d\ude9c",racing_car:"\ud83c\udfce\ufe0f",motorcycle:"\ud83c\udfcd\ufe0f",motor_scooter:"\ud83d\udef5",manual_wheelchair:"\ud83e\uddbd",motorized_wheelchair:"\ud83e\uddbc",auto_rickshaw:"\ud83d\udefa",bike:"\ud83d\udeb2",kick_scooter:"\ud83d\udef4",skateboard:"\ud83d\udef9",roller_skate:"\ud83d\udefc",busstop:"\ud83d\ude8f",motorway:"\ud83d\udee3\ufe0f",railway_track:"\ud83d\udee4\ufe0f",oil_drum:"\ud83d\udee2\ufe0f",fuelpump:"\u26fd",wheel:"\ud83d\udede",rotating_light:"\ud83d\udea8",traffic_light:"\ud83d\udea5",vertical_traffic_light:"\ud83d\udea6",stop_sign:"\ud83d\uded1",construction:"\ud83d\udea7",anchor:"\u2693",ring_buoy:"\ud83d\udedf",boat:"\u26f5",sailboat:"\u26f5",canoe:"\ud83d\udef6",speedboat:"\ud83d\udea4",passenger_ship:"\ud83d\udef3\ufe0f",ferry:"\u26f4\ufe0f",motor_boat:"\ud83d\udee5\ufe0f",ship:"\ud83d\udea2",airplane:"\u2708\ufe0f",small_airplane:"\ud83d\udee9\ufe0f",flight_departure:"\ud83d\udeeb",flight_arrival:"\ud83d\udeec",parachute:"\ud83e\ude82",seat:"\ud83d\udcba",helicopter:"\ud83d\ude81",suspension_railway:"\ud83d\ude9f",mountain_cableway:"\ud83d\udea0",aerial_tramway:"\ud83d\udea1",artificial_satellite:"\ud83d\udef0\ufe0f",rocket:"\ud83d\ude80",flying_saucer:"\ud83d\udef8",bellhop_bell:"\ud83d\udece\ufe0f",luggage:"\ud83e\uddf3",hourglass:"\u231b",hourglass_flowing_sand:"\u23f3",watch:"\u231a",alarm_clock:"\u23f0",stopwatch:"\u23f1\ufe0f",timer_clock:"\u23f2\ufe0f",mantelpiece_clock:"\ud83d\udd70\ufe0f",clock12:"\ud83d\udd5b",clock1230:"\ud83d\udd67",clock1:"\ud83d\udd50",clock130:"\ud83d\udd5c",clock2:"\ud83d\udd51",clock230:"\ud83d\udd5d",clock3:"\ud83d\udd52",clock330:"\ud83d\udd5e",clock4:"\ud83d\udd53",clock430:"\ud83d\udd5f",clock5:"\ud83d\udd54",clock530:"\ud83d\udd60",clock6:"\ud83d\udd55",clock630:"\ud83d\udd61",clock7:"\ud83d\udd56",clock730:"\ud83d\udd62",clock8:"\ud83d\udd57",clock830:"\ud83d\udd63",clock9:"\ud83d\udd58",clock930:"\ud83d\udd64",clock10:"\ud83d\udd59",clock1030:"\ud83d\udd65",clock11:"\ud83d\udd5a",clock1130:"\ud83d\udd66",new_moon:"\ud83c\udf11",waxing_crescent_moon:"\ud83c\udf12",first_quarter_moon:"\ud83c\udf13",moon:"\ud83c\udf14",waxing_gibbous_moon:"\ud83c\udf14",full_moon:"\ud83c\udf15",waning_gibbous_moon:"\ud83c\udf16",last_quarter_moon:"\ud83c\udf17",waning_crescent_moon:"\ud83c\udf18",crescent_moon:"\ud83c\udf19",new_moon_with_face:"\ud83c\udf1a",first_quarter_moon_with_face:"\ud83c\udf1b",last_quarter_moon_with_face:"\ud83c\udf1c",thermometer:"\ud83c\udf21\ufe0f",sunny:"\u2600\ufe0f",full_moon_with_face:"\ud83c\udf1d",sun_with_face:"\ud83c\udf1e",ringed_planet:"\ud83e\ude90",star:"\u2b50",star2:"\ud83c\udf1f",stars:"\ud83c\udf20",milky_way:"\ud83c\udf0c",cloud:"\u2601\ufe0f",partly_sunny:"\u26c5",cloud_with_lightning_and_rain:"\u26c8\ufe0f",sun_behind_small_cloud:"\ud83c\udf24\ufe0f",sun_behind_large_cloud:"\ud83c\udf25\ufe0f",sun_behind_rain_cloud:"\ud83c\udf26\ufe0f",cloud_with_rain:"\ud83c\udf27\ufe0f",cloud_with_snow:"\ud83c\udf28\ufe0f",cloud_with_lightning:"\ud83c\udf29\ufe0f",tornado:"\ud83c\udf2a\ufe0f",fog:"\ud83c\udf2b\ufe0f",wind_face:"\ud83c\udf2c\ufe0f",cyclone:"\ud83c\udf00",rainbow:"\ud83c\udf08",closed_umbrella:"\ud83c\udf02",open_umbrella:"\u2602\ufe0f",umbrella:"\u2614",parasol_on_ground:"\u26f1\ufe0f",zap:"\u26a1",snowflake:"\u2744\ufe0f",snowman_with_snow:"\u2603\ufe0f",snowman:"\u26c4",comet:"\u2604\ufe0f",fire:"\ud83d\udd25",droplet:"\ud83d\udca7",ocean:"\ud83c\udf0a",jack_o_lantern:"\ud83c\udf83",christmas_tree:"\ud83c\udf84",fireworks:"\ud83c\udf86",sparkler:"\ud83c\udf87",firecracker:"\ud83e\udde8",sparkles:"\u2728",balloon:"\ud83c\udf88",tada:"\ud83c\udf89",confetti_ball:"\ud83c\udf8a",tanabata_tree:"\ud83c\udf8b",bamboo:"\ud83c\udf8d",dolls:"\ud83c\udf8e",flags:"\ud83c\udf8f",wind_chime:"\ud83c\udf90",rice_scene:"\ud83c\udf91",red_envelope:"\ud83e\udde7",ribbon:"\ud83c\udf80",gift:"\ud83c\udf81",reminder_ribbon:"\ud83c\udf97\ufe0f",tickets:"\ud83c\udf9f\ufe0f",ticket:"\ud83c\udfab",medal_military:"\ud83c\udf96\ufe0f",trophy:"\ud83c\udfc6",medal_sports:"\ud83c\udfc5","1st_place_medal":"\ud83e\udd47","2nd_place_medal":"\ud83e\udd48","3rd_place_medal":"\ud83e\udd49",soccer:"\u26bd",baseball:"\u26be",softball:"\ud83e\udd4e",basketball:"\ud83c\udfc0",volleyball:"\ud83c\udfd0",football:"\ud83c\udfc8",rugby_football:"\ud83c\udfc9",tennis:"\ud83c\udfbe",flying_disc:"\ud83e\udd4f",bowling:"\ud83c\udfb3",cricket_game:"\ud83c\udfcf",field_hockey:"\ud83c\udfd1",ice_hockey:"\ud83c\udfd2",lacrosse:"\ud83e\udd4d",ping_pong:"\ud83c\udfd3",badminton:"\ud83c\udff8",boxing_glove:"\ud83e\udd4a",martial_arts_uniform:"\ud83e\udd4b",goal_net:"\ud83e\udd45",golf:"\u26f3",ice_skate:"\u26f8\ufe0f",fishing_pole_and_fish:"\ud83c\udfa3",diving_mask:"\ud83e\udd3f",running_shirt_with_sash:"\ud83c\udfbd",ski:"\ud83c\udfbf",sled:"\ud83d\udef7",curling_stone:"\ud83e\udd4c",dart:"\ud83c\udfaf",yo_yo:"\ud83e\ude80",kite:"\ud83e\ude81",gun:"\ud83d\udd2b","8ball":"\ud83c\udfb1",crystal_ball:"\ud83d\udd2e",magic_wand:"\ud83e\ude84",video_game:"\ud83c\udfae",joystick:"\ud83d\udd79\ufe0f",slot_machine:"\ud83c\udfb0",game_die:"\ud83c\udfb2",jigsaw:"\ud83e\udde9",teddy_bear:"\ud83e\uddf8",pinata:"\ud83e\ude85",mirror_ball:"\ud83e\udea9",nesting_dolls:"\ud83e\ude86",spades:"\u2660\ufe0f",hearts:"\u2665\ufe0f",diamonds:"\u2666\ufe0f",clubs:"\u2663\ufe0f",chess_pawn:"\u265f\ufe0f",black_joker:"\ud83c\udccf",mahjong:"\ud83c\udc04",flower_playing_cards:"\ud83c\udfb4",performing_arts:"\ud83c\udfad",framed_picture:"\ud83d\uddbc\ufe0f",art:"\ud83c\udfa8",thread:"\ud83e\uddf5",sewing_needle:"\ud83e\udea1",yarn:"\ud83e\uddf6",knot:"\ud83e\udea2",eyeglasses:"\ud83d\udc53",dark_sunglasses:"\ud83d\udd76\ufe0f",goggles:"\ud83e\udd7d",lab_coat:"\ud83e\udd7c",safety_vest:"\ud83e\uddba",necktie:"\ud83d\udc54",shirt:"\ud83d\udc55",tshirt:"\ud83d\udc55",jeans:"\ud83d\udc56",scarf:"\ud83e\udde3",gloves:"\ud83e\udde4",coat:"\ud83e\udde5",socks:"\ud83e\udde6",dress:"\ud83d\udc57",kimono:"\ud83d\udc58",sari:"\ud83e\udd7b",one_piece_swimsuit:"\ud83e\ude71",swim_brief:"\ud83e\ude72",shorts:"\ud83e\ude73",bikini:"\ud83d\udc59",womans_clothes:"\ud83d\udc5a",folding_hand_fan:"\ud83e\udead",purse:"\ud83d\udc5b",handbag:"\ud83d\udc5c",pouch:"\ud83d\udc5d",shopping:"\ud83d\udecd\ufe0f",school_satchel:"\ud83c\udf92",thong_sandal:"\ud83e\ude74",mans_shoe:"\ud83d\udc5e",shoe:"\ud83d\udc5e",athletic_shoe:"\ud83d\udc5f",hiking_boot:"\ud83e\udd7e",flat_shoe:"\ud83e\udd7f",high_heel:"\ud83d\udc60",sandal:"\ud83d\udc61",ballet_shoes:"\ud83e\ude70",boot:"\ud83d\udc62",hair_pick:"\ud83e\udeae",crown:"\ud83d\udc51",womans_hat:"\ud83d\udc52",tophat:"\ud83c\udfa9",mortar_board:"\ud83c\udf93",billed_cap:"\ud83e\udde2",military_helmet:"\ud83e\ude96",rescue_worker_helmet:"\u26d1\ufe0f",prayer_beads:"\ud83d\udcff",lipstick:"\ud83d\udc84",ring:"\ud83d\udc8d",gem:"\ud83d\udc8e",mute:"\ud83d\udd07",speaker:"\ud83d\udd08",sound:"\ud83d\udd09",loud_sound:"\ud83d\udd0a",loudspeaker:"\ud83d\udce2",mega:"\ud83d\udce3",postal_horn:"\ud83d\udcef",bell:"\ud83d\udd14",no_bell:"\ud83d\udd15",musical_score:"\ud83c\udfbc",musical_note:"\ud83c\udfb5",notes:"\ud83c\udfb6",studio_microphone:"\ud83c\udf99\ufe0f",level_slider:"\ud83c\udf9a\ufe0f",control_knobs:"\ud83c\udf9b\ufe0f",microphone:"\ud83c\udfa4",headphones:"\ud83c\udfa7",radio:"\ud83d\udcfb",saxophone:"\ud83c\udfb7",accordion:"\ud83e\ude97",guitar:"\ud83c\udfb8",musical_keyboard:"\ud83c\udfb9",trumpet:"\ud83c\udfba",violin:"\ud83c\udfbb",banjo:"\ud83e\ude95",drum:"\ud83e\udd41",long_drum:"\ud83e\ude98",maracas:"\ud83e\ude87",flute:"\ud83e\ude88",iphone:"\ud83d\udcf1",calling:"\ud83d\udcf2",phone:"\u260e\ufe0f",telephone:"\u260e\ufe0f",telephone_receiver:"\ud83d\udcde",pager:"\ud83d\udcdf",fax:"\ud83d\udce0",battery:"\ud83d\udd0b",low_battery:"\ud83e\udeab",electric_plug:"\ud83d\udd0c",computer:"\ud83d\udcbb",desktop_computer:"\ud83d\udda5\ufe0f",printer:"\ud83d\udda8\ufe0f",keyboard:"\u2328\ufe0f",computer_mouse:"\ud83d\uddb1\ufe0f",trackball:"\ud83d\uddb2\ufe0f",minidisc:"\ud83d\udcbd",floppy_disk:"\ud83d\udcbe",cd:"\ud83d\udcbf",dvd:"\ud83d\udcc0",abacus:"\ud83e\uddee",movie_camera:"\ud83c\udfa5",film_strip:"\ud83c\udf9e\ufe0f",film_projector:"\ud83d\udcfd\ufe0f",clapper:"\ud83c\udfac",tv:"\ud83d\udcfa",camera:"\ud83d\udcf7",camera_flash:"\ud83d\udcf8",video_camera:"\ud83d\udcf9",vhs:"\ud83d\udcfc",mag:"\ud83d\udd0d",mag_right:"\ud83d\udd0e",candle:"\ud83d\udd6f\ufe0f",bulb:"\ud83d\udca1",flashlight:"\ud83d\udd26",izakaya_lantern:"\ud83c\udfee",lantern:"\ud83c\udfee",diya_lamp:"\ud83e\ude94",notebook_with_decorative_cover:"\ud83d\udcd4",closed_book:"\ud83d\udcd5",book:"\ud83d\udcd6",open_book:"\ud83d\udcd6",green_book:"\ud83d\udcd7",blue_book:"\ud83d\udcd8",orange_book:"\ud83d\udcd9",books:"\ud83d\udcda",notebook:"\ud83d\udcd3",ledger:"\ud83d\udcd2",page_with_curl:"\ud83d\udcc3",scroll:"\ud83d\udcdc",page_facing_up:"\ud83d\udcc4",newspaper:"\ud83d\udcf0",newspaper_roll:"\ud83d\uddde\ufe0f",bookmark_tabs:"\ud83d\udcd1",bookmark:"\ud83d\udd16",label:"\ud83c\udff7\ufe0f",moneybag:"\ud83d\udcb0",coin:"\ud83e\ude99",yen:"\ud83d\udcb4",dollar:"\ud83d\udcb5",euro:"\ud83d\udcb6",pound:"\ud83d\udcb7",money_with_wings:"\ud83d\udcb8",credit_card:"\ud83d\udcb3",receipt:"\ud83e\uddfe",chart:"\ud83d\udcb9",envelope:"\u2709\ufe0f",email:"\ud83d\udce7","e-mail":"\ud83d\udce7",incoming_envelope:"\ud83d\udce8",envelope_with_arrow:"\ud83d\udce9",outbox_tray:"\ud83d\udce4",inbox_tray:"\ud83d\udce5",package:"\ud83d\udce6",mailbox:"\ud83d\udceb",mailbox_closed:"\ud83d\udcea",mailbox_with_mail:"\ud83d\udcec",mailbox_with_no_mail:"\ud83d\udced",postbox:"\ud83d\udcee",ballot_box:"\ud83d\uddf3\ufe0f",pencil2:"\u270f\ufe0f",black_nib:"\u2712\ufe0f",fountain_pen:"\ud83d\udd8b\ufe0f",pen:"\ud83d\udd8a\ufe0f",paintbrush:"\ud83d\udd8c\ufe0f",crayon:"\ud83d\udd8d\ufe0f",memo:"\ud83d\udcdd",pencil:"\ud83d\udcdd",briefcase:"\ud83d\udcbc",file_folder:"\ud83d\udcc1",open_file_folder:"\ud83d\udcc2",card_index_dividers:"\ud83d\uddc2\ufe0f",date:"\ud83d\udcc5",calendar:"\ud83d\udcc6",spiral_notepad:"\ud83d\uddd2\ufe0f",spiral_calendar:"\ud83d\uddd3\ufe0f",card_index:"\ud83d\udcc7",chart_with_upwards_trend:"\ud83d\udcc8",chart_with_downwards_trend:"\ud83d\udcc9",bar_chart:"\ud83d\udcca",clipboard:"\ud83d\udccb",pushpin:"\ud83d\udccc",round_pushpin:"\ud83d\udccd",paperclip:"\ud83d\udcce",paperclips:"\ud83d\udd87\ufe0f",straight_ruler:"\ud83d\udccf",triangular_ruler:"\ud83d\udcd0",scissors:"\u2702\ufe0f",card_file_box:"\ud83d\uddc3\ufe0f",file_cabinet:"\ud83d\uddc4\ufe0f",wastebasket:"\ud83d\uddd1\ufe0f",lock:"\ud83d\udd12",unlock:"\ud83d\udd13",lock_with_ink_pen:"\ud83d\udd0f",closed_lock_with_key:"\ud83d\udd10",key:"\ud83d\udd11",old_key:"\ud83d\udddd\ufe0f",hammer:"\ud83d\udd28",axe:"\ud83e\ude93",pick:"\u26cf\ufe0f",hammer_and_pick:"\u2692\ufe0f",hammer_and_wrench:"\ud83d\udee0\ufe0f",dagger:"\ud83d\udde1\ufe0f",crossed_swords:"\u2694\ufe0f",bomb:"\ud83d\udca3",boomerang:"\ud83e\ude83",bow_and_arrow:"\ud83c\udff9",shield:"\ud83d\udee1\ufe0f",carpentry_saw:"\ud83e\ude9a",wrench:"\ud83d\udd27",screwdriver:"\ud83e\ude9b",nut_and_bolt:"\ud83d\udd29",gear:"\u2699\ufe0f",clamp:"\ud83d\udddc\ufe0f",balance_scale:"\u2696\ufe0f",probing_cane:"\ud83e\uddaf",link:"\ud83d\udd17",chains:"\u26d3\ufe0f",hook:"\ud83e\ude9d",toolbox:"\ud83e\uddf0",magnet:"\ud83e\uddf2",ladder:"\ud83e\ude9c",alembic:"\u2697\ufe0f",test_tube:"\ud83e\uddea",petri_dish:"\ud83e\uddeb",dna:"\ud83e\uddec",microscope:"\ud83d\udd2c",telescope:"\ud83d\udd2d",satellite:"\ud83d\udce1",syringe:"\ud83d\udc89",drop_of_blood:"\ud83e\ude78",pill:"\ud83d\udc8a",adhesive_bandage:"\ud83e\ude79",crutch:"\ud83e\ude7c",stethoscope:"\ud83e\ude7a",x_ray:"\ud83e\ude7b",door:"\ud83d\udeaa",elevator:"\ud83d\uded7",mirror:"\ud83e\ude9e",window:"\ud83e\ude9f",bed:"\ud83d\udecf\ufe0f",couch_and_lamp:"\ud83d\udecb\ufe0f",chair:"\ud83e\ude91",toilet:"\ud83d\udebd",plunger:"\ud83e\udea0",shower:"\ud83d\udebf",bathtub:"\ud83d\udec1",mouse_trap:"\ud83e\udea4",razor:"\ud83e\ude92",lotion_bottle:"\ud83e\uddf4",safety_pin:"\ud83e\uddf7",broom:"\ud83e\uddf9",basket:"\ud83e\uddfa",roll_of_paper:"\ud83e\uddfb",bucket:"\ud83e\udea3",soap:"\ud83e\uddfc",bubbles:"\ud83e\udee7",toothbrush:"\ud83e\udea5",sponge:"\ud83e\uddfd",fire_extinguisher:"\ud83e\uddef",shopping_cart:"\ud83d\uded2",smoking:"\ud83d\udeac",coffin:"\u26b0\ufe0f",headstone:"\ud83e\udea6",funeral_urn:"\u26b1\ufe0f",nazar_amulet:"\ud83e\uddff",hamsa:"\ud83e\udeac",moyai:"\ud83d\uddff",placard:"\ud83e\udea7",identification_card:"\ud83e\udeaa",atm:"\ud83c\udfe7",put_litter_in_its_place:"\ud83d\udeae",potable_water:"\ud83d\udeb0",wheelchair:"\u267f",mens:"\ud83d\udeb9",womens:"\ud83d\udeba",restroom:"\ud83d\udebb",baby_symbol:"\ud83d\udebc",wc:"\ud83d\udebe",passport_control:"\ud83d\udec2",customs:"\ud83d\udec3",baggage_claim:"\ud83d\udec4",left_luggage:"\ud83d\udec5",warning:"\u26a0\ufe0f",children_crossing:"\ud83d\udeb8",no_entry:"\u26d4",no_entry_sign:"\ud83d\udeab",no_bicycles:"\ud83d\udeb3",no_smoking:"\ud83d\udead",do_not_litter:"\ud83d\udeaf","non-potable_water":"\ud83d\udeb1",no_pedestrians:"\ud83d\udeb7",no_mobile_phones:"\ud83d\udcf5",underage:"\ud83d\udd1e",radioactive:"\u2622\ufe0f",biohazard:"\u2623\ufe0f",arrow_up:"\u2b06\ufe0f",arrow_upper_right:"\u2197\ufe0f",arrow_right:"\u27a1\ufe0f",arrow_lower_right:"\u2198\ufe0f",arrow_down:"\u2b07\ufe0f",arrow_lower_left:"\u2199\ufe0f",arrow_left:"\u2b05\ufe0f",arrow_upper_left:"\u2196\ufe0f",arrow_up_down:"\u2195\ufe0f",left_right_arrow:"\u2194\ufe0f",leftwards_arrow_with_hook:"\u21a9\ufe0f",arrow_right_hook:"\u21aa\ufe0f",arrow_heading_up:"\u2934\ufe0f",arrow_heading_down:"\u2935\ufe0f",arrows_clockwise:"\ud83d\udd03",arrows_counterclockwise:"\ud83d\udd04",back:"\ud83d\udd19",end:"\ud83d\udd1a",on:"\ud83d\udd1b",soon:"\ud83d\udd1c",top:"\ud83d\udd1d",place_of_worship:"\ud83d\uded0",atom_symbol:"\u269b\ufe0f",om:"\ud83d\udd49\ufe0f",star_of_david:"\u2721\ufe0f",wheel_of_dharma:"\u2638\ufe0f",yin_yang:"\u262f\ufe0f",latin_cross:"\u271d\ufe0f",orthodox_cross:"\u2626\ufe0f",star_and_crescent:"\u262a\ufe0f",peace_symbol:"\u262e\ufe0f",menorah:"\ud83d\udd4e",six_pointed_star:"\ud83d\udd2f",khanda:"\ud83e\udeaf",aries:"\u2648",taurus:"\u2649",gemini:"\u264a",cancer:"\u264b",leo:"\u264c",virgo:"\u264d",libra:"\u264e",scorpius:"\u264f",sagittarius:"\u2650",capricorn:"\u2651",aquarius:"\u2652",pisces:"\u2653",ophiuchus:"\u26ce",twisted_rightwards_arrows:"\ud83d\udd00",repeat:"\ud83d\udd01",repeat_one:"\ud83d\udd02",arrow_forward:"\u25b6\ufe0f",fast_forward:"\u23e9",next_track_button:"\u23ed\ufe0f",play_or_pause_button:"\u23ef\ufe0f",arrow_backward:"\u25c0\ufe0f",rewind:"\u23ea",previous_track_button:"\u23ee\ufe0f",arrow_up_small:"\ud83d\udd3c",arrow_double_up:"\u23eb",arrow_down_small:"\ud83d\udd3d",arrow_double_down:"\u23ec",pause_button:"\u23f8\ufe0f",stop_button:"\u23f9\ufe0f",record_button:"\u23fa\ufe0f",eject_button:"\u23cf\ufe0f",cinema:"\ud83c\udfa6",low_brightness:"\ud83d\udd05",high_brightness:"\ud83d\udd06",signal_strength:"\ud83d\udcf6",wireless:"\ud83d\udedc",vibration_mode:"\ud83d\udcf3",mobile_phone_off:"\ud83d\udcf4",female_sign:"\u2640\ufe0f",male_sign:"\u2642\ufe0f",transgender_symbol:"\u26a7\ufe0f",heavy_multiplication_x:"\u2716\ufe0f",heavy_plus_sign:"\u2795",heavy_minus_sign:"\u2796",heavy_division_sign:"\u2797",heavy_equals_sign:"\ud83d\udff0",infinity:"\u267e\ufe0f",bangbang:"\u203c\ufe0f",interrobang:"\u2049\ufe0f",question:"\u2753",grey_question:"\u2754",grey_exclamation:"\u2755",exclamation:"\u2757",heavy_exclamation_mark:"\u2757",wavy_dash:"\u3030\ufe0f",currency_exchange:"\ud83d\udcb1",heavy_dollar_sign:"\ud83d\udcb2",medical_symbol:"\u2695\ufe0f",recycle:"\u267b\ufe0f",fleur_de_lis:"\u269c\ufe0f",trident:"\ud83d\udd31",name_badge:"\ud83d\udcdb",beginner:"\ud83d\udd30",o:"\u2b55",white_check_mark:"\u2705",ballot_box_with_check:"\u2611\ufe0f",heavy_check_mark:"\u2714\ufe0f",x:"\u274c",negative_squared_cross_mark:"\u274e",curly_loop:"\u27b0",loop:"\u27bf",part_alternation_mark:"\u303d\ufe0f",eight_spoked_asterisk:"\u2733\ufe0f",eight_pointed_black_star:"\u2734\ufe0f",sparkle:"\u2747\ufe0f",copyright:"\xa9\ufe0f",registered:"\xae\ufe0f",tm:"\u2122\ufe0f",hash:"#\ufe0f\u20e3",asterisk:"*\ufe0f\u20e3",zero:"0\ufe0f\u20e3",one:"1\ufe0f\u20e3",two:"2\ufe0f\u20e3",three:"3\ufe0f\u20e3",four:"4\ufe0f\u20e3",five:"5\ufe0f\u20e3",six:"6\ufe0f\u20e3",seven:"7\ufe0f\u20e3",eight:"8\ufe0f\u20e3",nine:"9\ufe0f\u20e3",keycap_ten:"\ud83d\udd1f",capital_abcd:"\ud83d\udd20",abcd:"\ud83d\udd21",symbols:"\ud83d\udd23",abc:"\ud83d\udd24",a:"\ud83c\udd70\ufe0f",ab:"\ud83c\udd8e",b:"\ud83c\udd71\ufe0f",cl:"\ud83c\udd91",cool:"\ud83c\udd92",free:"\ud83c\udd93",information_source:"\u2139\ufe0f",id:"\ud83c\udd94",m:"\u24c2\ufe0f",new:"\ud83c\udd95",ng:"\ud83c\udd96",o2:"\ud83c\udd7e\ufe0f",ok:"\ud83c\udd97",parking:"\ud83c\udd7f\ufe0f",sos:"\ud83c\udd98",up:"\ud83c\udd99",vs:"\ud83c\udd9a",koko:"\ud83c\ude01",sa:"\ud83c\ude02\ufe0f",u6708:"\ud83c\ude37\ufe0f",u6709:"\ud83c\ude36",u6307:"\ud83c\ude2f",ideograph_advantage:"\ud83c\ude50",u5272:"\ud83c\ude39",u7121:"\ud83c\ude1a",u7981:"\ud83c\ude32",accept:"\ud83c\ude51",u7533:"\ud83c\ude38",u5408:"\ud83c\ude34",u7a7a:"\ud83c\ude33",congratulations:"\u3297\ufe0f",secret:"\u3299\ufe0f",u55b6:"\ud83c\ude3a",u6e80:"\ud83c\ude35",red_circle:"\ud83d\udd34",orange_circle:"\ud83d\udfe0",yellow_circle:"\ud83d\udfe1",green_circle:"\ud83d\udfe2",large_blue_circle:"\ud83d\udd35",purple_circle:"\ud83d\udfe3",brown_circle:"\ud83d\udfe4",black_circle:"\u26ab",white_circle:"\u26aa",red_square:"\ud83d\udfe5",orange_square:"\ud83d\udfe7",yellow_square:"\ud83d\udfe8",green_square:"\ud83d\udfe9",blue_square:"\ud83d\udfe6",purple_square:"\ud83d\udfea",brown_square:"\ud83d\udfeb",black_large_square:"\u2b1b",white_large_square:"\u2b1c",black_medium_square:"\u25fc\ufe0f",white_medium_square:"\u25fb\ufe0f",black_medium_small_square:"\u25fe",white_medium_small_square:"\u25fd",black_small_square:"\u25aa\ufe0f",white_small_square:"\u25ab\ufe0f",large_orange_diamond:"\ud83d\udd36",large_blue_diamond:"\ud83d\udd37",small_orange_diamond:"\ud83d\udd38",small_blue_diamond:"\ud83d\udd39",small_red_triangle:"\ud83d\udd3a",small_red_triangle_down:"\ud83d\udd3b",diamond_shape_with_a_dot_inside:"\ud83d\udca0",radio_button:"\ud83d\udd18",white_square_button:"\ud83d\udd33",black_square_button:"\ud83d\udd32",checkered_flag:"\ud83c\udfc1",triangular_flag_on_post:"\ud83d\udea9",crossed_flags:"\ud83c\udf8c",black_flag:"\ud83c\udff4",white_flag:"\ud83c\udff3\ufe0f",rainbow_flag:"\ud83c\udff3\ufe0f\u200d\ud83c\udf08",transgender_flag:"\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f",pirate_flag:"\ud83c\udff4\u200d\u2620\ufe0f",ascension_island:"\ud83c\udde6\ud83c\udde8",andorra:"\ud83c\udde6\ud83c\udde9",united_arab_emirates:"\ud83c\udde6\ud83c\uddea",afghanistan:"\ud83c\udde6\ud83c\uddeb",antigua_barbuda:"\ud83c\udde6\ud83c\uddec",anguilla:"\ud83c\udde6\ud83c\uddee",albania:"\ud83c\udde6\ud83c\uddf1",armenia:"\ud83c\udde6\ud83c\uddf2",angola:"\ud83c\udde6\ud83c\uddf4",antarctica:"\ud83c\udde6\ud83c\uddf6",argentina:"\ud83c\udde6\ud83c\uddf7",american_samoa:"\ud83c\udde6\ud83c\uddf8",austria:"\ud83c\udde6\ud83c\uddf9",australia:"\ud83c\udde6\ud83c\uddfa",aruba:"\ud83c\udde6\ud83c\uddfc",aland_islands:"\ud83c\udde6\ud83c\uddfd",azerbaijan:"\ud83c\udde6\ud83c\uddff",bosnia_herzegovina:"\ud83c\udde7\ud83c\udde6",barbados:"\ud83c\udde7\ud83c\udde7",bangladesh:"\ud83c\udde7\ud83c\udde9",belgium:"\ud83c\udde7\ud83c\uddea",burkina_faso:"\ud83c\udde7\ud83c\uddeb",bulgaria:"\ud83c\udde7\ud83c\uddec",bahrain:"\ud83c\udde7\ud83c\udded",burundi:"\ud83c\udde7\ud83c\uddee",benin:"\ud83c\udde7\ud83c\uddef",st_barthelemy:"\ud83c\udde7\ud83c\uddf1",bermuda:"\ud83c\udde7\ud83c\uddf2",brunei:"\ud83c\udde7\ud83c\uddf3",bolivia:"\ud83c\udde7\ud83c\uddf4",caribbean_netherlands:"\ud83c\udde7\ud83c\uddf6",brazil:"\ud83c\udde7\ud83c\uddf7",bahamas:"\ud83c\udde7\ud83c\uddf8",bhutan:"\ud83c\udde7\ud83c\uddf9",bouvet_island:"\ud83c\udde7\ud83c\uddfb",botswana:"\ud83c\udde7\ud83c\uddfc",belarus:"\u2b1c\ufe0f\ud83d\udfe5\u2b1c",belize:"\ud83c\udde7\ud83c\uddff",canada:"\ud83c\udde8\ud83c\udde6",cocos_islands:"\ud83c\udde8\ud83c\udde8",congo_kinshasa:"\ud83c\udde8\ud83c\udde9",central_african_republic:"\ud83c\udde8\ud83c\uddeb",congo_brazzaville:"\ud83c\udde8\ud83c\uddec",switzerland:"\ud83c\udde8\ud83c\udded",cote_divoire:"\ud83c\udde8\ud83c\uddee",cook_islands:"\ud83c\udde8\ud83c\uddf0",chile:"\ud83c\udde8\ud83c\uddf1",cameroon:"\ud83c\udde8\ud83c\uddf2",cn:"\ud83c\udde8\ud83c\uddf3",colombia:"\ud83c\udde8\ud83c\uddf4",clipperton_island:"\ud83c\udde8\ud83c\uddf5",costa_rica:"\ud83c\udde8\ud83c\uddf7",cuba:"\ud83c\udde8\ud83c\uddfa",cape_verde:"\ud83c\udde8\ud83c\uddfb",curacao:"\ud83c\udde8\ud83c\uddfc",christmas_island:"\ud83c\udde8\ud83c\uddfd",cyprus:"\ud83c\udde8\ud83c\uddfe",czech_republic:"\ud83c\udde8\ud83c\uddff",de:"\ud83c\udde9\ud83c\uddea",diego_garcia:"\ud83c\udde9\ud83c\uddec",djibouti:"\ud83c\udde9\ud83c\uddef",denmark:"\ud83c\udde9\ud83c\uddf0",dominica:"\ud83c\udde9\ud83c\uddf2",dominican_republic:"\ud83c\udde9\ud83c\uddf4",algeria:"\ud83c\udde9\ud83c\uddff",ceuta_melilla:"\ud83c\uddea\ud83c\udde6",ecuador:"\ud83c\uddea\ud83c\udde8",estonia:"\ud83c\uddea\ud83c\uddea",egypt:"\ud83c\uddea\ud83c\uddec",western_sahara:"\ud83c\uddea\ud83c\udded",eritrea:"\ud83c\uddea\ud83c\uddf7",es:"\ud83c\uddea\ud83c\uddf8",ethiopia:"\ud83c\uddea\ud83c\uddf9",eu:"\ud83c\uddea\ud83c\uddfa",european_union:"\ud83c\uddea\ud83c\uddfa",finland:"\ud83c\uddeb\ud83c\uddee",fiji:"\ud83c\uddeb\ud83c\uddef",falkland_islands:"\ud83c\uddeb\ud83c\uddf0",micronesia:"\ud83c\uddeb\ud83c\uddf2",faroe_islands:"\ud83c\uddeb\ud83c\uddf4",fr:"\ud83c\uddeb\ud83c\uddf7",gabon:"\ud83c\uddec\ud83c\udde6",gb:"\ud83c\uddec\ud83c\udde7",uk:"\ud83c\uddec\ud83c\udde7",grenada:"\ud83c\uddec\ud83c\udde9",georgia:"\ud83c\uddec\ud83c\uddea",french_guiana:"\ud83c\uddec\ud83c\uddeb",guernsey:"\ud83c\uddec\ud83c\uddec",ghana:"\ud83c\uddec\ud83c\udded",gibraltar:"\ud83c\uddec\ud83c\uddee",greenland:"\ud83c\uddec\ud83c\uddf1",gambia:"\ud83c\uddec\ud83c\uddf2",guinea:"\ud83c\uddec\ud83c\uddf3",guadeloupe:"\ud83c\uddec\ud83c\uddf5",equatorial_guinea:"\ud83c\uddec\ud83c\uddf6",greece:"\ud83c\uddec\ud83c\uddf7",south_georgia_south_sandwich_islands:"\ud83c\uddec\ud83c\uddf8",guatemala:"\ud83c\uddec\ud83c\uddf9",guam:"\ud83c\uddec\ud83c\uddfa",guinea_bissau:"\ud83c\uddec\ud83c\uddfc",guyana:"\ud83c\uddec\ud83c\uddfe",hong_kong:"\ud83c\udded\ud83c\uddf0",heard_mcdonald_islands:"\ud83c\udded\ud83c\uddf2",honduras:"\ud83c\udded\ud83c\uddf3",croatia:"\ud83c\udded\ud83c\uddf7",haiti:"\ud83c\udded\ud83c\uddf9",hungary:"\ud83c\udded\ud83c\uddfa",canary_islands:"\ud83c\uddee\ud83c\udde8",indonesia:"\ud83c\uddee\ud83c\udde9",ireland:"\ud83c\uddee\ud83c\uddea",israel:"\ud83c\uddee\ud83c\uddf1",isle_of_man:"\ud83c\uddee\ud83c\uddf2",india:"\ud83c\uddee\ud83c\uddf3",british_indian_ocean_territory:"\ud83c\uddee\ud83c\uddf4",iraq:"\ud83c\uddee\ud83c\uddf6",iran:"\ud83c\uddee\ud83c\uddf7",iceland:"\ud83c\uddee\ud83c\uddf8",it:"\ud83c\uddee\ud83c\uddf9",jersey:"\ud83c\uddef\ud83c\uddea",jamaica:"\ud83c\uddef\ud83c\uddf2",jordan:"\ud83c\uddef\ud83c\uddf4",jp:"\ud83c\uddef\ud83c\uddf5",kenya:"\ud83c\uddf0\ud83c\uddea",kyrgyzstan:"\ud83c\uddf0\ud83c\uddec",cambodia:"\ud83c\uddf0\ud83c\udded",kiribati:"\ud83c\uddf0\ud83c\uddee",comoros:"\ud83c\uddf0\ud83c\uddf2",st_kitts_nevis:"\ud83c\uddf0\ud83c\uddf3",north_korea:"\ud83c\uddf0\ud83c\uddf5",kr:"\ud83c\uddf0\ud83c\uddf7",kuwait:"\ud83c\uddf0\ud83c\uddfc",cayman_islands:"\ud83c\uddf0\ud83c\uddfe",kazakhstan:"\ud83c\uddf0\ud83c\uddff",laos:"\ud83c\uddf1\ud83c\udde6",lebanon:"\ud83c\uddf1\ud83c\udde7",st_lucia:"\ud83c\uddf1\ud83c\udde8",liechtenstein:"\ud83c\uddf1\ud83c\uddee",sri_lanka:"\ud83c\uddf1\ud83c\uddf0",liberia:"\ud83c\uddf1\ud83c\uddf7",lesotho:"\ud83c\uddf1\ud83c\uddf8",lithuania:"\ud83c\uddf1\ud83c\uddf9",luxembourg:"\ud83c\uddf1\ud83c\uddfa",latvia:"\ud83c\uddf1\ud83c\uddfb",libya:"\ud83c\uddf1\ud83c\uddfe",morocco:"\ud83c\uddf2\ud83c\udde6",monaco:"\ud83c\uddf2\ud83c\udde8",moldova:"\ud83c\uddf2\ud83c\udde9",montenegro:"\ud83c\uddf2\ud83c\uddea",st_martin:"\ud83c\uddf2\ud83c\uddeb",madagascar:"\ud83c\uddf2\ud83c\uddec",marshall_islands:"\ud83c\uddf2\ud83c\udded",macedonia:"\ud83c\uddf2\ud83c\uddf0",mali:"\ud83c\uddf2\ud83c\uddf1",myanmar:"\ud83c\uddf2\ud83c\uddf2",mongolia:"\ud83c\uddf2\ud83c\uddf3",macau:"\ud83c\uddf2\ud83c\uddf4",northern_mariana_islands:"\ud83c\uddf2\ud83c\uddf5",martinique:"\ud83c\uddf2\ud83c\uddf6",mauritania:"\ud83c\uddf2\ud83c\uddf7",montserrat:"\ud83c\uddf2\ud83c\uddf8",malta:"\ud83c\uddf2\ud83c\uddf9",mauritius:"\ud83c\uddf2\ud83c\uddfa",maldives:"\ud83c\uddf2\ud83c\uddfb",malawi:"\ud83c\uddf2\ud83c\uddfc",mexico:"\ud83c\uddf2\ud83c\uddfd",malaysia:"\ud83c\uddf2\ud83c\uddfe",mozambique:"\ud83c\uddf2\ud83c\uddff",namibia:"\ud83c\uddf3\ud83c\udde6",new_caledonia:"\ud83c\uddf3\ud83c\udde8",niger:"\ud83c\uddf3\ud83c\uddea",norfolk_island:"\ud83c\uddf3\ud83c\uddeb",nigeria:"\ud83c\uddf3\ud83c\uddec",nicaragua:"\ud83c\uddf3\ud83c\uddee",netherlands:"\ud83c\uddf3\ud83c\uddf1",norway:"\ud83c\uddf3\ud83c\uddf4",nepal:"\ud83c\uddf3\ud83c\uddf5",nauru:"\ud83c\uddf3\ud83c\uddf7",niue:"\ud83c\uddf3\ud83c\uddfa",new_zealand:"\ud83c\uddf3\ud83c\uddff",oman:"\ud83c\uddf4\ud83c\uddf2",panama:"\ud83c\uddf5\ud83c\udde6",peru:"\ud83c\uddf5\ud83c\uddea",french_polynesia:"\ud83c\uddf5\ud83c\uddeb",papua_new_guinea:"\ud83c\uddf5\ud83c\uddec",philippines:"\ud83c\uddf5\ud83c\udded",pakistan:"\ud83c\uddf5\ud83c\uddf0",poland:"\ud83c\uddf5\ud83c\uddf1",st_pierre_miquelon:"\ud83c\uddf5\ud83c\uddf2",pitcairn_islands:"\ud83c\uddf5\ud83c\uddf3",puerto_rico:"\ud83c\uddf5\ud83c\uddf7",palestinian_territories:"\ud83c\uddf5\ud83c\uddf8",portugal:"\ud83c\uddf5\ud83c\uddf9",palau:"\ud83c\uddf5\ud83c\uddfc",paraguay:"\ud83c\uddf5\ud83c\uddfe",qatar:"\ud83c\uddf6\ud83c\udde6",reunion:"\ud83c\uddf7\ud83c\uddea",romania:"\ud83c\uddf7\ud83c\uddf4",serbia:"\ud83c\uddf7\ud83c\uddf8",ru:"\ud83c\uddf7\ud83c\uddfa",rwanda:"\ud83c\uddf7\ud83c\uddfc",saudi_arabia:"\ud83c\uddf8\ud83c\udde6",solomon_islands:"\ud83c\uddf8\ud83c\udde7",seychelles:"\ud83c\uddf8\ud83c\udde8",sudan:"\ud83c\uddf8\ud83c\udde9",sweden:"\ud83c\uddf8\ud83c\uddea",singapore:"\ud83c\uddf8\ud83c\uddec",st_helena:"\ud83c\uddf8\ud83c\udded",slovenia:"\ud83c\uddf8\ud83c\uddee",svalbard_jan_mayen:"\ud83c\uddf8\ud83c\uddef",slovakia:"\ud83c\uddf8\ud83c\uddf0",sierra_leone:"\ud83c\uddf8\ud83c\uddf1",san_marino:"\ud83c\uddf8\ud83c\uddf2",senegal:"\ud83c\uddf8\ud83c\uddf3",somalia:"\ud83c\uddf8\ud83c\uddf4",suriname:"\ud83c\uddf8\ud83c\uddf7",south_sudan:"\ud83c\uddf8\ud83c\uddf8",sao_tome_principe:"\ud83c\uddf8\ud83c\uddf9",el_salvador:"\ud83c\uddf8\ud83c\uddfb",sint_maarten:"\ud83c\uddf8\ud83c\uddfd",syria:"\ud83c\uddf8\ud83c\uddfe",swaziland:"\ud83c\uddf8\ud83c\uddff",tristan_da_cunha:"\ud83c\uddf9\ud83c\udde6",turks_caicos_islands:"\ud83c\uddf9\ud83c\udde8",chad:"\ud83c\uddf9\ud83c\udde9",french_southern_territories:"\ud83c\uddf9\ud83c\uddeb",togo:"\ud83c\uddf9\ud83c\uddec",thailand:"\ud83c\uddf9\ud83c\udded",tajikistan:"\ud83c\uddf9\ud83c\uddef",tokelau:"\ud83c\uddf9\ud83c\uddf0",timor_leste:"\ud83c\uddf9\ud83c\uddf1",turkmenistan:"\ud83c\uddf9\ud83c\uddf2",tunisia:"\ud83c\uddf9\ud83c\uddf3",tonga:"\ud83c\uddf9\ud83c\uddf4",tr:"\ud83c\uddf9\ud83c\uddf7",trinidad_tobago:"\ud83c\uddf9\ud83c\uddf9",tuvalu:"\ud83c\uddf9\ud83c\uddfb",taiwan:"\ud83c\uddf9\ud83c\uddfc",tanzania:"\ud83c\uddf9\ud83c\uddff",ukraine:"\ud83c\uddfa\ud83c\udde6",uganda:"\ud83c\uddfa\ud83c\uddec",us_outlying_islands:"\ud83c\uddfa\ud83c\uddf2",united_nations:"\ud83c\uddfa\ud83c\uddf3",us:"\ud83c\uddfa\ud83c\uddf8",uruguay:"\ud83c\uddfa\ud83c\uddfe",uzbekistan:"\ud83c\uddfa\ud83c\uddff",vatican_city:"\ud83c\uddfb\ud83c\udde6",st_vincent_grenadines:"\ud83c\uddfb\ud83c\udde8",venezuela:"\ud83c\uddfb\ud83c\uddea",british_virgin_islands:"\ud83c\uddfb\ud83c\uddec",us_virgin_islands:"\ud83c\uddfb\ud83c\uddee",vietnam:"\ud83c\uddfb\ud83c\uddf3",vanuatu:"\ud83c\uddfb\ud83c\uddfa",wallis_futuna:"\ud83c\uddfc\ud83c\uddeb",samoa:"\ud83c\uddfc\ud83c\uddf8",kosovo:"\ud83c\uddfd\ud83c\uddf0",yemen:"\ud83c\uddfe\ud83c\uddea",mayotte:"\ud83c\uddfe\ud83c\uddf9",south_africa:"\ud83c\uddff\ud83c\udde6",zambia:"\ud83c\uddff\ud83c\uddf2",zimbabwe:"\ud83c\uddff\ud83c\uddfc",england:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f",scotland:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f",wales:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f"},renderer:e=>e.emoji}));const Ld=()=>{const[e,n]=(0,t.useState)(!1);return mt(pt.FK,{children:mt($e,{children:mt(Sr,{children:mt(pt.FK,{children:[mt($r,{onLoaded:n}),e&&mt(ke,{children:mt(be,{path:"/",element:mt(Dd,{}),children:mt(be,{path:"/",element:mt(su,{})})})})]})})})})},Rd=e=>{e&&n.e(685).then(n.bind(n,685)).then((t=>{let{onCLS:n,onINP:r,onFCP:o,onLCP:a,onTTFB:i}=t;n(e),r(e),o(e),a(e),i(e)}))},zd=document.getElementById("root");zd&&(0,t.render)(mt(Ld,{}),zd),Rd()})()})(); \ No newline at end of file +/*! For license information please see main.64aea685.js.LICENSE.txt */ +(()=>{var e={61:(e,t,n)=>{"use strict";var r=n(375),o=n(629),a=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&a(e,".prototype.")>-1?o(n):n}},629:(e,t,n)=>{"use strict";var r=n(989),o=n(375),a=n(259),i=n(277),l=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,l),u=n(709),d=o("%Math.max%");e.exports=function(e){if("function"!==typeof e)throw new i("a function is required");var t=c(r,s,arguments);return a(t,1+d(0,e.length-(arguments.length-1)),!0)};var h=function(){return c(r,l,arguments)};u?u(e.exports,"apply",{value:h}):e.exports.apply=h},159:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",a="minute",i="hour",l="day",s="week",c="month",u="quarter",d="year",h="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},v={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()1)return e(i[0])}else{var l=t.name;b[l]=t,o=l}return!r&&o&&(y=o),o||!r&&y},S=function(e,t){if(k(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new A(n)},C=v;C.l=x,C.i=k,C.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var A=function(){function _(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=_.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(C.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(f);if(r){var o=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return C},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return S(e)=0&&(a[d]=parseInt(u,10))}var h=a[3],p=24===h?0:h,f=a[0]+"-"+a[1]+"-"+a[2]+" "+p+":"+a[4]+":"+a[5]+":000",m=+t;return(o.utc(f).valueOf()-(m-=m%1e3))/6e4},s=r.prototype;s.tz=function(e,t){void 0===e&&(e=a);var n,r=this.utcOffset(),i=this.toDate(),l=i.toLocaleString("en-US",{timeZone:e}),s=Math.round((i-new Date(l))/1e3/60),c=15*-Math.round(i.getTimezoneOffset()/15)-s;if(Number(c)){if(n=o(l,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var u=n.utcOffset();n=n.add(r-u,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},s.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=i(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return n&&n.value};var c=s.startOf;s.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var r=n&&t,i=n||t||a,s=l(+o(),i);if("string"!=typeof e)return o(e).tz(i);var c=function(e,t,n){var r=e-60*t*1e3,o=l(r,n);if(t===o)return[r,t];var a=l(r-=60*(o-t)*1e3,n);return o===a?[r,o]:[e-60*Math.min(o,a)*1e3,Math.max(o,a)]}(o.utc(e,r).valueOf(),s,i),u=c[0],d=c[1],h=o(u).utcOffset(d);return h.$x.$timezone=i,h},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){a=e}}}()},220:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,a){var i=o.prototype;a.utc=function(e){return new o({date:e,utc:!0,args:arguments})},i.utc=function(t){var n=a(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var l=i.parse;i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),l.call(this,e)};var s=i.init;i.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else s.call(this)};var c=i.utcOffset;i.utcOffset=function(r,o){var a=this.$utils().u;if(a(r))return this.$u?0:a(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],a=o[0],i=60*+o[1]+ +o[2];return 0===i?0:"+"===a?i:-i}(r),null===r))return this;var i=Math.abs(r)<=16?60*r:r,l=this;if(o)return l.$offset=i,l.$u=0===r,l;if(0!==r){var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(l=this.local().add(i+s,e)).$offset=i,l.$x.$localOffset=s}else l=this.utc();return l};var u=i.format;i.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(e){return"s"===e&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=i.diff;i.diff=function(e,t,n){if(e&&this.$u===e.$u)return h.call(this,e,t,n);var r=this.local(),o=a(e).local();return h.call(r,o,t,n)}}}()},411:(e,t,n)=>{"use strict";var r=n(709),o=n(430),a=n(277),i=n(553);e.exports=function(e,t,n){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new a("`obj` must be an object or a function`");if("string"!==typeof t&&"symbol"!==typeof t)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!i&&i(e,t);if(r)r(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===l&&d?d.enumerable:!l,value:n,writable:null===s&&d?d.writable:!s});else{if(!u&&(l||s||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},709:(e,t,n)=>{"use strict";var r=n(375)("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(o){r=!1}e.exports=r},123:e=>{"use strict";e.exports=EvalError},953:e=>{"use strict";e.exports=Error},780:e=>{"use strict";e.exports=RangeError},768:e=>{"use strict";e.exports=ReferenceError},430:e=>{"use strict";e.exports=SyntaxError},277:e=>{"use strict";e.exports=TypeError},619:e=>{"use strict";e.exports=URIError},307:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r{"use strict";var r=n(307);e.exports=Function.prototype.bind||r},375:(e,t,n)=>{"use strict";var r,o=n(953),a=n(123),i=n(780),l=n(768),s=n(430),c=n(277),u=n(619),d=Function,h=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(t){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(L){p=null}var f=function(){throw new c},m=p?function(){try{return f}catch(e){try{return p(arguments,"callee").get}catch(t){return f}}}():f,_=n(757)(),g=n(442)(),v=Object.getPrototypeOf||(g?function(e){return e.__proto__}:null),y={},b="undefined"!==typeof Uint8Array&&v?v(Uint8Array):r,w={__proto__:null,"%AggregateError%":"undefined"===typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":_&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"===typeof Atomics?r:Atomics,"%BigInt%":"undefined"===typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":a,"%Float32Array%":"undefined"===typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":y,"%Int8Array%":"undefined"===typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"===typeof JSON?JSON:r,"%Map%":"undefined"===typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&_&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?r:Promise,"%Proxy%":"undefined"===typeof Proxy?r:Proxy,"%RangeError%":i,"%ReferenceError%":l,"%Reflect%":"undefined"===typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&_&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&v?v(""[Symbol.iterator]()):r,"%Symbol%":_?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":b,"%TypeError%":c,"%Uint8Array%":"undefined"===typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"===typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(L){var k=v(v(L));w["%Error.prototype%"]=k}var x=function e(t){var n;if("%AsyncFunction%"===t)n=h("async function () {}");else if("%GeneratorFunction%"===t)n=h("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=h("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return w[t]=n,n},S={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(989),A=n(155),E=C.call(Function.call,Array.prototype.concat),M=C.call(Function.apply,Array.prototype.splice),N=C.call(Function.call,String.prototype.replace),T=C.call(Function.call,String.prototype.slice),$=C.call(Function.call,RegExp.prototype.exec),P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,O=function(e,t){var n,r=e;if(A(S,r)&&(r="%"+(n=S[r])[0]+"%"),A(w,r)){var o=w[r];if(o===y&&(o=x(r)),"undefined"===typeof o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===$(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=T(e,0,1),n=T(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return N(e,P,(function(e,t,n,o){r[r.length]=n?N(o,D,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=O("%"+r+"%",t),a=o.name,i=o.value,l=!1,u=o.alias;u&&(r=u[0],M(n,E([0,1],u)));for(var d=1,h=!0;d=n.length){var g=p(i,f);i=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:i[f]}else h=A(i,f),i=i[f];h&&!l&&(w[a]=i)}}return i}},553:(e,t,n)=>{"use strict";var r=n(375)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(o){r=null}e.exports=r},734:(e,t,n)=>{"use strict";var r=n(709),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},442:e=>{"use strict";var t={__proto__:null,foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof n)}},757:(e,t,n)=>{"use strict";var r="undefined"!==typeof Symbol&&Symbol,o=n(175);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&o())))}},175:e=>{"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},155:(e,t,n)=>{"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,a=n(989);e.exports=a.call(r,o)},267:(e,t,n)=>{var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,l=parseInt,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,f=function(){return u.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function _(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=a.test(e);return n||i.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,a,i,l,s,c=0,u=!1,d=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,a=o;return r=o=void 0,c=t,i=e.apply(a,n)}function y(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-c>=a}function b(){var e=f();if(y(e))return w(e);l=setTimeout(b,function(e){var n=t-(e-s);return d?p(n,a-(e-c)):n}(e))}function w(e){return l=void 0,g&&r?v(e):(r=o=void 0,i)}function k(){var e=f(),n=y(e);if(r=arguments,o=this,s=e,n){if(void 0===l)return function(e){return c=e,l=setTimeout(b,t),u?v(e):i}(s);if(d)return l=setTimeout(b,t),v(s)}return void 0===l&&(l=setTimeout(b,t)),i}return t=_(t)||0,m(n)&&(u=!!n.leading,a=(d="maxWait"in n)?h(_(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g),k.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=s=o=l=void 0},k.flush=function(){return void 0===l?i:w(f())},k}},424:(e,t,n)=>{var r="__lodash_hash_undefined__",o="[object Function]",a="[object GeneratorFunction]",i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,s=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,d=/^\[object .+?Constructor\]$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,p="object"==typeof self&&self&&self.Object===Object&&self,f=h||p||Function("return this")();var m=Array.prototype,_=Function.prototype,g=Object.prototype,v=f["__core-js_shared__"],y=function(){var e=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=_.toString,w=g.hasOwnProperty,k=g.toString,x=RegExp("^"+b.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=f.Symbol,C=m.splice,A=z(f,"Map"),E=z(Object,"create"),M=S?S.prototype:void 0,N=M?M.toString:void 0;function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},$.prototype.set=function(e,t){var n=this.__data__,r=D(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},P.prototype.clear=function(){this.__data__={hash:new T,map:new(A||$),string:new T}},P.prototype.delete=function(e){return R(this,e).delete(e)},P.prototype.get=function(e){return R(this,e).get(e)},P.prototype.has=function(e){return R(this,e).has(e)},P.prototype.set=function(e,t){return R(this,e).set(e,t),this};var I=F((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(B(e))return N?N.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return s.test(e)&&n.push(""),e.replace(c,(function(e,t,r,o){n.push(r?o.replace(u,"$1"):t||e)})),n}));function j(e){if("string"==typeof e||B(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function F(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i),i};return n.cache=new(F.Cache||P),n}F.Cache=P;var H=Array.isArray;function V(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function B(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==k.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:O(e,t);return void 0===r?n:r}},141:(e,t,n)=>{var r="function"===typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,a=r&&o&&"function"===typeof o.get?o.get:null,i=r&&Map.prototype.forEach,l="function"===typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&l?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=l&&s&&"function"===typeof s.get?s.get:null,u=l&&Set.prototype.forEach,d="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,m=Object.prototype.toString,_=Function.prototype.toString,g=String.prototype.match,v=String.prototype.slice,y=String.prototype.replace,b=String.prototype.toUpperCase,w=String.prototype.toLowerCase,k=RegExp.prototype.test,x=Array.prototype.concat,S=Array.prototype.join,C=Array.prototype.slice,A=Math.floor,E="function"===typeof BigInt?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,N="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"===typeof Symbol&&"object"===typeof Symbol.iterator,$="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T||"symbol")?Symbol.toStringTag:null,P=Object.prototype.propertyIsEnumerable,D=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function O(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||k.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var r=e<0?-A(-e):A(e);if(r!==e){var o=String(r),a=v.call(t,o.length+1);return y.call(o,n,"$&_")+"."+y.call(y.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return y.call(t,n,"$&_")}var L=n(634),R=L.custom,z=V(R)?R:null;function I(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function j(e){return y.call(String(e),/"/g,""")}function F(e){return"[object Array]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}function H(e){return"[object RegExp]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}function V(e){if(T)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!N)return!1;try{return N.call(e),!0}catch(t){}return!1}e.exports=function e(t,r,o,l){var s=r||{};if(U(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(U(s,"maxStringLength")&&("number"===typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!U(s,"customInspect")||s.customInspect;if("boolean"!==typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(U(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(U(s,"numericSeparator")&&"boolean"!==typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var b=s.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return q(t,s);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var k=String(t);return b?O(t,k):k}if("bigint"===typeof t){var A=String(t)+"n";return b?O(t,A):A}var M="undefined"===typeof s.depth?5:s.depth;if("undefined"===typeof o&&(o=0),o>=M&&M>0&&"object"===typeof t)return F(t)?"[Array]":"[Object]";var R=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=S.call(Array(e.indent+1)," ")}return{base:n,prev:S.call(Array(t+1),n)}}(s,o);if("undefined"===typeof l)l=[];else if(W(l,t)>=0)return"[Circular]";function B(t,n,r){if(n&&(l=C.call(l)).push(n),r){var a={depth:s.depth};return U(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,o+1,l)}return e(t,s,o+1,l)}if("function"===typeof t&&!H(t)){var K=function(e){if(e.name)return e.name;var t=g.call(_.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=X(t,B);return"[Function"+(K?": "+K:" (anonymous)")+"]"+(ee.length>0?" { "+S.call(ee,", ")+" }":"")}if(V(t)){var te=T?y.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):N.call(t);return"object"!==typeof t||T?te:Z(te)}if(function(e){if(!e||"object"!==typeof e)return!1;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"===typeof e.nodeName&&"function"===typeof e.getAttribute}(t)){for(var ne="<"+w.call(String(t.nodeName)),re=t.attributes||[],oe=0;oe"}if(F(t)){if(0===t.length)return"[]";var ae=X(t,B);return R&&!function(e){for(var t=0;t=0)return!1;return!0}(ae)?"["+J(ae,R)+"]":"[ "+S.call(ae,", ")+" ]"}if(function(e){return"[object Error]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t)){var ie=X(t,B);return"cause"in Error.prototype||!("cause"in t)||P.call(t,"cause")?0===ie.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(ie,", ")+" }":"{ ["+String(t)+"] "+S.call(x.call("[cause]: "+B(t.cause),ie),", ")+" }"}if("object"===typeof t&&m){if(z&&"function"===typeof t[z]&&L)return L(t,{depth:M-o});if("symbol"!==m&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!a||!e||"object"!==typeof e)return!1;try{a.call(e);try{c.call(e)}catch(ne){return!0}return e instanceof Map}catch(t){}return!1}(t)){var le=[];return i&&i.call(t,(function(e,n){le.push(B(n,t,!0)+" => "+B(e,t))})),Q("Map",a.call(t),le,R)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{a.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(B(e,t))})),Q("Set",c.call(t),se,R)}if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(ne){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return G("WeakMap");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(ne){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return G("WeakSet");if(function(e){if(!p||!e||"object"!==typeof e)return!1;try{return p.call(e),!0}catch(t){}return!1}(t))return G("WeakRef");if(function(e){return"[object Number]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t))return Z(B(Number(t)));if(function(e){if(!e||"object"!==typeof e||!E)return!1;try{return E.call(e),!0}catch(t){}return!1}(t))return Z(B(E.call(t)));if(function(e){return"[object Boolean]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t))return Z(f.call(t));if(function(e){return"[object String]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t))return Z(B(String(t)));if("undefined"!==typeof window&&t===window)return"{ [object Window] }";if("undefined"!==typeof globalThis&&t===globalThis||"undefined"!==typeof n.g&&t===n.g)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t)&&!H(t)){var ce=X(t,B),ue=D?D(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",he=!ue&&$&&Object(t)===t&&$ in t?v.call(Y(t),8,-1):de?"Object":"",pe=(ue||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(he||de?"["+S.call(x.call([],he||[],de||[]),": ")+"] ":"");return 0===ce.length?pe+"{}":R?pe+"{"+J(ce,R)+"}":pe+"{ "+S.call(ce,", ")+" }"}return String(t)};var B=Object.prototype.hasOwnProperty||function(e){return e in this};function U(e,t){return B.call(e,t)}function Y(e){return m.call(e)}function W(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return q(v.call(e,0,t.maxStringLength),t)+r}return I(y.call(y.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",t)}function K(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+b.call(t.toString(16))}function Z(e){return"Object("+e+")"}function G(e){return e+" { ? }"}function Q(e,t,n,r){return e+" ("+t+") {"+(r?J(n,r):S.call(n,", "))+"}"}function J(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+S.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=F(e),r=[];if(n){r.length=e.length;for(var o=0;o{"use strict";n.r(t),n.d(t,{Children:()=>U,Component:()=>l.uA,Fragment:()=>l.FK,PureComponent:()=>I,StrictMode:()=>$e,Suspense:()=>Z,SuspenseList:()=>J,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>be,cloneElement:()=>Ae,createContext:()=>l.q6,createElement:()=>l.n,createFactory:()=>ke,createPortal:()=>ne,createRef:()=>l._3,default:()=>je,findDOMNode:()=>Me,flushSync:()=>Te,forwardRef:()=>V,hydrate:()=>ue,isElement:()=>Re,isFragment:()=>Se,isMemo:()=>Ce,isValidElement:()=>xe,lazy:()=>Q,memo:()=>j,render:()=>ce,startTransition:()=>Pe,unmountComponentAtNode:()=>Ee,unstable_batchedUpdates:()=>Ne,useCallback:()=>C,useContext:()=>A,useDebugValue:()=>E,useDeferredValue:()=>De,useEffect:()=>b,useErrorBoundary:()=>M,useId:()=>N,useImperativeHandle:()=>x,useInsertionEffect:()=>Le,useLayoutEffect:()=>w,useMemo:()=>S,useReducer:()=>y,useRef:()=>k,useState:()=>v,useSyncExternalStore:()=>ze,useTransition:()=>Oe,version:()=>we});var r,o,a,i,l=n(746),s=0,c=[],u=l.fF,d=u.__b,h=u.__r,p=u.diffed,f=u.__c,m=u.unmount,_=u.__;function g(e,t){u.__h&&u.__h(o,e,s||t),s=0;var n=o.__H||(o.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function v(e){return s=1,y(R,e)}function y(e,t,n){var a=g(r++,2);if(a.t=e,!a.__c&&(a.__=[n?n(t):R(void 0,t),function(e){var t=a.__N?a.__N[0]:a.__[0],n=a.t(t,e);t!==n&&(a.__N=[n,a.__[1]],a.__c.setState({}))}],a.__c=o,!o.u)){var i=function(e,t,n){if(!a.__c.__H)return!0;var r=a.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!l||l.call(this,e,t,n);var o=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),!(!o&&a.__c.props===e)&&(!l||l.call(this,e,t,n))};o.u=!0;var l=o.shouldComponentUpdate,s=o.componentWillUpdate;o.componentWillUpdate=function(e,t,n){if(this.__e){var r=l;l=void 0,i(e,t,n),l=r}s&&s.call(this,e,t,n)},o.shouldComponentUpdate=i}return a.__N||a.__}function b(e,t){var n=g(r++,3);!u.__s&&L(n.__H,t)&&(n.__=e,n.i=t,o.__H.__h.push(n))}function w(e,t){var n=g(r++,4);!u.__s&&L(n.__H,t)&&(n.__=e,n.i=t,o.__h.push(n))}function k(e){return s=5,S((function(){return{current:e}}),[])}function x(e,t,n){s=6,w((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function S(e,t){var n=g(r++,7);return L(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function C(e,t){return s=8,S((function(){return e}),t)}function A(e){var t=o.context[e.__c],n=g(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(o)),t.props.value):e.__}function E(e,t){u.useDebugValue&&u.useDebugValue(t?t(e):e)}function M(e){var t=g(r++,10),n=v();return t.__=e,o.componentDidCatch||(o.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function N(){var e=g(r++,11);if(!e.__){for(var t=o.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function T(){for(var e;e=c.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(D),e.__H.__h.forEach(O),e.__H.__h=[]}catch(r){e.__H.__h=[],u.__e(r,e.__v)}}u.__b=function(e){o=null,d&&d(e)},u.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),_&&_(e,t)},u.__r=function(e){h&&h(e),r=0;var t=(o=e.__c).__H;t&&(a===o?(t.__h=[],o.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(D),t.__h.forEach(O),t.__h=[],r=0)),a=o},u.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==c.push(t)&&i===u.requestAnimationFrame||((i=u.requestAnimationFrame)||P)(T)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),a=o=null},u.__c=function(e,t){t.some((function(e){try{e.__h.forEach(D),e.__h=e.__h.filter((function(e){return!e.__||O(e)}))}catch(o){t.some((function(e){e.__h&&(e.__h=[])})),t=[],u.__e(o,e.__v)}})),f&&f(e,t)},u.unmount=function(e){m&&m(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{D(e)}catch(e){t=e}})),n.__H=void 0,t&&u.__e(t,n.__v))};var $="function"==typeof requestAnimationFrame;function P(e){var t,n=function(){clearTimeout(r),$&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);$&&(t=requestAnimationFrame(n))}function D(e){var t=o,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),o=t}function O(e){var t=o;e.__c=e.__(),o=t}function L(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function R(e,t){return"function"==typeof t?t(e):t}function z(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function I(e,t){this.props=e,this.context=t}function j(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:z(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,l.n)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(I.prototype=new l.uA).isPureReactComponent=!0,I.prototype.shouldComponentUpdate=function(e,t){return z(this.props,e)||z(this.state,t)};var F=l.fF.__b;l.fF.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),F&&F(e)};var H="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function V(e){function t(t){if(!("ref"in t))return e(t,null);var n=t.ref;delete t.ref;var r=e(t,n);return t.ref=n,r}return t.$$typeof=H,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var B=function(e,t){return null==e?null:(0,l.v2)((0,l.v2)(e).map(t))},U={map:B,forEach:B,count:function(e){return e?(0,l.v2)(e).length:0},only:function(e){var t=(0,l.v2)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:l.v2},Y=l.fF.__e;l.fF.__e=function(e,t,n,r){if(e.then)for(var o,a=t;a=a.__;)if((o=a.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);Y(e,t,n,r)};var W=l.fF.unmount;function q(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return q(e,t,n)}))),e}function K(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return K(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Z(){this.__u=0,this.t=null,this.__b=null}function G(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Q(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,l.n)(n,o)}return o.displayName="Lazy",o.__f=!0,o}function J(){this.u=null,this.o=null}l.fF.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),W&&W(e)},(Z.prototype=new l.uA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=G(r.__v),a=!1,i=function(){a||(a=!0,n.__R=null,o?o(l):l())};n.__R=i;var l=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=K(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},Z.prototype.componentWillUnmount=function(){this.t=[]},Z.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=q(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&(0,l.n)(l.FK,null,e.fallback);return o&&(o.__u&=-33),[(0,l.n)(l.FK,null,t.__a?null:e.children),o]};var X=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),(0,l.XX)((0,l.n)(ee,{context:t.context},e.__v),t.l)}function ne(e,t){var n=(0,l.n)(te,{__v:e,i:t});return n.containerInfo=t,n}(J.prototype=new l.uA).__a=function(e){var t=this,n=G(t.__v),r=t.o.get(e);return r[0]++,function(o){var a=function(){t.props.revealOrder?(r.push(o),X(t,e,r)):o()};n?n(a):a()}},J.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,l.v2)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},J.prototype.componentDidUpdate=J.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){X(e,n,t)}))};var re="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,oe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ae=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ie=/[A-Z0-9]/g,le="undefined"!=typeof document,se=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function ce(e,t,n){return null==t.__k&&(t.textContent=""),(0,l.XX)(e,t),"function"==typeof n&&n(),e?e.__c:null}function ue(e,t,n){return(0,l.Qv)(e,t),"function"==typeof n&&n(),e?e.__c:null}l.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(l.uA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var de=l.fF.event;function he(){}function pe(){return this.cancelBubble}function fe(){return this.defaultPrevented}l.fF.event=function(e){return de&&(e=de(e)),e.persist=he,e.isPropagationStopped=pe,e.isDefaultPrevented=fe,e.nativeEvent=e};var me,_e={enumerable:!1,configurable:!0,get:function(){return this.class}},ge=l.fF.vnode;l.fF.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1===n.indexOf("-");for(var a in t){var i=t[a];if(!("value"===a&&"defaultValue"in t&&null==i||le&&"children"===a&&"noscript"===n||"class"===a||"className"===a)){var s=a.toLowerCase();"defaultValue"===a&&"value"in t&&null==t.value?a="value":"download"===a&&!0===i?i="":"translate"===s&&"no"===i?i=!1:"o"===s[0]&&"n"===s[1]?"ondoubleclick"===s?a="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||se(t.type)?"onfocus"===s?a="onfocusin":"onblur"===s?a="onfocusout":ae.test(a)&&(a=s):s=a="oninput":o&&oe.test(a)?a=a.replace(ie,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===s&&r[a=s]&&(a="oninputCapture"),r[a]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",_e)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=re,ge&&ge(e)};var ve=l.fF.__r;l.fF.__r=function(e){ve&&ve(e),me=e.__c};var ye=l.fF.diffed;l.fF.diffed=function(e){ye&&ye(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),me=null};var be={ReactCurrentDispatcher:{current:{readContext:function(e){return me.__n[e.__c].props.value},useCallback:C,useContext:A,useDebugValue:E,useDeferredValue:De,useEffect:b,useId:N,useImperativeHandle:x,useInsertionEffect:Le,useLayoutEffect:w,useMemo:S,useReducer:y,useRef:k,useState:v,useSyncExternalStore:ze,useTransition:Oe}}},we="18.3.1";function ke(e){return l.n.bind(null,e)}function xe(e){return!!e&&e.$$typeof===re}function Se(e){return xe(e)&&e.type===l.FK}function Ce(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ae(e){return xe(e)?l.Ob.apply(null,arguments):e}function Ee(e){return!!e.__k&&((0,l.XX)(null,e),!0)}function Me(e){return e&&(e.base||1===e.nodeType&&e)||null}var Ne=function(e,t){return e(t)},Te=function(e,t){return e(t)},$e=l.FK;function Pe(e){e()}function De(e){return e}function Oe(){return[!1,Pe]}var Le=w,Re=xe;function ze(e,t){var n=t(),r=v({h:{__:n,v:t}}),o=r[0].h,a=r[1];return w((function(){o.__=n,o.v=t,Ie(o)&&a({h:o})}),[e,n,t]),b((function(){return Ie(o)&&a({h:o}),e((function(){Ie(o)&&a({h:o})}))}),[e]),n}function Ie(e){var t,n,r=e.v,o=e.__;try{var a=r();return!((t=o)===(n=a)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}var je={useState:v,useId:N,useReducer:y,useEffect:b,useLayoutEffect:w,useInsertionEffect:Le,useTransition:Oe,useDeferredValue:De,useSyncExternalStore:ze,startTransition:Pe,useRef:k,useImperativeHandle:x,useMemo:S,useCallback:C,useContext:A,useDebugValue:E,version:"18.3.1",Children:U,render:ce,hydrate:ue,unmountComponentAtNode:Ee,createPortal:ne,createElement:l.n,createContext:l.q6,createFactory:ke,cloneElement:Ae,createRef:l._3,Fragment:l.FK,isValidElement:xe,isElement:Re,isFragment:Se,isMemo:Ce,findDOMNode:Me,Component:l.uA,PureComponent:I,memo:j,forwardRef:V,flushSync:Te,unstable_batchedUpdates:Ne,StrictMode:$e,Suspense:Z,SuspenseList:J,lazy:Q,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:be}},746:(e,t,n)=>{"use strict";n.d(t,{FK:()=>x,Ob:()=>Y,Qv:()=>U,XX:()=>B,_3:()=>k,fF:()=>o,n:()=>b,q6:()=>W,uA:()=>S,v2:()=>P});var r,o,a,i,l,s,c,u,d,h,p,f={},m=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function v(e,t){for(var n in t)e[n]=t[n];return e}function y(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function b(e,t,n){var o,a,i,l={};for(i in t)"key"==i?o=t[i]:"ref"==i?a=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return w(e,l,o,a,null)}function w(e,t,n,r,i){var l={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++a:i,__i:-1,__u:0};return null==i&&null!=o.vnode&&o.vnode(l),l}function k(){return{current:null}}function x(e){return e.children}function S(e,t){this.props=e,this.context=t}function C(e,t){if(null==t)return e.__?C(e.__,e.__i+1):null;for(var n;tt&&i.sort(c));M.__r=0}function N(e,t,n,r,o,a,i,l,s,c,u){var d,h,p,_,g,v=r&&r.__k||m,y=t.length;for(n.__d=s,T(n,t,v),s=n.__d,d=0;d0?w(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,a=null,-1!==(l=o.__i=D(o,n,i,u))&&(u--,(a=n[l])&&(a.__u|=131072)),null==a||null===a.__v?(-1==l&&d--,"function"!=typeof o.type&&(o.__u|=65536)):l!==i&&(l==i-1?d--:l==i+1?d++:(l>i?d--:d++,o.__u|=65536))):o=e.__k[r]=null;if(u)for(r=0;r(null!=s&&0==(131072&s.__u)?1:0))for(;i>=0||l=0){if((s=t[i])&&0==(131072&s.__u)&&o==s.key&&a===s.type)return i;i--}if(l2&&(s.children=arguments.length>3?r.call(arguments,2):n),w(e.type,s,o||e.key,a||e.ref,null)}function W(e,t){var n={__c:t="__cC"+p++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,E(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=m.slice,o={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&null!=a.getDerivedStateFromError&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(t){e=t}throw e}},a=0,S.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=v({},this.state),"function"==typeof e&&(e=e(v({},n),this.props)),e&&v(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),E(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),E(this))},S.prototype.render=x,i=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},M.__r=0,u=0,d=R(!1),h=R(!0),p=0},640:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",o="RFC3986";e.exports={default:o,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:o}},215:(e,t,n)=>{"use strict";var r=n(518),o=n(968),a=n(640);e.exports={formats:a,parse:o,stringify:r}},968:(e,t,n)=>{"use strict";var r=n(570),o=Object.prototype.hasOwnProperty,a=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},l=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,l=n.depth>0&&/(\[[^[\]]*])/.exec(a),c=l?a.slice(0,l.index):a,u=[];if(c){if(!n.plainObjects&&o.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var d=0;n.depth>0&&null!==(l=i.exec(a))&&d=0;--a){var i,l=e[a];if("[]"===l&&n.parseArrays)i=n.allowEmptyArrays&&(""===o||n.strictNullHandling&&null===o)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var c="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,u=n.decodeDotInKeys?c.replace(/%2E/g,"."):c,d=parseInt(u,10);n.parseArrays||""!==u?!isNaN(d)&&l!==u&&String(d)===u&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(i=[])[d]=o:"__proto__"!==u&&(i[u]=o):i={0:o}}o=i}return o}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return i;if("undefined"!==typeof e.allowEmptyArrays&&"boolean"!==typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if("undefined"!==typeof e.decodeDotInKeys&&"boolean"!==typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&"undefined"!==typeof e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?i.charset:e.charset,n="undefined"===typeof e.duplicates?i.duplicates:e.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:"undefined"===typeof e.allowDots?!0===e.decodeDotInKeys||i.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"===typeof e.allowEmptyArrays?!!e.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:i.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:i.comma,decodeDotInKeys:"boolean"===typeof e.decodeDotInKeys?e.decodeDotInKeys:i.decodeDotInKeys,decoder:"function"===typeof e.decoder?e.decoder:i.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:i.depth,duplicates:n,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:i.plainObjects,strictDepth:"boolean"===typeof e.strictDepth?!!e.strictDepth:i.strictDepth,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var u="string"===typeof e?function(e,t){var n={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=c.split(t.delimiter,d),p=-1,f=t.charset;if(t.charsetSentinel)for(u=0;u-1&&(_=a(_)?[_]:_);var b=o.call(n,m);b&&"combine"===t.duplicates?n[m]=r.combine(n[m],_):b&&"last"!==t.duplicates||(n[m]=_)}return n}(e,n):e,d=n.plainObjects?Object.create(null):{},h=Object.keys(u),p=0;p{"use strict";var r=n(670),o=n(570),a=n(640),i=Object.prototype.hasOwnProperty,l={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,s(t)?t:[t])},d=Date.prototype.toISOString,h=a.default,p={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o.encode,encodeValuesOnly:!1,format:h,formatter:a.formatters[h],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},f={},m=function e(t,n,a,i,l,c,d,h,m,_,g,v,y,b,w,k,x,S){for(var C,A=t,E=S,M=0,N=!1;void 0!==(E=E.get(f))&&!N;){var T=E.get(t);if(M+=1,"undefined"!==typeof T){if(T===M)throw new RangeError("Cyclic object value");N=!0}"undefined"===typeof E.get(f)&&(M=0)}if("function"===typeof _?A=_(n,A):A instanceof Date?A=y(A):"comma"===a&&s(A)&&(A=o.maybeMap(A,(function(e){return e instanceof Date?y(e):e}))),null===A){if(c)return m&&!k?m(n,p.encoder,x,"key",b):n;A=""}if("string"===typeof(C=A)||"number"===typeof C||"boolean"===typeof C||"symbol"===typeof C||"bigint"===typeof C||o.isBuffer(A))return m?[w(k?n:m(n,p.encoder,x,"key",b))+"="+w(m(A,p.encoder,x,"value",b))]:[w(n)+"="+w(String(A))];var $,P=[];if("undefined"===typeof A)return P;if("comma"===a&&s(A))k&&m&&(A=o.maybeMap(A,m)),$=[{value:A.length>0?A.join(",")||null:void 0}];else if(s(_))$=_;else{var D=Object.keys(A);$=g?D.sort(g):D}var O=h?n.replace(/\./g,"%2E"):n,L=i&&s(A)&&1===A.length?O+"[]":O;if(l&&s(A)&&0===A.length)return L+"[]";for(var R=0;R<$.length;++R){var z=$[R],I="object"===typeof z&&"undefined"!==typeof z.value?z.value:A[z];if(!d||null!==I){var j=v&&h?z.replace(/\./g,"%2E"):z,F=s(A)?"function"===typeof a?a(L,j):L:L+(v?"."+j:"["+j+"]");S.set(t,M);var H=r();H.set(f,S),u(P,e(I,F,a,i,l,c,d,h,"comma"===a&&k&&s(A)?null:m,_,g,v,y,b,w,k,x,H))}}return P};e.exports=function(e,t){var n,o=e,c=function(e){if(!e)return p;if("undefined"!==typeof e.allowEmptyArrays&&"boolean"!==typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if("undefined"!==typeof e.encodeDotInKeys&&"boolean"!==typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&"undefined"!==typeof e.encoder&&"function"!==typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=a.default;if("undefined"!==typeof e.format){if(!i.call(a.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r,o=a.formatters[n],c=p.filter;if(("function"===typeof e.filter||s(e.filter))&&(c=e.filter),r=e.arrayFormat in l?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":p.arrayFormat,"commaRoundTrip"in e&&"boolean"!==typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u="undefined"===typeof e.allowDots?!0===e.encodeDotInKeys||p.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"===typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:u,allowEmptyArrays:"boolean"===typeof e.allowEmptyArrays?!!e.allowEmptyArrays:p.allowEmptyArrays,arrayFormat:r,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:"undefined"===typeof e.delimiter?p.delimiter:e.delimiter,encode:"boolean"===typeof e.encode?e.encode:p.encode,encodeDotInKeys:"boolean"===typeof e.encodeDotInKeys?e.encodeDotInKeys:p.encodeDotInKeys,encoder:"function"===typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"===typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:c,format:n,formatter:o,serializeDate:"function"===typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"===typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"===typeof e.sort?e.sort:null,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"===typeof c.filter?o=(0,c.filter)("",o):s(c.filter)&&(n=c.filter);var d=[];if("object"!==typeof o||null===o)return"";var h=l[c.arrayFormat],f="comma"===h&&c.commaRoundTrip;n||(n=Object.keys(o)),c.sort&&n.sort(c.sort);for(var _=r(),g=0;g0?b+y:""}},570:(e,t,n)=>{"use strict";var r=n(640),o=Object.prototype.hasOwnProperty,a=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),l=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(a(n)){for(var r=[],o=0;o=s?l.slice(u,u+s):l,h=[],p=0;p=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||a===r.RFC1738&&(40===f||41===f)?h[h.length]=d.charAt(p):f<128?h[h.length]=i[f]:f<2048?h[h.length]=i[192|f>>6]+i[128|63&f]:f<55296||f>=57344?h[h.length]=i[224|f>>12]+i[128|f>>6&63]+i[128|63&f]:(p+=1,f=65536+((1023&f)<<10|1023&d.charCodeAt(p)),h[h.length]=i[240|f>>18]+i[128|f>>12&63]+i[128|f>>6&63]+i[128|63&f])}c+=h.join("")}return c},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var n=[],r=0;r{e.exports=n(204)},204:(e,t,n)=>{"use strict";var r=function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(n(609)),o=n(609);function a(){return(a=Object.assign||function(e){for(var t=1;tr.length&&h(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var o=r.length,a=t.length;a>=r.length;a--){var i=t[a];if(!h(e,a)&&p(e,a,i)){o=a+1;break}}return o}function _(e,t){return m(e,t)===e.mask.length}function g(e,t){var n=e.maskChar,r=e.mask,o=e.prefix;if(!n){for((t=v(e,"",t,0)).lengtht.length&&(t+=o.slice(t.length,r)),l.every((function(n){for(;u=n,h(e,c=r)&&u!==o[c];){if(r>=t.length&&(t+=o[r]),l=n,a&&h(e,r)&&l===a)return!0;if(++r>=o.length)return!1}var l,c,u;return!p(e,r,n)&&n!==a||(ro.start?d=(u=function(e,t,n,r){var o=e.mask,a=e.maskChar,i=n.split(""),l=r;return i.every((function(t){for(;i=t,h(e,n=r)&&i!==o[n];)if(++r>=o.length)return!1;var n,i;return(p(e,r,t)||t===a)&&r++,r=a.length?f=a.length:f=i.length&&f{"use strict";var r=n(375),o=n(411),a=n(734)(),i=n(553),l=n(277),s=r("%Math.floor%");e.exports=function(e,t){if("function"!==typeof e)throw new l("`fn` is not a function");if("number"!==typeof t||t<0||t>4294967295||s(t)!==t)throw new l("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&i){var u=i(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(a?o(e,"length",t,!0,!0):o(e,"length",t)),e}},670:(e,t,n)=>{"use strict";var r=n(375),o=n(61),a=n(141),i=n(277),l=r("%WeakMap%",!0),s=r("%Map%",!0),c=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),d=o("WeakMap.prototype.has",!0),h=o("Map.prototype.get",!0),p=o("Map.prototype.set",!0),f=o("Map.prototype.has",!0),m=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new i("Side channel does not contain "+a(e))},get:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return c(e,r)}else if(s){if(t)return h(t,r)}else if(n)return function(e,t){var n=m(e,t);return n&&n.value}(n,r)},has:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return d(e,r)}else if(s){if(t)return f(t,r)}else if(n)return function(e,t){return!!m(e,t)}(n,r);return!1},set:function(r,o){l&&r&&("object"===typeof r||"function"===typeof r)?(e||(e=new l),u(e,r,o)):s?(t||(t=new s),p(t,r,o)):(n||(n={key:{},next:null}),function(e,t,n){var r=m(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,o))}};return r}},634:()=>{},738:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+e+".f772060c.chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="vmui:";n.l=(r,o,a,i)=>{if(e[r])e[r].push(o);else{var l,s;if(void 0!==a)for(var c=document.getElementsByTagName("script"),u=0;u{l.onerror=l.onload=null,clearTimeout(p);var o=e[r];if(delete e[r],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(n))),t)return t(n)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=h.bind(null,l.onerror),l.onload=h.bind(null,l.onload),s&&document.head.appendChild(l)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="./",(()=>{var e={792:0};n.f.j=(t,r)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var a=new Promise(((n,r)=>o=e[t]=[n,r]));r.push(o[2]=a);var i=n.p+n.u(t),l=new Error;n.l(i,(r=>{if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var a=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",l.name="ChunkLoadError",l.type=a,l.request=i,o[1](l)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,a,i=r[0],l=r[1],s=r[2],c=0;if(i.some((t=>0!==e[t]))){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(s)s(n)}for(t&&t(r);c{"use strict";var e,t=n(609),r=n(159),o=n.n(r),a=n(7),i=n.n(a),l=n(648),s=n.n(l),c=n(220),u=n.n(c);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function y(t,n,r,o){void 0===o&&(o={});let{window:a=document.defaultView,v5Compat:i=!1}=o,l=a.history,s=e.Pop,c=null,u=f();function f(){return(l.state||{idx:null}).idx}function v(){s=e.Pop;let t=f(),n=null==t?null:t-u;u=t,c&&c({action:s,location:b.location,delta:n})}function y(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,n="string"===typeof e?e:g(e);return n=n.replace(/ $/,"%20"),p(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==u&&(u=0,l.replaceState(d({},l.state,{idx:u}),""));let b={get action(){return s},get location(){return t(a,l)},listen(e){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(h,v),c=e,()=>{a.removeEventListener(h,v),c=null}},createHref:e=>n(a,e),createURL:y,encodeLocation(e){let t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(t,n){s=e.Push;let o=_(b.location,t,n);r&&r(o,t),u=f()+1;let d=m(o,u),h=b.createHref(o);try{l.pushState(d,"",h)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;a.location.assign(h)}i&&c&&c({action:s,location:b.location,delta:1})},replace:function(t,n){s=e.Replace;let o=_(b.location,t,n);r&&r(o,t),u=f();let a=m(o,u),d=b.createHref(o);l.replaceState(a,"",d),i&&c&&c({action:s,location:b.location,delta:0})},go:e=>l.go(e)};return b}var b;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(b||(b={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function w(e,t,n){return void 0===n&&(n="/"),k(e,t,n,!1)}function k(e,t,n,r){let o=R(("string"===typeof t?v(t):t).pathname||"/",n);if(null==o)return null;let a=x(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let i=null;for(let l=0;null==i&&l{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(p(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));let l=H([r,i.relativePath]),s=n.concat(i);e.children&&e.children.length>0&&(p(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),x(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:P(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of S(e.path))o(e,t,r);else o(e,t)})),t}function S(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return o?[a,""]:[a];let i=S(r.join("/")),l=[];return l.push(...i.map((e=>""===e?a:[a,e].join("/")))),o&&l.push(...i),l.map((t=>e.startsWith("/")&&""===t?"/":t))}const C=/^:[\w-]+$/,A=3,E=2,M=1,N=10,T=-2,$=e=>"*"===e;function P(e,t){let n=e.split("/"),r=n.length;return n.some($)&&(r+=T),t&&(r+=E),n.filter((e=>!$(e))).reduce(((e,t)=>e+(C.test(t)?A:""===t?M:N)),r)}function D(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},a="/",i=[];for(let l=0;l(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let a=new RegExp(o,t?void 0:"i");return[a,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=l[n]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const s=l[n];return e[r]=o&&!s?void 0:(s||"").replace(/%2F/g,"/"),e}),{}),pathname:a,pathnameBase:i,pattern:e}}function L(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return f(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function R(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function z(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function I(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function j(e,t){let n=I(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function F(e,t,n,r){let o;void 0===r&&(r=!1),"string"===typeof e?o=v(e):(o=d({},e),p(!o.pathname||!o.pathname.includes("?"),z("?","pathname","search",o)),p(!o.pathname||!o.pathname.includes("#"),z("#","pathname","hash",o)),p(!o.search||!o.search.includes("#"),z("#","search","hash",o)));let a,i=""===e||""===o.pathname,l=i?"/":o.pathname;if(null==l)a=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"===typeof e?v(e):e,a=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:a,search:B(r),hash:U(o)}}(o,a),c=l&&"/"!==l&&l.endsWith("/"),u=(i||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!c&&!u||(s.pathname+="/"),s}const H=e=>e.join("/").replace(/\/\/+/g,"/"),V=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",U=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function Y(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const W=["post","put","patch","delete"],q=(new Set(W),["get",...W]);new Set(q),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r.current=!0}));let o=t.useCallback((function(t,o){void 0===o&&(o={}),r.current&&("number"===typeof t?e.navigate(t):e.navigate(t,K({fromRouteId:n},o)))}),[e,n]);return o}():function(){te()||p(!1);let e=t.useContext(Z),{basename:n,future:r,navigator:o}=t.useContext(Q),{matches:a}=t.useContext(X),{pathname:i}=ne(),l=JSON.stringify(j(a,r.v7_relativeSplatPath)),s=t.useRef(!1);re((()=>{s.current=!0}));let c=t.useCallback((function(t,r){if(void 0===r&&(r={}),!s.current)return;if("number"===typeof t)return void o.go(t);let a=F(t,JSON.parse(l),i,"path"===r.relative);null==e&&"/"!==n&&(a.pathname="/"===a.pathname?n:H([n,a.pathname])),(r.replace?o.replace:o.push)(a,r.state,r)}),[n,o,l,i,e]);return c}()}const ae=t.createContext(null);function ie(e,n){let{relative:r}=void 0===n?{}:n,{future:o}=t.useContext(Q),{matches:a}=t.useContext(X),{pathname:i}=ne(),l=JSON.stringify(j(a,o.v7_relativeSplatPath));return t.useMemo((()=>F(e,JSON.parse(l),i,"path"===r)),[e,l,i,r])}function le(n,r,o,a){te()||p(!1);let{navigator:i}=t.useContext(Q),{matches:l}=t.useContext(X),s=l[l.length-1],c=s?s.params:{},u=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let d,h=ne();if(r){var f;let e="string"===typeof r?v(r):r;"/"===u||(null==(f=e.pathname)?void 0:f.startsWith(u))||p(!1),d=e}else d=h;let m=d.pathname||"/",_=m;if("/"!==u){let e=u.replace(/^\//,"").split("/");_="/"+m.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=w(n,{pathname:_});let y=he(g&&g.map((e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:H([u,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:H([u,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,o,a);return r&&y?t.createElement(J.Provider,{value:{location:K({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:e.Pop}},y):y}function se(){let e=function(){var e;let n=t.useContext(ee),r=_e(fe.UseRouteError),o=ge(fe.UseRouteError);if(void 0!==n)return n;return null==(e=r.errors)?void 0:e[o]}(),n=Y(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:o};return t.createElement(t.Fragment,null,t.createElement("h2",null,"Unexpected Application Error!"),t.createElement("h3",{style:{fontStyle:"italic"}},n),r?t.createElement("pre",{style:a},r):null,null)}const ce=t.createElement(se,null);class ue extends t.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?t.createElement(X.Provider,{value:this.props.routeContext},t.createElement(ee.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function de(e){let{routeContext:n,match:r,children:o}=e,a=t.useContext(Z);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),t.createElement(X.Provider,{value:n},o)}function he(e,n,r,o){var a;if(void 0===n&&(n=[]),void 0===r&&(r=null),void 0===o&&(o=null),null==e){var i;if(!r)return null;if(r.errors)e=r.matches;else{if(!(null!=(i=o)&&i.v7_partialHydration&&0===n.length&&!r.initialized&&r.matches.length>0))return null;e=r.matches}}let l=e,s=null==(a=r)?void 0:a.errors;if(null!=s){let e=l.findIndex((e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id])));e>=0||p(!1),l=l.slice(0,Math.min(l.length,e+1))}let c=!1,u=-1;if(r&&o&&o.v7_partialHydration)for(let t=0;t=0?l.slice(0,u+1):[l[0]];break}}}return l.reduceRight(((e,o,a)=>{let i,d=!1,h=null,p=null;var f;r&&(i=s&&o.route.id?s[o.route.id]:void 0,h=o.route.errorElement||ce,c&&(u<0&&0===a?(f="route-fallback",!1||ve[f]||(ve[f]=!0),d=!0,p=null):u===a&&(d=!0,p=o.route.hydrateFallbackElement||null)));let m=n.concat(l.slice(0,a+1)),_=()=>{let n;return n=i?h:d?p:o.route.Component?t.createElement(o.route.Component,null):o.route.element?o.route.element:e,t.createElement(de,{match:o,routeContext:{outlet:e,matches:m,isDataRoute:null!=r},children:n})};return r&&(o.route.ErrorBoundary||o.route.errorElement||0===a)?t.createElement(ue,{location:r.location,revalidation:r.revalidation,component:h,error:i,children:_(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):_()}),null)}var pe=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(pe||{}),fe=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(fe||{});function me(e){let n=t.useContext(Z);return n||p(!1),n}function _e(e){let n=t.useContext(G);return n||p(!1),n}function ge(e){let n=function(){let e=t.useContext(X);return e||p(!1),e}(),r=n.matches[n.matches.length-1];return r.route.id||p(!1),r.route.id}const ve={};t.startTransition;function ye(e){return function(e){let n=t.useContext(X).outlet;return n?t.createElement(ae.Provider,{value:e},n):n}(e.context)}function be(e){p(!1)}function we(n){let{basename:r="/",children:o=null,location:a,navigationType:i=e.Pop,navigator:l,static:s=!1,future:c}=n;te()&&p(!1);let u=r.replace(/^\/*/,"/"),d=t.useMemo((()=>({basename:u,navigator:l,static:s,future:K({v7_relativeSplatPath:!1},c)})),[u,c,l,s]);"string"===typeof a&&(a=v(a));let{pathname:h="/",search:f="",hash:m="",state:_=null,key:g="default"}=a,y=t.useMemo((()=>{let e=R(h,u);return null==e?null:{location:{pathname:e,search:f,hash:m,state:_,key:g},navigationType:i}}),[u,h,f,m,_,g,i]);return null==y?null:t.createElement(Q.Provider,{value:d},t.createElement(J.Provider,{children:o,value:y}))}function ke(e){let{children:t,location:n}=e;return le(xe(t),n)}new Promise((()=>{}));t.Component;function xe(e,n){void 0===n&&(n=[]);let r=[];return t.Children.forEach(e,((e,o)=>{if(!t.isValidElement(e))return;let a=[...n,o];if(e.type===t.Fragment)return void r.push.apply(r,xe(e.props.children,a));e.type!==be&&p(!1),e.props.index&&e.props.children&&p(!1);let i={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=xe(e.props.children,a)),r.push(i)})),r}function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function Ae(e){return void 0===e&&(e=""),new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Ee=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Me=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(Id){}const Ne=t.createContext({isTransitioning:!1});new Map;const Te=t.startTransition;t.flushSync,t.useId;function $e(e){let{basename:n,children:r,future:o,window:a}=e,i=t.useRef();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),y((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=v(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),_("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"===typeof t?t:g(t))}),(function(e,t){f("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:a,v5Compat:!0}));let l=i.current,[s,c]=t.useState({action:l.action,location:l.location}),{v7_startTransition:u}=o||{},d=t.useCallback((e=>{u&&Te?Te((()=>c(e))):c(e)}),[c,u]);return t.useLayoutEffect((()=>l.listen(d)),[l,d]),t.createElement(we,{basename:n,children:r,location:s.location,navigationType:s.action,navigator:l,future:o})}const Pe="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,De=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Oe=t.forwardRef((function(e,n){let r,{onClick:o,relative:a,reloadDocument:i,replace:l,state:s,target:c,to:u,preventScrollReset:d,unstable_viewTransition:h}=e,f=Ce(e,Ee),{basename:m}=t.useContext(Q),_=!1;if("string"===typeof u&&De.test(u)&&(r=u,Pe))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=R(t.pathname,m);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:_=!0}catch(Id){}let v=function(e,n){let{relative:r}=void 0===n?{}:n;te()||p(!1);let{basename:o,navigator:a}=t.useContext(Q),{hash:i,pathname:l,search:s}=ie(e,{relative:r}),c=l;return"/"!==o&&(c="/"===l?o:H([o,l])),a.createHref({pathname:c,search:s,hash:i})}(u,{relative:a}),y=function(e,n){let{target:r,replace:o,state:a,preventScrollReset:i,relative:l,unstable_viewTransition:s}=void 0===n?{}:n,c=oe(),u=ne(),d=ie(e,{relative:l});return t.useCallback((t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,r)){t.preventDefault();let n=void 0!==o?o:g(u)===g(d);c(e,{replace:n,state:a,preventScrollReset:i,relative:l,unstable_viewTransition:s})}}),[u,c,d,o,a,r,e,i,l,s])}(u,{replace:l,state:s,target:c,preventScrollReset:d,relative:a,unstable_viewTransition:h});return t.createElement("a",Se({},f,{href:r||v,onClick:_||i?o:function(e){o&&o(e),e.defaultPrevented||y(e)},ref:n,target:c}))}));const Le=t.forwardRef((function(e,n){let{"aria-current":r="page",caseSensitive:o=!1,className:a="",end:i=!1,style:l,to:s,unstable_viewTransition:c,children:u}=e,d=Ce(e,Me),h=ie(s,{relative:d.relative}),f=ne(),m=t.useContext(G),{navigator:_,basename:g}=t.useContext(Q),v=null!=m&&function(e,n){void 0===n&&(n={});let r=t.useContext(Ne);null==r&&p(!1);let{basename:o}=Ie(Re.useViewTransitionState),a=ie(e,{relative:n.relative});if(!r.isTransitioning)return!1;let i=R(r.currentLocation.pathname,o)||r.currentLocation.pathname,l=R(r.nextLocation.pathname,o)||r.nextLocation.pathname;return null!=O(a.pathname,l)||null!=O(a.pathname,i)}(h)&&!0===c,y=_.encodeLocation?_.encodeLocation(h).pathname:h.pathname,b=f.pathname,w=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;o||(b=b.toLowerCase(),w=w?w.toLowerCase():null,y=y.toLowerCase()),w&&g&&(w=R(w,g)||w);const k="/"!==y&&y.endsWith("/")?y.length-1:y.length;let x,S=b===y||!i&&b.startsWith(y)&&"/"===b.charAt(k),C=null!=w&&(w===y||!i&&w.startsWith(y)&&"/"===w.charAt(y.length)),A={isActive:S,isPending:C,isTransitioning:v},E=S?r:void 0;x="function"===typeof a?a(A):[a,S?"active":null,C?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let M="function"===typeof l?l(A):l;return t.createElement(Oe,Se({},d,{"aria-current":E,className:x,ref:n,style:M,to:s,unstable_viewTransition:c}),"function"===typeof u?u(A):u)}));var Re,ze;function Ie(e){let n=t.useContext(Z);return n||p(!1),n}function je(e){let n=t.useRef(Ae(e)),r=t.useRef(!1),o=ne(),a=t.useMemo((()=>function(e,t){let n=Ae(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(o.search,r.current?null:n.current)),[o.search]),i=oe(),l=t.useCallback(((e,t)=>{const n=Ae("function"===typeof e?e(a):e);r.current=!0,i("?"+n,t)}),[i,a]);return[a,l]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Re||(Re={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(ze||(ze={}));const Fe=()=>{var e;const t=(null===(e=document.getElementById("root"))||void 0===e?void 0:e.dataset.params)||"{}";try{return JSON.parse(t)}catch(Id){return console.error(Id),{}}},He=()=>!!Object.keys(Fe()).length,Ve=/(\/select\/)(\d+|\d.+)(\/)(.+)/,Be=e=>{var t;return(null===(t=e.match(Ve))||void 0===t?void 0:t[2])||""};let Ue=function(e){return e.logs="logs",e.anomaly="anomaly",e}({});const Ye=(e,t)=>{t?window.localStorage.setItem(e,JSON.stringify({value:t})):qe([e]),window.dispatchEvent(new Event("storage"))},We=e=>{const t=window.localStorage.getItem(e);if(null!==t)try{var n;return null===(n=JSON.parse(t))||void 0===n?void 0:n.value}catch(Id){return t}},qe=e=>e.forEach((e=>window.localStorage.removeItem(e))),{REACT_APP_TYPE:Ke}={REACT_APP_TYPE:"logs"};var Ze=n(215),Ge=n.n(Ze),Qe=n(424),Je=n.n(Qe);const Xe={table:100,chart:20,code:1e3},et=(e,t)=>{const n=window.location.hash.split("?")[1],r=Ge().parse(n,{ignoreQueryPrefix:!0});return Je()(r,e,t||"")};let tt=function(e){return e.yhat="yhat",e.yhatUpper="yhat_upper",e.yhatLower="yhat_lower",e.anomaly="vmui_anomalies_points",e.training="vmui_training_data",e.actual="actual",e.anomalyScore="anomaly_score",e}({}),nt=function(e){return e.table="table",e.chart="chart",e.code="code",e}({}),rt=function(e){return e.emptyServer="Please enter Server URL",e.validServer="Please provide a valid Server URL",e.validQuery="Please enter a valid Query and execute it",e.traceNotFound="Not found the tracing information",e.emptyTitle="Please enter title",e.positiveNumber="Please enter positive number",e.validStep="Please enter a valid step",e.unknownType="Unknown server response format: must have 'errorType'",e}({}),ot=function(e){return e.system="system",e.light="light",e.dark="dark",e}({}),at=function(e){return e.empty="empty",e.metricsql="metricsql",e.label="label",e.labelValue="labelValue",e}({});const it=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),lt=(e,t)=>{document.documentElement.style.setProperty(`--${e}`,t)},st=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,ct=e=>e.replace(/\/$/,""),ut=et("g0.tenantID",""),dt={serverUrl:ct((e=>{const{serverURL:t}=Fe(),n=We("SERVER_URL"),r=window.location.href.replace(/\/(select\/)?(vmui)\/.*/,""),o=`${window.location.origin}${window.location.pathname.replace(/^\/vmui/,"")}`,a=window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),i=t||n||a;switch(Ke){case Ue.logs:return r;case Ue.anomaly:return n||o;default:return e?((e,t)=>e.replace(Ve,`$1${t}/$4`))(i,e):i}})(ut)),tenantId:ut,theme:We("THEME")||ot.system,isDarkTheme:null,flags:{},appConfig:{}};function ht(e,t){switch(t.type){case"SET_SERVER":return{...e,serverUrl:ct(t.payload)};case"SET_TENANT_ID":return{...e,tenantId:t.payload};case"SET_THEME":return Ye("THEME",t.payload),{...e,theme:t.payload};case"SET_DARK_THEME":return{...e,isDarkTheme:(n=e.theme,n===ot.system&&st()||n===ot.dark)};case"SET_FLAGS":return{...e,flags:t.payload};case"SET_APP_CONFIG":return{...e,appConfig:t.payload};default:throw new Error}var n}var pt=n(746);var ft=0;Array.isArray;function mt(e,t,n,r,o,a){t||(t={});var i,l,s=t;"ref"in t&&(i=t.ref,delete t.ref);var c={type:e,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--ft,__i:-1,__u:0,__source:o,__self:a};if("function"==typeof e&&(i=e.defaultProps))for(l in i)void 0===s[l]&&(s[l]=i[l]);return pt.fF.vnode&&pt.fF.vnode(c),c}const _t=(0,t.createContext)({}),gt=()=>(0,t.useContext)(_t).state,vt=()=>(0,t.useContext)(_t).dispatch,yt=Object.entries(dt).reduce(((e,t)=>{let[n,r]=t;return{...e,[n]:et(n)||r}}),{}),bt="YYYY-MM-DD",wt="YYYY-MM-DD HH:mm:ss",kt="YYYY-MM-DD[T]HH:mm:ss",xt=window.innerWidth/4,St=window.innerWidth/40,Ct=1,At=1578e8,Et=Intl.supportedValuesOf,Mt=Et?Et("timeZone"):["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Katmandu","Asia/Khandyga","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis"],Nt=[{long:"years",short:"y",possible:"year"},{long:"weeks",short:"w",possible:"week"},{long:"days",short:"d",possible:"day"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}],Tt=Nt.map((e=>e.short)),$t=e=>{let t=(n=e,Math.round(1e3*n)/1e3);var n;const r=Math.round(e);e>=100&&(t=r-r%10),e<100&&e>=10&&(t=r-r%5),e<10&&e>=1&&(t=r),e<1&&e>.01&&(t=Math.round(40*e)/40);const a=(e=>zt(o().duration(e,"seconds").asMilliseconds()))(t||.001);return a.replace(/\s/g,"")},Pt=e=>{const t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Tt.includes(n[0]))return{[n[0]]:t[0]}},Dt=(e,t)=>$t(e/(t?St:xt)),Ot=(e,t)=>{const n=(t||o()().toDate()).valueOf()/1e3,r=(e=>{const t=Nt.map((e=>e.short)).join("|"),n=new RegExp(`\\d+(\\.\\d+)?[${t}]+`,"g"),r=(e.match(n)||[]).reduce(((e,t)=>{const n=Pt(t);return n?{...e,...n}:{...e}}),{});return o().duration(r).asSeconds()})(e);return{start:n-r,end:n,step:Dt(r),date:Lt(t||o()().toDate())}},Lt=e=>o().tz(e).utc().format(kt),Rt=e=>o().tz(e).format(kt),zt=e=>{const t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),o=Math.floor(e/1e3/3600%24),a=Math.floor(e/864e5),i=["d","h","m","s","ms"],l=[a,o,r,n,t].map(((e,t)=>e?`${e}${i[t]}`:""));return l.filter((e=>e)).join("")},It=e=>{const t=o()(1e3*e);return t.isValid()?t.toDate():new Date},jt="logs"===Ue.logs,Ft=[{title:"Last 5 minutes",duration:"5m",isDefault:jt},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!jt},{title:"Last 1 hour",duration:"1h"},{title:"Last 3 hours",duration:"3h"},{title:"Last 6 hours",duration:"6h"},{title:"Last 12 hours",duration:"12h"},{title:"Last 24 hours",duration:"24h"},{title:"Last 2 days",duration:"2d"},{title:"Last 7 days",duration:"7d"},{title:"Last 30 days",duration:"30d"},{title:"Last 90 days",duration:"90d"},{title:"Last 180 days",duration:"180d"},{title:"Last 1 year",duration:"1y"},{title:"Yesterday",duration:"1d",until:()=>o()().tz().subtract(1,"day").endOf("day").toDate()},{title:"Today",duration:"1d",until:()=>o()().tz().endOf("day").toDate()}].map((e=>({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:()=>o()().tz().toDate(),...e}))),Ht=e=>{var t;let{relativeTimeId:n,defaultDuration:r,defaultEndInput:o}=e;const a=null===(t=Ft.find((e=>e.isDefault)))||void 0===t?void 0:t.id,i=n||et("g0.relative_time",a),l=Ft.find((e=>e.id===i));return{relativeTimeId:l?i:"none",duration:l?l.duration:r,endInput:l?l.until():o}},Vt=e=>`UTC${o()().tz(e).format("Z")}`,Bt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=new RegExp(e,"i");return Mt.reduce(((n,r)=>{const o=(r.match(/^(.*?)\//)||[])[1]||"unknown",a=Vt(r),i=a.replace(/UTC|0/,""),l=r.replace(/[/_]/g," "),s={region:r,utc:a,search:`${r} ${a} ${l} ${i}`},c=!e||e&&t.test(s.search);return c&&n[o]?n[o].push(s):c&&(n[o]=[s]),n}),{})},Ut=e=>{o().tz.setDefault(e)},Yt=()=>{const e=o().tz.guess(),t=(e=>{try{return o()().tz(e),!0}catch(Id){return!1}})(e);return{isValid:t,title:t?`Browser Time (${e})`:"Browser timezone (UTC)",region:t?e:"UTC"}},Wt=We("TIMEZONE")||Yt().region;Ut(Wt);const qt={...(()=>{const e=et("g0.range_input"),{duration:t,endInput:n,relativeTimeId:r}=Ht({defaultDuration:e||"1h",defaultEndInput:(a=et("g0.end_input",o()().utc().format(kt)),o()(a).utcOffset(0,!0).toDate()),relativeTimeId:e?et("g0.relative_time","none"):void 0});var a;return{duration:t,period:Ot(t,n),relativeTime:r}})(),timezone:Wt};function Kt(e,t){switch(t.type){case"SET_TIME_STATE":return{...e,...t.payload};case"SET_DURATION":return{...e,duration:t.payload,period:Ot(t.payload,It(e.period.end)),relativeTime:"none"};case"SET_RELATIVE_TIME":return{...e,duration:t.payload.duration,period:Ot(t.payload.duration,t.payload.until),relativeTime:t.payload.id};case"SET_PERIOD":const n=(e=>{const t=e.to.valueOf()-e.from.valueOf();return zt(t)})(t.payload);return{...e,duration:n,period:Ot(n,t.payload.to),relativeTime:"none"};case"RUN_QUERY":const{duration:r,endInput:o}=Ht({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:It(e.period.end)});return{...e,period:Ot(r,o)};case"RUN_QUERY_TO_NOW":return{...e,period:Ot(e.duration)};case"SET_TIMEZONE":return Ut(t.payload),Ye("TIMEZONE",t.payload),e.defaultTimezone&&Ye("DISABLED_DEFAULT_TIMEZONE",t.payload!==e.defaultTimezone),{...e,timezone:t.payload};case"SET_DEFAULT_TIMEZONE":return{...e,defaultTimezone:t.payload};default:throw new Error}}const Zt=(0,t.createContext)({}),Gt=()=>(0,t.useContext)(Zt).state,Qt=()=>(0,t.useContext)(Zt).dispatch,Jt=e=>{const t=e.map((e=>e.values[e.index])),n=(e=>{const t=We(e);return t?JSON.parse(t):[]})("QUERY_HISTORY");n[0]||(n[0]=[]);const r=n[0];t.forEach((e=>{!r.includes(e)&&e&&r.unshift(e),r.length>250&&r.shift()})),Ye("QUERY_HISTORY",JSON.stringify(n))},Xt=50,en=1e3,tn=1e3;const nn=(()=>{var e;const t=(null===(e=(window.location.hash.split("?")[1]||"").match(/g\d+\.expr/g))||void 0===e?void 0:e.length)||1;return new Array(t>10?10:t).fill(1).map(((e,t)=>et(`g${t}.expr`,"")))})(),rn={query:nn,queryHistory:nn.map((e=>({index:0,values:[e]}))),autocomplete:We("AUTOCOMPLETE")||!1,autocompleteQuick:!1,autocompleteCache:new class{constructor(){this.maxSize=void 0,this.map=void 0,this.maxSize=tn,this.map=new Map}get(e){for(const[t,n]of this.map){const r=JSON.parse(t),o=r.start===e.start&&r.end===e.end,a=r.type===e.type,i=e.value&&r.value&&e.value.includes(r.value),l=r.match===e.match||i,s=n.length=this.maxSize){const e=this.map.keys().next().value;this.map.delete(e)}this.map.set(JSON.stringify(e),t)}},metricsQLFunctions:[]};function on(e,t){switch(t.type){case"SET_QUERY":return{...e,query:t.payload.map((e=>e))};case"SET_QUERY_HISTORY":return Jt(t.payload),{...e,queryHistory:t.payload};case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),{...e,queryHistory:e.queryHistory};case"TOGGLE_AUTOCOMPLETE":return Ye("AUTOCOMPLETE",!e.autocomplete),{...e,autocomplete:!e.autocomplete};case"SET_AUTOCOMPLETE_QUICK":return{...e,autocompleteQuick:t.payload};case"SET_AUTOCOMPLETE_CACHE":return e.autocompleteCache.put(t.payload.key,t.payload.value),{...e};case"SET_METRICSQL_FUNCTIONS":return{...e,metricsQLFunctions:t.payload};default:throw new Error}}const an=(0,t.createContext)({}),ln=()=>(0,t.useContext)(an).state,sn=()=>(0,t.useContext)(an).dispatch,cn=()=>mt("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:mt("path",{d:"M6.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29C15.73 4.1 12.46 3.01 7.43 3h-.06C2.33 3-.93 4.1.24 5.18c0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a454.94 454.94 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44a454.4 454.4 0 0 0 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM35 5l-5.84 14.46h-2.43L20.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H35Zm17.18 0v14.46H49.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L38.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H36.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15Z"})}),un=()=>mt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:[mt("path",{d:"M11.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29 1.17-1.09-2.1-2.17-7.13-2.18h-.06c-5.04 0-8.3 1.1-7.13 2.18 0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a455.13 455.13 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44 2.05-1.82 4.09-3.65 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM40 5l-5.84 14.46h-2.43L25.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H40Zm17.18 0v14.46H54.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L43.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H41.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15ZM1.73 36v-5.17l-.67-.07a.6.6 0 0 1-.21-.1.23.23 0 0 1-.08-.18v-.44h.96v-.59c0-.34.05-.65.14-.92a1.79 1.79 0 0 1 1.08-1.11 2.45 2.45 0 0 1 1.62-.02l-.03.53c0 .1-.06.15-.16.16H4c-.18 0-.35.03-.5.08a.95.95 0 0 0-.39.23c-.1.11-.19.25-.25.43-.05.18-.08.4-.08.65v.56h1.75v.78H2.8V36H1.73Zm6.17-6.17c.45 0 .85.07 1.2.22a2.57 2.57 0 0 1 1.5 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.86-.07-1.22-.21a2.57 2.57 0 0 1-1.5-1.62c-.12-.38-.19-.81-.19-1.3 0-.47.07-.9.2-1.28a2.57 2.57 0 0 1 1.5-1.62c.35-.15.76-.22 1.2-.22Zm0 5.42c.6 0 1.05-.2 1.35-.6.3-.4.44-.97.44-1.69s-.15-1.28-.44-1.69c-.3-.4-.75-.6-1.35-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.33.73-.08.28-.11.6-.11.96 0 .72.15 1.29.44 1.69.3.4.76.6 1.36.6Zm5.26-4.11c.2-.42.43-.74.71-.97.28-.24.62-.36 1.03-.36.13 0 .25.02.36.05.12.02.23.07.32.13l-.08.8c-.02.1-.08.15-.18.15l-.24-.04a1.7 1.7 0 0 0-.88.05c-.15.05-.29.14-.4.25-.12.1-.23.24-.32.4-.1.17-.18.35-.26.56V36h-1.07v-6.08h.61c.12 0 .2.02.24.07.05.04.08.12.1.23l.06.92Zm13.73-3.82L23.39 36h-1.46l-3.5-8.68h1.29a.54.54 0 0 1 .54.37l2.04 5.3a11.31 11.31 0 0 1 .37 1.21 11.65 11.65 0 0 1 .35-1.22l2.03-5.29c.03-.1.1-.18.19-.25.1-.08.21-.12.35-.12h1.3Zm2.2 2.52V36H27.6v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.08.36a1 1 0 0 1-.51.5.96.96 0 0 1-.73 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .37.08c.12.05.22.11.3.2a.94.94 0 0 1 .3.67Zm5.72 3.1a.68.68 0 0 1-.13.13c-.04.03-.1.05-.18.05a.42.42 0 0 1-.22-.07 3.95 3.95 0 0 0-.62-.31c-.14-.05-.3-.07-.51-.07-.26 0-.5.04-.69.14-.2.1-.36.23-.49.4-.13.18-.22.4-.29.64-.06.25-.1.53-.1.85 0 .33.04.62.1.88.08.25.18.47.32.64.13.18.29.3.48.4.18.09.4.13.63.13a1.6 1.6 0 0 0 .94-.27l.26-.2a.4.4 0 0 1 .25-.09.3.3 0 0 1 .27.14l.43.54a2.76 2.76 0 0 1-1.77.96c-.22.03-.43.05-.65.05a2.57 2.57 0 0 1-1.96-.83c-.25-.28-.45-.6-.6-1-.14-.4-.21-.85-.21-1.35 0-.45.06-.87.2-1.25a2.61 2.61 0 0 1 1.51-1.67c.37-.16.8-.24 1.28-.24.46 0 .86.07 1.2.22.35.15.66.36.94.64l-.4.54Zm3.43 4.95c-.54 0-.95-.15-1.24-.45-.28-.3-.42-.73-.42-1.26v-3.44h-.63a.29.29 0 0 1-.2-.07c-.06-.06-.09-.13-.09-.24v-.59l.99-.16.31-1.68a.33.33 0 0 1 .12-.18.34.34 0 0 1 .21-.07h.77v1.94h1.64v1.05h-1.64v3.34c0 .2.05.34.14.45.1.1.22.16.39.16a.73.73 0 0 0 .39-.1l.12-.07a.2.2 0 0 1 .11-.03c.05 0 .08.01.11.03l.09.1.44.72c-.21.18-.46.32-.74.4-.28.1-.57.15-.87.15Zm5.09-6.35c.46 0 .87.07 1.24.22a2.7 2.7 0 0 1 1.58 1.63c.14.39.22.83.22 1.31 0 .49-.08.93-.22 1.32-.14.4-.35.73-.62 1-.26.28-.58.49-.96.64-.37.15-.78.22-1.24.22a3.4 3.4 0 0 1-1.25-.22 2.71 2.71 0 0 1-1.59-1.64 3.8 3.8 0 0 1-.21-1.32c0-.48.07-.92.21-1.31a2.75 2.75 0 0 1 1.58-1.63c.38-.15.8-.22 1.26-.22Zm0 5.2c.51 0 .89-.17 1.13-.52.25-.34.38-.84.38-1.5a2.6 2.6 0 0 0-.38-1.53c-.24-.34-.62-.52-1.13-.52-.52 0-.9.18-1.16.53-.25.35-.37.85-.37 1.51s.12 1.17.37 1.51c.25.35.64.52 1.16.52Zm5.56-4.04c.2-.37.42-.65.69-.86.26-.21.57-.32.94-.32.28 0 .5.06.68.19l-.1 1.1a.3.3 0 0 1-.09.16.24.24 0 0 1-.15.04 1.8 1.8 0 0 1-.27-.03 2.01 2.01 0 0 0-.34-.03c-.16 0-.3.03-.44.08a1.1 1.1 0 0 0-.34.2c-.1.1-.2.2-.27.33-.08.13-.15.27-.22.44V36H47.7v-6.16h.87c.15 0 .26.03.31.09.06.05.1.15.13.29l.09.7Zm4.62-1.07V36h-1.49v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.07.36a1 1 0 0 1-.51.5.96.96 0 0 1-.74 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .38.08c.11.05.21.11.3.2a.94.94 0 0 1 .28.67Zm4.56 5.32a7.8 7.8 0 0 0-1.08.12c-.29.05-.52.12-.7.2a.92.92 0 0 0-.38.3.64.64 0 0 0-.11.36c0 .26.07.45.23.56.15.11.35.17.6.17.3 0 .57-.06.79-.17.22-.1.44-.28.65-.5v-1.04Zm-3.4-2.67c.71-.65 1.57-.97 2.56-.97.36 0 .68.06.97.18a1.99 1.99 0 0 1 1.16 1.24c.1.3.16.61.16.96V36h-.67a.7.7 0 0 1-.33-.06c-.07-.04-.13-.13-.18-.26l-.13-.44c-.16.14-.3.26-.46.37a2.8 2.8 0 0 1-.97.43 2.77 2.77 0 0 1-1.32-.05 1.62 1.62 0 0 1-.57-.31 1.41 1.41 0 0 1-.38-.53 1.85 1.85 0 0 1-.05-1.18c.05-.16.14-.3.25-.45.12-.14.28-.27.46-.4a3 3 0 0 1 .7-.32 9.19 9.19 0 0 1 2.2-.33v-.36c0-.41-.09-.71-.26-.91-.18-.2-.43-.3-.76-.3a1.84 1.84 0 0 0-1.02.28l-.33.18c-.1.06-.2.09-.32.09-.1 0-.2-.03-.27-.08a.72.72 0 0 1-.17-.2l-.26-.47Zm11.49 4.32V36h-4.88v-8.6h1.16v7.62h3.72Zm3.16-5.2c.44 0 .84.08 1.2.23a2.57 2.57 0 0 1 1.49 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.85-.07-1.21-.21a2.57 2.57 0 0 1-1.5-1.62c-.13-.38-.2-.81-.2-1.3 0-.47.07-.9.2-1.28.14-.39.33-.72.59-1 .25-.26.55-.47.9-.62.37-.15.77-.22 1.22-.22Zm0 5.43c.6 0 1.05-.2 1.34-.6.3-.4.45-.97.45-1.69s-.15-1.28-.45-1.69c-.3-.4-.74-.6-1.34-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.34.73-.07.28-.1.6-.1.96 0 .72.14 1.29.44 1.69.3.4.75.6 1.36.6Zm6.33-2.22c.22 0 .4-.03.57-.09.16-.06.3-.14.41-.25.12-.11.2-.24.26-.39.05-.15.08-.31.08-.5 0-.37-.11-.66-.34-.88-.23-.22-.55-.33-.98-.33-.43 0-.76.1-.99.33-.22.22-.34.51-.34.89 0 .18.03.34.09.5a1.1 1.1 0 0 0 .67.63c.16.06.35.09.57.09Zm1.93 3.3a.51.51 0 0 0-.13-.36.84.84 0 0 0-.34-.22 8.57 8.57 0 0 0-1.73-.2 7.5 7.5 0 0 1-.62-.05c-.23.1-.41.23-.56.4a.8.8 0 0 0-.1.92c.07.12.18.22.32.3.14.1.32.16.54.21a3.5 3.5 0 0 0 1.55 0c.23-.05.42-.12.57-.22.16-.1.29-.21.37-.34a.8.8 0 0 0 .13-.44Zm1.08-6.17v.4c0 .13-.08.21-.25.25l-.69.09c.14.26.2.56.2.88a1.86 1.86 0 0 1-1.36 1.82 3.07 3.07 0 0 1-1.72.04c-.12.08-.22.16-.29.25a.44.44 0 0 0-.1.27c0 .15.06.26.17.33.12.08.28.13.47.16a5 5 0 0 0 .66.06 16.56 16.56 0 0 1 1.5.13c.26.05.48.12.67.22.19.1.34.24.46.41.12.18.18.4.18.69 0 .26-.07.5-.2.75s-.31.46-.56.65c-.24.2-.54.34-.9.46a4.57 4.57 0 0 1-2.36.04c-.33-.09-.6-.2-.82-.36a1.56 1.56 0 0 1-.5-.51c-.1-.2-.16-.4-.16-.6 0-.3.1-.56.28-.77.19-.2.45-.37.77-.5a1.15 1.15 0 0 1-.43-.32.88.88 0 0 1-.15-.54c0-.09.01-.18.04-.27.04-.1.08-.2.15-.28a1.55 1.55 0 0 1 .58-.5c-.3-.16-.53-.39-.7-.66-.17-.28-.25-.6-.25-.97 0-.3.05-.57.16-.8.12-.25.28-.46.48-.63.2-.17.45-.3.73-.4a3 3 0 0 1 2.3.21h1.64Zm4.65.76a.24.24 0 0 1-.23.14.42.42 0 0 1-.2-.07 3.59 3.59 0 0 0-.67-.3 1.8 1.8 0 0 0-1.03 0c-.14.05-.27.11-.37.2a.87.87 0 0 0-.23.27.75.75 0 0 0-.08.35c0 .15.04.28.13.39.1.1.21.19.36.27.15.07.32.14.5.2a13.63 13.63 0 0 1 1.16.4c.2.08.36.18.5.3a1.33 1.33 0 0 1 .5 1.07 2 2 0 0 1-.15.78c-.1.24-.25.44-.45.62-.2.17-.43.3-.72.4a3.1 3.1 0 0 1-2.14-.05 2.97 2.97 0 0 1-.87-.53l.25-.41c.04-.05.07-.1.12-.12a.3.3 0 0 1 .17-.04.4.4 0 0 1 .22.08l.3.19a1.91 1.91 0 0 0 1.03.27c.2 0 .38-.03.54-.08.16-.06.29-.13.4-.22a.96.96 0 0 0 .3-.7c0-.17-.05-.31-.14-.42-.09-.11-.2-.2-.36-.28a2.6 2.6 0 0 0-.5-.2l-.59-.19c-.2-.06-.39-.14-.58-.22a2.14 2.14 0 0 1-.5-.3 1.45 1.45 0 0 1-.36-.46c-.1-.19-.14-.41-.14-.67a1.6 1.6 0 0 1 .57-1.23c.18-.16.4-.3.68-.39.26-.1.57-.14.91-.14a2.84 2.84 0 0 1 1.9.7l-.23.4Z"}),mt("defs",{children:mt("path",{d:"M0 0h85v38H0z"})})]}),dn=()=>mt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:mt("path",{d:"M11.118 10.476c.36.28.801.433 1.257.436h.052c.48-.007.961-.192 1.25-.444 1.509-1.279 5.88-5.287 5.88-5.287 1.168-1.087-2.093-2.174-7.13-2.181h-.06c-5.036.007-8.298 1.094-7.13 2.181 0 0 4.372 4.008 5.88 5.295zm2.559 2.166c-.359.283-.801.439-1.258.444h-.044a2.071 2.071 0 0 1-1.257-.444C10.082 11.755 6.384 8.42 5 7.148v1.93c0 .215.081.496.222.629l.07.064c1.045.955 4.546 4.154 5.825 5.245.358.283.8.438 1.257.444h.044c.489-.015.962-.2 1.258-.444 1.309-1.11 4.948-4.444 5.887-5.31.148-.132.222-.413.222-.628v-1.93a455.127 455.127 0 0 1-6.11 5.494zm-1.258 4.984a2.071 2.071 0 0 0 1.258-.436c2.053-1.815 4.09-3.65 6.11-5.502v1.938c0 .207-.075.488-.223.621-.94.873-4.578 4.2-5.887 5.31-.296.25-.77.436-1.258.443h-.044a2.071 2.071 0 0 1-1.257-.436c-1.204-1.027-4.376-3.928-5.616-5.062l-.28-.255c-.14-.133-.221-.414-.221-.621v-1.938c1.383 1.265 5.081 4.607 6.117 5.495.358.282.8.438 1.257.443h.044zM40 5l-5.84 14.46h-2.43L25.89 5h2.16c.233 0 .423.057.57.17.146.113.256.26.33.44l3.41 8.82c.113.287.22.603.32.95.106.34.206.697.3 1.07.08-.373.166-.73.26-1.07a8.84 8.84 0 0 1 .31-.95l3.39-8.82a.959.959 0 0 1 .31-.42.906.906 0 0 1 .58-.19H40zm17.176 0v14.46h-2.37v-9.34c0-.373.02-.777.06-1.21l-4.37 8.21c-.206.393-.523.59-.95.59h-.38c-.426 0-.743-.197-.95-.59l-4.42-8.24c.02.22.037.437.05.65.014.213.02.41.02.59v9.34h-2.37V5h2.03c.12 0 .224.003.31.01a.778.778 0 0 1 .23.05c.074.027.137.07.19.13.06.06.117.14.17.24l4.33 8.03c.114.213.217.433.31.66.1.227.197.46.29.7.094-.247.19-.483.29-.71.1-.233.207-.457.32-.67l4.27-8.01c.054-.1.11-.18.17-.24a.57.57 0 0 1 .19-.13.903.903 0 0 1 .24-.05c.087-.007.19-.01.31-.01h2.03zm8.887 13.73c.68 0 1.286-.117 1.82-.35.54-.24.996-.57 1.37-.99a4.28 4.28 0 0 0 .85-1.48c.2-.573.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.124 1.51-.37 2.19a5.248 5.248 0 0 1-1.07 1.77c-.46.5-1.024.893-1.69 1.18-.66.287-1.404.43-2.23.43-.827 0-1.574-.143-2.24-.43a5.012 5.012 0 0 1-1.69-1.18 5.33 5.33 0 0 1-1.06-1.77 6.373 6.373 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.096 1.277.29 1.85.2.567.483 1.06.85 1.48.373.42.826.75 1.36.99.54.24 1.15.36 1.83.36zm10.38.73h-1.03V5.31h1.03v14.15zM4.242 35v-5.166l-.672-.078a.595.595 0 0 1-.21-.09.23.23 0 0 1-.078-.186v-.438h.96v-.588c0-.348.048-.656.144-.924.1-.272.24-.5.42-.684a1.79 1.79 0 0 1 .66-.426c.256-.096.544-.144.864-.144.272 0 .522.04.75.12l-.024.534c-.008.096-.062.148-.162.156a4.947 4.947 0 0 1-.39.012c-.184 0-.352.024-.504.072a.949.949 0 0 0-.384.234c-.108.108-.192.25-.252.426a2.184 2.184 0 0 0-.084.654v.558h1.752v.774H5.316V35H4.242zM10.416 28.826a3.1 3.1 0 0 1 1.2.222c.356.148.66.358.912.63s.444.602.576.99c.136.384.204.814.204 1.29 0 .48-.068.912-.204 1.296a2.735 2.735 0 0 1-.576.984 2.572 2.572 0 0 1-.912.63 3.175 3.175 0 0 1-1.2.216c-.448 0-.852-.072-1.212-.216a2.572 2.572 0 0 1-.912-.63 2.805 2.805 0 0 1-.582-.984 3.972 3.972 0 0 1-.198-1.296c0-.476.066-.906.198-1.29.136-.388.33-.718.582-.99.252-.272.556-.482.912-.63.36-.148.764-.222 1.212-.222zm0 5.424c.6 0 1.048-.2 1.344-.6.296-.404.444-.966.444-1.686 0-.724-.148-1.288-.444-1.692-.296-.404-.744-.606-1.344-.606-.304 0-.57.052-.798.156a1.507 1.507 0 0 0-.564.45c-.148.196-.26.438-.336.726a3.941 3.941 0 0 0-.108.966c0 .72.148 1.282.444 1.686.3.4.754.6 1.362.6zM15.677 30.14c.192-.416.428-.74.708-.972.28-.236.622-.354 1.026-.354.128 0 .25.014.366.042.12.028.226.072.318.132l-.078.798c-.024.1-.084.15-.18.15-.056 0-.138-.012-.246-.036a1.694 1.694 0 0 0-.366-.036c-.192 0-.364.028-.516.084-.148.056-.282.14-.402.252a1.782 1.782 0 0 0-.318.408c-.092.16-.176.344-.252.552V35h-1.074v-6.078h.612c.116 0 .196.022.24.066.044.044.074.12.09.228l.072.924zM26.761 28.922 24.283 35h-.96l-2.478-6.078h.87a.33.33 0 0 1 .33.222l1.542 3.912c.048.148.09.292.126.432.036.14.07.28.102.42.032-.14.066-.28.102-.42.036-.14.08-.284.132-.432l1.56-3.912a.33.33 0 0 1 .12-.156.311.311 0 0 1 .198-.066h.834zM27.74 35v-6.078h.643c.152 0 .246.074.282.222l.078.624c.224-.276.476-.502.756-.678.28-.176.604-.264.972-.264.408 0 .738.114.99.342.256.228.44.536.552.924.088-.22.2-.41.336-.57a1.987 1.987 0 0 1 1.014-.624c.196-.048.394-.072.594-.072.32 0 .604.052.852.156.252.1.464.248.636.444.176.196.31.438.402.726.092.284.138.61.138.978V35H34.91v-3.87c0-.476-.104-.836-.312-1.08-.208-.248-.508-.372-.9-.372-.176 0-.344.032-.504.096-.156.06-.294.15-.414.27-.12.12-.216.272-.288.456-.068.18-.102.39-.102.63V35h-1.074v-3.87c0-.488-.098-.852-.294-1.092-.196-.24-.482-.36-.858-.36-.264 0-.508.072-.732.216a2.38 2.38 0 0 0-.618.576V35H27.74zM40.746 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM44.974 29.6c.124-.124.254-.238.39-.342a2.395 2.395 0 0 1 .936-.444c.176-.044.368-.066.576-.066.336 0 .634.058.894.174.26.112.476.272.648.48.176.204.308.45.396.738.092.284.138.598.138.942V35H47.47v-3.918c0-.376-.086-.666-.258-.87-.172-.208-.434-.312-.786-.312-.256 0-.496.058-.72.174a2.58 2.58 0 0 0-.636.474V35h-1.482v-6.156h.906c.192 0 .318.09.378.27l.102.486zM53.085 28.748c.456 0 .87.074 1.242.222a2.692 2.692 0 0 1 1.578 1.626c.144.392.216.83.216 1.314 0 .488-.072.928-.216 1.32-.144.392-.35.726-.618 1.002a2.653 2.653 0 0 1-.96.636 3.333 3.333 0 0 1-1.242.222c-.46 0-.878-.074-1.254-.222a2.712 2.712 0 0 1-.966-.636 2.922 2.922 0 0 1-.618-1.002 3.807 3.807 0 0 1-.216-1.32c0-.484.072-.922.216-1.314.148-.392.354-.724.618-.996.268-.272.59-.482.966-.63a3.397 3.397 0 0 1 1.254-.222zm0 5.202c.512 0 .89-.172 1.134-.516.248-.344.372-.848.372-1.512s-.124-1.17-.372-1.518c-.244-.348-.622-.522-1.134-.522-.52 0-.906.176-1.158.528-.248.348-.372.852-.372 1.512s.124 1.164.372 1.512c.252.344.638.516 1.158.516zM57.252 35v-6.156h.906c.192 0 .318.09.378.27l.096.456c.108-.12.22-.23.336-.33a2.017 2.017 0 0 1 1.32-.492c.388 0 .706.106.954.318.252.208.44.486.564.834a1.93 1.93 0 0 1 .834-.882c.172-.092.354-.16.546-.204.196-.044.392-.066.588-.066.34 0 .642.052.906.156.264.104.486.256.666.456.18.2.316.444.408.732.096.288.144.618.144.99V35h-1.482v-3.918c0-.392-.086-.686-.258-.882-.172-.2-.424-.3-.756-.3-.152 0-.294.026-.426.078a1.026 1.026 0 0 0-.342.228 1.019 1.019 0 0 0-.228.366 1.435 1.435 0 0 0-.084.51V35h-1.488v-3.918c0-.412-.084-.712-.252-.9-.164-.188-.406-.282-.726-.282-.216 0-.418.054-.606.162a1.979 1.979 0 0 0-.516.432V35h-1.482zM70.558 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM74.9 26.084V35h-1.482v-8.916H74.9zM81.969 28.844l-3.354 7.848a.538.538 0 0 1-.174.234c-.068.056-.174.084-.318.084h-1.104l1.152-2.472-2.49-5.694h1.302c.116 0 .206.028.27.084.068.056.118.12.15.192l1.308 3.192c.044.108.08.216.108.324.032.108.062.218.09.33a32.3 32.3 0 0 1 .108-.33c.036-.112.076-.222.12-.33l1.236-3.186a.437.437 0 0 1 .408-.276h1.188z"})}),hn=()=>mt("svg",{viewBox:"0 0 15 17",fill:"currentColor",children:mt("path",{d:"M6.11767 7.47586C6.47736 7.75563 6.91931 7.90898 7.37503 7.91213H7.42681C7.90756 7.90474 8.38832 7.71987 8.67677 7.46846C10.1856 6.18921 14.5568 2.18138 14.5568 2.18138C15.7254 1.09438 12.4637 0.00739 7.42681 0H7.36764C2.3308 0.00739 -0.930935 1.09438 0.237669 2.18138C0.237669 2.18138 4.60884 6.18921 6.11767 7.47586ZM8.67677 9.64243C8.31803 9.92483 7.87599 10.0808 7.41941 10.0861H7.37503C6.91845 10.0808 6.47641 9.92483 6.11767 9.64243C5.0822 8.75513 1.38409 5.42018 0.000989555 4.14832V6.07829C0.000989555 6.29273 0.0823481 6.57372 0.222877 6.70682L0.293316 6.7712L0.293344 6.77122C1.33784 7.72579 4.83903 10.9255 6.11767 12.0161C6.47641 12.2985 6.91845 12.4545 7.37503 12.4597H7.41941C7.90756 12.4449 8.38092 12.2601 8.67677 12.0161C9.9859 10.9069 13.6249 7.57198 14.5642 6.70682C14.7121 6.57372 14.7861 6.29273 14.7861 6.07829V4.14832C12.7662 5.99804 10.7297 7.82949 8.67677 9.64243ZM7.41941 14.6263C7.87513 14.6232 8.31708 14.4698 8.67677 14.19C10.7298 12.3746 12.7663 10.5407 14.7861 8.68853V10.6259C14.7861 10.8329 14.7121 11.1139 14.5642 11.247C13.6249 12.1196 9.9859 15.4471 8.67677 16.5563C8.38092 16.8077 7.90756 16.9926 7.41941 17H7.37503C6.91931 16.9968 6.47736 16.8435 6.11767 16.5637C4.91427 15.5373 1.74219 12.6364 0.502294 11.5025C0.393358 11.4029 0.299337 11.3169 0.222877 11.247C0.0823481 11.1139 0.000989555 10.8329 0.000989555 10.6259V8.68853C1.38409 9.95303 5.0822 13.2953 6.11767 14.1827C6.47641 14.4651 6.91845 14.6211 7.37503 14.6263H7.41941Z"})}),pn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"})}),fn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),mn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zm-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z"})}),_n=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})}),gn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),vn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),yn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),bn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"})}),wn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),kn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"m7 10 5 5 5-5z"})}),xn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[mt("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),mt("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),Sn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"})}),Cn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"})}),An=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"})}),En=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M8 5v14l11-7z"})}),Mn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"})}),Nn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10H3v9z"})}),Tn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"})}),$n=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M8.9999 14.7854L18.8928 4.8925C19.0803 4.70497 19.3347 4.59961 19.5999 4.59961C19.8651 4.59961 20.1195 4.70497 20.307 4.8925L21.707 6.2925C22.0975 6.68303 22.0975 7.31619 21.707 7.70672L9.70701 19.7067C9.31648 20.0972 8.68332 20.0972 8.2928 19.7067L2.6928 14.1067C2.50526 13.9192 2.3999 13.6648 2.3999 13.3996C2.3999 13.1344 2.50526 12.88 2.6928 12.6925L4.0928 11.2925C4.48332 10.902 5.11648 10.902 5.50701 11.2925L8.9999 14.7854Z"})}),Pn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})}),Dn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"})}),On=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),Ln=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})}),Rn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 5C19.89 4.65 18.67 4.5 17.5 4.5C15.55 4.5 13.45 4.9 12 6C10.55 4.9 8.45 4.5 6.5 4.5C5.33 4.5 4.11 4.65 3 5C2.25 5.25 1.6 5.55 1 6V20.6C1 20.85 1.25 21.1 1.5 21.1C1.6 21.1 1.65 21.1 1.75 21.05C3.15 20.3 4.85 20 6.5 20C8.2 20 10.65 20.65 12 21.5C13.35 20.65 15.8 20 17.5 20C19.15 20 20.85 20.3 22.25 21.05C22.35 21.1 22.4 21.1 22.5 21.1C22.75 21.1 23 20.85 23 20.6V6C22.4 5.55 21.75 5.25 21 5ZM21 18.5C19.9 18.15 18.7 18 17.5 18C15.8 18 13.35 18.65 12 19.5C10.65 18.65 8.2 18 6.5 18C5.3 18 4.1 18.15 3 18.5V7C4.1 6.65 5.3 6.5 6.5 6.5C8.2 6.5 10.65 7.15 12 8C13.35 7.15 15.8 6.5 17.5 6.5C18.7 6.5 19.9 6.65 21 7V18.5Z"}),mt("path",{d:"M17.5 10.5C18.38 10.5 19.23 10.59 20 10.76V9.24C19.21 9.09 18.36 9 17.5 9C15.8 9 14.26 9.29 13 9.83V11.49C14.13 10.85 15.7 10.5 17.5 10.5ZM13 12.49V14.15C14.13 13.51 15.7 13.16 17.5 13.16C18.38 13.16 19.23 13.25 20 13.42V11.9C19.21 11.75 18.36 11.66 17.5 11.66C15.8 11.66 14.26 11.96 13 12.49ZM17.5 14.33C15.8 14.33 14.26 14.62 13 15.16V16.82C14.13 16.18 15.7 15.83 17.5 15.83C18.38 15.83 19.23 15.92 20 16.09V14.57C19.21 14.41 18.36 14.33 17.5 14.33Z"}),mt("path",{d:"M6.5 10.5C5.62 10.5 4.77 10.59 4 10.76V9.24C4.79 9.09 5.64 9 6.5 9C8.2 9 9.74 9.29 11 9.83V11.49C9.87 10.85 8.3 10.5 6.5 10.5ZM11 12.49V14.15C9.87 13.51 8.3 13.16 6.5 13.16C5.62 13.16 4.77 13.25 4 13.42V11.9C4.79 11.75 5.64 11.66 6.5 11.66C8.2 11.66 9.74 11.96 11 12.49ZM6.5 14.33C8.2 14.33 9.74 14.62 11 15.16V16.82C9.87 16.18 8.3 15.83 6.5 15.83C5.62 15.83 4.77 15.92 4 16.09V14.57C4.79 14.41 5.64 14.33 6.5 14.33Z"})]}),zn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 6C9.79 6 8 7.79 8 10H10C10 8.9 10.9 8 12 8C13.1 8 14 8.9 14 10C14 10.8792 13.4202 11.3236 12.7704 11.8217C11.9421 12.4566 11 13.1787 11 15H13C13 13.9046 13.711 13.2833 14.4408 12.6455C15.21 11.9733 16 11.2829 16 10C16 7.79 14.21 6 12 6ZM13 16V18H11V16H13Z"})}),In=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2zm4 1H4V5h2v2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2z"})}),jn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),Fn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M7 20h4c0 1.1-.9 2-2 2s-2-.9-2-2zm-2-1h8v-2H5v2zm11.5-9.5c0 3.82-2.66 5.86-3.77 6.5H5.27c-1.11-.64-3.77-2.68-3.77-6.5C1.5 5.36 4.86 2 9 2s7.5 3.36 7.5 7.5zm4.87-2.13L20 8l1.37.63L22 10l.63-1.37L24 8l-1.37-.63L22 6l-.63 1.37zM19 6l.94-2.06L22 3l-2.06-.94L19 0l-.94 2.06L16 3l2.06.94L19 6z"})}),Hn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M3 14h4v-4H3v4zm0 5h4v-4H3v4zM3 9h4V5H3v4zm5 5h13v-4H8v4zm0 5h13v-4H8v4zM8 5v4h13V5H8z"})}),Vn=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-error"),children:mt("path",{d:"M13.5095 4L8.50952 1H7.50952L2.50952 4L2.01953 4.85999V10.86L2.50952 11.71L7.50952 14.71H8.50952L13.5095 11.71L13.9995 10.86V4.85999L13.5095 4ZM7.50952 13.5601L3.00952 10.86V5.69995L7.50952 8.15002V13.5601ZM3.26953 4.69995L8.00952 1.85999L12.7495 4.69995L8.00952 7.29004L3.26953 4.69995ZM13.0095 10.86L8.50952 13.5601V8.15002L13.0095 5.69995V10.86Z"})}),Bn=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-primary"),children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 5H4V4H1.5L1 4.5V12.5L1.5 13H4V12H2V5ZM14.5 4H12V5H14V12H12V13H14.5L15 12.5V4.5L14.5 4ZM11.76 6.56995L12 7V9.51001L11.7 9.95996L7.19995 11.96H6.73999L4.23999 10.46L4 10.03V7.53003L4.30005 7.06995L8.80005 5.06995H9.26001L11.76 6.56995ZM5 9.70996L6.5 10.61V9.28003L5 8.38V9.70996ZM5.57996 7.56006L7.03003 8.43005L10.42 6.93005L8.96997 6.06006L5.57996 7.56006ZM7.53003 10.73L11.03 9.17004V7.77002L7.53003 9.31995V10.73Z"})}),Un=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-warning"),children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 2H8L7 3V6H8V3H14V8H10V9H14L15 8V3L14 2ZM9 6H13V7H9.41L9 6.59V6ZM7 7H2L1 8V13L2 14H8L9 13V8L8 7H7ZM8 13H2V8H8V9V13ZM3 9H7V10H3V9ZM3 11H7V12H3V11ZM9 4H13V5H9V4Z"})}),Yn=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-primary"),children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 3L8 2H14L15 3V8L14 9H10V8H14V3H8V6H7V3ZM9 9V8L8 7H7H2L1 8V13L2 14H8L9 13V9ZM8 8V9V13H2V8H7H8ZM9.41421 7L9 6.58579V6H13V7H9.41421ZM9 4H13V5H9V4ZM7 10H3V11H7V10Z"})}),Wn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"})}),qn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z"})}),Kn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"})}),Zn=()=>mt("svg",{viewBox:"0 0 24 24",children:mt("path",{fill:"currentColor",d:"M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z",children:mt("animateTransform",{attributeName:"transform",dur:"0.75s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})})});var Gn=n(738),Qn=n.n(Gn);const Jn=e=>{let{to:t,isNavLink:n,children:r,...o}=e;return n?mt(Le,{to:t,...o,children:r}):mt("div",{...o,children:r})},Xn=e=>{let{activeItem:t,item:n,color:r=it("color-primary"),activeNavRef:o,onChange:a,isNavLink:i}=e;return mt(Jn,{className:Qn()({"vm-tabs-item":!0,"vm-tabs-item_active":t===n.value,[n.className||""]:n.className}),isNavLink:i,to:n.value,style:{color:r},onClick:(l=n.value,()=>{a&&a(l)}),ref:t===n.value?o:void 0,children:[n.icon&&mt("div",{className:Qn()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!n.label}),children:n.icon}),n.label]});var l};const er=function(e,n,r,o){const a=(0,t.useRef)(n);(0,t.useEffect)((()=>{a.current=n}),[n]),(0,t.useEffect)((()=>{var t;const n=null!==(t=null===r||void 0===r?void 0:r.current)&&void 0!==t?t:window;if(!n||!n.addEventListener)return;const i=e=>a.current(e);return n.addEventListener(e,i,o),()=>{n.removeEventListener(e,i,o)}}),[e,r,o])},tr=()=>{const[e,n]=(0,t.useState)({width:0,height:0}),r=()=>{n({width:window.innerWidth,height:window.innerHeight})};return er("resize",r),(0,t.useEffect)(r,[]),e},nr=e=>{let{activeItem:n,items:r,color:o=it("color-primary"),onChange:a,indicatorPlacement:i="bottom",isNavLink:l}=e;const s=tr(),c=(0,t.useRef)(null),[u,d]=(0,t.useState)({left:0,width:0,bottom:0});return(0,t.useEffect)((()=>{var e;if((null===(e=c.current)||void 0===e?void 0:e.base)instanceof HTMLElement){const{offsetLeft:e,offsetWidth:t,offsetHeight:n}=c.current.base;d({left:e,width:t,bottom:"top"===i?n-2:0})}}),[s,n,c,r]),mt("div",{className:"vm-tabs",children:[r.map((e=>mt(Xn,{activeItem:n,item:e,onChange:a,color:o,activeNavRef:c,isNavLink:l},e.value))),mt("div",{className:"vm-tabs__indicator",style:{...u,borderColor:o}})]})},rr=[{value:nt.chart,icon:mt(Mn,{}),label:"Graph",prometheusCode:0},{value:nt.code,icon:mt(Tn,{}),label:"JSON",prometheusCode:3},{value:nt.table,icon:mt(Nn,{}),label:"Table",prometheusCode:1}],or=We("SERIES_LIMITS"),ar={displayType:(()=>{const e=et("g0.tab",0),t=rr.find((t=>t.prometheusCode===+e||t.value===e));return(null===t||void 0===t?void 0:t.value)||nt.chart})(),nocache:!1,isTracingEnabled:!1,seriesLimits:or?JSON.parse(or):Xe,tableCompact:We("TABLE_COMPACT")||!1};function ir(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return{...e,displayType:t.payload};case"SET_SERIES_LIMITS":return Ye("SERIES_LIMITS",JSON.stringify(t.payload)),{...e,seriesLimits:t.payload};case"TOGGLE_QUERY_TRACING":return{...e,isTracingEnabled:!e.isTracingEnabled};case"TOGGLE_NO_CACHE":return{...e,nocache:!e.nocache};case"TOGGLE_TABLE_COMPACT":return Ye("TABLE_COMPACT",!e.tableCompact),{...e,tableCompact:!e.tableCompact};default:throw new Error}}const lr=(0,t.createContext)({}),sr={customStep:et("g0.step_input",""),yaxis:{limits:{enable:!1,range:{1:[0,0]}}},isHistogram:!1,spanGaps:!1};function cr(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,enable:!e.yaxis.limits.enable}}};case"SET_CUSTOM_STEP":return{...e,customStep:t.payload};case"SET_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,range:t.payload}}};case"SET_IS_HISTOGRAM":return{...e,isHistogram:t.payload};case"SET_SPAN_GAPS":return{...e,spanGaps:t.payload};default:throw new Error}}const ur=(0,t.createContext)({}),dr={dashboardsSettings:[],dashboardsLoading:!1,dashboardsError:""};function hr(e,t){switch(t.type){case"SET_DASHBOARDS_SETTINGS":return{...e,dashboardsSettings:t.payload};case"SET_DASHBOARDS_LOADING":return{...e,dashboardsLoading:t.payload};case"SET_DASHBOARDS_ERROR":return{...e,dashboardsError:t.payload};default:throw new Error}}const pr=(0,t.createContext)({}),fr={markdownParsing:"true"===We("LOGS_MARKDOWN")};function mr(e,t){if("SET_MARKDOWN_PARSING"===t.type)return Ye("LOGS_MARKDOWN",`${t.payload}`),{...e,markdownParsing:t.payload};throw new Error}const _r=(0,t.createContext)({}),gr=()=>(0,t.useContext)(_r).state,vr={windows:"Windows",mac:"Mac OS",linux:"Linux"},yr=()=>(Object.values(vr).find((e=>navigator.userAgent.indexOf(e)>=0))||"unknown")===vr.mac;function br(){const e=tr(),n=()=>{const e=["Android","webOS","iPhone","iPad","iPod","BlackBerry","Windows Phone"].map((e=>navigator.userAgent.match(new RegExp(e,"i")))).some((e=>e)),t=window.innerWidth<500;return e||t},[r,o]=(0,t.useState)(n());return(0,t.useEffect)((()=>{o(n())}),[e]),{isMobile:r}}const wr={success:mt(yn,{}),error:mt(vn,{}),warning:mt(gn,{}),info:mt(_n,{})},kr=e=>{let{variant:t,children:n}=e;const{isDarkTheme:r}=gt(),{isMobile:o}=br();return mt("div",{className:Qn()({"vm-alert":!0,[`vm-alert_${t}`]:t,"vm-alert_dark":r,"vm-alert_mobile":o}),children:[mt("div",{className:"vm-alert__icon",children:wr[t||"info"]}),mt("div",{className:"vm-alert__content",children:n})]})},xr=(0,t.createContext)({showInfoMessage:()=>{}}),Sr=function(){for(var e=arguments.length,t=new Array(e),n=0;nn=>{let{children:r}=n;return mt(e,{children:mt(t,{children:r})})}),(e=>{let{children:t}=e;return mt(pt.FK,{children:t})}))}(...[e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(ht,yt),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(_t.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(Kt,qt),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(Zt.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(on,rn),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(an.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(ir,ar),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(lr.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(cr,sr),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(ur.Provider,{value:a,children:n})},e=>{let{children:n}=e;const{isMobile:r}=br(),[o,a]=(0,t.useState)({}),[i,l]=(0,t.useState)(!1),[s,c]=(0,t.useState)(void 0);(0,t.useEffect)((()=>{if(!s)return;a({message:s.text,variant:s.type,key:Date.now()}),l(!0);const e=setTimeout(u,4e3);return()=>clearTimeout(e)}),[s]);const u=()=>{c(void 0),l(!1)};return mt(xr.Provider,{value:{showInfoMessage:c},children:[i&&mt("div",{className:Qn()({"vm-snackbar":!0,"vm-snackbar_mobile":r}),children:mt(kr,{variant:o.variant,children:mt("div",{className:"vm-snackbar-content",children:[mt("span",{children:o.message}),mt("div",{className:"vm-snackbar-content__close",onClick:u,children:mt(fn,{})})]})})}),n]})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(hr,dr),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(pr.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(mr,fr),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(_r.Provider,{value:a,children:n})}]),Cr=e=>{if(7!=e.length)return"0, 0, 0";return`${parseInt(e.slice(1,3),16)}, ${parseInt(e.slice(3,5),16)}, ${parseInt(e.slice(5,7),16)}`},Ar={[tt.yhatUpper]:"#7126a1",[tt.yhatLower]:"#7126a1",[tt.yhat]:"#da42a6",[tt.anomaly]:"#da4242",[tt.anomalyScore]:"#7126a1",[tt.actual]:"#203ea9",[tt.training]:`rgba(${Cr("#203ea9")}, 0.2)`},Er={"color-primary":"#589DF6","color-secondary":"#316eca","color-error":"#e5534b","color-warning":"#c69026","color-info":"#539bf5","color-success":"#57ab5a","color-background-body":"#22272e","color-background-block":"#2d333b","color-background-tooltip":"rgba(22, 22, 22, 0.8)","color-text":"#cdd9e5","color-text-secondary":"#768390","color-text-disabled":"#636e7b","box-shadow":"rgba(0, 0, 0, 0.16) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.2) 0px 2px 8px 0px","border-divider":"1px solid rgba(99, 110, 123, 0.5)","color-hover-black":"rgba(0, 0, 0, 0.12)","color-log-hits-bar-0":"rgba(255, 255, 255, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},Mr={"color-primary":"#3F51B5","color-secondary":"#E91E63","color-error":"#FD080E","color-warning":"#FF8308","color-info":"#03A9F4","color-success":"#4CAF50","color-background-body":"#FEFEFF","color-background-block":"#FFFFFF","color-background-tooltip":"rgba(80,80,80,0.9)","color-text":"#110f0f","color-text-secondary":"#706F6F","color-text-disabled":"#A09F9F","box-shadow":"rgba(0, 0, 0, 0.08) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.1) 0px 2px 8px 0px","border-divider":"1px solid rgba(0, 0, 0, 0.15)","color-hover-black":"rgba(0, 0, 0, 0.06)","color-log-hits-bar-0":"rgba(0, 0, 0, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},Nr=()=>{const[e,n]=(0,t.useState)(st()),r=e=>{n(e.matches)};return(0,t.useEffect)((()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");return e.addEventListener("change",r),()=>e.removeEventListener("change",r)}),[]),e},Tr=["primary","secondary","error","warning","info","success"],$r=e=>{let{onLoaded:n}=e;const r=He(),{palette:o={}}=Fe(),{theme:a}=gt(),i=Nr(),l=vt(),s=tr(),[c,u]=(0,t.useState)({[ot.dark]:Er,[ot.light]:Mr,[ot.system]:st()?Er:Mr}),d=()=>{const{innerWidth:e,innerHeight:t}=window,{clientWidth:n,clientHeight:r}=document.documentElement;lt("scrollbar-width",e-n+"px"),lt("scrollbar-height",t-r+"px"),lt("vh",.01*t+"px")},h=()=>{Tr.forEach(((e,t)=>{const r=(e=>{let t=e.replace("#","").trim();if(3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length)throw new Error("Invalid HEX color.");return(299*parseInt(t.slice(0,2),16)+587*parseInt(t.slice(2,4),16)+114*parseInt(t.slice(4,6),16))/1e3>=128?"#000000":"#FFFFFF"})(it(`color-${e}`));lt(`${e}-text`,r),t===Tr.length-1&&(l({type:"SET_DARK_THEME"}),n(!0))}))},p=()=>{const e=We("THEME")||ot.system,t=c[e];Object.entries(t).forEach((e=>{let[t,n]=e;lt(t,n)})),h(),r&&(Tr.forEach((e=>{const t=o[e];t&<(`color-${e}`,t)})),h())};return(0,t.useEffect)((()=>{d(),p()}),[c]),(0,t.useEffect)(d,[s]),(0,t.useEffect)((()=>{const e=st()?Er:Mr;c[ot.system]!==e?u((t=>({...t,[ot.system]:e}))):p()}),[a,i]),(0,t.useEffect)((()=>{r&&l({type:"SET_THEME",payload:ot.light})}),[]),null},Pr=()=>{const{showInfoMessage:e}=(0,t.useContext)(xr);return async(t,n)=>{var r;if(null===(r=navigator)||void 0===r||!r.clipboard)return e({text:"Clipboard not supported",type:"error"}),console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(t),n&&e({text:n,type:"success"}),!0}catch(o){return o instanceof Error&&e({text:`${o.name}: ${o.message}`,type:"error"}),console.warn("Copy failed",o),!1}}},Dr=e=>{let{variant:t="contained",color:n="primary",size:r="medium",ariaLabel:o,children:a,endIcon:i,startIcon:l,fullWidth:s=!1,className:c,disabled:u,onClick:d,onMouseDown:h}=e;return mt("button",{className:Qn()({"vm-button":!0,[`vm-button_${t}_${n}`]:!0,[`vm-button_${r}`]:r,"vm-button_icon":(l||i)&&!a,"vm-button_full-width":s,"vm-button_with-icon":l||i,"vm-button_disabled":u,[c||""]:c}),disabled:u,"aria-label":o,onClick:d,onMouseDown:h,children:mt(pt.FK,{children:[l&&mt("span",{className:"vm-button__start-icon",children:l}),a&&mt("span",{children:a}),i&&mt("span",{className:"vm-button__end-icon",children:i})]})})},Or=e=>{let{data:n}=e;const r=Pr(),o=(0,t.useMemo)((()=>`[\n${n.map((e=>1===Object.keys(e).length?JSON.stringify(e):JSON.stringify(e,null,2))).join(",\n").replace(/^/gm," ")}\n]`),[n]);return mt("div",{className:"vm-json-view",children:[mt("div",{className:"vm-json-view__copy",children:mt(Dr,{variant:"outlined",onClick:async()=>{await r(o,"Formatted JSON has been copied")},children:"Copy JSON"})}),mt("pre",{className:"vm-json-view__code",children:mt("code",{children:o})})]})},Lr=(e,n)=>{const[r]=je(),o=r.get(n)?r.get(n):e,[a,i]=(0,t.useState)(o);return(0,t.useEffect)((()=>{o!==a&&i(o)}),[o]),[a,i]},Rr=()=>{const e=oe(),[n,r]=je();return{setSearchParamsFromKeys:(0,t.useCallback)((t=>{const o=!!Array.from(n.values()).length;let a=!1;Object.entries(t).forEach((e=>{let[t,r]=e;n.get(t)!==`${r}`&&(n.set(t,`${r}`),a=!0)})),a&&(o?r(n):e(`?${n.toString()}`,{replace:!0}))}),[n,e])}},zr=e=>{let{checked:t=!1,disabled:n=!1,label:r,color:o="secondary",onChange:a}=e;return mt("div",{className:Qn()({"vm-checkbox":!0,"vm-checkbox_disabled":n,"vm-checkbox_active":t,[`vm-checkbox_${o}_active`]:t,[`vm-checkbox_${o}`]:o}),onClick:()=>{n||a(!t)},children:[mt("div",{className:"vm-checkbox-track",children:mt("div",{className:"vm-checkbox-track__thumb",children:mt($n,{})})}),r&&mt("span",{className:"vm-checkbox__label",children:r})]})},Ir=e=>{let{children:n,title:r,open:o,placement:a="bottom-center",offset:i={top:6,left:0}}=e;const{isMobile:l}=br(),[s,c]=(0,t.useState)(!1),[u,d]=(0,t.useState)({width:0,height:0}),h=(0,t.useRef)(null),p=(0,t.useRef)(null),f=()=>c(!1);(0,t.useEffect)((()=>{if(p.current&&s)return d({width:p.current.clientWidth,height:p.current.clientHeight}),window.addEventListener("scroll",f),()=>{window.removeEventListener("scroll",f)}}),[s,r]);const m=(0,t.useMemo)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(!t||!s)return{};const n=t.getBoundingClientRect(),r={top:0,left:0},o="bottom-right"===a||"top-right"===a,l="bottom-left"===a||"top-left"===a,c=null===a||void 0===a?void 0:a.includes("top"),d=(null===i||void 0===i?void 0:i.top)||0,p=(null===i||void 0===i?void 0:i.left)||0;r.left=n.left-(u.width-n.width)/2+p,r.top=n.height+n.top+d,o&&(r.left=n.right-u.width),l&&(r.left=n.left+p),c&&(r.top=n.top-u.height-d);const{innerWidth:f,innerHeight:m}=window,_=r.top+u.height+20>m,g=r.top-20<0,v=r.left+u.width+20>f,y=r.left-20<0;return _&&(r.top=n.top-u.height-d),g&&(r.top=n.height+n.top+d),v&&(r.left=n.right-u.width-p),y&&(r.left=n.left+p),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[h,a,s,u]),_=()=>{"boolean"!==typeof o&&c(!0)},g=()=>{c(!1)};return(0,t.useEffect)((()=>{"boolean"===typeof o&&c(o)}),[o]),(0,t.useEffect)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",_),t.addEventListener("mouseleave",g),()=>{t.removeEventListener("mouseenter",_),t.removeEventListener("mouseleave",g)}}),[h]),mt(pt.FK,{children:[mt(t.Fragment,{ref:h,children:n}),!l&&s&&t.default.createPortal(mt("div",{className:"vm-tooltip",ref:p,style:m,children:r}),document.body)]})},jr=e=>{let{value:t=!1,disabled:n=!1,label:r,color:o="secondary",fullWidth:a,onChange:i}=e;return mt("div",{className:Qn()({"vm-switch":!0,"vm-switch_full-width":a,"vm-switch_disabled":n,"vm-switch_active":t,[`vm-switch_${o}_active`]:t,[`vm-switch_${o}`]:o}),onClick:()=>{n||i(!t)},children:[mt("div",{className:"vm-switch-track",children:mt("div",{className:"vm-switch-track__thumb"})}),r&&mt("span",{className:"vm-switch__label",children:r})]})};const Fr=e=>{const[n,r]=(0,t.useState)(!!e),o=(0,t.useCallback)((()=>r(!0)),[]),a=(0,t.useCallback)((()=>r(!1)),[]),i=(0,t.useCallback)((()=>r((e=>!e))),[]);return{value:n,setValue:r,setTrue:o,setFalse:a,toggle:i}},Hr=e=>{let{error:n,warning:r,info:o}=e;const a=(0,t.useRef)(null),[i,l]=(0,t.useState)(!1),[s,c]=(0,t.useState)(!1),u=`${(0,t.useMemo)((()=>n?"ERROR: ":r?"WARNING: ":""),[n,r])}${n||r||o}`,d=()=>{const e=a.current;if(e){const{offsetWidth:t,scrollWidth:n,offsetHeight:r,scrollHeight:o}=e;l(t+1{c(!1),d()}),[a,u]),er("resize",d),n||r||o?mt("span",{className:Qn()({"vm-text-field__error":!0,"vm-text-field__warning":r&&!n,"vm-text-field__helper-text":!r&&!n,"vm-text-field__error_overflowed":i,"vm-text-field__error_full":s}),"data-show":!!u,ref:a,onClick:()=>{i&&(c(!0),l(!1))},children:u}):null},Vr=e=>{let{label:n,value:r,type:o="text",error:a="",warning:i="",helperText:l="",placeholder:s,endIcon:c,startIcon:u,disabled:d=!1,autofocus:h=!1,inputmode:p="text",caretPosition:f,onChange:m,onEnter:_,onKeyDown:g,onFocus:v,onBlur:y,onChangeCaret:b}=e;const{isDarkTheme:w}=gt(),{isMobile:k}=br(),x=(0,t.useRef)(null),S=(0,t.useRef)(null),C=(0,t.useMemo)((()=>"textarea"===o?S:x),[o]),[A,E]=(0,t.useState)([0,0]),M=Qn()({"vm-text-field__input":!0,"vm-text-field__input_error":a,"vm-text-field__input_warning":!a&&i,"vm-text-field__input_icon-start":u,"vm-text-field__input_disabled":d,"vm-text-field__input_textarea":"textarea"===o}),N=e=>{const{selectionStart:t,selectionEnd:n}=e;E([t||0,n||0])},T=e=>{N(e.currentTarget)},$=e=>{g&&g(e);const{key:t,ctrlKey:n,metaKey:r}=e,a="Enter"===t;("textarea"!==o?a:a&&(r||n))&&_&&(e.preventDefault(),_())},P=e=>{N(e.currentTarget)},D=e=>{d||(m&&m(e.currentTarget.value),N(e.currentTarget))},O=()=>{v&&v()},L=()=>{y&&y()},R=e=>{try{C.current&&C.current.setSelectionRange(e[0],e[1])}catch(Id){return Id}};return(0,t.useEffect)((()=>{var e;h&&!k&&(null===C||void 0===C||null===(e=C.current)||void 0===e?void 0:e.focus)&&C.current.focus()}),[C,h]),(0,t.useEffect)((()=>{b&&b(A)}),[A]),(0,t.useEffect)((()=>{R(A)}),[r]),(0,t.useEffect)((()=>{f&&R(f)}),[f]),mt("label",{className:Qn()({"vm-text-field":!0,"vm-text-field_textarea":"textarea"===o,"vm-text-field_dark":w}),"data-replicated-value":r,children:[u&&mt("div",{className:"vm-text-field__icon-start",children:u}),c&&mt("div",{className:"vm-text-field__icon-end",children:c}),"textarea"===o?mt("textarea",{className:M,disabled:d,ref:S,value:r,rows:1,inputMode:p,placeholder:s,autoCapitalize:"none",onInput:D,onKeyDown:$,onKeyUp:P,onFocus:O,onBlur:L,onMouseUp:T}):mt("input",{className:M,disabled:d,ref:x,value:r,type:o,placeholder:s,inputMode:p,autoCapitalize:"none",onInput:D,onKeyDown:$,onKeyUp:P,onFocus:O,onBlur:L,onMouseUp:T}),n&&mt("span",{className:"vm-text-field__label",children:n}),mt(Hr,{error:a,warning:i,info:l})]})},Br=e=>{let{title:n,children:r,onClose:o,className:a,isOpen:i=!0}=e;const{isMobile:l}=br(),s=oe(),c=ne(),u=(0,t.useCallback)((e=>{i&&"Escape"===e.key&&o()}),[i]),d=e=>{e.stopPropagation()},h=(0,t.useCallback)((()=>{i&&(s(c,{replace:!0}),o())}),[i,c,o]);return(0,t.useEffect)((()=>{if(i)return document.body.style.overflow="hidden",()=>{document.body.style.overflow="auto"}}),[i]),er("popstate",h),er("keyup",u),t.default.createPortal(mt("div",{className:Qn()({"vm-modal":!0,"vm-modal_mobile":l,[`${a}`]:a}),onMouseDown:o,children:mt("div",{className:"vm-modal-content",children:[mt("div",{className:"vm-modal-content-header",onMouseDown:d,children:[n&&mt("div",{className:"vm-modal-content-header__title",children:n}),mt("div",{className:"vm-modal-header__close",children:mt(Dr,{variant:"text",size:"small",onClick:o,ariaLabel:"close",children:mt(fn,{})})})]}),mt("div",{className:"vm-modal-content-body",onMouseDown:d,tabIndex:0,children:r})]})}),document.body)},Ur="Table settings",Yr=e=>{let{columns:n,selectedColumns:r=[],tableCompact:o,onChangeColumns:a,toggleTableCompact:i}=e;const l=(0,t.useRef)(null),{value:s,toggle:c,setFalse:u}=Fr(!1),{value:d,toggle:h}=Fr(Boolean(We("TABLE_COLUMNS"))),[p,f]=(0,t.useState)(""),[m,_]=(0,t.useState)(-1),g=(0,t.useMemo)((()=>r.filter((e=>!n.includes(e)))),[n,r]),v=(0,t.useMemo)((()=>{const e=g.concat(n);return p?e.filter((e=>e.includes(p))):e}),[n,g,p]),y=(0,t.useMemo)((()=>v.every((e=>r.includes(e)))),[r,v]),b=e=>{a(r.includes(e)?r.filter((t=>t!==e)):[...r,e])};return(0,t.useEffect)((()=>{((e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n])))(n,r)||d||a(n)}),[n]),(0,t.useEffect)((()=>{d?r.length&&Ye("TABLE_COLUMNS",r.join(",")):qe(["TABLE_COLUMNS"])}),[d,r]),(0,t.useEffect)((()=>{const e=We("TABLE_COLUMNS");e&&a(e.split(","))}),[]),mt("div",{className:"vm-table-settings",children:[mt(Ir,{title:Ur,children:mt("div",{ref:l,children:mt(Dr,{variant:"text",startIcon:mt(pn,{}),onClick:c,ariaLabel:Ur})})}),s&&mt(Br,{title:Ur,className:"vm-table-settings-modal",onClose:u,children:[mt("div",{className:"vm-table-settings-modal-section",children:[mt("div",{className:"vm-table-settings-modal-section__title",children:"Customize columns"}),mt("div",{className:"vm-table-settings-modal-columns",children:[mt("div",{className:"vm-table-settings-modal-columns__search",children:mt(Vr,{placeholder:"Search columns",startIcon:mt(Kn,{}),value:p,onChange:f,onBlur:()=>{_(-1)},onKeyDown:e=>{const t="ArrowUp"===e.key,n="ArrowDown"===e.key,r="Enter"===e.key;(n||t||r)&&e.preventDefault(),n?_((e=>e+1>v.length-1?e:e+1)):t?_((e=>e-1<0?e:e-1)):r&&b(v[m])},type:"search"})}),mt("div",{className:"vm-table-settings-modal-columns-list",children:[!!v.length&&mt("div",{className:"vm-table-settings-modal-columns-list__item vm-table-settings-modal-columns-list__item_all",children:mt(zr,{checked:y,onChange:()=>{a(y?r.filter((e=>!v.includes(e))):v)},label:y?"Uncheck all":"Check all",disabled:o})}),!v.length&&mt("div",{className:"vm-table-settings-modal-columns-no-found",children:mt("p",{className:"vm-table-settings-modal-columns-no-found__info",children:"No columns found."})}),v.map(((e,t)=>{return mt("div",{className:Qn()({"vm-table-settings-modal-columns-list__item":!0,"vm-table-settings-modal-columns-list__item_focus":t===m,"vm-table-settings-modal-columns-list__item_custom":g.includes(e)}),children:mt(zr,{checked:r.includes(e),onChange:(n=e,()=>{b(n)}),label:e,disabled:o})},e);var n}))]}),mt("div",{className:"vm-table-settings-modal-preserve",children:[mt(zr,{checked:d,onChange:h,label:"Preserve column settings",disabled:o,color:"primary"}),mt("p",{className:"vm-table-settings-modal-preserve__info",children:"This label indicates that when the checkbox is activated, the current column configurations will not be reset."})]})]})]}),mt("div",{className:"vm-table-settings-modal-section",children:[mt("div",{className:"vm-table-settings-modal-section__title",children:"Table view"}),mt("div",{className:"vm-table-settings-modal-columns-list__item",children:mt(jr,{label:"Compact view",value:o,onChange:i})})]})]})]})},Wr=["date","timestamp","time"];function qr(e,t,n){const r=e[n],a=t[n],i=Wr.includes(`${n}`)?o()(`${r}`).unix():r,l=Wr.includes(`${n}`)?o()(`${a}`).unix():a;return li?1:0}const Kr=e=>{let{rows:n,columns:r,defaultOrderBy:o,defaultOrderDir:a,copyToClipboard:i,paginationOffset:l}=e;const[s,c]=(0,t.useState)(o),[u,d]=(0,t.useState)(a||"desc"),[h,p]=(0,t.useState)(null),f=(0,t.useMemo)((()=>{const{startIndex:e,endIndex:t}=l;return function(e,t){const n=e.map(((e,t)=>[e,t]));return n.sort(((e,n)=>{const r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((e=>e[0]))}(n,function(e,t){return"desc"===e?(e,n)=>qr(e,n,t):(e,n)=>-qr(e,n,t)}(u,s)).slice(e,t)}),[n,s,u,l]),m=(e,t)=>async()=>{if(h!==t)try{await navigator.clipboard.writeText(String(e)),p(t)}catch(Id){console.error(Id)}};return(0,t.useEffect)((()=>{if(null===h)return;const e=setTimeout((()=>p(null)),2e3);return()=>clearTimeout(e)}),[h]),mt("table",{className:"vm-table",children:[mt("thead",{className:"vm-table-header",children:mt("tr",{className:"vm-table__row vm-table__row_header",children:[r.map((e=>{return mt("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:(t=e.key,()=>{d((e=>"asc"===e&&s===t?"desc":"asc")),c(t)}),children:mt("div",{className:"vm-table-cell__content",children:[mt("div",{children:String(e.title||e.key)}),mt("div",{className:Qn()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":s===e.key,"vm-table__sort-icon_desc":"desc"===u&&s===e.key}),children:mt(kn,{})})]})},String(e.key));var t})),i&&mt("th",{className:"vm-table-cell vm-table-cell_header"})]})}),mt("tbody",{className:"vm-table-body",children:f.map(((e,t)=>mt("tr",{className:"vm-table__row",children:[r.map((t=>mt("td",{className:Qn()({"vm-table-cell":!0,[`${t.className}`]:t.className}),children:e[t.key]||"-"},String(t.key)))),i&&mt("td",{className:"vm-table-cell vm-table-cell_right",children:e[i]&&mt("div",{className:"vm-table-cell__content",children:mt(Ir,{title:h===t?"Copied":"Copy row",children:mt(Dr,{variant:"text",color:h===t?"success":"gray",size:"small",startIcon:mt(h===t?$n:On,{}),onClick:m(e[i],t),ariaLabel:"copy row"})})})})]},t)))})]})},Zr=e=>{let{logs:n,displayColumns:r,tableCompact:o,columns:a}=e;const i=e=>{switch(e){case"_time":return"vm-table-cell_logs-time";case"_vmui_data":return"vm-table-cell_logs vm-table-cell_pre";default:return"vm-table-cell_logs"}},l=(0,t.useMemo)((()=>o?[{key:"_vmui_data",title:"Data",className:i("_vmui_data")}]:a.map((e=>({key:e,title:e,className:i(e)})))),[o,a]),s=(0,t.useMemo)((()=>o?l:null!==r&&void 0!==r&&r.length?l.filter((e=>r.includes(e.key))):[]),[l,r,o]);return mt(pt.FK,{children:mt(Kr,{rows:n,columns:s,defaultOrderBy:"_time",defaultOrderDir:"desc",copyToClipboard:"_vmui_data",paginationOffset:{startIndex:0,endIndex:1/0}})})},Gr=e=>{let{defaultExpanded:n=!1,onChange:r,title:o,children:a}=e;const[i,l]=(0,t.useState)(n);return(0,t.useEffect)((()=>{r&&r(i)}),[i]),mt(pt.FK,{children:[mt("header",{className:`vm-accordion-header ${i&&"vm-accordion-header_open"}`,onClick:()=>{l((e=>!e))},children:[o,mt("div",{className:`vm-accordion-header__arrow ${i&&"vm-accordion-header__arrow_open"}`,children:mt(wn,{})})]}),i&&mt("section",{className:"vm-accordion-section",children:a},"content")]})},Qr=e=>{let{log:n}=e;const{value:r,toggle:o}=Fr(!1),{markdownParsing:a}=gr(),i=["_msg","_vmui_time","_vmui_data","_vmui_markdown"],l=Object.entries(n).filter((e=>{let[t]=e;return!i.includes(t)})),s=l.length>0,c=(0,t.useMemo)((()=>{if(n._msg)return n._msg;if(!s)return;const e=l.reduce(((e,t)=>{let[n,r]=t;return e[n]=r,e}),{});return JSON.stringify(e)}),[n,l,s]),u=Pr(),[d,h]=(0,t.useState)(null);return(0,t.useEffect)((()=>{if(null===d)return;const e=setTimeout((()=>h(null)),2e3);return()=>clearTimeout(e)}),[d]),mt("div",{className:"vm-group-logs-row",children:[mt("div",{className:"vm-group-logs-row-content",onClick:o,children:[s&&mt("div",{className:Qn()({"vm-group-logs-row-content__arrow":!0,"vm-group-logs-row-content__arrow_open":r}),children:mt(wn,{})}),mt("div",{className:Qn()({"vm-group-logs-row-content__time":!0,"vm-group-logs-row-content__time_missing":!n._vmui_time}),children:n._vmui_time||"timestamp missing"}),mt("div",{className:Qn()({"vm-group-logs-row-content__msg":!0,"vm-group-logs-row-content__msg_empty-msg":!n._msg,"vm-group-logs-row-content__msg_missing":!c}),dangerouslySetInnerHTML:a&&n._vmui_markdown?{__html:n._vmui_markdown}:void 0,children:c||"-"})]},`${n._msg}${n._time}`),s&&r&&mt("div",{className:"vm-group-logs-row-fields",children:mt("table",{children:mt("tbody",{children:l.map(((e,t)=>{let[n,r]=e;return mt("tr",{className:"vm-group-logs-row-fields-item",children:[mt("td",{className:"vm-group-logs-row-fields-item-controls",children:mt("div",{className:"vm-group-logs-row-fields-item-controls__wrapper",children:mt(Ir,{title:d===t?"Copied":"Copy to clipboard",children:mt(Dr,{variant:"text",color:"gray",size:"small",startIcon:mt(On,{}),onClick:(o=`${n}: "${r}"`,a=t,async()=>{if(d!==a)try{await u(o),h(a)}catch(Id){console.error(Id)}}),ariaLabel:"copy to clipboard"})})})}),mt("td",{className:"vm-group-logs-row-fields-item__key",children:n}),mt("td",{className:"vm-group-logs-row-fields-item__value",children:r})]},n);var o,a}))})})})]})},Jr=(e,n,r)=>{const o=(0,t.useCallback)((t=>{const o=null===e||void 0===e?void 0:e.current,a=t.target,i=(null===r||void 0===r?void 0:r.current)&&r.current.contains(a);!o||o.contains((null===t||void 0===t?void 0:t.target)||null)||i||n(t)}),[e,n]);er("mousedown",o),er("touchstart",o)},Xr=e=>{let{children:n,buttonRef:r,placement:o="bottom-left",open:a=!1,onClose:i,offset:l={top:6,left:0},clickOutside:s=!0,fullWidth:c,title:u,disabledFullScreen:d,variant:h}=e;const{isMobile:p}=br(),f=oe(),m=ne(),[_,g]=(0,t.useState)({width:0,height:0}),[v,y]=(0,t.useState)(!1),b=(0,t.useRef)(null);(0,t.useEffect)((()=>(y(a),!a&&i&&i(),a&&p&&!d&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="auto"})),[a]),(0,t.useEffect)((()=>{var e,t;g({width:(null===b||void 0===b||null===(e=b.current)||void 0===e?void 0:e.clientWidth)||0,height:(null===b||void 0===b||null===(t=b.current)||void 0===t?void 0:t.clientHeight)||0}),y(!1)}),[b]);const w=(0,t.useMemo)((()=>{const e=r.current;if(!e||!v)return{};const t=e.getBoundingClientRect(),n={top:0,left:0,width:"auto"},a="bottom-right"===o||"top-right"===o,i=null===o||void 0===o?void 0:o.includes("top"),s=(null===l||void 0===l?void 0:l.top)||0,u=(null===l||void 0===l?void 0:l.left)||0;n.left=n.left=t.left+u,n.top=t.height+t.top+s,a&&(n.left=t.right-_.width),i&&(n.top=t.top-_.height-s);const{innerWidth:d,innerHeight:h}=window,p=n.top+_.height+20>h,f=n.top-20<0,m=n.left+_.width+20>d,g=n.left-20<0;return p&&(n.top=t.top-_.height-s),f&&(n.top=t.height+t.top+s),m&&(n.left=t.right-_.width-u),g&&(n.left=t.left+u),c&&(n.width=`${t.width}px`),n.top<0&&(n.top=20),n.left<0&&(n.left=20),n}),[r,o,v,n,c]),k=()=>{y(!1),i()};(0,t.useEffect)((()=>{if(!b.current||!v||p&&!d)return;const{right:e,width:t}=b.current.getBoundingClientRect();if(e>window.innerWidth){const e=window.innerWidth-20-t;b.current.style.left=e{v&&p&&!d&&(f(m,{replace:!0}),i())}),[v,p,d,m,i]);return er("scroll",k),er("popstate",x),Jr(b,(()=>{s&&k()}),r),mt(pt.FK,{children:(v||!_.width)&&t.default.createPortal(mt("div",{className:Qn()({"vm-popper":!0,[`vm-popper_${h}`]:h,"vm-popper_mobile":p&&!d,"vm-popper_open":(p||Object.keys(w).length)&&v}),ref:b,style:p&&!d?{}:w,children:[(u||p&&!d)&&mt("div",{className:"vm-popper-header",children:[mt("p",{className:"vm-popper-header__title",children:u}),mt(Dr,{variant:"text",color:"dark"===h?"white":"primary",size:"small",onClick:e=>{e.stopPropagation(),i()},ariaLabel:"close",children:mt(fn,{})})]}),n]}),document.body)})},eo=e=>(/^{.+}$/.test(e)?e.slice(1,-1).split(","):[e]).filter(Boolean),to=e=>{const t=o()(1e3*e.start),n=o()(1e3*e.end),r=n.diff(t,"milliseconds");return{start:t,end:n,step:Math.ceil(r/100)||1}},no="No Grouping",ro=e=>{let{logs:n,settingsRef:r}=e;const{isDarkTheme:o}=gt(),a=Pr(),[i,l]=je(),[s,c]=(0,t.useState)([]),[u,d]=Lr("_stream","groupBy"),[h,p]=(0,t.useState)(null),[f,m]=(0,t.useState)(""),_=(0,t.useRef)(null),{value:g,toggle:v,setFalse:y}=Fr(!1),b=(0,t.useMemo)((()=>s.every(Boolean)),[s]),w=(0,t.useMemo)((()=>{const e=["_msg","_time","_vmui_time","_vmui_data","_vmui_markdown"],t=Array.from(new Set(n.map((e=>Object.keys(e))).flat())),r=[no,...t.filter((t=>!e.includes(t)))];if(!f)return r;try{const e=new RegExp(f,"i");return r.filter((t=>e.test(t))).sort(((t,n)=>{var r,o;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(o=n.match(e))||void 0===o?void 0:o.index)||0)}))}catch(Id){return[]}}),[n,f]),k=(0,t.useMemo)((()=>function(e,t){const n=e.reduce(((e,n)=>{const r=t.map((e=>`${e}: ${n[e]||"-"}`)).join("|");return(e[r]=e[r]||[]).push(n),e}),{});return Object.entries(n).map((e=>{let[t,n]=e;return{keys:t.split("|"),values:n}}))}(n,[u]).map((e=>{var t;const n=(null===(t=e.values[0])||void 0===t?void 0:t[u])||"",r=eo(n);return{...e,pairs:r}}))),[n,u]),x=(0,t.useCallback)((()=>{c(new Array(k.length).fill(!b))}),[b]),S=e=>t=>{c((n=>{const r=[...n];return r[e]=t,r}))};return(0,t.useEffect)((()=>{if(null===h)return;const e=setTimeout((()=>p(null)),2e3);return()=>clearTimeout(e)}),[h]),(0,t.useEffect)((()=>{c(new Array(k.length).fill(!0))}),[k]),mt(pt.FK,{children:[mt("div",{className:"vm-group-logs",children:k.map(((e,t)=>mt("div",{className:"vm-group-logs-section",children:mt(Gr,{defaultExpanded:s[t],onChange:S(t),title:u!==no&&mt("div",{className:"vm-group-logs-section-keys",children:[mt("span",{className:"vm-group-logs-section-keys__title",children:["Group by ",mt("code",{children:u}),":"]}),e.pairs.map((t=>{return mt(Ir,{title:h===t?"Copied":"Copy to clipboard",placement:"top-center",children:mt("div",{className:Qn()({"vm-group-logs-section-keys__pair":!0,"vm-group-logs-section-keys__pair_dark":o}),onClick:(n=t,async e=>{e.stopPropagation();const t=/(.+)?=(".+")/.test(n)?`${n.replace(/=/,": ")}`:`${u}: "${n}"`;await a(t)&&p(n)}),children:t})},`${e.keys.join("")}_${t}`);var n})),mt("span",{className:"vm-group-logs-section-keys__count",children:[e.values.length," entries"]})]}),children:mt("div",{className:"vm-group-logs-section-rows",children:e.values.map((e=>mt(Qr,{log:e},`${e._msg}${e._time}`)))})},String(s[t]))},e.keys.join(""))))}),r.current&&t.default.createPortal(mt("div",{className:"vm-group-logs-header",children:[mt(Ir,{title:b?"Collapse All":"Expand All",children:mt(Dr,{variant:"text",startIcon:mt(b?qn:Wn,{}),onClick:x,ariaLabel:b?"Collapse All":"Expand All"})}),mt(Ir,{title:"Group by",children:mt("div",{ref:_,children:mt(Dr,{variant:"text",startIcon:mt(In,{}),onClick:v,ariaLabel:"Group by"})})}),mt(Xr,{open:g,placement:"bottom-right",onClose:y,buttonRef:_,children:mt("div",{className:"vm-list vm-group-logs-header-keys",children:[mt("div",{className:"vm-group-logs-header-keys__search",children:mt(Vr,{label:"Search key",value:f,onChange:m,type:"search"})}),w.map((e=>{return mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_active":e===u}),onClick:(t=e,()=>{d(t),i.set("groupBy",t),l(i),y()}),children:e},e);var t}))]})})]}),r.current)]})};function oo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let ao={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function io(e){ao=e}const lo=/[&<>"']/,so=new RegExp(lo.source,"g"),co=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,uo=new RegExp(co.source,"g"),ho={"&":"&","<":"<",">":">",'"':""","'":"'"},po=e=>ho[e];function fo(e,t){if(t){if(lo.test(e))return e.replace(so,po)}else if(co.test(e))return e.replace(uo,po);return e}const mo=/(^|[^\[])\^/g;function _o(e,t){let n="string"===typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let o="string"===typeof t?t:t.source;return o=o.replace(mo,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}function go(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const vo={exec:()=>null};function yo(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:bo(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=bo(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:bo(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=bo(t[0],"\n").split("\n"),n="",r="";const o=[];for(;e.length>0;){let t=!1;const a=[];let i;for(i=0;i/.test(e[i]))a.push(e[i]),t=!0;else{if(t)break;a.push(e[i])}e=e.slice(i);const l=a.join("\n"),s=l.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");n=n?`${n}\n${l}`:l,r=r?`${r}\n${s}`:s;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(s,o,!0),this.lexer.state.top=c,0===e.length)break;const u=o[o.length-1];if("code"===u?.type)break;if("blockquote"===u?.type){const t=u,a=t.raw+"\n"+e.join("\n"),i=this.blockquote(a);o[o.length-1]=i,n=n.substring(0,n.length-t.raw.length)+i.raw,r=r.substring(0,r.length-t.text.length)+i.text;break}if("list"!==u?.type);else{const t=u,a=t.raw+"\n"+e.join("\n"),i=this.list(a);o[o.length-1]=i,n=n.substring(0,n.length-u.raw.length)+i.raw,r=r.substring(0,r.length-t.raw.length)+i.raw,e=a.substring(o[o.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const a=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let i=!1;for(;e;){let n=!1,r="",l="";if(!(t=a.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let s=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],u=!s.trim(),d=0;if(this.options.pedantic?(d=2,l=s.trimStart()):u?d=t[1].length+1:(d=t[2].search(/[^ ]/),d=d>4?1:d,l=s.slice(d),d+=t[1].length),u&&/^[ \t]*$/.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,d-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:\`\`\`|~~~)`),a=new RegExp(`^ {0,${Math.min(3,d-1)}}#`),i=new RegExp(`^ {0,${Math.min(3,d-1)}}<[a-z].*>`,"i");for(;e;){const h=e.split("\n",1)[0];let p;if(c=h,this.options.pedantic?(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),p=c):p=c.replace(/\t/g," "),o.test(c))break;if(a.test(c))break;if(i.test(c))break;if(t.test(c))break;if(n.test(c))break;if(p.search(/[^ ]/)>=d||!c.trim())l+="\n"+p.slice(d);else{if(u)break;if(s.replace(/\t/g," ").search(/[^ ]/)>=4)break;if(o.test(s))break;if(a.test(s))break;if(n.test(s))break;l+="\n"+c}u||c.trim()||(u=!0),r+=h+"\n",e=e.substring(h.length+1),s=p.slice(d)}}o.loose||(i?o.loose=!0:/\n[ \t]*\n[ \t]*$/.test(r)&&(i=!0));let h,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(l),p&&(h="[ ] "!==p[0],l=l.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:r,task:!!p,checked:h,loose:!1,text:l,tokens:[]}),o.raw+=r}o.items[o.items.length-1].raw=o.items[o.items.length-1].raw.trimEnd(),o.items[o.items.length-1].text=o.items[o.items.length-1].text.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));o.loose=n}if(o.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=yo(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?a.align.push("right"):/^ *:-+: *$/.test(e)?a.align.push("center"):/^ *:-+ *$/.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]}))));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:fo(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^
    /i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=bo(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),wo(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return wo(n,e,n[0],this.lexer)}}emStrong(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let o,a,i=n,l=0;const s="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=s.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(a=[...o].length,r[3]||r[4]){i+=a;continue}if((r[5]||r[6])&&n%3&&!((n+a)%3)){l+=a;continue}if(i-=a,i>0)continue;a=Math.min(a,a+i+l);const t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){const e=s.slice(1,-1);return{type:"em",raw:s,text:e,tokens:this.lexer.inlineTokens(e)}}const c=s.slice(2,-2);return{type:"strong",raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=fo(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=fo(t[1]),n="mailto:"+e):(e=fo(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])e=fo(t[0]),r="mailto:"+e;else{let o;do{var n;o=t[0],t[0]=null!==(n=this.rules.inline._backpedal.exec(t[0])?.[0])&&void 0!==n?n:""}while(o!==t[0]);e=fo(t[0]),r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:fo(t[0]),{type:"text",raw:t[0],text:e}}}}const xo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,So=/(?:[*+-]|\d{1,9}[.)])/,Co=_o(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,So).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Ao=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Eo=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Mo=_o(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Eo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),No=_o(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,So).getRegex(),To="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",$o=/|$))/,Po=_o("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",$o).replace("tag",To).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Do=_o(Ao).replace("hr",xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",To).getRegex(),Oo={blockquote:_o(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Do).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Mo,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:xo,html:Po,lheading:Co,list:No,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Do,table:vo,text:/^[^\n]+/},Lo=_o("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",To).getRegex(),Ro={...Oo,table:Lo,paragraph:_o(Ao).replace("hr",xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Lo).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",To).getRegex()},zo={...Oo,html:_o("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",$o).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:vo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_o(Ao).replace("hr",xo).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Co).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Io=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,jo=/^( {2,}|\\)\n(?!\s*$)/,Fo="\\p{P}\\p{S}",Ho=_o(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Fo).getRegex(),Vo=_o(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Fo).getRegex(),Bo=_o("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Fo).getRegex(),Uo=_o("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Fo).getRegex(),Yo=_o(/\\([punct])/,"gu").replace(/punct/g,Fo).getRegex(),Wo=_o(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),qo=_o($o).replace("(?:--\x3e|$)","--\x3e").getRegex(),Ko=_o("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",qo).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Zo=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Go=_o(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Zo).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Qo=_o(/^!?\[(label)\]\[(ref)\]/).replace("label",Zo).replace("ref",Eo).getRegex(),Jo=_o(/^!?\[(ref)\](?:\[\])?/).replace("ref",Eo).getRegex(),Xo={_backpedal:vo,anyPunctuation:Yo,autolink:Wo,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:jo,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:vo,emStrongLDelim:Vo,emStrongRDelimAst:Bo,emStrongRDelimUnd:Uo,escape:Io,link:Go,nolink:Jo,punctuation:Ho,reflink:Qo,reflinkSearch:_o("reflink|nolink(?!\\()","g").replace("reflink",Qo).replace("nolink",Jo).getRegex(),tag:Ko,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(/\t/g," ").replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(t=n.call({lexer:this},e,o))&&(e=e.substring(t.raw.length),o.push(t),!0)))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&o.length>0?o[o.length-1].raw+="\n":o.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),n=o[o.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?o.push(t):(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),n=o[o.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(n.raw+="\n"+t.raw,n.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),o.push(t);else{if(r=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let o;this.options.extensions.startBlock.forEach((e=>{o=e.call({lexer:this},n),"number"===typeof o&&o>=0&&(t=Math.min(t,o))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(r)))n=o[o.length-1],a&&"paragraph"===n?.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):o.push(t),a=r.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),n=o[o.length-1],n&&"text"===n.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):o.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,o}inline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){let t,n,r,o,a,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(s));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(s));)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(i=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(t=n.call({lexer:this},e,l))&&(e=e.substring(t.raw.length),l.push(t),!0)))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,s,i))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.autolink(e))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e))){if(r=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let o;this.options.extensions.startInline.forEach((e=>{o=e.call({lexer:this},n),"number"===typeof o&&o>=0&&(t=Math.min(t,o))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(t=this.tokenizer.inlineText(r))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(i=t.raw.slice(-1)),a=!0,n=l[l.length-1],n&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(t.raw.length),l.push(t);return l}}class ia{options;parser;constructor(e){this.options=e||ao}space(e){return""}code(e){let{text:t,lang:n,escaped:r}=e;const o=(n||"").match(/^\S*/)?.[0],a=t.replace(/\n$/,"")+"\n";return o?'
    '+(r?a:fo(a,!0))+"
    \n":"
    "+(r?a:fo(a,!0))+"
    \n"}blockquote(e){let{tokens:t}=e;return`
    \n${this.parser.parse(t)}
    \n`}html(e){let{text:t}=e;return t}heading(e){let{tokens:t,depth:n}=e;return`${this.parser.parseInline(t)}\n`}hr(e){return"
    \n"}list(e){const t=e.ordered,n=e.start;let r="";for(let a=0;a\n"+r+"\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox(e){let{checked:t}=e;return"'}paragraph(e){let{tokens:t}=e;return`

    ${this.parser.parseInline(t)}

    \n`}table(e){let t="",n="";for(let o=0;o${r}`),"\n\n"+t+"\n"+r+"
    \n"}tablerow(e){let{text:t}=e;return`\n${t}\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}em(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}codespan(e){let{text:t}=e;return`${t}`}br(e){return"
    "}del(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}link(e){let{href:t,title:n,tokens:r}=e;const o=this.parser.parseInline(r),a=go(t);if(null===a)return o;t=a;let i='
    ",i}image(e){let{href:t,title:n,text:r}=e;const o=go(t);if(null===o)return r;t=o;let a=`${r}1&&void 0!==arguments[1])||arguments[1],n="";for(let r=0;rnew Set(["preprocess","postprocess","processAllTokens"]))();preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?aa.lex:aa.lexInline}provideParser(){return this.block?sa.parse:sa.parseInline}}const ua=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=(()=>sa)();Renderer=(()=>ia)();TextRenderer=(()=>la)();Lexer=(()=>aa)();Tokenizer=(()=>ko)();Hooks=(()=>ca)();constructor(){this.use(...arguments)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const o=e[r].flat(1/0);n=n.concat(this.walkTokens(o,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(){const e=this.defaults.extensions||{renderers:{},childTokens:{}};for(var t=arguments.length,n=new Array(t),r=0;r{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const n=e.renderers[t.name];e.renderers[t.name]=n?function(){for(var e=arguments.length,r=new Array(e),o=0;o{if(this.defaults.async)return Promise.resolve(o.call(e,t)).then((t=>a.call(e,t)));const n=o.call(e,t);return a.call(e,n)}:e[r]=function(){for(var t=arguments.length,n=new Array(t),r=0;r{const r={...n},o={...this.defaults,...r},a=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===r.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("undefined"===typeof t||null===t)return a(new Error("marked(): input parameter is undefined or null"));if("string"!==typeof t)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const i=o.hooks?o.hooks.provideLexer():e?aa.lex:aa.lexInline,l=o.hooks?o.hooks.provideParser():e?sa.parse:sa.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then((e=>i(e,o))).then((e=>o.hooks?o.hooks.processAllTokens(e):e)).then((e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then((()=>e)):e)).then((e=>l(e,o))).then((e=>o.hooks?o.hooks.postprocess(e):e)).catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let e=i(t,o);o.hooks&&(e=o.hooks.processAllTokens(e)),o.walkTokens&&this.walkTokens(e,o.walkTokens);let n=l(e,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(Id){return a(Id)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+fo(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function da(e,t){return ua.parse(e,t)}da.options=da.setOptions=function(e){return ua.setOptions(e),da.defaults=ua.defaults,io(da.defaults),da},da.getDefaults=oo,da.defaults=ao,da.use=function(){return ua.use(...arguments),da.defaults=ua.defaults,io(da.defaults),da},da.walkTokens=function(e,t){return ua.walkTokens(e,t)},da.parseInline=ua.parseInline,da.Parser=sa,da.parser=sa.parse,da.Renderer=ia,da.TextRenderer=la,da.Lexer=aa,da.lexer=aa.lex,da.Tokenizer=ko,da.Hooks=ca,da.parse=da;da.options,da.setOptions,da.use,da.walkTokens,da.parseInline,sa.parse,aa.lex;const ha=()=>mt("div",{className:"vm-line-loader",children:[mt("div",{className:"vm-line-loader__background"}),mt("div",{className:"vm-line-loader__line"})]});var pa=function(e){return e.group="group",e.table="table",e.json="json",e}(pa||{});const fa=[{label:"Group",value:pa.group,icon:mt(Hn,{})},{label:"Table",value:pa.table,icon:mt(Nn,{})},{label:"JSON",value:pa.json,icon:mt(Tn,{})}],ma=e=>{let{data:n,isLoading:r}=e;const{isMobile:a}=br(),{timezone:i}=Gt(),{setSearchParamsFromKeys:l}=Rr(),s=(0,t.useRef)(null),[c,u]=Lr(pa.group,"view"),[d,h]=(0,t.useState)([]),{value:p,toggle:f}=Fr(!1),m=(0,t.useMemo)((()=>n.map((e=>({...e,_vmui_time:e._time?o()(e._time).tz().format(`${wt}.SSS`):"",_vmui_data:JSON.stringify(e,null,2),_vmui_markdown:e._msg?da(e._msg.replace(/```/g,"\n```\n")):""})))),[n,i]),_=(0,t.useMemo)((()=>{if(null===m||void 0===m||!m.length)return[];const e=["_vmui_data","_vmui_time","_vmui_markdown"],t=new Set;for(const n of m)for(const e in n)t.add(e);return Array.from(t).filter((t=>!e.includes(t)))}),[m]);return mt("div",{className:Qn()({"vm-explore-logs-body":!0,"vm-block":!0,"vm-block_mobile":a}),children:[r&&mt(ha,{}),mt("div",{className:Qn()({"vm-explore-logs-body-header":!0,"vm-section-header":!0,"vm-explore-logs-body-header_mobile":a}),children:[mt("div",{className:"vm-section-header__tabs",children:[mt(nr,{activeItem:String(c),items:fa,onChange:e=>{u(e),l({view:e})}}),mt("div",{className:"vm-explore-logs-body-header__log-info",children:["Total logs returned: ",mt("b",{children:n.length})]})]}),c===pa.table&&mt("div",{className:"vm-explore-logs-body-header__settings",children:mt(Yr,{columns:_,selectedColumns:d,onChangeColumns:h,tableCompact:p,toggleTableCompact:f})}),c===pa.group&&mt("div",{className:"vm-explore-logs-body-header__settings",ref:s})]}),mt("div",{className:Qn()({"vm-explore-logs-body__table":!0,"vm-explore-logs-body__table_mobile":a}),children:[!n.length&&mt("div",{className:"vm-explore-logs-body__empty",children:"No logs found"}),!!n.length&&mt(pt.FK,{children:[c===pa.table&&mt(Zr,{logs:m,displayColumns:d,tableCompact:p,columns:_}),c===pa.group&&mt(ro,{logs:m,columns:_,settingsRef:s}),c===pa.json&&mt(Or,{data:n})]})]})]})},_a=(e,n,r)=>{const[a]=je(),[i,l]=(0,t.useState)([]),[s,c]=(0,t.useState)([]),[u,d]=(0,t.useState)(),h=(0,t.useRef)(new AbortController),p=(0,t.useMemo)((()=>(e=>`${e}/select/logsql/query`)(e)),[e]),f=e=>{try{return JSON.parse(e)}catch(Id){return null}},m=(0,t.useCallback)((async e=>{h.current.abort(),h.current=new AbortController;const{signal:t}=h.current,i=Date.now();c((e=>({...e,[i]:!0}))),d(void 0);try{const s=((e,t,n,r)=>({signal:r,method:"POST",headers:{Accept:"application/stream+json",AccountID:a.get("accountID")||"0",ProjectID:a.get("projectID")||"0"},body:new URLSearchParams({query:e.trim(),limit:`${n}`,start:o()(1e3*t.start).tz().toISOString(),end:o()(1e3*t.end).tz().toISOString()})}))(n,e,r,t),u=await fetch(p,s),h=await u.text();if(!u.ok||!u.body)return d(h),l([]),c((e=>({...e,[i]:!1}))),!1;const m=h.split("\n").filter((e=>e)).slice(0,r).map(f).filter((e=>e));return l(m),c((e=>({...e,[i]:!1}))),!0}catch(Id){return c((e=>({...e,[i]:!1}))),Id instanceof Error&&"AbortError"!==Id.name&&(d(String(Id)),console.error(Id),l([])),!1}}),[p,n,r,a]);return{logs:i,isLoading:Object.values(s).some((e=>e)),error:u,fetchLogs:m,abortController:h.current}};var ga=function(e){return e[e.mouse=0]="mouse",e[e.keyboard=1]="keyboard",e}(ga||{});const va=e=>{var n;let{value:r,options:o,anchor:a,disabled:i,minLength:l=2,fullWidth:s,selected:c,noOptionsText:u,label:d,disabledFullScreen:h,offset:p,maxDisplayResults:f,loading:m,onSelect:_,onOpenAutocomplete:g,onFoundOptions:v,onChangeWrapperRef:y}=e;const{isMobile:b}=br(),w=(0,t.useRef)(null),[k,x]=(0,t.useState)({index:-1}),[S,C]=(0,t.useState)(""),[A,E]=(0,t.useState)(0),{value:M,setValue:N,setFalse:T}=Fr(!1),$=(0,t.useMemo)((()=>{if(!M)return[];try{const e=new RegExp(String(r.trim()),"i"),t=o.filter((t=>e.test(t.value))).sort(((t,n)=>{var o,a;return t.value.toLowerCase()===r.trim().toLowerCase()?-1:n.value.toLowerCase()===r.trim().toLowerCase()?1:((null===(o=t.value.match(e))||void 0===o?void 0:o.index)||0)-((null===(a=n.value.match(e))||void 0===a?void 0:a.index)||0)}));return E(t.length),C(t.length>Number(null===f||void 0===f?void 0:f.limit)&&(null===f||void 0===f?void 0:f.message)||""),null!==f&&void 0!==f&&f.limit?t.slice(0,f.limit):t}catch(Id){return[]}}),[M,o,r]),P=(0,t.useMemo)((()=>{var e;return 1===$.length&&(null===(e=$[0])||void 0===e?void 0:e.value)===r}),[$]),D=(0,t.useMemo)((()=>u&&!$.length),[u,$]),O=()=>{x({index:-1})},L=(0,t.useCallback)((e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:o}=e,a=n||r||o,i=$.length&&!P;if("ArrowUp"===t&&!a&&i&&(e.preventDefault(),x((e=>{let{index:t}=e;return{index:t<=0?0:t-1,type:ga.keyboard}}))),"ArrowDown"===t&&!a&&i){e.preventDefault();const t=$.length-1;x((e=>{let{index:n}=e;return{index:n>=t?t:n+1,type:ga.keyboard}}))}if("Enter"===t){const e=$[k.index];e&&_(e.value),c||T()}"Escape"===t&&T()}),[k,$,P,T,_,c]);return(0,t.useEffect)((()=>{N(r.length>=l)}),[r,o]),er("keydown",L),(0,t.useEffect)((()=>{if(!w.current||k.type===ga.mouse)return;const e=w.current.childNodes[k.index];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}),[k,$]),(0,t.useEffect)((()=>{x({index:-1})}),[$]),(0,t.useEffect)((()=>{g&&g(M)}),[M]),(0,t.useEffect)((()=>{v&&v(P?[]:$)}),[$,P]),(0,t.useEffect)((()=>{y&&y(w)}),[w]),mt(Xr,{open:M,buttonRef:a,placement:"bottom-left",onClose:T,fullWidth:s,title:b?d:void 0,disabledFullScreen:h,offset:p,children:[mt("div",{className:Qn()({"vm-autocomplete":!0,"vm-autocomplete_mobile":b&&!h}),ref:w,children:[m&&mt("div",{className:"vm-autocomplete__loader",children:[mt(bn,{}),mt("span",{children:"Loading..."})]}),D&&mt("div",{className:"vm-autocomplete__no-options",children:u}),!P&&$.map(((e,t)=>{return mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_mobile":b,"vm-list-item_active":t===k.index,"vm-list-item_multiselect":c,"vm-list-item_multiselect_selected":null===c||void 0===c?void 0:c.includes(e.value),"vm-list-item_with-icon":e.icon}),id:`$autocomplete$${e.value}`,onClick:(r=e.value,()=>{i||(_(r),c||T())}),onMouseEnter:(n=t,()=>{x({index:n,type:ga.mouse})}),onMouseLeave:O,children:[(null===c||void 0===c?void 0:c.includes(e.value))&&mt($n,{}),mt(pt.FK,{children:e.icon}),mt("span",{children:e.value})]},`${t}${e.value}`);var n,r}))]}),S&&mt("div",{className:"vm-autocomplete-message",children:["Shown ",null===f||void 0===f?void 0:f.limit," results out of ",A,". ",S]}),(null===(n=$[k.index])||void 0===n?void 0:n.description)&&mt("div",{className:"vm-autocomplete-info",children:[mt("div",{className:"vm-autocomplete-info__type",children:$[k.index].type}),mt("div",{className:"vm-autocomplete-info__description",dangerouslySetInnerHTML:{__html:$[k.index].description||""}})]})]})};var ya=n(267),ba=n.n(ya);const wa=e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&"),ka=e=>JSON.stringify(e).slice(1,-1),xa=e=>{const t=e.match(/["`']/g);return!!t&&t.length%2!==0};var Sa=function(e){return e.metric="metric",e.label="label",e.labelValue="labelValue",e}(Sa||{});const Ca={[Sa.metric]:mt(Vn,{}),[Sa.label]:mt(Un,{}),[Sa.labelValue]:mt(Yn,{})},Aa=n.p+"static/media/MetricsQL.a00044c91d9781cf8557.md",Ea=e=>{let t="";return Array.from(e).map((e=>{var n;const r="h3"===e.tagName.toLowerCase();return t=r?null!==(n=e.textContent)&&void 0!==n?n:"":t,r?null:((e,t)=>{var n;const r=null!==(n=t.textContent)&&void 0!==n?n:"",o=(e=>{const t=[];let n=e.nextElementSibling;for(;n&&"p"===n.tagName.toLowerCase();)n&&t.push(n),n=n.nextElementSibling;return t})(t).map((e=>{var t;return null!==(t=e.outerHTML)&&void 0!==t?t:""})).join("\n");return{type:e,value:r,description:(a=o,a.replace(/({const{metricsQLFunctions:e}=ln(),n=sn();return(0,t.useEffect)((()=>{e.length||(async()=>{try{const e=await fetch(Aa),t=(e=>{const t=document.createElement("div");t.innerHTML=da(e);const n=t.querySelectorAll("h3, h4");return Ea(n)})(await e.text());n({type:"SET_METRICSQL_FUNCTIONS",payload:t})}catch(Id){console.error("Error fetching or processing the MetricsQL.md file:",Id)}})()}),[]),e},Na=e=>{let{value:n,anchorEl:r,caretPosition:a,hasHelperText:i,onSelect:l,onFoundOptions:s}=e;const[c,u]=(0,t.useState)({top:0,left:0}),d=Ma(),h=(0,t.useMemo)((()=>{if(a[0]!==a[1])return{beforeCursor:n,afterCursor:""};return{beforeCursor:n.substring(0,a[0]),afterCursor:n.substring(a[1])}}),[n,a]),p=(0,t.useMemo)((()=>{const e=h.beforeCursor.split(/\s(or|and|unless|default|ifnot|if|group_left|group_right)\s|}|\+|\|-|\*|\/|\^/i);return e[e.length-1]}),[h]),f=(0,t.useMemo)((()=>{const e=[...p.matchAll(/\w+\((?[^)]+)\)\s+(by|without|on|ignoring)\s*\(\w*/gi)];if(e.length>0&&e[0].groups&&e[0].groups.metricName)return e[0].groups.metricName;const t=[...p.matchAll(/^\s*\b(?[^{}(),\s]+)(?={|$)/g)];return t.length>0&&t[0].groups&&t[0].groups.metricName?t[0].groups.metricName:""}),[p]),m=(0,t.useMemo)((()=>{const e=p.match(/[a-z_:-][\w\-.:/]*\b(?=\s*(=|!=|=~|!~))/g);return e?e[e.length-1]:""}),[p]),_=(0,t.useMemo)((()=>{const e=h.beforeCursor.trim(),t=["}",")"].some((t=>e.endsWith(t))),n=!xa(e)&&["`","'",'"'].some((t=>e.endsWith(t)));if(!h.beforeCursor||t||n||(e=>{const t=e.split(/\s+/),n=t.length,r=t[n-1],o=t[n-2],a=!r&&xa(e),i=(!r||t.length>1)&&!/([{(),+\-*/^]|\b(?:or|and|unless|default|ifnot|if|group_left|group_right|by|without|on|ignoring)\b)/i.test(o);return a||i})(h.beforeCursor))return at.empty;const r=/(?:by|without|on|ignoring)\s*\(\s*[^)]*$|\{[^}]*$/i,o=`(${wa(f)})?{?.+${wa(m)}(=|!=|=~|!~)"?([^"]*)$`;switch(!0){case new RegExp(o,"g").test(h.beforeCursor):return at.labelValue;case r.test(h.beforeCursor):return at.label;default:return at.metricsql}}),[h,f,m]),g=(0,t.useMemo)((()=>{const e=h.beforeCursor.match(/([\w_.:]+(?![},]))$/);return e?e[0]:""}),[h.beforeCursor]),{metrics:v,labels:y,labelValues:b,loading:w}=(e=>{let{valueByContext:n,metric:r,label:a,context:i}=e;const{serverUrl:l}=gt(),{period:{start:s,end:c}}=Gt(),{autocompleteCache:u}=ln(),d=sn(),[h,p]=(0,t.useState)(!1),[f,m]=(0,t.useState)(n),_=ba()(m,500);(0,t.useEffect)((()=>(_(n),_.cancel)),[n,_]);const[g,v]=(0,t.useState)([]),[y,b]=(0,t.useState)([]),[w,k]=(0,t.useState)([]),x=(0,t.useRef)(new AbortController),S=(0,t.useCallback)((e=>{const t=o()(1e3*s).startOf("day").valueOf()/1e3,n=o()(1e3*c).endOf("day").valueOf()/1e3;return new URLSearchParams({...e||{},limit:`${en}`,start:`${t}`,end:`${n}`})}),[s,c]),C=(e,t)=>e.map((e=>({value:e,type:`${t}`,icon:Ca[t]}))),A=async e=>{let{value:t,urlSuffix:n,setter:r,type:o,params:a}=e;if(!t&&o===Sa.metric)return;x.current.abort(),x.current=new AbortController;const{signal:i}=x.current,s={type:o,value:t,start:(null===a||void 0===a?void 0:a.get("start"))||"",end:(null===a||void 0===a?void 0:a.get("end"))||"",match:(null===a||void 0===a?void 0:a.get("match[]"))||""};p(!0);try{const e=u.get(s);if(e)return r(C(e,o)),void p(!1);const t=await fetch(`${l}/api/v1/${n}?${a}`,{signal:i});if(t.ok){const{data:e}=await t.json();r(C(e,o)),d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:e}})}p(!1)}catch(Id){Id instanceof Error&&"AbortError"!==Id.name&&(d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:[]}}),p(!1),console.error(Id))}};return(0,t.useEffect)((()=>{const e=i!==at.metricsql&&i!==at.empty;if(!l||!r||e)return;v([]);const t=ka(wa(r));return A({value:f,urlSuffix:"label/__name__/values",setter:v,type:Sa.metric,params:S({"match[]":`{__name__=~".*${t}.*"}`})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,f,i,r]),(0,t.useEffect)((()=>{if(!l||i!==at.label)return;b([]);const e=ka(r);return A({value:f,urlSuffix:"labels",setter:b,type:Sa.label,params:S(r?{"match[]":`{__name__="${e}"}`}:void 0)}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,f,i,r]),(0,t.useEffect)((()=>{if(!l||!a||i!==at.labelValue)return;k([]);const e=ka(r),t=ka(wa(f)),n=[r?`__name__="${e}"`:"",`${a}=~".*${t}.*"`].filter(Boolean).join(",");return A({value:f,urlSuffix:`label/${a}/values`,setter:k,type:Sa.labelValue,params:S({"match[]":`{${n}}`})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,f,i,r,a]),{metrics:g,labels:y,labelValues:w,loading:h}})({valueByContext:g,metric:f,label:m,context:_}),k=(0,t.useMemo)((()=>{switch(_){case at.metricsql:return[...v,...d];case at.label:return y;case at.labelValue:return b;default:return[]}}),[_,v,y,b]),x=(0,t.useCallback)((e=>{const t=h.beforeCursor;let n=h.afterCursor;const r=t.lastIndexOf(g,a[0]),o=r+g.length,i=t.substring(0,r),s=t.substring(o);if(_===at.labelValue){const t='"';n=n.replace(/^[^\s"|},]*/,"");e=`${/(?:=|!=|=~|!~)$/.test(i)?t:""}${e}${'"'!==n.trim()[0]?t:""}`}_===at.label&&(n=n.replace(/^[^\s=!,{}()"|+\-/*^]*/,"")),_===at.metricsql&&(n=n.replace(/^[^\s[\]{}()"|+\-/*^]*/,""));l(`${i}${e}${s}${n}`,i.length+e.length)}),[h]);return(0,t.useEffect)((()=>{if(!r.current)return void u({top:0,left:0});const e=r.current.querySelector("textarea")||r.current,t=window.getComputedStyle(e),n=`${t.getPropertyValue("font-size")}`,o=`${t.getPropertyValue("font-family")}`,a=parseInt(`${t.getPropertyValue("line-height")}`),l=document.createElement("div");l.style.font=`${n} ${o}`,l.style.padding=t.getPropertyValue("padding"),l.style.lineHeight=`${a}px`,l.style.width=`${e.offsetWidth}px`,l.style.maxWidth=`${e.offsetWidth}px`,l.style.whiteSpace=t.getPropertyValue("white-space"),l.style.overflowWrap=t.getPropertyValue("overflow-wrap");const s=document.createElement("span");l.appendChild(document.createTextNode(h.beforeCursor)),l.appendChild(s),l.appendChild(document.createTextNode(h.afterCursor)),document.body.appendChild(l);const c=l.getBoundingClientRect(),d=s.getBoundingClientRect(),p=d.left-c.left,f=d.bottom-c.bottom-(i?a:0);u({top:f,left:p}),l.remove(),s.remove()}),[r,a,i]),mt(pt.FK,{children:mt(va,{loading:w,disabledFullScreen:!0,value:g,options:k,anchor:r,minLength:0,offset:c,onSelect:x,onFoundOptions:s,maxDisplayResults:{limit:Xt,message:"Please, specify the query more precisely."}})})},Ta="No match! \nThis query hasn't selected any time series from database.\nEither the requested metrics are missing in the database,\nor there is a typo in series selector.",$a="The shown results are marked as PARTIAL.\nThe result is marked as partial if one or more vmstorage nodes failed to respond to the query.",Pa=e=>{let{value:n,onChange:r,onEnter:o,onArrowUp:a,onArrowDown:i,autocomplete:l,error:s,stats:c,label:u,disabled:d=!1}=e;const{autocompleteQuick:h}=ln(),{isMobile:p}=br(),[f,m]=(0,t.useState)(!1),[_,g]=(0,t.useState)([0,0]),v=(0,t.useRef)(null),[y,b]=(0,t.useState)(l),w=(0,t.useRef)(ba()(b,500)).current,k=[{show:"0"===(null===c||void 0===c?void 0:c.seriesFetched)&&!c.resultLength,text:Ta},{show:null===c||void 0===c?void 0:c.isPartial,text:$a}].filter((e=>e.show)).map((e=>e.text)).join("");c&&(u=`${u} (${c.executionTimeMsec||0}ms)`);return(0,t.useEffect)((()=>{m(l)}),[h]),(0,t.useEffect)((()=>{b(!1),w(!0)}),[_]),mt("div",{className:"vm-query-editor",ref:v,children:[mt(Vr,{value:n,label:u,type:"textarea",autofocus:!p,error:s,warning:k,onKeyDown:e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:l}=e,s=(e.target.value||"").split("\n").length>1,c=n||r,u="ArrowDown"===t,d="Enter"===t;"ArrowUp"===t&&c&&(e.preventDefault(),a()),u&&c&&(e.preventDefault(),i()),d&&f&&e.preventDefault(),!d||l||s&&!c||f||(e.preventDefault(),o())},onChange:r,onChangeCaret:e=>{g((t=>t[0]===e[0]&&t[1]===e[1]?t:e))},disabled:d,inputmode:"search",caretPosition:_}),y&&l&&mt(Na,{value:n,anchorEl:v,caretPosition:_,hasHelperText:Boolean(k||s),onSelect:(e,t)=>{r(e),g([t,t])},onFoundOptions:e=>{m(!!e.length)}})]})},Da=e=>{let{query:n,limit:r,error:o,isLoading:a,onChange:i,onChangeLimit:l,onRun:s}=e;const{isMobile:c}=br(),[u,d]=(0,t.useState)(""),[h,p]=(0,t.useState)(r);return(0,t.useEffect)((()=>{p(r)}),[r]),mt("div",{className:Qn()({"vm-explore-logs-header":!0,"vm-block":!0,"vm-block_mobile":c}),children:[mt("div",{className:"vm-explore-logs-header-top",children:[mt(Pa,{value:n,autocomplete:!1,onArrowUp:()=>null,onArrowDown:()=>null,onEnter:s,onChange:i,label:"Log query",error:o}),mt(Vr,{label:"Limit entries",type:"number",value:h,error:u,onChange:e=>{const t=+e;p(t),isNaN(t)||t<0?d("Number must be bigger than zero"):(d(""),l(t))},onEnter:s})]}),mt("div",{className:"vm-explore-logs-header-bottom",children:[mt("div",{className:"vm-explore-logs-header-bottom-contols"}),mt("div",{className:"vm-explore-logs-header-bottom-helpful",children:[mt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/victorialogs/logsql/",rel:"help noreferrer",children:[mt(_n,{}),"Query language docs"]}),mt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/victorialogs/",rel:"help noreferrer",children:[mt(Rn,{}),"Documentation"]})]}),mt("div",{className:"vm-explore-logs-header-bottom-execute",children:mt(Dr,{startIcon:mt(a?Zn:En,{}),onClick:s,fullWidth:!0,children:[mt("span",{className:"vm-explore-logs-header-bottom-execute__text",children:a?"Cancel Query":"Execute Query"}),mt("span",{className:"vm-explore-logs-header-bottom-execute__text_hidden",children:"Execute Query"})]})})]})]})},Oa=()=>{const[e,n]=(0,t.useState)(null),[r,o]=(0,t.useState)({width:0,height:0}),a=(0,t.useCallback)((()=>{o({width:(null===e||void 0===e?void 0:e.offsetWidth)||0,height:(null===e||void 0===e?void 0:e.offsetHeight)||0})}),[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]);return er("resize",a),(0,t.useEffect)(a,[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]),[n,r]},La="u-off",Ra="u-label",za="width",Ia="height",ja="top",Fa="bottom",Ha="left",Va="right",Ba="#000",Ua=Ba+"0",Ya="mousemove",Wa="mousedown",qa="mouseup",Ka="mouseenter",Za="mouseleave",Ga="dblclick",Qa="change",Ja="dppxchange",Xa="--",ei="undefined"!=typeof window,ti=ei?document:null,ni=ei?window:null,ri=ei?navigator:null;let oi,ai;function ii(e,t){if(null!=t){let n=e.classList;!n.contains(t)&&n.add(t)}}function li(e,t){let n=e.classList;n.contains(t)&&n.remove(t)}function si(e,t,n){e.style[t]=n+"px"}function ci(e,t,n,r){let o=ti.createElement(e);return null!=t&&ii(o,t),null!=n&&n.insertBefore(o,r),o}function ui(e,t){return ci("div",e,t)}const di=new WeakMap;function hi(e,t,n,r,o){let a="translate("+t+"px,"+n+"px)";a!=di.get(e)&&(e.style.transform=a,di.set(e,a),t<0||n<0||t>r||n>o?ii(e,La):li(e,La))}const pi=new WeakMap;function fi(e,t,n){let r=t+n;r!=pi.get(e)&&(pi.set(e,r),e.style.background=t,e.style.borderColor=n)}const mi=new WeakMap;function _i(e,t,n,r){let o=t+""+n;o!=mi.get(e)&&(mi.set(e,o),e.style.height=n+"px",e.style.width=t+"px",e.style.marginLeft=r?-t/2+"px":0,e.style.marginTop=r?-n/2+"px":0)}const gi={passive:!0},vi={...gi,capture:!0};function yi(e,t,n,r){t.addEventListener(e,n,r?vi:gi)}function bi(e,t,n,r){t.removeEventListener(e,n,gi)}function wi(e,t,n,r){let o;n=n||0;let a=(r=r||t.length-1)<=2147483647;for(;r-n>1;)o=a?n+r>>1:Ri((n+r)/2),t[o]=t&&o<=n;o+=r)if(null!=e[o])return o;return-1}function xi(e,t,n,r){let o=Vi(e),a=Vi(t);e==t&&(-1==o?(e*=n,t/=n):(e/=n,t*=n));let i=10==n?Bi:Ui,l=1==a?Ii:Ri,s=(1==o?Ri:Ii)(i(Li(e))),c=l(i(Li(t))),u=Hi(n,s),d=Hi(n,c);return 10==n&&(s<0&&(u=il(u,-s)),c<0&&(d=il(d,-c))),r||2==n?(e=u*o,t=d*a):(e=al(e,u),t=ol(t,d)),[e,t]}function Si(e,t,n,r){let o=xi(e,t,n,r);return 0==e&&(o[0]=0),0==t&&(o[1]=0),o}ei&&function e(){let t=devicePixelRatio;oi!=t&&(oi=t,ai&&bi(Qa,ai,e),ai=matchMedia(`(min-resolution: ${oi-.001}dppx) and (max-resolution: ${oi+.001}dppx)`),yi(Qa,ai,e),ni.dispatchEvent(new CustomEvent(Ja)))}();const Ci={mode:3,pad:.1},Ai={pad:0,soft:null,mode:0},Ei={min:Ai,max:Ai};function Mi(e,t,n,r){return _l(n)?Ti(e,t,n):(Ai.pad=n,Ai.soft=r?0:null,Ai.mode=r?3:0,Ti(e,t,Ei))}function Ni(e,t){return null==e?t:e}function Ti(e,t,n){let r=n.min,o=n.max,a=Ni(r.pad,0),i=Ni(o.pad,0),l=Ni(r.hard,-Wi),s=Ni(o.hard,Wi),c=Ni(r.soft,Wi),u=Ni(o.soft,-Wi),d=Ni(r.mode,0),h=Ni(o.mode,0),p=t-e,f=Bi(p),m=Fi(Li(e),Li(t)),_=Bi(m),g=Li(_-f);(p<1e-24||g>10)&&(p=0,0!=e&&0!=t||(p=1e-24,2==d&&c!=Wi&&(a=0),2==h&&u!=-Wi&&(i=0)));let v=p||m||1e3,y=Bi(v),b=Hi(10,Ri(y)),w=il(al(e-v*(0==p?0==e?.1:1:a),b/10),24),k=e>=c&&(1==d||3==d&&w<=c||2==d&&w>=c)?c:Wi,x=Fi(l,w=k?k:ji(k,w)),S=il(ol(t+v*(0==p?0==t?.1:1:i),b/10),24),C=t<=u&&(1==h||3==h&&S>=u||2==h&&S<=u)?u:-Wi,A=ji(s,S>C&&t<=C?C:Fi(C,S));return x==A&&0==x&&(A=100),[x,A]}const $i=new Intl.NumberFormat(ei?ri.language:"en-US"),Pi=e=>$i.format(e),Di=Math,Oi=Di.PI,Li=Di.abs,Ri=Di.floor,zi=Di.round,Ii=Di.ceil,ji=Di.min,Fi=Di.max,Hi=Di.pow,Vi=Di.sign,Bi=Di.log10,Ui=Di.log2,Yi=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Di.asinh(e/t)},Wi=1/0;function qi(e){return 1+(0|Bi((e^e>>31)-(e>>31)))}function Ki(e,t,n){return ji(Fi(e,t),n)}function Zi(e){return"function"==typeof e?e:()=>e}const Gi=e=>e,Qi=(e,t)=>t,Ji=e=>null,Xi=e=>!0,el=(e,t)=>e==t,tl=/\.\d*?(?=9{6,}|0{6,})/gm,nl=e=>{if(fl(e)||ll.has(e))return e;const t=`${e}`,n=t.match(tl);if(null==n)return e;let r=n[0].length-1;if(-1!=t.indexOf("e-")){let[e,n]=t.split("e");return+`${nl(e)}e${n}`}return il(e,r)};function rl(e,t){return nl(il(nl(e/t))*t)}function ol(e,t){return nl(Ii(nl(e/t))*t)}function al(e,t){return nl(Ri(nl(e/t))*t)}function il(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(fl(e))return e;let n=10**t,r=e*n*(1+Number.EPSILON);return zi(r)/n}const ll=new Map;function sl(e){return((""+e).split(".")[1]||"").length}function cl(e,t,n,r){let o=[],a=r.map(sl);for(let i=t;i=0?0:t)+(i>=a[l]?0:a[l]),u=10==e?s:il(s,c);o.push(u),ll.set(u,c)}}return o}const ul={},dl=[],hl=[null,null],pl=Array.isArray,fl=Number.isInteger;function ml(e){return"string"==typeof e}function _l(e){let t=!1;if(null!=e){let n=e.constructor;t=null==n||n==Object}return t}function gl(e){return null!=e&&"object"==typeof e}const vl=Object.getPrototypeOf(Uint8Array),yl="__proto__";function bl(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_l;if(pl(e)){let r=e.find((e=>null!=e));if(pl(r)||n(r)){t=Array(e.length);for(let r=0;ra){for(r=i-1;r>=0&&null==e[r];)e[r--]=null;for(r=i+1;rPromise.resolve().then(e):queueMicrotask;const Sl=["January","February","March","April","May","June","July","August","September","October","November","December"],Cl=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Al(e){return e.slice(0,3)}const El=Cl.map(Al),Ml=Sl.map(Al),Nl={MMMM:Sl,MMM:Ml,WWWW:Cl,WWW:El};function Tl(e){return(e<10?"0":"")+e}const $l={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,t)=>t.MMMM[e.getMonth()],MMM:(e,t)=>t.MMM[e.getMonth()],MM:e=>Tl(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>Tl(e.getDate()),D:e=>e.getDate(),WWWW:(e,t)=>t.WWWW[e.getDay()],WWW:(e,t)=>t.WWW[e.getDay()],HH:e=>Tl(e.getHours()),H:e=>e.getHours(),h:e=>{let t=e.getHours();return 0==t?12:t>12?t-12:t},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>Tl(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>Tl(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>{return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Pl(e,t){t=t||Nl;let n,r=[],o=/\{([a-z]+)\}|[^{]+/gi;for(;n=o.exec(e);)r.push("{"==n[0][0]?$l[n[1]]:n[0]);return e=>{let n="";for(let o=0;oe%1==0,Ll=[1,2,2.5,5],Rl=cl(10,-32,0,Ll),zl=cl(10,0,32,Ll),Il=zl.filter(Ol),jl=Rl.concat(zl),Fl="{YYYY}",Hl="\n"+Fl,Vl="{M}/{D}",Bl="\n"+Vl,Ul=Bl+"/{YY}",Yl="{aa}",Wl="{h}:{mm}"+Yl,ql="\n"+Wl,Kl=":{ss}",Zl=null;function Gl(e){let t=1e3*e,n=60*t,r=60*n,o=24*r,a=30*o,i=365*o;return[(1==e?cl(10,0,3,Ll).filter(Ol):cl(10,-3,0,Ll)).concat([t,5*t,10*t,15*t,30*t,n,5*n,10*n,15*n,30*n,r,2*r,3*r,4*r,6*r,8*r,12*r,o,2*o,3*o,4*o,5*o,6*o,7*o,8*o,9*o,10*o,15*o,a,2*a,3*a,4*a,6*a,i,2*i,5*i,10*i,25*i,50*i,100*i]),[[i,Fl,Zl,Zl,Zl,Zl,Zl,Zl,1],[28*o,"{MMM}",Hl,Zl,Zl,Zl,Zl,Zl,1],[o,Vl,Hl,Zl,Zl,Zl,Zl,Zl,1],[r,"{h}"+Yl,Ul,Zl,Bl,Zl,Zl,Zl,1],[n,Wl,Ul,Zl,Bl,Zl,Zl,Zl,1],[t,Kl,Ul+" "+Wl,Zl,Bl+" "+Wl,Zl,ql,Zl,1],[e,Kl+".{fff}",Ul+" "+Wl,Zl,Bl+" "+Wl,Zl,ql,Zl,1]],function(t){return(l,s,c,u,d,h)=>{let p=[],f=d>=i,m=d>=a&&d=o?o:d,i=y+(Ri(c)-Ri(g))+ol(g-y,a);p.push(i);let f=t(i),m=f.getHours()+f.getMinutes()/n+f.getSeconds()/r,_=d/r,v=h/l.axes[s]._space;for(;i=il(i+d,1==e?0:3),!(i>u);)if(_>1){let e=Ri(il(m+_,6))%24,n=t(i).getHours()-e;n>1&&(n=-1),i-=n*r,m=(m+_)%24,il((i-p[p.length-1])/d,3)*v>=.7&&p.push(i)}else p.push(i)}return p}}]}const[Ql,Jl,Xl]=Gl(1),[es,ts,ns]=Gl(.001);function rs(e,t){return e.map((e=>e.map(((n,r)=>0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)))))}function os(e,t){return(n,r,o,a,i)=>{let l,s,c,u,d,h,p=t.find((e=>i>=e[0]))||t[t.length-1];return r.map((t=>{let n=e(t),r=n.getFullYear(),o=n.getMonth(),a=n.getDate(),i=n.getHours(),f=n.getMinutes(),m=n.getSeconds(),_=r!=l&&p[2]||o!=s&&p[3]||a!=c&&p[4]||i!=u&&p[5]||f!=d&&p[6]||m!=h&&p[7]||p[1];return l=r,s=o,c=a,u=i,d=f,h=m,_(n)}))}}function as(e,t,n){return new Date(e,t,n)}function is(e,t){return t(e)}cl(2,-53,53,[1]);function ls(e,t){return(n,r,o,a)=>null==a?Xa:t(e(r))}const ss={show:!0,live:!0,isolate:!1,mount:()=>{},markers:{show:!0,width:2,stroke:function(e,t){let n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null},fill:function(e,t){return e.series[t].fill(e,t)},dash:"solid"},idx:null,idxs:null,values:[]};const cs=[0,0];function us(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{0==e.button&&(!r||e.target==t)&&n(e)}}function ds(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{(!r||e.target==t)&&n(e)}}const hs={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return cs[0]=t,cs[1]=n,cs},points:{one:!1,show:function(e,t){let n=e.cursor.points,r=ui(),o=n.size(e,t);si(r,za,o),si(r,Ia,o);let a=o/-2;si(r,"marginLeft",a),si(r,"marginTop",a);let i=n.width(e,t,o);return i&&si(r,"borderWidth",i),r},size:function(e,t){return e.series[t].points.size},width:0,stroke:function(e,t){let n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){let n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:us,mouseup:us,click:us,dblclick:us,mousemove:ds,mouseleave:ds,mouseenter:ds},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,t,n,r,o)=>r-o,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},ps={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},fs=wl({},ps,{filter:Qi}),ms=wl({},fs,{size:10}),_s=wl({},ps,{show:!1}),gs='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',vs="bold "+gs,ys={show:!0,scale:"x",stroke:Ba,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:vs,side:2,grid:fs,ticks:ms,border:_s,font:gs,lineGap:1.5,rotate:0},bs={show:!0,scale:"x",auto:!1,sorted:1,min:Wi,max:-Wi,idxs:[]};function ws(e,t,n,r,o){return t.map((e=>null==e?"":Pi(e)))}function ks(e,t,n,r,o,a,i){let l=[],s=ll.get(o)||0;for(let c=n=i?n:il(ol(n,o),s);c<=r;c=il(c+o,s))l.push(Object.is(c,-0)?0:c);return l}function xs(e,t,n,r,o,a,i){const l=[],s=e.scales[e.axes[t].scale].log,c=Ri((10==s?Bi:Ui)(n));o=Hi(s,c),10==s&&(o=jl[wi(o,jl)]);let u=n,d=o*s;10==s&&(d=jl[wi(d,jl)]);do{l.push(u),u+=o,10!=s||ll.has(u)||(u=il(u,ll.get(o))),u>=d&&(d=(o=u)*s,10==s&&(d=jl[wi(d,jl)]))}while(u<=r);return l}function Ss(e,t,n,r,o,a,i){let l=e.scales[e.axes[t].scale].asinh,s=r>l?xs(e,t,Fi(l,n),r,o):[l],c=r>=0&&n<=0?[0]:[];return(n<-l?xs(e,t,Fi(l,-r),-n,o):[l]).reverse().map((e=>-e)).concat(c,s)}const Cs=/./,As=/[12357]/,Es=/[125]/,Ms=/1/,Ns=(e,t,n,r)=>e.map(((e,o)=>4==t&&0==e||o%r==0&&n.test(e.toExponential()[e<0?1:0])?e:null));function Ts(e,t,n,r,o){let a=e.axes[n],i=a.scale,l=e.scales[i],s=e.valToPos,c=a._space,u=s(10,i),d=s(9,i)-u>=c?Cs:s(7,i)-u>=c?As:s(5,i)-u>=c?Es:Ms;if(d==Ms){let e=Li(s(1,i)-u);if(eo,Rs={show:!0,auto:!0,sorted:0,gaps:Ls,alpha:1,facets:[wl({},Os,{scale:"x"}),wl({},Os,{scale:"y"})]},zs={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Ls,alpha:1,points:{show:function(e,t){let{scale:n,idxs:r}=e.series[0],o=e._data[0],a=e.valToPos(o[r[0]],n,!0),i=e.valToPos(o[r[1]],n,!0),l=Li(i-a)/(e.series[t].points.space*oi);return r[1]-r[0]<=l},filter:null},values:null,min:Wi,max:-Wi,idxs:[],path:null,clip:null};function Is(e,t,n,r,o){return n/10}const js={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Fs=wl({},js,{time:!1,ori:1}),Hs={};function Vs(e,t){let n=Hs[e];return n||(n={key:e,plots:[],sub(e){n.plots.push(e)},unsub(e){n.plots=n.plots.filter((t=>t!=e))},pub(e,t,r,o,a,i,l){for(let s=0;s{let m=e.pxRound;const _=l.dir*(0==l.ori?1:-1),g=0==l.ori?Xs:ec;let v,y;1==_?(v=n,y=r):(v=r,y=n);let b=m(c(t[v],l,p,d)),w=m(u(i[v],s,f,h)),k=m(c(t[y],l,p,d)),x=m(u(1==a?s.max:s.min,s,f,h)),S=new Path2D(o);return g(S,k,x),g(S,b,x),g(S,b,w),S}))}function qs(e,t,n,r,o,a){let i=null;if(e.length>0){i=new Path2D;const l=0==t?tc:nc;let s=n;for(let t=0;tn[0]){let e=n[0]-s;e>0&&l(i,s,r,e,r+a),s=n[1]}}let c=n+o-s,u=10;c>0&&l(i,s,r-u/2,c,r+a+u)}return i}function Ks(e,t,n,r,o,a,i){let l=[],s=e.length;for(let c=1==o?n:r;c>=n&&c<=r;c+=o){if(null===t[c]){let u=c,d=c;if(1==o)for(;++c<=r&&null===t[c];)d=c;else for(;--c>=n&&null===t[c];)d=c;let h=a(e[u]),p=d==u?h:a(e[d]),f=u-o;h=i<=0&&f>=0&&f=0&&m>=0&&m=h&&l.push([h,p])}}return l}function Zs(e){return 0==e?Gi:1==e?zi:t=>rl(t,e)}function Gs(e){let t=0==e?Qs:Js,n=0==e?(e,t,n,r,o,a)=>{e.arcTo(t,n,r,o,a)}:(e,t,n,r,o,a)=>{e.arcTo(n,t,o,r,a)},r=0==e?(e,t,n,r,o)=>{e.rect(t,n,r,o)}:(e,t,n,r,o)=>{e.rect(n,t,o,r)};return function(e,o,a,i,l){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;0==s&&0==c?r(e,o,a,i,l):(s=ji(s,i/2,l/2),c=ji(c,i/2,l/2),t(e,o+s,a),n(e,o+i,a,o+i,a+l,s),n(e,o+i,a+l,o,a+l,c),n(e,o,a+l,o,a,c),n(e,o,a,o+i,a,s),e.closePath())}}const Qs=(e,t,n)=>{e.moveTo(t,n)},Js=(e,t,n)=>{e.moveTo(n,t)},Xs=(e,t,n)=>{e.lineTo(t,n)},ec=(e,t,n)=>{e.lineTo(n,t)},tc=Gs(0),nc=Gs(1),rc=(e,t,n,r,o,a)=>{e.arc(t,n,r,o,a)},oc=(e,t,n,r,o,a)=>{e.arc(n,t,r,o,a)},ac=(e,t,n,r,o,a,i)=>{e.bezierCurveTo(t,n,r,o,a,i)},ic=(e,t,n,r,o,a,i)=>{e.bezierCurveTo(n,t,o,r,i,a)};function lc(e){return(e,t,n,r,o)=>Bs(e,t,((t,a,i,l,s,c,u,d,h,p,f)=>{let m,_,{pxRound:g,points:v}=t;0==l.ori?(m=Qs,_=rc):(m=Js,_=oc);const y=il(v.width*oi,3);let b=(v.size-v.width)/2*oi,w=il(2*b,3),k=new Path2D,x=new Path2D,{left:S,top:C,width:A,height:E}=e.bbox;tc(x,S-w,C-w,A+2*w,E+2*w);const M=e=>{if(null!=i[e]){let t=g(c(a[e],l,p,d)),n=g(u(i[e],s,f,h));m(k,t+b,n),_(k,t,n,b,0,2*Oi)}};if(o)o.forEach(M);else for(let e=n;e<=r;e++)M(e);return{stroke:y>0?k:null,fill:k,clip:x,flags:3}}))}function sc(e){return(t,n,r,o,a,i)=>{r!=o&&(a!=r&&i!=r&&e(t,n,r),a!=o&&i!=o&&e(t,n,o),e(t,n,i))}}const cc=sc(Xs),uc=sc(ec);function dc(e){const t=Ni(e?.alignGaps,0);return(e,n,r,o)=>Bs(e,n,((a,i,l,s,c,u,d,h,p,f,m)=>{let _,g,v=a.pxRound,y=e=>v(u(e,s,f,h)),b=e=>v(d(e,c,m,p));0==s.ori?(_=Xs,g=cc):(_=ec,g=uc);const w=s.dir*(0==s.ori?1:-1),k={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},x=k.stroke;let S,C,A,E=Wi,M=-Wi,N=y(i[1==w?r:o]),T=ki(l,r,o,1*w),$=ki(l,r,o,-1*w),P=y(i[T]),D=y(i[$]),O=!1;for(let e=1==w?r:o;e>=r&&e<=o;e+=w){let t=y(i[e]),n=l[e];t==N?null!=n?(C=b(n),E==Wi&&(_(x,t,C),S=C),E=ji(C,E),M=Fi(C,M)):null===n&&(O=!0):(E!=Wi&&(g(x,N,E,M,S,C),A=N),null!=n?(C=b(n),_(x,t,C),E=M=S=C):(E=Wi,M=-Wi,null===n&&(O=!0)),N=t)}E!=Wi&&E!=M&&A!=N&&g(x,N,E,M,S,C);let[L,R]=Us(e,n);if(null!=a.fill||0!=L){let t=k.fill=new Path2D(x),r=b(a.fillTo(e,n,a.min,a.max,L));_(t,D,r),_(t,P,r)}if(!a.spanGaps){let c=[];O&&c.push(...Ks(i,l,r,o,w,y,t)),k.gaps=c=a.gaps(e,n,r,o,c),k.clip=qs(c,s.ori,h,p,f,m)}return 0!=R&&(k.band=2==R?[Ws(e,n,r,o,x,-1),Ws(e,n,r,o,x,1)]:Ws(e,n,r,o,x,R)),k}))}function hc(e,t,n,r,o,a){let i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Wi;if(e.length>1){let l=null;for(let s=0,c=1/0;s0!==r[e]>0?n[e]=0:(n[e]=3*(s[e-1]+s[e])/((2*s[e]+s[e-1])/r[e-1]+(s[e]+2*s[e-1])/r[e]),isFinite(n[e])||(n[e]=0));n[i-1]=r[i-2];for(let c=0;c{Tc.pxRatio=oi})));const _c=dc(),gc=lc();function vc(e,t,n,r){return(r?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map(((e,r)=>yc(e,r,t,n)))}function yc(e,t,n,r){return wl({},0==t?n:r,e)}function bc(e,t,n){return null==t?hl:[t,n]}const wc=bc;function kc(e,t,n){return null==t?hl:Mi(t,n,.1,!0)}function xc(e,t,n,r){return null==t?hl:xi(t,n,e.scales[r].log,!1)}const Sc=xc;function Cc(e,t,n,r){return null==t?hl:Si(t,n,e.scales[r].log,!1)}const Ac=Cc;function Ec(e,t,n,r,o){let a=Fi(qi(e),qi(t)),i=t-e,l=wi(o/r*i,n);do{let e=n[l],t=r*e/i;if(t>=o&&a+(e<5?ll.get(e):0)<=17)return[e,t]}while(++l(t=zi((n=+r)*oi))+"px")),t,n]}function Nc(e){e.show&&[e.font,e.labelFont].forEach((e=>{let t=il(e[2]*oi,1);e[0]=e[0].replace(/[0-9.]+px/,t+"px"),e[1]=t}))}function Tc(e,t,n){const r={mode:Ni(e.mode,1)},o=r.mode;function a(e,t){return((3==t.distr?Bi(e>0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?Yi(e,t.asinh):100==t.distr?t.fwd(e):e)-t._min)/(t._max-t._min)}function i(e,t,n,r){let o=a(e,t);return r+n*(-1==t.dir?1-o:o)}function l(e,t,n,r){let o=a(e,t);return r+n*(-1==t.dir?o:1-o)}function s(e,t,n,r){return 0==t.ori?i(e,t,n,r):l(e,t,n,r)}r.valToPosH=i,r.valToPosV=l;let c=!1;r.status=0;const u=r.root=ui("uplot");if(null!=e.id&&(u.id=e.id),ii(u,e.class),e.title){ui("u-title",u).textContent=e.title}const d=ci("canvas"),h=r.ctx=d.getContext("2d"),p=ui("u-wrap",u);yi("click",p,(e=>{if(e.target===m){(Tt!=At||$t!=Et)&&Ft.click(r,e)}}),!0);const f=r.under=ui("u-under",p);p.appendChild(d);const m=r.over=ui("u-over",p),_=+Ni((e=bl(e)).pxAlign,1),g=Zs(_);(e.plugins||[]).forEach((t=>{t.opts&&(e=t.opts(r,e)||e)}));const v=e.ms||.001,y=r.series=1==o?vc(e.series||[],bs,zs,!1):(b=e.series||[null],w=Rs,b.map(((e,t)=>0==t?{}:wl({},w,e))));var b,w;const k=r.axes=vc(e.axes||[],ys,Ds,!0),x=r.scales={},S=r.bands=e.bands||[];S.forEach((e=>{e.fill=Zi(e.fill||null),e.dir=Ni(e.dir,-1)}));const C=2==o?y[1].facets[0].scale:y[0].scale,A={axes:function(){for(let e=0;ent[e])):v,b=2==p.distr?nt[v[1]]-nt[v[0]]:u,w=t.ticks,S=t.border,C=w.show?zi(w.size*oi):0,A=t._rotate*-Oi/180,E=g(t._pos*oi),M=E+(C+_)*c;o=0==i?M:0,n=1==i?M:0,lt(t.font[0],l,1==t.align?Ha:2==t.align?Va:A>0?Ha:A<0?Va:0==i?"center":3==a?Va:Ha,A||1==i?"middle":2==a?ja:Fa);let N=t.font[1]*t.lineGap,T=v.map((e=>g(s(e,p,f,m)))),$=t._values;for(let e=0;e<$.length;e++){let t=$[e];if(null!=t){0==i?n=T[e]:o=T[e],t=""+t;let r=-1==t.indexOf("\n")?[t]:t.split(/\n/gm);for(let e=0;e0&&(y.forEach(((e,n)=>{if(n>0&&e.show&&(ut(n,!1),ut(n,!0),null==e._paths)){tt!=e.alpha&&(h.globalAlpha=tt=e.alpha);let a=2==o?[0,t[n][0].length-1]:function(e){let t=Ki(Be-1,0,Ve-1),n=Ki(Ue+1,0,Ve-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n{if(t>0&&e.show){tt!=e.alpha&&(h.globalAlpha=tt=e.alpha),null!=e._paths&&dt(t,!1);{let n=null!=e._paths?e._paths.gaps:null,o=e.points.show(r,t,Be,Ue,n),a=e.points.filter(r,t,o,n);(o||a)&&(e.points._paths=e.points.paths(r,t,Be,Ue,a),dt(t,!0))}1!=tt&&(h.globalAlpha=tt=1),xn("drawSeries",t)}})))}},E=(e.drawOrder||["axes","series"]).map((e=>A[e]));function M(t){let n=x[t];if(null==n){let r=(e.scales||ul)[t]||ul;if(null!=r.from)M(r.from),x[t]=wl({},x[r.from],r,{key:t});else{n=x[t]=wl({},t==C?js:Fs,r),n.key=t;let e=n.time,a=n.range,i=pl(a);if((t!=C||2==o&&!e)&&(!i||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?Ci:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?Ci:{mode:1,hard:a[1],soft:a[1]}},i=!1),!i&&_l(a))){let e=a;a=(t,n,r)=>null==n?hl:Mi(n,r,e)}n.range=Zi(a||(e?wc:t==C?3==n.distr?Sc:4==n.distr?Ac:bc:3==n.distr?xc:4==n.distr?Cc:kc)),n.auto=Zi(!i&&n.auto),n.clamp=Zi(n.clamp||Is),n._min=n._max=null}}}M("x"),M("y"),1==o&&y.forEach((e=>{M(e.scale)})),k.forEach((e=>{M(e.scale)}));for(let Tn in e.scales)M(Tn);const N=x[C],T=N.distr;let $,P;0==N.ori?(ii(u,"u-hz"),$=i,P=l):(ii(u,"u-vt"),$=l,P=i);const D={};for(let Tn in x){let e=x[Tn];null==e.min&&null==e.max||(D[Tn]={min:e.min,max:e.max},e.min=e.max=null)}const O=e.tzDate||(e=>new Date(zi(e/v))),L=e.fmtDate||Pl,R=1==v?Xl(O):ns(O),z=os(O,rs(1==v?Jl:ts,L)),I=ls(O,is("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",L)),j=[],F=r.legend=wl({},ss,e.legend),H=F.show,V=F.markers;let B,U,Y;F.idxs=j,V.width=Zi(V.width),V.dash=Zi(V.dash),V.stroke=Zi(V.stroke),V.fill=Zi(V.fill);let W,q=[],K=[],Z=!1,G={};if(F.live){const e=y[1]?y[1].values:null;Z=null!=e,W=Z?e(r,1,0):{_:0};for(let t in W)G[t]=Xa}if(H)if(B=ci("table","u-legend",u),Y=ci("tbody",null,B),F.mount(r,B),Z){U=ci("thead",null,B,Y);let e=ci("tr",null,U);for(var Q in ci("th",null,e),W)ci("th",Ra,e).textContent=Q}else ii(B,"u-inline"),F.live&&ii(B,"u-live");const J={show:!0},X={show:!1};const ee=new Map;function te(e,t,n){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const a=ee.get(t)||{},i=Ae.bind[e](r,t,n,o);i&&(yi(e,t,a[e]=i),ee.set(t,a))}function ne(e,t,n){const r=ee.get(t)||{};for(let o in r)null!=e&&o!=e||(bi(o,t,r[o]),delete r[o]);null==e&&ee.delete(t)}let re=0,oe=0,ae=0,ie=0,le=0,se=0,ce=le,ue=se,de=ae,he=ie,pe=0,fe=0,me=0,_e=0;r.bbox={};let ge=!1,ve=!1,ye=!1,be=!1,we=!1,ke=!1;function xe(e,t,n){(n||e!=r.width||t!=r.height)&&Se(e,t),yt(!1),ye=!0,ve=!0,Rt()}function Se(e,t){r.width=re=ae=e,r.height=oe=ie=t,le=se=0,function(){let e=!1,t=!1,n=!1,r=!1;k.forEach(((o,a)=>{if(o.show&&o._show){let{side:a,_size:i}=o,l=a%2,s=i+(null!=o.label?o.labelSize:0);s>0&&(l?(ae-=s,3==a?(le+=s,r=!0):n=!0):(ie-=s,0==a?(se+=s,e=!0):t=!0))}})),Ie[0]=e,Ie[1]=n,Ie[2]=t,Ie[3]=r,ae-=He[1]+He[3],le+=He[3],ie-=He[2]+He[0],se+=He[0]}(),function(){let e=le+ae,t=se+ie,n=le,r=se;function o(o,a){switch(o){case 1:return e+=a,e-a;case 2:return t+=a,t-a;case 3:return n-=a,n+a;case 0:return r-=a,r+a}}k.forEach(((e,t)=>{if(e.show&&e._show){let t=e.side;e._pos=o(t,e._size),null!=e.label&&(e._lpos=o(t,e.labelSize))}}))}();let n=r.bbox;pe=n.left=rl(le*oi,.5),fe=n.top=rl(se*oi,.5),me=n.width=rl(ae*oi,.5),_e=n.height=rl(ie*oi,.5)}const Ce=3;r.setSize=function(e){let{width:t,height:n}=e;xe(t,n)};const Ae=r.cursor=wl({},hs,{drag:{y:2==o}},e.cursor);if(null==Ae.dataIdx){var Ee;let e=Ae.hover,n=e.skip=new Set(null!==(Ee=e.skip)&&void 0!==Ee?Ee:[]);n.add(void 0);let r=e.prox=Zi(e.prox),o=e.bias??=0;Ae.dataIdx=(e,a,i,l)=>{var s;if(0==a)return i;let c=i,u=null!==(s=r(e,a,i,l))&&void 0!==s?s:Wi,d=u>=0&&u0;)n.has(m[e])||(t=e);if(0==o||1==o)for(e=i;null==r&&e++u&&(c=null)}return c}}const Me=e=>{Ae.event=e};Ae.idxs=j,Ae._lock=!1;let Ne=Ae.points;Ne.show=Zi(Ne.show),Ne.size=Zi(Ne.size),Ne.stroke=Zi(Ne.stroke),Ne.width=Zi(Ne.width),Ne.fill=Zi(Ne.fill);const Te=r.focus=wl({},e.focus||{alpha:.3},Ae.focus),$e=Te.prox>=0,Pe=$e&&Ne.one;let De=[],Oe=[],Le=[];function Re(e,t){let n=Ne.show(r,t);if(n)return ii(n,"u-cursor-pt"),ii(n,e.class),hi(n,-10,-10,ae,ie),m.insertBefore(n,De[t]),n}function ze(e,t){if(1==o||t>0){let t=1==o&&x[e.scale].time,n=e.value;e.value=t?ml(n)?ls(O,is(n,L)):n||I:n||Ps,e.label=e.label||(t?"Time":"Value")}if(Pe||t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||_c||Ji,e.fillTo=Zi(e.fillTo||Ys),e.pxAlign=+Ni(e.pxAlign,_),e.pxRound=Zs(e.pxAlign),e.stroke=Zi(e.stroke||null),e.fill=Zi(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;let t=il((3+2*(Fi(1,e.width)||1))*1,3),n=e.points=wl({},{size:t,width:Fi(1,.2*t),stroke:e.stroke,space:2*t,paths:gc,_stroke:null,_fill:null},e.points);n.show=Zi(n.show),n.filter=Zi(n.filter),n.fill=Zi(n.fill),n.stroke=Zi(n.stroke),n.paths=Zi(n.paths),n.pxAlign=e.pxAlign}if(H){let n=function(e,t){if(0==t&&(Z||!F.live||2==o))return hl;let n=[],a=ci("tr","u-series",Y,Y.childNodes[t]);ii(a,e.class),e.show||ii(a,La);let i=ci("th",null,a);if(V.show){let e=ui("u-marker",i);if(t>0){let n=V.width(r,t);n&&(e.style.border=n+"px "+V.dash(r,t)+" "+V.stroke(r,t)),e.style.background=V.fill(r,t)}}let l=ui(Ra,i);for(var s in l.textContent=e.label,t>0&&(V.show||(l.style.color=e.width>0?V.stroke(r,t):V.fill(r,t)),te("click",i,(t=>{if(Ae._lock)return;Me(t);let n=y.indexOf(e);if((t.ctrlKey||t.metaKey)!=F.isolate){let e=y.some(((e,t)=>t>0&&t!=n&&e.show));y.forEach(((t,r)=>{r>0&&qt(r,e?r==n?J:X:J,!0,Cn.setSeries)}))}else qt(n,{show:!e.show},!0,Cn.setSeries)}),!1),$e&&te(Ka,i,(t=>{Ae._lock||(Me(t),qt(y.indexOf(e),Qt,!0,Cn.setSeries))}),!1)),W){let e=ci("td","u-value",a);e.textContent="--",n.push(e)}return[a,n]}(e,t);q.splice(t,0,n[0]),K.splice(t,0,n[1]),F.values.push(null)}if(Ae.show){j.splice(t,0,null);let n=null;Pe?0==t&&(n=Re(e,t)):t>0&&(n=Re(e,t)),De.splice(t,0,n),Oe.splice(t,0,0),Le.splice(t,0,0)}xn("addSeries",t)}r.addSeries=function(e,t){t=null==t?y.length:t,e=1==o?yc(e,t,bs,zs):yc(e,t,{},Rs),y.splice(t,0,e),ze(y[t],t)},r.delSeries=function(e){if(y.splice(e,1),H){F.values.splice(e,1),K.splice(e,1);let t=q.splice(e,1)[0];ne(null,t.firstChild),t.remove()}Ae.show&&(j.splice(e,1),De.splice(e,1)[0].remove(),Oe.splice(e,1),Le.splice(e,1)),xn("delSeries",e)};const Ie=[!1,!1,!1,!1];function je(e,t,n,r){let[o,a,i,l]=n,s=t%2,c=0;return 0==s&&(l||a)&&(c=0==t&&!o||2==t&&!i?zi(ys.size/3):0),1==s&&(o||i)&&(c=1==t&&!a||3==t&&!l?zi(Ds.size/2):0),c}const Fe=r.padding=(e.padding||[je,je,je,je]).map((e=>Zi(Ni(e,je)))),He=r._padding=Fe.map(((e,t)=>e(r,t,Ie,0)));let Ve,Be=null,Ue=null;const Ye=1==o?y[0].idxs:null;let We,qe,Ke,Ze,Ge,Qe,Je,Xe,et,tt,nt=null,rt=!1;function ot(e,n){if(t=null==e?[]:e,r.data=r._data=t,2==o){Ve=0;for(let e=1;e=0,ke=!0,Rt()}}function at(){let e,n;rt=!0,1==o&&(Ve>0?(Be=Ye[0]=0,Ue=Ye[1]=Ve-1,e=t[0][Be],n=t[0][Ue],2==T?(e=Be,n=Ue):e==n&&(3==T?[e,n]=xi(e,e,N.log,!1):4==T?[e,n]=Si(e,e,N.log,!1):N.time?n=e+zi(86400/v):[e,n]=Mi(e,n,.1,!0))):(Be=Ye[0]=e=null,Ue=Ye[1]=n=null)),Wt(C,e,n)}function it(e,t,n,r,o,a){e??=Ua,n??=dl,r??="butt",o??=Ua,a??="round",e!=We&&(h.strokeStyle=We=e),o!=qe&&(h.fillStyle=qe=o),t!=Ke&&(h.lineWidth=Ke=t),a!=Ge&&(h.lineJoin=Ge=a),r!=Qe&&(h.lineCap=Qe=r),n!=Ze&&h.setLineDash(Ze=n)}function lt(e,t,n,r){t!=qe&&(h.fillStyle=qe=t),e!=Je&&(h.font=Je=e),n!=Xe&&(h.textAlign=Xe=n),r!=et&&(h.textBaseline=et=r)}function st(e,t,n,o){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(o.length>0&&e.auto(r,rt)&&(null==t||null==t.min)){let t=Ni(Be,0),r=Ni(Ue,o.length-1),i=null==n.min?3==e.distr?function(e,t,n){let r=Wi,o=-Wi;for(let a=t;a<=n;a++){let t=e[a];null!=t&&t>0&&(to&&(o=t))}return[r,o]}(o,t,r):function(e,t,n,r){let o=Wi,a=-Wi;if(1==r)o=e[t],a=e[n];else if(-1==r)o=e[n],a=e[t];else for(let i=t;i<=n;i++){let t=e[i];null!=t&&(ta&&(a=t))}return[o,a]}(o,t,r,a):[n.min,n.max];e.min=ji(e.min,n.min=i[0]),e.max=Fi(e.max,n.max=i[1])}}r.setData=ot;const ct={min:null,max:null};function ut(e,t){let n=t?y[e].points:y[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function dt(e,n){let o=n?y[e].points:y[e],{stroke:a,fill:i,clip:l,flags:s,_stroke:c=o._stroke,_fill:u=o._fill,_width:d=o.width}=o._paths;d=il(d*oi,3);let p=null,f=d%2/2;n&&null==u&&(u=d>0?"#fff":c);let m=1==o.pxAlign&&f>0;if(m&&h.translate(f,f),!n){let e=pe-d/2,t=fe-d/2,n=me+d,r=_e+d;p=new Path2D,p.rect(e,t,n,r)}n?pt(c,d,o.dash,o.cap,u,a,i,s,l):function(e,n,o,a,i,l,s,c,u,d,h){let p=!1;0!=u&&S.forEach(((f,m)=>{if(f.series[0]==e){let e,_=y[f.series[1]],g=t[f.series[1]],v=(_._paths||ul).band;pl(v)&&(v=1==f.dir?v[0]:v[1]);let b=null;_.show&&v&&function(e,t,n){for(t=Ni(t,0),n=Ni(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,Be,Ue)?(b=f.fill(r,m)||l,e=_._paths.clip):v=null,pt(n,o,a,i,b,s,c,u,d,h,e,v),p=!0}})),p||pt(n,o,a,i,l,s,c,u,d,h)}(e,c,d,o.dash,o.cap,u,a,i,s,p,l),m&&h.translate(-f,-f)}const ht=3;function pt(e,t,n,r,o,a,i,l,s,c,u,d){it(e,t,n,r,o),(s||c||d)&&(h.save(),s&&h.clip(s),c&&h.clip(c)),d?(l&ht)==ht?(h.clip(d),u&&h.clip(u),mt(o,i),ft(e,a,t)):2&l?(mt(o,i),h.clip(d),ft(e,a,t)):1&l&&(h.save(),h.clip(d),u&&h.clip(u),mt(o,i),h.restore(),ft(e,a,t)):(mt(o,i),ft(e,a,t)),(s||c||d)&&h.restore()}function ft(e,t,n){n>0&&(t instanceof Map?t.forEach(((e,t)=>{h.strokeStyle=We=t,h.stroke(e)})):null!=t&&e&&h.stroke(t))}function mt(e,t){t instanceof Map?t.forEach(((e,t)=>{h.fillStyle=qe=t,h.fill(e)})):null!=t&&e&&h.fill(t)}function _t(e,t,n,r,o,a,i,l,s,c){let u=i%2/2;1==_&&h.translate(u,u),it(l,i,s,c,l),h.beginPath();let d,p,f,m,g=o+(0==r||3==r?-a:a);0==n?(p=o,m=g):(d=o,f=g);for(let _=0;_{if(!n.show)return;let a=x[n.scale];if(null==a.min)return void(n._show&&(t=!1,n._show=!1,yt(!1)));n._show||(t=!1,n._show=!0,yt(!1));let i=n.side,l=i%2,{min:s,max:c}=a,[u,d]=function(e,t,n,o){let a,i=k[e];if(o<=0)a=[0,0];else{let l=i._space=i.space(r,e,t,n,o);a=Ec(t,n,i._incrs=i.incrs(r,e,t,n,o,l),o,l)}return i._found=a}(o,s,c,0==l?ae:ie);if(0==d)return;let h=2==a.distr,p=n._splits=n.splits(r,o,s,c,u,d,h),f=2==a.distr?p.map((e=>nt[e])):p,m=2==a.distr?nt[p[1]]-nt[p[0]]:u,_=n._values=n.values(r,n.filter(r,f,o,d,m),o,d,m);n._rotate=2==i?n.rotate(r,_,o,d):0;let g=n._size;n._size=Ii(n.size(r,_,o,e)),null!=g&&n._size!=g&&(t=!1)})),t}function vt(e){let t=!0;return Fe.forEach(((n,o)=>{let a=n(r,o,Ie,e);a!=He[o]&&(t=!1),He[o]=a})),t}function yt(e){y.forEach(((t,n)=>{n>0&&(t._paths=null,e&&(1==o?(t.min=null,t.max=null):t.facets.forEach((e=>{e.min=null,e.max=null}))))}))}let bt,wt,kt,xt,St,Ct,At,Et,Mt,Nt,Tt,$t,Pt=!1,Dt=!1,Ot=[];function Lt(){Dt=!1;for(let e=0;e0){y.forEach(((n,a)=>{if(1==o){let o=n.scale,i=D[o];if(null==i)return;let l=e[o];if(0==a){let e=l.range(r,l.min,l.max,o);l.min=e[0],l.max=e[1],Be=wi(l.min,t[0]),Ue=wi(l.max,t[0]),Ue-Be>1&&(t[0][Be]l.max&&Ue--),n.min=nt[Be],n.max=nt[Ue]}else n.show&&n.auto&&st(l,i,n,t[a],n.sorted);n.idxs[0]=Be,n.idxs[1]=Ue}else if(a>0&&n.show&&n.auto){let[r,o]=n.facets,i=r.scale,l=o.scale,[s,c]=t[a],u=e[i],d=e[l];null!=u&&st(u,D[i],r,s,r.sorted),null!=d&&st(d,D[l],o,c,o.sorted),n.min=o.min,n.max=o.max}}));for(let t in e){let n=e[t],o=D[t];if(null==n.from&&(null==o||null==o.min)){let e=n.range(r,n.min==Wi?null:n.min,n.max==-Wi?null:n.max,t);n.min=e[0],n.max=e[1]}}}for(let t in e){let n=e[t];if(null!=n.from){let o=e[n.from];if(null==o.min)n.min=n.max=null;else{let e=n.range(r,o.min,o.max,t);n.min=e[0],n.max=e[1]}}}let n={},a=!1;for(let t in e){let r=e[t],o=x[t];if(o.min!=r.min||o.max!=r.max){o.min=r.min,o.max=r.max;let e=o.distr;o._min=3==e?Bi(o.min):4==e?Yi(o.min,o.asinh):100==e?o.fwd(o.min):o.min,o._max=3==e?Bi(o.max):4==e?Yi(o.max,o.asinh):100==e?o.fwd(o.max):o.max,n[t]=a=!0}}if(a){y.forEach(((e,t)=>{2==o?t>0&&n.y&&(e._paths=null):n[e.scale]&&(e._paths=null)}));for(let e in n)ye=!0,xn("setScale",e);Ae.show&&Ae.left>=0&&(be=ke=!0)}for(let t in D)D[t]=null}(),ge=!1),ye&&(!function(){let e=!1,t=0;for(;!e;){t++;let n=gt(t),o=vt(t);e=t==Ce||n&&o,e||(Se(r.width,r.height),ve=!0)}}(),ye=!1),ve){if(si(f,Ha,le),si(f,ja,se),si(f,za,ae),si(f,Ia,ie),si(m,Ha,le),si(m,ja,se),si(m,za,ae),si(m,Ia,ie),si(p,za,re),si(p,Ia,oe),d.width=zi(re*oi),d.height=zi(oe*oi),k.forEach((e=>{let{_el:t,_show:n,_size:r,_pos:o,side:a}=e;if(null!=t)if(n){let e=a%2==1;si(t,e?"left":"top",o-(3===a||0===a?r:0)),si(t,e?"width":"height",r),si(t,e?"top":"left",e?se:le),si(t,e?"height":"width",e?ie:ae),li(t,La)}else ii(t,La)})),We=qe=Ke=Ge=Qe=Je=Xe=et=Ze=null,tt=1,sn(!0),le!=ce||se!=ue||ae!=de||ie!=he){yt(!1);let e=ae/de,t=ie/he;if(Ae.show&&!be&&Ae.left>=0){Ae.left*=e,Ae.top*=t,kt&&hi(kt,zi(Ae.left),0,ae,ie),xt&&hi(xt,0,zi(Ae.top),ae,ie);for(let n=0;n=0&&Bt.width>0){Bt.left*=e,Bt.width*=e,Bt.top*=t,Bt.height*=t;for(let e in dn)si(Ut,e,Bt[e])}ce=le,ue=se,de=ae,he=ie}xn("setSize"),ve=!1}re>0&&oe>0&&(h.clearRect(0,0,d.width,d.height),xn("drawClear"),E.forEach((e=>e())),xn("draw")),Bt.show&&we&&(Yt(Bt),we=!1),Ae.show&&be&&(an(null,!0,!1),be=!1),F.show&&F.live&&ke&&(rn(),ke=!1),c||(c=!0,r.status=1,xn("ready")),rt=!1,Pt=!1}function It(e,n){let o=x[e];if(null==o.from){if(0==Ve){let t=o.range(r,n.min,n.max,e);n.min=t[0],n.max=t[1]}if(n.min>n.max){let e=n.min;n.min=n.max,n.max=e}if(Ve>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==C&&2==o.distr&&Ve>0&&(n.min=wi(n.min,t[0]),n.max=wi(n.max,t[0]),n.min==n.max&&n.max++),D[e]=n,ge=!0,Rt()}}r.batch=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Pt=!0,Dt=t,e(r),zt(),t&&Ot.length>0&&queueMicrotask(Lt)},r.redraw=(e,t)=>{ye=t||!1,!1!==e?Wt(C,N.min,N.max):Rt()},r.setScale=It;let jt=!1;const Ft=Ae.drag;let Ht=Ft.x,Vt=Ft.y;Ae.show&&(Ae.x&&(bt=ui("u-cursor-x",m)),Ae.y&&(wt=ui("u-cursor-y",m)),0==N.ori?(kt=bt,xt=wt):(kt=wt,xt=bt),Tt=Ae.left,$t=Ae.top);const Bt=r.select=wl({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Ut=Bt.show?ui("u-select",Bt.over?m:f):null;function Yt(e,t){if(Bt.show){for(let t in e)Bt[t]=e[t],t in dn&&si(Ut,t,e[t]);!1!==t&&xn("setSelect")}}function Wt(e,t,n){It(e,{min:t,max:n})}function qt(e,t,n,a){null!=t.focus&&function(e){if(e!=Gt){let t=null==e,n=1!=Te.alpha;y.forEach(((r,a)=>{if(1==o||a>0){let o=t||0==a||a==e;r._focus=t?null:o,n&&function(e,t){y[e].alpha=t,Ae.show&&De[e]&&(De[e].style.opacity=t);H&&q[e]&&(q[e].style.opacity=t)}(a,o?1:Te.alpha)}})),Gt=e,n&&Rt()}}(e),null!=t.show&&y.forEach(((n,r)=>{r>0&&(e==r||null==e)&&(n.show=t.show,function(e){let t=y[e],n=H?q[e]:null;t.show?n&&li(n,La):(n&&ii(n,La),hi(Pe?De[0]:De[e],-10,-10,ae,ie))}(r,t.show),2==o?(Wt(n.facets[0].scale,null,null),Wt(n.facets[1].scale,null,null)):Wt(n.scale,null,null),Rt())})),!1!==n&&xn("setSeries",e,t),a&&Mn("setSeries",r,e,t)}let Kt,Zt,Gt;r.setSelect=Yt,r.setSeries=qt,r.addBand=function(e,t){e.fill=Zi(e.fill||null),e.dir=Ni(e.dir,-1),t=null==t?S.length:t,S.splice(t,0,e)},r.setBand=function(e,t){wl(S[e],t)},r.delBand=function(e){null==e?S.length=0:S.splice(e,1)};const Qt={focus:!0};function Jt(e,t,n){let r=x[t];n&&(e=e/oi-(1==r.ori?se:le));let o=ae;1==r.ori&&(o=ie,e=o-e),-1==r.dir&&(e=o-e);let a=r._min,i=a+(r._max-a)*(e/o),l=r.distr;return 3==l?Hi(10,i):4==l?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Di.sinh(e)*t}(i,r.asinh):100==l?r.bwd(i):i}function Xt(e,t){si(Ut,Ha,Bt.left=e),si(Ut,za,Bt.width=t)}function en(e,t){si(Ut,ja,Bt.top=e),si(Ut,Ia,Bt.height=t)}H&&$e&&te(Za,B,(e=>{Ae._lock||(Me(e),null!=Gt&&qt(null,Qt,!0,Cn.setSeries))})),r.valToIdx=e=>wi(e,t[0]),r.posToIdx=function(e,n){return wi(Jt(e,C,n),t[0],Be,Ue)},r.posToVal=Jt,r.valToPos=(e,t,n)=>0==x[t].ori?i(e,x[t],n?me:ae,n?pe:0):l(e,x[t],n?_e:ie,n?fe:0),r.setCursor=(e,t,n)=>{Tt=e.left,$t=e.top,an(null,t,n)};let tn=0==N.ori?Xt:en,nn=1==N.ori?Xt:en;function rn(e,t){if(null!=e&&(e.idxs?e.idxs.forEach(((e,t)=>{j[t]=e})):void 0!==e.idx&&j.fill(e.idx),F.idx=j[0]),H&&F.live){for(let e=0;e0||1==o&&!Z)&&on(e,j[e]);!function(){if(H&&F.live)for(let e=2==o?1:0;eUe;Kt=Wi,Zt=null;let s=0==N.ori?ae:ie,c=1==N.ori?ae:ie;if(Tt<0||0==Ve||l){i=Ae.idx=null;for(let e=0;e0&&e.show){let t=null==w?-10:P(w,1==o?x[e.scale]:x[e.facets[1].scale],c,0);if($e&&null!=w){let n=1==N.ori?Tt:$t,o=Li(Te.dist(r,_,b,t,n));if(o=0?1:-1;a==(w>=0?1:-1)&&(1==a?1==t?w>=r:w<=r:1==t?w<=r:w>=r)&&(Kt=o,Zt=_)}else Kt=o,Zt=_}}if(ke||Pe){let e,n;0==N.ori?(e=k,n=t):(e=t,n=k);let o,a,i,s,c,g,v=!0,y=Ne.bbox;if(null!=y){v=!1;let e=y(r,_);i=e.left,s=e.top,o=e.width,a=e.height}else i=e,s=n,o=a=Ne.size(r,_);if(g=Ne.fill(r,_),c=Ne.stroke(r,_),Pe)_==Zt&&Kt<=Te.prox&&(l=i,u=s,d=o,h=a,p=v,f=g,m=c);else{let e=De[_];null!=e&&(Oe[_]=i,Le[_]=s,_i(e,o,a,v),fi(e,g,c),hi(e,Ii(i),Ii(s),ae,ie))}}}}if(Pe){let e=Te.prox;if(ke||(null==Gt?Kt<=e:Kt>e||Zt!=Gt)){let e=De[0];Oe[0]=l,Le[0]=u,_i(e,d,h,p),fi(e,f,m),hi(e,Ii(l),Ii(u),ae,ie)}}}if(Bt.show&&jt)if(null!=e){let[t,n]=Cn.scales,[r,o]=Cn.match,[a,i]=e.cursor.sync.scales,l=e.cursor.drag;if(Ht=l._x,Vt=l._y,Ht||Vt){let l,u,d,h,p,{left:f,top:m,width:_,height:g}=e.select,v=e.scales[a].ori,y=e.posToVal,b=null!=t&&r(t,a),w=null!=n&&o(n,i);b&&Ht?(0==v?(l=f,u=_):(l=m,u=g),d=x[t],h=$(y(l,a),d,s,0),p=$(y(l+u,a),d,s,0),tn(ji(h,p),Li(p-h))):tn(0,s),w&&Vt?(1==v?(l=f,u=_):(l=m,u=g),d=x[n],h=P(y(l,i),d,c,0),p=P(y(l+u,i),d,c,0),nn(ji(h,p),Li(p-h))):nn(0,c)}else hn()}else{let e=Li(Mt-St),t=Li(Nt-Ct);if(1==N.ori){let n=e;e=t,t=n}Ht=Ft.x&&e>=Ft.dist,Vt=Ft.y&&t>=Ft.dist;let n,r,o=Ft.uni;null!=o?Ht&&Vt&&(Ht=e>=o,Vt=t>=o,Ht||Vt||(t>e?Vt=!0:Ht=!0)):Ft.x&&Ft.y&&(Ht||Vt)&&(Ht=Vt=!0),Ht&&(0==N.ori?(n=At,r=Tt):(n=Et,r=$t),tn(ji(n,r),Li(r-n)),Vt||nn(0,c)),Vt&&(1==N.ori?(n=At,r=Tt):(n=Et,r=$t),nn(ji(n,r),Li(r-n)),Ht||tn(0,s)),Ht||Vt||(tn(0,0),nn(0,0))}if(Ft._x=Ht,Ft._y=Vt,null==e){if(a){if(null!=An){let[e,t]=Cn.scales;Cn.values[0]=null!=e?Jt(0==N.ori?Tt:$t,e):null,Cn.values[1]=null!=t?Jt(1==N.ori?Tt:$t,t):null}Mn(Ya,r,Tt,$t,ae,ie,i)}if($e){let e=a&&Cn.setSeries,t=Te.prox;null==Gt?Kt<=t&&qt(Zt,Qt,!0,e):Kt>t?qt(null,Qt,!0,e):Zt!=Gt&&qt(Zt,Qt,!0,e)}}ke&&(F.idx=i,rn()),!1!==n&&xn("setCursor")}r.setLegend=rn;let ln=null;function sn(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?ln=null:(ln=m.getBoundingClientRect(),xn("syncRect",ln))}function cn(e,t,n,r,o,a,i){Ae._lock||jt&&null!=e&&0==e.movementX&&0==e.movementY||(un(e,t,n,r,o,a,i,!1,null!=e),null!=e?an(null,!0,!0):an(t,!0,!1))}function un(e,t,n,o,a,i,l,c,u){if(null==ln&&sn(!1),Me(e),null!=e)n=e.clientX-ln.left,o=e.clientY-ln.top;else{if(n<0||o<0)return Tt=-10,void($t=-10);let[e,r]=Cn.scales,l=t.cursor.sync,[c,u]=l.values,[d,h]=l.scales,[p,f]=Cn.match,m=t.axes[0].side%2==1,_=0==N.ori?ae:ie,g=1==N.ori?ae:ie,v=m?i:a,y=m?a:i,b=m?o:n,w=m?n:o;if(n=null!=d?p(e,d)?s(c,x[e],_,0):-10:_*(b/v),o=null!=h?f(r,h)?s(u,x[r],g,0):-10:g*(w/y),1==N.ori){let e=n;n=o,o=e}}u&&((n<=1||n>=ae-1)&&(n=rl(n,ae)),(o<=1||o>=ie-1)&&(o=rl(o,ie))),c?(St=n,Ct=o,[At,Et]=Ae.move(r,n,o)):(Tt=n,$t=o)}Object.defineProperty(r,"rect",{get:()=>(null==ln&&sn(!1),ln)});const dn={width:0,height:0,left:0,top:0};function hn(){Yt(dn,!1)}let pn,fn,mn,_n;function gn(e,t,n,o,a,i,l){jt=!0,Ht=Vt=Ft._x=Ft._y=!1,un(e,t,n,o,a,i,0,!0,!1),null!=e&&(te(qa,ti,vn,!1),Mn(Wa,r,At,Et,ae,ie,null));let{left:s,top:c,width:u,height:d}=Bt;pn=s,fn=c,mn=u,_n=d,hn()}function vn(e,t,n,o,a,i,l){jt=Ft._x=Ft._y=!1,un(e,t,n,o,a,i,0,!1,!0);let{left:s,top:c,width:u,height:d}=Bt,h=u>0||d>0,p=pn!=s||fn!=c||mn!=u||_n!=d;if(h&&p&&Yt(Bt),Ft.setScale&&h&&p){let e=s,t=u,n=c,r=d;if(1==N.ori&&(e=c,t=d,n=s,r=u),Ht&&Wt(C,Jt(e,C),Jt(e+t,C)),Vt)for(let o in x){let e=x[o];o!=C&&null==e.from&&e.min!=Wi&&Wt(o,Jt(n+r,o),Jt(n,o))}hn()}else Ae.lock&&(Ae._lock=!Ae._lock,an(null,!0,!1));null!=e&&(ne(qa,ti),Mn(qa,r,Tt,$t,ae,ie,null))}function yn(e,t,n,o,a,i,l){Ae._lock||(Me(e),at(),hn(),null!=e&&Mn(Ga,r,Tt,$t,ae,ie,null))}function bn(){k.forEach(Nc),xe(r.width,r.height,!0)}yi(Ja,ni,bn);const wn={};wn.mousedown=gn,wn.mousemove=cn,wn.mouseup=vn,wn.dblclick=yn,wn.setSeries=(e,t,n,o)=>{-1!=(n=(0,Cn.match[2])(r,t,n))&&qt(n,o,!0,!1)},Ae.show&&(te(Wa,m,gn),te(Ya,m,cn),te(Ka,m,(e=>{Me(e),sn(!1)})),te(Za,m,(function(e,t,n,r,o,a,i){if(Ae._lock)return;Me(e);let l=jt;if(jt){let e,t,n=!0,r=!0,o=10;0==N.ori?(e=Ht,t=Vt):(e=Vt,t=Ht),e&&t&&(n=Tt<=o||Tt>=ae-o,r=$t<=o||$t>=ie-o),e&&n&&(Tt=Tt{e.call(null,r,t,n)}))}(e.plugins||[]).forEach((e=>{for(let t in e.hooks)kn[t]=(kn[t]||[]).concat(e.hooks[t])}));const Sn=(e,t,n)=>n,Cn=wl({key:null,setSeries:!1,filters:{pub:Xi,sub:Xi},scales:[C,y[1]?y[1].scale:null],match:[el,el,Sn],values:[null,null]},Ae.sync);2==Cn.match.length&&Cn.match.push(Sn),Ae.sync=Cn;const An=Cn.key,En=Vs(An);function Mn(e,t,n,r,o,a,i){Cn.filters.pub(e,t,n,r,o,a,i)&&En.pub(e,t,n,r,o,a,i)}function Nn(){xn("init",e,t),ot(t||e.data,!1),D[C]?It(C,D[C]):at(),we=Bt.show&&(Bt.width>0||Bt.height>0),be=ke=!0,xe(e.width,e.height)}return En.sub(r),r.pub=function(e,t,n,r,o,a,i){Cn.filters.sub(e,t,n,r,o,a,i)&&wn[e](null,t,n,r,o,a,i)},r.destroy=function(){En.unsub(r),fc.delete(r),ee.clear(),bi(Ja,ni,bn),u.remove(),B?.remove(),xn("destroy")},y.forEach(ze),k.forEach((function(e,t){if(e._show=e.show,e.show){let n=e.side%2,o=x[e.scale];null==o&&(e.scale=n?y[1].scale:C,o=x[e.scale]);let a=o.time;e.size=Zi(e.size),e.space=Zi(e.space),e.rotate=Zi(e.rotate),pl(e.incrs)&&e.incrs.forEach((e=>{!ll.has(e)&&ll.set(e,sl(e))})),e.incrs=Zi(e.incrs||(2==o.distr?Il:a?1==v?Ql:es:jl)),e.splits=Zi(e.splits||(a&&1==o.distr?R:3==o.distr?xs:4==o.distr?Ss:ks)),e.stroke=Zi(e.stroke),e.grid.stroke=Zi(e.grid.stroke),e.ticks.stroke=Zi(e.ticks.stroke),e.border.stroke=Zi(e.border.stroke);let i=e.values;e.values=pl(i)&&!pl(i[0])?Zi(i):a?pl(i)?os(O,rs(i,L)):ml(i)?function(e,t){let n=Pl(t);return(t,r,o,a,i)=>r.map((t=>n(e(t))))}(O,i):i||z:i||ws,e.filter=Zi(e.filter||(o.distr>=3&&10==o.log?Ts:3==o.distr&&2==o.log?$s:Qi)),e.font=Mc(e.font),e.labelFont=Mc(e.labelFont),e._size=e.size(r,null,t,0),e._space=e._rotate=e._incrs=e._found=e._splits=e._values=null,e._size>0&&(Ie[t]=!0,e._el=ui("u-axis",p))}})),n?n instanceof HTMLElement?(n.appendChild(u),Nn()):n(r,Nn):Nn(),r}Tc.assign=wl,Tc.fmtNum=Pi,Tc.rangeNum=Mi,Tc.rangeLog=xi,Tc.rangeAsinh=Si,Tc.orient=Bs,Tc.pxRatio=oi,Tc.join=function(e,t){if(function(e){let t=e[0][0],n=t.length;for(let r=1;r1&&void 0!==arguments[1]?arguments[1]:100;const n=e.length;if(n<=1)return!0;let r=0,o=n-1;for(;r<=o&&null==e[r];)r++;for(;o>=r&&null==e[o];)o--;if(o<=r)return!0;const a=Fi(1,Ri((o-r+1)/t));for(let i=e[r],l=r+a;l<=o;l+=a){const t=e[l];if(null!=t){if(t<=i)return!1;i=t}}return!0}(t[0])||(t=function(e){let t=e[0],n=t.length,r=Array(n);for(let a=0;at[e]-t[n]));let o=[];for(let a=0;ae-t))],o=r[0].length,a=new Map;for(let i=0;iBs(e,a,((s,c,u,d,h,p,f,m,_,g,v)=>{let y=s.pxRound,{left:b,width:w}=e.bbox,k=e=>y(p(e,d,g,m)),x=e=>y(f(e,h,v,_)),S=0==d.ori?Xs:ec;const C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},A=C.stroke,E=d.dir*(0==d.ori?1:-1);i=ki(u,i,l,1),l=ki(u,i,l,-1);let M=x(u[1==E?i:l]),N=k(c[1==E?i:l]),T=N,$=N;o&&-1==t&&($=b,S(A,$,M)),S(A,N,M);for(let e=1==E?i:l;e>=i&&e<=l;e+=E){let n=u[e];if(null==n)continue;let r=k(c[e]),o=x(n);1==t?S(A,r,M):S(A,T,o),S(A,r,o),M=o,T=r}let P=T;o&&1==t&&(P=b+w,S(A,P,M));let[D,O]=Us(e,a);if(null!=s.fill||0!=D){let t=C.fill=new Path2D(A),n=x(s.fillTo(e,a,s.min,s.max,D));S(t,P,n),S(t,$,n)}if(!s.spanGaps){let o=[];o.push(...Ks(c,u,i,l,E,k,r));let h=s.width*oi/2,p=n||1==t?h:-h,f=n||-1==t?-h:h;o.forEach((e=>{e[0]+=p,e[1]+=f})),C.gaps=o=s.gaps(e,a,i,l,o),C.clip=qs(o,d.ori,m,_,g,v)}return 0!=O&&(C.band=2==O?[Ws(e,a,i,l,A,-1),Ws(e,a,i,l,A,1)]:Ws(e,a,i,l,A,O)),C}))},e.bars=function(e){const t=Ni((e=e||ul).size,[.6,Wi,1]),n=e.align||0,r=e.gap||0;let o=e.radius;o=null==o?[0,0]:"number"==typeof o?[o,0]:o;const a=Zi(o),i=1-t[0],l=Ni(t[1],Wi),s=Ni(t[2],1),c=Ni(e.disp,ul),u=Ni(e.each,(e=>{})),{fill:d,stroke:h}=c;return(e,t,o,p)=>Bs(e,t,((f,m,_,g,v,y,b,w,k,x,S)=>{let C,A,E=f.pxRound,M=n,N=r*oi,T=l*oi,$=s*oi;0==g.ori?[C,A]=a(e,t):[A,C]=a(e,t);const P=g.dir*(0==g.ori?1:-1);let D,O,L,R=0==g.ori?tc:nc,z=0==g.ori?u:(e,t,n,r,o,a,i)=>{u(e,t,n,o,r,i,a)},I=Ni(e.bands,dl).find((e=>e.series[0]==t)),j=null!=I?I.dir:0,F=f.fillTo(e,t,f.min,f.max,j),H=E(b(F,v,S,k)),V=x,B=E(f.width*oi),U=!1,Y=null,W=null,q=null,K=null;null==d||0!=B&&null==h||(U=!0,Y=d.values(e,t,o,p),W=new Map,new Set(Y).forEach((e=>{null!=e&&W.set(e,new Path2D)})),B>0&&(q=h.values(e,t,o,p),K=new Map,new Set(q).forEach((e=>{null!=e&&K.set(e,new Path2D)}))));let{x0:Z,size:G}=c;if(null!=Z&&null!=G){M=1,m=Z.values(e,t,o,p),2==Z.unit&&(m=m.map((t=>e.posToVal(w+t*x,g.key,!0))));let n=G.values(e,t,o,p);O=2==G.unit?n[0]*x:y(n[0],g,x,w)-y(0,g,x,w),V=hc(m,_,y,g,x,w,V),L=V-O+N}else V=hc(m,_,y,g,x,w,V),L=V*i+N,O=V-L;L<1&&(L=0),B>=O/2&&(B=0),L<5&&(E=Gi);let Q=L>0;O=E(Ki(V-L-(Q?B:0),$,T)),D=(0==M?O/2:M==P?0:O)-M*P*((0==M?N/2:0)+(Q?B/2:0));const J={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},X=U?null:new Path2D;let ee=null;if(null!=I)ee=e.data[I.series[1]];else{let{y0:n,y1:r}=c;null!=n&&null!=r&&(_=r.values(e,t,o,p),ee=n.values(e,t,o,p))}let te=C*O,ne=A*O;for(let n=1==P?o:p;n>=o&&n<=p;n+=P){let r=_[n];if(null==r)continue;if(null!=ee){var re;let e=null!==(re=ee[n])&&void 0!==re?re:0;if(r-e==0)continue;H=b(e,v,S,k)}let o=y(2!=g.distr||null!=c?m[n]:n,g,x,w),a=b(Ni(r,F),v,S,k),i=E(o-D),l=E(Fi(a,H)),s=E(ji(a,H)),u=l-s;if(null!=r){let o=r<0?ne:te,a=r<0?te:ne;U?(B>0&&null!=q[n]&&R(K.get(q[n]),i,s+Ri(B/2),O,Fi(0,u-B),o,a),null!=Y[n]&&R(W.get(Y[n]),i,s+Ri(B/2),O,Fi(0,u-B),o,a)):R(X,i,s+Ri(B/2),O,Fi(0,u-B),o,a),z(e,t,n,i-B/2,s,O+B,u)}}if(B>0)J.stroke=U?K:X;else if(!U){var oe;J._fill=0==f.width?f._fill:null!==(oe=f._stroke)&&void 0!==oe?oe:f._fill,J.width=0}return J.fill=U?W:X,J}))},e.spline=function(e){return function(e,t){const n=Ni(t?.alignGaps,0);return(t,r,o,a)=>Bs(t,r,((i,l,s,c,u,d,h,p,f,m,_)=>{let g,v,y,b=i.pxRound,w=e=>b(d(e,c,m,p)),k=e=>b(h(e,u,_,f));0==c.ori?(g=Qs,y=Xs,v=ac):(g=Js,y=ec,v=ic);const x=c.dir*(0==c.ori?1:-1);o=ki(s,o,a,1),a=ki(s,o,a,-1);let S=w(l[1==x?o:a]),C=S,A=[],E=[];for(let e=1==x?o:a;e>=o&&e<=a;e+=x)if(null!=s[e]){let t=w(l[e]);A.push(C=t),E.push(k(s[e]))}const M={stroke:e(A,E,g,y,v,b),fill:null,clip:null,band:null,gaps:null,flags:1},N=M.stroke;let[T,$]=Us(t,r);if(null!=i.fill||0!=T){let e=M.fill=new Path2D(N),n=k(i.fillTo(t,r,i.min,i.max,T));y(e,C,n),y(e,S,n)}if(!i.spanGaps){let e=[];e.push(...Ks(l,s,o,a,x,w,n)),M.gaps=e=i.gaps(t,r,o,a,e),M.clip=qs(e,c.ori,p,f,m,_)}return 0!=$&&(M.band=2==$?[Ws(t,r,o,a,N,-1),Ws(t,r,o,a,N,1)]:Ws(t,r,o,a,N,$)),M}))}(pc,e)}}const $c=(e,t,n)=>{if(void 0===e||null===e)return"";n=n||0,t=t||0;const r=Math.abs(n-t);if(isNaN(r)||0==r)return Math.abs(e)>=1e3?e.toLocaleString("en-US"):e.toString();let o=3+Math.floor(1+Math.log10(Math.max(Math.abs(t),Math.abs(n)))-Math.log10(r));return(isNaN(o)||o>20)&&(o=20),e.toLocaleString("en-US",{minimumSignificantDigits:1,maximumSignificantDigits:o})},Pc=[[31536e3,"{YYYY}",null,null,null,null,null,null,1],[2419200,"{MMM}","\n{YYYY}",null,null,null,null,null,1],[86400,"{MM}-{DD}","\n{YYYY}",null,null,null,null,null,1],[3600,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[60,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[1,"{HH}:{mm}:{ss}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD} {HH}:{mm}",null,null,null,1],[.001,":{ss}.{fff}","\n{YYYY}-{MM}-{DD} {HH}:{mm}",null,"\n{MM}-{DD} {HH}:{mm}",null,"\n{HH}:{mm}",null,1]],Dc=(e,t)=>Array.from(new Set(e.map((e=>e.scale)))).map((e=>{const n="10px Arial",r=it("color-text"),o={scale:e,show:!0,size:Oc,stroke:r,font:n,values:(e,n)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=t[0],o=t[t.length-1];return n?t.map((e=>`${$c(e,r,o)} ${n}`)):t.map((e=>$c(e,r,o)))}(e,n,t)};return e?Number(e)%2||"y"===e?o:{...o,side:1}:{space:80,values:Pc,stroke:r,font:n}})),Oc=(e,t,n,r)=>{var o;const a=e.axes[n];if(r>1)return a._size||60;let i=6+((null===a||void 0===a||null===(o=a.ticks)||void 0===o?void 0:o.size)||0)+(a.gap||0);const l=(null!==t&&void 0!==t?t:[]).reduce(((e,t)=>(null===t||void 0===t?void 0:t.length)>e.length?t:e),"");return""!=l&&(i+=((e,t)=>{const n=document.createElement("span");n.innerText=e,n.style.cssText=`position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ${t}`,document.body.appendChild(n);const r=n.offsetWidth;return n.remove(),r})(l,"10px Arial")),Math.ceil(i)},Lc=(((e,t,n)=>{const r=[];for(let o=0;oMath.round(e))).join(", "))}r.map((e=>`rgb(${e})`))})([246,226,219],[127,39,4],16),e=>{for(let t=e.series.length-1;t>=0;t--)t&&e.delSeries(t)}),Rc=e=>{Lc(e),(e=>{Object.keys(e.hooks).forEach((t=>{e.hooks[t]=[]}))})(e),e.setData([])},zc=e=>t=>{const n=t.posToVal(t.select.left,"x"),r=t.posToVal(t.select.left+t.select.width,"x");e({min:n,max:r})};function Ic(e){return`rgba(${Cr(Ar[e])}, 0.05)`}let jc=function(e){return e.BAR="Bars",e.LINE="Lines",e.LINE_STEPPED="Stepped lines",e.POINTS="Points",e}({});const Fc=(e,t,n,r)=>{var o,a;const i=e.under.clientWidth/100-1,l=null===Tc||void 0===Tc||null===(o=Tc.paths)||void 0===o||null===(a=o.bars)||void 0===a?void 0:a.call(o,{size:[.96,i]});return l?l(e,t,n,r):null},Hc=(e,t,n,r)=>{var o,a;const i=null===Tc||void 0===Tc||null===(o=Tc.paths)||void 0===o||null===(a=o.stepped)||void 0===a?void 0:a.call(o,{align:1});return i?i(e,t,n,r):null},Vc=e=>{switch(e){case jc.BAR:return Fc;case jc.LINE_STEPPED:return Hc;default:return}},Bc=["color-log-hits-bar-1","color-log-hits-bar-2","color-log-hits-bar-3","color-log-hits-bar-4","color-log-hits-bar-5"],Uc={[jc.BAR]:1,[jc.LINE_STEPPED]:2,[jc.LINE]:1.2,[jc.POINTS]:0},Yc=e=>{let{data:n,logHits:r,xRange:a,bands:i,containerSize:l,onReadyChart:s,setPlotScale:c,graphOptions:u}=e;const{isDarkTheme:d}=gt(),[h,p]=(0,t.useState)(-1),f=e=>{var t;const n=null!==(t=e.cursor.idx)&&void 0!==t?t:-1;p(n)},m=(0,t.useMemo)((()=>{let e=0;return n.map(((t,n)=>{var o;if(0===n)return{};const a=Object.values((null===r||void 0===r||null===(o=r[n-1])||void 0===o?void 0:o.fields)||{}).map((e=>e||'""')).join(", "),i=it(a?Bc[e]:"color-log-hits-bar-0");return a&&e++,{label:a||"other",width:Uc[u.graphStyle],spanGaps:!0,stroke:i,fill:u.fill?i+"80":"",paths:Vc(u.graphStyle)}}))}),[d,n,u]),_=(0,t.useMemo)((()=>({series:m,bands:i,width:l.width||window.innerWidth/2,height:l.height||200,cursor:{points:{width:(e,t,n)=>n/4,size:(e,t)=>{var n,r,o;return 1.5*((null===(n=e.series)||void 0===n||null===(r=n[t])||void 0===r||null===(o=r.points)||void 0===o?void 0:o.size)||1)},stroke:(e,t)=>{var n;return`${(null===m||void 0===m||null===(n=m[t])||void 0===n?void 0:n.stroke)||"#ffffff"}`},fill:()=>"#ffffff"}},scales:{x:{time:!0,range:()=>[a.min,a.max]}},hooks:{drawSeries:[],ready:[s],setCursor:[f],setSelect:[zc(c)],destroy:[Rc]},legend:{show:!1},axes:Dc([{},{scale:"y"}]),tzDate:e=>o()(Rt(It(e))).local().toDate()})),[d,m,i]);return{options:_,series:m,focusDataIdx:h}},Wc=e=>o()(1e3*e).tz().format(wt),qc=e=>{let{data:n,focusDataIdx:r,uPlotInst:o}=e;const a=(0,t.useRef)(null),i=(0,t.useMemo)((()=>{var e,t;const a=(null===o||void 0===o?void 0:o.series)||[],[i,...l]=n.map((e=>e[r]||0)),s=i+(n[0][1]-n[0][0]),c=l.map(((e,t)=>{var n;const r=a[t+1],o=null===r||void 0===r||null===(n=r.stroke)||void 0===n?void 0:n.call(r);return{label:(null===r||void 0===r?void 0:r.label)||"other",stroke:o,value:e,show:null===r||void 0===r?void 0:r.show}})).filter((e=>e.value>0&&e.show)).sort(((e,t)=>t.value-e.value));return{point:{top:c[0]&&(null===o||void 0===o||null===(e=o.valToPos)||void 0===e?void 0:e.call(o,c[0].value,"y"))||0,left:(null===o||void 0===o||null===(t=o.valToPos)||void 0===t?void 0:t.call(o,i,"x"))||0},values:c,total:c.reduce(((e,t)=>e+t.value),0),timestamp:`${Wc(i)} - ${Wc(s)}`}}),[r,o,n]),l=(0,t.useMemo)((()=>{if(!o||!i.total||!a.current)return;const{top:e,left:t}=i.point,n=parseFloat(o.over.style.left),r=parseFloat(o.over.style.top),{width:l,height:s}=o.over.getBoundingClientRect(),{width:c,height:u}=a.current.getBoundingClientRect(),d={top:e+r+50-(e+u>=s?u+100:0),left:t+n+50-(t+c>=l?c+100:0)};return d.left<0&&(d.left=20),d.top<0&&(d.top=20),d}),[i,o,a.current]);return mt("div",{className:Qn()({"vm-chart-tooltip":!0,"vm-chart-tooltip_hits":!0,"vm-bar-hits-tooltip":!0,"vm-bar-hits-tooltip_visible":-1!==r&&i.values.length}),ref:a,style:l,children:[mt("div",{children:i.values.map(((e,t)=>mt("div",{className:"vm-chart-tooltip-data",children:[mt("span",{className:"vm-chart-tooltip-data__marker",style:{background:e.stroke}}),mt("p",{children:[e.label,": ",mt("b",{children:e.value})]})]},t)))}),i.values.length>1&&mt("div",{className:"vm-chart-tooltip-data",children:mt("p",{children:["Total records: ",mt("b",{children:i.total})]})}),mt("div",{className:"vm-chart-tooltip-header",children:mt("div",{className:"vm-chart-tooltip-header__title",children:i.timestamp})})]})},Kc=e=>{let{period:n,setPeriod:r}=e;const[a,i]=(0,t.useState)({min:n.start,max:n.end});return(0,t.useEffect)((()=>{i({min:n.start,max:n.end})}),[n]),{xRange:a,setPlotScale:e=>{let{min:t,max:n}=e;const a=1e3*(n-t);aAt||r({from:o()(1e3*t).toDate(),to:o()(1e3*n).toDate()})}}},Zc=e=>(e=>e instanceof MouseEvent)(e)?e.clientX:e.touches[0].clientX,Gc=e=>{let{dragSpeed:n=.85,setPanning:r,setPlotScale:o}=e;const a=(0,t.useRef)({leftStart:0,xUnitsPerPx:0,scXMin:0,scXMax:0}),i=e=>{e.preventDefault();const t=Zc(e),{leftStart:r,xUnitsPerPx:i,scXMin:l,scXMax:s}=a.current,c=i*((t-r)*n);o({min:l-c,max:s-c})},l=()=>{r(!1),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",l),document.removeEventListener("touchmove",i),document.removeEventListener("touchend",l)};return e=>{let{e:t,u:n}=e;t.preventDefault(),r(!0),a.current={leftStart:Zc(t),xUnitsPerPx:n.posToVal(1,"x")-n.posToVal(0,"x"),scXMin:n.scales.x.min||0,scXMax:n.scales.x.max||0},document.addEventListener("mousemove",i),document.addEventListener("mouseup",l),document.addEventListener("touchmove",i),document.addEventListener("touchend",l)}},Qc=e=>{const[n,r]=(0,t.useState)(!1),o=Gc({dragSpeed:.9,setPanning:r,setPlotScale:e});return{onReadyChart:t=>{const n=e=>{const n=e instanceof MouseEvent&&(e=>{const{ctrlKey:t,metaKey:n,button:r}=e;return 0===r&&(t||n)})(e),r=window.TouchEvent&&e instanceof TouchEvent&&e.touches.length>1;(n||r)&&o({u:t,e:e})};t.over.addEventListener("mousedown",n),t.over.addEventListener("touchstart",n),t.over.addEventListener("wheel",(n=>{if(!n.ctrlKey&&!n.metaKey)return;n.preventDefault();const{width:r}=t.over.getBoundingClientRect(),o=t.cursor.left&&t.cursor.left>0?t.cursor.left:0,a=t.posToVal(o,"x"),i=(t.scales.x.max||0)-(t.scales.x.min||0),l=n.deltaY<0?.9*i:i/.9,s=a-o/r*l,c=s+l;t.batch((()=>e({min:s,max:c})))}))},isPanning:n}},Jc=e=>{const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)},Xc=e=>{let{uPlotInst:n,xRange:r,setPlotScale:o}=e;const[a,i]=(0,t.useState)(0),l=(0,t.useCallback)((e=>{const{target:t,ctrlKey:a,metaKey:i,key:l}=e,s=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;if(!n||s)return;const c="+"===l||"="===l;if(("-"===l||c)&&!(a||i)){e.preventDefault();const t=(r.max-r.min)/10*(c?1:-1);o({min:r.min+t,max:r.max-t})}}),[n,r]),s=(0,t.useCallback)((e=>{if(!n||2!==e.touches.length)return;e.preventDefault();const t=Jc(e.touches),i=a-t,l=n.scales.x.max||r.max,s=n.scales.x.min||r.min,c=(l-s)/50*(i>0?-1:1);n.batch((()=>o({min:s+c,max:l-c})))}),[n,a,r]);return er("keydown",l),er("touchmove",s),er("touchstart",(e=>{2===e.touches.length&&(e.preventDefault(),i(Jc(e.touches)))})),null},eu=e=>{let{onChange:n}=e;const[r,o]=je(),a=(0,t.useRef)(null),{value:i,toggle:l,setFalse:s}=Fr(!1),[c,u]=Lr(jc.LINE_STEPPED,"graph"),[d,h]=Lr(!1,"stacked"),[p,f]=Lr(!1,"fill"),[m,_]=Lr(!1,"hide_chart"),g=(0,t.useMemo)((()=>({graphStyle:c,stacked:d,fill:p,hideChart:m})),[c,d,p,m]);return(0,t.useEffect)((()=>{n(g)}),[g]),mt("div",{className:"vm-bar-hits-options",children:[mt(Ir,{title:m?"Show chart and resume hits updates":"Hide chart and pause hits updates",children:mt(Dr,{variant:"text",color:"primary",startIcon:mt(m?Dn:Pn,{}),onClick:()=>{_((e=>{const t=!e;return t?r.set("hide_chart","true"):r.delete("hide_chart"),o(r),t}))},ariaLabel:"settings"})}),mt("div",{ref:a,children:mt(Ir,{title:"Graph settings",children:mt(Dr,{variant:"text",color:"primary",startIcon:mt(pn,{}),onClick:l,ariaLabel:"settings"})})}),mt(Xr,{open:i,placement:"bottom-right",onClose:s,buttonRef:a,title:"Graph settings",children:mt("div",{className:"vm-bar-hits-options-settings",children:[mt("div",{className:"vm-bar-hits-options-settings-item vm-bar-hits-options-settings-item_list",children:[mt("p",{className:"vm-bar-hits-options-settings-item__title",children:"Graph style:"}),Object.values(jc).map((e=>{return mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_active":c===e}),onClick:(t=e,()=>{u(t),r.set("graph",t),o(r)}),children:e},e);var t}))]}),mt("div",{className:"vm-bar-hits-options-settings-item",children:mt(jr,{label:"Stacked",value:d,onChange:e=>{h(e),e?r.set("stacked","true"):r.delete("stacked"),o(r)}})}),mt("div",{className:"vm-bar-hits-options-settings-item",children:mt(jr,{label:"Fill",value:p,onChange:e=>{f(e),e?r.set("fill","true"):r.delete("fill"),o(r)}})})]})})]})};const tu=function(e,t){const n=[];let r=[];const o=e[0].length,a=Array(o);for(let i=0;ia[t]+=+(null!==e&&void 0!==e?e:0))));for(let i=1;in>i&&!t(n))),i]});return r=r.filter((e=>e.series[1]>-1)),{data:[e[0]].concat(n),bands:r}},nu=e=>{let{uPlotInst:n,onApplyFilter:r}=e;const[o,a]=(0,t.useState)([]),[i,l]=(0,t.useState)([]),s=(0,t.useCallback)((()=>{const e=n.series.filter((e=>"x"!==e.scale));a(e),l(e.map((e=>eo(e.label||""))))}),[n]),c=e=>t=>{(t.metaKey||t.ctrlKey)&&(r(`{${e}}`||""),s(),n.redraw())};return(0,t.useEffect)(s,[n]),mt("div",{className:"vm-bar-hits-legend",children:o.map(((e,t)=>{var r,o;return mt(Ir,{title:mt("ul",{className:"vm-bar-hits-legend-info",children:[mt("li",{children:["Click to ",e.show?"hide":"show"," the _stream."]}),mt("li",{children:[yr()?"Cmd":"Ctrl"," + Click to filter by the _stream."]})]}),children:mt("div",{className:Qn()({"vm-bar-hits-legend-item":!0,"vm-bar-hits-legend-item_hide":!e.show}),onClick:(o=e,e=>{e.metaKey||e.ctrlKey||(o.show=!o.show,s(),n.redraw())}),children:[mt("div",{className:"vm-bar-hits-legend-item__marker",style:{backgroundColor:`${null===e||void 0===e||null===(r=e.stroke)||void 0===r?void 0:r.call(e)}`}}),mt("div",{className:"vm-bar-hits-legend-item-pairs",children:i[t].map((e=>mt("span",{className:"vm-bar-hits-legend-item-pairs__value",onClick:c(e),children:e},e)))})]})},e.label)}))})},ru=e=>{let{logHits:n,data:r,period:o,setPeriod:a,onApplyFilter:i}=e;const[l,s]=Oa(),c=(0,t.useRef)(null),[u,d]=(0,t.useState)(),[h,p]=(0,t.useState)({graphStyle:jc.LINE_STEPPED,stacked:!1,fill:!1,hideChart:!1}),{xRange:f,setPlotScale:m}=Kc({period:o,setPeriod:a}),{onReadyChart:_,isPanning:g}=Qc(m);Xc({uPlotInst:u,xRange:f,setPlotScale:m});const v=(0,t.useMemo)((()=>r.every((e=>0===e.length))),[r]),{data:y,bands:b}=(0,t.useMemo)((()=>h.stacked?tu(r,(()=>!1)):{data:r,bands:[]}),[h,r]),{options:w,series:k,focusDataIdx:x}=Yc({data:y,logHits:n,bands:b,xRange:f,containerSize:s,onReadyChart:_,setPlotScale:m,graphOptions:h});return(0,t.useEffect)((()=>{u&&(Lc(u),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(((t,r)=>{t.label&&(t.spanGaps=n),r&&e.addSeries(t)}))}(u,k,!0),((e,t)=>{if(e.delBand(),t.length<2)return;const n=t.map(((e,t)=>({...e,index:t}))),r=n.filter((e=>e.forecast===tt.yhatUpper)),o=n.filter((e=>e.forecast===tt.yhatLower)),a=r.map((e=>{const t=o.find((t=>t.forecastGroup===e.forecastGroup));return t?{series:[e.index,t.index],fill:Ic(tt.yhatUpper)}:null})).filter((e=>null!==e));a.length&&a.forEach((t=>{e.addBand(t)}))})(u,k),u.redraw())}),[k]),(0,t.useEffect)((()=>{if(!c.current)return;const e=new Tc(w,y,c.current);return d(e),()=>e.destroy()}),[c.current,w]),(0,t.useEffect)((()=>{u&&(u.scales.x.range=()=>[f.min,f.max],u.redraw())}),[f]),(0,t.useEffect)((()=>{u&&(u.setSize(s),u.redraw())}),[s]),(0,t.useEffect)((()=>{u&&(u.setData(y),u.redraw())}),[y]),mt("div",{className:Qn()({"vm-bar-hits-chart__wrapper":!0,"vm-bar-hits-chart__wrapper_hidden":h.hideChart}),children:[!h.hideChart&&mt("div",{className:Qn()({"vm-bar-hits-chart":!0,"vm-bar-hits-chart_panning":g}),ref:l,children:[mt("div",{className:"vm-line-chart__u-plot",ref:c}),mt(qc,{uPlotInst:u,data:r,focusDataIdx:x})]}),mt(eu,{onChange:p}),u&&!v&&!h.hideChart&&mt(nu,{uPlotInst:u,onApplyFilter:i})]})},ou=e=>{let{logHits:n,period:r,error:a,isLoading:i,onApplyFilter:l}=e;const{isMobile:s}=br(),c=Qt(),[u]=je(),d=(0,t.useMemo)((()=>u.get("hide_chart")),[u]),h=(0,t.useCallback)((e=>{const t=[],{start:n,end:o,step:a}=to(r),i=Math.ceil(n.diff(e,"milliseconds")/a);let l=e.add(i*a,"milliseconds");l.isBefore(n)&&(l=n.clone());const s=Math.floor(o.diff(l,"milliseconds")/a);for(let r=0;r<=s;r++)t.push(l.add(r*a,"milliseconds").unix());return t}),[r]),p=(0,t.useMemo)((()=>{if(!n.length)return[[],[]];const e=h(o()(n[0].timestamps[0])),t=((e,t)=>e.map((e=>{const n=new Map;return e.timestamps.forEach(((t,r)=>{const a=o()(t).unix();n.set(a,e.values[r]||null)})),t.map((e=>n.get(e)||null))})))(n,e);return[e,...t]}),[n]),f=(0,t.useMemo)((()=>{const e=p.every((e=>0===e.length)),t=0===p[0].length,n=0===p[1].length;return d?"Chart hidden. Hits updates paused.":e?"No logs volume available\nNo volume information available for the current queries and time range.":t?"No timestamp information available for the current queries and time range.":n?"No value information available for the current queries and time range.":""}),[p,d]);return mt("section",{className:Qn()({"vm-explore-logs-chart":!0,"vm-block":!0,"vm-block_mobile":s}),children:[i&&mt(ha,{}),!a&&f&&mt("div",{className:"vm-explore-logs-chart__empty",children:mt(kr,{variant:"info",children:f})}),a&&f&&mt("div",{className:"vm-explore-logs-chart__empty",children:mt(kr,{variant:"error",children:a})}),p&&mt(ru,{logHits:n,data:p,period:r,setPeriod:e=>{let{from:t,to:n}=e;c({type:"SET_PERIOD",payload:{from:t,to:n}})},onApplyFilter:l})]})},au=(e,n)=>{const[r]=je(),[o,a]=(0,t.useState)([]),[i,l]=(0,t.useState)([]),[s,c]=(0,t.useState)(),u=(0,t.useRef)(new AbortController),d=(0,t.useMemo)((()=>(e=>`${e}/select/logsql/hits`)(e)),[e]),h=(e,t)=>(e.total=(e.total||0)+(t.total||0),t.timestamps.forEach(((n,r)=>{const o=e.timestamps.findIndex((e=>e===n));-1===o?(e.timestamps.push(n),e.values.push(t.values[r])):e.values[o]+=t.values[r]})),e),p=(0,t.useCallback)((async e=>{u.current.abort(),u.current=new AbortController;const{signal:t}=u.current,o=Date.now();l((e=>({...e,[o]:!0}))),c(void 0);try{const i=((e,t,n)=>{const{start:o,end:a,step:i}=to(t);return{signal:n,method:"POST",headers:{AccountID:r.get("accountID")||"0",ProjectID:r.get("projectID")||"0"},body:new URLSearchParams({query:e.trim(),step:`${i}ms`,start:o.toISOString(),end:a.toISOString(),field:"_stream"})}})(n,e,t),s=await fetch(d,i);if(!s.ok||!s.body){const e=await s.text();return c(e),a([]),void l((e=>({...e,[o]:!1})))}const u=await s.json(),p=null===u||void 0===u?void 0:u.hits;if(!p){c("Error: No 'hits' field in response")}a(p?(e=>{const t=e.sort(((e,t)=>(t.total||0)-(e.total||0))),n=[],r=t.slice(5).reduce(h,{fields:{},timestamps:[],values:[],total:0});r.total&&n.push(r);const o=t.slice(0,5);return o.length&&n.push(...o),n})(p):[])}catch(Id){Id instanceof Error&&"AbortError"!==Id.name&&(c(String(Id)),console.error(Id),a([]))}l((e=>({...e,[o]:!1})))}),[d,n,r]);return{logHits:o,isLoading:Object.values(i).some((e=>e)),error:s,fetchLogHits:p,abortController:u.current}},iu=Number(We("LOGS_LIMIT")),lu=isNaN(iu)?50:iu,su=()=>{const{serverUrl:e}=gt(),{duration:n,relativeTime:r,period:o}=Gt(),{setSearchParamsFromKeys:a}=Rr(),[i]=je(),l=(0,t.useMemo)((()=>i.get("hide_chart")),[i]),[s,c]=Lr(lu,"limit"),[u,d]=Lr("*","query"),[h,p]=(0,t.useState)(!1),[f,m]=(0,t.useState)(o),[_,g]=(0,t.useState)(""),{logs:v,isLoading:y,error:b,fetchLogs:w,abortController:k}=_a(e,u,s),{fetchLogHits:x,...S}=au(e,u),C=(0,t.useCallback)((()=>{const e=Ft.find((e=>e.id===r));if(!e)return o;const{duration:t,until:n}=e;return Ot(t,n())}),[o,r]),A=()=>{if(!u)return void g(rt.validQuery);g("");const e=C();m(e),w(e).then((t=>{t&&!l&&x(e)})).catch((e=>e)),a({query:u,"g0.range_input":n,"g0.end_input":e.date,"g0.relative_time":r||"none"})};return(0,t.useEffect)((()=>{u&&A()}),[o]),(0,t.useEffect)((()=>{h&&(A(),p(!1))}),[u,h]),(0,t.useEffect)((()=>{!l&&x(f)}),[l]),mt("div",{className:"vm-explore-logs",children:[mt(Da,{query:u,error:_,limit:s,onChange:d,onChangeLimit:e=>{c(e),a({limit:e}),Ye("LOGS_LIMIT",`${e}`)},onRun:()=>{y||S.isLoading?(k.abort&&k.abort(),S.abortController.abort&&S.abortController.abort()):A()},isLoading:y||S.isLoading}),b&&mt(kr,{variant:"error",children:b}),!b&&mt(ou,{...S,query:u,period:f,onApplyFilter:e=>{d((t=>`_stream: ${"other"===e?"{}":e} AND (${t})`)),p(!0)}}),mt(ma,{data:v,isLoading:y})]})},cu={home:"/",metrics:"/metrics",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries",trace:"/trace",withTemplate:"/expand-with-exprs",relabel:"/relabeling",logs:"/logs",activeQueries:"/active-queries",queryAnalyzer:"/query-analyzer",icons:"/icons",anomaly:"/anomaly",query:"/query",downsamplingDebug:"/downsampling-filters-debug",retentionDebug:"/retention-filters-debug"},{REACT_APP_TYPE:uu}={REACT_APP_TYPE:"logs"},du=uu===Ue.logs,hu={header:{tenant:!0,stepControl:!du,timeSelector:!du,executionControls:!du}},pu={[cu.home]:{title:"Query",...hu},[cu.metrics]:{title:"Explore Prometheus metrics",header:{tenant:!0,stepControl:!0,timeSelector:!0}},[cu.cardinality]:{title:"Explore cardinality",header:{tenant:!0,cardinalityDatePicker:!0}},[cu.topQueries]:{title:"Top queries",header:{tenant:!0}},[cu.trace]:{title:"Trace analyzer",header:{}},[cu.queryAnalyzer]:{title:"Query analyzer",header:{}},[cu.dashboards]:{title:"Dashboards",...hu},[cu.withTemplate]:{title:"WITH templates",header:{}},[cu.relabel]:{title:"Metric relabel debug",header:{}},[cu.logs]:{title:"Logs Explorer",header:{}},[cu.activeQueries]:{title:"Active Queries",header:{}},[cu.icons]:{title:"Icons",header:{}},[cu.anomaly]:{title:"Anomaly exploration",...hu},[cu.query]:{title:"Query",...hu},[cu.downsamplingDebug]:{title:"Downsampling filters debug",header:{}},[cu.retentionDebug]:{title:"Retention filters debug",header:{}}},fu=cu;let mu=function(e){return e[e.internalLink=0]="internalLink",e[e.externalLink=1]="externalLink",e}({});const _u=(e,t)=>({label:"Alerts",value:`${e}/vmalert`,type:mu.externalLink,hide:!t}),gu=e=>[{value:fu.trace},{value:fu.queryAnalyzer},{value:fu.withTemplate},{value:fu.relabel},{value:fu.downsamplingDebug,hide:!e},{value:fu.retentionDebug,hide:!e}],vu=e=>{let{activeMenu:t,label:n,value:r,type:o,color:a}=e;return o===mu.externalLink?mt("a",{className:Qn()({"vm-header-nav-item":!0,"vm-header-nav-item_active":t===r}),style:{color:a},href:r,target:"_blank",rel:"noreferrer",children:n}):mt(Le,{className:Qn()({"vm-header-nav-item":!0,"vm-header-nav-item_active":t===r}),style:{color:a},to:r,children:n})},yu=e=>{let{activeMenu:n,label:r,color:o,background:a,submenu:i,direction:l}=e;const{pathname:s}=ne(),[c,u]=(0,t.useState)(null),d=(0,t.useRef)(null),{value:h,setFalse:p,setTrue:f}=Fr(!1),m=()=>{c&&clearTimeout(c);const e=setTimeout(p,300);u(e)};return(0,t.useEffect)((()=>{p()}),[s]),"column"===l?mt(pt.FK,{children:i.map((e=>mt(vu,{activeMenu:n,value:e.value||"",label:e.label||"",type:e.type||mu.internalLink},e.value)))}):mt("div",{className:Qn()({"vm-header-nav-item":!0,"vm-header-nav-item_sub":!0,"vm-header-nav-item_open":h,"vm-header-nav-item_active":i.find((e=>e.value===n))}),style:{color:o},onMouseEnter:()=>{f(),c&&clearTimeout(c)},onMouseLeave:m,ref:d,children:[r,mt(kn,{}),mt(Xr,{open:h,placement:"bottom-left",offset:{top:12,left:0},onClose:p,buttonRef:d,children:mt("div",{className:"vm-header-nav-item-submenu",style:{background:a},onMouseLeave:m,onMouseEnter:()=>{c&&clearTimeout(c)},children:i.map((e=>mt(vu,{activeMenu:n,value:e.value||"",label:e.label||"",color:o,type:e.type||mu.internalLink},e.value)))})})]})},bu=e=>e.filter((e=>!e.hide)).map((e=>{const t={...e};var n;t.value&&!t.label&&(t.label=(null===(n=pu[t.value])||void 0===n?void 0:n.title)||(e=>{try{return e.replace(/^\/+/,"").replace(/-/g," ").trim().replace(/^\w/,(e=>e.toUpperCase()))}catch(Id){return e}})(t.value));return t.submenu&&t.submenu.length>0&&(t.submenu=bu(t.submenu)),t})),wu=()=>{var e;const n=He(),{dashboardsSettings:r}=(0,t.useContext)(pr).state,{serverUrl:o,flags:a,appConfig:i}=gt(),l="enterprise"===(null===(e=i.license)||void 0===e?void 0:e.type),s=Boolean(a["vmalert.proxyURL"]),c=Boolean(!n&&r.length),u=(0,t.useMemo)((()=>({serverUrl:o,isEnterpriseLicense:l,showAlertLink:s,showPredefinedDashboards:c})),[o,l,s,c]),d=(0,t.useMemo)((()=>{switch("logs"){case Ue.logs:return[{label:pu[fu.logs].title,value:fu.home}];case Ue.anomaly:return[{label:pu[fu.anomaly].title,value:fu.home}];default:return(e=>{let{serverUrl:t,isEnterpriseLicense:n,showPredefinedDashboards:r,showAlertLink:o}=e;return[{value:fu.home},{label:"Explore",submenu:[{value:fu.metrics},{value:fu.cardinality},{value:fu.topQueries},{value:fu.activeQueries}]},{label:"Tools",submenu:gu(n)},{value:fu.dashboards,hide:!r},_u(t,o)]})(u)}}),[u]);return bu(d)},ku=e=>{let{color:n,background:r,direction:o}=e;const{pathname:a}=ne(),[i,l]=(0,t.useState)(a),s=wu();return(0,t.useEffect)((()=>{l(a)}),[a]),mt("nav",{className:Qn()({"vm-header-nav":!0,[`vm-header-nav_${o}`]:o}),children:s.map((e=>e.submenu?mt(yu,{activeMenu:i,label:e.label||"",submenu:e.submenu,color:n,background:r,direction:o},e.label):mt(vu,{activeMenu:i,value:e.value||"",label:e.label||"",color:n,type:e.type||mu.internalLink},e.value)))})},xu=mt("code",{children:yr()?"Cmd":"Ctrl"}),Su=[{title:"Zoom in",description:mt(pt.FK,{children:["To zoom in, hold down the ",xu," + ",mt("code",{children:"scroll up"}),", or press the ",mt("code",{children:"+"}),". Also, you can zoom in on a range on the graph by holding down your mouse button and selecting the range."]})},{title:"Zoom out",description:mt(pt.FK,{children:["To zoom out, hold down the ",xu," + ",mt("code",{children:"scroll down"}),", or press the ",mt("code",{children:"-"}),"."]})},{title:"Move horizontal axis",description:mt(pt.FK,{children:["To move the graph, hold down the ",xu," + ",mt("code",{children:"drag"})," the graph to the right or left."]})},{title:"Fixing a tooltip",description:mt(pt.FK,{children:["To fix the tooltip, ",mt("code",{children:"click"})," mouse when it's open. Then, you can drag the fixed tooltip by ",mt("code",{children:"clicking"})," and ",mt("code",{children:"dragging"})," on the ",mt(Ln,{})," icon."]})},{title:"Set a custom range for the vertical axis",description:mt(pt.FK,{children:["To set a custom range for the vertical axis, click on the ",mt(pn,{})," icon located in the upper right corner of the graph, activate the toggle, and set the values."]})}],Cu=[{title:"Show/hide a legend item",description:mt(pt.FK,{children:[mt("code",{children:"click"})," on a legend item to isolate it on the graph.",xu," + ",mt("code",{children:"click"})," on a legend item to remove it from the graph. To revert to the previous state, click again."]})},{title:"Copy label key-value pairs",description:mt(pt.FK,{children:[mt("code",{children:"click"})," on a label key-value pair to save it to the clipboard."]})},{title:"Collapse/Expand the legend group",description:mt(pt.FK,{children:[mt("code",{children:"click"})," on the group name (e.g. ",mt("b",{children:'Query 1: {__name__!=""}'}),") to collapse or expand the legend."]})}],Au=Su.concat(Cu),Eu=()=>{const{value:e,setFalse:t,setTrue:n}=Fr(!1);return mt(pt.FK,{children:[mt(Ir,{title:"Show tips on working with the graph",children:mt(Dr,{variant:"text",color:"gray",startIcon:mt(Fn,{}),onClick:n,ariaLabel:"open the tips"})}),e&&mt(Br,{title:"Tips on working with the graph and the legend",onClose:t,children:mt("div",{className:"fc-graph-tips",children:Au.map((e=>{let{title:t,description:n}=e;return mt("div",{className:"fc-graph-tips-item",children:[mt("h4",{className:"fc-graph-tips-item__action",children:t}),mt("p",{className:"fc-graph-tips-item__description",children:n})]},t)}))})})]})},Mu=mt("code",{children:yr()?"Cmd":"Ctrl"}),Nu=mt(pt.FK,{children:[mt("code",{children:yr()?"Option":"Ctrl"})," + ",mt("code",{children:"Space"})]}),Tu=[{title:"Query",list:[{keys:mt("code",{children:"Enter"}),description:"Run"},{keys:mt(pt.FK,{children:[mt("code",{children:"Shift"})," + ",mt("code",{children:"Enter"})]}),description:"Multi-line queries"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"Arrow Up"})]}),description:"Previous command from the Query history"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"Arrow Down"})]}),description:"Next command from the Query history"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"click"})," by ",mt(Pn,{})]}),description:"Toggle multiple queries"},{keys:Nu,description:"Show quick autocomplete tips"}]},{title:"Graph",readMore:mt(Eu,{}),list:[{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"scroll Up"})," or ",mt("code",{children:"+"})]}),description:"Zoom in"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"scroll Down"})," or ",mt("code",{children:"-"})]}),description:"Zoom out"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"drag"})]}),description:"Move the graph left/right"},{keys:mt(pt.FK,{children:mt("code",{children:"click"})}),description:"Select the series in the legend"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"click"})]}),description:"Toggle multiple series in the legend"}]}],$u="Shortcut keys",Pu=yr(),Du=Pu?"Cmd + /":"F1",Ou=e=>{let{showTitle:n}=e;const r=He(),{value:o,setTrue:a,setFalse:i}=Fr(!1),l=(0,t.useCallback)((e=>{const t=Pu&&"/"===e.key&&e.metaKey,n=!Pu&&"F1"===e.key&&!e.metaKey;(t||n)&&a()}),[a]);return er("keydown",l),mt(pt.FK,{children:[mt(Ir,{open:!0!==n&&void 0,title:`${$u} (${Du})`,placement:"bottom-center",children:mt(Dr,{className:r?"":"vm-header-button",variant:"contained",color:"primary",startIcon:mt(An,{}),onClick:a,ariaLabel:$u,children:n&&$u})}),o&&mt(Br,{title:"Shortcut keys",onClose:i,children:mt("div",{className:"vm-shortcuts",children:Tu.map((e=>mt("div",{className:"vm-shortcuts-section",children:[e.readMore&&mt("div",{className:"vm-shortcuts-section__read-more",children:e.readMore}),mt("h3",{className:"vm-shortcuts-section__title",children:e.title}),mt("div",{className:"vm-shortcuts-section-list",children:e.list.map(((t,n)=>mt("div",{className:"vm-shortcuts-section-list-item",children:[mt("div",{className:"vm-shortcuts-section-list-item__key",children:t.keys}),mt("p",{className:"vm-shortcuts-section-list-item__description",children:t.description})]},`${e.title}_${n}`)))})]},e.title)))})})]})},Lu=e=>{let{open:t}=e;return mt("button",{className:Qn()({"vm-menu-burger":!0,"vm-menu-burger_opened":t}),"aria-label":"menu",children:mt("span",{})})},{REACT_APP_TYPE:Ru}={REACT_APP_TYPE:"logs"},zu=Ru===Ue.logs,Iu=e=>{let{background:n,color:r}=e;const{pathname:o}=ne(),{isMobile:a}=br(),i=(0,t.useRef)(null),{value:l,toggle:s,setFalse:c}=Fr(!1);return(0,t.useEffect)(c,[o]),Jr(i,c),mt("div",{className:"vm-header-sidebar",ref:i,children:[mt("div",{className:Qn()({"vm-header-sidebar-button":!0,"vm-header-sidebar-button_open":l}),onClick:s,children:mt(Lu,{open:l})}),mt("div",{className:Qn()({"vm-header-sidebar-menu":!0,"vm-header-sidebar-menu_open":l}),children:[mt("div",{children:mt(ku,{color:r,background:n,direction:"column"})}),mt("div",{className:"vm-header-sidebar-menu-settings",children:!a&&!zu&&mt(Ou,{showTitle:!0})})]})]})},ju=e=>{let{controlsComponent:n,isMobile:r,...o}=e;const a=He(),{pathname:i}=ne(),{accountIds:l}=(()=>{const{useTenantID:e}=Fe(),n=He(),{serverUrl:r}=gt(),[o,a]=(0,t.useState)(!1),[i,l]=(0,t.useState)(),[s,c]=(0,t.useState)([]),u=(0,t.useMemo)((()=>`${r.replace(/^(.+)(\/select.+)/,"$1")}/admin/tenants`),[r]),d=(0,t.useMemo)((()=>!!Be(r)),[r]),h=n?!e:!d;return(0,t.useEffect)((()=>{h||(async()=>{a(!0);try{const e=await fetch(u),t=await e.json(),n=t.data||[];c(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?l(void 0):l(`${t.errorType}\r\n${null===t||void 0===t?void 0:t.error}`)}catch(Id){Id instanceof Error&&l(`${Id.name}: ${Id.message}`)}a(!1)})().catch(console.error)}),[u]),{accountIds:s,isLoading:o,error:i}})(),{value:s,toggle:c,setFalse:u}=Fr(!1),d=mt(n,{...o,isMobile:r,accountIds:l,headerSetup:(0,t.useMemo)((()=>(pu[i]||{}).header||{}),[i])});return r?mt(pt.FK,{children:[mt("div",{children:mt(Dr,{className:Qn()({"vm-header-button":!a}),startIcon:mt(jn,{}),onClick:c,ariaLabel:"controls"})}),mt(Br,{title:"Controls",onClose:u,isOpen:s,className:Qn()({"vm-header-controls-modal":!0,"vm-header-controls-modal_open":s}),children:d})]}):d},{REACT_APP_TYPE:Fu}={REACT_APP_TYPE:"logs"},Hu=Fu===Ue.logs||Fu===Ue.anomaly,Vu=()=>{switch(Fu){case Ue.logs:return mt(un,{});case Ue.anomaly:return mt(dn,{});default:return mt(cn,{})}},Bu=e=>{let{controlsComponent:n}=e;const{isMobile:r}=br(),o=tr(),a=(0,t.useMemo)((()=>window.innerWidth<1e3),[o]),{isDarkTheme:i}=gt(),l=He(),s=(0,t.useMemo)((()=>it(i?"color-background-block":"color-primary")),[i]),{background:c,color:u}=(0,t.useMemo)((()=>{const{headerStyles:{background:e=(l?"#FFF":s),color:t=(l?s:"#FFF")}={}}=Fe();return{background:e,color:t}}),[s]),d=oe(),h=()=>{d({pathname:fu.home}),window.location.reload()};return mt("header",{className:Qn()({"vm-header":!0,"vm-header_app":l,"vm-header_dark":i,"vm-header_sidebar":a,"vm-header_mobile":r}),style:{background:c,color:u},children:[a?mt(Iu,{background:c,color:u}):mt(pt.FK,{children:[!l&&mt("div",{className:Qn()({"vm-header-logo":!0,"vm-header-logo_logs":Hu}),onClick:h,style:{color:u},children:mt(Vu,{})}),mt(ku,{color:u,background:c})]}),a&&mt("div",{className:Qn()({"vm-header-logo":!0,"vm-header-logo_mobile":!0,"vm-header-logo_logs":Hu}),onClick:h,style:{color:u},children:mt(Vu,{})}),mt(ju,{controlsComponent:n,displaySidebar:a,isMobile:r})]})},Uu={href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new/choose",Icon:()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z"})}),title:"Create an issue"},Yu=[{href:"https://docs.victoriametrics.com/MetricsQL.html",Icon:Tn,title:"MetricsQL"},{href:"https://docs.victoriametrics.com/#vmui",Icon:Rn,title:"Documentation"},Uu],Wu=[{href:"https://docs.victoriametrics.com/victorialogs/logsql/",Icon:Tn,title:"LogsQL"},{href:"https://docs.victoriametrics.com/victorialogs/",Icon:Rn,title:"Documentation"},Uu],qu=(0,t.memo)((e=>{let{links:t=Yu}=e;const n=`2019-${(new Date).getFullYear()}`;return mt("footer",{className:"vm-footer",children:[mt("a",{className:"vm-link vm-footer__website",target:"_blank",href:"https://victoriametrics.com/",rel:"me noreferrer",children:[mt(hn,{}),"victoriametrics.com"]}),t.map((e=>{let{href:t,Icon:n,title:r}=e;return mt("a",{className:"vm-link vm-footer__link",target:"_blank",href:t,rel:"help noreferrer",children:[mt(n,{}),r]},`${t}-${r}`)})),mt("div",{className:"vm-footer__copyright",children:["\xa9 ",n," VictoriaMetrics"]})]})})),Ku=qu,Zu="Enable to save the modified server URL to local storage, preventing reset upon page refresh.",Gu="Disable to stop saving the server URL to local storage, reverting to the default URL on page refresh.",Qu=(0,t.forwardRef)(((e,n)=>{let{onClose:r}=e;const{serverUrl:o}=gt(),a=vt(),{value:i,toggle:l}=Fr(!!We("SERVER_URL")),[s,c]=(0,t.useState)(o),[u,d]=(0,t.useState)(""),h=(0,t.useCallback)((()=>{const e=Be(s);""!==e&&a({type:"SET_TENANT_ID",payload:e}),a({type:"SET_SERVER",payload:s}),r()}),[s]);return(0,t.useEffect)((()=>{o||d(rt.emptyServer),(e=>{let t;try{t=new URL(e)}catch(n){return!1}return"http:"===t.protocol||"https:"===t.protocol})(o)||d(rt.validServer)}),[o]),(0,t.useEffect)((()=>{i?Ye("SERVER_URL",s):qe(["SERVER_URL"])}),[i]),(0,t.useEffect)((()=>{i&&Ye("SERVER_URL",s)}),[s]),(0,t.useEffect)((()=>{o!==s&&c(o)}),[o]),(0,t.useImperativeHandle)(n,(()=>({handleApply:h})),[h]),mt("div",{children:[mt("div",{className:"vm-server-configurator__title",children:"Server URL"}),mt("div",{className:"vm-server-configurator-url",children:[mt(Vr,{autofocus:!0,value:s,error:u,onChange:e=>{c(e||""),d("")},onEnter:h,inputmode:"url"}),mt(Ir,{title:i?Gu:Zu,children:mt(Dr,{className:"vm-server-configurator-url__button",variant:"text",color:i?"primary":"gray",onClick:l,startIcon:mt(In,{})})})]})]})})),Ju=[{label:"Graph",type:nt.chart},{label:"JSON",type:nt.code},{label:"Table",type:nt.table}],Xu=(0,t.forwardRef)(((e,n)=>{let{onClose:r}=e;const{isMobile:o}=br(),{seriesLimits:a}=(0,t.useContext)(lr).state,i=(0,t.useContext)(lr).dispatch,[l,s]=(0,t.useState)(a),[c,u]=(0,t.useState)({table:"",chart:"",code:""}),d=(0,t.useCallback)((()=>{i({type:"SET_SERIES_LIMITS",payload:l}),r()}),[l]);return(0,t.useImperativeHandle)(n,(()=>({handleApply:d})),[d]),mt("div",{className:"vm-limits-configurator",children:[mt("div",{className:"vm-server-configurator__title",children:["Series limits by tabs",mt(Ir,{title:"Set to 0 to disable the limit",children:mt(Dr,{variant:"text",color:"primary",size:"small",startIcon:mt(_n,{})})}),mt("div",{className:"vm-limits-configurator-title__reset",children:mt(Dr,{variant:"text",color:"primary",size:"small",startIcon:mt(mn,{}),onClick:()=>{s(Xe)},children:"Reset limits"})})]}),mt("div",{className:Qn()({"vm-limits-configurator__inputs":!0,"vm-limits-configurator__inputs_mobile":o}),children:Ju.map((e=>{return mt("div",{children:mt(Vr,{label:e.label,value:l[e.type],error:c[e.type],onChange:(t=e.type,e=>{const n=e||"";u((e=>({...e,[t]:+n<0?rt.positiveNumber:""}))),s({...l,[t]:n||1/0})}),onEnter:d,type:"number"})},e.type);var t}))})]})})),ed=Xu,td=()=>mt(Ir,{title:"Browser timezone is not recognized, supported, or could not be determined.",children:mt(gn,{})}),nd=Yt(),rd=(0,t.forwardRef)(((e,n)=>{const{isMobile:r}=br(),o=Bt(),{timezone:a,defaultTimezone:i}=Gt(),l=Qt(),[s,c]=(0,t.useState)(a),[u,d]=(0,t.useState)(""),h=(0,t.useRef)(null),{value:p,toggle:f,setFalse:m}=Fr(!1),_=(0,t.useMemo)((()=>[{title:`Default time (${i})`,region:i,utc:i?Vt(i):"UTC"},{title:nd.title,region:nd.region,utc:Vt(nd.region),isInvalid:!nd.isValid},{title:"UTC (Coordinated Universal Time)",region:"UTC",utc:"UTC"}].filter((e=>e.region))),[i]),g=(0,t.useMemo)((()=>{if(!u)return o;try{return Bt(u)}catch(Id){return{}}}),[u,o]),v=(0,t.useMemo)((()=>Object.keys(g)),[g]),y=(0,t.useMemo)((()=>({region:s,utc:Vt(s)})),[s]),b=e=>()=>{(e=>{c(e.region),d(""),m()})(e)};return(0,t.useEffect)((()=>{c(a)}),[a]),(0,t.useImperativeHandle)(n,(()=>({handleApply:()=>{l({type:"SET_TIMEZONE",payload:s})}})),[s]),mt("div",{className:"vm-timezones",children:[mt("div",{className:"vm-server-configurator__title",children:"Time zone"}),mt("div",{className:"vm-timezones-item vm-timezones-item_selected",onClick:f,ref:h,children:[mt("div",{className:"vm-timezones-item__title",children:y.region}),mt("div",{className:"vm-timezones-item__utc",children:y.utc}),mt("div",{className:Qn()({"vm-timezones-item__icon":!0,"vm-timezones-item__icon_open":p}),children:mt(kn,{})})]}),mt(Xr,{open:p,buttonRef:h,placement:"bottom-left",onClose:m,fullWidth:!0,title:r?"Time zone":void 0,children:mt("div",{className:Qn()({"vm-timezones-list":!0,"vm-timezones-list_mobile":r}),children:[mt("div",{className:"vm-timezones-list-header",children:[mt("div",{className:"vm-timezones-list-header__search",children:mt(Vr,{autofocus:!0,label:"Search",value:u,onChange:e=>{d(e)}})}),_.map(((e,t)=>e&&mt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[mt("div",{className:"vm-timezones-item__title",children:[e.title,e.isInvalid&&mt(td,{})]}),mt("div",{className:"vm-timezones-item__utc",children:e.utc})]},`${t}_${e.region}`)))]}),v.map((e=>mt("div",{className:"vm-timezones-list-group",children:mt(Gr,{defaultExpanded:!0,title:mt("div",{className:"vm-timezones-list-group__title",children:e}),children:mt("div",{className:"vm-timezones-list-group-options",children:g[e]&&g[e].map((e=>mt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[mt("div",{className:"vm-timezones-item__title",children:e.region}),mt("div",{className:"vm-timezones-item__utc",children:e.utc})]},e.search)))})})},e)))]})})]})})),od=rd,ad=e=>{let{options:n,value:r,label:o,onChange:a}=e;const i=(0,t.useRef)(null),[l,s]=(0,t.useState)({width:"0px",left:"0px",borderRadius:"0px"}),c=e=>()=>{a(e)};return(0,t.useEffect)((()=>{if(!i.current)return void s({width:"0px",left:"0px",borderRadius:"0px"});const e=n.findIndex((e=>e.value===r)),{width:t}=i.current.getBoundingClientRect();let o=t,a=e*o,l="0";0===e&&(l="16px 0 0 16px"),e===n.length-1&&(l="10px",a-=1,l="0 16px 16px 0"),0!==e&&e!==n.length-1&&(o+=1,a-=1),s({width:`${o}px`,left:`${a}px`,borderRadius:l})}),[i,r,n]),mt("div",{className:"vm-toggles",children:[o&&mt("label",{className:"vm-toggles__label",children:o}),mt("div",{className:"vm-toggles-group",style:{gridTemplateColumns:`repeat(${n.length}, 1fr)`},children:[l.borderRadius&&mt("div",{className:"vm-toggles-group__highlight",style:l}),n.map(((e,t)=>mt("div",{className:Qn()({"vm-toggles-group-item":!0,"vm-toggles-group-item_first":0===t,"vm-toggles-group-item_active":e.value===r,"vm-toggles-group-item_icon":e.icon&&e.title}),onClick:c(e.value),ref:e.value===r?i:null,children:[e.icon,e.title]},e.value)))]})]})},id=Object.values(ot).map((e=>({title:e,value:e}))),ld=()=>{const{isMobile:e}=br(),t=vt(),{theme:n}=gt();return mt("div",{className:Qn()({"vm-theme-control":!0,"vm-theme-control_mobile":e}),children:[mt("div",{className:"vm-server-configurator__title",children:"Theme preferences"}),mt("div",{className:"vm-theme-control__toggle",children:mt(ad,{options:id,value:n,onChange:e=>{t({type:"SET_THEME",payload:e})}})},`${e}`)]})},sd=()=>{const{isMobile:e}=br(),{markdownParsing:n}=gr(),r=(0,t.useContext)(_r).dispatch;return mt("div",{children:[mt("div",{className:"vm-server-configurator__title",children:"Markdown Parsing for Logs"}),mt(jr,{label:n?"Disable markdown parsing":"Enable markdown parsing",value:n,onChange:e=>{r({type:"SET_MARKDOWN_PARSING",payload:e})},fullWidth:e}),mt("div",{className:"vm-server-configurator__info",children:"Toggle this switch to enable or disable the Markdown formatting for log entries. Enabling this will parse log texts to Markdown."})]})},cd="Settings",{REACT_APP_TYPE:ud}={REACT_APP_TYPE:"logs"},dd=ud===Ue.logs,hd=()=>{const{isMobile:e}=br(),n=He(),r=(0,t.useRef)(null),o=(0,t.useRef)(null),a=(0,t.useRef)(null),{value:i,setTrue:l,setFalse:s}=Fr(!1),c=[{show:!n&&!dd,component:mt(Qu,{ref:r,onClose:s})},{show:!dd,component:mt(ed,{ref:o,onClose:s})},{show:dd,component:mt(sd,{})},{show:!0,component:mt(od,{ref:a})},{show:!n,component:mt(ld,{})}].filter((e=>e.show));return mt(pt.FK,{children:[e?mt("div",{className:"vm-mobile-option",onClick:l,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(pn,{})}),mt("div",{className:"vm-mobile-option-text",children:mt("span",{className:"vm-mobile-option-text__label",children:cd})}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Ir,{title:cd,children:mt(Dr,{className:Qn()({"vm-header-button":!n}),variant:"contained",color:"primary",startIcon:mt(pn,{}),onClick:l,ariaLabel:"settings"})}),i&&mt(Br,{title:cd,onClose:s,children:mt("div",{className:Qn()({"vm-server-configurator":!0,"vm-server-configurator_mobile":e}),children:[c.map(((e,t)=>mt("div",{className:"vm-server-configurator__input",children:e.component},t))),mt("div",{className:"vm-server-configurator-footer",children:[mt(Dr,{color:"error",variant:"outlined",onClick:s,children:"Cancel"}),mt(Dr,{color:"primary",variant:"contained",onClick:()=>{r.current&&r.current.handleApply(),o.current&&o.current.handleApply(),a.current&&a.current.handleApply(),s()},children:"Apply"})]})]})})]})},pd=e=>{let{relativeTime:t,setDuration:n}=e;const{isMobile:r}=br();return mt("div",{className:Qn()({"vm-time-duration":!0,"vm-time-duration_mobile":r}),children:Ft.map((e=>{let{id:o,duration:a,until:i,title:l}=e;return mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_mobile":r,"vm-list-item_active":o===t}),onClick:(s={duration:a,until:i(),id:o},()=>{n(s)}),children:l||a},o);var s}))})},fd=e=>{let{viewDate:t,showArrowNav:n,onChangeViewDate:r,toggleDisplayYears:o}=e;return mt("div",{className:"vm-calendar-header",children:[mt("div",{className:"vm-calendar-header-left",onClick:o,children:[mt("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),mt("div",{className:"vm-calendar-header-left__select-year",children:mt(kn,{})})]}),n&&mt("div",{className:"vm-calendar-header-right",children:[mt("div",{className:"vm-calendar-header-right__prev",onClick:()=>{r(t.subtract(1,"month"))},children:mt(wn,{})}),mt("div",{className:"vm-calendar-header-right__next",onClick:()=>{r(t.add(1,"month"))},children:mt(wn,{})})]})]})},md=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],_d=e=>{let{viewDate:n,selectDate:r,onChangeSelectDate:a}=e;const i="YYYY-MM-DD",l=o().tz(),s=o()(n.format(i)),c=(0,t.useMemo)((()=>{const e=new Array(42).fill(null),t=s.startOf("month"),n=s.endOf("month").diff(t,"day")+1,r=new Array(n).fill(t).map(((e,t)=>e.add(t,"day"))),o=t.day();return e.splice(o,n,...r),e}),[s]),u=e=>()=>{e&&a(e)};return mt("div",{className:"vm-calendar-body",children:[md.map((e=>mt(Ir,{title:e,children:mt("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]})},e))),c.map(((e,t)=>mt("div",{className:Qn()({"vm-calendar-body-cell":!0,"vm-calendar-body-cell_day":!0,"vm-calendar-body-cell_day_empty":!e,"vm-calendar-body-cell_day_active":(e&&e.format(i))===r.format(i),"vm-calendar-body-cell_day_today":(e&&e.format(i))===l.format(i)}),onClick:u(e),children:e&&e.format("D")},e?e.format(i):t)))]})},gd=e=>{let{viewDate:n,onChangeViewDate:r}=e;const a=o()().format("YYYY"),i=(0,t.useMemo)((()=>n.format("YYYY")),[n]),l=(0,t.useMemo)((()=>{const e=o()().subtract(9,"year");return new Array(18).fill(e).map(((e,t)=>e.add(t,"year")))}),[n]);(0,t.useEffect)((()=>{const e=document.getElementById(`vm-calendar-year-${i}`);e&&e.scrollIntoView({block:"center"})}),[]);return mt("div",{className:"vm-calendar-years",children:l.map((e=>{return mt("div",{className:Qn()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===i,"vm-calendar-years__year_today":e.format("YYYY")===a}),id:`vm-calendar-year-${e.format("YYYY")}`,onClick:(t=e,()=>{r(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})},vd=e=>{let{viewDate:n,selectDate:r,onChangeViewDate:a}=e;const i=o()().format("MM"),l=(0,t.useMemo)((()=>r.format("MM")),[r]),s=(0,t.useMemo)((()=>new Array(12).fill("").map(((e,t)=>o()(n).month(t)))),[n]);(0,t.useEffect)((()=>{const e=document.getElementById(`vm-calendar-year-${l}`);e&&e.scrollIntoView({block:"center"})}),[]);return mt("div",{className:"vm-calendar-years",children:s.map((e=>{return mt("div",{className:Qn()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("MM")===l,"vm-calendar-years__year_today":e.format("MM")===i}),id:`vm-calendar-year-${e.format("MM")}`,onClick:(t=e,()=>{a(t)}),children:e.format("MMMM")},e.format("MM"));var t}))})};var yd=function(e){return e[e.days=0]="days",e[e.months=1]="months",e[e.years=2]="years",e}(yd||{});const bd=e=>{let{date:n,format:r=wt,onChange:a}=e;const[i,l]=(0,t.useState)(yd.days),[s,c]=(0,t.useState)(o().tz(n)),[u,d]=(0,t.useState)(o().tz(n)),h=o().tz(),p=h.format(bt)===s.format(bt),{isMobile:f}=br(),m=e=>{c(e),l((e=>e===yd.years?yd.months:yd.days))};return(0,t.useEffect)((()=>{u.format()!==o().tz(n).format()&&a(u.format(r))}),[u]),(0,t.useEffect)((()=>{const e=o().tz(n);c(e),d(e)}),[n]),mt("div",{className:Qn()({"vm-calendar":!0,"vm-calendar_mobile":f}),children:[mt(fd,{viewDate:s,onChangeViewDate:m,toggleDisplayYears:()=>{l((e=>e===yd.years?yd.days:yd.years))},showArrowNav:i===yd.days}),i===yd.days&&mt(_d,{viewDate:s,selectDate:u,onChangeSelectDate:e=>{d(e)}}),i===yd.years&&mt(gd,{viewDate:s,onChangeViewDate:m}),i===yd.months&&mt(vd,{selectDate:u,viewDate:s,onChangeViewDate:m}),!p&&i===yd.days&&mt("div",{className:"vm-calendar-footer",children:mt(Dr,{variant:"text",size:"small",onClick:()=>{c(h)},children:"show today"})})]})},wd=(0,t.forwardRef)(((e,n)=>{let{date:r,targetRef:a,format:i=wt,onChange:l,label:s}=e;const c=(0,t.useMemo)((()=>o()(r).isValid()?o().tz(r):o()().tz()),[r]),{isMobile:u}=br(),{value:d,toggle:h,setFalse:p}=Fr(!1);return er("click",h,a),er("keyup",(e=>{"Escape"!==e.key&&"Enter"!==e.key||p()})),mt(pt.FK,{children:mt(Xr,{open:d,buttonRef:a,placement:"bottom-right",onClose:p,title:u?s:void 0,children:mt("div",{ref:n,children:mt(bd,{date:c,format:i,onChange:e=>{l(e),p()}})})})})}));var kd=n(494),xd=n.n(kd);const Sd=e=>o()(e).isValid()?o().tz(e).format(wt):e,Cd=e=>{let{value:n="",label:r,pickerLabel:a,pickerRef:i,onChange:l,onEnter:s}=e;const c=(0,t.useRef)(null),[u,d]=(0,t.useState)(null),[h,p]=(0,t.useState)(Sd(n)),[f,m]=(0,t.useState)(!1),[_,g]=(0,t.useState)(!1),v=o()(h).isValid()?"":"Invalid date format";return(0,t.useEffect)((()=>{const e=Sd(n);e!==h&&p(e),_&&(s(),g(!1))}),[n]),(0,t.useEffect)((()=>{f&&u&&(u.focus(),u.setSelectionRange(11,11),m(!1))}),[f]),mt("div",{className:Qn()({"vm-date-time-input":!0,"vm-date-time-input_error":v}),children:[mt("label",{children:r}),mt(xd(),{tabIndex:1,inputRef:d,mask:"9999-99-99 99:99:99",placeholder:"YYYY-MM-DD HH:mm:ss",value:h,autoCapitalize:"none",inputMode:"numeric",maskChar:null,onChange:e=>{p(e.currentTarget.value)},onBlur:()=>{l(h)},onKeyUp:e=>{"Enter"===e.key&&(l(h),g(!0))}}),v&&mt("span",{className:"vm-date-time-input__error-text",children:v}),mt("div",{className:"vm-date-time-input__icon",ref:c,children:mt(Dr,{variant:"text",color:"gray",size:"small",startIcon:mt(Sn,{}),ariaLabel:"calendar"})}),mt(wd,{label:a,ref:i,date:h,onChange:e=>{p(e),m(!0)},targetRef:c})]})};const Ad=function(e){const n=(0,t.useRef)();return(0,t.useEffect)((()=>{n.current=e}),[e]),n.current},Ed=()=>{const{isMobile:e}=br(),{isDarkTheme:n}=gt(),r=(0,t.useRef)(null),a=tr(),i=(0,t.useMemo)((()=>a.width>1120),[a]),[l,s]=(0,t.useState)(),[c,u]=(0,t.useState)(),{period:{end:d,start:h},relativeTime:p,timezone:f,duration:m}=Gt(),_=Qt(),g=He(),v=Ad(f),{value:y,toggle:b,setFalse:w}=Fr(!1),k=(0,t.useMemo)((()=>({region:f,utc:Vt(f)})),[f]);(0,t.useEffect)((()=>{s(Rt(It(d)))}),[f,d]),(0,t.useEffect)((()=>{u(Rt(It(h)))}),[f,h]);const x=e=>{let{duration:t,until:n,id:r}=e;_({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),w()},S=(0,t.useMemo)((()=>({start:o().tz(It(h)).format(wt),end:o().tz(It(d)).format(wt)})),[h,d,f]),C=(0,t.useMemo)((()=>p&&"none"!==p?p.replace(/_/g," "):`${S.start} - ${S.end}`),[p,S]),A=(0,t.useRef)(null),E=(0,t.useRef)(null),M=(0,t.useRef)(null),N=()=>{c&&l&&_({type:"SET_PERIOD",payload:{from:o().tz(c).toDate(),to:o().tz(l).toDate()}}),w()};return(0,t.useEffect)((()=>{const e=Ht({relativeTimeId:p,defaultDuration:m,defaultEndInput:It(d)});v&&f!==v&&x({id:e.relativeTimeId,duration:e.duration,until:e.endInput})}),[f,v]),Jr(r,(t=>{var n,r;if(e)return;const o=t.target,a=(null===A||void 0===A?void 0:A.current)&&(null===A||void 0===A||null===(n=A.current)||void 0===n?void 0:n.contains(o)),i=(null===E||void 0===E?void 0:E.current)&&(null===E||void 0===E||null===(r=E.current)||void 0===r?void 0:r.contains(o));a||i||w()})),mt(pt.FK,{children:[mt("div",{ref:M,children:e?mt("div",{className:"vm-mobile-option",onClick:b,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(xn,{})}),mt("div",{className:"vm-mobile-option-text",children:[mt("span",{className:"vm-mobile-option-text__label",children:"Time range"}),mt("span",{className:"vm-mobile-option-text__value",children:C})]}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Ir,{title:i?"Time range controls":C,children:mt(Dr,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:mt(xn,{}),onClick:b,ariaLabel:"time range controls",children:i&&mt("span",{children:C})})})}),mt(Xr,{open:y,buttonRef:M,placement:"bottom-right",onClose:w,clickOutside:!1,title:e?"Time range controls":"",children:mt("div",{className:Qn()({"vm-time-selector":!0,"vm-time-selector_mobile":e}),ref:r,children:[mt("div",{className:"vm-time-selector-left",children:[mt("div",{className:Qn()({"vm-time-selector-left-inputs":!0,"vm-time-selector-left-inputs_dark":n}),children:[mt(Cd,{value:c,label:"From:",pickerLabel:"Date From",pickerRef:A,onChange:u,onEnter:N}),mt(Cd,{value:l,label:"To:",pickerLabel:"Date To",pickerRef:E,onChange:s,onEnter:N})]}),mt("div",{className:"vm-time-selector-left-timezone",children:[mt("div",{className:"vm-time-selector-left-timezone__title",children:k.region}),mt("div",{className:"vm-time-selector-left-timezone__utc",children:k.utc})]}),mt(Dr,{variant:"text",startIcon:mt(Cn,{}),onClick:()=>_({type:"RUN_QUERY_TO_NOW"}),children:"switch to now"}),mt("div",{className:"vm-time-selector-left__controls",children:[mt(Dr,{color:"error",variant:"outlined",onClick:()=>{s(Rt(It(d))),u(Rt(It(h))),w()},children:"Cancel"}),mt(Dr,{color:"primary",onClick:N,children:"Apply"})]})]}),mt(pd,{relativeTime:p||"",setDuration:x})]})})]})},Md=()=>{const e=He(),{isMobile:n}=br(),r=Qt(),[o,a]=je(),[i,l]=Lr("0","accountID"),[s,c]=Lr("0","projectID"),u=`${i}:${s}`,d=(0,t.useRef)(null),{value:h,toggle:p,setFalse:f}=Fr(!1);return(0,t.useEffect)((()=>{h||(l(o.get("accountID")||"0"),c(o.get("projectID")||"0"))}),[h]),mt("div",{className:"vm-tenant-input",children:[mt(Ir,{title:"Define Tenant ID if you need request to another storage",children:mt("div",{ref:d,children:n?mt("div",{className:"vm-mobile-option",onClick:p,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(In,{})}),mt("div",{className:"vm-mobile-option-text",children:[mt("span",{className:"vm-mobile-option-text__label",children:"Tenant ID"}),mt("span",{className:"vm-mobile-option-text__value",children:u})]}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Dr,{className:e?"":"vm-header-button",variant:"contained",color:"primary",fullWidth:!0,startIcon:mt(In,{}),endIcon:mt("div",{className:Qn()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":h}),children:mt(wn,{})}),onClick:p,children:u})})}),mt(Xr,{open:h,placement:"bottom-right",onClose:f,buttonRef:d,title:n?"Define Tenant ID":void 0,children:mt("div",{className:Qn()({"vm-list vm-tenant-input-list":!0,"vm-list vm-tenant-input-list_mobile":n,"vm-tenant-input-list_inline":!0}),children:[mt(Vr,{autofocus:!0,label:"accountID",value:i,onChange:l,type:"number"}),mt(Vr,{autofocus:!0,label:"projectID",value:s,onChange:c,type:"number"}),mt("div",{className:"vm-tenant-input-list__buttons",children:[mt(Ir,{title:"Multitenancy in VictoriaLogs documentation",children:mt("a",{href:"https://docs.victoriametrics.com/victorialogs/#multitenancy",target:"_blank",rel:"help noreferrer",children:mt(Dr,{variant:"text",color:"gray",startIcon:mt(zn,{})})})}),mt(Dr,{variant:"contained",color:"primary",onClick:()=>{o.set("accountID",i),o.set("projectID",s),a(o),f(),r({type:"RUN_QUERY"})},children:"Apply"})]})]})})]})},Nd=[{seconds:0,title:"Off"},{seconds:1,title:"1s"},{seconds:2,title:"2s"},{seconds:5,title:"5s"},{seconds:10,title:"10s"},{seconds:30,title:"30s"},{seconds:60,title:"1m"},{seconds:300,title:"5m"},{seconds:900,title:"15m"},{seconds:1800,title:"30m"},{seconds:3600,title:"1h"},{seconds:7200,title:"2h"}],Td=()=>{const{isMobile:e}=br(),n=Qt(),r=He(),[o,a]=(0,t.useState)(!1),[i,l]=(0,t.useState)(Nd[0]),{value:s,toggle:c,setFalse:u}=Fr(!1),d=(0,t.useRef)(null);(0,t.useEffect)((()=>{const e=i.seconds;let t;return o?t=setInterval((()=>{n({type:"RUN_QUERY"})}),1e3*e):l(Nd[0]),()=>{t&&clearInterval(t)}}),[i,o]);const h=e=>()=>{(e=>{(o&&!e.seconds||!o&&e.seconds)&&a((e=>!e)),l(e),u()})(e)};return mt(pt.FK,{children:[mt("div",{className:"vm-execution-controls",children:mt("div",{className:Qn()({"vm-execution-controls-buttons":!0,"vm-execution-controls-buttons_mobile":e,"vm-header-button":!r}),children:[!e&&mt(Ir,{title:"Refresh dashboard",children:mt(Dr,{variant:"contained",color:"primary",onClick:()=>{n({type:"RUN_QUERY"})},startIcon:mt(bn,{}),ariaLabel:"refresh dashboard"})}),e?mt("div",{className:"vm-mobile-option",onClick:c,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(mn,{})}),mt("div",{className:"vm-mobile-option-text",children:[mt("span",{className:"vm-mobile-option-text__label",children:"Auto-refresh"}),mt("span",{className:"vm-mobile-option-text__value",children:i.title})]}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Ir,{title:"Auto-refresh control",children:mt("div",{ref:d,children:mt(Dr,{variant:"contained",color:"primary",fullWidth:!0,endIcon:mt("div",{className:Qn()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":s}),children:mt(wn,{})}),onClick:c,children:i.title})})})]})}),mt(Xr,{open:s,placement:"bottom-right",onClose:u,buttonRef:d,title:e?"Auto-refresh duration":void 0,children:mt("div",{className:Qn()({"vm-execution-controls-list":!0,"vm-execution-controls-list_mobile":e}),children:Nd.map((t=>mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_mobile":e,"vm-list-item_active":t.seconds===i.seconds}),onClick:h(t),children:t.title},t.seconds)))})})]})},$d=e=>{let{isMobile:t}=e;return mt("div",{className:Qn()({"vm-header-controls":!0,"vm-header-controls_mobile":t}),children:[mt(Md,{}),mt(Ed,{}),mt(Td,{}),mt(hd,{})]})},Pd=(Boolean(We("DISABLED_DEFAULT_TIMEZONE")),()=>{const{serverUrl:e}=gt(),[n,r]=(Qt(),(0,t.useState)(!1)),[o,a]=(0,t.useState)(""),i=async()=>{};return(0,t.useEffect)((()=>{i()}),[e]),{isLoading:n,error:o}}),Dd=()=>{const e=He(),{isMobile:n}=br(),{pathname:r}=ne();Pd();return(0,t.useEffect)((()=>{var e;const t="vmui for VictoriaLogs",n=null===(e=pu[fu.logs])||void 0===e?void 0:e.title;document.title=n?`${n} - ${t}`:t}),[r]),mt("section",{className:"vm-container",children:[mt(Bu,{controlsComponent:$d}),mt("div",{className:Qn()({"vm-container-body":!0,"vm-container-body_mobile":n,"vm-container-body_app":e}),children:mt(ye,{})}),!e&&mt(Ku,{links:Wu})]})},Od={unicode:!1,renderer:void 0};da.use(function(e){if(!(e={...Od,...e}).emojis)throw new Error("Must provide emojis to markedEmoji");const t=Object.keys(e.emojis).map((e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))).join("|"),n=new RegExp(`:(${t}):`),r=new RegExp(`^${n.source}`);return{extensions:[{name:"emoji",level:"inline",start:e=>e.match(n)?.index,tokenizer(t,n){const o=r.exec(t);if(!o)return;const a=o[1];let i=e.emojis[a],l=e.renderer?void 0:e.unicode;if("string"!==typeof i&&!e.renderer)if("string"===typeof i.char)i=i.char,l=!0;else{if("string"!==typeof i.url)return;i=i.url,l=!1}return{type:"emoji",raw:o[0],name:a,emoji:i,unicode:l}},renderer:t=>e.renderer?e.renderer(t):t.unicode?t.emoji:`${t.name}`}]}}({emojis:{100:"\ud83d\udcaf",1234:"\ud83d\udd22",grinning:"\ud83d\ude00",smiley:"\ud83d\ude03",smile:"\ud83d\ude04",grin:"\ud83d\ude01",laughing:"\ud83d\ude06",satisfied:"\ud83d\ude06",sweat_smile:"\ud83d\ude05",rofl:"\ud83e\udd23",joy:"\ud83d\ude02",slightly_smiling_face:"\ud83d\ude42",upside_down_face:"\ud83d\ude43",melting_face:"\ud83e\udee0",wink:"\ud83d\ude09",blush:"\ud83d\ude0a",innocent:"\ud83d\ude07",smiling_face_with_three_hearts:"\ud83e\udd70",heart_eyes:"\ud83d\ude0d",star_struck:"\ud83e\udd29",kissing_heart:"\ud83d\ude18",kissing:"\ud83d\ude17",relaxed:"\u263a\ufe0f",kissing_closed_eyes:"\ud83d\ude1a",kissing_smiling_eyes:"\ud83d\ude19",smiling_face_with_tear:"\ud83e\udd72",yum:"\ud83d\ude0b",stuck_out_tongue:"\ud83d\ude1b",stuck_out_tongue_winking_eye:"\ud83d\ude1c",zany_face:"\ud83e\udd2a",stuck_out_tongue_closed_eyes:"\ud83d\ude1d",money_mouth_face:"\ud83e\udd11",hugs:"\ud83e\udd17",hand_over_mouth:"\ud83e\udd2d",face_with_open_eyes_and_hand_over_mouth:"\ud83e\udee2",face_with_peeking_eye:"\ud83e\udee3",shushing_face:"\ud83e\udd2b",thinking:"\ud83e\udd14",saluting_face:"\ud83e\udee1",zipper_mouth_face:"\ud83e\udd10",raised_eyebrow:"\ud83e\udd28",neutral_face:"\ud83d\ude10",expressionless:"\ud83d\ude11",no_mouth:"\ud83d\ude36",dotted_line_face:"\ud83e\udee5",face_in_clouds:"\ud83d\ude36\u200d\ud83c\udf2b\ufe0f",smirk:"\ud83d\ude0f",unamused:"\ud83d\ude12",roll_eyes:"\ud83d\ude44",grimacing:"\ud83d\ude2c",face_exhaling:"\ud83d\ude2e\u200d\ud83d\udca8",lying_face:"\ud83e\udd25",shaking_face:"\ud83e\udee8",relieved:"\ud83d\ude0c",pensive:"\ud83d\ude14",sleepy:"\ud83d\ude2a",drooling_face:"\ud83e\udd24",sleeping:"\ud83d\ude34",mask:"\ud83d\ude37",face_with_thermometer:"\ud83e\udd12",face_with_head_bandage:"\ud83e\udd15",nauseated_face:"\ud83e\udd22",vomiting_face:"\ud83e\udd2e",sneezing_face:"\ud83e\udd27",hot_face:"\ud83e\udd75",cold_face:"\ud83e\udd76",woozy_face:"\ud83e\udd74",dizzy_face:"\ud83d\ude35",face_with_spiral_eyes:"\ud83d\ude35\u200d\ud83d\udcab",exploding_head:"\ud83e\udd2f",cowboy_hat_face:"\ud83e\udd20",partying_face:"\ud83e\udd73",disguised_face:"\ud83e\udd78",sunglasses:"\ud83d\ude0e",nerd_face:"\ud83e\udd13",monocle_face:"\ud83e\uddd0",confused:"\ud83d\ude15",face_with_diagonal_mouth:"\ud83e\udee4",worried:"\ud83d\ude1f",slightly_frowning_face:"\ud83d\ude41",frowning_face:"\u2639\ufe0f",open_mouth:"\ud83d\ude2e",hushed:"\ud83d\ude2f",astonished:"\ud83d\ude32",flushed:"\ud83d\ude33",pleading_face:"\ud83e\udd7a",face_holding_back_tears:"\ud83e\udd79",frowning:"\ud83d\ude26",anguished:"\ud83d\ude27",fearful:"\ud83d\ude28",cold_sweat:"\ud83d\ude30",disappointed_relieved:"\ud83d\ude25",cry:"\ud83d\ude22",sob:"\ud83d\ude2d",scream:"\ud83d\ude31",confounded:"\ud83d\ude16",persevere:"\ud83d\ude23",disappointed:"\ud83d\ude1e",sweat:"\ud83d\ude13",weary:"\ud83d\ude29",tired_face:"\ud83d\ude2b",yawning_face:"\ud83e\udd71",triumph:"\ud83d\ude24",rage:"\ud83d\ude21",pout:"\ud83d\ude21",angry:"\ud83d\ude20",cursing_face:"\ud83e\udd2c",smiling_imp:"\ud83d\ude08",imp:"\ud83d\udc7f",skull:"\ud83d\udc80",skull_and_crossbones:"\u2620\ufe0f",hankey:"\ud83d\udca9",poop:"\ud83d\udca9",shit:"\ud83d\udca9",clown_face:"\ud83e\udd21",japanese_ogre:"\ud83d\udc79",japanese_goblin:"\ud83d\udc7a",ghost:"\ud83d\udc7b",alien:"\ud83d\udc7d",space_invader:"\ud83d\udc7e",robot:"\ud83e\udd16",smiley_cat:"\ud83d\ude3a",smile_cat:"\ud83d\ude38",joy_cat:"\ud83d\ude39",heart_eyes_cat:"\ud83d\ude3b",smirk_cat:"\ud83d\ude3c",kissing_cat:"\ud83d\ude3d",scream_cat:"\ud83d\ude40",crying_cat_face:"\ud83d\ude3f",pouting_cat:"\ud83d\ude3e",see_no_evil:"\ud83d\ude48",hear_no_evil:"\ud83d\ude49",speak_no_evil:"\ud83d\ude4a",love_letter:"\ud83d\udc8c",cupid:"\ud83d\udc98",gift_heart:"\ud83d\udc9d",sparkling_heart:"\ud83d\udc96",heartpulse:"\ud83d\udc97",heartbeat:"\ud83d\udc93",revolving_hearts:"\ud83d\udc9e",two_hearts:"\ud83d\udc95",heart_decoration:"\ud83d\udc9f",heavy_heart_exclamation:"\u2763\ufe0f",broken_heart:"\ud83d\udc94",heart_on_fire:"\u2764\ufe0f\u200d\ud83d\udd25",mending_heart:"\u2764\ufe0f\u200d\ud83e\ude79",heart:"\u2764\ufe0f",pink_heart:"\ud83e\ude77",orange_heart:"\ud83e\udde1",yellow_heart:"\ud83d\udc9b",green_heart:"\ud83d\udc9a",blue_heart:"\ud83d\udc99",light_blue_heart:"\ud83e\ude75",purple_heart:"\ud83d\udc9c",brown_heart:"\ud83e\udd0e",black_heart:"\ud83d\udda4",grey_heart:"\ud83e\ude76",white_heart:"\ud83e\udd0d",kiss:"\ud83d\udc8b",anger:"\ud83d\udca2",boom:"\ud83d\udca5",collision:"\ud83d\udca5",dizzy:"\ud83d\udcab",sweat_drops:"\ud83d\udca6",dash:"\ud83d\udca8",hole:"\ud83d\udd73\ufe0f",speech_balloon:"\ud83d\udcac",eye_speech_bubble:"\ud83d\udc41\ufe0f\u200d\ud83d\udde8\ufe0f",left_speech_bubble:"\ud83d\udde8\ufe0f",right_anger_bubble:"\ud83d\uddef\ufe0f",thought_balloon:"\ud83d\udcad",zzz:"\ud83d\udca4",wave:"\ud83d\udc4b",raised_back_of_hand:"\ud83e\udd1a",raised_hand_with_fingers_splayed:"\ud83d\udd90\ufe0f",hand:"\u270b",raised_hand:"\u270b",vulcan_salute:"\ud83d\udd96",rightwards_hand:"\ud83e\udef1",leftwards_hand:"\ud83e\udef2",palm_down_hand:"\ud83e\udef3",palm_up_hand:"\ud83e\udef4",leftwards_pushing_hand:"\ud83e\udef7",rightwards_pushing_hand:"\ud83e\udef8",ok_hand:"\ud83d\udc4c",pinched_fingers:"\ud83e\udd0c",pinching_hand:"\ud83e\udd0f",v:"\u270c\ufe0f",crossed_fingers:"\ud83e\udd1e",hand_with_index_finger_and_thumb_crossed:"\ud83e\udef0",love_you_gesture:"\ud83e\udd1f",metal:"\ud83e\udd18",call_me_hand:"\ud83e\udd19",point_left:"\ud83d\udc48",point_right:"\ud83d\udc49",point_up_2:"\ud83d\udc46",middle_finger:"\ud83d\udd95",fu:"\ud83d\udd95",point_down:"\ud83d\udc47",point_up:"\u261d\ufe0f",index_pointing_at_the_viewer:"\ud83e\udef5","+1":"\ud83d\udc4d",thumbsup:"\ud83d\udc4d","-1":"\ud83d\udc4e",thumbsdown:"\ud83d\udc4e",fist_raised:"\u270a",fist:"\u270a",fist_oncoming:"\ud83d\udc4a",facepunch:"\ud83d\udc4a",punch:"\ud83d\udc4a",fist_left:"\ud83e\udd1b",fist_right:"\ud83e\udd1c",clap:"\ud83d\udc4f",raised_hands:"\ud83d\ude4c",heart_hands:"\ud83e\udef6",open_hands:"\ud83d\udc50",palms_up_together:"\ud83e\udd32",handshake:"\ud83e\udd1d",pray:"\ud83d\ude4f",writing_hand:"\u270d\ufe0f",nail_care:"\ud83d\udc85",selfie:"\ud83e\udd33",muscle:"\ud83d\udcaa",mechanical_arm:"\ud83e\uddbe",mechanical_leg:"\ud83e\uddbf",leg:"\ud83e\uddb5",foot:"\ud83e\uddb6",ear:"\ud83d\udc42",ear_with_hearing_aid:"\ud83e\uddbb",nose:"\ud83d\udc43",brain:"\ud83e\udde0",anatomical_heart:"\ud83e\udec0",lungs:"\ud83e\udec1",tooth:"\ud83e\uddb7",bone:"\ud83e\uddb4",eyes:"\ud83d\udc40",eye:"\ud83d\udc41\ufe0f",tongue:"\ud83d\udc45",lips:"\ud83d\udc44",biting_lip:"\ud83e\udee6",baby:"\ud83d\udc76",child:"\ud83e\uddd2",boy:"\ud83d\udc66",girl:"\ud83d\udc67",adult:"\ud83e\uddd1",blond_haired_person:"\ud83d\udc71",man:"\ud83d\udc68",bearded_person:"\ud83e\uddd4",man_beard:"\ud83e\uddd4\u200d\u2642\ufe0f",woman_beard:"\ud83e\uddd4\u200d\u2640\ufe0f",red_haired_man:"\ud83d\udc68\u200d\ud83e\uddb0",curly_haired_man:"\ud83d\udc68\u200d\ud83e\uddb1",white_haired_man:"\ud83d\udc68\u200d\ud83e\uddb3",bald_man:"\ud83d\udc68\u200d\ud83e\uddb2",woman:"\ud83d\udc69",red_haired_woman:"\ud83d\udc69\u200d\ud83e\uddb0",person_red_hair:"\ud83e\uddd1\u200d\ud83e\uddb0",curly_haired_woman:"\ud83d\udc69\u200d\ud83e\uddb1",person_curly_hair:"\ud83e\uddd1\u200d\ud83e\uddb1",white_haired_woman:"\ud83d\udc69\u200d\ud83e\uddb3",person_white_hair:"\ud83e\uddd1\u200d\ud83e\uddb3",bald_woman:"\ud83d\udc69\u200d\ud83e\uddb2",person_bald:"\ud83e\uddd1\u200d\ud83e\uddb2",blond_haired_woman:"\ud83d\udc71\u200d\u2640\ufe0f",blonde_woman:"\ud83d\udc71\u200d\u2640\ufe0f",blond_haired_man:"\ud83d\udc71\u200d\u2642\ufe0f",older_adult:"\ud83e\uddd3",older_man:"\ud83d\udc74",older_woman:"\ud83d\udc75",frowning_person:"\ud83d\ude4d",frowning_man:"\ud83d\ude4d\u200d\u2642\ufe0f",frowning_woman:"\ud83d\ude4d\u200d\u2640\ufe0f",pouting_face:"\ud83d\ude4e",pouting_man:"\ud83d\ude4e\u200d\u2642\ufe0f",pouting_woman:"\ud83d\ude4e\u200d\u2640\ufe0f",no_good:"\ud83d\ude45",no_good_man:"\ud83d\ude45\u200d\u2642\ufe0f",ng_man:"\ud83d\ude45\u200d\u2642\ufe0f",no_good_woman:"\ud83d\ude45\u200d\u2640\ufe0f",ng_woman:"\ud83d\ude45\u200d\u2640\ufe0f",ok_person:"\ud83d\ude46",ok_man:"\ud83d\ude46\u200d\u2642\ufe0f",ok_woman:"\ud83d\ude46\u200d\u2640\ufe0f",tipping_hand_person:"\ud83d\udc81",information_desk_person:"\ud83d\udc81",tipping_hand_man:"\ud83d\udc81\u200d\u2642\ufe0f",sassy_man:"\ud83d\udc81\u200d\u2642\ufe0f",tipping_hand_woman:"\ud83d\udc81\u200d\u2640\ufe0f",sassy_woman:"\ud83d\udc81\u200d\u2640\ufe0f",raising_hand:"\ud83d\ude4b",raising_hand_man:"\ud83d\ude4b\u200d\u2642\ufe0f",raising_hand_woman:"\ud83d\ude4b\u200d\u2640\ufe0f",deaf_person:"\ud83e\uddcf",deaf_man:"\ud83e\uddcf\u200d\u2642\ufe0f",deaf_woman:"\ud83e\uddcf\u200d\u2640\ufe0f",bow:"\ud83d\ude47",bowing_man:"\ud83d\ude47\u200d\u2642\ufe0f",bowing_woman:"\ud83d\ude47\u200d\u2640\ufe0f",facepalm:"\ud83e\udd26",man_facepalming:"\ud83e\udd26\u200d\u2642\ufe0f",woman_facepalming:"\ud83e\udd26\u200d\u2640\ufe0f",shrug:"\ud83e\udd37",man_shrugging:"\ud83e\udd37\u200d\u2642\ufe0f",woman_shrugging:"\ud83e\udd37\u200d\u2640\ufe0f",health_worker:"\ud83e\uddd1\u200d\u2695\ufe0f",man_health_worker:"\ud83d\udc68\u200d\u2695\ufe0f",woman_health_worker:"\ud83d\udc69\u200d\u2695\ufe0f",student:"\ud83e\uddd1\u200d\ud83c\udf93",man_student:"\ud83d\udc68\u200d\ud83c\udf93",woman_student:"\ud83d\udc69\u200d\ud83c\udf93",teacher:"\ud83e\uddd1\u200d\ud83c\udfeb",man_teacher:"\ud83d\udc68\u200d\ud83c\udfeb",woman_teacher:"\ud83d\udc69\u200d\ud83c\udfeb",judge:"\ud83e\uddd1\u200d\u2696\ufe0f",man_judge:"\ud83d\udc68\u200d\u2696\ufe0f",woman_judge:"\ud83d\udc69\u200d\u2696\ufe0f",farmer:"\ud83e\uddd1\u200d\ud83c\udf3e",man_farmer:"\ud83d\udc68\u200d\ud83c\udf3e",woman_farmer:"\ud83d\udc69\u200d\ud83c\udf3e",cook:"\ud83e\uddd1\u200d\ud83c\udf73",man_cook:"\ud83d\udc68\u200d\ud83c\udf73",woman_cook:"\ud83d\udc69\u200d\ud83c\udf73",mechanic:"\ud83e\uddd1\u200d\ud83d\udd27",man_mechanic:"\ud83d\udc68\u200d\ud83d\udd27",woman_mechanic:"\ud83d\udc69\u200d\ud83d\udd27",factory_worker:"\ud83e\uddd1\u200d\ud83c\udfed",man_factory_worker:"\ud83d\udc68\u200d\ud83c\udfed",woman_factory_worker:"\ud83d\udc69\u200d\ud83c\udfed",office_worker:"\ud83e\uddd1\u200d\ud83d\udcbc",man_office_worker:"\ud83d\udc68\u200d\ud83d\udcbc",woman_office_worker:"\ud83d\udc69\u200d\ud83d\udcbc",scientist:"\ud83e\uddd1\u200d\ud83d\udd2c",man_scientist:"\ud83d\udc68\u200d\ud83d\udd2c",woman_scientist:"\ud83d\udc69\u200d\ud83d\udd2c",technologist:"\ud83e\uddd1\u200d\ud83d\udcbb",man_technologist:"\ud83d\udc68\u200d\ud83d\udcbb",woman_technologist:"\ud83d\udc69\u200d\ud83d\udcbb",singer:"\ud83e\uddd1\u200d\ud83c\udfa4",man_singer:"\ud83d\udc68\u200d\ud83c\udfa4",woman_singer:"\ud83d\udc69\u200d\ud83c\udfa4",artist:"\ud83e\uddd1\u200d\ud83c\udfa8",man_artist:"\ud83d\udc68\u200d\ud83c\udfa8",woman_artist:"\ud83d\udc69\u200d\ud83c\udfa8",pilot:"\ud83e\uddd1\u200d\u2708\ufe0f",man_pilot:"\ud83d\udc68\u200d\u2708\ufe0f",woman_pilot:"\ud83d\udc69\u200d\u2708\ufe0f",astronaut:"\ud83e\uddd1\u200d\ud83d\ude80",man_astronaut:"\ud83d\udc68\u200d\ud83d\ude80",woman_astronaut:"\ud83d\udc69\u200d\ud83d\ude80",firefighter:"\ud83e\uddd1\u200d\ud83d\ude92",man_firefighter:"\ud83d\udc68\u200d\ud83d\ude92",woman_firefighter:"\ud83d\udc69\u200d\ud83d\ude92",police_officer:"\ud83d\udc6e",cop:"\ud83d\udc6e",policeman:"\ud83d\udc6e\u200d\u2642\ufe0f",policewoman:"\ud83d\udc6e\u200d\u2640\ufe0f",detective:"\ud83d\udd75\ufe0f",male_detective:"\ud83d\udd75\ufe0f\u200d\u2642\ufe0f",female_detective:"\ud83d\udd75\ufe0f\u200d\u2640\ufe0f",guard:"\ud83d\udc82",guardsman:"\ud83d\udc82\u200d\u2642\ufe0f",guardswoman:"\ud83d\udc82\u200d\u2640\ufe0f",ninja:"\ud83e\udd77",construction_worker:"\ud83d\udc77",construction_worker_man:"\ud83d\udc77\u200d\u2642\ufe0f",construction_worker_woman:"\ud83d\udc77\u200d\u2640\ufe0f",person_with_crown:"\ud83e\udec5",prince:"\ud83e\udd34",princess:"\ud83d\udc78",person_with_turban:"\ud83d\udc73",man_with_turban:"\ud83d\udc73\u200d\u2642\ufe0f",woman_with_turban:"\ud83d\udc73\u200d\u2640\ufe0f",man_with_gua_pi_mao:"\ud83d\udc72",woman_with_headscarf:"\ud83e\uddd5",person_in_tuxedo:"\ud83e\udd35",man_in_tuxedo:"\ud83e\udd35\u200d\u2642\ufe0f",woman_in_tuxedo:"\ud83e\udd35\u200d\u2640\ufe0f",person_with_veil:"\ud83d\udc70",man_with_veil:"\ud83d\udc70\u200d\u2642\ufe0f",woman_with_veil:"\ud83d\udc70\u200d\u2640\ufe0f",bride_with_veil:"\ud83d\udc70\u200d\u2640\ufe0f",pregnant_woman:"\ud83e\udd30",pregnant_man:"\ud83e\udec3",pregnant_person:"\ud83e\udec4",breast_feeding:"\ud83e\udd31",woman_feeding_baby:"\ud83d\udc69\u200d\ud83c\udf7c",man_feeding_baby:"\ud83d\udc68\u200d\ud83c\udf7c",person_feeding_baby:"\ud83e\uddd1\u200d\ud83c\udf7c",angel:"\ud83d\udc7c",santa:"\ud83c\udf85",mrs_claus:"\ud83e\udd36",mx_claus:"\ud83e\uddd1\u200d\ud83c\udf84",superhero:"\ud83e\uddb8",superhero_man:"\ud83e\uddb8\u200d\u2642\ufe0f",superhero_woman:"\ud83e\uddb8\u200d\u2640\ufe0f",supervillain:"\ud83e\uddb9",supervillain_man:"\ud83e\uddb9\u200d\u2642\ufe0f",supervillain_woman:"\ud83e\uddb9\u200d\u2640\ufe0f",mage:"\ud83e\uddd9",mage_man:"\ud83e\uddd9\u200d\u2642\ufe0f",mage_woman:"\ud83e\uddd9\u200d\u2640\ufe0f",fairy:"\ud83e\uddda",fairy_man:"\ud83e\uddda\u200d\u2642\ufe0f",fairy_woman:"\ud83e\uddda\u200d\u2640\ufe0f",vampire:"\ud83e\udddb",vampire_man:"\ud83e\udddb\u200d\u2642\ufe0f",vampire_woman:"\ud83e\udddb\u200d\u2640\ufe0f",merperson:"\ud83e\udddc",merman:"\ud83e\udddc\u200d\u2642\ufe0f",mermaid:"\ud83e\udddc\u200d\u2640\ufe0f",elf:"\ud83e\udddd",elf_man:"\ud83e\udddd\u200d\u2642\ufe0f",elf_woman:"\ud83e\udddd\u200d\u2640\ufe0f",genie:"\ud83e\uddde",genie_man:"\ud83e\uddde\u200d\u2642\ufe0f",genie_woman:"\ud83e\uddde\u200d\u2640\ufe0f",zombie:"\ud83e\udddf",zombie_man:"\ud83e\udddf\u200d\u2642\ufe0f",zombie_woman:"\ud83e\udddf\u200d\u2640\ufe0f",troll:"\ud83e\uddcc",massage:"\ud83d\udc86",massage_man:"\ud83d\udc86\u200d\u2642\ufe0f",massage_woman:"\ud83d\udc86\u200d\u2640\ufe0f",haircut:"\ud83d\udc87",haircut_man:"\ud83d\udc87\u200d\u2642\ufe0f",haircut_woman:"\ud83d\udc87\u200d\u2640\ufe0f",walking:"\ud83d\udeb6",walking_man:"\ud83d\udeb6\u200d\u2642\ufe0f",walking_woman:"\ud83d\udeb6\u200d\u2640\ufe0f",standing_person:"\ud83e\uddcd",standing_man:"\ud83e\uddcd\u200d\u2642\ufe0f",standing_woman:"\ud83e\uddcd\u200d\u2640\ufe0f",kneeling_person:"\ud83e\uddce",kneeling_man:"\ud83e\uddce\u200d\u2642\ufe0f",kneeling_woman:"\ud83e\uddce\u200d\u2640\ufe0f",person_with_probing_cane:"\ud83e\uddd1\u200d\ud83e\uddaf",man_with_probing_cane:"\ud83d\udc68\u200d\ud83e\uddaf",woman_with_probing_cane:"\ud83d\udc69\u200d\ud83e\uddaf",person_in_motorized_wheelchair:"\ud83e\uddd1\u200d\ud83e\uddbc",man_in_motorized_wheelchair:"\ud83d\udc68\u200d\ud83e\uddbc",woman_in_motorized_wheelchair:"\ud83d\udc69\u200d\ud83e\uddbc",person_in_manual_wheelchair:"\ud83e\uddd1\u200d\ud83e\uddbd",man_in_manual_wheelchair:"\ud83d\udc68\u200d\ud83e\uddbd",woman_in_manual_wheelchair:"\ud83d\udc69\u200d\ud83e\uddbd",runner:"\ud83c\udfc3",running:"\ud83c\udfc3",running_man:"\ud83c\udfc3\u200d\u2642\ufe0f",running_woman:"\ud83c\udfc3\u200d\u2640\ufe0f",woman_dancing:"\ud83d\udc83",dancer:"\ud83d\udc83",man_dancing:"\ud83d\udd7a",business_suit_levitating:"\ud83d\udd74\ufe0f",dancers:"\ud83d\udc6f",dancing_men:"\ud83d\udc6f\u200d\u2642\ufe0f",dancing_women:"\ud83d\udc6f\u200d\u2640\ufe0f",sauna_person:"\ud83e\uddd6",sauna_man:"\ud83e\uddd6\u200d\u2642\ufe0f",sauna_woman:"\ud83e\uddd6\u200d\u2640\ufe0f",climbing:"\ud83e\uddd7",climbing_man:"\ud83e\uddd7\u200d\u2642\ufe0f",climbing_woman:"\ud83e\uddd7\u200d\u2640\ufe0f",person_fencing:"\ud83e\udd3a",horse_racing:"\ud83c\udfc7",skier:"\u26f7\ufe0f",snowboarder:"\ud83c\udfc2",golfing:"\ud83c\udfcc\ufe0f",golfing_man:"\ud83c\udfcc\ufe0f\u200d\u2642\ufe0f",golfing_woman:"\ud83c\udfcc\ufe0f\u200d\u2640\ufe0f",surfer:"\ud83c\udfc4",surfing_man:"\ud83c\udfc4\u200d\u2642\ufe0f",surfing_woman:"\ud83c\udfc4\u200d\u2640\ufe0f",rowboat:"\ud83d\udea3",rowing_man:"\ud83d\udea3\u200d\u2642\ufe0f",rowing_woman:"\ud83d\udea3\u200d\u2640\ufe0f",swimmer:"\ud83c\udfca",swimming_man:"\ud83c\udfca\u200d\u2642\ufe0f",swimming_woman:"\ud83c\udfca\u200d\u2640\ufe0f",bouncing_ball_person:"\u26f9\ufe0f",bouncing_ball_man:"\u26f9\ufe0f\u200d\u2642\ufe0f",basketball_man:"\u26f9\ufe0f\u200d\u2642\ufe0f",bouncing_ball_woman:"\u26f9\ufe0f\u200d\u2640\ufe0f",basketball_woman:"\u26f9\ufe0f\u200d\u2640\ufe0f",weight_lifting:"\ud83c\udfcb\ufe0f",weight_lifting_man:"\ud83c\udfcb\ufe0f\u200d\u2642\ufe0f",weight_lifting_woman:"\ud83c\udfcb\ufe0f\u200d\u2640\ufe0f",bicyclist:"\ud83d\udeb4",biking_man:"\ud83d\udeb4\u200d\u2642\ufe0f",biking_woman:"\ud83d\udeb4\u200d\u2640\ufe0f",mountain_bicyclist:"\ud83d\udeb5",mountain_biking_man:"\ud83d\udeb5\u200d\u2642\ufe0f",mountain_biking_woman:"\ud83d\udeb5\u200d\u2640\ufe0f",cartwheeling:"\ud83e\udd38",man_cartwheeling:"\ud83e\udd38\u200d\u2642\ufe0f",woman_cartwheeling:"\ud83e\udd38\u200d\u2640\ufe0f",wrestling:"\ud83e\udd3c",men_wrestling:"\ud83e\udd3c\u200d\u2642\ufe0f",women_wrestling:"\ud83e\udd3c\u200d\u2640\ufe0f",water_polo:"\ud83e\udd3d",man_playing_water_polo:"\ud83e\udd3d\u200d\u2642\ufe0f",woman_playing_water_polo:"\ud83e\udd3d\u200d\u2640\ufe0f",handball_person:"\ud83e\udd3e",man_playing_handball:"\ud83e\udd3e\u200d\u2642\ufe0f",woman_playing_handball:"\ud83e\udd3e\u200d\u2640\ufe0f",juggling_person:"\ud83e\udd39",man_juggling:"\ud83e\udd39\u200d\u2642\ufe0f",woman_juggling:"\ud83e\udd39\u200d\u2640\ufe0f",lotus_position:"\ud83e\uddd8",lotus_position_man:"\ud83e\uddd8\u200d\u2642\ufe0f",lotus_position_woman:"\ud83e\uddd8\u200d\u2640\ufe0f",bath:"\ud83d\udec0",sleeping_bed:"\ud83d\udecc",people_holding_hands:"\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1",two_women_holding_hands:"\ud83d\udc6d",couple:"\ud83d\udc6b",two_men_holding_hands:"\ud83d\udc6c",couplekiss:"\ud83d\udc8f",couplekiss_man_woman:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68",couplekiss_man_man:"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68",couplekiss_woman_woman:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69",couple_with_heart:"\ud83d\udc91",couple_with_heart_woman_man:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc68",couple_with_heart_man_man:"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68",couple_with_heart_woman_woman:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc69",family:"\ud83d\udc6a",family_man_woman_boy:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66",family_man_woman_girl:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67",family_man_woman_girl_boy:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",family_man_woman_boy_boy:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",family_man_woman_girl_girl:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",family_man_man_boy:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66",family_man_man_girl:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67",family_man_man_girl_boy:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc66",family_man_man_boy_boy:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66",family_man_man_girl_girl:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc67",family_woman_woman_boy:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66",family_woman_woman_girl:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67",family_woman_woman_girl_boy:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",family_woman_woman_boy_boy:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",family_woman_woman_girl_girl:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",family_man_boy:"\ud83d\udc68\u200d\ud83d\udc66",family_man_boy_boy:"\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66",family_man_girl:"\ud83d\udc68\u200d\ud83d\udc67",family_man_girl_boy:"\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc66",family_man_girl_girl:"\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc67",family_woman_boy:"\ud83d\udc69\u200d\ud83d\udc66",family_woman_boy_boy:"\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",family_woman_girl:"\ud83d\udc69\u200d\ud83d\udc67",family_woman_girl_boy:"\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",family_woman_girl_girl:"\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",speaking_head:"\ud83d\udde3\ufe0f",bust_in_silhouette:"\ud83d\udc64",busts_in_silhouette:"\ud83d\udc65",people_hugging:"\ud83e\udec2",footprints:"\ud83d\udc63",monkey_face:"\ud83d\udc35",monkey:"\ud83d\udc12",gorilla:"\ud83e\udd8d",orangutan:"\ud83e\udda7",dog:"\ud83d\udc36",dog2:"\ud83d\udc15",guide_dog:"\ud83e\uddae",service_dog:"\ud83d\udc15\u200d\ud83e\uddba",poodle:"\ud83d\udc29",wolf:"\ud83d\udc3a",fox_face:"\ud83e\udd8a",raccoon:"\ud83e\udd9d",cat:"\ud83d\udc31",cat2:"\ud83d\udc08",black_cat:"\ud83d\udc08\u200d\u2b1b",lion:"\ud83e\udd81",tiger:"\ud83d\udc2f",tiger2:"\ud83d\udc05",leopard:"\ud83d\udc06",horse:"\ud83d\udc34",moose:"\ud83e\udece",donkey:"\ud83e\udecf",racehorse:"\ud83d\udc0e",unicorn:"\ud83e\udd84",zebra:"\ud83e\udd93",deer:"\ud83e\udd8c",bison:"\ud83e\uddac",cow:"\ud83d\udc2e",ox:"\ud83d\udc02",water_buffalo:"\ud83d\udc03",cow2:"\ud83d\udc04",pig:"\ud83d\udc37",pig2:"\ud83d\udc16",boar:"\ud83d\udc17",pig_nose:"\ud83d\udc3d",ram:"\ud83d\udc0f",sheep:"\ud83d\udc11",goat:"\ud83d\udc10",dromedary_camel:"\ud83d\udc2a",camel:"\ud83d\udc2b",llama:"\ud83e\udd99",giraffe:"\ud83e\udd92",elephant:"\ud83d\udc18",mammoth:"\ud83e\udda3",rhinoceros:"\ud83e\udd8f",hippopotamus:"\ud83e\udd9b",mouse:"\ud83d\udc2d",mouse2:"\ud83d\udc01",rat:"\ud83d\udc00",hamster:"\ud83d\udc39",rabbit:"\ud83d\udc30",rabbit2:"\ud83d\udc07",chipmunk:"\ud83d\udc3f\ufe0f",beaver:"\ud83e\uddab",hedgehog:"\ud83e\udd94",bat:"\ud83e\udd87",bear:"\ud83d\udc3b",polar_bear:"\ud83d\udc3b\u200d\u2744\ufe0f",koala:"\ud83d\udc28",panda_face:"\ud83d\udc3c",sloth:"\ud83e\udda5",otter:"\ud83e\udda6",skunk:"\ud83e\udda8",kangaroo:"\ud83e\udd98",badger:"\ud83e\udda1",feet:"\ud83d\udc3e",paw_prints:"\ud83d\udc3e",turkey:"\ud83e\udd83",chicken:"\ud83d\udc14",rooster:"\ud83d\udc13",hatching_chick:"\ud83d\udc23",baby_chick:"\ud83d\udc24",hatched_chick:"\ud83d\udc25",bird:"\ud83d\udc26",penguin:"\ud83d\udc27",dove:"\ud83d\udd4a\ufe0f",eagle:"\ud83e\udd85",duck:"\ud83e\udd86",swan:"\ud83e\udda2",owl:"\ud83e\udd89",dodo:"\ud83e\udda4",feather:"\ud83e\udeb6",flamingo:"\ud83e\udda9",peacock:"\ud83e\udd9a",parrot:"\ud83e\udd9c",wing:"\ud83e\udebd",black_bird:"\ud83d\udc26\u200d\u2b1b",goose:"\ud83e\udebf",frog:"\ud83d\udc38",crocodile:"\ud83d\udc0a",turtle:"\ud83d\udc22",lizard:"\ud83e\udd8e",snake:"\ud83d\udc0d",dragon_face:"\ud83d\udc32",dragon:"\ud83d\udc09",sauropod:"\ud83e\udd95","t-rex":"\ud83e\udd96",whale:"\ud83d\udc33",whale2:"\ud83d\udc0b",dolphin:"\ud83d\udc2c",flipper:"\ud83d\udc2c",seal:"\ud83e\uddad",fish:"\ud83d\udc1f",tropical_fish:"\ud83d\udc20",blowfish:"\ud83d\udc21",shark:"\ud83e\udd88",octopus:"\ud83d\udc19",shell:"\ud83d\udc1a",coral:"\ud83e\udeb8",jellyfish:"\ud83e\udebc",snail:"\ud83d\udc0c",butterfly:"\ud83e\udd8b",bug:"\ud83d\udc1b",ant:"\ud83d\udc1c",bee:"\ud83d\udc1d",honeybee:"\ud83d\udc1d",beetle:"\ud83e\udeb2",lady_beetle:"\ud83d\udc1e",cricket:"\ud83e\udd97",cockroach:"\ud83e\udeb3",spider:"\ud83d\udd77\ufe0f",spider_web:"\ud83d\udd78\ufe0f",scorpion:"\ud83e\udd82",mosquito:"\ud83e\udd9f",fly:"\ud83e\udeb0",worm:"\ud83e\udeb1",microbe:"\ud83e\udda0",bouquet:"\ud83d\udc90",cherry_blossom:"\ud83c\udf38",white_flower:"\ud83d\udcae",lotus:"\ud83e\udeb7",rosette:"\ud83c\udff5\ufe0f",rose:"\ud83c\udf39",wilted_flower:"\ud83e\udd40",hibiscus:"\ud83c\udf3a",sunflower:"\ud83c\udf3b",blossom:"\ud83c\udf3c",tulip:"\ud83c\udf37",hyacinth:"\ud83e\udebb",seedling:"\ud83c\udf31",potted_plant:"\ud83e\udeb4",evergreen_tree:"\ud83c\udf32",deciduous_tree:"\ud83c\udf33",palm_tree:"\ud83c\udf34",cactus:"\ud83c\udf35",ear_of_rice:"\ud83c\udf3e",herb:"\ud83c\udf3f",shamrock:"\u2618\ufe0f",four_leaf_clover:"\ud83c\udf40",maple_leaf:"\ud83c\udf41",fallen_leaf:"\ud83c\udf42",leaves:"\ud83c\udf43",empty_nest:"\ud83e\udeb9",nest_with_eggs:"\ud83e\udeba",mushroom:"\ud83c\udf44",grapes:"\ud83c\udf47",melon:"\ud83c\udf48",watermelon:"\ud83c\udf49",tangerine:"\ud83c\udf4a",orange:"\ud83c\udf4a",mandarin:"\ud83c\udf4a",lemon:"\ud83c\udf4b",banana:"\ud83c\udf4c",pineapple:"\ud83c\udf4d",mango:"\ud83e\udd6d",apple:"\ud83c\udf4e",green_apple:"\ud83c\udf4f",pear:"\ud83c\udf50",peach:"\ud83c\udf51",cherries:"\ud83c\udf52",strawberry:"\ud83c\udf53",blueberries:"\ud83e\uded0",kiwi_fruit:"\ud83e\udd5d",tomato:"\ud83c\udf45",olive:"\ud83e\uded2",coconut:"\ud83e\udd65",avocado:"\ud83e\udd51",eggplant:"\ud83c\udf46",potato:"\ud83e\udd54",carrot:"\ud83e\udd55",corn:"\ud83c\udf3d",hot_pepper:"\ud83c\udf36\ufe0f",bell_pepper:"\ud83e\uded1",cucumber:"\ud83e\udd52",leafy_green:"\ud83e\udd6c",broccoli:"\ud83e\udd66",garlic:"\ud83e\uddc4",onion:"\ud83e\uddc5",peanuts:"\ud83e\udd5c",beans:"\ud83e\uded8",chestnut:"\ud83c\udf30",ginger_root:"\ud83e\udeda",pea_pod:"\ud83e\udedb",bread:"\ud83c\udf5e",croissant:"\ud83e\udd50",baguette_bread:"\ud83e\udd56",flatbread:"\ud83e\uded3",pretzel:"\ud83e\udd68",bagel:"\ud83e\udd6f",pancakes:"\ud83e\udd5e",waffle:"\ud83e\uddc7",cheese:"\ud83e\uddc0",meat_on_bone:"\ud83c\udf56",poultry_leg:"\ud83c\udf57",cut_of_meat:"\ud83e\udd69",bacon:"\ud83e\udd53",hamburger:"\ud83c\udf54",fries:"\ud83c\udf5f",pizza:"\ud83c\udf55",hotdog:"\ud83c\udf2d",sandwich:"\ud83e\udd6a",taco:"\ud83c\udf2e",burrito:"\ud83c\udf2f",tamale:"\ud83e\uded4",stuffed_flatbread:"\ud83e\udd59",falafel:"\ud83e\uddc6",egg:"\ud83e\udd5a",fried_egg:"\ud83c\udf73",shallow_pan_of_food:"\ud83e\udd58",stew:"\ud83c\udf72",fondue:"\ud83e\uded5",bowl_with_spoon:"\ud83e\udd63",green_salad:"\ud83e\udd57",popcorn:"\ud83c\udf7f",butter:"\ud83e\uddc8",salt:"\ud83e\uddc2",canned_food:"\ud83e\udd6b",bento:"\ud83c\udf71",rice_cracker:"\ud83c\udf58",rice_ball:"\ud83c\udf59",rice:"\ud83c\udf5a",curry:"\ud83c\udf5b",ramen:"\ud83c\udf5c",spaghetti:"\ud83c\udf5d",sweet_potato:"\ud83c\udf60",oden:"\ud83c\udf62",sushi:"\ud83c\udf63",fried_shrimp:"\ud83c\udf64",fish_cake:"\ud83c\udf65",moon_cake:"\ud83e\udd6e",dango:"\ud83c\udf61",dumpling:"\ud83e\udd5f",fortune_cookie:"\ud83e\udd60",takeout_box:"\ud83e\udd61",crab:"\ud83e\udd80",lobster:"\ud83e\udd9e",shrimp:"\ud83e\udd90",squid:"\ud83e\udd91",oyster:"\ud83e\uddaa",icecream:"\ud83c\udf66",shaved_ice:"\ud83c\udf67",ice_cream:"\ud83c\udf68",doughnut:"\ud83c\udf69",cookie:"\ud83c\udf6a",birthday:"\ud83c\udf82",cake:"\ud83c\udf70",cupcake:"\ud83e\uddc1",pie:"\ud83e\udd67",chocolate_bar:"\ud83c\udf6b",candy:"\ud83c\udf6c",lollipop:"\ud83c\udf6d",custard:"\ud83c\udf6e",honey_pot:"\ud83c\udf6f",baby_bottle:"\ud83c\udf7c",milk_glass:"\ud83e\udd5b",coffee:"\u2615",teapot:"\ud83e\uded6",tea:"\ud83c\udf75",sake:"\ud83c\udf76",champagne:"\ud83c\udf7e",wine_glass:"\ud83c\udf77",cocktail:"\ud83c\udf78",tropical_drink:"\ud83c\udf79",beer:"\ud83c\udf7a",beers:"\ud83c\udf7b",clinking_glasses:"\ud83e\udd42",tumbler_glass:"\ud83e\udd43",pouring_liquid:"\ud83e\uded7",cup_with_straw:"\ud83e\udd64",bubble_tea:"\ud83e\uddcb",beverage_box:"\ud83e\uddc3",mate:"\ud83e\uddc9",ice_cube:"\ud83e\uddca",chopsticks:"\ud83e\udd62",plate_with_cutlery:"\ud83c\udf7d\ufe0f",fork_and_knife:"\ud83c\udf74",spoon:"\ud83e\udd44",hocho:"\ud83d\udd2a",knife:"\ud83d\udd2a",jar:"\ud83e\uded9",amphora:"\ud83c\udffa",earth_africa:"\ud83c\udf0d",earth_americas:"\ud83c\udf0e",earth_asia:"\ud83c\udf0f",globe_with_meridians:"\ud83c\udf10",world_map:"\ud83d\uddfa\ufe0f",japan:"\ud83d\uddfe",compass:"\ud83e\udded",mountain_snow:"\ud83c\udfd4\ufe0f",mountain:"\u26f0\ufe0f",volcano:"\ud83c\udf0b",mount_fuji:"\ud83d\uddfb",camping:"\ud83c\udfd5\ufe0f",beach_umbrella:"\ud83c\udfd6\ufe0f",desert:"\ud83c\udfdc\ufe0f",desert_island:"\ud83c\udfdd\ufe0f",national_park:"\ud83c\udfde\ufe0f",stadium:"\ud83c\udfdf\ufe0f",classical_building:"\ud83c\udfdb\ufe0f",building_construction:"\ud83c\udfd7\ufe0f",bricks:"\ud83e\uddf1",rock:"\ud83e\udea8",wood:"\ud83e\udeb5",hut:"\ud83d\uded6",houses:"\ud83c\udfd8\ufe0f",derelict_house:"\ud83c\udfda\ufe0f",house:"\ud83c\udfe0",house_with_garden:"\ud83c\udfe1",office:"\ud83c\udfe2",post_office:"\ud83c\udfe3",european_post_office:"\ud83c\udfe4",hospital:"\ud83c\udfe5",bank:"\ud83c\udfe6",hotel:"\ud83c\udfe8",love_hotel:"\ud83c\udfe9",convenience_store:"\ud83c\udfea",school:"\ud83c\udfeb",department_store:"\ud83c\udfec",factory:"\ud83c\udfed",japanese_castle:"\ud83c\udfef",european_castle:"\ud83c\udff0",wedding:"\ud83d\udc92",tokyo_tower:"\ud83d\uddfc",statue_of_liberty:"\ud83d\uddfd",church:"\u26ea",mosque:"\ud83d\udd4c",hindu_temple:"\ud83d\uded5",synagogue:"\ud83d\udd4d",shinto_shrine:"\u26e9\ufe0f",kaaba:"\ud83d\udd4b",fountain:"\u26f2",tent:"\u26fa",foggy:"\ud83c\udf01",night_with_stars:"\ud83c\udf03",cityscape:"\ud83c\udfd9\ufe0f",sunrise_over_mountains:"\ud83c\udf04",sunrise:"\ud83c\udf05",city_sunset:"\ud83c\udf06",city_sunrise:"\ud83c\udf07",bridge_at_night:"\ud83c\udf09",hotsprings:"\u2668\ufe0f",carousel_horse:"\ud83c\udfa0",playground_slide:"\ud83d\udedd",ferris_wheel:"\ud83c\udfa1",roller_coaster:"\ud83c\udfa2",barber:"\ud83d\udc88",circus_tent:"\ud83c\udfaa",steam_locomotive:"\ud83d\ude82",railway_car:"\ud83d\ude83",bullettrain_side:"\ud83d\ude84",bullettrain_front:"\ud83d\ude85",train2:"\ud83d\ude86",metro:"\ud83d\ude87",light_rail:"\ud83d\ude88",station:"\ud83d\ude89",tram:"\ud83d\ude8a",monorail:"\ud83d\ude9d",mountain_railway:"\ud83d\ude9e",train:"\ud83d\ude8b",bus:"\ud83d\ude8c",oncoming_bus:"\ud83d\ude8d",trolleybus:"\ud83d\ude8e",minibus:"\ud83d\ude90",ambulance:"\ud83d\ude91",fire_engine:"\ud83d\ude92",police_car:"\ud83d\ude93",oncoming_police_car:"\ud83d\ude94",taxi:"\ud83d\ude95",oncoming_taxi:"\ud83d\ude96",car:"\ud83d\ude97",red_car:"\ud83d\ude97",oncoming_automobile:"\ud83d\ude98",blue_car:"\ud83d\ude99",pickup_truck:"\ud83d\udefb",truck:"\ud83d\ude9a",articulated_lorry:"\ud83d\ude9b",tractor:"\ud83d\ude9c",racing_car:"\ud83c\udfce\ufe0f",motorcycle:"\ud83c\udfcd\ufe0f",motor_scooter:"\ud83d\udef5",manual_wheelchair:"\ud83e\uddbd",motorized_wheelchair:"\ud83e\uddbc",auto_rickshaw:"\ud83d\udefa",bike:"\ud83d\udeb2",kick_scooter:"\ud83d\udef4",skateboard:"\ud83d\udef9",roller_skate:"\ud83d\udefc",busstop:"\ud83d\ude8f",motorway:"\ud83d\udee3\ufe0f",railway_track:"\ud83d\udee4\ufe0f",oil_drum:"\ud83d\udee2\ufe0f",fuelpump:"\u26fd",wheel:"\ud83d\udede",rotating_light:"\ud83d\udea8",traffic_light:"\ud83d\udea5",vertical_traffic_light:"\ud83d\udea6",stop_sign:"\ud83d\uded1",construction:"\ud83d\udea7",anchor:"\u2693",ring_buoy:"\ud83d\udedf",boat:"\u26f5",sailboat:"\u26f5",canoe:"\ud83d\udef6",speedboat:"\ud83d\udea4",passenger_ship:"\ud83d\udef3\ufe0f",ferry:"\u26f4\ufe0f",motor_boat:"\ud83d\udee5\ufe0f",ship:"\ud83d\udea2",airplane:"\u2708\ufe0f",small_airplane:"\ud83d\udee9\ufe0f",flight_departure:"\ud83d\udeeb",flight_arrival:"\ud83d\udeec",parachute:"\ud83e\ude82",seat:"\ud83d\udcba",helicopter:"\ud83d\ude81",suspension_railway:"\ud83d\ude9f",mountain_cableway:"\ud83d\udea0",aerial_tramway:"\ud83d\udea1",artificial_satellite:"\ud83d\udef0\ufe0f",rocket:"\ud83d\ude80",flying_saucer:"\ud83d\udef8",bellhop_bell:"\ud83d\udece\ufe0f",luggage:"\ud83e\uddf3",hourglass:"\u231b",hourglass_flowing_sand:"\u23f3",watch:"\u231a",alarm_clock:"\u23f0",stopwatch:"\u23f1\ufe0f",timer_clock:"\u23f2\ufe0f",mantelpiece_clock:"\ud83d\udd70\ufe0f",clock12:"\ud83d\udd5b",clock1230:"\ud83d\udd67",clock1:"\ud83d\udd50",clock130:"\ud83d\udd5c",clock2:"\ud83d\udd51",clock230:"\ud83d\udd5d",clock3:"\ud83d\udd52",clock330:"\ud83d\udd5e",clock4:"\ud83d\udd53",clock430:"\ud83d\udd5f",clock5:"\ud83d\udd54",clock530:"\ud83d\udd60",clock6:"\ud83d\udd55",clock630:"\ud83d\udd61",clock7:"\ud83d\udd56",clock730:"\ud83d\udd62",clock8:"\ud83d\udd57",clock830:"\ud83d\udd63",clock9:"\ud83d\udd58",clock930:"\ud83d\udd64",clock10:"\ud83d\udd59",clock1030:"\ud83d\udd65",clock11:"\ud83d\udd5a",clock1130:"\ud83d\udd66",new_moon:"\ud83c\udf11",waxing_crescent_moon:"\ud83c\udf12",first_quarter_moon:"\ud83c\udf13",moon:"\ud83c\udf14",waxing_gibbous_moon:"\ud83c\udf14",full_moon:"\ud83c\udf15",waning_gibbous_moon:"\ud83c\udf16",last_quarter_moon:"\ud83c\udf17",waning_crescent_moon:"\ud83c\udf18",crescent_moon:"\ud83c\udf19",new_moon_with_face:"\ud83c\udf1a",first_quarter_moon_with_face:"\ud83c\udf1b",last_quarter_moon_with_face:"\ud83c\udf1c",thermometer:"\ud83c\udf21\ufe0f",sunny:"\u2600\ufe0f",full_moon_with_face:"\ud83c\udf1d",sun_with_face:"\ud83c\udf1e",ringed_planet:"\ud83e\ude90",star:"\u2b50",star2:"\ud83c\udf1f",stars:"\ud83c\udf20",milky_way:"\ud83c\udf0c",cloud:"\u2601\ufe0f",partly_sunny:"\u26c5",cloud_with_lightning_and_rain:"\u26c8\ufe0f",sun_behind_small_cloud:"\ud83c\udf24\ufe0f",sun_behind_large_cloud:"\ud83c\udf25\ufe0f",sun_behind_rain_cloud:"\ud83c\udf26\ufe0f",cloud_with_rain:"\ud83c\udf27\ufe0f",cloud_with_snow:"\ud83c\udf28\ufe0f",cloud_with_lightning:"\ud83c\udf29\ufe0f",tornado:"\ud83c\udf2a\ufe0f",fog:"\ud83c\udf2b\ufe0f",wind_face:"\ud83c\udf2c\ufe0f",cyclone:"\ud83c\udf00",rainbow:"\ud83c\udf08",closed_umbrella:"\ud83c\udf02",open_umbrella:"\u2602\ufe0f",umbrella:"\u2614",parasol_on_ground:"\u26f1\ufe0f",zap:"\u26a1",snowflake:"\u2744\ufe0f",snowman_with_snow:"\u2603\ufe0f",snowman:"\u26c4",comet:"\u2604\ufe0f",fire:"\ud83d\udd25",droplet:"\ud83d\udca7",ocean:"\ud83c\udf0a",jack_o_lantern:"\ud83c\udf83",christmas_tree:"\ud83c\udf84",fireworks:"\ud83c\udf86",sparkler:"\ud83c\udf87",firecracker:"\ud83e\udde8",sparkles:"\u2728",balloon:"\ud83c\udf88",tada:"\ud83c\udf89",confetti_ball:"\ud83c\udf8a",tanabata_tree:"\ud83c\udf8b",bamboo:"\ud83c\udf8d",dolls:"\ud83c\udf8e",flags:"\ud83c\udf8f",wind_chime:"\ud83c\udf90",rice_scene:"\ud83c\udf91",red_envelope:"\ud83e\udde7",ribbon:"\ud83c\udf80",gift:"\ud83c\udf81",reminder_ribbon:"\ud83c\udf97\ufe0f",tickets:"\ud83c\udf9f\ufe0f",ticket:"\ud83c\udfab",medal_military:"\ud83c\udf96\ufe0f",trophy:"\ud83c\udfc6",medal_sports:"\ud83c\udfc5","1st_place_medal":"\ud83e\udd47","2nd_place_medal":"\ud83e\udd48","3rd_place_medal":"\ud83e\udd49",soccer:"\u26bd",baseball:"\u26be",softball:"\ud83e\udd4e",basketball:"\ud83c\udfc0",volleyball:"\ud83c\udfd0",football:"\ud83c\udfc8",rugby_football:"\ud83c\udfc9",tennis:"\ud83c\udfbe",flying_disc:"\ud83e\udd4f",bowling:"\ud83c\udfb3",cricket_game:"\ud83c\udfcf",field_hockey:"\ud83c\udfd1",ice_hockey:"\ud83c\udfd2",lacrosse:"\ud83e\udd4d",ping_pong:"\ud83c\udfd3",badminton:"\ud83c\udff8",boxing_glove:"\ud83e\udd4a",martial_arts_uniform:"\ud83e\udd4b",goal_net:"\ud83e\udd45",golf:"\u26f3",ice_skate:"\u26f8\ufe0f",fishing_pole_and_fish:"\ud83c\udfa3",diving_mask:"\ud83e\udd3f",running_shirt_with_sash:"\ud83c\udfbd",ski:"\ud83c\udfbf",sled:"\ud83d\udef7",curling_stone:"\ud83e\udd4c",dart:"\ud83c\udfaf",yo_yo:"\ud83e\ude80",kite:"\ud83e\ude81",gun:"\ud83d\udd2b","8ball":"\ud83c\udfb1",crystal_ball:"\ud83d\udd2e",magic_wand:"\ud83e\ude84",video_game:"\ud83c\udfae",joystick:"\ud83d\udd79\ufe0f",slot_machine:"\ud83c\udfb0",game_die:"\ud83c\udfb2",jigsaw:"\ud83e\udde9",teddy_bear:"\ud83e\uddf8",pinata:"\ud83e\ude85",mirror_ball:"\ud83e\udea9",nesting_dolls:"\ud83e\ude86",spades:"\u2660\ufe0f",hearts:"\u2665\ufe0f",diamonds:"\u2666\ufe0f",clubs:"\u2663\ufe0f",chess_pawn:"\u265f\ufe0f",black_joker:"\ud83c\udccf",mahjong:"\ud83c\udc04",flower_playing_cards:"\ud83c\udfb4",performing_arts:"\ud83c\udfad",framed_picture:"\ud83d\uddbc\ufe0f",art:"\ud83c\udfa8",thread:"\ud83e\uddf5",sewing_needle:"\ud83e\udea1",yarn:"\ud83e\uddf6",knot:"\ud83e\udea2",eyeglasses:"\ud83d\udc53",dark_sunglasses:"\ud83d\udd76\ufe0f",goggles:"\ud83e\udd7d",lab_coat:"\ud83e\udd7c",safety_vest:"\ud83e\uddba",necktie:"\ud83d\udc54",shirt:"\ud83d\udc55",tshirt:"\ud83d\udc55",jeans:"\ud83d\udc56",scarf:"\ud83e\udde3",gloves:"\ud83e\udde4",coat:"\ud83e\udde5",socks:"\ud83e\udde6",dress:"\ud83d\udc57",kimono:"\ud83d\udc58",sari:"\ud83e\udd7b",one_piece_swimsuit:"\ud83e\ude71",swim_brief:"\ud83e\ude72",shorts:"\ud83e\ude73",bikini:"\ud83d\udc59",womans_clothes:"\ud83d\udc5a",folding_hand_fan:"\ud83e\udead",purse:"\ud83d\udc5b",handbag:"\ud83d\udc5c",pouch:"\ud83d\udc5d",shopping:"\ud83d\udecd\ufe0f",school_satchel:"\ud83c\udf92",thong_sandal:"\ud83e\ude74",mans_shoe:"\ud83d\udc5e",shoe:"\ud83d\udc5e",athletic_shoe:"\ud83d\udc5f",hiking_boot:"\ud83e\udd7e",flat_shoe:"\ud83e\udd7f",high_heel:"\ud83d\udc60",sandal:"\ud83d\udc61",ballet_shoes:"\ud83e\ude70",boot:"\ud83d\udc62",hair_pick:"\ud83e\udeae",crown:"\ud83d\udc51",womans_hat:"\ud83d\udc52",tophat:"\ud83c\udfa9",mortar_board:"\ud83c\udf93",billed_cap:"\ud83e\udde2",military_helmet:"\ud83e\ude96",rescue_worker_helmet:"\u26d1\ufe0f",prayer_beads:"\ud83d\udcff",lipstick:"\ud83d\udc84",ring:"\ud83d\udc8d",gem:"\ud83d\udc8e",mute:"\ud83d\udd07",speaker:"\ud83d\udd08",sound:"\ud83d\udd09",loud_sound:"\ud83d\udd0a",loudspeaker:"\ud83d\udce2",mega:"\ud83d\udce3",postal_horn:"\ud83d\udcef",bell:"\ud83d\udd14",no_bell:"\ud83d\udd15",musical_score:"\ud83c\udfbc",musical_note:"\ud83c\udfb5",notes:"\ud83c\udfb6",studio_microphone:"\ud83c\udf99\ufe0f",level_slider:"\ud83c\udf9a\ufe0f",control_knobs:"\ud83c\udf9b\ufe0f",microphone:"\ud83c\udfa4",headphones:"\ud83c\udfa7",radio:"\ud83d\udcfb",saxophone:"\ud83c\udfb7",accordion:"\ud83e\ude97",guitar:"\ud83c\udfb8",musical_keyboard:"\ud83c\udfb9",trumpet:"\ud83c\udfba",violin:"\ud83c\udfbb",banjo:"\ud83e\ude95",drum:"\ud83e\udd41",long_drum:"\ud83e\ude98",maracas:"\ud83e\ude87",flute:"\ud83e\ude88",iphone:"\ud83d\udcf1",calling:"\ud83d\udcf2",phone:"\u260e\ufe0f",telephone:"\u260e\ufe0f",telephone_receiver:"\ud83d\udcde",pager:"\ud83d\udcdf",fax:"\ud83d\udce0",battery:"\ud83d\udd0b",low_battery:"\ud83e\udeab",electric_plug:"\ud83d\udd0c",computer:"\ud83d\udcbb",desktop_computer:"\ud83d\udda5\ufe0f",printer:"\ud83d\udda8\ufe0f",keyboard:"\u2328\ufe0f",computer_mouse:"\ud83d\uddb1\ufe0f",trackball:"\ud83d\uddb2\ufe0f",minidisc:"\ud83d\udcbd",floppy_disk:"\ud83d\udcbe",cd:"\ud83d\udcbf",dvd:"\ud83d\udcc0",abacus:"\ud83e\uddee",movie_camera:"\ud83c\udfa5",film_strip:"\ud83c\udf9e\ufe0f",film_projector:"\ud83d\udcfd\ufe0f",clapper:"\ud83c\udfac",tv:"\ud83d\udcfa",camera:"\ud83d\udcf7",camera_flash:"\ud83d\udcf8",video_camera:"\ud83d\udcf9",vhs:"\ud83d\udcfc",mag:"\ud83d\udd0d",mag_right:"\ud83d\udd0e",candle:"\ud83d\udd6f\ufe0f",bulb:"\ud83d\udca1",flashlight:"\ud83d\udd26",izakaya_lantern:"\ud83c\udfee",lantern:"\ud83c\udfee",diya_lamp:"\ud83e\ude94",notebook_with_decorative_cover:"\ud83d\udcd4",closed_book:"\ud83d\udcd5",book:"\ud83d\udcd6",open_book:"\ud83d\udcd6",green_book:"\ud83d\udcd7",blue_book:"\ud83d\udcd8",orange_book:"\ud83d\udcd9",books:"\ud83d\udcda",notebook:"\ud83d\udcd3",ledger:"\ud83d\udcd2",page_with_curl:"\ud83d\udcc3",scroll:"\ud83d\udcdc",page_facing_up:"\ud83d\udcc4",newspaper:"\ud83d\udcf0",newspaper_roll:"\ud83d\uddde\ufe0f",bookmark_tabs:"\ud83d\udcd1",bookmark:"\ud83d\udd16",label:"\ud83c\udff7\ufe0f",moneybag:"\ud83d\udcb0",coin:"\ud83e\ude99",yen:"\ud83d\udcb4",dollar:"\ud83d\udcb5",euro:"\ud83d\udcb6",pound:"\ud83d\udcb7",money_with_wings:"\ud83d\udcb8",credit_card:"\ud83d\udcb3",receipt:"\ud83e\uddfe",chart:"\ud83d\udcb9",envelope:"\u2709\ufe0f",email:"\ud83d\udce7","e-mail":"\ud83d\udce7",incoming_envelope:"\ud83d\udce8",envelope_with_arrow:"\ud83d\udce9",outbox_tray:"\ud83d\udce4",inbox_tray:"\ud83d\udce5",package:"\ud83d\udce6",mailbox:"\ud83d\udceb",mailbox_closed:"\ud83d\udcea",mailbox_with_mail:"\ud83d\udcec",mailbox_with_no_mail:"\ud83d\udced",postbox:"\ud83d\udcee",ballot_box:"\ud83d\uddf3\ufe0f",pencil2:"\u270f\ufe0f",black_nib:"\u2712\ufe0f",fountain_pen:"\ud83d\udd8b\ufe0f",pen:"\ud83d\udd8a\ufe0f",paintbrush:"\ud83d\udd8c\ufe0f",crayon:"\ud83d\udd8d\ufe0f",memo:"\ud83d\udcdd",pencil:"\ud83d\udcdd",briefcase:"\ud83d\udcbc",file_folder:"\ud83d\udcc1",open_file_folder:"\ud83d\udcc2",card_index_dividers:"\ud83d\uddc2\ufe0f",date:"\ud83d\udcc5",calendar:"\ud83d\udcc6",spiral_notepad:"\ud83d\uddd2\ufe0f",spiral_calendar:"\ud83d\uddd3\ufe0f",card_index:"\ud83d\udcc7",chart_with_upwards_trend:"\ud83d\udcc8",chart_with_downwards_trend:"\ud83d\udcc9",bar_chart:"\ud83d\udcca",clipboard:"\ud83d\udccb",pushpin:"\ud83d\udccc",round_pushpin:"\ud83d\udccd",paperclip:"\ud83d\udcce",paperclips:"\ud83d\udd87\ufe0f",straight_ruler:"\ud83d\udccf",triangular_ruler:"\ud83d\udcd0",scissors:"\u2702\ufe0f",card_file_box:"\ud83d\uddc3\ufe0f",file_cabinet:"\ud83d\uddc4\ufe0f",wastebasket:"\ud83d\uddd1\ufe0f",lock:"\ud83d\udd12",unlock:"\ud83d\udd13",lock_with_ink_pen:"\ud83d\udd0f",closed_lock_with_key:"\ud83d\udd10",key:"\ud83d\udd11",old_key:"\ud83d\udddd\ufe0f",hammer:"\ud83d\udd28",axe:"\ud83e\ude93",pick:"\u26cf\ufe0f",hammer_and_pick:"\u2692\ufe0f",hammer_and_wrench:"\ud83d\udee0\ufe0f",dagger:"\ud83d\udde1\ufe0f",crossed_swords:"\u2694\ufe0f",bomb:"\ud83d\udca3",boomerang:"\ud83e\ude83",bow_and_arrow:"\ud83c\udff9",shield:"\ud83d\udee1\ufe0f",carpentry_saw:"\ud83e\ude9a",wrench:"\ud83d\udd27",screwdriver:"\ud83e\ude9b",nut_and_bolt:"\ud83d\udd29",gear:"\u2699\ufe0f",clamp:"\ud83d\udddc\ufe0f",balance_scale:"\u2696\ufe0f",probing_cane:"\ud83e\uddaf",link:"\ud83d\udd17",chains:"\u26d3\ufe0f",hook:"\ud83e\ude9d",toolbox:"\ud83e\uddf0",magnet:"\ud83e\uddf2",ladder:"\ud83e\ude9c",alembic:"\u2697\ufe0f",test_tube:"\ud83e\uddea",petri_dish:"\ud83e\uddeb",dna:"\ud83e\uddec",microscope:"\ud83d\udd2c",telescope:"\ud83d\udd2d",satellite:"\ud83d\udce1",syringe:"\ud83d\udc89",drop_of_blood:"\ud83e\ude78",pill:"\ud83d\udc8a",adhesive_bandage:"\ud83e\ude79",crutch:"\ud83e\ude7c",stethoscope:"\ud83e\ude7a",x_ray:"\ud83e\ude7b",door:"\ud83d\udeaa",elevator:"\ud83d\uded7",mirror:"\ud83e\ude9e",window:"\ud83e\ude9f",bed:"\ud83d\udecf\ufe0f",couch_and_lamp:"\ud83d\udecb\ufe0f",chair:"\ud83e\ude91",toilet:"\ud83d\udebd",plunger:"\ud83e\udea0",shower:"\ud83d\udebf",bathtub:"\ud83d\udec1",mouse_trap:"\ud83e\udea4",razor:"\ud83e\ude92",lotion_bottle:"\ud83e\uddf4",safety_pin:"\ud83e\uddf7",broom:"\ud83e\uddf9",basket:"\ud83e\uddfa",roll_of_paper:"\ud83e\uddfb",bucket:"\ud83e\udea3",soap:"\ud83e\uddfc",bubbles:"\ud83e\udee7",toothbrush:"\ud83e\udea5",sponge:"\ud83e\uddfd",fire_extinguisher:"\ud83e\uddef",shopping_cart:"\ud83d\uded2",smoking:"\ud83d\udeac",coffin:"\u26b0\ufe0f",headstone:"\ud83e\udea6",funeral_urn:"\u26b1\ufe0f",nazar_amulet:"\ud83e\uddff",hamsa:"\ud83e\udeac",moyai:"\ud83d\uddff",placard:"\ud83e\udea7",identification_card:"\ud83e\udeaa",atm:"\ud83c\udfe7",put_litter_in_its_place:"\ud83d\udeae",potable_water:"\ud83d\udeb0",wheelchair:"\u267f",mens:"\ud83d\udeb9",womens:"\ud83d\udeba",restroom:"\ud83d\udebb",baby_symbol:"\ud83d\udebc",wc:"\ud83d\udebe",passport_control:"\ud83d\udec2",customs:"\ud83d\udec3",baggage_claim:"\ud83d\udec4",left_luggage:"\ud83d\udec5",warning:"\u26a0\ufe0f",children_crossing:"\ud83d\udeb8",no_entry:"\u26d4",no_entry_sign:"\ud83d\udeab",no_bicycles:"\ud83d\udeb3",no_smoking:"\ud83d\udead",do_not_litter:"\ud83d\udeaf","non-potable_water":"\ud83d\udeb1",no_pedestrians:"\ud83d\udeb7",no_mobile_phones:"\ud83d\udcf5",underage:"\ud83d\udd1e",radioactive:"\u2622\ufe0f",biohazard:"\u2623\ufe0f",arrow_up:"\u2b06\ufe0f",arrow_upper_right:"\u2197\ufe0f",arrow_right:"\u27a1\ufe0f",arrow_lower_right:"\u2198\ufe0f",arrow_down:"\u2b07\ufe0f",arrow_lower_left:"\u2199\ufe0f",arrow_left:"\u2b05\ufe0f",arrow_upper_left:"\u2196\ufe0f",arrow_up_down:"\u2195\ufe0f",left_right_arrow:"\u2194\ufe0f",leftwards_arrow_with_hook:"\u21a9\ufe0f",arrow_right_hook:"\u21aa\ufe0f",arrow_heading_up:"\u2934\ufe0f",arrow_heading_down:"\u2935\ufe0f",arrows_clockwise:"\ud83d\udd03",arrows_counterclockwise:"\ud83d\udd04",back:"\ud83d\udd19",end:"\ud83d\udd1a",on:"\ud83d\udd1b",soon:"\ud83d\udd1c",top:"\ud83d\udd1d",place_of_worship:"\ud83d\uded0",atom_symbol:"\u269b\ufe0f",om:"\ud83d\udd49\ufe0f",star_of_david:"\u2721\ufe0f",wheel_of_dharma:"\u2638\ufe0f",yin_yang:"\u262f\ufe0f",latin_cross:"\u271d\ufe0f",orthodox_cross:"\u2626\ufe0f",star_and_crescent:"\u262a\ufe0f",peace_symbol:"\u262e\ufe0f",menorah:"\ud83d\udd4e",six_pointed_star:"\ud83d\udd2f",khanda:"\ud83e\udeaf",aries:"\u2648",taurus:"\u2649",gemini:"\u264a",cancer:"\u264b",leo:"\u264c",virgo:"\u264d",libra:"\u264e",scorpius:"\u264f",sagittarius:"\u2650",capricorn:"\u2651",aquarius:"\u2652",pisces:"\u2653",ophiuchus:"\u26ce",twisted_rightwards_arrows:"\ud83d\udd00",repeat:"\ud83d\udd01",repeat_one:"\ud83d\udd02",arrow_forward:"\u25b6\ufe0f",fast_forward:"\u23e9",next_track_button:"\u23ed\ufe0f",play_or_pause_button:"\u23ef\ufe0f",arrow_backward:"\u25c0\ufe0f",rewind:"\u23ea",previous_track_button:"\u23ee\ufe0f",arrow_up_small:"\ud83d\udd3c",arrow_double_up:"\u23eb",arrow_down_small:"\ud83d\udd3d",arrow_double_down:"\u23ec",pause_button:"\u23f8\ufe0f",stop_button:"\u23f9\ufe0f",record_button:"\u23fa\ufe0f",eject_button:"\u23cf\ufe0f",cinema:"\ud83c\udfa6",low_brightness:"\ud83d\udd05",high_brightness:"\ud83d\udd06",signal_strength:"\ud83d\udcf6",wireless:"\ud83d\udedc",vibration_mode:"\ud83d\udcf3",mobile_phone_off:"\ud83d\udcf4",female_sign:"\u2640\ufe0f",male_sign:"\u2642\ufe0f",transgender_symbol:"\u26a7\ufe0f",heavy_multiplication_x:"\u2716\ufe0f",heavy_plus_sign:"\u2795",heavy_minus_sign:"\u2796",heavy_division_sign:"\u2797",heavy_equals_sign:"\ud83d\udff0",infinity:"\u267e\ufe0f",bangbang:"\u203c\ufe0f",interrobang:"\u2049\ufe0f",question:"\u2753",grey_question:"\u2754",grey_exclamation:"\u2755",exclamation:"\u2757",heavy_exclamation_mark:"\u2757",wavy_dash:"\u3030\ufe0f",currency_exchange:"\ud83d\udcb1",heavy_dollar_sign:"\ud83d\udcb2",medical_symbol:"\u2695\ufe0f",recycle:"\u267b\ufe0f",fleur_de_lis:"\u269c\ufe0f",trident:"\ud83d\udd31",name_badge:"\ud83d\udcdb",beginner:"\ud83d\udd30",o:"\u2b55",white_check_mark:"\u2705",ballot_box_with_check:"\u2611\ufe0f",heavy_check_mark:"\u2714\ufe0f",x:"\u274c",negative_squared_cross_mark:"\u274e",curly_loop:"\u27b0",loop:"\u27bf",part_alternation_mark:"\u303d\ufe0f",eight_spoked_asterisk:"\u2733\ufe0f",eight_pointed_black_star:"\u2734\ufe0f",sparkle:"\u2747\ufe0f",copyright:"\xa9\ufe0f",registered:"\xae\ufe0f",tm:"\u2122\ufe0f",hash:"#\ufe0f\u20e3",asterisk:"*\ufe0f\u20e3",zero:"0\ufe0f\u20e3",one:"1\ufe0f\u20e3",two:"2\ufe0f\u20e3",three:"3\ufe0f\u20e3",four:"4\ufe0f\u20e3",five:"5\ufe0f\u20e3",six:"6\ufe0f\u20e3",seven:"7\ufe0f\u20e3",eight:"8\ufe0f\u20e3",nine:"9\ufe0f\u20e3",keycap_ten:"\ud83d\udd1f",capital_abcd:"\ud83d\udd20",abcd:"\ud83d\udd21",symbols:"\ud83d\udd23",abc:"\ud83d\udd24",a:"\ud83c\udd70\ufe0f",ab:"\ud83c\udd8e",b:"\ud83c\udd71\ufe0f",cl:"\ud83c\udd91",cool:"\ud83c\udd92",free:"\ud83c\udd93",information_source:"\u2139\ufe0f",id:"\ud83c\udd94",m:"\u24c2\ufe0f",new:"\ud83c\udd95",ng:"\ud83c\udd96",o2:"\ud83c\udd7e\ufe0f",ok:"\ud83c\udd97",parking:"\ud83c\udd7f\ufe0f",sos:"\ud83c\udd98",up:"\ud83c\udd99",vs:"\ud83c\udd9a",koko:"\ud83c\ude01",sa:"\ud83c\ude02\ufe0f",u6708:"\ud83c\ude37\ufe0f",u6709:"\ud83c\ude36",u6307:"\ud83c\ude2f",ideograph_advantage:"\ud83c\ude50",u5272:"\ud83c\ude39",u7121:"\ud83c\ude1a",u7981:"\ud83c\ude32",accept:"\ud83c\ude51",u7533:"\ud83c\ude38",u5408:"\ud83c\ude34",u7a7a:"\ud83c\ude33",congratulations:"\u3297\ufe0f",secret:"\u3299\ufe0f",u55b6:"\ud83c\ude3a",u6e80:"\ud83c\ude35",red_circle:"\ud83d\udd34",orange_circle:"\ud83d\udfe0",yellow_circle:"\ud83d\udfe1",green_circle:"\ud83d\udfe2",large_blue_circle:"\ud83d\udd35",purple_circle:"\ud83d\udfe3",brown_circle:"\ud83d\udfe4",black_circle:"\u26ab",white_circle:"\u26aa",red_square:"\ud83d\udfe5",orange_square:"\ud83d\udfe7",yellow_square:"\ud83d\udfe8",green_square:"\ud83d\udfe9",blue_square:"\ud83d\udfe6",purple_square:"\ud83d\udfea",brown_square:"\ud83d\udfeb",black_large_square:"\u2b1b",white_large_square:"\u2b1c",black_medium_square:"\u25fc\ufe0f",white_medium_square:"\u25fb\ufe0f",black_medium_small_square:"\u25fe",white_medium_small_square:"\u25fd",black_small_square:"\u25aa\ufe0f",white_small_square:"\u25ab\ufe0f",large_orange_diamond:"\ud83d\udd36",large_blue_diamond:"\ud83d\udd37",small_orange_diamond:"\ud83d\udd38",small_blue_diamond:"\ud83d\udd39",small_red_triangle:"\ud83d\udd3a",small_red_triangle_down:"\ud83d\udd3b",diamond_shape_with_a_dot_inside:"\ud83d\udca0",radio_button:"\ud83d\udd18",white_square_button:"\ud83d\udd33",black_square_button:"\ud83d\udd32",checkered_flag:"\ud83c\udfc1",triangular_flag_on_post:"\ud83d\udea9",crossed_flags:"\ud83c\udf8c",black_flag:"\ud83c\udff4",white_flag:"\ud83c\udff3\ufe0f",rainbow_flag:"\ud83c\udff3\ufe0f\u200d\ud83c\udf08",transgender_flag:"\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f",pirate_flag:"\ud83c\udff4\u200d\u2620\ufe0f",ascension_island:"\ud83c\udde6\ud83c\udde8",andorra:"\ud83c\udde6\ud83c\udde9",united_arab_emirates:"\ud83c\udde6\ud83c\uddea",afghanistan:"\ud83c\udde6\ud83c\uddeb",antigua_barbuda:"\ud83c\udde6\ud83c\uddec",anguilla:"\ud83c\udde6\ud83c\uddee",albania:"\ud83c\udde6\ud83c\uddf1",armenia:"\ud83c\udde6\ud83c\uddf2",angola:"\ud83c\udde6\ud83c\uddf4",antarctica:"\ud83c\udde6\ud83c\uddf6",argentina:"\ud83c\udde6\ud83c\uddf7",american_samoa:"\ud83c\udde6\ud83c\uddf8",austria:"\ud83c\udde6\ud83c\uddf9",australia:"\ud83c\udde6\ud83c\uddfa",aruba:"\ud83c\udde6\ud83c\uddfc",aland_islands:"\ud83c\udde6\ud83c\uddfd",azerbaijan:"\ud83c\udde6\ud83c\uddff",bosnia_herzegovina:"\ud83c\udde7\ud83c\udde6",barbados:"\ud83c\udde7\ud83c\udde7",bangladesh:"\ud83c\udde7\ud83c\udde9",belgium:"\ud83c\udde7\ud83c\uddea",burkina_faso:"\ud83c\udde7\ud83c\uddeb",bulgaria:"\ud83c\udde7\ud83c\uddec",bahrain:"\ud83c\udde7\ud83c\udded",burundi:"\ud83c\udde7\ud83c\uddee",benin:"\ud83c\udde7\ud83c\uddef",st_barthelemy:"\ud83c\udde7\ud83c\uddf1",bermuda:"\ud83c\udde7\ud83c\uddf2",brunei:"\ud83c\udde7\ud83c\uddf3",bolivia:"\ud83c\udde7\ud83c\uddf4",caribbean_netherlands:"\ud83c\udde7\ud83c\uddf6",brazil:"\ud83c\udde7\ud83c\uddf7",bahamas:"\ud83c\udde7\ud83c\uddf8",bhutan:"\ud83c\udde7\ud83c\uddf9",bouvet_island:"\ud83c\udde7\ud83c\uddfb",botswana:"\ud83c\udde7\ud83c\uddfc",belarus:"\u2b1c\ufe0f\ud83d\udfe5\u2b1c",belize:"\ud83c\udde7\ud83c\uddff",canada:"\ud83c\udde8\ud83c\udde6",cocos_islands:"\ud83c\udde8\ud83c\udde8",congo_kinshasa:"\ud83c\udde8\ud83c\udde9",central_african_republic:"\ud83c\udde8\ud83c\uddeb",congo_brazzaville:"\ud83c\udde8\ud83c\uddec",switzerland:"\ud83c\udde8\ud83c\udded",cote_divoire:"\ud83c\udde8\ud83c\uddee",cook_islands:"\ud83c\udde8\ud83c\uddf0",chile:"\ud83c\udde8\ud83c\uddf1",cameroon:"\ud83c\udde8\ud83c\uddf2",cn:"\ud83c\udde8\ud83c\uddf3",colombia:"\ud83c\udde8\ud83c\uddf4",clipperton_island:"\ud83c\udde8\ud83c\uddf5",costa_rica:"\ud83c\udde8\ud83c\uddf7",cuba:"\ud83c\udde8\ud83c\uddfa",cape_verde:"\ud83c\udde8\ud83c\uddfb",curacao:"\ud83c\udde8\ud83c\uddfc",christmas_island:"\ud83c\udde8\ud83c\uddfd",cyprus:"\ud83c\udde8\ud83c\uddfe",czech_republic:"\ud83c\udde8\ud83c\uddff",de:"\ud83c\udde9\ud83c\uddea",diego_garcia:"\ud83c\udde9\ud83c\uddec",djibouti:"\ud83c\udde9\ud83c\uddef",denmark:"\ud83c\udde9\ud83c\uddf0",dominica:"\ud83c\udde9\ud83c\uddf2",dominican_republic:"\ud83c\udde9\ud83c\uddf4",algeria:"\ud83c\udde9\ud83c\uddff",ceuta_melilla:"\ud83c\uddea\ud83c\udde6",ecuador:"\ud83c\uddea\ud83c\udde8",estonia:"\ud83c\uddea\ud83c\uddea",egypt:"\ud83c\uddea\ud83c\uddec",western_sahara:"\ud83c\uddea\ud83c\udded",eritrea:"\ud83c\uddea\ud83c\uddf7",es:"\ud83c\uddea\ud83c\uddf8",ethiopia:"\ud83c\uddea\ud83c\uddf9",eu:"\ud83c\uddea\ud83c\uddfa",european_union:"\ud83c\uddea\ud83c\uddfa",finland:"\ud83c\uddeb\ud83c\uddee",fiji:"\ud83c\uddeb\ud83c\uddef",falkland_islands:"\ud83c\uddeb\ud83c\uddf0",micronesia:"\ud83c\uddeb\ud83c\uddf2",faroe_islands:"\ud83c\uddeb\ud83c\uddf4",fr:"\ud83c\uddeb\ud83c\uddf7",gabon:"\ud83c\uddec\ud83c\udde6",gb:"\ud83c\uddec\ud83c\udde7",uk:"\ud83c\uddec\ud83c\udde7",grenada:"\ud83c\uddec\ud83c\udde9",georgia:"\ud83c\uddec\ud83c\uddea",french_guiana:"\ud83c\uddec\ud83c\uddeb",guernsey:"\ud83c\uddec\ud83c\uddec",ghana:"\ud83c\uddec\ud83c\udded",gibraltar:"\ud83c\uddec\ud83c\uddee",greenland:"\ud83c\uddec\ud83c\uddf1",gambia:"\ud83c\uddec\ud83c\uddf2",guinea:"\ud83c\uddec\ud83c\uddf3",guadeloupe:"\ud83c\uddec\ud83c\uddf5",equatorial_guinea:"\ud83c\uddec\ud83c\uddf6",greece:"\ud83c\uddec\ud83c\uddf7",south_georgia_south_sandwich_islands:"\ud83c\uddec\ud83c\uddf8",guatemala:"\ud83c\uddec\ud83c\uddf9",guam:"\ud83c\uddec\ud83c\uddfa",guinea_bissau:"\ud83c\uddec\ud83c\uddfc",guyana:"\ud83c\uddec\ud83c\uddfe",hong_kong:"\ud83c\udded\ud83c\uddf0",heard_mcdonald_islands:"\ud83c\udded\ud83c\uddf2",honduras:"\ud83c\udded\ud83c\uddf3",croatia:"\ud83c\udded\ud83c\uddf7",haiti:"\ud83c\udded\ud83c\uddf9",hungary:"\ud83c\udded\ud83c\uddfa",canary_islands:"\ud83c\uddee\ud83c\udde8",indonesia:"\ud83c\uddee\ud83c\udde9",ireland:"\ud83c\uddee\ud83c\uddea",israel:"\ud83c\uddee\ud83c\uddf1",isle_of_man:"\ud83c\uddee\ud83c\uddf2",india:"\ud83c\uddee\ud83c\uddf3",british_indian_ocean_territory:"\ud83c\uddee\ud83c\uddf4",iraq:"\ud83c\uddee\ud83c\uddf6",iran:"\ud83c\uddee\ud83c\uddf7",iceland:"\ud83c\uddee\ud83c\uddf8",it:"\ud83c\uddee\ud83c\uddf9",jersey:"\ud83c\uddef\ud83c\uddea",jamaica:"\ud83c\uddef\ud83c\uddf2",jordan:"\ud83c\uddef\ud83c\uddf4",jp:"\ud83c\uddef\ud83c\uddf5",kenya:"\ud83c\uddf0\ud83c\uddea",kyrgyzstan:"\ud83c\uddf0\ud83c\uddec",cambodia:"\ud83c\uddf0\ud83c\udded",kiribati:"\ud83c\uddf0\ud83c\uddee",comoros:"\ud83c\uddf0\ud83c\uddf2",st_kitts_nevis:"\ud83c\uddf0\ud83c\uddf3",north_korea:"\ud83c\uddf0\ud83c\uddf5",kr:"\ud83c\uddf0\ud83c\uddf7",kuwait:"\ud83c\uddf0\ud83c\uddfc",cayman_islands:"\ud83c\uddf0\ud83c\uddfe",kazakhstan:"\ud83c\uddf0\ud83c\uddff",laos:"\ud83c\uddf1\ud83c\udde6",lebanon:"\ud83c\uddf1\ud83c\udde7",st_lucia:"\ud83c\uddf1\ud83c\udde8",liechtenstein:"\ud83c\uddf1\ud83c\uddee",sri_lanka:"\ud83c\uddf1\ud83c\uddf0",liberia:"\ud83c\uddf1\ud83c\uddf7",lesotho:"\ud83c\uddf1\ud83c\uddf8",lithuania:"\ud83c\uddf1\ud83c\uddf9",luxembourg:"\ud83c\uddf1\ud83c\uddfa",latvia:"\ud83c\uddf1\ud83c\uddfb",libya:"\ud83c\uddf1\ud83c\uddfe",morocco:"\ud83c\uddf2\ud83c\udde6",monaco:"\ud83c\uddf2\ud83c\udde8",moldova:"\ud83c\uddf2\ud83c\udde9",montenegro:"\ud83c\uddf2\ud83c\uddea",st_martin:"\ud83c\uddf2\ud83c\uddeb",madagascar:"\ud83c\uddf2\ud83c\uddec",marshall_islands:"\ud83c\uddf2\ud83c\udded",macedonia:"\ud83c\uddf2\ud83c\uddf0",mali:"\ud83c\uddf2\ud83c\uddf1",myanmar:"\ud83c\uddf2\ud83c\uddf2",mongolia:"\ud83c\uddf2\ud83c\uddf3",macau:"\ud83c\uddf2\ud83c\uddf4",northern_mariana_islands:"\ud83c\uddf2\ud83c\uddf5",martinique:"\ud83c\uddf2\ud83c\uddf6",mauritania:"\ud83c\uddf2\ud83c\uddf7",montserrat:"\ud83c\uddf2\ud83c\uddf8",malta:"\ud83c\uddf2\ud83c\uddf9",mauritius:"\ud83c\uddf2\ud83c\uddfa",maldives:"\ud83c\uddf2\ud83c\uddfb",malawi:"\ud83c\uddf2\ud83c\uddfc",mexico:"\ud83c\uddf2\ud83c\uddfd",malaysia:"\ud83c\uddf2\ud83c\uddfe",mozambique:"\ud83c\uddf2\ud83c\uddff",namibia:"\ud83c\uddf3\ud83c\udde6",new_caledonia:"\ud83c\uddf3\ud83c\udde8",niger:"\ud83c\uddf3\ud83c\uddea",norfolk_island:"\ud83c\uddf3\ud83c\uddeb",nigeria:"\ud83c\uddf3\ud83c\uddec",nicaragua:"\ud83c\uddf3\ud83c\uddee",netherlands:"\ud83c\uddf3\ud83c\uddf1",norway:"\ud83c\uddf3\ud83c\uddf4",nepal:"\ud83c\uddf3\ud83c\uddf5",nauru:"\ud83c\uddf3\ud83c\uddf7",niue:"\ud83c\uddf3\ud83c\uddfa",new_zealand:"\ud83c\uddf3\ud83c\uddff",oman:"\ud83c\uddf4\ud83c\uddf2",panama:"\ud83c\uddf5\ud83c\udde6",peru:"\ud83c\uddf5\ud83c\uddea",french_polynesia:"\ud83c\uddf5\ud83c\uddeb",papua_new_guinea:"\ud83c\uddf5\ud83c\uddec",philippines:"\ud83c\uddf5\ud83c\udded",pakistan:"\ud83c\uddf5\ud83c\uddf0",poland:"\ud83c\uddf5\ud83c\uddf1",st_pierre_miquelon:"\ud83c\uddf5\ud83c\uddf2",pitcairn_islands:"\ud83c\uddf5\ud83c\uddf3",puerto_rico:"\ud83c\uddf5\ud83c\uddf7",palestinian_territories:"\ud83c\uddf5\ud83c\uddf8",portugal:"\ud83c\uddf5\ud83c\uddf9",palau:"\ud83c\uddf5\ud83c\uddfc",paraguay:"\ud83c\uddf5\ud83c\uddfe",qatar:"\ud83c\uddf6\ud83c\udde6",reunion:"\ud83c\uddf7\ud83c\uddea",romania:"\ud83c\uddf7\ud83c\uddf4",serbia:"\ud83c\uddf7\ud83c\uddf8",ru:"\ud83c\uddf7\ud83c\uddfa",rwanda:"\ud83c\uddf7\ud83c\uddfc",saudi_arabia:"\ud83c\uddf8\ud83c\udde6",solomon_islands:"\ud83c\uddf8\ud83c\udde7",seychelles:"\ud83c\uddf8\ud83c\udde8",sudan:"\ud83c\uddf8\ud83c\udde9",sweden:"\ud83c\uddf8\ud83c\uddea",singapore:"\ud83c\uddf8\ud83c\uddec",st_helena:"\ud83c\uddf8\ud83c\udded",slovenia:"\ud83c\uddf8\ud83c\uddee",svalbard_jan_mayen:"\ud83c\uddf8\ud83c\uddef",slovakia:"\ud83c\uddf8\ud83c\uddf0",sierra_leone:"\ud83c\uddf8\ud83c\uddf1",san_marino:"\ud83c\uddf8\ud83c\uddf2",senegal:"\ud83c\uddf8\ud83c\uddf3",somalia:"\ud83c\uddf8\ud83c\uddf4",suriname:"\ud83c\uddf8\ud83c\uddf7",south_sudan:"\ud83c\uddf8\ud83c\uddf8",sao_tome_principe:"\ud83c\uddf8\ud83c\uddf9",el_salvador:"\ud83c\uddf8\ud83c\uddfb",sint_maarten:"\ud83c\uddf8\ud83c\uddfd",syria:"\ud83c\uddf8\ud83c\uddfe",swaziland:"\ud83c\uddf8\ud83c\uddff",tristan_da_cunha:"\ud83c\uddf9\ud83c\udde6",turks_caicos_islands:"\ud83c\uddf9\ud83c\udde8",chad:"\ud83c\uddf9\ud83c\udde9",french_southern_territories:"\ud83c\uddf9\ud83c\uddeb",togo:"\ud83c\uddf9\ud83c\uddec",thailand:"\ud83c\uddf9\ud83c\udded",tajikistan:"\ud83c\uddf9\ud83c\uddef",tokelau:"\ud83c\uddf9\ud83c\uddf0",timor_leste:"\ud83c\uddf9\ud83c\uddf1",turkmenistan:"\ud83c\uddf9\ud83c\uddf2",tunisia:"\ud83c\uddf9\ud83c\uddf3",tonga:"\ud83c\uddf9\ud83c\uddf4",tr:"\ud83c\uddf9\ud83c\uddf7",trinidad_tobago:"\ud83c\uddf9\ud83c\uddf9",tuvalu:"\ud83c\uddf9\ud83c\uddfb",taiwan:"\ud83c\uddf9\ud83c\uddfc",tanzania:"\ud83c\uddf9\ud83c\uddff",ukraine:"\ud83c\uddfa\ud83c\udde6",uganda:"\ud83c\uddfa\ud83c\uddec",us_outlying_islands:"\ud83c\uddfa\ud83c\uddf2",united_nations:"\ud83c\uddfa\ud83c\uddf3",us:"\ud83c\uddfa\ud83c\uddf8",uruguay:"\ud83c\uddfa\ud83c\uddfe",uzbekistan:"\ud83c\uddfa\ud83c\uddff",vatican_city:"\ud83c\uddfb\ud83c\udde6",st_vincent_grenadines:"\ud83c\uddfb\ud83c\udde8",venezuela:"\ud83c\uddfb\ud83c\uddea",british_virgin_islands:"\ud83c\uddfb\ud83c\uddec",us_virgin_islands:"\ud83c\uddfb\ud83c\uddee",vietnam:"\ud83c\uddfb\ud83c\uddf3",vanuatu:"\ud83c\uddfb\ud83c\uddfa",wallis_futuna:"\ud83c\uddfc\ud83c\uddeb",samoa:"\ud83c\uddfc\ud83c\uddf8",kosovo:"\ud83c\uddfd\ud83c\uddf0",yemen:"\ud83c\uddfe\ud83c\uddea",mayotte:"\ud83c\uddfe\ud83c\uddf9",south_africa:"\ud83c\uddff\ud83c\udde6",zambia:"\ud83c\uddff\ud83c\uddf2",zimbabwe:"\ud83c\uddff\ud83c\uddfc",england:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f",scotland:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f",wales:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f"},renderer:e=>e.emoji}));const Ld=()=>{const[e,n]=(0,t.useState)(!1);return mt(pt.FK,{children:mt($e,{children:mt(Sr,{children:mt(pt.FK,{children:[mt($r,{onLoaded:n}),e&&mt(ke,{children:mt(be,{path:"/",element:mt(Dd,{}),children:mt(be,{path:"/",element:mt(su,{})})})})]})})})})},Rd=e=>{e&&n.e(685).then(n.bind(n,685)).then((t=>{let{onCLS:n,onINP:r,onFCP:o,onLCP:a,onTTFB:i}=t;n(e),r(e),o(e),a(e),i(e)}))},zd=document.getElementById("root");zd&&(0,t.render)(mt(Ld,{}),zd),Rd()})()})(); \ No newline at end of file diff --git a/app/vlselect/vmui/static/js/main.2810cc52.js.LICENSE.txt b/app/vlselect/vmui/static/js/main.64aea685.js.LICENSE.txt similarity index 100% rename from app/vlselect/vmui/static/js/main.2810cc52.js.LICENSE.txt rename to app/vlselect/vmui/static/js/main.64aea685.js.LICENSE.txt From 12223cf5d02f32da27640e255736aef1c36a95cd Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 29 Oct 2024 18:08:36 +0100 Subject: [PATCH 36/90] docs/VictoriaLogs/CHANGELOG.md: cut v0.38.0 release --- docs/VictoriaLogs/CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 9ce8cbbe6..258fd4d33 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -15,7 +15,11 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta ## tip -* FEATURE: added ability to receive systemd (journald) logs over network. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4618). +## [v0.38.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.38.0-victorialogs) + +Released at 2024-10-29 + +* FEATURE: added the ability to receive systemd (journald) logs over network. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4618). * FEATURE: improve performance for queries over large volume of logs with big number of [fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) (aka `wide events`). * FEATURE: improve performance for [`/select/logsql/field_values` HTTP endpoint](https://docs.victoriametrics.com/victorialogs/querying/#querying-field-values). * FEATURE: improve performance for [`field_values` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#field_values-pipe) when it is applied directly to [log filter](https://docs.victoriametrics.com/victorialogs/logsql/#filters). From c43a6ce0eb3d4da47efa0b627948ea59930f311b Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 29 Oct 2024 18:16:13 +0100 Subject: [PATCH 37/90] deployment/docker: update VictoriaLogs from v0.37.0-victorialogs to v0.38.0-victorialogs See https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.38.0-victorialogs --- deployment/docker/docker-compose-victorialogs.yml | 2 +- deployment/docker/victorialogs/compose-base.yml | 2 +- deployment/logs-benchmark/docker-compose.yml | 2 +- docs/VictoriaLogs/QuickStart.md | 6 +++--- docs/VictoriaLogs/querying/vlogscli.md | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/deployment/docker/docker-compose-victorialogs.yml b/deployment/docker/docker-compose-victorialogs.yml index 091c3655d..bee661026 100644 --- a/deployment/docker/docker-compose-victorialogs.yml +++ b/deployment/docker/docker-compose-victorialogs.yml @@ -40,7 +40,7 @@ services: # storing logs and serving read queries. victorialogs: container_name: victorialogs - image: victoriametrics/victoria-logs:v0.37.0-victorialogs + image: victoriametrics/victoria-logs:v0.38.0-victorialogs command: - "--storageDataPath=/vlogs" - "--httpListenAddr=:9428" diff --git a/deployment/docker/victorialogs/compose-base.yml b/deployment/docker/victorialogs/compose-base.yml index 05da7cb9c..1683d2e1e 100644 --- a/deployment/docker/victorialogs/compose-base.yml +++ b/deployment/docker/victorialogs/compose-base.yml @@ -1,7 +1,7 @@ services: # meta service will be ignored by compose .victorialogs: - image: docker.io/victoriametrics/victoria-logs:v0.37.0-victorialogs + image: docker.io/victoriametrics/victoria-logs:v0.38.0-victorialogs command: - -storageDataPath=/vlogs - -loggerFormat=json diff --git a/deployment/logs-benchmark/docker-compose.yml b/deployment/logs-benchmark/docker-compose.yml index aabd0fcf1..2a35a378d 100644 --- a/deployment/logs-benchmark/docker-compose.yml +++ b/deployment/logs-benchmark/docker-compose.yml @@ -3,7 +3,7 @@ version: "3" services: # Run `make package-victoria-logs` to build victoria-logs image vlogs: - image: docker.io/victoriametrics/victoria-logs:v0.37.0-victorialogs + image: docker.io/victoriametrics/victoria-logs:v0.38.0-victorialogs volumes: - vlogs:/vlogs ports: diff --git a/docs/VictoriaLogs/QuickStart.md b/docs/VictoriaLogs/QuickStart.md index b530ce97b..2b3db33d2 100644 --- a/docs/VictoriaLogs/QuickStart.md +++ b/docs/VictoriaLogs/QuickStart.md @@ -33,8 +33,8 @@ Just download archive for the needed Operating system and architecture, unpack i For example, the following commands download VictoriaLogs archive for Linux/amd64, unpack and run it: ```sh -curl -L -O https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v0.37.0-victorialogs/victoria-logs-linux-amd64-v0.37.0-victorialogs.tar.gz -tar xzf victoria-logs-linux-amd64-v0.37.0-victorialogs.tar.gz +curl -L -O https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v0.38.0-victorialogs/victoria-logs-linux-amd64-v0.38.0-victorialogs.tar.gz +tar xzf victoria-logs-linux-amd64-v0.38.0-victorialogs.tar.gz ./victoria-logs-prod ``` @@ -58,7 +58,7 @@ Here is the command to run VictoriaLogs in a Docker container: ```sh docker run --rm -it -p 9428:9428 -v ./victoria-logs-data:/victoria-logs-data \ - docker.io/victoriametrics/victoria-logs:v0.37.0-victorialogs + docker.io/victoriametrics/victoria-logs:v0.38.0-victorialogs ``` See also: diff --git a/docs/VictoriaLogs/querying/vlogscli.md b/docs/VictoriaLogs/querying/vlogscli.md index 3cb3d205c..d15e08d8b 100644 --- a/docs/VictoriaLogs/querying/vlogscli.md +++ b/docs/VictoriaLogs/querying/vlogscli.md @@ -23,15 +23,15 @@ or from [docker images](https://hub.docker.com/r/victoriametrics/vlogscli/tags): ### Running `vlogscli` from release binary ```sh -curl -L -O https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v0.37.0-victorialogs/vlogscli-linux-amd64-v0.37.0-victorialogs.tar.gz -tar xzf vlogscli-linux-amd64-v0.37.0-victorialogs.tar.gz +curl -L -O https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v0.38.0-victorialogs/vlogscli-linux-amd64-v0.38.0-victorialogs.tar.gz +tar xzf vlogscli-linux-amd64-v0.38.0-victorialogs.tar.gz ./vlogscli-prod ``` ### Running `vlogscli` from Docker image ```sh -docker run --rm -it docker.io/victoriametrics/vlogscli:v0.37.0-victorialogs +docker run --rm -it docker.io/victoriametrics/vlogscli:v0.38.0-victorialogs ``` ## Configuration From c963d7d10d39cbbeca8be6935e2d4835b84ec00c Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 29 Oct 2024 18:27:40 +0100 Subject: [PATCH 38/90] docs/VictoriaLogs/CHANGELOG.md: remove unnededed `with` prefix in front of `rank` at `top` pipe example --- docs/VictoriaLogs/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 258fd4d33..d6474b93f 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -23,7 +23,7 @@ Released at 2024-10-29 * FEATURE: improve performance for queries over large volume of logs with big number of [fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) (aka `wide events`). * FEATURE: improve performance for [`/select/logsql/field_values` HTTP endpoint](https://docs.victoriametrics.com/victorialogs/querying/#querying-field-values). * FEATURE: improve performance for [`field_values` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#field_values-pipe) when it is applied directly to [log filter](https://docs.victoriametrics.com/victorialogs/logsql/#filters). -* FEATURE: add an ability to return `rank` field from [`top` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#top-pipe). For example, the following query returns `1..5` rank per each returned `ip` with the biggest number of logs over the last 5 minute: `_time:5m | top 5 by (ip) with rank`. +* FEATURE: add an ability to return `rank` field from [`top` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#top-pipe). For example, the following query returns `1..5` rank per each returned `ip` with the biggest number of logs over the last 5 minute: `_time:5m | top 5 by (ip) rank`. * BUGFIX: [web UI](https://docs.victoriametrics.com/victorialogs/querying/#web-ui): fix various glitches with updating query responses. The issue was introduced in [v0.36.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.36.0-victorialogs). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7279). From b86b0dd910f24aaa37b11049d3ce4f9acd926ca5 Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Tue, 29 Oct 2024 18:48:36 +0100 Subject: [PATCH 39/90] docs: update VM versions to the latest version See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7388 Signed-off-by: hagen1778 --- .../guides/guide-vmanomaly-vmalert/README.md | 12 +++++----- docs/enterprise.md | 22 +++++++++---------- docs/scrape_config_examples.md | 8 +++---- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/anomaly-detection/guides/guide-vmanomaly-vmalert/README.md b/docs/anomaly-detection/guides/guide-vmanomaly-vmalert/README.md index 36f3ed8a7..fd012a386 100644 --- a/docs/anomaly-detection/guides/guide-vmanomaly-vmalert/README.md +++ b/docs/anomaly-detection/guides/guide-vmanomaly-vmalert/README.md @@ -2,9 +2,9 @@ - To use *vmanomaly*, part of the enterprise package, a license key is required. Obtain your key [here](https://victoriametrics.com/products/enterprise/trial/) for this tutorial or for enterprise use. - In the tutorial, we'll be using the following VictoriaMetrics components: - - [VictoriaMetrics Single-Node](https://docs.victoriametrics.com/single-server-victoriametrics) (v1.102.0) - - [vmalert](https://docs.victoriametrics.com/vmalert/) (v1.102.0) - - [vmagent](https://docs.victoriametrics.com/vmagent/) (v1.102.0) + - [VictoriaMetrics Single-Node](https://docs.victoriametrics.com/single-server-victoriametrics) (v1.105.0) + - [vmalert](https://docs.victoriametrics.com/vmalert/) (v1.105.0) + - [vmagent](https://docs.victoriametrics.com/vmagent/) (v1.105.0) - [Grafana](https://grafana.com/) (v.10.2.1) - [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/) - [Node exporter](https://github.com/prometheus/node_exporter#node-exporter) (v1.7.0) and [Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/) (v0.27.0) @@ -313,7 +313,7 @@ Let's wrap it all up together into the `docker-compose.yml` file. services: vmagent: container_name: vmagent - image: victoriametrics/vmagent:v1.102.0 + image: victoriametrics/vmagent:v1.105.0 depends_on: - "victoriametrics" ports: @@ -330,7 +330,7 @@ services: victoriametrics: container_name: victoriametrics - image: victoriametrics/victoria-metrics:v1.102.0 + image: victoriametrics/victoria-metrics:v1.105.0 ports: - 8428:8428 volumes: @@ -363,7 +363,7 @@ services: vmalert: container_name: vmalert - image: victoriametrics/vmalert:v1.102.0 + image: victoriametrics/vmalert:v1.105.0 depends_on: - "victoriametrics" ports: diff --git a/docs/enterprise.md b/docs/enterprise.md index dc2911b32..ee9f758eb 100644 --- a/docs/enterprise.md +++ b/docs/enterprise.md @@ -82,7 +82,7 @@ VictoriaMetrics Enterprise components are available in the following forms: It is allowed to run VictoriaMetrics Enterprise components in [cases listed here](#valid-cases-for-victoriametrics-enterprise). Binary releases of VictoriaMetrics Enterprise are available [at the releases page](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/latest). -Enterprise binaries and packages have `enterprise` suffix in their names. For example, `victoria-metrics-linux-amd64-v1.102.0-enterprise.tar.gz`. +Enterprise binaries and packages have `enterprise` suffix in their names. For example, `victoria-metrics-linux-amd64-v1.105.0-enterprise.tar.gz`. In order to run binary release of VictoriaMetrics Enterprise component, please download the `*-enterprise.tar.gz` archive for your OS and architecture from the [releases page](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/latest) and unpack it. Then run the unpacked binary. @@ -100,8 +100,8 @@ For example, the following command runs VictoriaMetrics Enterprise binary with t obtained at [this page](https://victoriametrics.com/products/enterprise/trial/): ```sh -wget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v1.102.0/victoria-metrics-linux-amd64-v1.102.0-enterprise.tar.gz -tar -xzf victoria-metrics-linux-amd64-v1.102.0-enterprise.tar.gz +wget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v1.105.0/victoria-metrics-linux-amd64-v1.105.0-enterprise.tar.gz +tar -xzf victoria-metrics-linux-amd64-v1.105.0-enterprise.tar.gz ./victoria-metrics-prod -license=BASE64_ENCODED_LICENSE_KEY ``` @@ -116,7 +116,7 @@ Alternatively, VictoriaMetrics Enterprise license can be stored in the file and It is allowed to run VictoriaMetrics Enterprise components in [cases listed here](#valid-cases-for-victoriametrics-enterprise). Docker images for VictoriaMetrics Enterprise are available [at VictoriaMetrics DockerHub](https://hub.docker.com/u/victoriametrics). -Enterprise docker images have `enterprise` suffix in their names. For example, `victoriametrics/victoria-metrics:v1.102.0-enterprise`. +Enterprise docker images have `enterprise` suffix in their names. For example, `victoriametrics/victoria-metrics:v1.105.0-enterprise`. In order to run Docker image of VictoriaMetrics Enterprise component, it is required to provide the license key via command-line flag as described [here](#binary-releases). @@ -126,13 +126,13 @@ Enterprise license key can be obtained at [this page](https://victoriametrics.co For example, the following command runs VictoriaMetrics Enterprise Docker image with the specified license key: ```sh -docker run --name=victoria-metrics victoriametrics/victoria-metrics:v1.102.0-enterprise -license=BASE64_ENCODED_LICENSE_KEY +docker run --name=victoria-metrics victoriametrics/victoria-metrics:v1.105.0-enterprise -license=BASE64_ENCODED_LICENSE_KEY ``` Alternatively, the license code can be stored in the file and then referred via `-licenseFile` command-line flag: ```sh -docker run --name=victoria-metrics -v /vm-license:/vm-license victoriametrics/victoria-metrics:v1.102.0-enterprise -licenseFile=/path/to/vm-license +docker run --name=victoria-metrics -v /vm-license:/vm-license victoriametrics/victoria-metrics:v1.105.0-enterprise -licenseFile=/path/to/vm-license ``` Example docker-compose configuration: @@ -141,7 +141,7 @@ version: "3.5" services: victoriametrics: container_name: victoriametrics - image: victoriametrics/victoria-metrics:v1.102.0 + image: victoriametrics/victoria-metrics:v1.105.0 ports: - 8428:8428 volumes: @@ -173,7 +173,7 @@ is used to provide key in plain-text: ```yaml server: image: - tag: v1.102.0-enterprise + tag: v1.105.0-enterprise license: key: {BASE64_ENCODED_LICENSE_KEY} @@ -184,7 +184,7 @@ In order to provide key via existing secret, the following values file is used: ```yaml server: image: - tag: v1.102.0-enterprise + tag: v1.105.0-enterprise license: secret: @@ -233,7 +233,7 @@ spec: license: key: {BASE64_ENCODED_LICENSE_KEY} image: - tag: v1.102.0-enterprise + tag: v1.105.0-enterprise ``` In order to provide key via existing secret, the following custom resource is used: @@ -250,7 +250,7 @@ spec: name: vm-license key: license image: - tag: v1.102.0-enterprise + tag: v1.105.0-enterprise ``` Example secret with license key: diff --git a/docs/scrape_config_examples.md b/docs/scrape_config_examples.md index d70dce3c5..c198760f2 100644 --- a/docs/scrape_config_examples.md +++ b/docs/scrape_config_examples.md @@ -30,8 +30,8 @@ scrape_configs: After you created the `scrape.yaml` file, download and unpack [single-node VictoriaMetrics](https://docs.victoriametrics.com/) to the same directory: ``` -wget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v1.102.0/victoria-metrics-linux-amd64-v1.102.0.tar.gz -tar xzf victoria-metrics-linux-amd64-v1.102.0.tar.gz +wget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v1.105.0/victoria-metrics-linux-amd64-v1.105.0.tar.gz +tar xzf victoria-metrics-linux-amd64-v1.105.0.tar.gz ``` Then start VictoriaMetrics and instruct it to scrape targets defined in `scrape.yaml` and save scraped metrics @@ -146,8 +146,8 @@ Then start [single-node VictoriaMetrics](https://docs.victoriametrics.com/) acco ```yaml # Download and unpack single-node VictoriaMetrics -wget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v1.102.0/victoria-metrics-linux-amd64-v1.102.0.tar.gz -tar xzf victoria-metrics-linux-amd64-v1.102.0.tar.gz +wget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v1.105.0/victoria-metrics-linux-amd64-v1.105.0.tar.gz +tar xzf victoria-metrics-linux-amd64-v1.105.0.tar.gz # Run single-node VictoriaMetrics with the given scrape.yaml ./victoria-metrics-prod -promscrape.config=scrape.yaml From a49eb7d4f579706061e021f71a387981de064d5e Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Tue, 29 Oct 2024 18:50:40 +0100 Subject: [PATCH 40/90] docs: add step for updating VM version in docs See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7388 Signed-off-by: hagen1778 --- docs/Release-Guide.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Release-Guide.md b/docs/Release-Guide.md index 7d3a2bb26..9ad1c469b 100644 --- a/docs/Release-Guide.md +++ b/docs/Release-Guide.md @@ -95,6 +95,7 @@ Bumping the limits may significantly improve build speed. 1. Publish release by pressing "Publish release" green button in GitHub's UI. 1. Update GitHub tickets related to the new release. Usually, such tickets have label [waiting for release](https://github.com/VictoriaMetrics/VictoriaMetrics/issues?q=is%3Aopen+is%3Aissue+label%3A%22waiting+for+release%22). Close such tickets by mentioning which release they were included into, and remove the label. See example [here](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6637#issuecomment-2390729511). 1. Bump VictoriaMetrics version at `deployment/docker/docker-compose.yml` and at `deployment/docker/docker-compose-cluster.yml`. +1. Bump VictoriaMetrics version mentioned in [docs](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7388). 1. Follow the instructions in [release follow-up](https://github.com/VictoriaMetrics/VictoriaMetrics-enterprise/blob/master/Release-Guide.md). ### Public Announcement From 2ac07aa81316ad5eaa838eb9124f75f443798ee7 Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Tue, 29 Oct 2024 18:52:25 +0100 Subject: [PATCH 41/90] docs: rm unused vmanomaly assets These images copies are present in vmanomaly subfolder. Signed-off-by: hagen1778 --- docs/vmanomaly-holtwinters-example.webp | Bin 26590 -> 0 bytes docs/vmanomaly-prophet-example.webp | Bin 26430 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 docs/vmanomaly-holtwinters-example.webp delete mode 100644 docs/vmanomaly-prophet-example.webp diff --git a/docs/vmanomaly-holtwinters-example.webp b/docs/vmanomaly-holtwinters-example.webp deleted file mode 100644 index 3da8a9e44f2cd05b1033ef8fc44347f5bac6a4f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 26590 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 diff --git a/docs/vmanomaly-prophet-example.webp b/docs/vmanomaly-prophet-example.webp deleted file mode 100644 index 6c9c7870f9c8a4142b2ffd5c57aa678c9b91278b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 26430 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 WN7euU0000000000000000000yDyE Date: Wed, 30 Oct 2024 09:45:28 +0100 Subject: [PATCH 42/90] docs: logs vmalert add identifier Signed-off-by: Artem Navoiev --- docs/VictoriaLogs/vmalert.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/VictoriaLogs/vmalert.md b/docs/VictoriaLogs/vmalert.md index db1feaa1c..91e4a679a 100644 --- a/docs/VictoriaLogs/vmalert.md +++ b/docs/VictoriaLogs/vmalert.md @@ -5,6 +5,7 @@ menu: docs: parent: "victorialogs" weight: 10 + identifier: "victorialogs-vmalert" aliases: - /VictoriaLogs/vmalert.html --- From 77b690ab26d1da5be145b05a709b9cf388e036b5 Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Wed, 30 Oct 2024 12:19:44 +0100 Subject: [PATCH 43/90] docs: update version placeholder to point to the next version Signed-off-by: hagen1778 --- docs/VictoriaLogs/vmalert.md | 2 +- docs/sd_configs.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/VictoriaLogs/vmalert.md b/docs/VictoriaLogs/vmalert.md index 91e4a679a..4b4cb4d0e 100644 --- a/docs/VictoriaLogs/vmalert.md +++ b/docs/VictoriaLogs/vmalert.md @@ -10,7 +10,7 @@ aliases: - /VictoriaLogs/vmalert.html --- -_Available from [TODO](https://docs.victoriametrics.com/changelog/#TODO) vmalert version and [v0.36.0](https://docs.victoriametrics.com/victorialogs/changelog/#v0360) VictoriaLogs version._ +_Available from [next](https://docs.victoriametrics.com/changelog/#tip) vmalert version and [v0.36.0](https://docs.victoriametrics.com/victorialogs/changelog/#v0360) VictoriaLogs version._ [vmalert](https://docs.victoriametrics.com/vmalert/) integrates with VictoriaLogs via stats APIs [`/select/logsql/stats_query`](https://docs.victoriametrics.com/victorialogs/querying/#querying-log-stats) and [`/select/logsql/stats_query_range`](https://docs.victoriametrics.com/victorialogs/querying/#querying-log-range-stats). diff --git a/docs/sd_configs.md b/docs/sd_configs.md index a85fc1803..127173ae7 100644 --- a/docs/sd_configs.md +++ b/docs/sd_configs.md @@ -1549,7 +1549,7 @@ The list of discovered OVH Cloud targets is refreshed at the interval, which can ## puppetdb_sd_configs -_Available from [TODO](https://docs.victoriametrics.com/changelog/#TODO) version._ +_Available from [next](https://docs.victoriametrics.com/changelog/#tip) version._ PuppetDB SD configuration allows retrieving scrape targets from [PuppetDB](https://www.puppet.com/docs/puppetdb/8/overview.html) resources. From b789a9dc8336cf196fe248880f2047b8919a42f0 Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Wed, 30 Oct 2024 12:20:00 +0100 Subject: [PATCH 44/90] docs: mark alerting feature as done in VictoriaLogs Signed-off-by: hagen1778 --- docs/VictoriaLogs/Roadmap.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/VictoriaLogs/Roadmap.md b/docs/VictoriaLogs/Roadmap.md index c5307ceb2..73efeef23 100644 --- a/docs/VictoriaLogs/Roadmap.md +++ b/docs/VictoriaLogs/Roadmap.md @@ -26,5 +26,5 @@ The following functionality is planned in the future versions of VictoriaLogs: - [ ] Ability to make instant snapshots and backups in the way [similar to VictoriaMetrics](https://docs.victoriametrics.com/#how-to-work-with-snapshots). - [ ] Cluster version of VictoriaLogs. - [ ] Ability to store data to object storage (such as S3, GCS, Minio). -- [ ] Alerting on LogsQL queries. +- [x] [Alerting on LogsQL queries](https://docs.victoriametrics.com/victorialogs/vmalert/). - [ ] Data migration tool from Grafana Loki to VictoriaLogs (similar to [vmctl](https://docs.victoriametrics.com/vmctl/)). From 2c933531730de5348bd5e85fb79734b23bc8d6d5 Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Wed, 30 Oct 2024 12:38:47 +0100 Subject: [PATCH 45/90] docs: add frequently asked questions to vmalert integration with vlogs Signed-off-by: hagen1778 --- docs/VictoriaLogs/vmalert.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/docs/VictoriaLogs/vmalert.md b/docs/VictoriaLogs/vmalert.md index 4b4cb4d0e..837bba2f8 100644 --- a/docs/VictoriaLogs/vmalert.md +++ b/docs/VictoriaLogs/vmalert.md @@ -205,4 +205,35 @@ requestDurationQuantile{stats_result="p00", service="service-2"} ... ``` -For additional tips on writing LogsQL, refer to this [doc](https://docs.victoriametrics.com/victorialogs/logsql/#performance-tips). \ No newline at end of file +For additional tips on writing LogsQL, refer to this [doc](https://docs.victoriametrics.com/victorialogs/logsql/#performance-tips). + +## Frequently Asked Questions + +* How to use [multitenancy](https://docs.victoriametrics.com/victorialogs/#multitenancy) in vmalert? + * vmalert doesn't support multi-tenancy for VictoriaLogs in the same way as it [supports it for VictoriaMetrics in ENT version](https://docs.victoriametrics.com/vmalert/#multitenancy). + However, it is possible to specify the queried tenant from VictoriaLogs datasource via `headers` param in [Group config](https://docs.victoriametrics.com/vmalert/#groups). + For example, the following config will execute all the rules within the group against tenant with `AccountID=1` and `ProjectID=2`: + ```yaml + groups: + - name: MyGroup + headers: + - "AccountID: 1" + - "ProjectID: 2" + rules: ... + ``` +* How to use one vmalert for VictoriaLogs and VictoriaMetrics rules in the same time? + * vmalert allows having many groups with different rule types (`vlogs`, `prometheus`, `graphite`). + But only one `-datasource.url` cmd-line flag can be specified, so it can't be configured with more than 1 datasource. + However, VictoriaMetrics and VictoriaLogs datasources have different query path prefixes, and it is possible to use [vmauth](https://docs.victoriametrics.com/vmauth/) to route requests of different types between datasources. + See example of vmauth config for such routing below: + ```yaml + unauthorized_user: + url_map: + - src_paths: + - "/api/v1/query.*" + url_prefix: "http://victoriametrics:8428" + - src_paths: + - "/select/logsql/.*" + url_prefix: "http://victorialogs:9428" + ``` + Now, vmalert needs to be configured with `--datasource.url=http://vmauth:8427/` to send queries to vmauth, and vmauth will route them to the specified destinations as in configuration example above. \ No newline at end of file From b2cf8685e545dae392f7d81227c304c6b9a2195d Mon Sep 17 00:00:00 2001 From: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Date: Wed, 30 Oct 2024 04:39:35 -0700 Subject: [PATCH 46/90] Automatic update helm docs from VictoriaMetrics/helm-charts@87ea94d (#7385) Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Signed-off-by: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Co-authored-by: AndrewChubatiuk <3162380+AndrewChubatiuk@users.noreply.github.com> --- docs/helm/victoria-logs-single/CHANGELOG.md | 18 +++++++ docs/helm/victoria-logs-single/README.md | 37 +++++++++++-- docs/helm/victoria-metrics-agent/CHANGELOG.md | 9 ++++ docs/helm/victoria-metrics-agent/README.md | 2 +- docs/helm/victoria-metrics-alert/CHANGELOG.md | 2 +- docs/helm/victoria-metrics-alert/README.md | 46 +--------------- .../victoria-metrics-anomaly/CHANGELOG.md | 9 ++++ docs/helm/victoria-metrics-anomaly/README.md | 2 +- docs/helm/victoria-metrics-auth/CHANGELOG.md | 2 +- .../victoria-metrics-cluster/CHANGELOG.md | 3 +- .../helm/victoria-metrics-common/CHANGELOG.md | 17 ++++++ .../victoria-metrics-gateway/CHANGELOG.md | 2 +- .../victoria-metrics-k8s-stack/CHANGELOG.md | 2 + .../helm/victoria-metrics-k8s-stack/README.md | 52 +++++++++++++++++++ .../victoria-metrics-operator/CHANGELOG.md | 2 +- .../helm/victoria-metrics-single/CHANGELOG.md | 4 +- docs/helm/victoria-metrics-single/README.md | 15 +++++- 17 files changed, 164 insertions(+), 60 deletions(-) diff --git a/docs/helm/victoria-logs-single/CHANGELOG.md b/docs/helm/victoria-logs-single/CHANGELOG.md index f88c91c66..451a6558b 100644 --- a/docs/helm/victoria-logs-single/CHANGELOG.md +++ b/docs/helm/victoria-logs-single/CHANGELOG.md @@ -1,5 +1,23 @@ ## Next release +- Added ability to override PVC name for Deployment + +## 0.7.1 + +**Release date:** 2024-10-25 + +![AppVersion: v0.37.0](https://img.shields.io/static/v1?label=AppVersion&message=v0.37.0&color=success&logo=) +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + +- Support multiple paths for a single ingress domain + +## 0.7.0 + +**Release date:** 2024-10-25 + +![AppVersion: v0.37.0](https://img.shields.io/static/v1?label=AppVersion&message=v0.37.0&color=success&logo=) +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + - Added grafana dashboard. See [this issue](https://github.com/VictoriaMetrics/helm-charts/issues/1590) - Custom fluent-bit template to push data to multiple VLogs instances when replica count is greated than 1 diff --git a/docs/helm/victoria-logs-single/README.md b/docs/helm/victoria-logs-single/README.md index 8f60fae62..2b13d3f07 100644 --- a/docs/helm/victoria-logs-single/README.md +++ b/docs/helm/victoria-logs-single/README.md @@ -1,4 +1,4 @@ - ![Version: 0.7.0](https://img.shields.io/badge/Version-0.7.0-informational?style=flat-square) + ![Version: 0.7.1](https://img.shields.io/badge/Version-0.7.1-informational?style=flat-square) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-logs-single) [![Slack](https://img.shields.io/badge/join%20slack-%23victoriametrics-brightgreen.svg)](https://slack.victoriametrics.com/) @@ -221,7 +221,11 @@ Change the values according to the need of the environment in ``victoria-logs-si fluent-bit object
    -config:
    +args:
    +    - --workdir=/fluent-bit/etc
    +    - --config=/fluent-bit/etc/conf/fluent-bit.conf
    +    - --enable-hot-reload
    +config:
         filters: |
             [FILTER]
                 Name                kubernetes
    @@ -246,7 +250,7 @@ daemonSetVolumeMounts:
           name: varlibdockercontainers
           readOnly: true
         - mountPath: /fluent-bit/etc/conf/vl
    -      name: victorialogs-outputs
    +      name: vl-outputs
     daemonSetVolumes:
         - hostPath:
             path: /var/log
    @@ -255,9 +259,21 @@ daemonSetVolumes:
             path: /var/lib/docker/containers
           name: varlibdockercontainers
         - configMap:
    -        name: victorialogs-outputs
    -      name: victorialogs-outputs
    +        name: vl-outputs
    +      name: vl-outputs
     enabled: false
    +extraContainers: |
    +    - name: reloader
    +      image: {{ include "fluent-bit.image" .Values.hotReload.image }}
    +      args:
    +        - {{ printf "-webhook-url=http://localhost:%s/api/v2/reload" (toString .Values.metricsPort) }}
    +        - -volume-dir=/watch/config
    +        - -volume-dir=/watch/outputs
    +      volumeMounts:
    +        - name: config
    +          mountPath: /watch/config
    +        - name: vl-outputs
    +          mountPath: /watch/outputs
     resources: {}
     
     
    @@ -757,6 +773,17 @@ loggerFormat: json

    Mount path. Server data Persistent Volume mount root path.

    + + + + server.persistentVolume.name + string +
    +""
    +
    +
    + +

    Override Persistent Volume Claim name

    diff --git a/docs/helm/victoria-metrics-agent/CHANGELOG.md b/docs/helm/victoria-metrics-agent/CHANGELOG.md index 5def3c0f6..b5d18cbce 100644 --- a/docs/helm/victoria-metrics-agent/CHANGELOG.md +++ b/docs/helm/victoria-metrics-agent/CHANGELOG.md @@ -2,6 +2,15 @@ - TODO +## 0.14.4 + +**Release date:** 2024-10-29 + +![AppVersion: v1.105.0](https://img.shields.io/static/v1?label=AppVersion&message=v1.105.0&color=success&logo=) +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + +- Support HPA for Statefulset + ## 0.14.3 **Release date:** 2024-10-21 diff --git a/docs/helm/victoria-metrics-agent/README.md b/docs/helm/victoria-metrics-agent/README.md index 74733c3d0..b5bc19f7b 100644 --- a/docs/helm/victoria-metrics-agent/README.md +++ b/docs/helm/victoria-metrics-agent/README.md @@ -1,4 +1,4 @@ -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.14.3](https://img.shields.io/badge/Version-0.14.3-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.14.4](https://img.shields.io/badge/Version-0.14.4-informational?style=flat-square) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-agent) [![Slack](https://img.shields.io/badge/join%20slack-%23victoriametrics-brightgreen.svg)](https://slack.victoriametrics.com/) diff --git a/docs/helm/victoria-metrics-alert/CHANGELOG.md b/docs/helm/victoria-metrics-alert/CHANGELOG.md index 5ef621af6..954ebafbb 100644 --- a/docs/helm/victoria-metrics-alert/CHANGELOG.md +++ b/docs/helm/victoria-metrics-alert/CHANGELOG.md @@ -1,6 +1,6 @@ ## Next release -- TODO +- use common templates ## 0.12.3 diff --git a/docs/helm/victoria-metrics-alert/README.md b/docs/helm/victoria-metrics-alert/README.md index c1d27ab0b..f054320d8 100644 --- a/docs/helm/victoria-metrics-alert/README.md +++ b/docs/helm/victoria-metrics-alert/README.md @@ -859,50 +859,6 @@ name: ""

    Existing secret name

    - - - - rbac.annotations - object -
    -{}
    -
    -
    - -

    Role/RoleBinding annotations

    - - - - rbac.create - bool -
    -true
    -
    -
    - -

    Enables Role/RoleBinding creation

    - - - - rbac.extraLabels - object -
    -{}
    -
    -
    - -

    Role/RoleBinding labels

    - - - - rbac.namespaced - bool -
    -false
    -
    -
    - -

    If true and rbac.enabled, will deploy a Role/RoleBinding instead of a ClusterRole/ClusterRoleBinding

    @@ -1242,7 +1198,7 @@ variant: "" server.name string
    -server
    +""
     
     
    diff --git a/docs/helm/victoria-metrics-anomaly/CHANGELOG.md b/docs/helm/victoria-metrics-anomaly/CHANGELOG.md index 2179b2834..5d42e0df3 100644 --- a/docs/helm/victoria-metrics-anomaly/CHANGELOG.md +++ b/docs/helm/victoria-metrics-anomaly/CHANGELOG.md @@ -2,6 +2,15 @@ - TODO +## 1.6.3 + +**Release date:** 2024-10-28 + +![AppVersion: v1.18.0](https://img.shields.io/static/v1?label=AppVersion&message=v1.18.0&color=success&logo=) +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + +- Upgraded [`vmanomaly`](https://docs.victoriametrics.com/anomaly-detection/) to [1.18.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1180) + ## 1.6.2 **Release date:** 2024-10-22 diff --git a/docs/helm/victoria-metrics-anomaly/README.md b/docs/helm/victoria-metrics-anomaly/README.md index 2b2cf5732..1b511694e 100644 --- a/docs/helm/victoria-metrics-anomaly/README.md +++ b/docs/helm/victoria-metrics-anomaly/README.md @@ -1,4 +1,4 @@ -![Version: 1.6.2](https://img.shields.io/badge/Version-1.6.2-informational?style=flat-square) +![Version: 1.6.3](https://img.shields.io/badge/Version-1.6.3-informational?style=flat-square) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-anomaly) [![Slack](https://img.shields.io/badge/join%20slack-%23victoriametrics-brightgreen.svg)](https://slack.victoriametrics.com/) [![GitHub license](https://img.shields.io/github/license/VictoriaMetrics/VictoriaMetrics.svg)](https://github.com/VictoriaMetrics/helm-charts/blob/master/LICENSE) diff --git a/docs/helm/victoria-metrics-auth/CHANGELOG.md b/docs/helm/victoria-metrics-auth/CHANGELOG.md index 8edcd95db..9b96d2438 100644 --- a/docs/helm/victoria-metrics-auth/CHANGELOG.md +++ b/docs/helm/victoria-metrics-auth/CHANGELOG.md @@ -1,6 +1,6 @@ ## Next release -- TODO +- multiple paths for a host in ingress ## 0.7.3 diff --git a/docs/helm/victoria-metrics-cluster/CHANGELOG.md b/docs/helm/victoria-metrics-cluster/CHANGELOG.md index ce463b254..fab56ea63 100644 --- a/docs/helm/victoria-metrics-cluster/CHANGELOG.md +++ b/docs/helm/victoria-metrics-cluster/CHANGELOG.md @@ -1,6 +1,7 @@ ## Next release -- TODO +- multiple paths for a host in ingress +- support HPA for vmselect statefulset ## 0.14.6 diff --git a/docs/helm/victoria-metrics-common/CHANGELOG.md b/docs/helm/victoria-metrics-common/CHANGELOG.md index f2142b1be..28adc01d6 100644 --- a/docs/helm/victoria-metrics-common/CHANGELOG.md +++ b/docs/helm/victoria-metrics-common/CHANGELOG.md @@ -4,6 +4,23 @@ - TODO +## 0.0.18 + +**Release date:** 2024-10-29 + +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + +- vm.managed.fullname template modify prefixes + +## 0.0.17 + +**Release date:** 2024-10-25 + +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + +- Added vm.podLabels template +- Do no append default `` prefix/suffix when `.fullnameOverride` set + ## 0.0.16 **Release date:** 2024-10-15 diff --git a/docs/helm/victoria-metrics-gateway/CHANGELOG.md b/docs/helm/victoria-metrics-gateway/CHANGELOG.md index 24dfc676b..f8201a81d 100644 --- a/docs/helm/victoria-metrics-gateway/CHANGELOG.md +++ b/docs/helm/victoria-metrics-gateway/CHANGELOG.md @@ -1,6 +1,6 @@ ## Next release -- TODO +- multiple paths for a host in ingress ## 0.5.3 diff --git a/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md b/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md index 45a3c2a29..e5f24006f 100644 --- a/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md +++ b/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md @@ -8,6 +8,8 @@ - Renamed `grafana.defaultDashboardsTimezone` to `defaultDashboards.defaultTimezone` - Removed `grafana.defaultDatasourceType` and default datasource type is picked from `defaultDatasources.victoriametrics.datasources[*].isDefault: true` - Removed crds subchart as it's now included in operator +- Fixed additionalNotifiersConfig +- Added `vmcluster.vmauth.` and `externalVM.vmauth.` to provide ability to override vmauth configs ## 0.27.6 diff --git a/docs/helm/victoria-metrics-k8s-stack/README.md b/docs/helm/victoria-metrics-k8s-stack/README.md index 9c0e60c27..b5197b4db 100644 --- a/docs/helm/victoria-metrics-k8s-stack/README.md +++ b/docs/helm/victoria-metrics-k8s-stack/README.md @@ -526,6 +526,7 @@ externalURL: "" image: tag: v0.27.0 port: "9093" +replicaCount: 1 routePrefix: / selectAllByDefault: true @@ -1248,12 +1249,43 @@ vmsingle:
     read:
         url: ""
    +vmauth:
    +    read:
    +        - src_paths:
    +            - /select/.*
    +          url_prefix:
    +            - /
    +    write:
    +        - src_paths:
    +            - /insert/.*
    +          url_prefix:
    +            - /
     write:
         url: ""
     
     

    External VM read and write URLs

    + + + + externalVM.vmauth + object +
    +read:
    +    - src_paths:
    +        - /select/.*
    +      url_prefix:
    +        - /
    +write:
    +    - src_paths:
    +        - /insert/.*
    +      url_prefix:
    +        - /
    +
    +
    + +

    Custom VMAuth config, url_prefix requires only path, which will be appended to a read and write base URL. To disable auth for read or write empty list for component config externalVM.vmauth.<component>: []

    @@ -2771,6 +2803,26 @@ vmstorage:

    Data retention period. Possible units character: h(ours), d(ays), w(eeks), y(ears), if no unit character specified - month. The minimum retention period is 24h. See these docs

    + + + + vmcluster.vmauth + object +
    +vminsert:
    +    - src_paths:
    +        - /insert/.*
    +      url_prefix:
    +        - /
    +vmselect:
    +    - src_paths:
    +        - /select/.*
    +      url_prefix:
    +        - /
    +
    +
    + +

    Custom VMAuth config, url_prefix requires only path, which will be appended to a select and insert base URL. To disable auth for vmselect or vminsert empty list for component config vmcluster.vmauth.<component>: []

    diff --git a/docs/helm/victoria-metrics-operator/CHANGELOG.md b/docs/helm/victoria-metrics-operator/CHANGELOG.md index 56d07e8f9..c1f436461 100644 --- a/docs/helm/victoria-metrics-operator/CHANGELOG.md +++ b/docs/helm/victoria-metrics-operator/CHANGELOG.md @@ -1,6 +1,6 @@ ## Next release -- TODO +- Migrated to common templates ## 0.36.0 diff --git a/docs/helm/victoria-metrics-single/CHANGELOG.md b/docs/helm/victoria-metrics-single/CHANGELOG.md index aa1cf9179..ce4e14a3c 100644 --- a/docs/helm/victoria-metrics-single/CHANGELOG.md +++ b/docs/helm/victoria-metrics-single/CHANGELOG.md @@ -1,6 +1,8 @@ ## Next release -- TODO +- replaced chart templates with common ones +- multiple paths for a host in ingress +- Added ability to override PVC name for Deployment ## 0.12.3 diff --git a/docs/helm/victoria-metrics-single/README.md b/docs/helm/victoria-metrics-single/README.md index fb73d7a1d..f8abbb64c 100644 --- a/docs/helm/victoria-metrics-single/README.md +++ b/docs/helm/victoria-metrics-single/README.md @@ -591,11 +591,11 @@ loggerFormat: json server.name string
    -server
    +null
     
     
    -

    Server container name

    +

    Server resource name prefix

    @@ -673,6 +673,17 @@ loggerFormat: json

    Mount path. Server data Persistent Volume mount root path.

    + + + + server.persistentVolume.name + string +
    +""
    +
    +
    + +

    Override Persistent Volume Claim name

    From 702ff923fe1834fcc918b1ced00697d70cb8de2f Mon Sep 17 00:00:00 2001 From: Lubov66 Date: Wed, 30 Oct 2024 13:41:14 +0200 Subject: [PATCH 47/90] docs: replace twitter.com with x.com (#7383) Replacing the name and link of the social network --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8e2ca4c9f..01e91a757 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Here are some resources and information about VictoriaMetrics: - Available: [Binary releases](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/latest), [Docker images](https://hub.docker.com/r/victoriametrics/victoria-metrics/), [Source code](https://github.com/VictoriaMetrics/VictoriaMetrics) - Deployment types: [Single-node version](https://docs.victoriametrics.com/), [Cluster version](https://docs.victoriametrics.com/cluster-victoriametrics/), and [Enterprise version](https://docs.victoriametrics.com/enterprise/) - Changelog: [CHANGELOG](https://docs.victoriametrics.com/changelog/), and [How to upgrade](https://docs.victoriametrics.com/#how-to-upgrade-victoriametrics) -- Community: [Slack](https://slack.victoriametrics.com/), [Twitter](https://twitter.com/VictoriaMetrics), [LinkedIn](https://www.linkedin.com/company/victoriametrics/), [YouTube](https://www.youtube.com/@VictoriaMetrics) +- Community: [Slack](https://slack.victoriametrics.com/), [X (formerly Twitter)](https://x.com/VictoriaMetrics), [LinkedIn](https://www.linkedin.com/company/victoriametrics/), [YouTube](https://www.youtube.com/@VictoriaMetrics) Yes, we open-source both the single-node VictoriaMetrics and the cluster version. @@ -84,7 +84,7 @@ Some good benchmarks VictoriaMetrics achieved: Feel free asking any questions regarding VictoriaMetrics: * [Slack Inviter](https://slack.victoriametrics.com/) and [Slack channel](https://victoriametrics.slack.com/) -* [Twitter](https://twitter.com/VictoriaMetrics/) +* [X (formerly Twitter)](https://x.com/VictoriaMetrics/) * [Linkedin](https://www.linkedin.com/company/victoriametrics/) * [Reddit](https://www.reddit.com/r/VictoriaMetrics/) * [Telegram-en](https://t.me/VictoriaMetrics_en) @@ -122,4 +122,4 @@ The provided [ZIP file](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/ * Do not modify the spacing, alignment, or positioning of design elements. * You may resize the logo as needed, but ensure all proportions remain intact. -Thank you for your cooperation! \ No newline at end of file +Thank you for your cooperation! From cfba770c8ed413b167576d4e4c89df732d146f07 Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Wed, 30 Oct 2024 12:44:50 +0100 Subject: [PATCH 48/90] docs: consistently update twitter.com to x.com See https://github.com/VictoriaMetrics/VictoriaMetrics/pull/7383 Signed-off-by: hagen1778 --- README.md | 4 ++-- docs/Cluster-VictoriaMetrics.md | 2 +- docs/README.md | 2 +- docs/Release-Guide.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 01e91a757..4fb37f87d 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Here are some resources and information about VictoriaMetrics: - Available: [Binary releases](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/latest), [Docker images](https://hub.docker.com/r/victoriametrics/victoria-metrics/), [Source code](https://github.com/VictoriaMetrics/VictoriaMetrics) - Deployment types: [Single-node version](https://docs.victoriametrics.com/), [Cluster version](https://docs.victoriametrics.com/cluster-victoriametrics/), and [Enterprise version](https://docs.victoriametrics.com/enterprise/) - Changelog: [CHANGELOG](https://docs.victoriametrics.com/changelog/), and [How to upgrade](https://docs.victoriametrics.com/#how-to-upgrade-victoriametrics) -- Community: [Slack](https://slack.victoriametrics.com/), [X (formerly Twitter)](https://x.com/VictoriaMetrics), [LinkedIn](https://www.linkedin.com/company/victoriametrics/), [YouTube](https://www.youtube.com/@VictoriaMetrics) +- Community: [Slack](https://slack.victoriametrics.com/), [X (Twitter)](https://x.com/VictoriaMetrics), [LinkedIn](https://www.linkedin.com/company/victoriametrics/), [YouTube](https://www.youtube.com/@VictoriaMetrics) Yes, we open-source both the single-node VictoriaMetrics and the cluster version. @@ -84,7 +84,7 @@ Some good benchmarks VictoriaMetrics achieved: Feel free asking any questions regarding VictoriaMetrics: * [Slack Inviter](https://slack.victoriametrics.com/) and [Slack channel](https://victoriametrics.slack.com/) -* [X (formerly Twitter)](https://x.com/VictoriaMetrics/) +* [X (Twitter)](https://x.com/VictoriaMetrics/) * [Linkedin](https://www.linkedin.com/company/victoriametrics/) * [Reddit](https://www.reddit.com/r/VictoriaMetrics/) * [Telegram-en](https://t.me/VictoriaMetrics_en) diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md index 1857b9e6e..adaf8541e 100644 --- a/docs/Cluster-VictoriaMetrics.md +++ b/docs/Cluster-VictoriaMetrics.md @@ -1068,7 +1068,7 @@ For accessing vmalerts UI through vmselect configure `-vmalert.proxyURL` flag an Feel free asking any questions regarding VictoriaMetrics: * [Slack Inviter](https://slack.victoriametrics.com/) and [Slack channel](https://victoriametrics.slack.com/) -* [Twitter](https://twitter.com/VictoriaMetrics/) +* [X (Twitter)](https://x.com/VictoriaMetrics/) * [Linkedin](https://www.linkedin.com/company/victoriametrics/) * [Reddit](https://www.reddit.com/r/VictoriaMetrics/) * [Telegram-en](https://t.me/VictoriaMetrics_en) diff --git a/docs/README.md b/docs/README.md index 1a1905a9c..731d47081 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2696,7 +2696,7 @@ Contact us with any questions regarding VictoriaMetrics at [info@victoriametrics Feel free asking any questions regarding VictoriaMetrics: * [Slack Inviter](https://slack.victoriametrics.com/) and [Slack channel](https://victoriametrics.slack.com/) -* [Twitter](https://twitter.com/VictoriaMetrics/) +* [X (Twitter)](https://x.com/VictoriaMetrics/) * [Linkedin](https://www.linkedin.com/company/victoriametrics/) * [Reddit](https://www.reddit.com/r/VictoriaMetrics/) * [Telegram-en](https://t.me/VictoriaMetrics_en) diff --git a/docs/Release-Guide.md b/docs/Release-Guide.md index 9ad1c469b..a9d7166a4 100644 --- a/docs/Release-Guide.md +++ b/docs/Release-Guide.md @@ -101,7 +101,7 @@ Bumping the limits may significantly improve build speed. ### Public Announcement * Publish message in Slack at -* Post at Twitter at +* Post at X (Twitter) at * Post in Reddit at * Post in LinkedIn at * Publish message in Telegram at and From 45896fb4779379036dbd19bf5a436d06a47faa2a Mon Sep 17 00:00:00 2001 From: cangqiaoyuzhuo <850072022@qq.com> Date: Wed, 30 Oct 2024 19:45:20 +0800 Subject: [PATCH 49/90] chore: fix function name (#7381) ### Describe Your Changes fix function name ### Checklist The following checks are **mandatory**: - [x] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --- lib/logstorage/block.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logstorage/block.go b/lib/logstorage/block.go index 3c23e17e0..5623f3e44 100644 --- a/lib/logstorage/block.go +++ b/lib/logstorage/block.go @@ -227,7 +227,7 @@ func (b *block) MustInitFromRows(timestamps []int64, rows [][]Field) { b.sortColumnsByName() } -// mustInitiFromRows initializes b from rows. +// mustInitFromRows initializes b from rows. // // b is valid until rows are changed. func (b *block) mustInitFromRows(rows [][]Field) { From 8dc4e2b5a5c2b6db3205ddecf2bceadbe01bbc88 Mon Sep 17 00:00:00 2001 From: danish-mehmood <35922417+danish-mehmood@users.noreply.github.com> Date: Wed, 30 Oct 2024 16:48:09 +0500 Subject: [PATCH 50/90] docs: fix typos and format in case study (#7374) ### Describe Your Changes - made small typo fix in case studies ### Checklist The following checks are **mandatory**: - [x] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --- docs/CaseStudies.md | 92 ++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/docs/CaseStudies.md b/docs/CaseStudies.md index 40ec4fb4d..92fe1c4ba 100644 --- a/docs/CaseStudies.md +++ b/docs/CaseStudies.md @@ -3,11 +3,12 @@ weight: 21 title: Case studies and talks menu: docs: - parent: 'victoriametrics' + parent: "victoriametrics" weight: 21 aliases: -- /CaseStudies.html + - /CaseStudies.html --- + Below please find public case studies and talks from VictoriaMetrics users. You can also join our [community Slack channel](https://slack.victoriametrics.com/) where you can chat with VictoriaMetrics users to get additional references, reviews and case studies. @@ -87,12 +88,12 @@ We ended up with the following configuration: We learned that remote write protocol generated too much traffic and connections so after 8 months we started looking for alternatives. Around the same time, VictoriaMetrics released [vmagent](https://docs.victoriametrics.com/vmagent/). -We tried to scrape all the metrics via a single instance of vmagent but it that didn't work because vmagent wasn't able to catch up with writes +We tried to scrape all the metrics via a single instance of vmagent but that didn't work because vmagent wasn't able to catch up with writes into VictoriaMetrics. We tested different options and end up with the following scheme: - We removed Prometheus from our setup. - VictoriaMetrics [can scrape targets](https://docs.victoriametrics.com/single-server-victoriametrics/#how-to-scrape-prometheus-exporters-such-as-node-exporter) as well -so we removed vmagent. Now, VictoriaMetrics scrapes all the metrics from 110 jobs and 5531 targets. + so we removed vmagent. Now, VictoriaMetrics scrapes all the metrics from 110 jobs and 5531 targets. - We use [Promxy](https://github.com/jacksontj/promxy) for alerting. Such a scheme has generated the following benefits compared with Prometheus: @@ -195,8 +196,8 @@ Once we found VictoriaMetrics it solved the following problems: - very short startup time and any possible gaps in data can easily be filled in using Promxy - we could continue using Telegraf as our metrics agent and ship identical metrics to both InfluxDB and VictoriaMetrics during the migration period (migration just about to start) - compression im VM is really good. We can store more metrics and we can easily spin up new VictoriaMetrics instances -for new data and keep read-only nodes with older data if we need to extend our retention period further -than single virtual machine disks allow and we can aggregate all the data from VictoriaMetrics with Promxy + for new data and keep read-only nodes with older data if we need to extend our retention period further + than single virtual machine disks allow and we can aggregate all the data from VictoriaMetrics with Promxy High availability is done the same way we did with InfluxDB by running parallel single nodes of VictoriaMetrics. @@ -260,38 +261,38 @@ We started with a Prometheus server on EKS. That worked until it didn't. We then ### What VictoriaMetrics means for us -* Easy to use and maintain -* Cost effective -* The ability to handle billions of time series events at any point of time -* Multiple K8s clusters to monitor -* Consistent monitoring infra for each cluster across multiple Regions and clouds -* Secure communication and data storage -* Easy Retention +- Easy to use and maintain +- Cost effective +- The ability to handle billions of time series events at any point of time +- Multiple K8s clusters to monitor +- Consistent monitoring infra for each cluster across multiple Regions and clouds +- Secure communication and data storage +- Easy Retention ### Some of our initial challenges prior to moving to VictoriaMetrics -* Reducing cost by not using a managed solution of one of the clouds -* Support HA and recover fast -* No downtimes -* Having our main prometheus using too much Ram and restarts. +- Reducing cost by not using a managed solution of one of the clouds +- Support HA and recover fast +- No downtimes +- Having our main prometheus using too much Ram and restarts. ### Some of the reasons we chose VictoriaMetrics -* The API is compatible with Prometheus and all standard PromQL queries work well out of the box -* Handles storage well -* Available to use in Grafana easily -* Single and small executable -* Easy and fast backups -* Better benchmarks than all the competitors -* Open Source and maintained with good community +- The API is compatible with Prometheus and all standard PromQL queries work well out of the box +- Handles storage well +- Available to use in Grafana easily +- Single and small executable +- Easy and fast backups +- Better benchmarks than all the competitors +- Open Source and maintained with good community ### Some of the benefits we experienced since working with VictoriaMetrics -* We saved around $5K USD per month -* It’s seamless and doesn’t cause any override complications on the Infrastructure team -* It doesn’t use lots of storage -* It can serve us in the future in even bigger scales -* It has support with a great community. +- We saved around $5K USD per month +- It’s seamless and doesn’t cause any override complications on the Infrastructure team +- It doesn’t use lots of storage +- It can serve us in the future in even bigger scales +- It has support with a great community. ## Fly.io @@ -412,12 +413,13 @@ See [this video](https://www.youtube.com/watch?v=OUyXPgVcdw4) and [these slides] [NetEase Cloud Music](https://music.163.com/) is a Chinese freemium music streaming service developed and owned by [NetEase, Inc](https://en.wikipedia.org/wiki/NetEase). It is one of the biggest competitors in the Chinese music streaming business, primarily competing with [Tencent](https://en.wikipedia.org/wiki/Tencent)'s QQ Music. The huge scale of services and the diverse monitoring requirements bring great challenges to timeseries database’s reliability, availability, and performance. With year’s evolution, we finally build a metrics system around VictoriaMetrics, aiming to solve following problems: -* Weak observability on application layer: in the past, internal monitoring of the product mainly focused on machine level. Although it also provided monitoring plugins for common frameworks, there was still room for improvement in both performance and visualization effects. -* Linking metrics to trace: metrics are the most intuitive way to discover problems, such as "getting 10 failed http requests in the past 30s", but sometimes traces are also needed to locate the root cause of the errors. -* Performance and cost: storage cost of the old metric system is relatively high, since prometheus as a standalone application cannot support large scale of data. -* aggregate queries: aggregate queries are often needed and could take several seconds or even tens of seconds, slowing down troubleshooting process seriously. -* Weak visualization capabilities: monitoring data are often used in YoY comparison and multi-instance comparison to help locate problems. Neither Prometheus UI nor Grafana supports this feature. - + +- Weak observability on application layer: in the past, internal monitoring of the product mainly focused on machine level. Although it also provided monitoring plugins for common frameworks, there was still room for improvement in both performance and visualization effects. +- Linking metrics to trace: metrics are the most intuitive way to discover problems, such as "getting 10 failed http requests in the past 30s", but sometimes traces are also needed to locate the root cause of the errors. +- Performance and cost: storage cost of the old metric system is relatively high, since prometheus as a standalone application cannot support large scale of data. +- aggregate queries: aggregate queries are often needed and could take several seconds or even tens of seconds, slowing down troubleshooting process seriously. +- Weak visualization capabilities: monitoring data are often used in YoY comparison and multi-instance comparison to help locate problems. Neither Prometheus UI nor Grafana supports this feature. + See [this article](https://juejin.cn/post/7322268449409744931) for details on how NetEase Cloud Music build a metrics system base on VictoriaMetrics and give solutions to above problems. ## Percona @@ -451,7 +453,7 @@ See [the full article](https://engineering.razorpay.com/scaling-to-trillions-of- [RELEX Solutions](https://www.relexsolutions.com/), a global software company from Finland, is the market-leading supply chain and retail planning platform. -VictoriaMetrics is used as the central metrics storage for timeseries about applications and machines hosted both in the public cloud and in the private cloud. Metrics are remote-written by Prometheus, the OpenTelemetry collector and sometimes directly by custom Prometheus exporters. +VictoriaMetrics is used as the central metrics storage for timeseries about applications and machines hosted both in the public cloud and in the private cloud. Metrics are remote-written by Prometheus, the OpenTelemetry collector and sometimes directly by custom Prometheus exporters. Alerts are evaluated on vmalert when necessary, either because metrics from multiple sources are needed or because the source is Prometheus in agent mode (mostly for kubernetes clusters). Prometheus Alertmanager and Grafana+Promxy combine all sources together so that the end users of dashboards (and ideally the recipients of alert notifications) don't have to worry where to look for some information. @@ -554,7 +556,7 @@ See [the full article](https://smarketshq.com/monitoring-kubernetes-clusters-41a [Synthesio](https://www.synthesio.com/) is the leading social intelligence tool for social media monitoring and analytics. -> We fully migrated from [Metrictank](https://github.com/grafana/metrictank) to VictoriaMetrics +> We fully migrated from [Metrictank](https://github.com/grafana/metrictank) to VictoriaMetrics Numbers: @@ -611,15 +613,15 @@ Numbers: Alex Ulstein, Head of Monitoring, Wix.com - ## xiaohongshu With a mission to “inspire lives”, [Xiaohongshu](https://www.xiaohongshu.com) is a lifestyle platform that inspires people to discover and connect with a range of diverse lifestyles from China. -In the past year, we used VictoriaMetrics to replace Prometheus. After migrating to VictoriaMetrics, we had saved more than ten thousand cpu cores, and our metrics system is more stable. +In the past year, we used VictoriaMetrics to replace Prometheus. After migrating to VictoriaMetrics, we had saved more than ten thousand cpu cores, and our metrics system is more stable. Now more than thirty VictoriaMetrics storage clusters are running online, including all of our key business areas, such as recommendations, search, community, advertising, infrastructure, etc. See [this article](https://mp.weixin.qq.com/s/uJ1t0B8WBBryzvbLWDfl5A) on how Xiaohongshu build metrics system base on VictoriaMetrics and the competing solutions. Across our production VictoriaMetrics clusters, numbers as below: + - Cpu cores in all VictoriaMetrics clusters: almost 50000 - Data size on disk: 2400 TB - Retention period: 1 month @@ -629,7 +631,6 @@ Across our production VictoriaMetrics clusters, numbers as below: - /api/v1/query_range: 2300 queries per second - /api/v1/query: 260 queries per second - ## Zerodha [Zerodha](https://zerodha.com/) is India's largest stock broker. The monitoring team at Zerodha had the following requirements: @@ -665,7 +666,6 @@ Numbers: - The average query rate is ~3k per second (mostly alert queries). - Query duration: median is ~40ms, 99th percentile is ~100ms. - ## Zomato ### Who We Are @@ -679,13 +679,13 @@ As we scaled, our existing observability stack (Prometheus and Thanos) began to ### Our Solution To address these challenges, we decided to migrate to VictoriaMetrics. We were drawn to its reputation for high performance, low resource usage, and scalability. The migration process was carefully planned to ensure a smooth transition with minimal disruption. We focused on: - - **Data Optimization**: We reduced unnecessary metrics to minimize data ingestion and storage needs. - - **Performance Enhancements**: VictoriaMetrics’ efficient query processing allowed us to achieve significantly faster query response times. - - **Cost Efficiency**: The optimized storage format in VictoriaMetrics led to a noticeable reduction in our storage and operational costs. + +- **Data Optimization**: We reduced unnecessary metrics to minimize data ingestion and storage needs. +- **Performance Enhancements**: VictoriaMetrics’ efficient query processing allowed us to achieve significantly faster query response times. +- **Cost Efficiency**: The optimized storage format in VictoriaMetrics led to a noticeable reduction in our storage and operational costs. ### The Results Post-migration, we successfully scaled our monitoring infrastructure to handle billions of data points daily, all while experiencing faster query performance and 60% reduction in yearly infra cost. The improved observability has enhanced our ability to deliver reliable service, allowing us to troubleshoot issues more quickly and effectively. - -Read more about the migration journey in our blog - https://blog.zomato.com/migrating-to-victoriametrics-a-complete-overhaul-for-enhanced-observability \ No newline at end of file +Read more about the migration journey in our blog - https://blog.zomato.com/migrating-to-victoriametrics-a-complete-overhaul-for-enhanced-observability From 258ee93fd17f4ba576c1beaa54eda0f01ec56759 Mon Sep 17 00:00:00 2001 From: Dan Dascalescu Date: Wed, 30 Oct 2024 13:55:52 +0200 Subject: [PATCH 51/90] docs: clarify "single" in Single-server-VictoriaMetrics.md (#7369) ### Describe Your Changes "Single version" is unclear, since VM is also a single-executable. I think "single-node" is clearer. ### Checklist The following checks are **mandatory**: - [x] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --- docs/Single-server-VictoriaMetrics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md index 4ab008c8a..73dcd808f 100644 --- a/docs/Single-server-VictoriaMetrics.md +++ b/docs/Single-server-VictoriaMetrics.md @@ -5,7 +5,7 @@ menu: identifier: vm-single-version parent: victoriametrics weight: 1 -title: Single version +title: Single-node version aliases: - /Single-server-VictoriaMetrics.html --- From 102e9d4f4ea7b421b082740c6f3ba0402eee1f84 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 30 Oct 2024 13:37:27 +0100 Subject: [PATCH 52/90] lib/logstorage: make sure that the number of output (bloom, values) shards is bigger than zero. If the number of output (bloom, values) shards is zero, then this may lead to panic as shown at https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7391 . This panic may happen when parts with only constant fields with distinct values are merged into output part with non-constant fields, which should be written to (bloom, values) shards. --- docs/VictoriaLogs/CHANGELOG.md | 2 ++ lib/logstorage/block_stream_writer.go | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index d6474b93f..8e2037265 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -15,6 +15,8 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta ## tip +* BUGFIX: fix `runtime error: index out of range [0] with length 0` panic during low-rate data ingestion. The panic has been introduced in [v0.38.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.38.0-victorialogs). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7391). + ## [v0.38.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.38.0-victorialogs) Released at 2024-10-29 diff --git a/lib/logstorage/block_stream_writer.go b/lib/logstorage/block_stream_writer.go index 3d3a54382..fcffb3eab 100644 --- a/lib/logstorage/block_stream_writer.go +++ b/lib/logstorage/block_stream_writer.go @@ -312,7 +312,10 @@ func (bsw *blockStreamWriter) MustInitForFilePart(path string, nocache bool, blo func adjustBloomValuesShardsCount(n uint64) uint64 { if n == 0 { - return n + // At least a single shard is needed for writing potential non-const fields, + // which can appear after merging of const fields. + // This fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7391 + return 1 } n = 1 << bits.Len64(n-1) From ed73f8350b5710d27895facf50c84147c7a6af7e Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 30 Oct 2024 14:13:56 +0100 Subject: [PATCH 53/90] app/vlinsert: allow specifying comma-separated list of fields containing log message via _msg_field query arg and VL-Msg-Field HTTP request header This msy be useful when ingesting logs from different sources, which store the log message in different fields. For example, `_msg_field=message,event.data,some_field` will get log message from the first non-empty field: `message`, `event.data` and `some_field`. --- app/vlinsert/elasticsearch/elasticsearch.go | 10 +++++----- app/vlinsert/elasticsearch/elasticsearch_test.go | 7 ++++--- .../elasticsearch/elasticsearch_timing_test.go | 4 ++-- app/vlinsert/insertutils/common_params.go | 12 +++++++++--- app/vlinsert/journald/journald.go | 5 +++-- app/vlinsert/journald/journald_test.go | 4 ++-- app/vlinsert/jsonline/jsonline.go | 10 +++++----- app/vlinsert/jsonline/jsonline_test.go | 5 +++-- app/vlinsert/syslog/syslog.go | 4 +++- docs/VictoriaLogs/CHANGELOG.md | 2 ++ docs/VictoriaLogs/data-ingestion/README.md | 8 ++++++++ docs/VictoriaLogs/keyConcepts.md | 3 ++- lib/logstorage/rows.go | 10 ++++++---- 13 files changed, 54 insertions(+), 30 deletions(-) diff --git a/app/vlinsert/elasticsearch/elasticsearch.go b/app/vlinsert/elasticsearch/elasticsearch.go index fff9f19be..b0e941cd2 100644 --- a/app/vlinsert/elasticsearch/elasticsearch.go +++ b/app/vlinsert/elasticsearch/elasticsearch.go @@ -103,7 +103,7 @@ func RequestHandler(path string, w http.ResponseWriter, r *http.Request) bool { } lmp := cp.NewLogMessageProcessor() isGzip := r.Header.Get("Content-Encoding") == "gzip" - n, err := readBulkRequest(r.Body, isGzip, cp.TimeField, cp.MsgField, lmp) + n, err := readBulkRequest(r.Body, isGzip, cp.TimeField, cp.MsgFields, lmp) lmp.MustClose() if err != nil { logger.Warnf("cannot decode log message #%d in /_bulk request: %s, stream fields: %s", n, err, cp.StreamFields) @@ -133,7 +133,7 @@ var ( bulkRequestDuration = metrics.NewHistogram(`vl_http_request_duration_seconds{path="/insert/elasticsearch/_bulk"}`) ) -func readBulkRequest(r io.Reader, isGzip bool, timeField, msgField string, lmp insertutils.LogMessageProcessor) (int, error) { +func readBulkRequest(r io.Reader, isGzip bool, timeField string, msgFields []string, lmp insertutils.LogMessageProcessor) (int, error) { // See https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html if isGzip { @@ -158,7 +158,7 @@ func readBulkRequest(r io.Reader, isGzip bool, timeField, msgField string, lmp i n := 0 nCheckpoint := 0 for { - ok, err := readBulkLine(sc, timeField, msgField, lmp) + ok, err := readBulkLine(sc, timeField, msgFields, lmp) wcr.DecConcurrency() if err != nil || !ok { rowsIngestedTotal.Add(n - nCheckpoint) @@ -174,7 +174,7 @@ func readBulkRequest(r io.Reader, isGzip bool, timeField, msgField string, lmp i var lineBufferPool bytesutil.ByteBufferPool -func readBulkLine(sc *bufio.Scanner, timeField, msgField string, lmp insertutils.LogMessageProcessor) (bool, error) { +func readBulkLine(sc *bufio.Scanner, timeField string, msgFields []string, lmp insertutils.LogMessageProcessor) (bool, error) { var line []byte // Read the command, must be "create" or "index" @@ -219,7 +219,7 @@ func readBulkLine(sc *bufio.Scanner, timeField, msgField string, lmp insertutils if ts == 0 { ts = time.Now().UnixNano() } - logstorage.RenameField(p.Fields, msgField, "_msg") + logstorage.RenameField(p.Fields, msgFields, "_msg") lmp.AddRow(ts, p.Fields) logstorage.PutJSONParser(p) diff --git a/app/vlinsert/elasticsearch/elasticsearch_test.go b/app/vlinsert/elasticsearch/elasticsearch_test.go index 4370fb669..a4c6c9686 100644 --- a/app/vlinsert/elasticsearch/elasticsearch_test.go +++ b/app/vlinsert/elasticsearch/elasticsearch_test.go @@ -15,7 +15,7 @@ func TestReadBulkRequest_Failure(t *testing.T) { tlp := &insertutils.TestLogMessageProcessor{} r := bytes.NewBufferString(data) - rows, err := readBulkRequest(r, false, "_time", "_msg", tlp) + rows, err := readBulkRequest(r, false, "_time", []string{"_msg"}, tlp) if err == nil { t.Fatalf("expecting non-empty error") } @@ -36,11 +36,12 @@ func TestReadBulkRequest_Success(t *testing.T) { f := func(data, timeField, msgField string, rowsExpected int, timestampsExpected []int64, resultExpected string) { t.Helper() + msgFields := []string{"non_existing_foo", msgField, "non_exiting_bar"} tlp := &insertutils.TestLogMessageProcessor{} // Read the request without compression r := bytes.NewBufferString(data) - rows, err := readBulkRequest(r, false, timeField, msgField, tlp) + rows, err := readBulkRequest(r, false, timeField, msgFields, tlp) if err != nil { t.Fatalf("unexpected error: %s", err) } @@ -55,7 +56,7 @@ func TestReadBulkRequest_Success(t *testing.T) { tlp = &insertutils.TestLogMessageProcessor{} compressedData := compressData(data) r = bytes.NewBufferString(compressedData) - rows, err = readBulkRequest(r, true, timeField, msgField, tlp) + rows, err = readBulkRequest(r, true, timeField, msgFields, tlp) if err != nil { t.Fatalf("unexpected error: %s", err) } diff --git a/app/vlinsert/elasticsearch/elasticsearch_timing_test.go b/app/vlinsert/elasticsearch/elasticsearch_timing_test.go index a0b4e485b..8e592ddbf 100644 --- a/app/vlinsert/elasticsearch/elasticsearch_timing_test.go +++ b/app/vlinsert/elasticsearch/elasticsearch_timing_test.go @@ -32,7 +32,7 @@ func benchmarkReadBulkRequest(b *testing.B, isGzip bool) { dataBytes := bytesutil.ToUnsafeBytes(data) timeField := "@timestamp" - msgField := "message" + msgFields := []string{"message"} blp := &insertutils.BenchmarkLogMessageProcessor{} b.ReportAllocs() @@ -41,7 +41,7 @@ func benchmarkReadBulkRequest(b *testing.B, isGzip bool) { r := &bytes.Reader{} for pb.Next() { r.Reset(dataBytes) - _, err := readBulkRequest(r, isGzip, timeField, msgField, blp) + _, err := readBulkRequest(r, isGzip, timeField, msgFields, blp) if err != nil { panic(fmt.Errorf("unexpected error: %w", err)) } diff --git a/app/vlinsert/insertutils/common_params.go b/app/vlinsert/insertutils/common_params.go index 733079ce0..12b9f1103 100644 --- a/app/vlinsert/insertutils/common_params.go +++ b/app/vlinsert/insertutils/common_params.go @@ -22,7 +22,7 @@ import ( type CommonParams struct { TenantID logstorage.TenantID TimeField string - MsgField string + MsgFields []string StreamFields []string IgnoreFields []string @@ -54,6 +54,10 @@ func GetCommonParams(r *http.Request) (*CommonParams, error) { } else if msgf = r.Header.Get("VL-Msg-Field"); msgf != "" { msgField = msgf } + var msgFields []string + if msgField != "" { + msgFields = strings.Split(msgField, ",") + } streamFields := httputils.GetArray(r, "_stream_fields") if len(streamFields) == 0 { @@ -89,7 +93,7 @@ func GetCommonParams(r *http.Request) (*CommonParams, error) { cp := &CommonParams{ TenantID: tenantID, TimeField: timeField, - MsgField: msgField, + MsgFields: msgFields, StreamFields: streamFields, IgnoreFields: ignoreFields, Debug: debug, @@ -106,7 +110,9 @@ func GetCommonParamsForSyslog(tenantID logstorage.TenantID) *CommonParams { cp := &CommonParams{ TenantID: tenantID, TimeField: "timestamp", - MsgField: "message", + MsgFields: []string{ + "message", + }, StreamFields: []string{ "hostname", "app_name", diff --git a/app/vlinsert/journald/journald.go b/app/vlinsert/journald/journald.go index c337daa54..1cf76c354 100644 --- a/app/vlinsert/journald/journald.go +++ b/app/vlinsert/journald/journald.go @@ -8,6 +8,7 @@ import ( "io" "net/http" "regexp" + "slices" "strconv" "strings" "time" @@ -64,7 +65,7 @@ func getCommonParams(r *http.Request) (*insertutils.CommonParams, error) { if len(cp.IgnoreFields) == 0 { cp.IgnoreFields = *journaldIgnoreFields } - cp.MsgField = "MESSAGE" + cp.MsgFields = []string{"MESSAGE"} return cp, nil } @@ -233,7 +234,7 @@ func parseJournaldRequest(data []byte, lmp insertutils.LogMessageProcessor, cp * continue } - if name == cp.MsgField { + if slices.Contains(cp.MsgFields, name) { name = "_msg" } diff --git a/app/vlinsert/journald/journald_test.go b/app/vlinsert/journald/journald_test.go index b3d3db93c..86fd0de1f 100644 --- a/app/vlinsert/journald/journald_test.go +++ b/app/vlinsert/journald/journald_test.go @@ -12,7 +12,7 @@ func TestPushJournaldOk(t *testing.T) { tlp := &insertutils.TestLogMessageProcessor{} cp := &insertutils.CommonParams{ TimeField: "__REALTIME_TIMESTAMP", - MsgField: "MESSAGE", + MsgFields: []string{"MESSAGE"}, } n, err := parseJournaldRequest([]byte(src), tlp, cp) if err != nil { @@ -48,7 +48,7 @@ func TestPushJournald_Failure(t *testing.T) { tlp := &insertutils.TestLogMessageProcessor{} cp := &insertutils.CommonParams{ TimeField: "__REALTIME_TIMESTAMP", - MsgField: "MESSAGE", + MsgFields: []string{"MESSAGE"}, } _, err := parseJournaldRequest([]byte(data), tlp, cp) if err == nil { diff --git a/app/vlinsert/jsonline/jsonline.go b/app/vlinsert/jsonline/jsonline.go index 10df87367..1db2cf7ca 100644 --- a/app/vlinsert/jsonline/jsonline.go +++ b/app/vlinsert/jsonline/jsonline.go @@ -53,7 +53,7 @@ func RequestHandler(w http.ResponseWriter, r *http.Request) { } lmp := cp.NewLogMessageProcessor() - err = processStreamInternal(reader, cp.TimeField, cp.MsgField, lmp) + err = processStreamInternal(reader, cp.TimeField, cp.MsgFields, lmp) lmp.MustClose() if err != nil { @@ -66,7 +66,7 @@ func RequestHandler(w http.ResponseWriter, r *http.Request) { } } -func processStreamInternal(r io.Reader, timeField, msgField string, lmp insertutils.LogMessageProcessor) error { +func processStreamInternal(r io.Reader, timeField string, msgFields []string, lmp insertutils.LogMessageProcessor) error { wcr := writeconcurrencylimiter.GetReader(r) defer writeconcurrencylimiter.PutReader(wcr) @@ -79,7 +79,7 @@ func processStreamInternal(r io.Reader, timeField, msgField string, lmp insertut n := 0 for { - ok, err := readLine(sc, timeField, msgField, lmp) + ok, err := readLine(sc, timeField, msgFields, lmp) wcr.DecConcurrency() if err != nil { errorsTotal.Inc() @@ -93,7 +93,7 @@ func processStreamInternal(r io.Reader, timeField, msgField string, lmp insertut } } -func readLine(sc *bufio.Scanner, timeField, msgField string, lmp insertutils.LogMessageProcessor) (bool, error) { +func readLine(sc *bufio.Scanner, timeField string, msgFields []string, lmp insertutils.LogMessageProcessor) (bool, error) { var line []byte for len(line) == 0 { if !sc.Scan() { @@ -116,7 +116,7 @@ func readLine(sc *bufio.Scanner, timeField, msgField string, lmp insertutils.Log if err != nil { return false, fmt.Errorf("cannot get timestamp: %w", err) } - logstorage.RenameField(p.Fields, msgField, "_msg") + logstorage.RenameField(p.Fields, msgFields, "_msg") lmp.AddRow(ts, p.Fields) logstorage.PutJSONParser(p) diff --git a/app/vlinsert/jsonline/jsonline_test.go b/app/vlinsert/jsonline/jsonline_test.go index 17dc0ad95..429a1e4f2 100644 --- a/app/vlinsert/jsonline/jsonline_test.go +++ b/app/vlinsert/jsonline/jsonline_test.go @@ -11,9 +11,10 @@ func TestProcessStreamInternal_Success(t *testing.T) { f := func(data, timeField, msgField string, rowsExpected int, timestampsExpected []int64, resultExpected string) { t.Helper() + msgFields := []string{msgField} tlp := &insertutils.TestLogMessageProcessor{} r := bytes.NewBufferString(data) - if err := processStreamInternal(r, timeField, msgField, tlp); err != nil { + if err := processStreamInternal(r, timeField, msgFields, tlp); err != nil { t.Fatalf("unexpected error: %s", err) } @@ -42,7 +43,7 @@ func TestProcessStreamInternal_Failure(t *testing.T) { tlp := &insertutils.TestLogMessageProcessor{} r := bytes.NewBufferString(data) - if err := processStreamInternal(r, "time", "", tlp); err == nil { + if err := processStreamInternal(r, "time", nil, tlp); err == nil { t.Fatalf("expecting non-nil error") } } diff --git a/app/vlinsert/syslog/syslog.go b/app/vlinsert/syslog/syslog.go index a2481d1b1..83bf6944c 100644 --- a/app/vlinsert/syslog/syslog.go +++ b/app/vlinsert/syslog/syslog.go @@ -514,13 +514,15 @@ func processLine(line []byte, currentYear int, timezone *time.Location, useLocal } ts = nsecs } - logstorage.RenameField(p.Fields, "message", "_msg") + logstorage.RenameField(p.Fields, msgFields, "_msg") lmp.AddRow(ts, p.Fields) logstorage.PutSyslogParser(p) return nil } +var msgFields = []string{"message"} + var ( rowsIngestedTotal = metrics.NewCounter(`vl_rows_ingested_total{type="syslog"}`) diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 8e2037265..378108cc6 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -15,6 +15,8 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta ## tip +* FEATURE: allow specifying a list of log fields, which contain log message, via `_msg_field` query arg and via `VL-Msg-Field` HTTP request header. For example, `_msg_field=message,event.message` instructs obtaining [message field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field) from the first non-empty field out of the `message` and `event.message` fields. See [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/#http-parameters) for details. + * BUGFIX: fix `runtime error: index out of range [0] with length 0` panic during low-rate data ingestion. The panic has been introduced in [v0.38.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.38.0-victorialogs). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7391). ## [v0.38.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.38.0-victorialogs) diff --git a/docs/VictoriaLogs/data-ingestion/README.md b/docs/VictoriaLogs/data-ingestion/README.md index 0f912c4de..a717540a9 100644 --- a/docs/VictoriaLogs/data-ingestion/README.md +++ b/docs/VictoriaLogs/data-ingestion/README.md @@ -193,6 +193,10 @@ First defined parameter is used. [Query string](https://en.wikipedia.org/wiki/Qu - `_msg_field` - it must contain the name of the [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) with the [log message](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field) generated by the log shipper. This is usually the `message` field for Filebeat and Logstash. + + The `_msg_field` arg may contain comma-separated list of field names. In this case the first non-empty field from the list + is treated as [log message](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field). + If the `_msg_field` parameter isn't set, then VictoriaLogs reads the log message from the `_msg` field. - `_time_field` - it must contain the name of the [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) @@ -225,6 +229,10 @@ VictoriaLogs accepts optional `AccountID` and `ProjectID` headers at [data inges - `VL-Msg-Field` - it must contain the name of the [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) with the [log message](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field) generated by the log shipper. This is usually the `message` field for Filebeat and Logstash. + + The `VL-Msg-Field` header may contain comma-separated list of field names. In this case the first non-empty field from the list + is treated as [log message](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field). + If the `VL-Msg-Field` header isn't set, then VictoriaLogs reads the log message from the `_msg` field. - `VL-Time-Field` - it must contain the name of the [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) diff --git a/docs/VictoriaLogs/keyConcepts.md b/docs/VictoriaLogs/keyConcepts.md index d1b38ba65..8eee6fbbf 100644 --- a/docs/VictoriaLogs/keyConcepts.md +++ b/docs/VictoriaLogs/keyConcepts.md @@ -128,9 +128,10 @@ log entry, which can be ingested into VictoriaLogs: ``` If the actual log message has other than `_msg` field name, then it is possible to specify the real log message field -via `_msg_field` query arg during [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/). +via `_msg_field` query arg or via `VL-Msg-Field` HTTP header during [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/). For example, if log message is located in the `event.original` field, then specify `_msg_field=event.original` query arg during [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/). +See [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/#http-parameters) for more details. ### Time field diff --git a/lib/logstorage/rows.go b/lib/logstorage/rows.go index 7f70b122e..dddeb896b 100644 --- a/lib/logstorage/rows.go +++ b/lib/logstorage/rows.go @@ -2,6 +2,7 @@ package logstorage import ( "fmt" + "slices" "github.com/valyala/quicktemplate" @@ -118,14 +119,15 @@ func isLogfmtSpecialChar(c rune) bool { } } -// RenameField renames field with the oldName to newName in Fields -func RenameField(fields []Field, oldName, newName string) { - if oldName == "" { +// RenameField renames the first non-empty field with the name from oldNames list to newName in Fields +func RenameField(fields []Field, oldNames []string, newName string) { + if len(oldNames) == 0 { + // Nothing to rename return } for i := range fields { f := &fields[i] - if f.Name == oldName { + if f.Value != "" && slices.Contains(oldNames, f.Name) { f.Name = newName return } From 96466562b6b32a940250cbc585fa06a1e2762d41 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 30 Oct 2024 14:20:32 +0100 Subject: [PATCH 54/90] docs/VictoriaLogs/data-ingestion/README.md: formatting fixes after 8b36529b32939c6095b8e44cf9602996a15d080a - Remove leading whitespace from the first lines in 'HTTP parameters' chapter. This whitespace isn't needed for the markdown formatting. - Add leading whitespace for the second sentence in the list bullet describing AccountID and ProjectID HTTP headers. This fixes markdown formatting for this list bullet. --- docs/VictoriaLogs/data-ingestion/README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/VictoriaLogs/data-ingestion/README.md b/docs/VictoriaLogs/data-ingestion/README.md index a717540a9..63d77fd8c 100644 --- a/docs/VictoriaLogs/data-ingestion/README.md +++ b/docs/VictoriaLogs/data-ingestion/README.md @@ -183,12 +183,13 @@ See also: ### HTTP parameters - VictoriaLogs accepts the following configuration parameters via [HTTP Headers](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields) or URL [Query string](https://en.wikipedia.org/wiki/Query_string) at [data ingestion HTTP APIs](#http-apis). -First defined parameter is used. [Query string](https://en.wikipedia.org/wiki/Query_string) parameters have priority over HTTP Headers. +VictoriaLogs accepts the following configuration parameters via [HTTP headers](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields) +or via [HTTP query string args](https://en.wikipedia.org/wiki/Query_string) at [data ingestion HTTP APIs](#http-apis). +HTTP query string parameters have priority over HTTP Headers. #### HTTP Query string parameters - List of supported [Query string](https://en.wikipedia.org/wiki/Query_string) parameters: +List of supported [Query string](https://en.wikipedia.org/wiki/Query_string) parameters: - `_msg_field` - it must contain the name of the [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) with the [log message](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field) generated by the log shipper. @@ -219,12 +220,12 @@ See also [HTTP headers](#http-headers). #### HTTP headers - List of supported [HTTP Headers](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields) parameters: +List of supported [HTTP Headers](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields) parameters: - `AccountID` - may contain the needed accountID of tenant to ingest data to. See [multitenancy docs](https://docs.victoriametrics.com/victorialogs/#multitenancy) for details. - `ProjectID`- may contain the projectID needed of tenant to ingest data to. See [multitenancy docs](https://docs.victoriametrics.com/victorialogs/#multitenancy) for details. -VictoriaLogs accepts optional `AccountID` and `ProjectID` headers at [data ingestion HTTP APIs](#http-apis). + VictoriaLogs accepts optional `AccountID` and `ProjectID` headers at [data ingestion HTTP APIs](#http-apis). - `VL-Msg-Field` - it must contain the name of the [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) with the [log message](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field) generated by the log shipper. From 16ee470da614bfd0fcfabc3e109d245fc899d946 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 30 Oct 2024 14:59:03 +0100 Subject: [PATCH 55/90] app/vlinsert: accept logs with empty _msg field In this case the _msg field is set to the value specified in the -defaultMsgValue command-line flag. This should simplify first-time migration to VictoriaLogs from other systems. --- app/vlinsert/insertutils/common_params.go | 41 ++++++++++++++--------- app/vlinsert/jsonline/jsonline_test.go | 12 +++++++ docs/VictoriaLogs/CHANGELOG.md | 1 + docs/VictoriaLogs/README.md | 27 +++++++++++---- docs/VictoriaLogs/keyConcepts.md | 9 +++-- 5 files changed, 66 insertions(+), 24 deletions(-) diff --git a/app/vlinsert/insertutils/common_params.go b/app/vlinsert/insertutils/common_params.go index 12b9f1103..f2170da62 100644 --- a/app/vlinsert/insertutils/common_params.go +++ b/app/vlinsert/insertutils/common_params.go @@ -1,6 +1,7 @@ package insertutils import ( + "flag" "net/http" "strings" "sync" @@ -16,6 +17,11 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/timeutil" ) +var ( + defaultMsgValue = flag.String("defaultMsgValue", "missing _msg field; see https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field", + "Default value for _msg field if the ingested log entry doesn't contain it; see https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field") +) + // CommonParams contains common HTTP parameters used by log ingestion APIs. // // See https://docs.victoriametrics.com/victorialogs/data-ingestion/#http-parameters @@ -140,6 +146,8 @@ type logMessageProcessor struct { stopCh chan struct{} lastFlushTime time.Time + tmpFields []logstorage.Field + cp *CommonParams lr *logstorage.LogRows } @@ -182,20 +190,15 @@ func (lmp *logMessageProcessor) AddRow(timestamp int64, fields []logstorage.Fiel return } - // _msg field must be non-empty according to VictoriaLogs data model. - // See https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field - msgExist := false - for i := range fields { - if fields[i].Name == "_msg" { - msgExist = len(fields[i].Value) > 0 - break - } - } - if !msgExist { - rf := logstorage.RowFormatter(fields) - logger.Warnf("dropping log line without _msg field; %s", rf) - rowsDroppedTotalMsgNotValid.Inc() - return + if *defaultMsgValue != "" && !hasMsgField(fields) { + // The log entry doesn't contain mandatory _msg field. Add _msg field with default value then + // according to https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field . + lmp.tmpFields = append(lmp.tmpFields[:0], fields...) + lmp.tmpFields = append(lmp.tmpFields, logstorage.Field{ + Name: "_msg", + Value: *defaultMsgValue, + }) + fields = lmp.tmpFields } lmp.lr.MustAdd(lmp.cp.TenantID, timestamp, fields) @@ -211,6 +214,15 @@ func (lmp *logMessageProcessor) AddRow(timestamp int64, fields []logstorage.Fiel } } +func hasMsgField(fields []logstorage.Field) bool { + for _, f := range fields { + if f.Name == "_msg" { + return len(f.Value) > 0 + } + } + return false +} + // flushLocked must be called under locked lmp.mu. func (lmp *logMessageProcessor) flushLocked() { lmp.lastFlushTime = time.Now() @@ -247,5 +259,4 @@ func (cp *CommonParams) NewLogMessageProcessor() LogMessageProcessor { var ( rowsDroppedTotalDebug = metrics.NewCounter(`vl_rows_dropped_total{reason="debug"}`) rowsDroppedTotalTooManyFields = metrics.NewCounter(`vl_rows_dropped_total{reason="too_many_fields"}`) - rowsDroppedTotalMsgNotValid = metrics.NewCounter(`vl_rows_dropped_total{reason="msg_not_exist"}`) ) diff --git a/app/vlinsert/jsonline/jsonline_test.go b/app/vlinsert/jsonline/jsonline_test.go index 429a1e4f2..6e5fe7722 100644 --- a/app/vlinsert/jsonline/jsonline_test.go +++ b/app/vlinsert/jsonline/jsonline_test.go @@ -35,6 +35,18 @@ func TestProcessStreamInternal_Success(t *testing.T) { {"_msg":"baz"} {"_msg":"xyz","x":"y"}` f(data, timeField, msgField, rowsExpected, timestampsExpected, resultExpected) + + // Non-existing msgField + data = `{"@timestamp":"2023-06-06T04:48:11.735Z","log":{"offset":71770,"file":{"path":"/var/log/auth.log"}},"message":"foobar"} +{"@timestamp":"2023-06-06T04:48:12.735+01:00","message":"baz"} +` + timeField = "@timestamp" + msgField = "foobar" + rowsExpected = 2 + timestampsExpected = []int64{1686026891735000000, 1686023292735000000} + resultExpected = `{"log.offset":"71770","log.file.path":"/var/log/auth.log","message":"foobar"} +{"message":"baz","aa":"bb"}` + f(data, timeField, msgField, rowsExpected, timestampsExpected, resultExpected) } func TestProcessStreamInternal_Failure(t *testing.T) { diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 378108cc6..c94767038 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -16,6 +16,7 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta ## tip * FEATURE: allow specifying a list of log fields, which contain log message, via `_msg_field` query arg and via `VL-Msg-Field` HTTP request header. For example, `_msg_field=message,event.message` instructs obtaining [message field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field) from the first non-empty field out of the `message` and `event.message` fields. See [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/#http-parameters) for details. +* FEATURE: accept logs without [`_msg` field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field). In this case the `_msg` field is automatically set to the value specified in the `-defaultMsgValue` command-line flag. * BUGFIX: fix `runtime error: index out of range [0] with length 0` panic during low-rate data ingestion. The panic has been introduced in [v0.38.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.38.0-victorialogs). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7391). diff --git a/docs/VictoriaLogs/README.md b/docs/VictoriaLogs/README.md index a818b7b95..b37fc242c 100644 --- a/docs/VictoriaLogs/README.md +++ b/docs/VictoriaLogs/README.md @@ -260,8 +260,8 @@ Pass `-help` to VictoriaLogs in order to see the list of supported command-line ``` -blockcache.missesBeforeCaching int The number of cache misses before putting the block into cache. Higher values may reduce indexdb/dataBlocks cache size at the cost of higher CPU and disk read usage (default 2) - -cacheExpireDuration duration - Items are removed from in-memory caches after they aren't accessed for this duration. Lower values may reduce memory usage at the cost of higher CPU usage. See also -prevCacheRemovalPercent (default 30m0s) + -defaultMsgValue string + Default value for _msg field if the ingested log entry doesn't contain it; see https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field (default "missing _msg field; see https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field") -elasticsearch.version string Elasticsearch version to report to client (default "8.9.0") -enableTCP6 @@ -275,6 +275,9 @@ Pass `-help` to VictoriaLogs in order to see the list of supported command-line -flagsAuthKey value Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides -httpAuth.* Flag value can be read from the given file when using -flagsAuthKey=file:///abs/path/to/file or -flagsAuthKey=file://./relative/path/to/file . Flag value can be read from the given http/https url when using -flagsAuthKey=http://host/path or -flagsAuthKey=https://host/path + -forceMergeAuthKey value + authKey, which must be passed in query string to /internal/force_merge pages. It overrides -httpAuth.* + Flag value can be read from the given file when using -forceMergeAuthKey=file:///abs/path/to/file or -forceMergeAuthKey=file://./relative/path/to/file . Flag value can be read from the given http/https url when using -forceMergeAuthKey=http://host/path or -forceMergeAuthKey=https://host/path -fs.disableMmap Whether to use pread() instead of mmap() for reading data files. By default, mmap() is used for 64-bit arches and pread() is used for 32-bit arches, since they cannot read data files bigger than 2^32 bytes in memory. mmap() is usually faster for reading small data chunks than pread() -futureRetention value @@ -326,6 +329,20 @@ Pass `-help` to VictoriaLogs in order to see the list of supported command-line Whether to disable caches for interned strings. This may reduce memory usage at the cost of higher CPU usage. See https://en.wikipedia.org/wiki/String_interning . See also -internStringCacheExpireDuration and -internStringMaxLen -internStringMaxLen int The maximum length for strings to intern. A lower limit may save memory at the cost of higher CPU usage. See https://en.wikipedia.org/wiki/String_interning . See also -internStringDisableCache and -internStringCacheExpireDuration (default 500) + -journald.ignoreFields array + Journal fields to ignore. See the list of allowed fields at https://www.freedesktop.org/software/systemd/man/latest/systemd.journal-fields.html. + Supports an array of values separated by comma or specified via multiple flags. + Value can contain comma inside single-quoted or double-quoted string, {}, [] and () braces. + -journald.includeEntryMetadata + Include journal entry fields, which with double underscores. + -journald.streamFields array + Journal fields to be used as stream fields. See the list of allowed fields at https://www.freedesktop.org/software/systemd/man/latest/systemd.journal-fields.html. + Supports an array of values separated by comma or specified via multiple flags. + Value can contain comma inside single-quoted or double-quoted string, {}, [] and () braces. + -journald.tenantID string + TenantID for logs ingested via the Journald endpoint. (default "0:0") + -journald.timeField string + Journal field to be used as time field. See the list of allowed fields at https://www.freedesktop.org/software/systemd/man/latest/systemd.journal-fields.html. (default "__REALTIME_TIMESTAMP") -logIngestedRows Whether to log all the ingested log entries; this can be useful for debugging of data ingestion; see https://docs.victoriametrics.com/victorialogs/data-ingestion/ ; see also -logNewStreams -logNewStreams @@ -341,7 +358,7 @@ Pass `-help` to VictoriaLogs in order to see the list of supported command-line -loggerLevel string Minimum level of errors to log. Possible values: INFO, WARN, ERROR, FATAL, PANIC (default "INFO") -loggerMaxArgLen int - The maximum length of a single logged argument. Longer arguments are replaced with 'arg_start..arg_end', where 'arg_start' and 'arg_end' is prefix and suffix of the arg with the length not exceeding -loggerMaxArgLen / 2 (default 1000) + The maximum length of a single logged argument. Longer arguments are replaced with 'arg_start..arg_end', where 'arg_start' and 'arg_end' is prefix and suffix of the arg with the length not exceeding -loggerMaxArgLen / 2 (default 5000) -loggerOutput string Output for the logs. Supported values: stderr, stdout (default "stderr") -loggerTimezone string @@ -361,10 +378,8 @@ Pass `-help` to VictoriaLogs in order to see the list of supported command-line Auth key for /metrics endpoint. It must be passed via authKey query arg. It overrides -httpAuth.* Flag value can be read from the given file when using -metricsAuthKey=file:///abs/path/to/file or -metricsAuthKey=file://./relative/path/to/file . Flag value can be read from the given http/https url when using -metricsAuthKey=http://host/path or -metricsAuthKey=https://host/path -pprofAuthKey value - Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides -httpAuth.* + Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It -httpAuth.* Flag value can be read from the given file when using -pprofAuthKey=file:///abs/path/to/file or -pprofAuthKey=file://./relative/path/to/file . Flag value can be read from the given http/https url when using -pprofAuthKey=http://host/path or -pprofAuthKey=https://host/path - -prevCacheRemovalPercent float - Items in the previous caches are removed when the percent of requests it serves becomes lower than this value. Higher values reduce memory usage at the cost of higher CPU usage. See also -cacheExpireDuration (default 0.1) -pushmetrics.disableCompression Whether to disable request body compression when pushing metrics to every -pushmetrics.url -pushmetrics.extraLabel array diff --git a/docs/VictoriaLogs/keyConcepts.md b/docs/VictoriaLogs/keyConcepts.md index 8eee6fbbf..c89c6e22c 100644 --- a/docs/VictoriaLogs/keyConcepts.md +++ b/docs/VictoriaLogs/keyConcepts.md @@ -127,11 +127,14 @@ log entry, which can be ingested into VictoriaLogs: } ``` -If the actual log message has other than `_msg` field name, then it is possible to specify the real log message field -via `_msg_field` query arg or via `VL-Msg-Field` HTTP header during [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/). +If the actual log message has other than `_msg` field name, then it can be specified via `_msg_field` HTTP query arg or via `VL-Msg-Field` HTTP header +during [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/) +according to [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/#http-parameters). For example, if log message is located in the `event.original` field, then specify `_msg_field=event.original` query arg during [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/). -See [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/#http-parameters) for more details. + +If the `_msg` field remains empty after an attempt to get it from `_msg_field`, then VictoriaLogs automatically sets it to the value specified +via `-defaultMsgValue` command-line flag. ### Time field From 13822f6d118d6f4166a366638594041b6e2b1297 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 30 Oct 2024 15:05:56 +0100 Subject: [PATCH 56/90] docs/VictoriaLogs/CHANGELOG.md: cut v0.39.0-victorialogs release --- docs/VictoriaLogs/CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index c94767038..99d5726d1 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -15,7 +15,11 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta ## tip -* FEATURE: allow specifying a list of log fields, which contain log message, via `_msg_field` query arg and via `VL-Msg-Field` HTTP request header. For example, `_msg_field=message,event.message` instructs obtaining [message field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field) from the first non-empty field out of the `message` and `event.message` fields. See [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/#http-parameters) for details. +## [v0.39.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.39.0-victorialogs) + +Released at 2024-10-30 + +* FEATURE: allow specifying a list of log fields, which may contain log message, via `_msg_field` query arg and via `VL-Msg-Field` HTTP request header. For example, `_msg_field=message,event.message` instructs obtaining [message field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field) from the first non-empty field out of the `message` and `event.message` fields. See [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/#http-parameters) for details. * FEATURE: accept logs without [`_msg` field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field). In this case the `_msg` field is automatically set to the value specified in the `-defaultMsgValue` command-line flag. * BUGFIX: fix `runtime error: index out of range [0] with length 0` panic during low-rate data ingestion. The panic has been introduced in [v0.38.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.38.0-victorialogs). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7391). From 25bca94d04057f8036d677bfb1ab4dba7cace0ab Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 30 Oct 2024 15:11:08 +0100 Subject: [PATCH 57/90] deployment/docker: update VictoriaLogs from v0.38.0-victorialogs to v0.39.0-victorialogs See https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.39.0-victorialogs --- deployment/docker/docker-compose-victorialogs.yml | 2 +- deployment/docker/victorialogs/compose-base.yml | 2 +- deployment/logs-benchmark/docker-compose.yml | 2 +- docs/VictoriaLogs/QuickStart.md | 6 +++--- docs/VictoriaLogs/querying/vlogscli.md | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/deployment/docker/docker-compose-victorialogs.yml b/deployment/docker/docker-compose-victorialogs.yml index bee661026..88754ac96 100644 --- a/deployment/docker/docker-compose-victorialogs.yml +++ b/deployment/docker/docker-compose-victorialogs.yml @@ -40,7 +40,7 @@ services: # storing logs and serving read queries. victorialogs: container_name: victorialogs - image: victoriametrics/victoria-logs:v0.38.0-victorialogs + image: victoriametrics/victoria-logs:v0.39.0-victorialogs command: - "--storageDataPath=/vlogs" - "--httpListenAddr=:9428" diff --git a/deployment/docker/victorialogs/compose-base.yml b/deployment/docker/victorialogs/compose-base.yml index 1683d2e1e..936d52112 100644 --- a/deployment/docker/victorialogs/compose-base.yml +++ b/deployment/docker/victorialogs/compose-base.yml @@ -1,7 +1,7 @@ services: # meta service will be ignored by compose .victorialogs: - image: docker.io/victoriametrics/victoria-logs:v0.38.0-victorialogs + image: docker.io/victoriametrics/victoria-logs:v0.39.0-victorialogs command: - -storageDataPath=/vlogs - -loggerFormat=json diff --git a/deployment/logs-benchmark/docker-compose.yml b/deployment/logs-benchmark/docker-compose.yml index 2a35a378d..d268196bf 100644 --- a/deployment/logs-benchmark/docker-compose.yml +++ b/deployment/logs-benchmark/docker-compose.yml @@ -3,7 +3,7 @@ version: "3" services: # Run `make package-victoria-logs` to build victoria-logs image vlogs: - image: docker.io/victoriametrics/victoria-logs:v0.38.0-victorialogs + image: docker.io/victoriametrics/victoria-logs:v0.39.0-victorialogs volumes: - vlogs:/vlogs ports: diff --git a/docs/VictoriaLogs/QuickStart.md b/docs/VictoriaLogs/QuickStart.md index 2b3db33d2..eab4caf47 100644 --- a/docs/VictoriaLogs/QuickStart.md +++ b/docs/VictoriaLogs/QuickStart.md @@ -33,8 +33,8 @@ Just download archive for the needed Operating system and architecture, unpack i For example, the following commands download VictoriaLogs archive for Linux/amd64, unpack and run it: ```sh -curl -L -O https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v0.38.0-victorialogs/victoria-logs-linux-amd64-v0.38.0-victorialogs.tar.gz -tar xzf victoria-logs-linux-amd64-v0.38.0-victorialogs.tar.gz +curl -L -O https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v0.39.0-victorialogs/victoria-logs-linux-amd64-v0.39.0-victorialogs.tar.gz +tar xzf victoria-logs-linux-amd64-v0.39.0-victorialogs.tar.gz ./victoria-logs-prod ``` @@ -58,7 +58,7 @@ Here is the command to run VictoriaLogs in a Docker container: ```sh docker run --rm -it -p 9428:9428 -v ./victoria-logs-data:/victoria-logs-data \ - docker.io/victoriametrics/victoria-logs:v0.38.0-victorialogs + docker.io/victoriametrics/victoria-logs:v0.39.0-victorialogs ``` See also: diff --git a/docs/VictoriaLogs/querying/vlogscli.md b/docs/VictoriaLogs/querying/vlogscli.md index d15e08d8b..43b7bb4d3 100644 --- a/docs/VictoriaLogs/querying/vlogscli.md +++ b/docs/VictoriaLogs/querying/vlogscli.md @@ -23,15 +23,15 @@ or from [docker images](https://hub.docker.com/r/victoriametrics/vlogscli/tags): ### Running `vlogscli` from release binary ```sh -curl -L -O https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v0.38.0-victorialogs/vlogscli-linux-amd64-v0.38.0-victorialogs.tar.gz -tar xzf vlogscli-linux-amd64-v0.38.0-victorialogs.tar.gz +curl -L -O https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v0.39.0-victorialogs/vlogscli-linux-amd64-v0.39.0-victorialogs.tar.gz +tar xzf vlogscli-linux-amd64-v0.39.0-victorialogs.tar.gz ./vlogscli-prod ``` ### Running `vlogscli` from Docker image ```sh -docker run --rm -it docker.io/victoriametrics/vlogscli:v0.38.0-victorialogs +docker run --rm -it docker.io/victoriametrics/vlogscli:v0.39.0-victorialogs ``` ## Configuration From e614367cbf72540fdae5545915fe911bea458654 Mon Sep 17 00:00:00 2001 From: Artem Fetishev <149964189+rtm0@users.noreply.github.com> Date: Wed, 30 Oct 2024 15:22:06 +0100 Subject: [PATCH 58/90] tests: Initial version of integration tests (#7253) ### Describe Your Changes Related issue: #7199 This is the initial version of the integration tests for cluster. See `README.md` for details. Currently cluster only, but it can also be used for vm-single if needed. The code has been added to the apptest package that resides in the root directory of the VM codebase. This is done to exclude the integration tests from regular testing build targets because: - Most of the test variants do not apply to integration testing (such as pure or race). - The integtation tests may also be slow because each test must wait for 2 seconds so vmstorage flushes pending content). It may be okay when there are a few tests but when there is a 100 of them running tests will require much more time which will affect the developer wait time and CI workflows. - Finally, the integration tests may be flaky especially short term. An alternative approach would be placing apptest under app package and exclude apptest from packages under test, but that is not trivial. The integration tests rely on retrieving some application runtime info from the application logs, namely the application's host:port. Therefore some changes to lib/httpserver/httpserver.go were necessary, such as reporting the effective host:port instead the one from the flag. ### Checklist The following checks are **mandatory**: - [x] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --------- Signed-off-by: Artem Fetishev (cherry picked from commit d7b3589dbd0a3f38cecf7f8e896a3686c0dd8d4c) --- Makefile | 5 + apptest/README.md | 40 +++++ apptest/app.go | 249 +++++++++++++++++++++++++++++++ apptest/client.go | 130 ++++++++++++++++ apptest/testcase.go | 42 ++++++ apptest/tests/multilevel_test.go | 68 +++++++++ apptest/tests/sharding_test.go | 84 +++++++++++ apptest/vminsert.go | 77 ++++++++++ apptest/vmselect.go | 101 +++++++++++++ apptest/vmstorage.go | 87 +++++++++++ lib/httpserver/httpserver.go | 9 +- 11 files changed, 886 insertions(+), 6 deletions(-) create mode 100644 apptest/README.md create mode 100644 apptest/app.go create mode 100644 apptest/client.go create mode 100644 apptest/testcase.go create mode 100644 apptest/tests/multilevel_test.go create mode 100644 apptest/tests/sharding_test.go create mode 100644 apptest/vminsert.go create mode 100644 apptest/vmselect.go create mode 100644 apptest/vmstorage.go diff --git a/Makefile b/Makefile index ead25d376..336a935bf 100644 --- a/Makefile +++ b/Makefile @@ -501,10 +501,12 @@ pprof-cpu: fmt: gofmt -l -w -s ./lib gofmt -l -w -s ./app + gofmt -l -w -s ./apptest vet: go vet ./lib/... go vet ./app/... + go vet ./apptest/... check-all: fmt vet golangci-lint govulncheck @@ -525,6 +527,9 @@ test-full: test-full-386: DISABLE_FSYNC_FOR_TESTING=1 GOARCH=386 go test -coverprofile=coverage.txt -covermode=atomic ./lib/... ./app/... +integration-test: all + go test ./apptest/... + benchmark: go test -bench=. ./lib/... go test -bench=. ./app/... diff --git a/apptest/README.md b/apptest/README.md new file mode 100644 index 000000000..347bc5b1c --- /dev/null +++ b/apptest/README.md @@ -0,0 +1,40 @@ +# App Integration Tests + +The `apptest` package contains the integration tests for the VictoriaMetrics +applications (such as vmstorage, vminsert, and vmselect). + +An integration test aims at verifying the behavior of an application as a whole, +as apposed to a unit test that verifies the behavior of a building block of an +application. + +To achieve that an integration test starts an application in a separate process +and then issues HTTP requets to it and verifies the responses, examines the +metrics the app exposes and/or files it creates, etc. + +Note that an object of testing may be not just a single app, but several apps +working together. A good example is VictoriaMetrics cluster. An integration test +may reproduce an arbitrary cluster configuration and verify how the components +work together as a system. + +The package provides a collection of helpers to start applications and make +queries to them: + +- `app.go` - contains the generic code for staring an application and should + not be used by integration tests directly. +- `{vmstorage,vminsert,etc}.go` - build on top of `app.go` and provide the + code for staring a specific application. +- `client.go` - provides helper functions for sending HTTP requests to + applications. + +The integration tests themselves reside in `*_test.go` files. Apart from having +the `_test` suffix, there are no strict rules of how to name a file, but the +name should reflect the prevailing purpose of the tests located in that file. +For example, `sharding_test.go` aims at testing data sharding. + +Since integration tests start applications in a separate process, they require +the application binary files to be built and put into the `bin` directory. The +build rule used for running integration tests, `make integration-test`, +accounts for that, it builds all application binaries before running the tests. +But if you want to run the tests without `make`, i.e. by executing +`go test ./app/apptest`, you will need to build the binaries first (for example, +by executing `make all`). diff --git a/apptest/app.go b/apptest/app.go new file mode 100644 index 000000000..812861c8b --- /dev/null +++ b/apptest/app.go @@ -0,0 +1,249 @@ +package apptest + +import ( + "bufio" + "fmt" + "io" + "log" + "os" + "os/exec" + "reflect" + "regexp" + "strings" + "time" +) + +// Regular expressions for runtime information to extract from the app logs. +var ( + storageDataPathRE = regexp.MustCompile(`successfully opened storage "(.*)"`) + httpListenAddrRE = regexp.MustCompile(`started server at http://(.*:\d{1,5})/`) + vminsertAddrRE = regexp.MustCompile(`accepting vminsert conns at (.*:\d{1,5})$`) + vmselectAddrRE = regexp.MustCompile(`accepting vmselect conns at (.*:\d{1,5})$`) +) + +// app represents an instance of some VictoriaMetrics server (such as vmstorage, +// vminsert, or vmselect). +type app struct { + instance string + binary string + flags []string + process *os.Process +} + +// appOptions holds the optional configuration of an app, such as default flags +// to set and things to extract from the app's log. +type appOptions struct { + defaultFlags map[string]string + extractREs []*regexp.Regexp +} + +// startApp starts an instance of an app using the app binary file path and +// flags. When the opts are set, it also sets the default flag values and +// extracts runtime information from the app's log. +// +// If the app has started successfully and all the requested items has been +// extracted from logs, the function returns the instance of the app and the +// extracted items. The extracted items are returned in the same order as the +// corresponding extract regular expression have been provided in the opts. +// +// The function returns an error if the application has failed to start or the +// function has timed out extracting items from the log (normally because no log +// records match the regular expression). +func startApp(instance string, binary string, flags []string, opts *appOptions) (*app, []string, error) { + flags = setDefaultFlags(flags, opts.defaultFlags) + + cmd := exec.Command(binary, flags...) + stdout, err := cmd.StdoutPipe() + if err != nil { + return nil, nil, err + } + stderr, err := cmd.StderrPipe() + if err != nil { + return nil, nil, err + } + if err := cmd.Start(); err != nil { + return nil, nil, err + } + + app := &app{ + instance: instance, + binary: binary, + flags: flags, + process: cmd.Process, + } + + go app.processOutput("stdout", stdout, app.writeToStderr) + + lineProcessors := make([]lineProcessor, len(opts.extractREs)) + reExtractors := make([]*reExtractor, len(opts.extractREs)) + timeout := time.NewTimer(5 * time.Second).C + for i, re := range opts.extractREs { + reExtractors[i] = newREExtractor(re, timeout) + lineProcessors[i] = reExtractors[i].extractRE + } + go app.processOutput("stderr", stderr, append(lineProcessors, app.writeToStderr)...) + + extracts, err := extractREs(reExtractors, timeout) + if err != nil { + app.Stop() + return nil, nil, err + } + + return app, extracts, nil +} + +// setDefaultFlags adds flags with default values to `flags` if it does not +// initially contain them. +func setDefaultFlags(flags []string, defaultFlags map[string]string) []string { + for _, flag := range flags { + for name := range defaultFlags { + if strings.HasPrefix(flag, name) { + delete(defaultFlags, name) + continue + } + } + } + for name, value := range defaultFlags { + flags = append(flags, name+"="+value) + } + return flags +} + +// stop sends the app process a SIGINT signal and waits until it terminates +// gracefully. +func (app *app) Stop() { + if err := app.process.Signal(os.Interrupt); err != nil { + log.Fatalf("Could not send SIGINT signal to %s process: %v", app.instance, err) + } + if _, err := app.process.Wait(); err != nil { + log.Fatalf("Could not wait for %s process completion: %v", app.instance, err) + } +} + +// String returns the string representation of the app state. +func (app *app) String() string { + return fmt.Sprintf("{instance: %q binary: %q flags: %q}", app.instance, app.binary, app.flags) +} + +// lineProcessor is a function that is applied to the each line of the app +// output (stdout or stderr). The function returns true to indicate the caller +// that it has completed its work and should not be called again. +type lineProcessor func(line string) (done bool) + +// processOutput invokes a set of processors on each line of app output (stdout +// or stderr). Once a line processor is done (returns true) it is never invoked +// again. +// +// A simple use case for this is to pipe the output of the child process to the +// output of the parent process. A more sophisticated one is to retrieve some +// runtime information from the child process logs, such as the server's +// host:port. +func (app *app) processOutput(outputName string, output io.Reader, lps ...lineProcessor) { + activeLPs := map[int]lineProcessor{} + for i, lp := range lps { + activeLPs[i] = lp + } + + scanner := bufio.NewScanner(output) + for scanner.Scan() { + line := scanner.Text() + for i, process := range activeLPs { + if process(line) { + delete(activeLPs, i) + } + } + } + + if err := scanner.Err(); err != nil { + log.Printf("could not scan %s %s: %v", app.instance, outputName, err) + } +} + +// writeToStderr is a line processor that writes the line to the stderr. +// The function always returns false to indicate its caller that each line must +// be written to the stderr. +func (app *app) writeToStderr(line string) bool { + fmt.Fprintf(os.Stderr, "%s %s\n", app.instance, line) + return false +} + +// extractREs waits until all reExtractors return the result and then returns +// the combined result with items ordered the same way as reExtractors. +// +// The function returns an error if timeout occurs sooner then all reExtractors +// finish its work. +func extractREs(reExtractors []*reExtractor, timeout <-chan time.Time) ([]string, error) { + n := len(reExtractors) + notFoundREs := make(map[int]string) + extracts := make([]string, n) + cases := make([]reflect.SelectCase, n+1) + for i, x := range reExtractors { + cases[i] = x.selectCase + notFoundREs[i] = x.re.String() + } + cases[n] = reflect.SelectCase{ + Dir: reflect.SelectRecv, + Chan: reflect.ValueOf(timeout), + } + + for notFound := n; notFound > 0; { + i, value, _ := reflect.Select(cases) + if i == n { + // n-th select case means timeout. + + values := func(m map[int]string) []string { + s := []string{} + for _, v := range m { + s = append(s, v) + } + return s + } + return nil, fmt.Errorf("could not extract some or all regexps from stderr: %q", values(notFoundREs)) + } + extracts[i] = value.String() + delete(notFoundREs, i) + notFound-- + } + return extracts, nil +} + +// reExtractor extracts some information based on a regular expression from the +// app output within a timeout. +type reExtractor struct { + re *regexp.Regexp + result chan string + timeout <-chan time.Time + selectCase reflect.SelectCase +} + +// newREExtractor create a new reExtractor based on a regexp and a timeout. +func newREExtractor(re *regexp.Regexp, timeout <-chan time.Time) *reExtractor { + result := make(chan string) + return &reExtractor{ + re: re, + result: result, + timeout: timeout, + selectCase: reflect.SelectCase{ + Dir: reflect.SelectRecv, + Chan: reflect.ValueOf(result), + }, + } +} + +// extractRE is a line processor that extracts some information from a line +// based on a regular expression. The function returns trun (to request the +// caller to not to be called again) either when the match is found or due to +// the timeout. The found match is written to the x.result channel and it is +// important that this channel is monitored by a separate goroutine, otherwise +// the function will block. +func (x *reExtractor) extractRE(line string) bool { + submatch := x.re.FindSubmatch([]byte(line)) + if len(submatch) == 2 { + select { + case x.result <- string(submatch[1]): + case <-x.timeout: + } + return true + } + return false +} diff --git a/apptest/client.go b/apptest/client.go new file mode 100644 index 000000000..65ac4678f --- /dev/null +++ b/apptest/client.go @@ -0,0 +1,130 @@ +package apptest + +import ( + "io" + "net/http" + "net/url" + "strconv" + "strings" + "testing" +) + +// Client is used for interacting with the apps over the network. +// +// At the moment it only supports HTTP protocol but may be exptended to support +// RPCs, etc. +type Client struct { + httpCli *http.Client +} + +// NewClient creates a new client. +func NewClient() *Client { + return &Client{ + httpCli: &http.Client{ + Transport: &http.Transport{}, + }, + } +} + +// CloseConnections closes client connections. +func (c *Client) CloseConnections() { + c.httpCli.CloseIdleConnections() +} + +// Get sends a HTTP GET request. Once the function receives a response, it +// checks whether the response status code matches the expected one and returns +// the response body to the caller. +func (c *Client) Get(t *testing.T, url string, wantStatusCode int) string { + t.Helper() + return c.do(t, http.MethodGet, url, "", "", wantStatusCode) +} + +// Post sends a HTTP POST request. Once the function receives a response, it +// checks whether the response status code matches the expected one and returns +// the response body to the caller. +func (c *Client) Post(t *testing.T, url, contentType, data string, wantStatusCode int) string { + t.Helper() + return c.do(t, http.MethodPost, url, contentType, data, wantStatusCode) +} + +// PostForm sends a HTTP POST request containing the POST-form data. Once the +// function receives a response, it checks whether the response status code +// matches the expected one and returns the response body to the caller. +func (c *Client) PostForm(t *testing.T, url string, data url.Values, wantStatusCode int) string { + t.Helper() + return c.Post(t, url, "application/x-www-form-urlencoded", data.Encode(), wantStatusCode) +} + +// do prepares a HTTP request, sends it to the server, receives the response +// from the server, ensures then response code matches the expected one, reads +// the rentire response body and returns it to the caller. +func (c *Client) do(t *testing.T, method, url, contentType, data string, wantStatusCode int) string { + t.Helper() + + req, err := http.NewRequest(method, url, strings.NewReader(data)) + if err != nil { + t.Fatalf("could not create a HTTP request: %v", err) + } + + if len(contentType) > 0 { + req.Header.Add("Content-Type", contentType) + } + res, err := c.httpCli.Do(req) + if err != nil { + t.Fatalf("could not send HTTP request: %v", err) + } + + body := readAllAndClose(t, res.Body) + + if got, want := res.StatusCode, wantStatusCode; got != want { + t.Fatalf("unexpected response code: got %d, want %d (body: %s)", got, want, body) + } + + return body +} + +// readAllAndClose reads everything from the response body and then closes it. +func readAllAndClose(t *testing.T, responseBody io.ReadCloser) string { + t.Helper() + + defer responseBody.Close() + b, err := io.ReadAll(responseBody) + if err != nil { + t.Fatalf("could not read response body: %d", err) + } + return string(b) +} + +// ServesMetrics is used to retrive the app's metrics. +// +// This type is expected to be embdded by the apps that serve metrics. +type ServesMetrics struct { + metricsURL string + cli *Client +} + +// GetIntMetric retrieves the value of a metric served by an app at /metrics URL. +// The value is then converted to int. +func (app *ServesMetrics) GetIntMetric(t *testing.T, metricName string) int { + return int(app.GetMetric(t, metricName)) +} + +// GetMetric retrieves the value of a metric served by an app at /metrics URL. +func (app *ServesMetrics) GetMetric(t *testing.T, metricName string) float64 { + t.Helper() + + metrics := app.cli.Get(t, app.metricsURL, http.StatusOK) + for _, metric := range strings.Split(metrics, "\n") { + value, found := strings.CutPrefix(metric, metricName) + if found { + value = strings.Trim(value, " ") + res, err := strconv.ParseFloat(value, 64) + if err != nil { + t.Fatalf("could not parse metric value %s: %v", metric, err) + } + return res + } + } + t.Fatalf("metic not found: %s", metricName) + return 0 +} diff --git a/apptest/testcase.go b/apptest/testcase.go new file mode 100644 index 000000000..6ec8455fe --- /dev/null +++ b/apptest/testcase.go @@ -0,0 +1,42 @@ +package apptest + +import ( + "testing" + + "github.com/VictoriaMetrics/VictoriaMetrics/lib/fs" +) + +// TestCase holds the state and defines clean-up procedure common for all test +// cases. +type TestCase struct { + t *testing.T + cli *Client +} + +// NewTestCase creates a new test case. +func NewTestCase(t *testing.T) *TestCase { + return &TestCase{t, NewClient()} +} + +// Dir returns the directory name that should be used by as the -storageDataDir. +func (tc *TestCase) Dir() string { + return tc.t.Name() +} + +// Client returns an instance of the client that can be used for interacting with +// the app(s) under test. +func (tc *TestCase) Client() *Client { + return tc.cli +} + +// Close performs the test case clean up, such as closing all client connections +// and removing the -storageDataDir directory. +// +// Note that the -storageDataDir is not removed in case of test case failure to +// allow for furher manual debugging. +func (tc *TestCase) Close() { + tc.cli.CloseConnections() + if !tc.t.Failed() { + fs.MustRemoveAll(tc.Dir()) + } +} diff --git a/apptest/tests/multilevel_test.go b/apptest/tests/multilevel_test.go new file mode 100644 index 000000000..ed1d0faf8 --- /dev/null +++ b/apptest/tests/multilevel_test.go @@ -0,0 +1,68 @@ +package tests + +import ( + "fmt" + "math/rand/v2" + "testing" + "time" + + "github.com/VictoriaMetrics/VictoriaMetrics/apptest" +) + +func TestMultilevelSelect(t *testing.T) { + tc := apptest.NewTestCase(t) + defer tc.Close() + + // Set up the following multi-level cluster configuration: + // + // vmselect (L2) -> vmselect (L1) -> vmstorage <- vminsert + // + // vmisert writes data into vmstorage. + // vmselect (L2) reads that data via vmselect (L1). + + cli := tc.Client() + + vmstorage := apptest.MustStartVmstorage(t, "vmstorage", []string{ + "-storageDataPath=" + tc.Dir() + "/vmstorage", + }, cli) + defer vmstorage.Stop() + vminsert := apptest.MustStartVminsert(t, "vminsert", []string{ + "-storageNode=" + vmstorage.VminsertAddr(), + }, cli) + defer vminsert.Stop() + vmselectL1 := apptest.MustStartVmselect(t, "vmselect-level1", []string{ + "-storageNode=" + vmstorage.VmselectAddr(), + }, cli) + defer vmselectL1.Stop() + vmselectL2 := apptest.MustStartVmselect(t, "vmselect-level2", []string{ + "-storageNode=" + vmselectL1.ClusternativeListenAddr(), + }, cli) + defer vmselectL2.Stop() + + // Insert 1000 unique time series.Wait for 2 seconds to let vmstorage + // flush pending items so they become searchable. + + const numMetrics = 1000 + records := make([]string, numMetrics) + for i := range numMetrics { + records[i] = fmt.Sprintf("metric_%d %d", i, rand.IntN(1000)) + } + vminsert.PrometheusAPIV1ImportPrometheus(t, "0", records) + time.Sleep(2 * time.Second) + + // Retrieve all time series and verify that vmselect (L1) serves the complete + // set of time series. + + seriesL1 := vmselectL1.PrometheusAPIV1Series(t, "0", `{__name__=~".*"}`) + if got, want := len(seriesL1.Data), numMetrics; got != want { + t.Fatalf("unexpected level-1 series count: got %d, want %d", got, want) + } + + // Retrieve all time series and verify that vmselect (L2) serves the complete + // set of time series. + + seriesL2 := vmselectL2.PrometheusAPIV1Series(t, "0", `{__name__=~".*"}`) + if got, want := len(seriesL2.Data), numMetrics; got != want { + t.Fatalf("unexpected level-2 series count: got %d, want %d", got, want) + } +} diff --git a/apptest/tests/sharding_test.go b/apptest/tests/sharding_test.go new file mode 100644 index 000000000..dce0cfaa3 --- /dev/null +++ b/apptest/tests/sharding_test.go @@ -0,0 +1,84 @@ +package tests + +import ( + "fmt" + "math/rand/v2" + "testing" + "time" + + "github.com/VictoriaMetrics/VictoriaMetrics/apptest" +) + +func TestVminsertShardsDataVmselectBuildsFullResultFromShards(t *testing.T) { + tc := apptest.NewTestCase(t) + defer tc.Close() + + // Set up the following cluster configuration: + // + // - two vmstorage instances + // - vminsert points to the two vmstorages, its replication setting + // is off which means it will only shard the incoming data across the two + // vmstorages. + // - vmselect points to the two vmstorages and is expected to query both + // vmstorages and build the full result out of the two partial results. + + cli := tc.Client() + + vmstorage1 := apptest.MustStartVmstorage(t, "vmstorage-1", []string{ + "-storageDataPath=" + tc.Dir() + "/vmstorage-1", + }, cli) + defer vmstorage1.Stop() + vmstorage2 := apptest.MustStartVmstorage(t, "vmstorage-2", []string{ + "-storageDataPath=" + tc.Dir() + "/vmstorage-2", + }, cli) + defer vmstorage2.Stop() + vminsert := apptest.MustStartVminsert(t, "vminsert", []string{ + "-storageNode=" + vmstorage1.VminsertAddr() + "," + vmstorage2.VminsertAddr(), + }, cli) + defer vminsert.Stop() + vmselect := apptest.MustStartVmselect(t, "vmselect", []string{ + "-storageNode=" + vmstorage1.VmselectAddr() + "," + vmstorage2.VmselectAddr(), + }, cli) + defer vmselect.Stop() + + // Insert 1000 unique time series and verify the that inserted data has been + // indeed sharded by checking various metrics exposed by vminsert and + // vmstorage. + // Also wait for 2 seconds to let vminsert and vmstorage servers to update + // the values of the metrics they expose and to let vmstorages flush pending + // items so they become searchable. + + const numMetrics = 1000 + records := make([]string, numMetrics) + for i := range numMetrics { + records[i] = fmt.Sprintf("metric_%d %d", i, rand.IntN(1000)) + } + vminsert.PrometheusAPIV1ImportPrometheus(t, "0", records) + time.Sleep(2 * time.Second) + + numMetrics1 := vmstorage1.GetIntMetric(t, "vm_vminsert_metrics_read_total") + if numMetrics1 == 0 { + t.Fatalf("storage-1 has no time series") + } + numMetrics2 := vmstorage2.GetIntMetric(t, "vm_vminsert_metrics_read_total") + if numMetrics2 == 0 { + t.Fatalf("storage-2 has no time series") + } + if numMetrics1+numMetrics2 != numMetrics { + t.Fatalf("unxepected total number of metrics: vmstorage-1 (%d) + vmstorage-2 (%d) != %d", numMetrics1, numMetrics2, numMetrics) + } + + // Retrieve all time series and verify that vmselect serves the complete set + //of time series. + + series := vmselect.PrometheusAPIV1Series(t, "0", `{__name__=~".*"}`) + if got, want := series.Status, "success"; got != want { + t.Fatalf("unexpected /ap1/v1/series response status: got %s, want %s", got, want) + } + if got, want := series.IsPartial, false; got != want { + t.Fatalf("unexpected /ap1/v1/series response isPartial value: got %t, want %t", got, want) + } + if got, want := len(series.Data), numMetrics; got != want { + t.Fatalf("unexpected /ap1/v1/series response series count: got %d, want %d", got, want) + } +} diff --git a/apptest/vminsert.go b/apptest/vminsert.go new file mode 100644 index 000000000..a4b723e9f --- /dev/null +++ b/apptest/vminsert.go @@ -0,0 +1,77 @@ +package apptest + +import ( + "fmt" + "net/http" + "regexp" + "strings" + "testing" +) + +// Vminsert holds the state of a vminsert app and provides vminsert-specific +// functions. +type Vminsert struct { + *app + *ServesMetrics + + httpListenAddr string + cli *Client +} + +// MustStartVminsert is a test helper function that starts an instance of +// vminsert and fails the test if the app fails to start. +func MustStartVminsert(t *testing.T, instance string, flags []string, cli *Client) *Vminsert { + t.Helper() + + app, err := StartVminsert(instance, flags, cli) + if err != nil { + t.Fatalf("Could not start %s: %v", instance, err) + } + + return app +} + +// StartVminsert starts an instance of vminsert with the given flags. It also +// sets the default flags and populates the app instance state with runtime +// values extracted from the application log (such as httpListenAddr) +func StartVminsert(instance string, flags []string, cli *Client) (*Vminsert, error) { + app, stderrExtracts, err := startApp(instance, "../../bin/vminsert", flags, &appOptions{ + defaultFlags: map[string]string{ + "-httpListenAddr": "127.0.0.1:0", + }, + extractREs: []*regexp.Regexp{ + httpListenAddrRE, + }, + }) + if err != nil { + return nil, err + } + + return &Vminsert{ + app: app, + ServesMetrics: &ServesMetrics{ + metricsURL: fmt.Sprintf("http://%s/metrics", stderrExtracts[0]), + cli: cli, + }, + httpListenAddr: stderrExtracts[0], + cli: cli, + }, nil +} + +// PrometheusAPIV1ImportPrometheus is a test helper function that inserts a +// collection of records in Prometheus text exposition format for the given +// tenant by sending a HTTP POST request to +// /prometheus/api/v1/import/prometheus vminsert endpoint. +// +// See https://docs.victoriametrics.com/url-examples/#apiv1importprometheus +func (app *Vminsert) PrometheusAPIV1ImportPrometheus(t *testing.T, tenant string, records []string) { + t.Helper() + + url := fmt.Sprintf("http://%s/insert/%s/prometheus/api/v1/import/prometheus", app.httpListenAddr, tenant) + app.cli.Post(t, url, "text/plain", strings.Join(records, "\n"), http.StatusNoContent) +} + +// String returns the string representation of the vminsert app state. +func (app *Vminsert) String() string { + return fmt.Sprintf("{app: %s httpListenAddr: %q}", app.app, app.httpListenAddr) +} diff --git a/apptest/vmselect.go b/apptest/vmselect.go new file mode 100644 index 000000000..69f300e49 --- /dev/null +++ b/apptest/vmselect.go @@ -0,0 +1,101 @@ +package apptest + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + "regexp" + "testing" +) + +// Vmselect holds the state of a vmselect app and provides vmselect-specific +// functions. +type Vmselect struct { + *app + *ServesMetrics + + httpListenAddr string + clusternativeListenAddr string + cli *Client +} + +// MustStartVmselect is a test helper function that starts an instance of +// vmselect and fails the test if the app fails to start. +func MustStartVmselect(t *testing.T, instance string, flags []string, cli *Client) *Vmselect { + t.Helper() + + app, err := StartVmselect(instance, flags, cli) + if err != nil { + t.Fatalf("Could not start %s: %v", instance, err) + } + + return app +} + +// StartVmselect starts an instance of vmselect with the given flags. It also +// sets the default flags and populates the app instance state with runtime +// values extracted from the application log (such as httpListenAddr) +func StartVmselect(instance string, flags []string, cli *Client) (*Vmselect, error) { + app, stderrExtracts, err := startApp(instance, "../../bin/vmselect", flags, &appOptions{ + defaultFlags: map[string]string{ + "-httpListenAddr": "127.0.0.1:0", + "-clusternativeListenAddr": "127.0.0.1:0", + }, + extractREs: []*regexp.Regexp{ + httpListenAddrRE, + vmselectAddrRE, + }, + }) + if err != nil { + return nil, err + } + + return &Vmselect{ + app: app, + ServesMetrics: &ServesMetrics{ + metricsURL: fmt.Sprintf("http://%s/metrics", stderrExtracts[0]), + cli: cli, + }, + httpListenAddr: stderrExtracts[0], + clusternativeListenAddr: stderrExtracts[1], + cli: cli, + }, nil +} + +// ClusternativeListenAddr returns the address at which the vmselect process is +// listening for connections from other vmselect apps. +func (app *Vmselect) ClusternativeListenAddr() string { + return app.clusternativeListenAddr +} + +// PrometheusAPIV1SeriesResponse is an inmemory representation of the +// /prometheus/api/v1/series response. +type PrometheusAPIV1SeriesResponse struct { + Status string + IsPartial bool + Data []map[string]string +} + +// PrometheusAPIV1Series sends a query to a /prometheus/api/v1/series endpoint +// and returns the list of time series that match the query. +// +// See https://docs.victoriametrics.com/url-examples/#apiv1series +func (app *Vmselect) PrometheusAPIV1Series(t *testing.T, tenant, matchQuery string) *PrometheusAPIV1SeriesResponse { + t.Helper() + + seriesURL := fmt.Sprintf("http://%s/select/%s/prometheus/api/v1/series", app.httpListenAddr, tenant) + values := url.Values{} + values.Add("match[]", matchQuery) + jsonRes := app.cli.PostForm(t, seriesURL, values, http.StatusOK) + var res PrometheusAPIV1SeriesResponse + if err := json.Unmarshal([]byte(jsonRes), &res); err != nil { + t.Fatalf("could not unmarshal /api/v1/series response: %v", err) + } + return &res +} + +// String returns the string representation of the vmselect app state. +func (app *Vmselect) String() string { + return fmt.Sprintf("{app: %s httpListenAddr: %q}", app.app, app.httpListenAddr) +} diff --git a/apptest/vmstorage.go b/apptest/vmstorage.go new file mode 100644 index 000000000..db9633fd5 --- /dev/null +++ b/apptest/vmstorage.go @@ -0,0 +1,87 @@ +package apptest + +import ( + "fmt" + "os" + "regexp" + "testing" + "time" +) + +// Vmstorage holds the state of a vmstorage app and provides vmstorage-specific +// functions. +type Vmstorage struct { + *app + *ServesMetrics + + storageDataPath string + httpListenAddr string + vminsertAddr string + vmselectAddr string +} + +// MustStartVmstorage is a test helper function that starts an instance of +// vmstorage and fails the test if the app fails to start. +func MustStartVmstorage(t *testing.T, instance string, flags []string, cli *Client) *Vmstorage { + t.Helper() + + app, err := StartVmstorage(instance, flags, cli) + if err != nil { + t.Fatalf("Could not start %s: %v", instance, err) + } + + return app +} + +// StartVmstorage starts an instance of vmstorage with the given flags. It also +// sets the default flags and populates the app instance state with runtime +// values extracted from the application log (such as httpListenAddr) +func StartVmstorage(instance string, flags []string, cli *Client) (*Vmstorage, error) { + app, stderrExtracts, err := startApp(instance, "../../bin/vmstorage", flags, &appOptions{ + defaultFlags: map[string]string{ + "-storageDataPath": fmt.Sprintf("%s/%s-%d", os.TempDir(), instance, time.Now().UnixNano()), + "-httpListenAddr": "127.0.0.1:0", + "-vminsertAddr": "127.0.0.1:0", + "-vmselectAddr": "127.0.0.1:0", + }, + extractREs: []*regexp.Regexp{ + storageDataPathRE, + httpListenAddrRE, + vminsertAddrRE, + vmselectAddrRE, + }, + }) + if err != nil { + return nil, err + } + + return &Vmstorage{ + app: app, + ServesMetrics: &ServesMetrics{ + metricsURL: fmt.Sprintf("http://%s/metrics", stderrExtracts[1]), + cli: cli, + }, + storageDataPath: stderrExtracts[0], + httpListenAddr: stderrExtracts[1], + vminsertAddr: stderrExtracts[2], + vmselectAddr: stderrExtracts[3], + }, nil +} + +// VminsertAddr returns the address at which the vmstorage process is listening +// for vminsert connections. +func (app *Vmstorage) VminsertAddr() string { + return app.vminsertAddr +} + +// VmselectAddr returns the address at which the vmstorage process is listening +// for vmselect connections. +func (app *Vmstorage) VmselectAddr() string { + return app.vmselectAddr +} + +// String returns the string representation of the vmstorage app state. +func (app *Vmstorage) String() string { + return fmt.Sprintf("{app: %s storageDataPath: %q httpListenAddr: %q vminsertAddr: %q vmselectAddr: %q}", []any{ + app.app, app.storageDataPath, app.httpListenAddr, app.vminsertAddr, app.vmselectAddr}...) +} diff --git a/lib/httpserver/httpserver.go b/lib/httpserver/httpserver.go index fe64ad03e..b606c477b 100644 --- a/lib/httpserver/httpserver.go +++ b/lib/httpserver/httpserver.go @@ -114,12 +114,6 @@ func serve(addr string, useProxyProtocol bool, rh RequestHandler, idx int) { if tlsEnable.GetOptionalArg(idx) { scheme = "https" } - hostAddr := addr - if strings.HasPrefix(hostAddr, ":") { - hostAddr = "127.0.0.1" + hostAddr - } - logger.Infof("starting server at %s://%s/", scheme, hostAddr) - logger.Infof("pprof handlers are exposed at %s://%s/debug/pprof/", scheme, hostAddr) var tlsConfig *tls.Config if tlsEnable.GetOptionalArg(idx) { certFile := tlsCertFile.GetOptionalArg(idx) @@ -134,6 +128,9 @@ func serve(addr string, useProxyProtocol bool, rh RequestHandler, idx int) { ln, err := netutil.NewTCPListener(scheme, addr, useProxyProtocol, tlsConfig) if err != nil { logger.Fatalf("cannot start http server at %s: %s", addr, err) + } else { + logger.Infof("started server at %s://%s/", scheme, ln.Addr()) + logger.Infof("pprof handlers are exposed at %s://%s/debug/pprof/", scheme, ln.Addr()) } serveWithListener(addr, ln, rh) } From 6494606924ec9f9ac6869c5c86eeab93c0f62e8e Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Wed, 30 Oct 2024 16:06:57 +0100 Subject: [PATCH 59/90] deployment/alerts: consistently update path to alerting rules Follow-up after https://github.com/VictoriaMetrics/VictoriaMetrics/commit/68bad22fd26d1436ad0236b1f3ced8604c5d851c Signed-off-by: hagen1778 --- deployment/docker/README.md | 2 +- deployment/docker/docker-compose-victorialogs.yml | 3 +-- deployment/docker/{ => rules}/alerts-vlogs.yml | 0 docs/VictoriaLogs/CHANGELOG.md | 2 +- docs/VictoriaLogs/README.md | 2 +- docs/changelog/CHANGELOG.md | 10 +++++----- docs/changelog/CHANGELOG_2022.md | 2 +- docs/changelog/CHANGELOG_2023.md | 6 +++--- 8 files changed, 13 insertions(+), 14 deletions(-) rename deployment/docker/{ => rules}/alerts-vlogs.yml (100%) diff --git a/deployment/docker/README.md b/deployment/docker/README.md index d9e136af7..bdb86697a 100644 --- a/deployment/docker/README.md +++ b/deployment/docker/README.md @@ -165,7 +165,7 @@ The list of alerting rules is the following: alerting rules related to [vmalert](https://docs.victoriametrics.com/vmalert/) component; * [alerts-vmauth.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmauth.yml): alerting rules related to [vmauth](https://docs.victoriametrics.com/vmauth/) component; -* [alerts-vlogs.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-vlogs.yml): +* [alerts-vlogs.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vlogs.yml): alerting rules related to [VictoriaLogs](https://docs.victoriametrics.com/victorialogs/); Please, also see [how to monitor](https://docs.victoriametrics.com/single-server-victoriametrics/#monitoring) diff --git a/deployment/docker/docker-compose-victorialogs.yml b/deployment/docker/docker-compose-victorialogs.yml index 88754ac96..c9027657c 100644 --- a/deployment/docker/docker-compose-victorialogs.yml +++ b/deployment/docker/docker-compose-victorialogs.yml @@ -99,9 +99,8 @@ services: ports: - 8880:8880 volumes: - # disable log-related rules for now, util vmalert supports vlogs type rule - # - ./rules/vlogs-example-alerts.yml:/etc/alerts/vlogs.yml - ./rules/alerts.yml:/etc/alerts/alerts.yml + - ./rules/alerts-vlogs.yml:/etc/alerts/vlogs.yml - ./rules/alerts-health.yml:/etc/alerts/alerts-health.yml - ./rules/alerts-vmagent.yml:/etc/alerts/alerts-vmagent.yml - ./rules/alerts-vmalert.yml:/etc/alerts/alerts-vmalert.yml diff --git a/deployment/docker/alerts-vlogs.yml b/deployment/docker/rules/alerts-vlogs.yml similarity index 100% rename from deployment/docker/alerts-vlogs.yml rename to deployment/docker/rules/alerts-vlogs.yml diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 99d5726d1..5f6da4947 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -41,7 +41,7 @@ Released at 2024-10-29 Released at 2024-10-18 * FEATURE: [web UI](https://docs.victoriametrics.com/victorialogs/querying/#web-ui): add ability to hide hits chart. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7117). -* FEATURE: add basic [alerting rules](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-vlogs.yml) for VictoriaLogs process. See details at [monitoring docs](https://docs.victoriametrics.com/victorialogs/#monitoring). +* FEATURE: add basic [alerting rules](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vlogs.yml) for VictoriaLogs process. See details at [monitoring docs](https://docs.victoriametrics.com/victorialogs/#monitoring). * FEATURE: improve [`stats` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#stats-pipe) performance on systems with many CPU cores when `by(...)` fields contain big number of unique values. For example, `_time:1d | stats by (user_id) count() x` should be executed much faster when `user_id` field contains millions of unique values. * FEATURE: improve performance for [`top`](https://docs.victoriametrics.com/victorialogs/logsql/#top-pipe), [`uniq`](https://docs.victoriametrics.com/victorialogs/logsql/#uniq-pipe) and [`field_values`](https://docs.victoriametrics.com/victorialogs/logsql/#field_values-pipe) pipes on systems with many CPU cores when it is applied to [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) with big number of unique values. For example, `_time:1d | top 5 (user_id)` should be executed much faster when `user_id` field contains millions of unique values. * FEATURE: improve performance for [`field_names` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#field_names-pipe) when it is applied to logs with hundreds of [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model). diff --git a/docs/VictoriaLogs/README.md b/docs/VictoriaLogs/README.md index b37fc242c..1b0dbf2c8 100644 --- a/docs/VictoriaLogs/README.md +++ b/docs/VictoriaLogs/README.md @@ -52,7 +52,7 @@ It is recommended to set up monitoring of these metrics via VictoriaMetrics (see [these docs](https://docs.victoriametrics.com/#how-to-scrape-prometheus-exporters-such-as-node-exporter)), vmagent (see [these docs](https://docs.victoriametrics.com/vmagent/#how-to-collect-metrics-in-prometheus-format)) or via Prometheus. -We recommend setting up [alerts](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-vlogs.yml) +We recommend setting up [alerts](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vlogs.yml) via [vmalert](https://docs.victoriametrics.com/vmalert/) or via Prometheus. VictoriaLogs emits its own logs to stdout. It is recommended to investigate these logs during troubleshooting. diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 2b9d9b811..0eda6364c 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -81,7 +81,7 @@ Released at 2024-10-02 * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): keep selected columns in table view on page reloads. Before, selected columns were reset on each update. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7016). * FEATURE: [dashboards](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards) for VM single-node, cluster, vmalert, vmagent, VictoriaLogs: add `Go scheduling latency` panel to show the 99th quantile of Go goroutines scheduling. This panel should help identifying insufficient CPU resources for the service. It is especially useful if CPU gets throttled, which now should be visible on this panel. * FEATURE: [dashboards](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards): update [dashboard for VictoriaMetrics k8s operator](https://grafana.com/grafana/dashboards/17869-victoriametrics-operator/): replace deprecated TimeSeries panels, add latency panels for rest client and Golang scheduler, add overview panels. The dashboard is now also available for [VictoriaMetrics Grafana datasource](https://github.com/VictoriaMetrics/victoriametrics-datasource). -* FEATURE: [alerts](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-health.yml): add alerting rule to track the Go scheduling latency for goroutines. It should notify users if VM component doesn't have enough CPU to run or gets throttled. +* FEATURE: [alerts](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-health.yml): add alerting rule to track the Go scheduling latency for goroutines. It should notify users if VM component doesn't have enough CPU to run or gets throttled. * BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent/) fix service discovery of Azure Virtual Machines for response contains `nextLink` in `Host:Port` format. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6912). * BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent/): properly consume messages [from kafka](https://docs.victoriametrics.com/vmagent/#kafka-integration). Previously vmagent could skip some messages during start-up. @@ -271,7 +271,7 @@ The v1.102.x line will be supported for at least 12 months since [v1.102.0](http * FEATURE: [vmbackup](https://docs.victoriametrics.com/vmbackup/) and [vmrestore](https://docs.victoriametrics.com/vmrestore/): add support for [Azure Managed Identity](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview) and default credentials lookup. See [these docs](https://docs.victoriametrics.com/vmbackup/#providing-credentials-via-env-variables) and [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5984) for the details. Thanks to @justinrush for the [pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6518). * FEATURE: [vmbackup](https://docs.victoriametrics.com/vmbackup/) and [vmrestore](https://docs.victoriametrics.com/vmbackup/): allow overriding Azure storage domain when performing backups via `AZURE_STORAGE_DOMAIN` environment variable. See [these docs](https://docs.victoriametrics.com/vmbackup/#providing-credentials-via-env-variables) and [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5984). Thanks to @justinrush for the [pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6518). * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): show compacted result in the JSON tab for query results. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6559). -* FEATURE: [dashboards](https://grafana.com/orgs/victoriametrics): add [Grafana dashboard](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards/vmauth.json) and [alerting rules](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-vmauth.yml) for [vmauth](https://docs.victoriametrics.com/vmauth/) dashboard. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4313) for details. +* FEATURE: [dashboards](https://grafana.com/orgs/victoriametrics): add [Grafana dashboard](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards/vmauth.json) and [alerting rules](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmauth.yml) for [vmauth](https://docs.victoriametrics.com/vmauth/) dashboard. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4313) for details. * FEATURE: [vmagent dashboard](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards/vmagent.json): `stream aggregation` section: add graphs based on newly exposed streaming aggregation metrics. * BUGFIX: [MetricsQL](https://docs.victoriametrics.com/metricsql/): properly calculate [histogram_quantile](https://docs.victoriametrics.com/metricsql/#histogram_quantile) over Prometheus buckets with inconsistent values. See [this comment](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4580#issuecomment-2186659102) and [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6547). Updates [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2819). @@ -290,7 +290,7 @@ Released at 2024-06-24 **Update note 2: `*.passwordFile` and similar flags are no longer trimming trailing whitespaces at the end of content. Make sure to update the templating of password files or HTTP endpoints to not include trailing whitespaces before the upgrade. See [this](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6503) PR for the details.** -* FEATURE: [alerts-vmagent](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-vmagent.yml): add new alerting rules `StreamAggrFlushTimeout` and `StreamAggrDedupFlushTimeout` to notify about issues during stream aggregation. +* FEATURE: [alerts-vmagent](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmagent.yml): add new alerting rules `StreamAggrFlushTimeout` and `StreamAggrDedupFlushTimeout` to notify about issues during stream aggregation. * FEATURE: [dashboards/vmagent](https://grafana.com/grafana/dashboards/12683): add row `Streaming aggregation` with panels related to [streaming aggregation](https://docs.victoriametrics.com/stream-aggregation/) process. * FEATURE: [vmauth](https://docs.victoriametrics.com/vmauth/): add `-idleConnTimeout` flag set to 50s by default. It should reduce the probability of `broken pipe` or `connection reset by peer` errors in vmauth logs. * FEATURE: [vmauth](https://docs.victoriametrics.com/vmauth/): add automatic retry for requests to backend for trivial network errors, such as `broken pipe` and `connection reset` for requests to the configured backends. @@ -347,8 +347,8 @@ Released at 2024-06-07 * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert/): speed up retrieving rules files from object storages by skipping unchanged objects during reloading. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6210). * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert/): support reading [DNS SRV](https://en.wikipedia.org/wiki/SRV_record) records in `-datasource.url`, `-remoteWrite.url` and `-remoteRead.url` command-line option. For example, `-remoteWrite.url=http://srv+victoria-metrics` automatically resolves the `victoria-metrics` DNS SRV to a list of hostnames with TCP ports and then sends data to one of the addresses. See [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6053). * FEATURE: [vmbackup](https://docs.victoriametrics.com/vmbackup/), [vmrestore](https://docs.victoriametrics.com/vmrestore/), [vmbackupmanager](https://docs.victoriametrics.com/vmbackupmanager/): add `-s3TLSInsecureSkipVerify` command-line flag for skipping TLS certificates verification when connecting to S3 endpoint. -* FEATURE: expose metric `vm_indexdb_items_dropped_total` to track the number of IndexDB records that had to be dropped during ingestion. The reason of dropping the record will be annotated in `reason` label of the exposed metric. This change also comes with a new [alerting rule](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-health.yml) to track changes of this metric. -* FEATURE: [alerts-health](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-health.yml): add new alerting rules `TooLongLabelValues` and `TooLongLabelNames` to notify about truncation of label values or names respectively. +* FEATURE: expose metric `vm_indexdb_items_dropped_total` to track the number of IndexDB records that had to be dropped during ingestion. The reason of dropping the record will be annotated in `reason` label of the exposed metric. This change also comes with a new [alerting rule](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-health.yml) to track changes of this metric. +* FEATURE: [alerts-health](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-health.yml): add new alerting rules `TooLongLabelValues` and `TooLongLabelNames` to notify about truncation of label values or names respectively. * FEATURE: [stream aggregation](https://docs.victoriametrics.com/stream-aggregation/): expose `vm_streamaggr_ignored_samples_total` [counters](https://docs.victoriametrics.com/keyconcepts/#counter) at [`/metrics` page](https://docs.victoriametrics.com/#monitoring), which can be used for detecting amount of too old or NaN valued ignored samples. Expose also `vm_streamaggr_samples_lag_seconds` [histogram](https://docs.victoriametrics.com/keyconcepts/#histogram) to monitor aggregated samples lag. * FEATURE: [stream aggregation](https://docs.victoriametrics.com/stream-aggregation/): improve filtering speed of the received data samples if [match](https://docs.victoriametrics.com/stream-aggregation/#stream-aggregation-config) field is matching only [metric name](https://docs.victoriametrics.com/keyconcepts/#structure-of-a-metric). * FEATURE: [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): adds `-relabelConfigCheckInterval` flag and `/-/reload` endpoint for reloading relabeling rules. See this [pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3923) for details. diff --git a/docs/changelog/CHANGELOG_2022.md b/docs/changelog/CHANGELOG_2022.md index 9dd33b57d..9364dca72 100644 --- a/docs/changelog/CHANGELOG_2022.md +++ b/docs/changelog/CHANGELOG_2022.md @@ -147,7 +147,7 @@ Released at 2022-11-25 * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add compact table view. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3241). * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to "stick" a tooltip on the chart by clicking on a data point. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3321) and [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3376) * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to set up series custom limits. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3297). -* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert/): add default alert list for vmalert's metrics. See [alerts-vmalert.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-vmalert.yml). +* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert/): add default alert list for vmalert's metrics. See [alerts-vmalert.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmalert.yml). * FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent/): expose `vmagent_relabel_config_*`, `vm_relabel_config_*` and `vm_promscrape_config_*` metrics for tracking relabel and scrape configuration hot-reloads. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3345). * BUGFIX: [MetricsQL](https://docs.victoriametrics.com/metricsql/): properly return an empty result from [limit_offset](https://docs.victoriametrics.com/metricsql/#limit_offset) if the `offset` arg exceeds the number of inner time series. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3312). diff --git a/docs/changelog/CHANGELOG_2023.md b/docs/changelog/CHANGELOG_2023.md index 3db999e61..319c96f9c 100644 --- a/docs/changelog/CHANGELOG_2023.md +++ b/docs/changelog/CHANGELOG_2023.md @@ -364,7 +364,7 @@ The v1.93.x line will be supported for at least 12 months since [v1.93.0](https: * FEATURE: [Official Grafana dashboards for VictoriaMetrics](https://grafana.com/orgs/victoriametrics): add `Concurrent inserts` panel to vmagent's dashboard. The new panel supposed to show whether the number of concurrent inserts processed by vmagent isn't reaching the limit. * FEATURE: [Official Grafana dashboards for VictoriaMetrics](https://grafana.com/orgs/victoriametrics): add panels for absolute Mem and CPU usage by vmalert. See related issue [here](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4627). * FEATURE: [Official Grafana dashboards for VictoriaMetrics](https://grafana.com/orgs/victoriametrics): correctly calculate `Bytes per point` value for single-server and cluster VM dashboards. Before, the calculation mistakenly accounted for the number of entries in indexdb in denominator, which could have shown lower values than expected. -* FEATURE: [Alerting rules for VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker#alerts): `ConcurrentFlushesHitTheLimit` alerting rule was moved from [single-server](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts.yml) and [cluster](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-cluster.yml) alerts to the [list of "health" alerts](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-health.yml) as it could be related to many VictoriaMetrics components. +* FEATURE: [Alerting rules for VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker#alerts): `ConcurrentFlushesHitTheLimit` alerting rule was moved from [single-server](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts.yml) and [cluster](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-cluster.yml) alerts to the [list of "health" alerts](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-health.yml) as it could be related to many VictoriaMetrics components. * BUGFIX: [storage](https://docs.victoriametrics.com/single-server-victoriametrics/): properly set next retention time for indexDB. Previously it may enter into endless retention loop. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4873) for details. * BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent/): return human readable error if opentelemetry has json encoding. Follow-up after [PR](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/2570). @@ -564,7 +564,7 @@ Released at 2023-05-18 * BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): fix the display of the tenant selector. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4160). * BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): fix UI freeze when the query returns non-histogram series alongside histogram series. * BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): fix the text display on buttons in Safari 16.4. -* BUGFIX: [alerts-health](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-health.yml): update threshold for `TooHighMemoryUsage` alert from 90% to 80%, since 90% is too high for production environments. +* BUGFIX: [alerts-health](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-health.yml): update threshold for `TooHighMemoryUsage` alert from 90% to 80%, since 90% is too high for production environments. * BUGFIX: [vmbackup](https://docs.victoriametrics.com/vmbackup/): fix compatibility with Windows OS. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/70). * BUGFIX: [vmctl](https://docs.victoriametrics.com/vmctl/): fix performance issue when migrating data from VictoriaMetrics according to [these docs](https://docs.victoriametrics.com/vmctl/#migrating-data-from-victoriametrics). Add the ability to speed up the data migration via `--vm-native-disable-retries` command-line flag. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4092). * BUGFIX: [stream aggregation](https://docs.victoriametrics.com/stream-aggregation/): fix bug with duplicated labels during stream aggregation via single-node VictoriaMetrics. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4277). @@ -827,7 +827,7 @@ The v1.87.x line will be supported for at least 12 months since [v1.87.0](https: * BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent/): add `__meta_kubernetes_endpoints_name` label for all ports discovered from endpoint. Previously, ports not matched by `Service` did not have this label. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4154) for details. Thanks to @thunderbird86 for discovering and [fixing](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/4253) the issue. * BUGFIX: fix possible infinite loop during `indexdb` rotation when `-retentionTimezoneOffset` command-line flag is set and the local timezone is not UTC. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4207). Thanks to @faceair for [the fix](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/4206). * BUGFIX: [vmauth](https://docs.victoriametrics.com/vmauth/): do not return invalid auth credentials in http response by default, since it may be logged by client. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4188). -* BUGFIX: [alerts-health](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-health.yml): update threshold for `TooHighMemoryUsage` alert from 90% to 80%, since 90% is too high for production environments. +* BUGFIX: [alerts-health](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-health.yml): update threshold for `TooHighMemoryUsage` alert from 90% to 80%, since 90% is too high for production environments. * BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent/): properly handle the `vm_promscrape_config_last_reload_successful` metric after config reload. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4260). * BUGFIX: [stream aggregation](https://docs.victoriametrics.com/stream-aggregation/): fix bug with duplicated labels during stream aggregation via single-node VictoriaMetrics. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4277). * BUGFIX: [stream aggregation](https://docs.victoriametrics.com/stream-aggregation/): suppress `series after dedup` error message in logs when `-remoteWrite.streamAggr.dedupInterval` command-line flag is set at [vmagent](https://docs.victoriametrics.com/vmagent/) or when `-streamAggr.dedupInterval` command-line flag is set at [single-node VictoriaMetrics](https://docs.victoriametrics.com/). From 683f8c2780fccd9fcc8fae2d2925f3410fc0a9b1 Mon Sep 17 00:00:00 2001 From: Artem Fetishev <149964189+rtm0@users.noreply.github.com> Date: Wed, 30 Oct 2024 16:44:08 +0100 Subject: [PATCH 60/90] dashboards: add Restarts panel (#7394) Reopening PR #7373 from a branch in VictoriaMetrics repo in order to enable edits and rebase. - [x] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --------- Signed-off-by: Artem Fetishev Signed-off-by: hagen1778 Co-authored-by: hagen1778 --- dashboards/victorialogs.json | 172 ++++-- dashboards/victoriametrics-cluster.json | 107 +++- dashboards/victoriametrics.json | 267 ++++++--- dashboards/vm/victoriametrics-cluster.json | 107 +++- dashboards/vm/victoriametrics.json | 267 ++++++--- dashboards/vm/vmagent.json | 263 ++++++--- dashboards/vm/vmalert.json | 639 ++++++++++++--------- dashboards/vm/vmauth.json | 150 ++++- dashboards/vmagent.json | 263 ++++++--- dashboards/vmalert.json | 639 ++++++++++++--------- dashboards/vmauth.json | 150 ++++- docs/changelog/CHANGELOG.md | 1 + 12 files changed, 2095 insertions(+), 930 deletions(-) diff --git a/dashboards/victorialogs.json b/dashboards/victorialogs.json index 68c0d630a..de8cd19fe 100644 --- a/dashboards/victorialogs.json +++ b/dashboards/victorialogs.json @@ -1108,13 +1108,118 @@ "title": "Log stream churn rate", "type": "timeseries" }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the number of restarts per job. The chart can be useful to identify periodic process restarts and correlate them with potential issues or anomalies. Normally, processes shouldn't restart unless restart was inited by user. The reason of restarts should be figured out by checking the logs of each specific service. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 22 + }, + "id": 62, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(changes(vm_app_start_timestamp{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) > 0) by(job)", + "format": "time_series", + "instant": false, + "legendFormat": "{{job}}", + "refId": "A" + } + ], + "title": "Restarts ($job)", + "type": "timeseries" + }, { "collapsed": true, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 22 + "y": 30 }, "id": 28, "panels": [ @@ -1168,8 +1273,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1185,7 +1289,7 @@ "h": 8, "w": 12, "x": 0, - "y": 3 + "y": 11 }, "id": 38, "options": { @@ -1275,8 +1379,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1292,7 +1395,7 @@ "h": 8, "w": 12, "x": 12, - "y": 3 + "y": 11 }, "id": 40, "options": { @@ -1432,8 +1535,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1449,7 +1551,7 @@ "h": 8, "w": 12, "x": 0, - "y": 11 + "y": 19 }, "id": 42, "options": { @@ -1538,8 +1640,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1555,7 +1656,7 @@ "h": 8, "w": 12, "x": 12, - "y": 11 + "y": 19 }, "id": 44, "options": { @@ -1648,8 +1749,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1681,7 +1781,7 @@ "h": 8, "w": 12, "x": 0, - "y": 19 + "y": 27 }, "id": 46, "options": { @@ -1773,8 +1873,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1806,7 +1905,7 @@ "h": 8, "w": 12, "x": 12, - "y": 19 + "y": 27 }, "id": 48, "options": { @@ -1911,8 +2010,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1928,7 +2026,7 @@ "h": 8, "w": 12, "x": 0, - "y": 27 + "y": 35 }, "id": 50, "options": { @@ -2017,8 +2115,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2047,7 +2144,7 @@ "h": 8, "w": 12, "x": 12, - "y": 27 + "y": 35 }, "id": 52, "options": { @@ -2150,8 +2247,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2167,7 +2263,7 @@ "h": 8, "w": 12, "x": 0, - "y": 35 + "y": 43 }, "id": 54, "options": { @@ -2256,8 +2352,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2286,7 +2381,7 @@ "h": 8, "w": 12, "x": 12, - "y": 35 + "y": 43 }, "id": 56, "options": { @@ -2393,8 +2488,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2410,7 +2504,7 @@ "h": 8, "w": 12, "x": 0, - "y": 43 + "y": 51 }, "id": 58, "options": { @@ -2501,8 +2595,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2518,7 +2611,7 @@ "h": 8, "w": 12, "x": 12, - "y": 43 + "y": 51 }, "id": 60, "options": { @@ -2610,8 +2703,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2627,7 +2719,7 @@ "h": 8, "w": 12, "x": 0, - "y": 51 + "y": 59 }, "id": 61, "options": { diff --git a/dashboards/victoriametrics-cluster.json b/dashboards/victoriametrics-cluster.json index df30817d0..bead53552 100644 --- a/dashboards/victoriametrics-cluster.json +++ b/dashboards/victoriametrics-cluster.json @@ -4124,6 +4124,111 @@ ], "title": "Rows ignored for last 1h ($instance)", "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the number of restarts per job. The chart can be useful to identify periodic process restarts and correlate them with potential issues or anomalies. Normally, processes shouldn't restart unless restart was inited by user. The reason of restarts should be figured out by checking the logs of each specific service. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 70 + }, + "id": 214, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(changes(vm_app_start_timestamp{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) > 0) by(job)", + "format": "time_series", + "instant": false, + "legendFormat": "{{job}}", + "refId": "A" + } + ], + "title": "Restarts ($job)", + "type": "timeseries" } ], "title": "Troubleshooting", @@ -9895,4 +10000,4 @@ "uid": "oS7Bi_0Wz", "version": 1, "weekStart": "" -} \ No newline at end of file +} diff --git a/dashboards/victoriametrics.json b/dashboards/victoriametrics.json index 6210a460b..674eb3180 100644 --- a/dashboards/victoriametrics.json +++ b/dashboards/victoriametrics.json @@ -1569,7 +1569,7 @@ "h": 8, "w": 12, "x": 0, - "y": 3 + "y": 11 }, "id": 112, "links": [], @@ -1677,7 +1677,7 @@ "h": 8, "w": 12, "x": 12, - "y": 3 + "y": 11 }, "id": 44, "options": { @@ -1844,7 +1844,7 @@ "h": 8, "w": 12, "x": 0, - "y": 11 + "y": 19 }, "id": 123, "links": [], @@ -1951,7 +1951,7 @@ "h": 8, "w": 12, "x": 12, - "y": 11 + "y": 19 }, "id": 114, "options": { @@ -2044,8 +2044,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2077,7 +2076,7 @@ "h": 8, "w": 12, "x": 0, - "y": 19 + "y": 27 }, "id": 75, "options": { @@ -2169,8 +2168,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2202,7 +2200,7 @@ "h": 8, "w": 12, "x": 12, - "y": 19 + "y": 27 }, "id": 57, "options": { @@ -2309,8 +2307,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2326,7 +2323,7 @@ "h": 8, "w": 12, "x": 0, - "y": 27 + "y": 35 }, "id": 47, "options": { @@ -2415,8 +2412,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2445,7 +2441,7 @@ "h": 8, "w": 12, "x": 12, - "y": 27 + "y": 35 }, "id": 76, "options": { @@ -2552,8 +2548,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2569,7 +2564,7 @@ "h": 8, "w": 12, "x": 0, - "y": 35 + "y": 43 }, "id": 48, "options": { @@ -2658,8 +2653,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2688,7 +2682,7 @@ "h": 8, "w": 12, "x": 12, - "y": 35 + "y": 43 }, "id": 124, "options": { @@ -2795,8 +2789,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2812,7 +2805,7 @@ "h": 8, "w": 12, "x": 0, - "y": 43 + "y": 51 }, "id": 49, "options": { @@ -2903,8 +2896,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2920,7 +2912,7 @@ "h": 8, "w": 12, "x": 12, - "y": 43 + "y": 51 }, "id": 37, "options": { @@ -3010,8 +3002,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -3040,7 +3031,7 @@ "h": 8, "w": 12, "x": 0, - "y": 51 + "y": 59 }, "id": 127, "options": { @@ -3146,8 +3137,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -3163,7 +3153,7 @@ "h": 8, "w": 12, "x": 12, - "y": 51 + "y": 59 }, "id": 125, "options": { @@ -3253,8 +3243,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -3270,7 +3259,7 @@ "h": 8, "w": 12, "x": 0, - "y": 59 + "y": 67 }, "id": 128, "options": { @@ -3386,7 +3375,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3394,8 +3384,7 @@ } ] }, - "unit": "short", - "unitScale": true + "unit": "short" }, "overrides": [] }, @@ -3403,7 +3392,7 @@ "h": 8, "w": 12, "x": 0, - "y": 4 + "y": 32 }, "id": 66, "options": { @@ -3505,7 +3494,8 @@ "mode": "absolute", "steps": [ { - "color": "transparent" + "color": "transparent", + "value": null }, { "color": "red", @@ -3513,8 +3503,7 @@ } ] }, - "unit": "percentunit", - "unitScale": true + "unit": "percentunit" }, "overrides": [] }, @@ -3522,10 +3511,9 @@ "h": 8, "w": 12, "x": 12, - "y": 4 + "y": 32 }, "id": 68, - "links": [], "options": { "legend": { "calcs": [ @@ -3615,7 +3603,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3623,8 +3612,7 @@ } ] }, - "unit": "short", - "unitScale": true + "unit": "short" }, "overrides": [] }, @@ -3632,10 +3620,9 @@ "h": 8, "w": 12, "x": 0, - "y": 12 + "y": 40 }, "id": 116, - "links": [], "options": { "legend": { "calcs": [ @@ -3723,7 +3710,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3731,8 +3719,7 @@ } ] }, - "unit": "short", - "unitScale": true + "unit": "short" }, "overrides": [] }, @@ -3740,10 +3727,9 @@ "h": 8, "w": 12, "x": 12, - "y": 12 + "y": 40 }, "id": 60, - "links": [], "options": { "legend": { "calcs": [ @@ -3830,7 +3816,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3838,8 +3825,7 @@ } ] }, - "unit": "percentunit", - "unitScale": true + "unit": "percentunit" }, "overrides": [] }, @@ -3847,7 +3833,7 @@ "h": 9, "w": 12, "x": 0, - "y": 20 + "y": 48 }, "id": 90, "options": { @@ -3938,7 +3924,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3946,8 +3933,7 @@ } ] }, - "unit": "percentunit", - "unitScale": true + "unit": "percentunit" }, "overrides": [] }, @@ -3955,10 +3941,9 @@ "h": 9, "w": 12, "x": 12, - "y": 20 + "y": 48 }, "id": 118, - "links": [], "options": { "legend": { "calcs": [ @@ -4022,15 +4007,15 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", "value": 80 } ] - }, - "unitScale": true + } }, "overrides": [ { @@ -4075,7 +4060,7 @@ "h": 8, "w": 12, "x": 0, - "y": 29 + "y": 57 }, "id": 126, "options": { @@ -4090,7 +4075,7 @@ }, "showHeader": true }, - "pluginVersion": "10.3.1", + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -4161,7 +4146,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -4169,8 +4155,7 @@ } ] }, - "unit": "short", - "unitScale": true + "unit": "short" }, "overrides": [] }, @@ -4178,10 +4163,9 @@ "h": 8, "w": 12, "x": 12, - "y": 29 + "y": 57 }, "id": 74, - "links": [], "options": { "legend": { "calcs": [ @@ -4218,6 +4202,111 @@ ], "title": "Labels limit exceeded", "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the number of restarts per job. The chart can be useful to identify periodic process restarts and correlate them with potential issues or anomalies. Normally, processes shouldn't restart unless restart was inited by user. The reason of restarts should be figured out by checking the logs of each specific service. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 65 + }, + "id": 129, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(changes(vm_app_start_timestamp{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) > 0) by(job)", + "format": "time_series", + "instant": false, + "legendFormat": "{{job}}", + "refId": "A" + } + ], + "title": "Restarts ($job)", + "type": "timeseries" } ], "targets": [ @@ -4313,7 +4402,7 @@ "h": 8, "w": 12, "x": 0, - "y": 5 + "y": 13 }, "id": 10, "links": [], @@ -4422,7 +4511,7 @@ "h": 8, "w": 12, "x": 12, - "y": 5 + "y": 13 }, "id": 73, "links": [], @@ -4532,7 +4621,7 @@ "h": 8, "w": 12, "x": 0, - "y": 13 + "y": 21 }, "id": 53, "links": [], @@ -4686,7 +4775,7 @@ "h": 8, "w": 12, "x": 12, - "y": 13 + "y": 21 }, "id": 34, "links": [], @@ -4824,7 +4913,7 @@ "h": 8, "w": 12, "x": 0, - "y": 21 + "y": 29 }, "id": 30, "links": [], @@ -4946,7 +5035,7 @@ "h": 8, "w": 12, "x": 12, - "y": 21 + "y": 29 }, "id": 36, "links": [], @@ -5054,7 +5143,7 @@ "h": 8, "w": 12, "x": 0, - "y": 29 + "y": 37 }, "id": 58, "links": [], @@ -5164,7 +5253,7 @@ "h": 8, "w": 12, "x": 12, - "y": 29 + "y": 37 }, "id": 62, "options": { @@ -5284,7 +5373,7 @@ "h": 8, "w": 12, "x": 0, - "y": 37 + "y": 45 }, "id": 59, "links": [], @@ -5404,7 +5493,7 @@ "h": 8, "w": 12, "x": 12, - "y": 37 + "y": 45 }, "id": 64, "options": { @@ -5510,7 +5599,7 @@ "h": 8, "w": 12, "x": 0, - "y": 45 + "y": 53 }, "id": 99, "links": [], @@ -5620,7 +5709,7 @@ "h": 8, "w": 12, "x": 12, - "y": 45 + "y": 53 }, "id": 103, "links": [], @@ -5730,7 +5819,7 @@ "h": 8, "w": 12, "x": 0, - "y": 53 + "y": 61 }, "id": 122, "links": [], @@ -5840,7 +5929,7 @@ "h": 8, "w": 12, "x": 12, - "y": 53 + "y": 61 }, "id": 105, "links": [], diff --git a/dashboards/vm/victoriametrics-cluster.json b/dashboards/vm/victoriametrics-cluster.json index bbc000252..bbdcd6e47 100644 --- a/dashboards/vm/victoriametrics-cluster.json +++ b/dashboards/vm/victoriametrics-cluster.json @@ -4125,6 +4125,111 @@ ], "title": "Rows ignored for last 1h ($instance)", "type": "timeseries" + }, + { + "datasource": { + "type": "victoriametrics-datasource", + "uid": "$ds" + }, + "description": "Shows the number of restarts per job. The chart can be useful to identify periodic process restarts and correlate them with potential issues or anomalies. Normally, processes shouldn't restart unless restart was inited by user. The reason of restarts should be figured out by checking the logs of each specific service. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 70 + }, + "id": 214, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "victoriametrics-datasource", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(changes(vm_app_start_timestamp{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) > 0) by(job)", + "format": "time_series", + "instant": false, + "legendFormat": "{{job}}", + "refId": "A" + } + ], + "title": "Restarts ($job)", + "type": "timeseries" } ], "title": "Troubleshooting", @@ -9896,4 +10001,4 @@ "uid": "oS7Bi_0Wz_vm", "version": 1, "weekStart": "" -} \ No newline at end of file +} diff --git a/dashboards/vm/victoriametrics.json b/dashboards/vm/victoriametrics.json index cbd11bfd3..7bf01e0f2 100644 --- a/dashboards/vm/victoriametrics.json +++ b/dashboards/vm/victoriametrics.json @@ -1570,7 +1570,7 @@ "h": 8, "w": 12, "x": 0, - "y": 3 + "y": 11 }, "id": 112, "links": [], @@ -1678,7 +1678,7 @@ "h": 8, "w": 12, "x": 12, - "y": 3 + "y": 11 }, "id": 44, "options": { @@ -1845,7 +1845,7 @@ "h": 8, "w": 12, "x": 0, - "y": 11 + "y": 19 }, "id": 123, "links": [], @@ -1952,7 +1952,7 @@ "h": 8, "w": 12, "x": 12, - "y": 11 + "y": 19 }, "id": 114, "options": { @@ -2045,8 +2045,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2078,7 +2077,7 @@ "h": 8, "w": 12, "x": 0, - "y": 19 + "y": 27 }, "id": 75, "options": { @@ -2170,8 +2169,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2203,7 +2201,7 @@ "h": 8, "w": 12, "x": 12, - "y": 19 + "y": 27 }, "id": 57, "options": { @@ -2310,8 +2308,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2327,7 +2324,7 @@ "h": 8, "w": 12, "x": 0, - "y": 27 + "y": 35 }, "id": 47, "options": { @@ -2416,8 +2413,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2446,7 +2442,7 @@ "h": 8, "w": 12, "x": 12, - "y": 27 + "y": 35 }, "id": 76, "options": { @@ -2553,8 +2549,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2570,7 +2565,7 @@ "h": 8, "w": 12, "x": 0, - "y": 35 + "y": 43 }, "id": 48, "options": { @@ -2659,8 +2654,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2689,7 +2683,7 @@ "h": 8, "w": 12, "x": 12, - "y": 35 + "y": 43 }, "id": 124, "options": { @@ -2796,8 +2790,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2813,7 +2806,7 @@ "h": 8, "w": 12, "x": 0, - "y": 43 + "y": 51 }, "id": 49, "options": { @@ -2904,8 +2897,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2921,7 +2913,7 @@ "h": 8, "w": 12, "x": 12, - "y": 43 + "y": 51 }, "id": 37, "options": { @@ -3011,8 +3003,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -3041,7 +3032,7 @@ "h": 8, "w": 12, "x": 0, - "y": 51 + "y": 59 }, "id": 127, "options": { @@ -3147,8 +3138,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -3164,7 +3154,7 @@ "h": 8, "w": 12, "x": 12, - "y": 51 + "y": 59 }, "id": 125, "options": { @@ -3254,8 +3244,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -3271,7 +3260,7 @@ "h": 8, "w": 12, "x": 0, - "y": 59 + "y": 67 }, "id": 128, "options": { @@ -3387,7 +3376,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3395,8 +3385,7 @@ } ] }, - "unit": "short", - "unitScale": true + "unit": "short" }, "overrides": [] }, @@ -3404,7 +3393,7 @@ "h": 8, "w": 12, "x": 0, - "y": 4 + "y": 32 }, "id": 66, "options": { @@ -3506,7 +3495,8 @@ "mode": "absolute", "steps": [ { - "color": "transparent" + "color": "transparent", + "value": null }, { "color": "red", @@ -3514,8 +3504,7 @@ } ] }, - "unit": "percentunit", - "unitScale": true + "unit": "percentunit" }, "overrides": [] }, @@ -3523,10 +3512,9 @@ "h": 8, "w": 12, "x": 12, - "y": 4 + "y": 32 }, "id": 68, - "links": [], "options": { "legend": { "calcs": [ @@ -3616,7 +3604,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3624,8 +3613,7 @@ } ] }, - "unit": "short", - "unitScale": true + "unit": "short" }, "overrides": [] }, @@ -3633,10 +3621,9 @@ "h": 8, "w": 12, "x": 0, - "y": 12 + "y": 40 }, "id": 116, - "links": [], "options": { "legend": { "calcs": [ @@ -3724,7 +3711,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3732,8 +3720,7 @@ } ] }, - "unit": "short", - "unitScale": true + "unit": "short" }, "overrides": [] }, @@ -3741,10 +3728,9 @@ "h": 8, "w": 12, "x": 12, - "y": 12 + "y": 40 }, "id": 60, - "links": [], "options": { "legend": { "calcs": [ @@ -3831,7 +3817,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3839,8 +3826,7 @@ } ] }, - "unit": "percentunit", - "unitScale": true + "unit": "percentunit" }, "overrides": [] }, @@ -3848,7 +3834,7 @@ "h": 9, "w": 12, "x": 0, - "y": 20 + "y": 48 }, "id": 90, "options": { @@ -3939,7 +3925,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3947,8 +3934,7 @@ } ] }, - "unit": "percentunit", - "unitScale": true + "unit": "percentunit" }, "overrides": [] }, @@ -3956,10 +3942,9 @@ "h": 9, "w": 12, "x": 12, - "y": 20 + "y": 48 }, "id": 118, - "links": [], "options": { "legend": { "calcs": [ @@ -4023,15 +4008,15 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", "value": 80 } ] - }, - "unitScale": true + } }, "overrides": [ { @@ -4076,7 +4061,7 @@ "h": 8, "w": 12, "x": 0, - "y": 29 + "y": 57 }, "id": 126, "options": { @@ -4091,7 +4076,7 @@ }, "showHeader": true }, - "pluginVersion": "10.3.1", + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -4162,7 +4147,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -4170,8 +4156,7 @@ } ] }, - "unit": "short", - "unitScale": true + "unit": "short" }, "overrides": [] }, @@ -4179,10 +4164,9 @@ "h": 8, "w": 12, "x": 12, - "y": 29 + "y": 57 }, "id": 74, - "links": [], "options": { "legend": { "calcs": [ @@ -4219,6 +4203,111 @@ ], "title": "Labels limit exceeded", "type": "timeseries" + }, + { + "datasource": { + "type": "victoriametrics-datasource", + "uid": "$ds" + }, + "description": "Shows the number of restarts per job. The chart can be useful to identify periodic process restarts and correlate them with potential issues or anomalies. Normally, processes shouldn't restart unless restart was inited by user. The reason of restarts should be figured out by checking the logs of each specific service. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 65 + }, + "id": 129, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "victoriametrics-datasource", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(changes(vm_app_start_timestamp{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) > 0) by(job)", + "format": "time_series", + "instant": false, + "legendFormat": "{{job}}", + "refId": "A" + } + ], + "title": "Restarts ($job)", + "type": "timeseries" } ], "targets": [ @@ -4314,7 +4403,7 @@ "h": 8, "w": 12, "x": 0, - "y": 5 + "y": 13 }, "id": 10, "links": [], @@ -4423,7 +4512,7 @@ "h": 8, "w": 12, "x": 12, - "y": 5 + "y": 13 }, "id": 73, "links": [], @@ -4533,7 +4622,7 @@ "h": 8, "w": 12, "x": 0, - "y": 13 + "y": 21 }, "id": 53, "links": [], @@ -4687,7 +4776,7 @@ "h": 8, "w": 12, "x": 12, - "y": 13 + "y": 21 }, "id": 34, "links": [], @@ -4825,7 +4914,7 @@ "h": 8, "w": 12, "x": 0, - "y": 21 + "y": 29 }, "id": 30, "links": [], @@ -4947,7 +5036,7 @@ "h": 8, "w": 12, "x": 12, - "y": 21 + "y": 29 }, "id": 36, "links": [], @@ -5055,7 +5144,7 @@ "h": 8, "w": 12, "x": 0, - "y": 29 + "y": 37 }, "id": 58, "links": [], @@ -5165,7 +5254,7 @@ "h": 8, "w": 12, "x": 12, - "y": 29 + "y": 37 }, "id": 62, "options": { @@ -5285,7 +5374,7 @@ "h": 8, "w": 12, "x": 0, - "y": 37 + "y": 45 }, "id": 59, "links": [], @@ -5405,7 +5494,7 @@ "h": 8, "w": 12, "x": 12, - "y": 37 + "y": 45 }, "id": 64, "options": { @@ -5511,7 +5600,7 @@ "h": 8, "w": 12, "x": 0, - "y": 45 + "y": 53 }, "id": 99, "links": [], @@ -5621,7 +5710,7 @@ "h": 8, "w": 12, "x": 12, - "y": 45 + "y": 53 }, "id": 103, "links": [], @@ -5731,7 +5820,7 @@ "h": 8, "w": 12, "x": 0, - "y": 53 + "y": 61 }, "id": 122, "links": [], @@ -5841,7 +5930,7 @@ "h": 8, "w": 12, "x": 12, - "y": 53 + "y": 61 }, "id": 105, "links": [], diff --git a/dashboards/vm/vmagent.json b/dashboards/vm/vmagent.json index 9a64ed834..64cbb72ed 100644 --- a/dashboards/vm/vmagent.json +++ b/dashboards/vm/vmagent.json @@ -1336,8 +1336,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1440,8 +1439,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1619,7 +1617,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1635,7 +1634,7 @@ "h": 8, "w": 12, "x": 0, - "y": 35 + "y": 3 }, "id": 109, "options": { @@ -1750,7 +1749,7 @@ "h": 8, "w": 12, "x": 12, - "y": 35 + "y": 3 }, "id": 111, "options": { @@ -1875,7 +1874,7 @@ "h": 8, "w": 12, "x": 0, - "y": 43 + "y": 11 }, "id": 81, "options": { @@ -2011,7 +2010,7 @@ "h": 8, "w": 12, "x": 12, - "y": 43 + "y": 11 }, "id": 7, "options": { @@ -2130,7 +2129,7 @@ "h": 8, "w": 12, "x": 0, - "y": 51 + "y": 19 }, "id": 83, "options": { @@ -2236,7 +2235,7 @@ "h": 8, "w": 12, "x": 12, - "y": 51 + "y": 19 }, "id": 39, "options": { @@ -2343,7 +2342,7 @@ "h": 8, "w": 12, "x": 0, - "y": 59 + "y": 27 }, "id": 135, "options": { @@ -2450,7 +2449,7 @@ "h": 8, "w": 12, "x": 12, - "y": 59 + "y": 27 }, "id": 149, "options": { @@ -2556,7 +2555,7 @@ "h": 8, "w": 12, "x": 12, - "y": 67 + "y": 35 }, "id": 41, "options": { @@ -2669,7 +2668,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -2685,7 +2685,7 @@ "h": 8, "w": 12, "x": 0, - "y": 20 + "y": 4 }, "id": 92, "options": { @@ -2773,7 +2773,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -2789,7 +2790,7 @@ "h": 8, "w": 12, "x": 12, - "y": 20 + "y": 4 }, "id": 95, "options": { @@ -2880,7 +2881,8 @@ "mode": "absolute", "steps": [ { - "color": "transparent" + "color": "transparent", + "value": null }, { "color": "red", @@ -2896,7 +2898,7 @@ "h": 8, "w": 12, "x": 0, - "y": 28 + "y": 12 }, "id": 98, "options": { @@ -2987,7 +2989,8 @@ "mode": "absolute", "steps": [ { - "color": "transparent" + "color": "transparent", + "value": null }, { "color": "red", @@ -3003,7 +3006,7 @@ "h": 8, "w": 12, "x": 12, - "y": 28 + "y": 12 }, "id": 99, "options": { @@ -3055,6 +3058,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -3068,6 +3072,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -3091,7 +3096,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3107,7 +3113,7 @@ "h": 8, "w": 12, "x": 0, - "y": 36 + "y": 20 }, "id": 79, "options": { @@ -3159,6 +3165,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -3172,6 +3179,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -3195,7 +3203,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3211,7 +3220,7 @@ "h": 8, "w": 12, "x": 12, - "y": 36 + "y": 20 }, "id": 18, "links": [ @@ -3269,6 +3278,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -3282,6 +3292,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -3305,7 +3316,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3321,7 +3333,7 @@ "h": 8, "w": 12, "x": 0, - "y": 44 + "y": 28 }, "id": 127, "options": { @@ -3371,6 +3383,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -3384,6 +3397,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -3407,7 +3421,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3423,7 +3438,7 @@ "h": 8, "w": 12, "x": 12, - "y": 44 + "y": 28 }, "id": 50, "options": { @@ -3483,7 +3498,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3521,13 +3537,15 @@ }, "gridPos": { "h": 7, - "w": 24, + "w": 12, "x": 0, - "y": 52 + "y": 36 }, "id": 129, "options": { + "cellHeight": "sm", "footer": { + "countRows": false, "fields": "", "reducer": [ "sum" @@ -3542,7 +3560,7 @@ } ] }, - "pluginVersion": "9.2.6", + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -3585,6 +3603,111 @@ } ], "type": "table" + }, + { + "datasource": { + "type": "victoriametrics-datasource", + "uid": "$ds" + }, + "description": "Shows the number of restarts per job. The chart can be useful to identify periodic process restarts and correlate them with potential issues or anomalies. Normally, processes shouldn't restart unless restart was inited by user. The reason of restarts should be figured out by checking the logs of each specific service. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 36 + }, + "id": 150, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "victoriametrics-datasource", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(changes(vm_app_start_timestamp{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) > 0) by(job)", + "format": "time_series", + "instant": false, + "legendFormat": "{{job}}", + "refId": "A" + } + ], + "title": "Restarts ($job)", + "type": "timeseries" } ], "targets": [ @@ -3678,7 +3801,7 @@ "h": 7, "w": 12, "x": 0, - "y": 45 + "y": 53 }, "id": 48, "options": { @@ -3784,7 +3907,7 @@ "h": 7, "w": 12, "x": 12, - "y": 45 + "y": 53 }, "id": 76, "options": { @@ -3888,7 +4011,7 @@ "h": 7, "w": 12, "x": 0, - "y": 52 + "y": 60 }, "id": 132, "options": { @@ -3994,7 +4117,7 @@ "h": 7, "w": 12, "x": 12, - "y": 52 + "y": 60 }, "id": 133, "options": { @@ -4099,7 +4222,7 @@ "h": 8, "w": 12, "x": 0, - "y": 59 + "y": 67 }, "id": 20, "options": { @@ -4203,7 +4326,7 @@ "h": 8, "w": 12, "x": 12, - "y": 59 + "y": 67 }, "id": 126, "options": { @@ -4306,7 +4429,7 @@ "h": 8, "w": 12, "x": 0, - "y": 67 + "y": 75 }, "id": 46, "options": { @@ -4409,7 +4532,7 @@ "h": 8, "w": 12, "x": 12, - "y": 67 + "y": 75 }, "id": 148, "options": { @@ -4512,7 +4635,7 @@ "h": 8, "w": 12, "x": 12, - "y": 75 + "y": 83 }, "id": 31, "options": { @@ -4691,7 +4814,7 @@ "h": 8, "w": 12, "x": 0, - "y": 22 + "y": 30 }, "id": 73, "options": { @@ -4808,7 +4931,7 @@ "h": 8, "w": 12, "x": 12, - "y": 14 + "y": 22 }, "id": 131, "options": { @@ -4912,7 +5035,7 @@ "h": 8, "w": 12, "x": 0, - "y": 22 + "y": 30 }, "id": 130, "options": { @@ -5029,7 +5152,7 @@ "h": 8, "w": 12, "x": 12, - "y": 22 + "y": 30 }, "id": 77, "options": { @@ -5163,7 +5286,7 @@ "h": 8, "w": 12, "x": 0, - "y": 15 + "y": 23 }, "id": 146, "options": { @@ -5265,7 +5388,7 @@ "h": 8, "w": 12, "x": 12, - "y": 15 + "y": 23 }, "id": 143, "options": { @@ -5361,7 +5484,7 @@ "h": 8, "w": 12, "x": 0, - "y": 23 + "y": 31 }, "id": 147, "options": { @@ -5464,7 +5587,7 @@ "h": 8, "w": 12, "x": 12, - "y": 23 + "y": 31 }, "id": 139, "options": { @@ -5575,7 +5698,7 @@ "h": 8, "w": 12, "x": 0, - "y": 31 + "y": 39 }, "id": 142, "options": { @@ -5672,7 +5795,7 @@ "h": 8, "w": 12, "x": 12, - "y": 31 + "y": 39 }, "id": 137, "options": { @@ -5785,7 +5908,7 @@ "h": 8, "w": 12, "x": 12, - "y": 39 + "y": 47 }, "id": 141, "options": { @@ -5916,7 +6039,7 @@ "h": 8, "w": 12, "x": 0, - "y": 16 + "y": 24 }, "id": 60, "options": { @@ -6020,7 +6143,7 @@ "h": 8, "w": 12, "x": 12, - "y": 16 + "y": 24 }, "id": 66, "options": { @@ -6124,7 +6247,7 @@ "h": 8, "w": 12, "x": 0, - "y": 24 + "y": 32 }, "id": 61, "options": { @@ -6228,7 +6351,7 @@ "h": 8, "w": 12, "x": 12, - "y": 24 + "y": 32 }, "id": 65, "options": { @@ -6331,7 +6454,7 @@ "h": 8, "w": 12, "x": 0, - "y": 32 + "y": 40 }, "id": 88, "options": { @@ -6430,7 +6553,7 @@ "h": 8, "w": 12, "x": 12, - "y": 32 + "y": 40 }, "id": 84, "options": { @@ -6533,7 +6656,7 @@ "h": 8, "w": 12, "x": 0, - "y": 40 + "y": 48 }, "id": 90, "options": { @@ -6599,7 +6722,7 @@ "h": 2, "w": 24, "x": 0, - "y": 25 + "y": 33 }, "id": 115, "options": { @@ -6677,7 +6800,7 @@ "h": 8, "w": 12, "x": 0, - "y": 27 + "y": 35 }, "id": 119, "options": { @@ -6781,7 +6904,7 @@ "h": 8, "w": 12, "x": 12, - "y": 27 + "y": 35 }, "id": 117, "options": { @@ -6887,7 +7010,7 @@ "h": 8, "w": 12, "x": 0, - "y": 35 + "y": 43 }, "id": 125, "links": [ @@ -7009,7 +7132,7 @@ "h": 8, "w": 12, "x": 12, - "y": 35 + "y": 43 }, "id": 123, "options": { @@ -7139,7 +7262,7 @@ "h": 8, "w": 12, "x": 0, - "y": 43 + "y": 51 }, "id": 121, "options": { @@ -7212,8 +7335,8 @@ { "current": { "selected": false, - "text": "VictoriaMetrics", - "value": "P4169E866C3094E38" + "text": "VictoriaMetrics - cluster", + "value": "PAF93674D0B4E9963" }, "hide": 0, "includeAll": false, @@ -7338,4 +7461,4 @@ "uid": "G7Z9GzMGz_vm", "version": 1, "weekStart": "" -} +} \ No newline at end of file diff --git a/dashboards/vm/vmalert.json b/dashboards/vm/vmalert.json index 3d71e5c18..61fa88537 100644 --- a/dashboards/vm/vmalert.json +++ b/dashboards/vm/vmalert.json @@ -1126,234 +1126,6 @@ "title": "Rules execution errors ($instance)", "type": "timeseries" }, - { - "datasource": { - "type": "victoriametrics-datasource", - "uid": "$ds" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Value" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Time" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 25 - }, - "id": 50, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "job" - } - ] - }, - "pluginVersion": "9.2.7", - "targets": [ - { - "datasource": { - "type": "victoriametrics-datasource", - "uid": "$ds" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(flag{is_set=\"true\", job=~\"$job\", instance=~\"$instance\"}) by(job, instance, name, value)", - "format": "table", - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "Non-default flags", - "transformations": [ - { - "id": "groupBy", - "options": { - "fields": { - "instance": { - "aggregations": [ - "uniqueValues" - ], - "operation": "aggregate" - }, - "job": { - "aggregations": [], - "operation": "groupby" - }, - "name": { - "aggregations": [], - "operation": "groupby" - }, - "value": { - "aggregations": [], - "operation": "groupby" - } - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "victoriametrics-datasource", - "uid": "$ds" - }, - "description": "Missed evaluation means that group evaluation time takes longer than the configured evaluation interval. \nThis may result in missed alerting notifications or recording rules samples. Try increasing evaluation interval or concurrency for such groups. See https://docs.victoriametrics.com/vmalert/#groups\n\nIf rule expressions are taking longer than expected, please see https://docs.victoriametrics.com/troubleshooting/#slow-queries.\"", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "bars", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 25 - }, - "id": 58, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "9.2.6", - "targets": [ - { - "datasource": { - "type": "victoriametrics-datasource", - "uid": "$ds" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(increase(vmalert_iteration_missed_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job, group) > 0", - "interval": "1m", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Missed evaluations ($instance)", - "type": "timeseries" - }, { "collapsed": true, "datasource": { @@ -1364,7 +1136,7 @@ "h": 1, "w": 24, "x": 0, - "y": 32 + "y": 25 }, "id": 43, "panels": [ @@ -1435,7 +1207,7 @@ "h": 8, "w": 12, "x": 0, - "y": 3 + "y": 11 }, "id": 37, "links": [ @@ -1532,8 +1304,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1549,7 +1320,7 @@ "h": 8, "w": 12, "x": 12, - "y": 3 + "y": 11 }, "id": 57, "links": [ @@ -1663,7 +1434,7 @@ "h": 8, "w": 12, "x": 0, - "y": 11 + "y": 19 }, "id": 35, "links": [ @@ -1779,7 +1550,7 @@ "h": 8, "w": 12, "x": 12, - "y": 11 + "y": 19 }, "id": 56, "links": [ @@ -1912,7 +1683,7 @@ "h": 8, "w": 12, "x": 0, - "y": 19 + "y": 27 }, "id": 39, "links": [], @@ -2020,7 +1791,7 @@ "h": 8, "w": 12, "x": 12, - "y": 19 + "y": 27 }, "id": 41, "links": [], @@ -2128,7 +1899,7 @@ "h": 8, "w": 12, "x": 0, - "y": 27 + "y": 35 }, "id": 59, "links": [], @@ -2219,8 +1990,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2236,7 +2006,7 @@ "h": 8, "w": 12, "x": 12, - "y": 27 + "y": 35 }, "id": 61, "options": { @@ -2288,6 +2058,359 @@ "title": "Resource usage", "type": "row" }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 26 + }, + "id": 62, + "panels": [ + { + "datasource": { + "type": "victoriametrics-datasource", + "uid": "$ds" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 27 + }, + "id": 50, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "job" + } + ] + }, + "pluginVersion": "10.4.2", + "targets": [ + { + "datasource": { + "type": "victoriametrics-datasource", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(flag{is_set=\"true\", job=~\"$job\", instance=~\"$instance\"}) by(job, instance, name, value)", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Non-default flags", + "transformations": [ + { + "id": "groupBy", + "options": { + "fields": { + "instance": { + "aggregations": [ + "uniqueValues" + ], + "operation": "aggregate" + }, + "job": { + "aggregations": [], + "operation": "groupby" + }, + "name": { + "aggregations": [], + "operation": "groupby" + }, + "value": { + "aggregations": [], + "operation": "groupby" + } + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "victoriametrics-datasource", + "uid": "$ds" + }, + "description": "Missed evaluation means that group evaluation time takes longer than the configured evaluation interval. \nThis may result in missed alerting notifications or recording rules samples. Try increasing evaluation interval or concurrency for such groups. See https://docs.victoriametrics.com/vmalert/#groups\n\nIf rule expressions are taking longer than expected, please see https://docs.victoriametrics.com/troubleshooting/#slow-queries.\"", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 27 + }, + "id": 58, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.6", + "targets": [ + { + "datasource": { + "type": "victoriametrics-datasource", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(increase(vmalert_iteration_missed_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job, group) > 0", + "interval": "1m", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Missed evaluations ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "victoriametrics-datasource", + "uid": "$ds" + }, + "description": "Shows the number of restarts per job. The chart can be useful to identify periodic process restarts and correlate them with potential issues or anomalies. Normally, processes shouldn't restart unless restart was inited by user. The reason of restarts should be figured out by checking the logs of each specific service. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 34 + }, + "id": 63, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "victoriametrics-datasource", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(changes(vm_app_start_timestamp{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) > 0) by(job)", + "format": "time_series", + "instant": false, + "legendFormat": "{{job}}", + "refId": "A" + } + ], + "title": "Restarts ($job)", + "type": "timeseries" + } + ], + "title": "Troubleshooting", + "type": "row" + }, { "collapsed": true, "datasource": { @@ -2298,7 +2421,7 @@ "h": 1, "w": 24, "x": 0, - "y": 33 + "y": 27 }, "id": 17, "panels": [ @@ -2364,7 +2487,7 @@ "h": 8, "w": 12, "x": 0, - "y": 44 + "y": 52 }, "id": 14, "options": { @@ -2466,7 +2589,7 @@ "h": 8, "w": 12, "x": 12, - "y": 44 + "y": 52 }, "id": 13, "options": { @@ -2568,7 +2691,7 @@ "h": 8, "w": 12, "x": 0, - "y": 52 + "y": 60 }, "id": 20, "options": { @@ -2671,7 +2794,7 @@ "h": 8, "w": 12, "x": 12, - "y": 52 + "y": 60 }, "id": 32, "options": { @@ -2770,7 +2893,7 @@ "h": 8, "w": 12, "x": 0, - "y": 60 + "y": 68 }, "id": 26, "options": { @@ -2831,7 +2954,7 @@ "h": 1, "w": 24, "x": 0, - "y": 34 + "y": 28 }, "id": 28, "panels": [ @@ -2897,7 +3020,7 @@ "h": 8, "w": 12, "x": 0, - "y": 59 + "y": 67 }, "id": 31, "options": { @@ -2999,7 +3122,7 @@ "h": 8, "w": 12, "x": 12, - "y": 59 + "y": 67 }, "id": 33, "options": { @@ -3100,7 +3223,7 @@ "h": 8, "w": 12, "x": 0, - "y": 67 + "y": 75 }, "id": 30, "options": { @@ -3157,7 +3280,7 @@ "h": 1, "w": 24, "x": 0, - "y": 35 + "y": 29 }, "id": 55, "panels": [ @@ -3221,7 +3344,7 @@ "h": 8, "w": 12, "x": 0, - "y": 25 + "y": 33 }, "id": 52, "options": { @@ -3313,7 +3436,7 @@ "h": 8, "w": 12, "x": 12, - "y": 25 + "y": 33 }, "id": 53, "options": { @@ -3410,7 +3533,7 @@ "h": 8, "w": 12, "x": 0, - "y": 52 + "y": 60 }, "id": 54, "options": { @@ -3513,7 +3636,7 @@ "h": 8, "w": 12, "x": 12, - "y": 52 + "y": 60 }, "id": 60, "options": { @@ -3566,8 +3689,8 @@ { "current": { "selected": false, - "text": "VictoriaMetrics", - "value": "P4169E866C3094E38" + "text": "VictoriaMetrics - cluster", + "value": "PAF93674D0B4E9963" }, "hide": 0, "includeAll": false, diff --git a/dashboards/vm/vmauth.json b/dashboards/vm/vmauth.json index b4a7d4012..5bc9d8b5b 100644 --- a/dashboards/vm/vmauth.json +++ b/dashboards/vm/vmauth.json @@ -1209,8 +1209,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1226,7 +1225,7 @@ "h": 8, "w": 12, "x": 0, - "y": 11 + "y": 19 }, "id": 25, "options": { @@ -1315,8 +1314,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1332,7 +1330,7 @@ "h": 8, "w": 12, "x": 12, - "y": 11 + "y": 19 }, "id": 26, "options": { @@ -1424,8 +1422,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1441,7 +1438,7 @@ "h": 8, "w": 12, "x": 0, - "y": 19 + "y": 27 }, "id": 27, "options": { @@ -1581,8 +1578,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1614,7 +1610,7 @@ "h": 8, "w": 12, "x": 12, - "y": 19 + "y": 27 }, "id": 28, "options": { @@ -1717,8 +1713,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1734,7 +1729,7 @@ "h": 8, "w": 12, "x": 0, - "y": 27 + "y": 35 }, "id": 23, "options": { @@ -1823,8 +1818,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1840,7 +1834,7 @@ "h": 8, "w": 12, "x": 12, - "y": 27 + "y": 35 }, "id": 24, "options": { @@ -1932,8 +1926,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1965,7 +1958,7 @@ "h": 8, "w": 12, "x": 0, - "y": 35 + "y": 43 }, "id": 20, "options": { @@ -2057,8 +2050,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2074,7 +2066,7 @@ "h": 8, "w": 12, "x": 12, - "y": 35 + "y": 43 }, "id": 21, "options": { @@ -2162,8 +2154,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2179,7 +2170,7 @@ "h": 8, "w": 12, "x": 0, - "y": 43 + "y": 51 }, "id": 29, "options": { @@ -2453,6 +2444,111 @@ ], "title": "Log errors", "type": "timeseries" + }, + { + "datasource": { + "type": "victoriametrics-datasource", + "uid": "$ds" + }, + "description": "Shows the number of restarts per job. The chart can be useful to identify periodic process restarts and correlate them with potential issues or anomalies. Normally, processes shouldn't restart unless restart was inited by user. The reason of restarts should be figured out by checking the logs of each specific service. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 47 + }, + "id": 37, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "victoriametrics-datasource", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(changes(vm_app_start_timestamp{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) > 0) by(job)", + "format": "time_series", + "instant": false, + "legendFormat": "{{job}}", + "refId": "A" + } + ], + "title": "Restarts ($job)", + "type": "timeseries" } ], "title": "Troubleshooting", diff --git a/dashboards/vmagent.json b/dashboards/vmagent.json index 8fa8b9acd..1f2fb0312 100644 --- a/dashboards/vmagent.json +++ b/dashboards/vmagent.json @@ -1335,8 +1335,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1439,8 +1438,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1618,7 +1616,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1634,7 +1633,7 @@ "h": 8, "w": 12, "x": 0, - "y": 35 + "y": 3 }, "id": 109, "options": { @@ -1749,7 +1748,7 @@ "h": 8, "w": 12, "x": 12, - "y": 35 + "y": 3 }, "id": 111, "options": { @@ -1874,7 +1873,7 @@ "h": 8, "w": 12, "x": 0, - "y": 43 + "y": 11 }, "id": 81, "options": { @@ -2010,7 +2009,7 @@ "h": 8, "w": 12, "x": 12, - "y": 43 + "y": 11 }, "id": 7, "options": { @@ -2129,7 +2128,7 @@ "h": 8, "w": 12, "x": 0, - "y": 51 + "y": 19 }, "id": 83, "options": { @@ -2235,7 +2234,7 @@ "h": 8, "w": 12, "x": 12, - "y": 51 + "y": 19 }, "id": 39, "options": { @@ -2342,7 +2341,7 @@ "h": 8, "w": 12, "x": 0, - "y": 59 + "y": 27 }, "id": 135, "options": { @@ -2449,7 +2448,7 @@ "h": 8, "w": 12, "x": 12, - "y": 59 + "y": 27 }, "id": 149, "options": { @@ -2555,7 +2554,7 @@ "h": 8, "w": 12, "x": 12, - "y": 67 + "y": 35 }, "id": 41, "options": { @@ -2668,7 +2667,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -2684,7 +2684,7 @@ "h": 8, "w": 12, "x": 0, - "y": 20 + "y": 4 }, "id": 92, "options": { @@ -2772,7 +2772,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -2788,7 +2789,7 @@ "h": 8, "w": 12, "x": 12, - "y": 20 + "y": 4 }, "id": 95, "options": { @@ -2879,7 +2880,8 @@ "mode": "absolute", "steps": [ { - "color": "transparent" + "color": "transparent", + "value": null }, { "color": "red", @@ -2895,7 +2897,7 @@ "h": 8, "w": 12, "x": 0, - "y": 28 + "y": 12 }, "id": 98, "options": { @@ -2986,7 +2988,8 @@ "mode": "absolute", "steps": [ { - "color": "transparent" + "color": "transparent", + "value": null }, { "color": "red", @@ -3002,7 +3005,7 @@ "h": 8, "w": 12, "x": 12, - "y": 28 + "y": 12 }, "id": 99, "options": { @@ -3054,6 +3057,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -3067,6 +3071,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -3090,7 +3095,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3106,7 +3112,7 @@ "h": 8, "w": 12, "x": 0, - "y": 36 + "y": 20 }, "id": 79, "options": { @@ -3158,6 +3164,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -3171,6 +3178,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -3194,7 +3202,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3210,7 +3219,7 @@ "h": 8, "w": 12, "x": 12, - "y": 36 + "y": 20 }, "id": 18, "links": [ @@ -3268,6 +3277,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -3281,6 +3291,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -3304,7 +3315,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3320,7 +3332,7 @@ "h": 8, "w": 12, "x": 0, - "y": 44 + "y": 28 }, "id": 127, "options": { @@ -3370,6 +3382,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -3383,6 +3396,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -3406,7 +3420,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3422,7 +3437,7 @@ "h": 8, "w": 12, "x": 12, - "y": 44 + "y": 28 }, "id": 50, "options": { @@ -3482,7 +3497,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3520,13 +3536,15 @@ }, "gridPos": { "h": 7, - "w": 24, + "w": 12, "x": 0, - "y": 52 + "y": 36 }, "id": 129, "options": { + "cellHeight": "sm", "footer": { + "countRows": false, "fields": "", "reducer": [ "sum" @@ -3541,7 +3559,7 @@ } ] }, - "pluginVersion": "9.2.6", + "pluginVersion": "10.4.2", "targets": [ { "datasource": { @@ -3584,6 +3602,111 @@ } ], "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the number of restarts per job. The chart can be useful to identify periodic process restarts and correlate them with potential issues or anomalies. Normally, processes shouldn't restart unless restart was inited by user. The reason of restarts should be figured out by checking the logs of each specific service. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 36 + }, + "id": 150, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(changes(vm_app_start_timestamp{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) > 0) by(job)", + "format": "time_series", + "instant": false, + "legendFormat": "{{job}}", + "refId": "A" + } + ], + "title": "Restarts ($job)", + "type": "timeseries" } ], "targets": [ @@ -3677,7 +3800,7 @@ "h": 7, "w": 12, "x": 0, - "y": 45 + "y": 53 }, "id": 48, "options": { @@ -3783,7 +3906,7 @@ "h": 7, "w": 12, "x": 12, - "y": 45 + "y": 53 }, "id": 76, "options": { @@ -3887,7 +4010,7 @@ "h": 7, "w": 12, "x": 0, - "y": 52 + "y": 60 }, "id": 132, "options": { @@ -3993,7 +4116,7 @@ "h": 7, "w": 12, "x": 12, - "y": 52 + "y": 60 }, "id": 133, "options": { @@ -4098,7 +4221,7 @@ "h": 8, "w": 12, "x": 0, - "y": 59 + "y": 67 }, "id": 20, "options": { @@ -4202,7 +4325,7 @@ "h": 8, "w": 12, "x": 12, - "y": 59 + "y": 67 }, "id": 126, "options": { @@ -4305,7 +4428,7 @@ "h": 8, "w": 12, "x": 0, - "y": 67 + "y": 75 }, "id": 46, "options": { @@ -4408,7 +4531,7 @@ "h": 8, "w": 12, "x": 12, - "y": 67 + "y": 75 }, "id": 148, "options": { @@ -4511,7 +4634,7 @@ "h": 8, "w": 12, "x": 12, - "y": 75 + "y": 83 }, "id": 31, "options": { @@ -4690,7 +4813,7 @@ "h": 8, "w": 12, "x": 0, - "y": 22 + "y": 30 }, "id": 73, "options": { @@ -4807,7 +4930,7 @@ "h": 8, "w": 12, "x": 12, - "y": 14 + "y": 22 }, "id": 131, "options": { @@ -4911,7 +5034,7 @@ "h": 8, "w": 12, "x": 0, - "y": 22 + "y": 30 }, "id": 130, "options": { @@ -5028,7 +5151,7 @@ "h": 8, "w": 12, "x": 12, - "y": 22 + "y": 30 }, "id": 77, "options": { @@ -5162,7 +5285,7 @@ "h": 8, "w": 12, "x": 0, - "y": 15 + "y": 23 }, "id": 146, "options": { @@ -5264,7 +5387,7 @@ "h": 8, "w": 12, "x": 12, - "y": 15 + "y": 23 }, "id": 143, "options": { @@ -5360,7 +5483,7 @@ "h": 8, "w": 12, "x": 0, - "y": 23 + "y": 31 }, "id": 147, "options": { @@ -5463,7 +5586,7 @@ "h": 8, "w": 12, "x": 12, - "y": 23 + "y": 31 }, "id": 139, "options": { @@ -5574,7 +5697,7 @@ "h": 8, "w": 12, "x": 0, - "y": 31 + "y": 39 }, "id": 142, "options": { @@ -5671,7 +5794,7 @@ "h": 8, "w": 12, "x": 12, - "y": 31 + "y": 39 }, "id": 137, "options": { @@ -5784,7 +5907,7 @@ "h": 8, "w": 12, "x": 12, - "y": 39 + "y": 47 }, "id": 141, "options": { @@ -5915,7 +6038,7 @@ "h": 8, "w": 12, "x": 0, - "y": 16 + "y": 24 }, "id": 60, "options": { @@ -6019,7 +6142,7 @@ "h": 8, "w": 12, "x": 12, - "y": 16 + "y": 24 }, "id": 66, "options": { @@ -6123,7 +6246,7 @@ "h": 8, "w": 12, "x": 0, - "y": 24 + "y": 32 }, "id": 61, "options": { @@ -6227,7 +6350,7 @@ "h": 8, "w": 12, "x": 12, - "y": 24 + "y": 32 }, "id": 65, "options": { @@ -6330,7 +6453,7 @@ "h": 8, "w": 12, "x": 0, - "y": 32 + "y": 40 }, "id": 88, "options": { @@ -6429,7 +6552,7 @@ "h": 8, "w": 12, "x": 12, - "y": 32 + "y": 40 }, "id": 84, "options": { @@ -6532,7 +6655,7 @@ "h": 8, "w": 12, "x": 0, - "y": 40 + "y": 48 }, "id": 90, "options": { @@ -6598,7 +6721,7 @@ "h": 2, "w": 24, "x": 0, - "y": 25 + "y": 33 }, "id": 115, "options": { @@ -6676,7 +6799,7 @@ "h": 8, "w": 12, "x": 0, - "y": 27 + "y": 35 }, "id": 119, "options": { @@ -6780,7 +6903,7 @@ "h": 8, "w": 12, "x": 12, - "y": 27 + "y": 35 }, "id": 117, "options": { @@ -6886,7 +7009,7 @@ "h": 8, "w": 12, "x": 0, - "y": 35 + "y": 43 }, "id": 125, "links": [ @@ -7008,7 +7131,7 @@ "h": 8, "w": 12, "x": 12, - "y": 35 + "y": 43 }, "id": 123, "options": { @@ -7138,7 +7261,7 @@ "h": 8, "w": 12, "x": 0, - "y": 43 + "y": 51 }, "id": 121, "options": { @@ -7211,8 +7334,8 @@ { "current": { "selected": false, - "text": "VictoriaMetrics", - "value": "P4169E866C3094E38" + "text": "VictoriaMetrics - cluster", + "value": "PAF93674D0B4E9963" }, "hide": 0, "includeAll": false, @@ -7337,4 +7460,4 @@ "uid": "G7Z9GzMGz", "version": 1, "weekStart": "" -} +} \ No newline at end of file diff --git a/dashboards/vmalert.json b/dashboards/vmalert.json index 405f438b0..929b9b2bb 100644 --- a/dashboards/vmalert.json +++ b/dashboards/vmalert.json @@ -1125,234 +1125,6 @@ "title": "Rules execution errors ($instance)", "type": "timeseries" }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Value" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Time" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 25 - }, - "id": 50, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "job" - } - ] - }, - "pluginVersion": "9.2.7", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(flag{is_set=\"true\", job=~\"$job\", instance=~\"$instance\"}) by(job, instance, name, value)", - "format": "table", - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "Non-default flags", - "transformations": [ - { - "id": "groupBy", - "options": { - "fields": { - "instance": { - "aggregations": [ - "uniqueValues" - ], - "operation": "aggregate" - }, - "job": { - "aggregations": [], - "operation": "groupby" - }, - "name": { - "aggregations": [], - "operation": "groupby" - }, - "value": { - "aggregations": [], - "operation": "groupby" - } - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "description": "Missed evaluation means that group evaluation time takes longer than the configured evaluation interval. \nThis may result in missed alerting notifications or recording rules samples. Try increasing evaluation interval or concurrency for such groups. See https://docs.victoriametrics.com/vmalert/#groups\n\nIf rule expressions are taking longer than expected, please see https://docs.victoriametrics.com/troubleshooting/#slow-queries.\"", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "bars", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 25 - }, - "id": 58, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "9.2.6", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(increase(vmalert_iteration_missed_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job, group) > 0", - "interval": "1m", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Missed evaluations ($instance)", - "type": "timeseries" - }, { "collapsed": true, "datasource": { @@ -1363,7 +1135,7 @@ "h": 1, "w": 24, "x": 0, - "y": 32 + "y": 25 }, "id": 43, "panels": [ @@ -1434,7 +1206,7 @@ "h": 8, "w": 12, "x": 0, - "y": 3 + "y": 11 }, "id": 37, "links": [ @@ -1531,8 +1303,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1548,7 +1319,7 @@ "h": 8, "w": 12, "x": 12, - "y": 3 + "y": 11 }, "id": 57, "links": [ @@ -1662,7 +1433,7 @@ "h": 8, "w": 12, "x": 0, - "y": 11 + "y": 19 }, "id": 35, "links": [ @@ -1778,7 +1549,7 @@ "h": 8, "w": 12, "x": 12, - "y": 11 + "y": 19 }, "id": 56, "links": [ @@ -1911,7 +1682,7 @@ "h": 8, "w": 12, "x": 0, - "y": 19 + "y": 27 }, "id": 39, "links": [], @@ -2019,7 +1790,7 @@ "h": 8, "w": 12, "x": 12, - "y": 19 + "y": 27 }, "id": 41, "links": [], @@ -2127,7 +1898,7 @@ "h": 8, "w": 12, "x": 0, - "y": 27 + "y": 35 }, "id": 59, "links": [], @@ -2218,8 +1989,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2235,7 +2005,7 @@ "h": 8, "w": 12, "x": 12, - "y": 27 + "y": 35 }, "id": 61, "options": { @@ -2287,6 +2057,359 @@ "title": "Resource usage", "type": "row" }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 26 + }, + "id": 62, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 27 + }, + "id": 50, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "job" + } + ] + }, + "pluginVersion": "10.4.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(flag{is_set=\"true\", job=~\"$job\", instance=~\"$instance\"}) by(job, instance, name, value)", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Non-default flags", + "transformations": [ + { + "id": "groupBy", + "options": { + "fields": { + "instance": { + "aggregations": [ + "uniqueValues" + ], + "operation": "aggregate" + }, + "job": { + "aggregations": [], + "operation": "groupby" + }, + "name": { + "aggregations": [], + "operation": "groupby" + }, + "value": { + "aggregations": [], + "operation": "groupby" + } + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Missed evaluation means that group evaluation time takes longer than the configured evaluation interval. \nThis may result in missed alerting notifications or recording rules samples. Try increasing evaluation interval or concurrency for such groups. See https://docs.victoriametrics.com/vmalert/#groups\n\nIf rule expressions are taking longer than expected, please see https://docs.victoriametrics.com/troubleshooting/#slow-queries.\"", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 27 + }, + "id": 58, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.6", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(increase(vmalert_iteration_missed_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job, group) > 0", + "interval": "1m", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Missed evaluations ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the number of restarts per job. The chart can be useful to identify periodic process restarts and correlate them with potential issues or anomalies. Normally, processes shouldn't restart unless restart was inited by user. The reason of restarts should be figured out by checking the logs of each specific service. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 34 + }, + "id": 63, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(changes(vm_app_start_timestamp{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) > 0) by(job)", + "format": "time_series", + "instant": false, + "legendFormat": "{{job}}", + "refId": "A" + } + ], + "title": "Restarts ($job)", + "type": "timeseries" + } + ], + "title": "Troubleshooting", + "type": "row" + }, { "collapsed": true, "datasource": { @@ -2297,7 +2420,7 @@ "h": 1, "w": 24, "x": 0, - "y": 33 + "y": 27 }, "id": 17, "panels": [ @@ -2363,7 +2486,7 @@ "h": 8, "w": 12, "x": 0, - "y": 44 + "y": 52 }, "id": 14, "options": { @@ -2465,7 +2588,7 @@ "h": 8, "w": 12, "x": 12, - "y": 44 + "y": 52 }, "id": 13, "options": { @@ -2567,7 +2690,7 @@ "h": 8, "w": 12, "x": 0, - "y": 52 + "y": 60 }, "id": 20, "options": { @@ -2670,7 +2793,7 @@ "h": 8, "w": 12, "x": 12, - "y": 52 + "y": 60 }, "id": 32, "options": { @@ -2769,7 +2892,7 @@ "h": 8, "w": 12, "x": 0, - "y": 60 + "y": 68 }, "id": 26, "options": { @@ -2830,7 +2953,7 @@ "h": 1, "w": 24, "x": 0, - "y": 34 + "y": 28 }, "id": 28, "panels": [ @@ -2896,7 +3019,7 @@ "h": 8, "w": 12, "x": 0, - "y": 59 + "y": 67 }, "id": 31, "options": { @@ -2998,7 +3121,7 @@ "h": 8, "w": 12, "x": 12, - "y": 59 + "y": 67 }, "id": 33, "options": { @@ -3099,7 +3222,7 @@ "h": 8, "w": 12, "x": 0, - "y": 67 + "y": 75 }, "id": 30, "options": { @@ -3156,7 +3279,7 @@ "h": 1, "w": 24, "x": 0, - "y": 35 + "y": 29 }, "id": 55, "panels": [ @@ -3220,7 +3343,7 @@ "h": 8, "w": 12, "x": 0, - "y": 25 + "y": 33 }, "id": 52, "options": { @@ -3312,7 +3435,7 @@ "h": 8, "w": 12, "x": 12, - "y": 25 + "y": 33 }, "id": 53, "options": { @@ -3409,7 +3532,7 @@ "h": 8, "w": 12, "x": 0, - "y": 52 + "y": 60 }, "id": 54, "options": { @@ -3512,7 +3635,7 @@ "h": 8, "w": 12, "x": 12, - "y": 52 + "y": 60 }, "id": 60, "options": { @@ -3565,8 +3688,8 @@ { "current": { "selected": false, - "text": "VictoriaMetrics", - "value": "P4169E866C3094E38" + "text": "VictoriaMetrics - cluster", + "value": "PAF93674D0B4E9963" }, "hide": 0, "includeAll": false, diff --git a/dashboards/vmauth.json b/dashboards/vmauth.json index c34ef9a8b..e81692876 100644 --- a/dashboards/vmauth.json +++ b/dashboards/vmauth.json @@ -1208,8 +1208,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1225,7 +1224,7 @@ "h": 8, "w": 12, "x": 0, - "y": 11 + "y": 19 }, "id": 25, "options": { @@ -1314,8 +1313,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1331,7 +1329,7 @@ "h": 8, "w": 12, "x": 12, - "y": 11 + "y": 19 }, "id": 26, "options": { @@ -1423,8 +1421,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1440,7 +1437,7 @@ "h": 8, "w": 12, "x": 0, - "y": 19 + "y": 27 }, "id": 27, "options": { @@ -1580,8 +1577,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1613,7 +1609,7 @@ "h": 8, "w": 12, "x": 12, - "y": 19 + "y": 27 }, "id": 28, "options": { @@ -1716,8 +1712,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1733,7 +1728,7 @@ "h": 8, "w": 12, "x": 0, - "y": 27 + "y": 35 }, "id": 23, "options": { @@ -1822,8 +1817,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1839,7 +1833,7 @@ "h": 8, "w": 12, "x": 12, - "y": 27 + "y": 35 }, "id": 24, "options": { @@ -1931,8 +1925,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1964,7 +1957,7 @@ "h": 8, "w": 12, "x": 0, - "y": 35 + "y": 43 }, "id": 20, "options": { @@ -2056,8 +2049,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2073,7 +2065,7 @@ "h": 8, "w": 12, "x": 12, - "y": 35 + "y": 43 }, "id": 21, "options": { @@ -2161,8 +2153,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -2178,7 +2169,7 @@ "h": 8, "w": 12, "x": 0, - "y": 43 + "y": 51 }, "id": 29, "options": { @@ -2452,6 +2443,111 @@ ], "title": "Log errors", "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the number of restarts per job. The chart can be useful to identify periodic process restarts and correlate them with potential issues or anomalies. Normally, processes shouldn't restart unless restart was inited by user. The reason of restarts should be figured out by checking the logs of each specific service. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 47 + }, + "id": 37, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(changes(vm_app_start_timestamp{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) > 0) by(job)", + "format": "time_series", + "instant": false, + "legendFormat": "{{job}}", + "refId": "A" + } + ], + "title": "Restarts ($job)", + "type": "timeseries" } ], "title": "Troubleshooting", diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 0eda6364c..551f983db 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -22,6 +22,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert/): `-rule` cmd-line flag now supports multi-document YAML files. This could be useful when rules are retrieved via HTTP URL where multiple rule files were merged together in one response. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6753). Thanks to @Irene-123 for [the pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6995). * FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent/): support scraping from Kubernetes Native Sidecars. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7287). * FEATURE: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): add a separate cache type for storing sparse entries when performing large index scans. This significantly reduces memory usage when applying [downsampling filters](https://docs.victoriametrics.com/#downsampling) and [retention filters](https://docs.victoriametrics.com/#retention-filters) during background merge. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7182) for the details. +* FEATURE: [dashboards](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards) for VM single-node, cluster, vmalert, vmagent, VictoriaLogs: add `Restarts` panel to show the events of process restarts. This panel should help correlate events of restart with unexpected behavior of processes. * BUGFIX: [dashboards](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards) for Single-node VictoriaMetrics, cluster: The free disk space calculation now will subtract the size of the `-storage.minFreeDiskSpaceBytes` flag to correctly display the remaining available space of Single-node VictoriaMetrics/vmstorage rather than the actual available disk space, as well as the full ETA. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7334) for the details. * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert): properly set `group_name` and `file` fields for recording rules in `/api/v1/rules`. From d2dce13df641108fd56acb6a804d6045bf0d2943 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 30 Oct 2024 17:58:17 +0100 Subject: [PATCH 61/90] app/vlinsert: typo fix after 16ee470da614bfd0fcfabc3e109d245fc899d946 --- app/vlinsert/jsonline/jsonline_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vlinsert/jsonline/jsonline_test.go b/app/vlinsert/jsonline/jsonline_test.go index 6e5fe7722..dbc545de7 100644 --- a/app/vlinsert/jsonline/jsonline_test.go +++ b/app/vlinsert/jsonline/jsonline_test.go @@ -45,7 +45,7 @@ func TestProcessStreamInternal_Success(t *testing.T) { rowsExpected = 2 timestampsExpected = []int64{1686026891735000000, 1686023292735000000} resultExpected = `{"log.offset":"71770","log.file.path":"/var/log/auth.log","message":"foobar"} -{"message":"baz","aa":"bb"}` +{"message":"baz"}` f(data, timeField, msgField, rowsExpected, timestampsExpected, resultExpected) } From 7603446850778d770e6fe9f94c2306d7988ff6e5 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 30 Oct 2024 17:59:02 +0100 Subject: [PATCH 62/90] app/vlselect: add support for extra_filters and extra_stream_filters query args across all the HTTP querying APIs These query args are going to be used for quick filtering on field values at https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7365 --- app/vlselect/logsql/logsql.go | 27 ++++++ docs/VictoriaLogs/CHANGELOG.md | 2 + docs/VictoriaLogs/querying/README.md | 34 +++++++ lib/logstorage/filter_stream.go | 4 + lib/logstorage/parser.go | 102 ++++++++++++++++++++ lib/logstorage/parser_test.go | 139 +++++++++++++++++++++++++++ lib/logstorage/stream_filter.go | 1 + 7 files changed, 309 insertions(+) diff --git a/app/vlselect/logsql/logsql.go b/app/vlselect/logsql/logsql.go index 170017c7b..d267db2f1 100644 --- a/app/vlselect/logsql/logsql.go +++ b/app/vlselect/logsql/logsql.go @@ -1017,6 +1017,20 @@ func parseCommonArgs(r *http.Request) (*logstorage.Query, []logstorage.TenantID, q.AddTimeFilter(start, end) } + // Parse optional extra_filters + extraFilters, err := getExtraFilters(r, "extra_filters") + if err != nil { + return nil, nil, err + } + q.AddExtraFilters(extraFilters) + + // Parse optional extra_stream_filters + extraStreamFilters, err := getExtraFilters(r, "extra_stream_filters") + if err != nil { + return nil, nil, err + } + q.AddExtraStreamFilters(extraStreamFilters) + return q, tenantIDs, nil } @@ -1032,3 +1046,16 @@ func getTimeNsec(r *http.Request, argName string) (int64, bool, error) { } return nsecs, true, nil } + +func getExtraFilters(r *http.Request, argName string) ([]logstorage.Field, error) { + s := r.FormValue(argName) + if s == "" { + return nil, nil + } + + var p logstorage.JSONParser + if err := p.ParseLogMessage([]byte(s)); err != nil { + return nil, fmt.Errorf("cannot parse %s: %w", argName, err) + } + return p.Fields, nil +} diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 5f6da4947..106cea8c0 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -15,6 +15,8 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta ## tip +* FEATURE: add support for extra filters across all the [HTTP querying APIs](https://docs.victoriametrics.com/victorialogs/querying/#http-api). See [these docs](https://docs.victoriametrics.com/victorialogs/querying/#extra-filters) for details. This is needed for implementing quick filtering on field values at [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7365). + ## [v0.39.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.39.0-victorialogs) Released at 2024-10-30 diff --git a/docs/VictoriaLogs/querying/README.md b/docs/VictoriaLogs/querying/README.md index 20ef6c700..b177275d8 100644 --- a/docs/VictoriaLogs/querying/README.md +++ b/docs/VictoriaLogs/querying/README.md @@ -22,6 +22,7 @@ VictoriaLogs provides the following HTTP endpoints: - [`/select/logsql/field_names`](#querying-field-names) for querying [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) names. - [`/select/logsql/field_values`](#querying-field-values) for querying [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) values. + ### Querying logs Logs stored in VictoriaLogs can be queried at the `/select/logsql/query` HTTP endpoint. @@ -105,6 +106,7 @@ with `vl_http_requests_total{path="/select/logsql/query"}` metric. See also: +- [Extra filters](#extra-filters) - [Live tailing](#live-tailing) - [Querying hits stats](#querying-hits-stats) - [Querying log stats](#querying-log-stats) @@ -159,6 +161,7 @@ with `vl_live_tailing_requests` metric. See also: +- [Extra filters](#extra-filters) - [Querying logs](#querying-logs) - [Querying streams](#querying-streams) @@ -276,6 +279,7 @@ curl http://localhost:9428/select/logsql/hits -H 'AccountID: 12' -H 'ProjectID: See also: +- [Extra filters](#extra-filters) - [Querying logs](#querying-logs) - [Querying log stats](#querying-log-stats) - [Querying log range stats](#querying-log-range-stats) @@ -348,6 +352,7 @@ The `/select/logsql/stats_query` API is useful for generating Prometheus-compati See also: +- [Extra filters](#extra-filters) - [Querying log range stats](#querying-log-range-stats) - [Querying logs](#querying-logs) - [Querying hits stats](#querying-hits-stats) @@ -441,6 +446,7 @@ The `/select/logsql/stats_query_range` API is useful for generating Prometheus-c See also: +- [Extra filters](#extra-filters) - [Querying log stats](#querying-log-stats) - [Querying logs](#querying-logs) - [Querying hits stats](#querying-hits-stats) @@ -499,6 +505,7 @@ curl http://localhost:9428/select/logsql/stream_ids -H 'AccountID: 12' -H 'Proje See also: +- [Extra filters](#extra-filters) - [Querying streams](#querying-streams) - [Querying logs](#querying-logs) - [Querying hits stats](#querying-hits-stats) @@ -556,6 +563,7 @@ curl http://localhost:9428/select/logsql/streams -H 'AccountID: 12' -H 'ProjectI See also: +- [Extra filters](#extra-filters) - [Querying stream_ids](#querying-stream_ids) - [Querying logs](#querying-logs) - [Querying hits stats](#querying-hits-stats) @@ -610,6 +618,7 @@ curl http://localhost:9428/select/logsql/stream_field_names -H 'AccountID: 12' - See also: +- [Extra filters](#extra-filters) - [Querying stream field names](#querying-stream-field-names) - [Querying field values](#querying-field-values) - [Querying streams](#querying-streams) @@ -664,6 +673,7 @@ curl http://localhost:9428/select/logsql/stream_field_values -H 'AccountID: 12' See also: +- [Extra filters](#extra-filters) - [Querying stream field values](#querying-stream-field-values) - [Querying field names](#querying-field-names) - [Querying streams](#querying-streams) @@ -717,6 +727,7 @@ curl http://localhost:9428/select/logsql/field_names -H 'AccountID: 12' -H 'Proj See also: +- [Extra filters](#extra-filters) - [Querying stream field names](#querying-stream-field-names) - [Querying field values](#querying-field-values) - [Querying streams](#querying-streams) @@ -775,12 +786,35 @@ curl http://localhost:9428/select/logsql/field_values -H 'AccountID: 12' -H 'Pro See also: +- [Extra filters](#extra-filters) - [Querying stream field values](#querying-stream-field-values) - [Querying field names](#querying-field-names) - [Querying streams](#querying-streams) - [HTTP API](#http-api) +## Extra filters + +Alls the [HTTP querying APIs](#http-api) provided by VictoriaLogs support the following optional query args: + +- `extra_filters` - this arg may contain extra [`field:=value`](https://docs.victoriametrics.com/victorialogs/logsql/#exact-filter) filters, which must be applied + to the `query` before returning the results. +- `extra_stream_filters` - this arg may contain extra [`{field="value"}`](https://docs.victoriametrics.com/victorialogs/logsql/#stream-filter) filters, + which must be applied to the `query` before returning results. + +The filters must be passed as JSON object with `"field":"value"` entries. For example, the following JSON object applies `namespace:=my-app and env:prod` filter to the `query` +passed to [HTTP querying APIs](#http-api): + +```json +{ + "namespace":"my-app", + "env":"prod" +} +``` + +The JSON object must be properly encoded with [percent encoding](https://en.wikipedia.org/wiki/Percent-encoding) before being passed to VictoriaLogs. + + ## Web UI VictoriaLogs provides Web UI for logs [querying](https://docs.victoriametrics.com/victorialogs/logsql/) and exploration diff --git a/lib/logstorage/filter_stream.go b/lib/logstorage/filter_stream.go index e127a1e0f..4abd894e0 100644 --- a/lib/logstorage/filter_stream.go +++ b/lib/logstorage/filter_stream.go @@ -12,9 +12,13 @@ type filterStream struct { f *StreamFilter // tenantIDs is the list of tenantIDs to search for streamIDs. + // + // This field is initialized just before the search. tenantIDs []TenantID // idb is the indexdb to search for streamIDs. + // + // This field is initialized just before the search. idb *indexdb streamIDsOnce sync.Once diff --git a/lib/logstorage/parser.go b/lib/logstorage/parser.go index 2d98b90cf..113682a46 100644 --- a/lib/logstorage/parser.go +++ b/lib/logstorage/parser.go @@ -411,6 +411,108 @@ func (q *Query) AddTimeFilter(start, end int64) { } } +// AddExtraStreamFilters adds stream filters to q in the form `{f1.Name=f1.Value, ..., fN.Name=fN.Value}` +func (q *Query) AddExtraStreamFilters(filters []Field) { + if len(filters) == 0 { + return + } + + fa, ok := q.f.(*filterAnd) + if !ok { + if fs, ok := q.f.(*filterStream); ok { + addExtraStreamFilters(fs, filters) + return + } + + fa = &filterAnd{ + filters: []filter{ + newEmptyFilterStream(), + q.f, + }, + } + q.f = fa + } + + hasStreamFilters := false + for _, f := range fa.filters { + if _, ok := f.(*filterStream); ok { + hasStreamFilters = true + break + } + } + if !hasStreamFilters { + var dst []filter + dst = append(dst, newEmptyFilterStream()) + fa.filters = append(dst, fa.filters...) + } + + for _, f := range fa.filters { + if fs, ok := f.(*filterStream); ok { + addExtraStreamFilters(fs, filters) + } + } +} + +func newEmptyFilterStream() *filterStream { + return &filterStream{ + f: &StreamFilter{}, + } +} + +func addExtraStreamFilters(fs *filterStream, filters []Field) { + f := fs.f + if len(f.orFilters) == 0 { + f.orFilters = []*andStreamFilter{ + { + tagFilters: appendExtraStreamFilters(nil, filters), + }, + } + return + } + for _, af := range f.orFilters { + af.tagFilters = appendExtraStreamFilters(af.tagFilters, filters) + } +} + +func appendExtraStreamFilters(orig []*streamTagFilter, filters []Field) []*streamTagFilter { + var dst []*streamTagFilter + for _, f := range filters { + dst = append(dst, &streamTagFilter{ + tagName: f.Name, + op: "=", + value: f.Value, + }) + } + return append(dst, orig...) +} + +// AddExtraFilters adds filters to q in the form of `f1.Name:=f1.Value AND ... fN.Name:=fN.Value` +func (q *Query) AddExtraFilters(filters []Field) { + if len(filters) == 0 { + return + } + + fa, ok := q.f.(*filterAnd) + if !ok { + fa = &filterAnd{ + filters: []filter{q.f}, + } + q.f = fa + } + fa.filters = addExtraFilters(fa.filters, filters) +} + +func addExtraFilters(orig []filter, filters []Field) []filter { + var dst []filter + for _, f := range filters { + dst = append(dst, &filterExact{ + fieldName: f.Name, + value: f.Value, + }) + } + return append(dst, orig...) +} + // AddPipeLimit adds `| limit n` pipe to q. // // See https://docs.victoriametrics.com/victorialogs/logsql/#limit-pipe diff --git a/lib/logstorage/parser_test.go b/lib/logstorage/parser_test.go index ee3bc7652..9c9e18e2b 100644 --- a/lib/logstorage/parser_test.go +++ b/lib/logstorage/parser_test.go @@ -2409,3 +2409,142 @@ func TestHasTimeFilter(t *testing.T) { f(`error AND (_time: 5m AND warn) | count()`, true) f(`* | error AND _time:5m | count()`, true) } + +func TestAddExtraFilters(t *testing.T) { + f := func(qStr string, extraFilters []Field, resultExpected string) { + t.Helper() + + q, err := ParseQuery(qStr) + if err != nil { + t.Fatalf("unexpected error in ParseQuery: %s", err) + } + q.AddExtraFilters(extraFilters) + + result := q.String() + if result != resultExpected { + t.Fatalf("unexpected result;\ngot\n%s\nwant\n%s", result, resultExpected) + } + } + + f(`*`, nil, `*`) + f(`_time:5m`, nil, `_time:5m`) + f(`foo _time:5m`, nil, `foo _time:5m`) + + f(`*`, []Field{ + { + Name: "foo", + Value: "bar", + }, + }, "foo:=bar *") + + f("_time:5m", []Field{ + { + Name: "fo o", + Value: "=ba:r !", + }, + }, `"fo o":="=ba:r !" _time:5m`) + + f("_time:5m {a=b}", []Field{ + { + Name: "fo o", + Value: "=ba:r !", + }, + { + Name: "x", + Value: "y", + }, + }, `"fo o":="=ba:r !" x:=y _time:5m {a="b"}`) + + f(`a or (b c)`, []Field{ + { + Name: "foo", + Value: "bar", + }, + }, `foo:=bar (a or b c)`) +} + +func TestAddExtraStreamFilters(t *testing.T) { + f := func(qStr string, extraFilters []Field, resultExpected string) { + t.Helper() + + q, err := ParseQuery(qStr) + if err != nil { + t.Fatalf("unexpected error in ParseQuery: %s", err) + } + q.AddExtraStreamFilters(extraFilters) + + result := q.String() + if result != resultExpected { + t.Fatalf("unexpected result;\ngot\n%s\nwant\n%s", result, resultExpected) + } + } + + f(`*`, nil, `*`) + f(`_time:5m`, nil, `_time:5m`) + f(`foo _time:5m`, nil, `foo _time:5m`) + + f(`*`, []Field{ + { + Name: "foo", + Value: "bar", + }, + }, `{foo="bar"} *`) + + f(`_time:5m`, []Field{ + { + Name: "fo o=", + Value: `"bar}`, + }, + }, `{"fo o="="\"bar}"} _time:5m`) + + f(`a b`, []Field{ + { + Name: "foo", + Value: "bar", + }, + }, `{foo="bar"} a b`) + + f(`a or b {c="d"}`, []Field{ + { + Name: "foo", + Value: "bar", + }, + { + Name: "x", + Value: "y", + }, + }, `{foo="bar",x="y"} (a or b {c="d"})`) + + f(`{c=~"d|e"}`, []Field{ + { + Name: "foo", + Value: "bar", + }, + { + Name: "x", + Value: "y", + }, + }, `{foo="bar",x="y",c=~"d|e"}`) + + f(`a:b {c=~"d|e"}`, []Field{ + { + Name: "foo", + Value: "bar", + }, + { + Name: "x", + Value: "y", + }, + }, `a:b {foo="bar",x="y",c=~"d|e"}`) + + f(`a:b {c=~"d|e"} {q!="w"} asdf`, []Field{ + { + Name: "foo", + Value: "bar", + }, + { + Name: "x", + Value: "y", + }, + }, `a:b {foo="bar",x="y",c=~"d|e"} {foo="bar",x="y",q!="w"} asdf`) +} diff --git a/lib/logstorage/stream_filter.go b/lib/logstorage/stream_filter.go index e2efe6d4c..602d8509c 100644 --- a/lib/logstorage/stream_filter.go +++ b/lib/logstorage/stream_filter.go @@ -93,6 +93,7 @@ type streamTagFilter struct { // value is the value value string + // regexp is initialized for `=~` and `!~` op. regexp *regexutil.PromRegex } From f62502a9432dd8eb2b32ad9f0fc248633edc8abf Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 30 Oct 2024 19:08:49 +0100 Subject: [PATCH 63/90] docs/VictoriaLogs/querying/README.md: typo fix after f2cd284cf4a7429848fb4be1522483a9b93a43e7: Alls -> All --- docs/VictoriaLogs/querying/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/VictoriaLogs/querying/README.md b/docs/VictoriaLogs/querying/README.md index b177275d8..089644cb6 100644 --- a/docs/VictoriaLogs/querying/README.md +++ b/docs/VictoriaLogs/querying/README.md @@ -795,7 +795,7 @@ See also: ## Extra filters -Alls the [HTTP querying APIs](#http-api) provided by VictoriaLogs support the following optional query args: +All the [HTTP querying APIs](#http-api) provided by VictoriaLogs support the following optional query args: - `extra_filters` - this arg may contain extra [`field:=value`](https://docs.victoriametrics.com/victorialogs/logsql/#exact-filter) filters, which must be applied to the `query` before returning the results. From 6a6d08d03dff96d35ba10e5014dad9559852f790 Mon Sep 17 00:00:00 2001 From: Dmytro Kozlov Date: Wed, 30 Oct 2024 22:18:38 +0100 Subject: [PATCH 64/90] deployment/docker: update datasource versions to the latest releases (#7396) ### Describe Your Changes Updated the versions of the data sources to the latest releases ### Checklist The following checks are **mandatory**: - [x] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --- deployment/docker/docker-compose-victorialogs.yml | 2 +- deployment/docker/vm-datasource/docker-compose-cluster.yml | 2 +- deployment/docker/vm-datasource/docker-compose.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deployment/docker/docker-compose-victorialogs.yml b/deployment/docker/docker-compose-victorialogs.yml index c9027657c..2e2ed259e 100644 --- a/deployment/docker/docker-compose-victorialogs.yml +++ b/deployment/docker/docker-compose-victorialogs.yml @@ -16,7 +16,7 @@ services: - ./../../dashboards/victoriametrics.json:/var/lib/grafana/dashboards/vm.json - ./../../dashboards/victorialogs.json:/var/lib/grafana/dashboards/vl.json environment: - - "GF_INSTALL_PLUGINS=https://github.com/VictoriaMetrics/victorialogs-datasource/releases/download/v0.5.0/victorialogs-datasource-v0.5.0.zip;victorialogs-datasource" + - "GF_INSTALL_PLUGINS=https://github.com/VictoriaMetrics/victorialogs-datasource/releases/download/v0.6.2/victorialogs-datasource-v0.6.2.zip;victorialogs-datasource" - "GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=victorialogs-datasource" networks: - vm_net diff --git a/deployment/docker/vm-datasource/docker-compose-cluster.yml b/deployment/docker/vm-datasource/docker-compose-cluster.yml index a09901a46..4c216be48 100644 --- a/deployment/docker/vm-datasource/docker-compose-cluster.yml +++ b/deployment/docker/vm-datasource/docker-compose-cluster.yml @@ -16,6 +16,6 @@ services: - ./../../dashboards/vm/vmalert.json:/var/lib/grafana/dashboards/vmalert.json - ./../../dashboards/vm/vmauth.json:/var/lib/grafana/dashboards/vmauth.json environment: - - "GF_INSTALL_PLUGINS=https://github.com/VictoriaMetrics/victoriametrics-datasource/releases/download/v0.9.1/victoriametrics-datasource-v0.9.1.zip;victoriametrics-datasource" + - "GF_INSTALL_PLUGINS=https://github.com/VictoriaMetrics/victoriametrics-datasource/releases/download/v0.10.1/victoriametrics-datasource-v0.10.1.zip;victoriametrics-datasource" - "GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=victoriametrics-datasource" restart: always diff --git a/deployment/docker/vm-datasource/docker-compose.yml b/deployment/docker/vm-datasource/docker-compose.yml index cb7f35054..6a77baf86 100644 --- a/deployment/docker/vm-datasource/docker-compose.yml +++ b/deployment/docker/vm-datasource/docker-compose.yml @@ -15,7 +15,7 @@ services: - ./../../dashboards/vm/vmagent.json:/var/lib/grafana/dashboards/vmagent.json - ./../../dashboards/vm/vmalert.json:/var/lib/grafana/dashboards/vmalert.json environment: - - "GF_INSTALL_PLUGINS=https://github.com/VictoriaMetrics/victoriametrics-datasource/releases/download/v0.9.1/victoriametrics-datasource-v0.9.1.zip;victoriametrics-datasource" + - "GF_INSTALL_PLUGINS=https://github.com/VictoriaMetrics/victoriametrics-datasource/releases/download/v0.10.1/victoriametrics-datasource-v0.10.1.zip;victoriametrics-datasource" - "GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=victoriametrics-datasource" networks: - vm_net From 2e635a42d886fbd60d53ecfe69e43a233515bc5b Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 30 Oct 2024 22:14:18 +0100 Subject: [PATCH 65/90] lib/logstorage: properly cache replace() and replace_regexp() results for identical adjacent field values Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7162 --- docs/VictoriaLogs/CHANGELOG.md | 2 ++ lib/logstorage/pipe_replace_regexp_test.go | 12 ++++++++++++ lib/logstorage/pipe_replace_test.go | 12 ++++++++++++ lib/logstorage/pipe_update.go | 7 +++++-- 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 106cea8c0..7aed28ee1 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -17,6 +17,8 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta * FEATURE: add support for extra filters across all the [HTTP querying APIs](https://docs.victoriametrics.com/victorialogs/querying/#http-api). See [these docs](https://docs.victoriametrics.com/victorialogs/querying/#extra-filters) for details. This is needed for implementing quick filtering on field values at [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7365). +* BUGFIX: properly apply [`replace`](https://docs.victoriametrics.com/victorialogs/logsql/#replace-pipe) and [`replace_regexp`](https://docs.victoriametrics.com/victorialogs/logsql/#replace_regexp-pipe) pipes to identical values in adjacent log entries. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7162). + ## [v0.39.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.39.0-victorialogs) Released at 2024-10-30 diff --git a/lib/logstorage/pipe_replace_regexp_test.go b/lib/logstorage/pipe_replace_regexp_test.go index 81e0230d3..f40fd43d5 100644 --- a/lib/logstorage/pipe_replace_regexp_test.go +++ b/lib/logstorage/pipe_replace_regexp_test.go @@ -70,6 +70,12 @@ func TestPipeReplaceRegexp(t *testing.T) { {"_msg", `a_bc_d/ef`}, {"bar", `cde`}, }, + { + {"_msg", `a_bc_d/ef`}, + }, + { + {"_msg", `1234`}, + }, { {"_msg", `1234`}, }, @@ -78,6 +84,12 @@ func TestPipeReplaceRegexp(t *testing.T) { {"_msg", `a-bc-d-ef`}, {"bar", `cde`}, }, + { + {"_msg", `a-bc-d-ef`}, + }, + { + {"_msg", `1234`}, + }, { {"_msg", `1234`}, }, diff --git a/lib/logstorage/pipe_replace_test.go b/lib/logstorage/pipe_replace_test.go index 2663790e1..cbec9e9ca 100644 --- a/lib/logstorage/pipe_replace_test.go +++ b/lib/logstorage/pipe_replace_test.go @@ -48,6 +48,12 @@ func TestPipeReplace(t *testing.T) { {"_msg", `a_bc_def`}, {"bar", `cde`}, }, + { + {"_msg", `a_bc_def`}, + }, + { + {"_msg", `1234`}, + }, { {"_msg", `1234`}, }, @@ -56,6 +62,12 @@ func TestPipeReplace(t *testing.T) { {"_msg", `a-bc-def`}, {"bar", `cde`}, }, + { + {"_msg", `a-bc-def`}, + }, + { + {"_msg", `1234`}, + }, { {"_msg", `1234`}, }, diff --git a/lib/logstorage/pipe_update.go b/lib/logstorage/pipe_update.go index 15fc02415..3ff41e14f 100644 --- a/lib/logstorage/pipe_update.go +++ b/lib/logstorage/pipe_update.go @@ -86,16 +86,19 @@ func (pup *pipeUpdateProcessor) writeBlock(workerID uint, br *blockResult) { hadUpdates := false vPrev := "" + vNew := "" for rowIdx, v := range values { if bm.isSetBit(rowIdx) { if !hadUpdates || vPrev != v { vPrev = v hadUpdates = true - v = pup.updateFunc(&shard.a, v) + vNew = pup.updateFunc(&shard.a, v) } + shard.rc.addValue(vNew) + } else { + shard.rc.addValue(v) } - shard.rc.addValue(v) } br.addResultColumn(&shard.rc) From c5d08d317c72894429bbf5b073c7c4bb98f4442b Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 30 Oct 2024 22:29:28 +0100 Subject: [PATCH 66/90] lib/logstorage: properly reset cached output fields for extract and extract_regexp pipes after the log entry matches if(...) condition Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7162 --- docs/VictoriaLogs/CHANGELOG.md | 1 + lib/logstorage/pipe_extract.go | 7 ++++--- lib/logstorage/pipe_extract_regexp.go | 7 ++++--- lib/logstorage/pipe_extract_test.go | 8 ++++++++ lib/logstorage/pipe_update.go | 6 +++--- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 7aed28ee1..21e7354c7 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -18,6 +18,7 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta * FEATURE: add support for extra filters across all the [HTTP querying APIs](https://docs.victoriametrics.com/victorialogs/querying/#http-api). See [these docs](https://docs.victoriametrics.com/victorialogs/querying/#extra-filters) for details. This is needed for implementing quick filtering on field values at [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7365). * BUGFIX: properly apply [`replace`](https://docs.victoriametrics.com/victorialogs/logsql/#replace-pipe) and [`replace_regexp`](https://docs.victoriametrics.com/victorialogs/logsql/#replace_regexp-pipe) pipes to identical values in adjacent log entries. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7162). +* BUGFIX: properly apply [`extract`](https://docs.victoriametrics.com/victorialogs/logsql/#extract-pipe) and [`extract_regexp`](https://docs.victoriametrics.com/victorialogs/logsql/#extract_regexp-pipe) pipe with additional `if (...)` filter (aka [conditional extract](https://docs.victoriametrics.com/victorialogs/logsql/#conditional-extract) and [conditional extract_regexp](https://docs.victoriametrics.com/victorialogs/logsql/#conditional-extract_regexp)). ## [v0.39.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.39.0-victorialogs) diff --git a/lib/logstorage/pipe_extract.go b/lib/logstorage/pipe_extract.go index 89f518e31..ec89b15f7 100644 --- a/lib/logstorage/pipe_extract.go +++ b/lib/logstorage/pipe_extract.go @@ -192,13 +192,13 @@ func (pep *pipeExtractProcessor) writeBlock(workerID uint, br *blockResult) { shard.resultValues = slicesutil.SetLength(shard.resultValues, len(rcs)) resultValues := shard.resultValues - hadUpdates := false + needUpdates := true vPrev := "" for rowIdx, v := range values { if bm.isSetBit(rowIdx) { - if !hadUpdates || vPrev != v { + if needUpdates || vPrev != v { vPrev = v - hadUpdates = true + needUpdates = false ptn.apply(v) @@ -219,6 +219,7 @@ func (pep *pipeExtractProcessor) writeBlock(workerID uint, br *blockResult) { for i, c := range resultColumns { resultValues[i] = c.getValueAtRow(br, rowIdx) } + needUpdates = true } for i, v := range resultValues { diff --git a/lib/logstorage/pipe_extract_regexp.go b/lib/logstorage/pipe_extract_regexp.go index 3ce6ee503..2f40d36ad 100644 --- a/lib/logstorage/pipe_extract_regexp.go +++ b/lib/logstorage/pipe_extract_regexp.go @@ -215,13 +215,13 @@ func (pep *pipeExtractRegexpProcessor) writeBlock(workerID uint, br *blockResult shard.resultValues = slicesutil.SetLength(shard.resultValues, len(rcs)) resultValues := shard.resultValues - hadUpdates := false + needUpdates := true vPrev := "" for rowIdx, v := range values { if bm.isSetBit(rowIdx) { - if !hadUpdates || vPrev != v { + if needUpdates || vPrev != v { vPrev = v - hadUpdates = true + needUpdates = false shard.apply(pe.re, v) @@ -246,6 +246,7 @@ func (pep *pipeExtractRegexpProcessor) writeBlock(workerID uint, br *blockResult resultValues[i] = c.getValueAtRow(br, rowIdx) } } + needUpdates = true } for i, v := range resultValues { diff --git a/lib/logstorage/pipe_extract_test.go b/lib/logstorage/pipe_extract_test.go index 740420513..12af5971b 100644 --- a/lib/logstorage/pipe_extract_test.go +++ b/lib/logstorage/pipe_extract_test.go @@ -211,12 +211,20 @@ func TestPipeExtract(t *testing.T) { {"x", `a foo=cc baz=aa b`}, {"bar", "abc"}, }, + { + {"x", `a foo=cc baz=aa b`}, + }, }, [][]Field{ { {"x", `a foo=cc baz=aa b`}, {"bar", `cc`}, {"xx", `aa b`}, }, + { + {"x", `a foo=cc baz=aa b`}, + {"bar", `cc`}, + {"xx", `aa b`}, + }, }) // single row, if mismatch diff --git a/lib/logstorage/pipe_update.go b/lib/logstorage/pipe_update.go index 3ff41e14f..151c302bf 100644 --- a/lib/logstorage/pipe_update.go +++ b/lib/logstorage/pipe_update.go @@ -84,14 +84,14 @@ func (pup *pipeUpdateProcessor) writeBlock(workerID uint, br *blockResult) { c := br.getColumnByName(pup.field) values := c.getValues(br) - hadUpdates := false + needUpdates := true vPrev := "" vNew := "" for rowIdx, v := range values { if bm.isSetBit(rowIdx) { - if !hadUpdates || vPrev != v { + if needUpdates || vPrev != v { vPrev = v - hadUpdates = true + needUpdates = false vNew = pup.updateFunc(&shard.a, v) } From 0f6b9e94905d773fccc41cb7e19baabbdc6c927d Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 30 Oct 2024 23:20:31 +0100 Subject: [PATCH 67/90] docs/VictoriaLogs/README.md: recommend installing Grafana dashboard for VictoriaLogs at `Monitoring` chapter Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6886 --- docs/VictoriaLogs/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/VictoriaLogs/README.md b/docs/VictoriaLogs/README.md index 1b0dbf2c8..ecc41fc29 100644 --- a/docs/VictoriaLogs/README.md +++ b/docs/VictoriaLogs/README.md @@ -52,6 +52,8 @@ It is recommended to set up monitoring of these metrics via VictoriaMetrics (see [these docs](https://docs.victoriametrics.com/#how-to-scrape-prometheus-exporters-such-as-node-exporter)), vmagent (see [these docs](https://docs.victoriametrics.com/vmagent/#how-to-collect-metrics-in-prometheus-format)) or via Prometheus. +We recommend installing [Grafana dashboard for VictoriaLogs](https://grafana.com/grafana/dashboards/22084-victorialogs/). + We recommend setting up [alerts](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vlogs.yml) via [vmalert](https://docs.victoriametrics.com/vmalert/) or via Prometheus. From f88e2ae9fb77febc789236d7a20356599c178057 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 30 Oct 2024 23:23:20 +0100 Subject: [PATCH 68/90] docs/VictoriaLogs/README.md: follow-up for 0f6b9e94905d773fccc41cb7e19baabbdc6c927d: consistently use canonical url for Grafana dashboards See also 0a5ffb3bc1cf117091baacaddc55f1134e2c9dfc --- .github/ISSUE_TEMPLATE/bug_report.yml | 4 ++-- docs/VictoriaLogs/README.md | 2 +- docs/changelog/CHANGELOG.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 7e7e5c91e..297c3f82e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -60,8 +60,8 @@ body: For VictoriaMetrics health-state issues please provide full-length screenshots of Grafana dashboards if possible: - * [Grafana dashboard for single-node VictoriaMetrics](https://grafana.com/grafana/dashboards/10229/) - * [Grafana dashboard for VictoriaMetrics cluster](https://grafana.com/grafana/dashboards/11176/) + * [Grafana dashboard for single-node VictoriaMetrics](https://grafana.com/grafana/dashboards/10229) + * [Grafana dashboard for VictoriaMetrics cluster](https://grafana.com/grafana/dashboards/11176) See how to setup monitoring here: * [monitoring for single-node VictoriaMetrics](https://docs.victoriametrics.com/#monitoring) diff --git a/docs/VictoriaLogs/README.md b/docs/VictoriaLogs/README.md index ecc41fc29..a48cd2766 100644 --- a/docs/VictoriaLogs/README.md +++ b/docs/VictoriaLogs/README.md @@ -52,7 +52,7 @@ It is recommended to set up monitoring of these metrics via VictoriaMetrics (see [these docs](https://docs.victoriametrics.com/#how-to-scrape-prometheus-exporters-such-as-node-exporter)), vmagent (see [these docs](https://docs.victoriametrics.com/vmagent/#how-to-collect-metrics-in-prometheus-format)) or via Prometheus. -We recommend installing [Grafana dashboard for VictoriaLogs](https://grafana.com/grafana/dashboards/22084-victorialogs/). +We recommend installing [Grafana dashboard for VictoriaLogs](https://grafana.com/grafana/dashboards/22084). We recommend setting up [alerts](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vlogs.yml) via [vmalert](https://docs.victoriametrics.com/vmalert/) or via Prometheus. diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 551f983db..3e1bcfded 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -81,7 +81,7 @@ Released at 2024-10-02 * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add link to vmalert when proxy is enabled. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5924). * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): keep selected columns in table view on page reloads. Before, selected columns were reset on each update. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7016). * FEATURE: [dashboards](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards) for VM single-node, cluster, vmalert, vmagent, VictoriaLogs: add `Go scheduling latency` panel to show the 99th quantile of Go goroutines scheduling. This panel should help identifying insufficient CPU resources for the service. It is especially useful if CPU gets throttled, which now should be visible on this panel. -* FEATURE: [dashboards](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards): update [dashboard for VictoriaMetrics k8s operator](https://grafana.com/grafana/dashboards/17869-victoriametrics-operator/): replace deprecated TimeSeries panels, add latency panels for rest client and Golang scheduler, add overview panels. The dashboard is now also available for [VictoriaMetrics Grafana datasource](https://github.com/VictoriaMetrics/victoriametrics-datasource). +* FEATURE: [dashboards](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards): update [dashboard for VictoriaMetrics k8s operator](https://grafana.com/grafana/dashboards/17869): replace deprecated TimeSeries panels, add latency panels for rest client and Golang scheduler, add overview panels. The dashboard is now also available for [VictoriaMetrics Grafana datasource](https://github.com/VictoriaMetrics/victoriametrics-datasource). * FEATURE: [alerts](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-health.yml): add alerting rule to track the Go scheduling latency for goroutines. It should notify users if VM component doesn't have enough CPU to run or gets throttled. * BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent/) fix service discovery of Azure Virtual Machines for response contains `nextLink` in `Host:Port` format. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6912). From 1a7b55009b82fd4b9a4e2f45d99310d29c29778e Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 30 Oct 2024 23:38:06 +0100 Subject: [PATCH 69/90] docs/VictoriaLogs/CHANGELOG.md: cut v0.40.0-victorialogs release --- docs/VictoriaLogs/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 21e7354c7..5c3119782 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -15,6 +15,10 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta ## tip +## [v0.40.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.40.0-victorialogs) + +Released at 2024-10-31 + * FEATURE: add support for extra filters across all the [HTTP querying APIs](https://docs.victoriametrics.com/victorialogs/querying/#http-api). See [these docs](https://docs.victoriametrics.com/victorialogs/querying/#extra-filters) for details. This is needed for implementing quick filtering on field values at [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7365). * BUGFIX: properly apply [`replace`](https://docs.victoriametrics.com/victorialogs/logsql/#replace-pipe) and [`replace_regexp`](https://docs.victoriametrics.com/victorialogs/logsql/#replace_regexp-pipe) pipes to identical values in adjacent log entries. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7162). From 24b6e117dd857044725600a8933c9169d5ff061f Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 30 Oct 2024 23:43:08 +0100 Subject: [PATCH 70/90] deployment/docker: update VictoriaLogs from v0.39.0-victorialogs to v0.40.0-victorialogs See https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.40.0-victorialogs --- deployment/docker/docker-compose-victorialogs.yml | 2 +- deployment/docker/victorialogs/compose-base.yml | 2 +- deployment/logs-benchmark/docker-compose.yml | 2 +- docs/VictoriaLogs/QuickStart.md | 6 +++--- docs/VictoriaLogs/querying/vlogscli.md | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/deployment/docker/docker-compose-victorialogs.yml b/deployment/docker/docker-compose-victorialogs.yml index 2e2ed259e..48a5c2add 100644 --- a/deployment/docker/docker-compose-victorialogs.yml +++ b/deployment/docker/docker-compose-victorialogs.yml @@ -40,7 +40,7 @@ services: # storing logs and serving read queries. victorialogs: container_name: victorialogs - image: victoriametrics/victoria-logs:v0.39.0-victorialogs + image: victoriametrics/victoria-logs:v0.40.0-victorialogs command: - "--storageDataPath=/vlogs" - "--httpListenAddr=:9428" diff --git a/deployment/docker/victorialogs/compose-base.yml b/deployment/docker/victorialogs/compose-base.yml index 936d52112..68c7ecff3 100644 --- a/deployment/docker/victorialogs/compose-base.yml +++ b/deployment/docker/victorialogs/compose-base.yml @@ -1,7 +1,7 @@ services: # meta service will be ignored by compose .victorialogs: - image: docker.io/victoriametrics/victoria-logs:v0.39.0-victorialogs + image: docker.io/victoriametrics/victoria-logs:v0.40.0-victorialogs command: - -storageDataPath=/vlogs - -loggerFormat=json diff --git a/deployment/logs-benchmark/docker-compose.yml b/deployment/logs-benchmark/docker-compose.yml index d268196bf..4a4f49d56 100644 --- a/deployment/logs-benchmark/docker-compose.yml +++ b/deployment/logs-benchmark/docker-compose.yml @@ -3,7 +3,7 @@ version: "3" services: # Run `make package-victoria-logs` to build victoria-logs image vlogs: - image: docker.io/victoriametrics/victoria-logs:v0.39.0-victorialogs + image: docker.io/victoriametrics/victoria-logs:v0.40.0-victorialogs volumes: - vlogs:/vlogs ports: diff --git a/docs/VictoriaLogs/QuickStart.md b/docs/VictoriaLogs/QuickStart.md index eab4caf47..9ccbabe1d 100644 --- a/docs/VictoriaLogs/QuickStart.md +++ b/docs/VictoriaLogs/QuickStart.md @@ -33,8 +33,8 @@ Just download archive for the needed Operating system and architecture, unpack i For example, the following commands download VictoriaLogs archive for Linux/amd64, unpack and run it: ```sh -curl -L -O https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v0.39.0-victorialogs/victoria-logs-linux-amd64-v0.39.0-victorialogs.tar.gz -tar xzf victoria-logs-linux-amd64-v0.39.0-victorialogs.tar.gz +curl -L -O https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v0.40.0-victorialogs/victoria-logs-linux-amd64-v0.40.0-victorialogs.tar.gz +tar xzf victoria-logs-linux-amd64-v0.40.0-victorialogs.tar.gz ./victoria-logs-prod ``` @@ -58,7 +58,7 @@ Here is the command to run VictoriaLogs in a Docker container: ```sh docker run --rm -it -p 9428:9428 -v ./victoria-logs-data:/victoria-logs-data \ - docker.io/victoriametrics/victoria-logs:v0.39.0-victorialogs + docker.io/victoriametrics/victoria-logs:v0.40.0-victorialogs ``` See also: diff --git a/docs/VictoriaLogs/querying/vlogscli.md b/docs/VictoriaLogs/querying/vlogscli.md index 43b7bb4d3..46b50d514 100644 --- a/docs/VictoriaLogs/querying/vlogscli.md +++ b/docs/VictoriaLogs/querying/vlogscli.md @@ -23,15 +23,15 @@ or from [docker images](https://hub.docker.com/r/victoriametrics/vlogscli/tags): ### Running `vlogscli` from release binary ```sh -curl -L -O https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v0.39.0-victorialogs/vlogscli-linux-amd64-v0.39.0-victorialogs.tar.gz -tar xzf vlogscli-linux-amd64-v0.39.0-victorialogs.tar.gz +curl -L -O https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v0.40.0-victorialogs/vlogscli-linux-amd64-v0.40.0-victorialogs.tar.gz +tar xzf vlogscli-linux-amd64-v0.40.0-victorialogs.tar.gz ./vlogscli-prod ``` ### Running `vlogscli` from Docker image ```sh -docker run --rm -it docker.io/victoriametrics/vlogscli:v0.39.0-victorialogs +docker run --rm -it docker.io/victoriametrics/vlogscli:v0.40.0-victorialogs ``` ## Configuration From bfb55d5f2f47dd3af199e33cf6180ca6680a8af4 Mon Sep 17 00:00:00 2001 From: Yury Molodov Date: Thu, 31 Oct 2024 13:43:58 +0100 Subject: [PATCH 71/90] vmui: fix the display of the link to vmalert (#7380) ### Describe Your Changes Fix the issue mentioned in https://github.com/VictoriaMetrics/VictoriaMetrics/pull/7088#issuecomment-2391360368 ### Checklist The following checks are **mandatory**: - [ ] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --- app/vmui/packages/vmui/src/hooks/useFetchFlags.ts | 3 +-- app/vmui/packages/vmui/src/router/navigation.ts | 7 +++++-- docs/changelog/CHANGELOG.md | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/vmui/packages/vmui/src/hooks/useFetchFlags.ts b/app/vmui/packages/vmui/src/hooks/useFetchFlags.ts index 7c695323a..25162157c 100644 --- a/app/vmui/packages/vmui/src/hooks/useFetchFlags.ts +++ b/app/vmui/packages/vmui/src/hooks/useFetchFlags.ts @@ -1,7 +1,6 @@ import { useAppDispatch, useAppState } from "../state/common/StateContext"; import { useEffect, useState } from "preact/compat"; import { ErrorTypes } from "../types"; -import { getUrlWithoutTenant } from "../utils/tenants"; const useFetchFlags = () => { const { serverUrl } = useAppState(); @@ -17,7 +16,7 @@ const useFetchFlags = () => { setIsLoading(true); try { - const url = getUrlWithoutTenant(serverUrl); + const url = new URL(serverUrl).origin; const response = await fetch(`${url}/flags`); const data = await response.text(); const flags = data.split("\n").filter(flag => flag.trim() !== "") diff --git a/app/vmui/packages/vmui/src/router/navigation.ts b/app/vmui/packages/vmui/src/router/navigation.ts index bf96205fe..54ab01398 100644 --- a/app/vmui/packages/vmui/src/router/navigation.ts +++ b/app/vmui/packages/vmui/src/router/navigation.ts @@ -1,4 +1,5 @@ import router, { routerOptions } from "./index"; +import { getTenantIdFromUrl } from "../utils/tenants"; export enum NavigationItemType { internalLink, @@ -24,10 +25,12 @@ interface NavigationConfig { * Special case for alert link */ const getAlertLink = (url: string, showAlertLink: boolean) => { - // see more https://docs.victoriametrics.com/cluster-victoriametrics/?highlight=vmalertproxyurl#vmalert + // see more https://docs.victoriametrics.com/cluster-victoriametrics/#vmalert + const isCluster = !!getTenantIdFromUrl(url); + const value = isCluster ? `${url}/vmalert` : url.replace(/\/prometheus$/, "/vmalert"); return { label: "Alerts", - value: `${url}/vmalert`, + value, type: NavigationItemType.externalLink, hide: !showAlertLink, }; diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 3e1bcfded..4f1e4f095 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -28,6 +28,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert): properly set `group_name` and `file` fields for recording rules in `/api/v1/rules`. * BUGFIX: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): prevent panic when ingesting samples which are outisde of configured [retention filters](https://docs.victoriametrics.com/#retention-filters). This could happen when backfilling data with retention filters which exclude samples from the backfill range. * BUGFIX: [vmctl](https://docs.victoriametrics.com/vmctl/): fix issue with series matching for `vmctl vm-native` with `--vm-native-disable-per-metric-migration` flag enabled. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7309). +* BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): fix the display of the link to vmalert. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5924). ## [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0) From 3f0e2ab3b2128b9a5909ee9efca9775146063623 Mon Sep 17 00:00:00 2001 From: Roman Khavronenko Date: Thu, 31 Oct 2024 14:03:08 +0100 Subject: [PATCH 72/90] deployment/alerts: add RemoteWriteDroppingData to vmalert rules (#7393) ### Describe Your Changes Please provide a brief description of the changes you made. Be as specific as possible to help others understand the purpose and impact of your modifications. ### Checklist The following checks are **mandatory**: - [ ] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --------- Signed-off-by: hagen1778 --- deployment/docker/rules/alerts-vmalert.yml | 11 +++++++++++ docs/changelog/CHANGELOG.md | 1 + 2 files changed, 12 insertions(+) diff --git a/deployment/docker/rules/alerts-vmalert.yml b/deployment/docker/rules/alerts-vmalert.yml index 07d58fa8f..182e64337 100644 --- a/deployment/docker/rules/alerts-vmalert.yml +++ b/deployment/docker/rules/alerts-vmalert.yml @@ -74,6 +74,17 @@ groups: description: "vmalert instance {{ $labels.instance }} is failing to push metrics generated via alerting or recording rules to the configured remote write URL. Check vmalert's logs for detailed error message." + - alert: RemoteWriteDroppingData + expr: increase(vmalert_remotewrite_dropped_rows_total[5m]) > 0 + for: 5m + labels: + severity: critical + annotations: + summary: "vmalert instance {{ $labels.instance }} is dropping data sent to remote write URL" + description: "vmalert instance {{ $labels.instance }} is failing to send results of alerting or recording rules + to the configured remote write URL. This may result into gaps in recording rules or alerts state. + Check vmalert's logs for detailed error message." + - alert: AlertmanagerErrors expr: increase(vmalert_alerts_send_errors_total[5m]) > 0 for: 15m diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 4f1e4f095..59eae084d 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -23,6 +23,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent/): support scraping from Kubernetes Native Sidecars. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7287). * FEATURE: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): add a separate cache type for storing sparse entries when performing large index scans. This significantly reduces memory usage when applying [downsampling filters](https://docs.victoriametrics.com/#downsampling) and [retention filters](https://docs.victoriametrics.com/#retention-filters) during background merge. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7182) for the details. * FEATURE: [dashboards](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards) for VM single-node, cluster, vmalert, vmagent, VictoriaLogs: add `Restarts` panel to show the events of process restarts. This panel should help correlate events of restart with unexpected behavior of processes. +* FEATURE: [alerts](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmalert.yml): add alerting rule `RemoteWriteDroppingData` to track number of dropped samples that weren't sent to remote write URL. * BUGFIX: [dashboards](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards) for Single-node VictoriaMetrics, cluster: The free disk space calculation now will subtract the size of the `-storage.minFreeDiskSpaceBytes` flag to correctly display the remaining available space of Single-node VictoriaMetrics/vmstorage rather than the actual available disk space, as well as the full ETA. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7334) for the details. * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert): properly set `group_name` and `file` fields for recording rules in `/api/v1/rules`. From 21d1385ae1be7a0f4707840b23619654e210141e Mon Sep 17 00:00:00 2001 From: Viet Hung Nguyen Date: Thu, 31 Oct 2024 22:04:50 +0900 Subject: [PATCH 73/90] vmalert-tool: set default interval for unittest input_series (#7392) ### Describe Your Changes Currently it is not optional option, but if user forgot to set, it defaults to 0, which cause unexpected behavior. This change sets default = evaluation_interval similar to promtool behavior. https://prometheus.io/docs/prometheus/2.55/configuration/unit_testing_rules/#test_group ### Checklist The following checks are **mandatory**: - [x] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). Signed-off-by: Viet Hung Nguyen --- app/vmalert-tool/unittest/unittest.go | 3 +++ docs/vmalert-tool.md | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/vmalert-tool/unittest/unittest.go b/app/vmalert-tool/unittest/unittest.go index 64fd0a9cc..17b9b8cc7 100644 --- a/app/vmalert-tool/unittest/unittest.go +++ b/app/vmalert-tool/unittest/unittest.go @@ -270,6 +270,9 @@ func (tg *testGroup) test(evalInterval time.Duration, groupOrderMap map[string]i // tear down vmstorage and clean the data dir defer tearDown() + if tg.Interval == nil { + tg.Interval = promutils.NewDuration(evalInterval) + } err := writeInputSeries(tg.InputSeries, tg.Interval, testStartTime, testPromWriteHTTPPath) if err != nil { return []error{err} diff --git a/docs/vmalert-tool.md b/docs/vmalert-tool.md index 7f41ea931..24dc55827 100644 --- a/docs/vmalert-tool.md +++ b/docs/vmalert-tool.md @@ -40,7 +40,7 @@ which aren't always backward compatible with [PromQL](https://prometheus.io/docs >by default, rules execution is sequential within one group, but persistence of execution results to remote storage is asynchronous. Hence, user shouldn’t rely on chaining of recording rules when result of previous recording rule is reused in the next one; For example, you have recording rule A and alerting rule B in the same group, and rule B's expression is based on A's results. -Rule B won't get the latest data of A, since data didn't persist to remote storage yet. +Rule B won't get the latest data of A, since data didn't persist to remote storage yet. The workaround is to divide them in two groups and put groupA in front of groupB (or use `group_eval_order` to define the evaluation order). In this way, vmalert-tool makes sure that the results of groupA must be written to storage before evaluating groupB: @@ -54,7 +54,7 @@ groups: rules: - alert: B expr: A >= 0.75 - for: 1m + for: 1m ``` ### Test file format @@ -84,7 +84,7 @@ tests: ```yaml # Interval between samples for input series -interval: +[ interval: | default = evaluation_interval ] # Time series to persist into the database according to configured before running tests. input_series: [ - ] From c5b36138e28c2a82340ce4e358dbb8517977b82c Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Thu, 31 Oct 2024 14:08:08 +0100 Subject: [PATCH 74/90] docs: mention #7392 in changelog Signed-off-by: hagen1778 --- docs/changelog/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 59eae084d..18047ae40 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -24,6 +24,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * FEATURE: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): add a separate cache type for storing sparse entries when performing large index scans. This significantly reduces memory usage when applying [downsampling filters](https://docs.victoriametrics.com/#downsampling) and [retention filters](https://docs.victoriametrics.com/#retention-filters) during background merge. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7182) for the details. * FEATURE: [dashboards](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards) for VM single-node, cluster, vmalert, vmagent, VictoriaLogs: add `Restarts` panel to show the events of process restarts. This panel should help correlate events of restart with unexpected behavior of processes. * FEATURE: [alerts](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmalert.yml): add alerting rule `RemoteWriteDroppingData` to track number of dropped samples that weren't sent to remote write URL. +* FEATURE: [vmalert-tool](https://docs.victoriametrics.com/vmalert-tool/): use `evaluation_interval` as default `interval` value in [test_group](https://docs.victoriametrics.com/vmalert-tool/index.html#lttest_groupgt). This change aligns with promtool behavior. * BUGFIX: [dashboards](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards) for Single-node VictoriaMetrics, cluster: The free disk space calculation now will subtract the size of the `-storage.minFreeDiskSpaceBytes` flag to correctly display the remaining available space of Single-node VictoriaMetrics/vmstorage rather than the actual available disk space, as well as the full ETA. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7334) for the details. * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert): properly set `group_name` and `file` fields for recording rules in `/api/v1/rules`. From 955f3660de13925673fe3ef4c7c5dbaa3538cb23 Mon Sep 17 00:00:00 2001 From: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Date: Thu, 31 Oct 2024 06:08:35 -0700 Subject: [PATCH 75/90] Automatic update Grafana datasource docs from VictoriaMetrics/victorialogs-datasource@3ecaebd (#7395) --- docs/VictoriaLogs/victorialogs-datasource.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/VictoriaLogs/victorialogs-datasource.md b/docs/VictoriaLogs/victorialogs-datasource.md index b35a65e14..847ec37e2 100644 --- a/docs/VictoriaLogs/victorialogs-datasource.md +++ b/docs/VictoriaLogs/victorialogs-datasource.md @@ -79,7 +79,7 @@ Please find the example of provisioning Grafana instance with VictoriaLogs datas grafana: image: grafana/grafana:11.0.0 environment: - - GF_INSTALL_PLUGINS=https://github.com/VictoriaMetrics/victorialogs-datasource/releases/download/v0.6.1/victorialogs-datasource-v0.6.1.zip;victorialogs-datasource + - GF_INSTALL_PLUGINS=https://github.com/VictoriaMetrics/victorialogs-datasource/releases/download/v0.6.2/victorialogs-datasource-v0.6.2.zip;victorialogs-datasource - GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=victorialogs-datasource ports: - 3000:3000/tcp @@ -107,7 +107,7 @@ Option 1. Using Grafana provisioning: ``` yaml env: - GF_INSTALL_PLUGINS: "https://github.com/VictoriaMetrics/victorialogs-datasource/releases/download/v0.6.1/victorialogs-datasource-v0.6.1.zip;victorialogs-datasource" + GF_INSTALL_PLUGINS: "https://github.com/VictoriaMetrics/victorialogs-datasource/releases/download/v0.6.2/victorialogs-datasource-v0.6.2.zip;victorialogs-datasource" GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS: "victorialogs-datasource" ``` @@ -115,7 +115,7 @@ Option 2. Using Grafana plugins section in `values.yaml`: ``` yaml plugins: - - https://github.com/VictoriaMetrics/victorialogs-datasource/releases/download/v0.6.1/victorialogs-datasource-v0.6.1.zip;victorialogs-datasource + - https://github.com/VictoriaMetrics/victorialogs-datasource/releases/download/v0.6.2/victorialogs-datasource-v0.6.2.zip;victorialogs-datasource ``` Option 3. Using init container: From 06621995bddbbc286545880a1f8d2e3d0b6a4646 Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Thu, 31 Oct 2024 15:09:04 +0100 Subject: [PATCH 76/90] docs: mention `stats` object in Prometheus API enhancements The doc explains fields meaning in `stats` object. It also clarifies their purpose. See related ticket https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7170 Signed-off-by: hagen1778 --- docs/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/README.md b/docs/README.md index 731d47081..1aec6a539 100644 --- a/docs/README.md +++ b/docs/README.md @@ -960,6 +960,13 @@ VictoriaMetrics accepts `limit` query arg at [/api/v1/series](https://docs.victo for limiting the number of returned entries. For example, the query to `/api/v1/series?limit=5` returns a sample of up to 5 series, while ignoring the rest of series. If the provided `limit` value exceeds the corresponding `-search.maxSeries` command-line flag values, then limits specified in the command-line flags are used. +VictoriaMetrics returns an extra object `stats` in JSON response for [`/api/v1/query`](https://docs.victoriametrics.com/keyconcepts/#instant-query) +and [`/api/v1/query_range`](https://docs.victoriametrics.com/keyconcepts/#range-query) APIs. This object contains two +fields: `executionTimeMsec` with number of milliseconds the request took and `seriesFetched` with number of series that +were fetched from database before filtering. The `seriesFetched` field is effectively used by vmalert for detecting +[misconfigured rule expressions](https://docs.victoriametrics.com/vmalert/#never-firing-alerts). Please note, `seriesFetched` +provides approximate number of series, it is not recommended to rely on it in tests. + Additionally, VictoriaMetrics provides the following handlers: * `/vmui` - Basic Web UI. See [these docs](#vmui). From 4414f1e2e1894ac84acc077a4a9898b7619f0a5a Mon Sep 17 00:00:00 2001 From: Artem Fetishev <149964189+rtm0@users.noreply.github.com> Date: Thu, 31 Oct 2024 19:53:40 +0100 Subject: [PATCH 77/90] app/victoria-metrics: fixes flaky e2e graphite test This commit fixes flaky test TestWriteRead/read/graphite/subquery-aggregation in app/victoria-metrics/main_test.go The test fails when the test execution falls on the first second of a minute, for example 6:59:00. In all other cases (such as 6:59:01) the test passes. The test fails because of the way VictoriaMetrics implements sub-queries: it aligns the time range to the step. The test config does not account for this. Assuming that the implementation is correct, the fix is to adjust the test config so that the data is inserted at intervals other than 1m. Signed-off-by: Artem Fetishev --- .../testdata/graphite/subquery-aggregation.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/victoria-metrics/testdata/graphite/subquery-aggregation.json b/app/victoria-metrics/testdata/graphite/subquery-aggregation.json index 64436ac95..40ff786c2 100644 --- a/app/victoria-metrics/testdata/graphite/subquery-aggregation.json +++ b/app/victoria-metrics/testdata/graphite/subquery-aggregation.json @@ -2,10 +2,10 @@ "name": "subquery-aggregation", "issue": "https://github.com/VictoriaMetrics/VictoriaMetrics/issues/184", "data": [ - "forms_daily_count;item=x 1 {TIME_S-1m}", - "forms_daily_count;item=x 2 {TIME_S-2m}", - "forms_daily_count;item=y 3 {TIME_S-1m}", - "forms_daily_count;item=y 4 {TIME_S-2m}"], + "forms_daily_count;item=x 1 {TIME_S-59s}", + "forms_daily_count;item=x 2 {TIME_S-1m59s}", + "forms_daily_count;item=y 3 {TIME_S-59s}", + "forms_daily_count;item=y 4 {TIME_S-1m59s}"], "query": ["/api/v1/query?query=min%20by%20(item)%20(min_over_time(forms_daily_count[10m:1m]))&time={TIME_S-1m}&latency_offset=1ms"], "result_query": { "status":"success", From bba08f7846f63f8361136931d7b47767c9bfc56d Mon Sep 17 00:00:00 2001 From: Nikolay Date: Thu, 31 Oct 2024 19:58:22 +0100 Subject: [PATCH 78/90] lib/promscrape: add relabel configs to `global` section This commit adds `metric_relabel_configs` and `relabel_configs` fields into the `global` section of scrape configuration file. New fields are used as global relabeling rules for the scrape targets. These relabel configs are prepended to the target relabel configs. This feature is useful to: * apply global rules to __meta labels from service discovery targets. * drop noisy labels during scrapping. * mutate labels without affecting metrics ingested via any of push protocols. Related issue https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6966 --------- Signed-off-by: f41gh7 Co-authored-by: Zhu Jiekun Co-authored-by: hagen1778 --- docs/changelog/CHANGELOG.md | 1 + docs/vmagent.md | 12 +++ lib/promscrape/config.go | 24 ++++-- lib/promscrape/config_test.go | 147 ++++++++++++++++++++++++++++++++++ 4 files changed, 179 insertions(+), 5 deletions(-) diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 18047ae40..b236ee582 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -21,6 +21,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert/): support [VictoriaLogs](https://docs.victoriametrics.com/victorialogs/) as a datasource. See [this doc](https://docs.victoriametrics.com/victorialogs/vmalert/) for details. * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert/): `-rule` cmd-line flag now supports multi-document YAML files. This could be useful when rules are retrieved via HTTP URL where multiple rule files were merged together in one response. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6753). Thanks to @Irene-123 for [the pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6995). * FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent/): support scraping from Kubernetes Native Sidecars. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7287). +* FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent/) and [Single-node VictoriaMetrics](https://docs.victoriametrics.com/): add `metric_relabel_configs` and `relabel_configs` to the `global` section of [scrape configuration](https://docs.victoriametrics.com/vmagent/#how-to-collect-metrics-in-prometheus-format). Relabeling configuration specified in `global` section will be pre-pended to relabeling configs of all jobs. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6966) and [these docs](https://docs.victoriametrics.com/vmagent/#relabeling) for details. * FEATURE: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): add a separate cache type for storing sparse entries when performing large index scans. This significantly reduces memory usage when applying [downsampling filters](https://docs.victoriametrics.com/#downsampling) and [retention filters](https://docs.victoriametrics.com/#retention-filters) during background merge. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7182) for the details. * FEATURE: [dashboards](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards) for VM single-node, cluster, vmalert, vmagent, VictoriaLogs: add `Restarts` panel to show the events of process restarts. This panel should help correlate events of restart with unexpected behavior of processes. * FEATURE: [alerts](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmalert.yml): add alerting rule `RemoteWriteDroppingData` to track number of dropped samples that weren't sent to remote write URL. diff --git a/docs/vmagent.md b/docs/vmagent.md index 5525ac4c7..596bf2d1c 100644 --- a/docs/vmagent.md +++ b/docs/vmagent.md @@ -575,6 +575,18 @@ generated metrics. But they still can be relabeled via `-remoteWrite.relabelConf VictoriaMetrics components support [Prometheus-compatible relabeling](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config) with [additional enhancements](#relabeling-enhancements). The relabeling can be defined in the following places processed by `vmagent`: +* At the `global -> relabel_configs` section in `-promscrape.config` file. + This relabeling is used for modifying labels in discovered targets and for dropping unneeded targets. + Configuration from global section will be prepended to the `relabel_config` of targets from `scrape_config` section. + See [relabeling cookbook](https://docs.victoriametrics.com/relabeling/) for details. +_Available from [next](https://docs.victoriametrics.com/changelog/#tip) version._ + +* At the `global -> metric_relabel_configs` section in `-promscrape.config` file. + This relabeling is used for modifying labels in scraped metrics and for dropping unneeded metrics. + Configuration from global section will be prepended to the `metric_relabel_config` of targets from `scrape_config` section. + See [relabeling cookbook](https://docs.victoriametrics.com/relabeling/) for details. +_Available from [next](https://docs.victoriametrics.com/changelog/#tip) version._ + * At the `scrape_config -> relabel_configs` section in `-promscrape.config` file. This relabeling is used for modifying labels in discovered targets and for dropping unneeded targets. See [relabeling cookbook](https://docs.victoriametrics.com/relabeling/) for details. diff --git a/lib/promscrape/config.go b/lib/promscrape/config.go index 9b1fcdbf0..c212f634b 100644 --- a/lib/promscrape/config.go +++ b/lib/promscrape/config.go @@ -262,9 +262,11 @@ func (cfg *Config) getJobNames() []string { // // See https://prometheus.io/docs/prometheus/latest/configuration/configuration/ type GlobalConfig struct { - ScrapeInterval *promutils.Duration `yaml:"scrape_interval,omitempty"` - ScrapeTimeout *promutils.Duration `yaml:"scrape_timeout,omitempty"` - ExternalLabels *promutils.Labels `yaml:"external_labels,omitempty"` + ScrapeInterval *promutils.Duration `yaml:"scrape_interval,omitempty"` + ScrapeTimeout *promutils.Duration `yaml:"scrape_timeout,omitempty"` + ExternalLabels *promutils.Labels `yaml:"external_labels,omitempty"` + RelabelConfigs []promrelabel.RelabelConfig `yaml:"relabel_configs,omitempty"` + MetricRelabelConfigs []promrelabel.RelabelConfig `yaml:"metric_relabel_configs,omitempty"` } // ScrapeConfig represents essential parts for `scrape_config` section of Prometheus config. @@ -918,11 +920,23 @@ func getScrapeWorkConfig(sc *ScrapeConfig, baseDir string, globalCfg *GlobalConf if err != nil { return nil, fmt.Errorf("cannot parse proxy auth config for `job_name` %q: %w", jobName, err) } - relabelConfigs, err := promrelabel.ParseRelabelConfigs(sc.RelabelConfigs) + rcs := sc.RelabelConfigs + if len(globalCfg.RelabelConfigs) > 0 { + rcs = make([]promrelabel.RelabelConfig, 0, len(globalCfg.RelabelConfigs)+len(sc.RelabelConfigs)) + rcs = append(rcs, globalCfg.RelabelConfigs...) + rcs = append(rcs, sc.RelabelConfigs...) + } + relabelConfigs, err := promrelabel.ParseRelabelConfigs(rcs) if err != nil { return nil, fmt.Errorf("cannot parse `relabel_configs` for `job_name` %q: %w", jobName, err) } - metricRelabelConfigs, err := promrelabel.ParseRelabelConfigs(sc.MetricRelabelConfigs) + mrcs := sc.MetricRelabelConfigs + if len(globalCfg.MetricRelabelConfigs) > 0 { + mrcs = make([]promrelabel.RelabelConfig, 0, len(globalCfg.MetricRelabelConfigs)+len(sc.MetricRelabelConfigs)) + mrcs = append(mrcs, globalCfg.MetricRelabelConfigs...) + mrcs = append(mrcs, sc.MetricRelabelConfigs...) + } + metricRelabelConfigs, err := promrelabel.ParseRelabelConfigs(mrcs) if err != nil { return nil, fmt.Errorf("cannot parse `metric_relabel_configs` for `job_name` %q: %w", jobName, err) } diff --git a/lib/promscrape/config_test.go b/lib/promscrape/config_test.go index 84c1bd72f..b77782a89 100644 --- a/lib/promscrape/config_test.go +++ b/lib/promscrape/config_test.go @@ -107,6 +107,18 @@ scrape_configs: proxy_bearer_token_file: file.txt proxy_headers: - 'My-Auth-Header: top-secret' +`) + f(` +global: + scrape_interval: 10s + relabel_configs: + - source_labels: [job] + target_label: job + regex: (.+) + replacement: prefix-${1} + metric_relabel_configs: + - action: labeldrop + source_labels: [id] `) } @@ -1352,3 +1364,138 @@ func checkEqualScrapeWorks(t *testing.T, got, want []*ScrapeWork) { } } } + +func TestStaticConfigWithGlobalRelabelConfigs(t *testing.T) { + f := func(data string, want []*ScrapeWork) { + t.Helper() + got, err := getStaticScrapeWork([]byte(data), "non-exsiting-file") + if err != nil { + t.Fatalf("unexpected error: %s", err) + } + if len(got) != len(want) { + t.Fatalf("unexpected number of ScrapeWork items; got %d; want %d", len(got), len(want)) + } + + for i := range got { + gotItem := got[i] + wantItem := want[i] + if wantItem.RelabelConfigs.String() != gotItem.RelabelConfigs.String() { + t.Fatalf("unexpected relabel_config at scrape work idx=%d, want:\n%s\ngot:\n%s", + i, wantItem.RelabelConfigs.String(), gotItem.RelabelConfigs.String()) + } + if wantItem.RelabelConfigs.String() != gotItem.RelabelConfigs.String() { + t.Fatalf("unexpected metric_relabel_config at scrape work idx=%d, want:\n%s\ngot:\n%s", + i, wantItem.MetricRelabelConfigs.String(), gotItem.MetricRelabelConfigs.String()) + } + } + } + f(` +global: + relabel_configs: + - target_label: job + replacement: bar +scrape_configs: +- job_name: foo + relabel_configs: + - target_label: bar + replacement: foo + static_configs: + - targets: ["foo.bar:1234"] +`, []*ScrapeWork{ + { + jobNameOriginal: "foo", + ScrapeURL: "foo.bar:1234", + RelabelConfigs: mustParseRelabelConfigs(` + - target_label: job + replacement: bar + - target_label: bar + replacement: foo + `), + }, + }) + f(` +global: + relabel_configs: + - target_label: job + replacement: prefix_${1} + source_labels: [job] + regex: (.+) + metric_relabel_configs: + - source_labels: [id] + action: labeldrop +scrape_configs: +- job_name: foo + relabel_configs: + - target_label: bar + replacement: foo + static_configs: + - targets: ["foo.bar:1234"] +- job_name: bar + relabel_configs: + - target_label: baz + replacement: bar + metric_relabel_configs: + - source_labels: [mount_path] + replacement: ${2} + regex: '(\/.+)?\/(.+)' + target_label: mount_path + static_configs: + - targets: ["baz.bar:1235"] +- job_name: baz + static_configs: + - targets: ["baz.bar:1235"] + +`, []*ScrapeWork{ + { + jobNameOriginal: "foo", + ScrapeURL: "foo.bar:1234", + RelabelConfigs: mustParseRelabelConfigs(` + - target_label: job + replacement: prefix_${1} + source_labels: [job] + regex: (.+) + - target_label: bar + replacement: foo + `), + MetricRelabelConfigs: mustParseRelabelConfigs(` + - source_labels: [id] + action: labeldrop + `), + }, + { + jobNameOriginal: "bar", + ScrapeURL: "baz.bar:1235", + RelabelConfigs: mustParseRelabelConfigs(` + - target_label: job + replacement: prefix_${1} + source_labels: [job] + regex: (.+) + - target_label: baz + replacement: bar + `), + MetricRelabelConfigs: mustParseRelabelConfigs(` + - source_labels: [id] + action: labeldrop + - source_labels: [mount_path] + replacement: ${2} + regex: '(\/.+)?\/(.+)' + target_label: mount_path + `), + }, + { + jobNameOriginal: "baz", + ScrapeURL: "baz.bar:1235", + RelabelConfigs: mustParseRelabelConfigs(` + - target_label: job + replacement: prefix_${1} + source_labels: [job] + regex: (.+) + `), + MetricRelabelConfigs: mustParseRelabelConfigs(` + - source_labels: [id] + action: labeldrop +`), + }, + }) + +} From 5cc2e49297c28e56aa8c729a439aec3fc0565a34 Mon Sep 17 00:00:00 2001 From: f41gh7 Date: Thu, 31 Oct 2024 20:20:02 +0100 Subject: [PATCH 79/90] app/vmgateway: fixes rate limit for multitenant requests Previously vmgateway returned error for the requests with multitenant tenant. This commit allows to rate limit multitenant requests and apply global rate limit for it. Currently it supports only queries for rate limiting. Related issue: https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7201 This commit also addresses gateway start-up crash if datasource.url is not accessible. Previously vmgateway could crash at start-up with enabled rate limiting if datasource for metrics was not avaiable for any reason. It seems, that crash is expected. But in fact it's not. For instance, datasource could be in restart phase. Replaces crash with log message error. It increased availability of vmgateway component. Signed-off-by: f41gh7 --- docs/changelog/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index b236ee582..50d39167a 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -29,6 +29,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * BUGFIX: [dashboards](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards) for Single-node VictoriaMetrics, cluster: The free disk space calculation now will subtract the size of the `-storage.minFreeDiskSpaceBytes` flag to correctly display the remaining available space of Single-node VictoriaMetrics/vmstorage rather than the actual available disk space, as well as the full ETA. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7334) for the details. * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert): properly set `group_name` and `file` fields for recording rules in `/api/v1/rules`. +* BUGFIX: [vmgateway](https://docs.victoriametrics.com/vmgateway): properly forward [multitenant](https://docs.victoriametrics.com/cluster-victoriametrics/#multitenancy) requests with `-clusterMode`. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7201) for details. * BUGFIX: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): prevent panic when ingesting samples which are outisde of configured [retention filters](https://docs.victoriametrics.com/#retention-filters). This could happen when backfilling data with retention filters which exclude samples from the backfill range. * BUGFIX: [vmctl](https://docs.victoriametrics.com/vmctl/): fix issue with series matching for `vmctl vm-native` with `--vm-native-disable-per-metric-migration` flag enabled. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7309). * BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): fix the display of the link to vmalert. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5924). From 5e2cb78cce4353b532243101ef8e22f2cad9df97 Mon Sep 17 00:00:00 2001 From: Andrii Chubatiuk Date: Fri, 1 Nov 2024 17:13:59 +0200 Subject: [PATCH 80/90] Updated k8s guides (#7411) ### Describe Your Changes - updated dependencies versions - removed Helm v2 from docs - fixed VMAgent configuration ### Checklist The following checks are **mandatory**: - [ ] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --- .../examples/guide-vmcluster-vmagent-values.yaml | 6 +++--- .../k8s-ha-monitoring-via-vm-cluster/README.md | 7 +++---- .../k8s-monitoring-via-vm-cluster/README.md | 16 +++++++--------- .../k8s-monitoring-via-vm-single/README.md | 8 +++----- 4 files changed, 16 insertions(+), 21 deletions(-) diff --git a/docs/guides/examples/guide-vmcluster-vmagent-values.yaml b/docs/guides/examples/guide-vmcluster-vmagent-values.yaml index 008b136a9..4eaa09676 100644 --- a/docs/guides/examples/guide-vmcluster-vmagent-values.yaml +++ b/docs/guides/examples/guide-vmcluster-vmagent-values.yaml @@ -1,5 +1,5 @@ -remoteWriteUrls: - - http://vmcluster-victoria-metrics-cluster-vminsert.default.svc.cluster.local:8480/insert/0/prometheus/ +remoteWrite: + - url: http://vmcluster-victoria-metrics-cluster-vminsert.default.svc.cluster.local:8480/insert/0/prometheus/ config: global: @@ -219,4 +219,4 @@ config: target_label: kubernetes_namespace - source_labels: [__meta_kubernetes_pod_name] action: replace - target_label: kubernetes_pod_name \ No newline at end of file + target_label: kubernetes_pod_name diff --git a/docs/guides/k8s-ha-monitoring-via-vm-cluster/README.md b/docs/guides/k8s-ha-monitoring-via-vm-cluster/README.md index efc8c4fb8..c1075365e 100644 --- a/docs/guides/k8s-ha-monitoring-via-vm-cluster/README.md +++ b/docs/guides/k8s-ha-monitoring-via-vm-cluster/README.md @@ -144,8 +144,8 @@ helm install vmagent vm/victoria-metrics-agent -f https://docs.victoriametrics.c Here is full file content `guide-vmcluster-vmagent-values.yaml` ```yaml -remoteWriteUrls: - - http://vmcluster-victoria-metrics-cluster-vminsert.default.svc.cluster.local:8480/insert/0/prometheus/ +remoteWrite: + - url: http://vmcluster-victoria-metrics-cluster-vminsert.default.svc.cluster.local:8480/insert/0/prometheus/ scrape_configs: - job_name: vmagent @@ -222,8 +222,7 @@ scrape_configs: target_label: systemd_service_name replacement: '${1}' ``` - -* `remoteWriteUrls: - http://vmcluster-victoria-metrics-cluster-vminsert.default.svc.cluster.local:8480/insert/0/prometheus/` configures `vmagent` to write scraped metrics to the `vmselect service`. +* By updating `remoteWrite` we configuring [vmagent](https://docs.victoriametrics.com/vmagent/) to write scraped metrics into the `vminsert` service. * The `metric_relabel_configs` section allows you to process Kubernetes metrics for the Grafana dashboard. diff --git a/docs/guides/k8s-monitoring-via-vm-cluster/README.md b/docs/guides/k8s-monitoring-via-vm-cluster/README.md index 083d0010d..555e885b4 100644 --- a/docs/guides/k8s-monitoring-via-vm-cluster/README.md +++ b/docs/guides/k8s-monitoring-via-vm-cluster/README.md @@ -8,17 +8,15 @@ **Precondition** We will use: -* [Kubernetes cluster 1.19.9-gke.1900](https://cloud.google.com/kubernetes-engine) -> We use GKE cluster from [GCP](https://cloud.google.com/) but this guide also applies on any Kubernetes cluster. For example [Amazon EKS](https://aws.amazon.com/ru/eks/). -* [Helm 3 ](https://helm.sh/docs/intro/install) -* [kubectl 1.21](https://kubernetes.io/docs/tasks/tools/install-kubectl) +* [Kubernetes cluster 1.31.1-gke.1678000](https://cloud.google.com/kubernetes-engine) +> We use GKE cluster from [GCP](https://cloud.google.com/) but this guide is also applied on any Kubernetes cluster. For example [Amazon EKS](https://aws.amazon.com/ru/eks/). +* [Helm 3.14+](https://helm.sh/docs/intro/install) +* [kubectl 1.31](https://kubernetes.io/docs/tasks/tools/install-kubectl) ![VMCluster on K8s](scheme.webp) ## 1. VictoriaMetrics Helm repository -> For this guide we will use Helm 3 but if you already use Helm 2 please see this [https://github.com/VictoriaMetrics/helm-charts#for-helm-v2](https://github.com/VictoriaMetrics/helm-charts#for-helm-v2) - You need to add the VictoriaMetrics Helm repository to install VictoriaMetrics components. We’re going to use [VictoriaMetrics Cluster](https://docs.victoriametrics.com/cluster-victoriametrics/). You can do this by running the following command: ```shell @@ -166,8 +164,8 @@ helm install vmagent vm/victoria-metrics-agent -f https://docs.victoriametrics.c Here is full file content `guide-vmcluster-vmagent-values.yaml` ```yaml -remoteWriteUrls: - - http://vmcluster-victoria-metrics-cluster-vminsert.default.svc.cluster.local:8480/insert/0/prometheus/ +remoteWrite: + - url: http://vmcluster-victoria-metrics-cluster-vminsert.default.svc.cluster.local:8480/insert/0/prometheus/ config: global: @@ -390,7 +388,7 @@ config: target_label: kubernetes_pod_name ``` -* By adding `remoteWriteUrls: - http://vmcluster-victoria-metrics-cluster-vminsert.default.svc.cluster.local:8480/insert/0/prometheus/` we configuring [vmagent](https://docs.victoriametrics.com/vmagent/) to write scraped metrics into the `vmselect service`. +* By updating `remoteWrite` we configuring [vmagent](https://docs.victoriametrics.com/vmagent/) to write scraped metrics into the `vminsert` service. * The second part of this yaml file is needed to add the `metric_relabel_configs` section that helps us to show Kubernetes metrics on the Grafana dashboard. diff --git a/docs/guides/k8s-monitoring-via-vm-single/README.md b/docs/guides/k8s-monitoring-via-vm-single/README.md index 91343e6f7..3e739b3d8 100644 --- a/docs/guides/k8s-monitoring-via-vm-single/README.md +++ b/docs/guides/k8s-monitoring-via-vm-single/README.md @@ -8,17 +8,15 @@ **Precondition** We will use: -* [Kubernetes cluster 1.19.9-gke.1900](https://cloud.google.com/kubernetes-engine) +* [Kubernetes cluster 1.31.1-gke.1678000](https://cloud.google.com/kubernetes-engine) > We use GKE cluster from [GCP](https://cloud.google.com/) but this guide is also applied on any Kubernetes cluster. For example [Amazon EKS](https://aws.amazon.com/ru/eks/). -* [Helm 3 ](https://helm.sh/docs/intro/install) -* [kubectl 1.21](https://kubernetes.io/docs/tasks/tools/install-kubectl) +* [Helm 3.14+](https://helm.sh/docs/intro/install) +* [kubectl 1.31](https://kubernetes.io/docs/tasks/tools/install-kubectl) ![VictoriaMetrics Single on Kubernetes cluster](k8s-scheme.webp) ## 1. VictoriaMetrics Helm repository -> For this guide we will use Helm 3 but if you already use Helm 2 please see this [https://github.com/VictoriaMetrics/helm-charts#for-helm-v2](https://github.com/VictoriaMetrics/helm-charts#for-helm-v2) - You need to add the VictoriaMetrics Helm repository to install VictoriaMetrics components. We’re going to use [VictoriaMetrics Single](https://docs.victoriametrics.com/single-server-victoriametrics/). You can do this by running the following command: From 9ba6be417997265bcd0f4ad5699a8b127eb60fd7 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 1 Nov 2024 16:46:49 +0100 Subject: [PATCH 81/90] lib/logstorage: increase the the maximum number of columns per block from 1000 to 2000 This will allow storing wide events with up to 2K fields per event into VictoriaLogs. While at it, remove the misleading comment that columnsHeader is read in full per each matching block. This is no longer the case after the improvements made at 202eb429a7d0022def274d3ff905c8c4012bbbca . Now only the needed columnHeader is read for the column mentioned in the query. Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6425#issuecomment-2418337124 Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4762 --- lib/logstorage/block_stream_merger.go | 2 +- lib/logstorage/consts.go | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/logstorage/block_stream_merger.go b/lib/logstorage/block_stream_merger.go index 7e57dfa66..49e736854 100644 --- a/lib/logstorage/block_stream_merger.go +++ b/lib/logstorage/block_stream_merger.go @@ -146,7 +146,7 @@ func (bsm *blockStreamMerger) mustWriteBlock(bd *blockData, bsw *blockStreamWrit bsm.bd.copyFrom(&bsm.a, bd) bsm.uniqueFields = uniqueFields } - case bsm.uniqueFields+uniqueFields >= maxColumnsPerBlock: + case bsm.uniqueFields+uniqueFields > maxColumnsPerBlock: // Cannot merge bd with bsm.rows, because too many columns will be created. // See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4762 // diff --git a/lib/logstorage/consts.go b/lib/logstorage/consts.go index d1de8faea..3bd8da81d 100644 --- a/lib/logstorage/consts.go +++ b/lib/logstorage/consts.go @@ -26,9 +26,8 @@ const maxRowsPerBlock = 8 * 1024 * 1024 // maxColumnsPerBlock is the maximum number of columns per block. // // It isn't recommended setting this value to too big value, because this may result -// in excess memory usage during data ingestion and significant slowdown during query execution, -// since every column header is unpacked in every matching block during query execution. -const maxColumnsPerBlock = 1_000 +// in excess memory usage during data ingestion and significant slowdown during query execution. +const maxColumnsPerBlock = 2_000 // MaxFieldNameSize is the maximum size in bytes for field name. // From b3e2db56472c732bb36d8db4ec37970ebf792c5c Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 1 Nov 2024 17:20:28 +0100 Subject: [PATCH 82/90] docs/VictoriaLogs/keyConcepts.md: remove duplicate sentence about missing timezone information in the ingested _time field values --- docs/VictoriaLogs/keyConcepts.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/VictoriaLogs/keyConcepts.md b/docs/VictoriaLogs/keyConcepts.md index c89c6e22c..9824ff48f 100644 --- a/docs/VictoriaLogs/keyConcepts.md +++ b/docs/VictoriaLogs/keyConcepts.md @@ -157,8 +157,6 @@ For example, the following [log entry](#data-model) contains valid timestamp wit } ``` -If timezone information is missing in the `_time` field value, then the local timezone of the host where VictoriaLogs runs is used. - If the actual timestamp has other than `_time` field name, then it is possible to specify the real timestamp field via `_time_field` query arg during [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/). For example, if timestamp is located in the `event.created` field, then specify `_time_field=event.created` query arg From 4478e48eb65f8296fb63288cd34a4847dddb5a65 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 1 Nov 2024 20:06:15 +0100 Subject: [PATCH 83/90] app/vlinsert: implement the ability to add extra fields to the ingested logs This can be done via extra_fields query arg or via VL-Extra-Fields HTTP header. See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7354#issuecomment-2448671445 --- app/vlinsert/insertutils/common_params.go | 97 ++++++-------- docs/VictoriaLogs/CHANGELOG.md | 2 + docs/VictoriaLogs/data-ingestion/README.md | 66 ++++++---- lib/httputils/array.go | 15 ++- lib/logstorage/filter_stream_id_test.go | 2 +- lib/logstorage/filter_test.go | 2 +- lib/logstorage/filter_time_test.go | 2 +- lib/logstorage/inmemory_part_test.go | 14 +- lib/logstorage/log_rows.go | 116 ++++++++++++----- lib/logstorage/log_rows_test.go | 145 +++++++++++++++++++++ lib/logstorage/log_rows_timing_test.go | 2 +- lib/logstorage/storage.go | 2 +- lib/logstorage/storage_search_test.go | 4 +- 13 files changed, 332 insertions(+), 137 deletions(-) create mode 100644 lib/logstorage/log_rows_test.go diff --git a/app/vlinsert/insertutils/common_params.go b/app/vlinsert/insertutils/common_params.go index f2170da62..0077a19a0 100644 --- a/app/vlinsert/insertutils/common_params.go +++ b/app/vlinsert/insertutils/common_params.go @@ -2,7 +2,9 @@ package insertutils import ( "flag" + "fmt" "net/http" + "strconv" "strings" "sync" "time" @@ -31,6 +33,7 @@ type CommonParams struct { MsgFields []string StreamFields []string IgnoreFields []string + ExtraFields []logstorage.Field Debug bool DebugRequestURI string @@ -45,48 +48,25 @@ func GetCommonParams(r *http.Request) (*CommonParams, error) { return nil, err } - // Extract time field name from _time_field query arg or header timeField := "_time" - if tf := r.FormValue("_time_field"); tf != "" { - timeField = tf - } else if tf = r.Header.Get("VL-Time-Field"); tf != "" { + if tf := httputils.GetRequestValue(r, "_time_field", "VL-Time-Field"); tf != "" { timeField = tf } - // Extract message field name from _msg_field query arg or header - msgField := "" - if msgf := r.FormValue("_msg_field"); msgf != "" { - msgField = msgf - } else if msgf = r.Header.Get("VL-Msg-Field"); msgf != "" { - msgField = msgf - } - var msgFields []string - if msgField != "" { - msgFields = strings.Split(msgField, ",") + msgFields := httputils.GetArray(r, "_msg_field", "VL-Msg-Field") + streamFields := httputils.GetArray(r, "_stream_fields", "VL-Stream-Fields") + ignoreFields := httputils.GetArray(r, "ignore_fields", "VL-Ignore-Fields") + + extraFields, err := getExtraFields(r) + if err != nil { + return nil, err } - streamFields := httputils.GetArray(r, "_stream_fields") - if len(streamFields) == 0 { - if sf := r.Header.Get("VL-Stream-Fields"); len(sf) > 0 { - streamFields = strings.Split(sf, ",") - } - } - ignoreFields := httputils.GetArray(r, "ignore_fields") - if len(ignoreFields) == 0 { - if f := r.Header.Get("VL-Ignore-Fields"); len(f) > 0 { - ignoreFields = strings.Split(f, ",") - } - } - - debug := httputils.GetBool(r, "debug") - if !debug { - if dh := r.Header.Get("VL-Debug"); len(dh) > 0 { - hv := strings.ToLower(dh) - switch hv { - case "", "0", "f", "false", "no": - default: - debug = true - } + debug := false + if dv := httputils.GetRequestValue(r, "debug", "VL-Debug"); dv != "" { + debug, err = strconv.ParseBool(dv) + if err != nil { + return nil, fmt.Errorf("cannot parse debug=%q: %w", dv, err) } } debugRequestURI := "" @@ -102,6 +82,7 @@ func GetCommonParams(r *http.Request) (*CommonParams, error) { MsgFields: msgFields, StreamFields: streamFields, IgnoreFields: ignoreFields, + ExtraFields: extraFields, Debug: debug, DebugRequestURI: debugRequestURI, DebugRemoteAddr: debugRemoteAddr, @@ -110,6 +91,26 @@ func GetCommonParams(r *http.Request) (*CommonParams, error) { return cp, nil } +func getExtraFields(r *http.Request) ([]logstorage.Field, error) { + efs := httputils.GetArray(r, "extra_fields", "VL-Extra-Fields") + if len(efs) == 0 { + return nil, nil + } + + extraFields := make([]logstorage.Field, len(efs)) + for i, ef := range efs { + n := strings.Index(ef, "=") + if n <= 0 || n == len(ef)-1 { + return nil, fmt.Errorf(`invalid extra_field format: %q; must be in the form "field=value"`, ef) + } + extraFields[i] = logstorage.Field{ + Name: ef[:n], + Value: ef[n+1:], + } + } + return extraFields, nil +} + // GetCommonParamsForSyslog returns common params needed for parsing syslog messages and storing them to the given tenantID. func GetCommonParamsForSyslog(tenantID logstorage.TenantID) *CommonParams { // See https://docs.victoriametrics.com/victorialogs/logsql/#unpack_syslog-pipe @@ -146,8 +147,6 @@ type logMessageProcessor struct { stopCh chan struct{} lastFlushTime time.Time - tmpFields []logstorage.Field - cp *CommonParams lr *logstorage.LogRows } @@ -190,17 +189,6 @@ func (lmp *logMessageProcessor) AddRow(timestamp int64, fields []logstorage.Fiel return } - if *defaultMsgValue != "" && !hasMsgField(fields) { - // The log entry doesn't contain mandatory _msg field. Add _msg field with default value then - // according to https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field . - lmp.tmpFields = append(lmp.tmpFields[:0], fields...) - lmp.tmpFields = append(lmp.tmpFields, logstorage.Field{ - Name: "_msg", - Value: *defaultMsgValue, - }) - fields = lmp.tmpFields - } - lmp.lr.MustAdd(lmp.cp.TenantID, timestamp, fields) if lmp.cp.Debug { s := lmp.lr.GetRowString(0) @@ -214,15 +202,6 @@ func (lmp *logMessageProcessor) AddRow(timestamp int64, fields []logstorage.Fiel } } -func hasMsgField(fields []logstorage.Field) bool { - for _, f := range fields { - if f.Name == "_msg" { - return len(f.Value) > 0 - } - } - return false -} - // flushLocked must be called under locked lmp.mu. func (lmp *logMessageProcessor) flushLocked() { lmp.lastFlushTime = time.Now() @@ -244,7 +223,7 @@ func (lmp *logMessageProcessor) MustClose() { // // MustClose() must be called on the returned LogMessageProcessor when it is no longer needed. func (cp *CommonParams) NewLogMessageProcessor() LogMessageProcessor { - lr := logstorage.GetLogRows(cp.StreamFields, cp.IgnoreFields) + lr := logstorage.GetLogRows(cp.StreamFields, cp.IgnoreFields, cp.ExtraFields, *defaultMsgValue) lmp := &logMessageProcessor{ cp: cp, lr: lr, diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 5c3119782..13068027a 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -15,6 +15,8 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta ## tip +* FEATURE: add an ability to specify extra fields for logs ingested via [HTTP-based data ingestion protocols](https://docs.victoriametrics.com/victorialogs/data-ingestion/#http-apis). See `extra_fields` query arg and `VL-Extra-Fields` HTTP header in [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/#http-parameters). + ## [v0.40.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.40.0-victorialogs) Released at 2024-10-31 diff --git a/docs/VictoriaLogs/data-ingestion/README.md b/docs/VictoriaLogs/data-ingestion/README.md index 63d77fd8c..4be5d9a2e 100644 --- a/docs/VictoriaLogs/data-ingestion/README.md +++ b/docs/VictoriaLogs/data-ingestion/README.md @@ -189,66 +189,78 @@ HTTP query string parameters have priority over HTTP Headers. #### HTTP Query string parameters -List of supported [Query string](https://en.wikipedia.org/wiki/Query_string) parameters: +All the [HTTP-based data ingestion protocols](#http-apis) support the following [HTTP query string](https://en.wikipedia.org/wiki/Query_string) args: -- `_msg_field` - it must contain the name of the [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) - with the [log message](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field) generated by the log shipper. +- `_msg_field` - the name of the [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) + containing [log message](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field). This is usually the `message` field for Filebeat and Logstash. The `_msg_field` arg may contain comma-separated list of field names. In this case the first non-empty field from the list is treated as [log message](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field). - If the `_msg_field` parameter isn't set, then VictoriaLogs reads the log message from the `_msg` field. + If the `_msg_field` arg isn't set, then VictoriaLogs reads the log message from the `_msg` field. If the `_msg` field is empty, + then it is set to `-defaultMsgValue` command-line flag value. -- `_time_field` - it must contain the name of the [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) - with the [log timestamp](https://docs.victoriametrics.com/victorialogs/keyconcepts/#time-field) generated by the log shipper. +- `_time_field` - the name of the [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) + containing [log timestamp](https://docs.victoriametrics.com/victorialogs/keyconcepts/#time-field). This is usually the `@timestamp` field for Filebeat and Logstash. - If the `_time_field` parameter isn't set, then VictoriaLogs reads the timestamp from the `_time` field. - If this field doesn't exist, then the current timestamp is used. -- `_stream_fields` - it should contain comma-separated list of [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) names, - which uniquely identify every [log stream](https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields) collected the log shipper. - If the `_stream_fields` parameter isn't set, then all the ingested logs are written to default log stream - `{}`. + If the `_time_field` arg isn't set, then VictoriaLogs reads the timestamp from the `_time` field. If this field doesn't exist, then the current timestamp is used. -- `ignore_fields` - this parameter may contain the list of [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) names, +- `_stream_fields` - comma-separated list of [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) names, + which uniquely identify every [log stream](https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields). + + If the `_stream_fields` arg isn't set, then all the ingested logs are written to default log stream - `{}`. + +- `ignore_fields` - an optional comma-separated list of [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) names, which must be ignored during data ingestion. -- `debug` - if this parameter is set to `1`, then the ingested logs aren't stored in VictoriaLogs. Instead, +- `extra_fields` - an optional comma-separated list [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model), + which must be added to all the ingested logs. The format of every `extra_fields` entry is `field_name=field_value`. + If the log entry contains fields from the `extra_fields`, then they are overwritten by the values specified in `extra_fields`. + +- `debug` - if this arg is set to `1`, then the ingested logs aren't stored in VictoriaLogs. Instead, the ingested data is logged by VictoriaLogs, so it can be investigated later. See also [HTTP headers](#http-headers). #### HTTP headers -List of supported [HTTP Headers](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields) parameters: +All the [HTTP-based data ingestion protocols](#http-apis) support the following [HTTP Headers](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields) +additionally to [HTTP query args](#http-query-string-parameters): -- `AccountID` - may contain the needed accountID of tenant to ingest data to. See [multitenancy docs](https://docs.victoriametrics.com/victorialogs/#multitenancy) for details. +- `AccountID` - accountID of the tenant to ingest data to. See [multitenancy docs](https://docs.victoriametrics.com/victorialogs/#multitenancy) for details. -- `ProjectID`- may contain the projectID needed of tenant to ingest data to. See [multitenancy docs](https://docs.victoriametrics.com/victorialogs/#multitenancy) for details. - VictoriaLogs accepts optional `AccountID` and `ProjectID` headers at [data ingestion HTTP APIs](#http-apis). +- `ProjectID`- projectID of the tenant to ingest data to. See [multitenancy docs](https://docs.victoriametrics.com/victorialogs/#multitenancy) for details. -- `VL-Msg-Field` - it must contain the name of the [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) - with the [log message](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field) generated by the log shipper. +- `VL-Msg-Field` - the name of the [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) + containing [log message](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field). This is usually the `message` field for Filebeat and Logstash. The `VL-Msg-Field` header may contain comma-separated list of field names. In this case the first non-empty field from the list is treated as [log message](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field). - If the `VL-Msg-Field` header isn't set, then VictoriaLogs reads the log message from the `_msg` field. + If the `VL-Msg-Field` header isn't set, then VictoriaLogs reads log message from the `_msg` field. If the `_msg` field is empty, + then it is set to `-defaultMsgValue` command-line flag value. -- `VL-Time-Field` - it must contain the name of the [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) - with the [log timestamp](https://docs.victoriametrics.com/victorialogs/keyconcepts/#time-field) generated by the log shipper. +- `VL-Time-Field` - the name of the [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) + containing [log timestamp](https://docs.victoriametrics.com/victorialogs/keyconcepts/#time-field). This is usually the `@timestamp` field for Filebeat and Logstash. - If the `VL-Time-Field` header isn't set, then VictoriaLogs reads the timestamp from the `_time` field. - If this field doesn't exist, then the current timestamp is used. -- `VL-Stream-Fields` - it should contain comma-separated list of [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) names, - which uniquely identify every [log stream](https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields) collected the log shipper. + If the `VL-Time-Field` header isn't set, then VictoriaLogs reads the timestamp from the `_time` field. If this field doesn't exist, then the current timestamp is used. + +- `VL-Stream-Fields` - comma-separated list of [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) names, + which uniquely identify every [log stream](https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields). + If the `VL-Stream-Fields` header isn't set, then all the ingested logs are written to default log stream - `{}`. -- `VL-Ignore-Fields` - this parameter may contain the list of [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) names, +- `VL-Ignore-Fields` - an optional comma-separated list of [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) names, which must be ignored during data ingestion. +- `VL-Extra-Field` - an optional comma-separated list of [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model), + which must be added to all the ingested logs. The format of every `extra_fields` entry is `field_name=field_value`. + If the log entry contains fields from the `extra_fields`, then they are overwritten by the values specified in `extra_fields`. + - `VL-Debug` - if this parameter is set to `1`, then the ingested logs aren't stored in VictoriaLogs. Instead, the ingested data is logged by VictoriaLogs, so it can be investigated later. diff --git a/lib/httputils/array.go b/lib/httputils/array.go index 5d61f3f7e..ca5c5b7d4 100644 --- a/lib/httputils/array.go +++ b/lib/httputils/array.go @@ -5,11 +5,20 @@ import ( "strings" ) -// GetArray returns an array of comma-separated values from r arg with the argKey name. -func GetArray(r *http.Request, argKey string) []string { - v := r.FormValue(argKey) +// GetArray returns an array of comma-separated values from r with the argKey quey arg or with headerKey header. +func GetArray(r *http.Request, argKey, headerKey string) []string { + v := GetRequestValue(r, argKey, headerKey) if v == "" { return nil } return strings.Split(v, ",") } + +// GetRequestValue returns r value for the given argKey query arg or for the given headerKey header. +func GetRequestValue(r *http.Request, argKey, headerKey string) string { + v := r.FormValue(argKey) + if v == "" { + v = r.Header.Get(headerKey) + } + return v +} diff --git a/lib/logstorage/filter_stream_id_test.go b/lib/logstorage/filter_stream_id_test.go index 78fc357fc..c6628f4b8 100644 --- a/lib/logstorage/filter_stream_id_test.go +++ b/lib/logstorage/filter_stream_id_test.go @@ -84,7 +84,7 @@ func testFilterMatchForStreamID(t *testing.T, f filter, expectedRowIdxs []int) { func generateTestLogStreams(s *Storage, tenantID TenantID, getMsgValue func(int) string, rowsCount, streamsCount int) { streamFields := []string{"host", "app"} - lr := GetLogRows(streamFields, nil) + lr := GetLogRows(streamFields, nil, nil, "") var fields []Field for i := range rowsCount { fields = append(fields[:0], Field{ diff --git a/lib/logstorage/filter_test.go b/lib/logstorage/filter_test.go index 90f288280..017abca1d 100644 --- a/lib/logstorage/filter_test.go +++ b/lib/logstorage/filter_test.go @@ -249,7 +249,7 @@ func generateRowsFromColumns(s *Storage, tenantID TenantID, columns []column) { "job", "instance", } - lr := GetLogRows(streamTags, nil) + lr := GetLogRows(streamTags, nil, nil, "") var fields []Field for i := range columns[0].values { // Add stream tags diff --git a/lib/logstorage/filter_time_test.go b/lib/logstorage/filter_time_test.go index 0ad7b013e..ffb1ed2c6 100644 --- a/lib/logstorage/filter_time_test.go +++ b/lib/logstorage/filter_time_test.go @@ -123,7 +123,7 @@ func testFilterMatchForTimestamps(t *testing.T, timestamps []int64, f filter, ex } func generateRowsFromTimestamps(s *Storage, tenantID TenantID, timestamps []int64, getValue func(rowIdx int) string) { - lr := GetLogRows(nil, nil) + lr := GetLogRows(nil, nil, nil, "") var fields []Field for i, timestamp := range timestamps { fields = append(fields[:0], Field{ diff --git a/lib/logstorage/inmemory_part_test.go b/lib/logstorage/inmemory_part_test.go index c2f62c99c..ce17fa149 100644 --- a/lib/logstorage/inmemory_part_test.go +++ b/lib/logstorage/inmemory_part_test.go @@ -22,7 +22,7 @@ func TestInmemoryPartMustInitFromRows(t *testing.T) { // make a copy of lr - it is used for comapring the results later, // since lr may be modified by inmemoryPart.mustInitFromRows() - lrOrig := GetLogRows(nil, nil) + lrOrig := GetLogRows(nil, nil, nil, "") for i, timestamp := range lr.timestamps { if timestamp < minTimestampExpected { minTimestampExpected = timestamp @@ -72,7 +72,7 @@ func TestInmemoryPartMustInitFromRows(t *testing.T) { } } - f(GetLogRows(nil, nil), 0, 0) + f(GetLogRows(nil, nil, nil, ""), 0, 0) // Check how inmemoryPart works with a single stream f(newTestLogRows(1, 1, 0), 1, 0.7) @@ -108,7 +108,7 @@ func TestInmemoryPartInitFromBlockStreamReaders(t *testing.T) { maxTimestampExpected := int64(math.MinInt64) // make a copy of rrss in order to compare the results after merge. - lrOrig := GetLogRows(nil, nil) + lrOrig := GetLogRows(nil, nil, nil, "") for _, lr := range lrs { uncompressedSizeBytesExpected += uncompressedRowsSizeBytes(lr.rows) rowsCountExpected += len(lr.timestamps) @@ -188,8 +188,8 @@ func TestInmemoryPartInitFromBlockStreamReaders(t *testing.T) { // Check empty readers f(nil, 0, 0) - f([]*LogRows{GetLogRows(nil, nil)}, 0, 0) - f([]*LogRows{GetLogRows(nil, nil), GetLogRows(nil, nil)}, 0, 0) + f([]*LogRows{GetLogRows(nil, nil, nil, "")}, 0, 0) + f([]*LogRows{GetLogRows(nil, nil, nil, ""), GetLogRows(nil, nil, nil, "")}, 0, 0) // Check merge with a single reader f([]*LogRows{newTestLogRows(1, 1, 0)}, 1, 0.7) @@ -235,7 +235,7 @@ func newTestLogRows(streams, rowsPerStream int, seed int64) *LogRows { streamTags := []string{ "some-stream-tag", } - lr := GetLogRows(streamTags, nil) + lr := GetLogRows(streamTags, nil, nil, "") rng := rand.New(rand.NewSource(seed)) var fields []Field for i := 0; i < streams; i++ { @@ -322,7 +322,7 @@ func checkEqualRows(lrResult, lrOrig *LogRows) error { // // This function is for testing and debugging purposes only. func (mp *inmemoryPart) readLogRows(sbu *stringsBlockUnmarshaler, vd *valuesDecoder) *LogRows { - lr := GetLogRows(nil, nil) + lr := GetLogRows(nil, nil, nil, "") bsr := getBlockStreamReader() defer putBlockStreamReader(bsr) bsr.MustInitFromInmemoryPart(mp) diff --git a/lib/logstorage/log_rows.go b/lib/logstorage/log_rows.go index bf5553b84..2b642c199 100644 --- a/lib/logstorage/log_rows.go +++ b/lib/logstorage/log_rows.go @@ -3,16 +3,14 @@ package logstorage import ( "sort" "sync" - - "github.com/VictoriaMetrics/VictoriaMetrics/lib/bytesutil" ) // LogRows holds a set of rows needed for Storage.MustAddRows // // LogRows must be obtained via GetLogRows() type LogRows struct { - // buf holds all the bytes referred by items in LogRows - buf []byte + // a holds all the bytes referred by items in LogRows + a arena // fieldsBuf holds all the fields referred by items in LogRows fieldsBuf []Field @@ -37,6 +35,15 @@ type LogRows struct { // ignoreFields contains names for log fields, which must be skipped during data ingestion ignoreFields map[string]struct{} + + // extraFields contains extra fields to add to all the logs at MustAdd(). + extraFields []Field + + // extraStreamFields contains extraFields, which must be treated as stream fields. + extraStreamFields []Field + + // defaultMsgValue contains default value for missing _msg field + defaultMsgValue string } type sortedFields []Field @@ -79,11 +86,16 @@ func (lr *LogRows) Reset() { for k := range ifs { delete(ifs, k) } + + lr.extraFields = nil + lr.extraStreamFields = lr.extraStreamFields[:0] + + lr.defaultMsgValue = "" } // ResetKeepSettings resets rows stored in lr, while keeping its settings passed to GetLogRows(). func (lr *LogRows) ResetKeepSettings() { - lr.buf = lr.buf[:0] + lr.a.reset() fb := lr.fieldsBuf for i := range fb { @@ -116,7 +128,7 @@ func (lr *LogRows) ResetKeepSettings() { // NeedFlush returns true if lr contains too much data, so it must be flushed to the storage. func (lr *LogRows) NeedFlush() bool { - return len(lr.buf) > (maxUncompressedBlockSize/8)*7 + return len(lr.a.b) > (maxUncompressedBlockSize/8)*7 } // MustAdd adds a log entry with the given args to lr. @@ -126,15 +138,16 @@ func (lr *LogRows) NeedFlush() bool { // // field names longer than MaxFieldNameSize are automatically truncated to MaxFieldNameSize length. func (lr *LogRows) MustAdd(tenantID TenantID, timestamp int64, fields []Field) { - // Compose StreamTags from fields according to lr.streamFields - sfs := lr.streamFields + // Compose StreamTags from fields according to lr.streamFields and lr.extraStreamFields st := GetStreamTags() - for i := range fields { - f := &fields[i] - if _, ok := sfs[f.Name]; ok { + for _, f := range fields { + if _, ok := lr.streamFields[f.Name]; ok { st.Add(f.Name, f.Value) } } + for _, f := range lr.extraStreamFields { + st.Add(f.Name, f.Value) + } // Marshal StreamTags bb := bbPool.Get() @@ -152,23 +165,45 @@ func (lr *LogRows) MustAdd(tenantID TenantID, timestamp int64, fields []Field) { } func (lr *LogRows) mustAddInternal(sid streamID, timestamp int64, fields []Field, streamTagsCanonical []byte) { - buf := lr.buf - bufLen := len(buf) - buf = append(buf, streamTagsCanonical...) + streamTagsCanonicalCopy := lr.a.copyBytes(streamTagsCanonical) + lr.streamTagsCanonicals = append(lr.streamTagsCanonicals, streamTagsCanonicalCopy) - lr.streamTagsCanonicals = append(lr.streamTagsCanonicals, buf[bufLen:]) lr.streamIDs = append(lr.streamIDs, sid) lr.timestamps = append(lr.timestamps, timestamp) - // Store all the fields - ifs := lr.ignoreFields + fieldsLen := len(lr.fieldsBuf) + hasMsgField := lr.addFieldsInternal(fields, lr.ignoreFields) + if lr.addFieldsInternal(lr.extraFields, nil) { + hasMsgField = true + } + + // Add optional default _msg field + if !hasMsgField && lr.defaultMsgValue != "" { + value := lr.a.copyString(lr.defaultMsgValue) + lr.fieldsBuf = append(lr.fieldsBuf, Field{ + Value: value, + }) + } + + // Sort fields by name + lr.sf = lr.fieldsBuf[fieldsLen:] + sort.Sort(&lr.sf) + + // Add log row with sorted fields to lr.rows + lr.rows = append(lr.rows, lr.sf) +} + +func (lr *LogRows) addFieldsInternal(fields []Field, ignoreFields map[string]struct{}) bool { + if len(fields) == 0 { + return false + } + fb := lr.fieldsBuf - fieldsLen := len(fb) + hasMsgField := false for i := range fields { f := &fields[i] - if _, ok := ifs[f.Name]; ok { - // Skip fields from the ifs map + if _, ok := ignoreFields[f.Name]; ok { continue } if f.Value == "" { @@ -179,26 +214,20 @@ func (lr *LogRows) mustAddInternal(sid streamID, timestamp int64, fields []Field fb = append(fb, Field{}) dstField := &fb[len(fb)-1] - bufLen = len(buf) fieldName := f.Name if len(fieldName) > MaxFieldNameSize { fieldName = fieldName[:MaxFieldNameSize] } - if fieldName != "_msg" { - buf = append(buf, fieldName...) + if fieldName == "_msg" { + fieldName = "" + hasMsgField = true } - dstField.Name = bytesutil.ToUnsafeString(buf[bufLen:]) - - bufLen = len(buf) - buf = append(buf, f.Value...) - dstField.Value = bytesutil.ToUnsafeString(buf[bufLen:]) + dstField.Name = lr.a.copyString(fieldName) + dstField.Value = lr.a.copyString(f.Value) } - lr.sf = fb[fieldsLen:] - sort.Sort(&lr.sf) - lr.rows = append(lr.rows, lr.sf) - lr.fieldsBuf = fb - lr.buf = buf + + return hasMsgField } // GetRowString returns string representation of the row with the given idx. @@ -225,9 +254,11 @@ func (lr *LogRows) GetRowString(idx int) string { // // streamFields is a set of field names, which must be associated with the stream. // ignoreFields is a set of field names, which must be ignored during data ingestion. +// extraFields is a set of fields, which must be added to all the logs passed to MustAdd(). +// defaultMsgValue is the default value to store in non-existing or empty _msg. // // Return back it to the pool with PutLogRows() when it is no longer needed. -func GetLogRows(streamFields, ignoreFields []string) *LogRows { +func GetLogRows(streamFields, ignoreFields []string, extraFields []Field, defaultMsgValue string) *LogRows { v := logRowsPool.Get() if v == nil { v = &LogRows{} @@ -244,6 +275,14 @@ func GetLogRows(streamFields, ignoreFields []string) *LogRows { sfs[f] = struct{}{} } + // Initialize extraStreamFields + for _, f := range extraFields { + if _, ok := sfs[f.Name]; ok { + lr.extraStreamFields = append(lr.extraStreamFields, f) + delete(sfs, f.Name) + } + } + // Initialize ignoreFields ifs := lr.ignoreFields if ifs == nil { @@ -253,8 +292,17 @@ func GetLogRows(streamFields, ignoreFields []string) *LogRows { for _, f := range ignoreFields { if f != "" { ifs[f] = struct{}{} + delete(sfs, f) } } + for _, f := range extraFields { + // Extra fields must orverride the existing fields for the sake of consistency and security, + // so the client won't be able to override them. + ifs[f.Name] = struct{}{} + } + + lr.extraFields = extraFields + lr.defaultMsgValue = defaultMsgValue return lr } diff --git a/lib/logstorage/log_rows_test.go b/lib/logstorage/log_rows_test.go new file mode 100644 index 000000000..d7f112701 --- /dev/null +++ b/lib/logstorage/log_rows_test.go @@ -0,0 +1,145 @@ +package logstorage + +import ( + "reflect" + "testing" +) + +func TestLogRows_DefaultMsgValue(t *testing.T) { + type opts struct { + rows []string + + streamFields []string + ignoreFields []string + extraFields []Field + defaultMsgValue string + + resultExpected []string + } + + f := func(o opts) { + t.Helper() + + lr := GetLogRows(o.streamFields, o.ignoreFields, o.extraFields, o.defaultMsgValue) + defer PutLogRows(lr) + + tid := TenantID{ + AccountID: 123, + ProjectID: 456, + } + + p := GetJSONParser() + defer PutJSONParser(p) + for i, r := range o.rows { + if err := p.ParseLogMessage([]byte(r)); err != nil { + t.Fatalf("unexpected error when parsing %q: %s", r, err) + } + timestamp := int64(i)*1_000 + 1 + lr.MustAdd(tid, timestamp, p.Fields) + } + + var result []string + for i := range o.rows { + s := lr.GetRowString(i) + result = append(result, s) + } + if !reflect.DeepEqual(result, o.resultExpected) { + t.Fatalf("unexpected result\ngot\n%v\nwant\n%v", result, o.resultExpected) + } + } + + var o opts + + f(o) + + // default options + o = opts{ + rows: []string{ + `{"foo":"bar"}`, + `{}`, + `{"foo":"bar","a":"b"}`, + }, + resultExpected: []string{ + `{"_stream":"{}","_time":"1970-01-01T00:00:00.000000001Z","foo":"bar"}`, + `{"_stream":"{}","_time":"1970-01-01T00:00:00.000001001Z"}`, + `{"_stream":"{}","_time":"1970-01-01T00:00:00.000002001Z","a":"b","foo":"bar"}`, + }, + } + f(o) + + // stream fields + o = opts{ + rows: []string{ + `{"x":"y","foo":"bar"}`, + `{"x":"y","foo":"bar","abc":"de"}`, + `{}`, + }, + streamFields: []string{"foo", "abc"}, + resultExpected: []string{ + `{"_stream":"{foo=\"bar\"}","_time":"1970-01-01T00:00:00.000000001Z","foo":"bar","x":"y"}`, + `{"_stream":"{abc=\"de\",foo=\"bar\"}","_time":"1970-01-01T00:00:00.000001001Z","abc":"de","foo":"bar","x":"y"}`, + `{"_stream":"{}","_time":"1970-01-01T00:00:00.000002001Z"}`, + }, + } + f(o) + + // ignore fields + o = opts{ + rows: []string{ + `{"x":"y","foo":"bar"}`, + `{"x":"y"}`, + `{}`, + }, + streamFields: []string{"foo", "abc", "x"}, + ignoreFields: []string{"foo"}, + resultExpected: []string{ + `{"_stream":"{x=\"y\"}","_time":"1970-01-01T00:00:00.000000001Z","x":"y"}`, + `{"_stream":"{x=\"y\"}","_time":"1970-01-01T00:00:00.000001001Z","x":"y"}`, + `{"_stream":"{}","_time":"1970-01-01T00:00:00.000002001Z"}`, + }, + } + f(o) + + // extra fields + o = opts{ + rows: []string{ + `{"x":"y","foo":"bar"}`, + `{}`, + }, + streamFields: []string{"foo", "abc", "x"}, + ignoreFields: []string{"foo"}, + extraFields: []Field{ + { + Name: "foo", + Value: "test", + }, + { + Name: "abc", + Value: "1234", + }, + }, + resultExpected: []string{ + `{"_stream":"{abc=\"1234\",foo=\"test\",x=\"y\"}","_time":"1970-01-01T00:00:00.000000001Z","abc":"1234","foo":"test","x":"y"}`, + `{"_stream":"{abc=\"1234\",foo=\"test\"}","_time":"1970-01-01T00:00:00.000001001Z","abc":"1234","foo":"test"}`, + }, + } + f(o) + + // default _msg value + o = opts{ + rows: []string{ + `{"x":"y","foo":"bar"}`, + `{"_msg":"ppp"}`, + `{"abc":"ppp"}`, + }, + streamFields: []string{"abc", "x"}, + defaultMsgValue: "qwert", + resultExpected: []string{ + `{"_msg":"qwert","_stream":"{x=\"y\"}","_time":"1970-01-01T00:00:00.000000001Z","foo":"bar","x":"y"}`, + `{"_msg":"ppp","_stream":"{}","_time":"1970-01-01T00:00:00.000001001Z"}`, + `{"_msg":"qwert","_stream":"{abc=\"ppp\"}","_time":"1970-01-01T00:00:00.000002001Z","abc":"ppp"}`, + }, + } + f(o) + +} diff --git a/lib/logstorage/log_rows_timing_test.go b/lib/logstorage/log_rows_timing_test.go index 55a726e1b..32023e120 100644 --- a/lib/logstorage/log_rows_timing_test.go +++ b/lib/logstorage/log_rows_timing_test.go @@ -52,7 +52,7 @@ func BenchmarkLogRowsMustAdd(b *testing.B) { } func benchmarkLogRowsMustAdd(rows [][]Field, streamFields []string) { - lr := GetLogRows(streamFields, nil) + lr := GetLogRows(streamFields, nil, nil, "") var tid TenantID for i, fields := range rows { tid.AccountID = uint32(i) diff --git a/lib/logstorage/storage.go b/lib/logstorage/storage.go index a5de2b88e..7b2f75cb2 100644 --- a/lib/logstorage/storage.go +++ b/lib/logstorage/storage.go @@ -549,7 +549,7 @@ func (s *Storage) MustAddRows(lr *LogRows) { } lrPart := m[day] if lrPart == nil { - lrPart = GetLogRows(nil, nil) + lrPart = GetLogRows(nil, nil, nil, "") m[day] = lrPart } lrPart.mustAddInternal(lr.streamIDs[i], ts, lr.rows[i], lr.streamTagsCanonicals[i]) diff --git a/lib/logstorage/storage_search_test.go b/lib/logstorage/storage_search_test.go index 35530309e..8e5375b9a 100644 --- a/lib/logstorage/storage_search_test.go +++ b/lib/logstorage/storage_search_test.go @@ -47,7 +47,7 @@ func TestStorageRunQuery(t *testing.T) { for j := 0; j < streamsPerTenant; j++ { streamIDValue := fmt.Sprintf("stream_id=%d", j) for k := 0; k < blocksPerStream; k++ { - lr := GetLogRows(streamTags, nil) + lr := GetLogRows(streamTags, nil, nil, "") for m := 0; m < rowsPerBlock; m++ { timestamp := baseTimestamp + int64(m)*1e9 + int64(k) // Append stream fields @@ -774,7 +774,7 @@ func TestStorageSearch(t *testing.T) { allTenantIDs = append(allTenantIDs, tenantID) for j := 0; j < streamsPerTenant; j++ { for k := 0; k < blocksPerStream; k++ { - lr := GetLogRows(streamTags, nil) + lr := GetLogRows(streamTags, nil, nil, "") for m := 0; m < rowsPerBlock; m++ { timestamp := baseTimestamp + int64(m)*1e9 + int64(k) // Append stream fields From a86df52adf6927bf96c5ef8da13a4f2ae5cdc57e Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 1 Nov 2024 20:13:23 +0100 Subject: [PATCH 84/90] docs/VictoriaLogs/LogsQL.md: typo fix in the link to description for sum_len stats function: sum-len-stats -> sum_len-stats This is a follow-up for 364f084b43694be52eea81db7ff07261342e8b5c --- docs/VictoriaLogs/LogsQL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/VictoriaLogs/LogsQL.md b/docs/VictoriaLogs/LogsQL.md index 9e71c20c0..9979b9c14 100644 --- a/docs/VictoriaLogs/LogsQL.md +++ b/docs/VictoriaLogs/LogsQL.md @@ -1771,7 +1771,7 @@ _time:5m | len(_msg) as msg_len | sort by (msg_len desc) | limit 1 See also: -- [`sum_len` stats function](#sum-len-stats) +- [`sum_len` stats function](#sum_len-stats) - [`sort` pipe](#sort-pipe) - [`limit` pipe](#limit-pipe) From c7e242b8cefe065f3fd92af4c52d661fb5d2538e Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 1 Nov 2024 20:25:31 +0100 Subject: [PATCH 85/90] docs/VictoriaLogs/LogsQL.md: remove misleading information that `min` and `max` stats functions work only for numeric values These functions work for both numeric and string values after ad505a7a9ae90bf081c4d056fac4f44753614256 --- docs/VictoriaLogs/LogsQL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/VictoriaLogs/LogsQL.md b/docs/VictoriaLogs/LogsQL.md index 9979b9c14..c4178b659 100644 --- a/docs/VictoriaLogs/LogsQL.md +++ b/docs/VictoriaLogs/LogsQL.md @@ -2761,9 +2761,9 @@ LogsQL supports the following functions for [`stats` pipe](#stats-pipe): - [`count`](#count-stats) returns the number of log entries. - [`count_empty`](#count_empty-stats) returns the number logs with empty [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model). - [`count_uniq`](#count_uniq-stats) returns the number of unique non-empty values for the given [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model). -- [`max`](#max-stats) returns the maximum value over the given numeric [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model). +- [`max`](#max-stats) returns the maximum value over the given [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model). - [`median`](#median-stats) returns the [median](https://en.wikipedia.org/wiki/Median) value over the given numeric [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model). -- [`min`](#min-stats) returns the minumum value over the given numeric [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model). +- [`min`](#min-stats) returns the minumum value over the given [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model). - [`quantile`](#quantile-stats) returns the given quantile for the given numeric [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model). - [`row_any`](#row_any-stats) returns a sample [log entry](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) per each selected [stats group](#stats-by-fields). - [`row_max`](#row_max-stats) returns the [log entry](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) with the minimum value at the given field. From 37a58677fa980039391185699705db4a5ecc8559 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sat, 2 Nov 2024 11:36:22 +0100 Subject: [PATCH 86/90] docs/VictoriaLogs/data-ingestion: mention Grafana Agent and Grafana Alloy additionally to Promtail as log collectors for Grafana Loki --- docs/VictoriaLogs/data-ingestion/Promtail.md | 13 +++++++------ docs/VictoriaLogs/data-ingestion/README.md | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/VictoriaLogs/data-ingestion/Promtail.md b/docs/VictoriaLogs/data-ingestion/Promtail.md index ca0cdf76a..6925df688 100644 --- a/docs/VictoriaLogs/data-ingestion/Promtail.md +++ b/docs/VictoriaLogs/data-ingestion/Promtail.md @@ -11,15 +11,16 @@ aliases: - /victorialogs/data-ingestion/Promtail.html - /victorialogs/data-ingestion/promtail.html --- -[Promtail](https://grafana.com/docs/loki/latest/clients/promtail/) is a default log shipper for Grafana Loki. -Promtail can be configured to send the collected logs to VictoriaLogs according to the following docs. +[Promtail](https://grafana.com/docs/loki/latest/clients/promtail/), [Grafana Agent](https://grafana.com/docs/agent/latest/) +and [Grafana Alloy](https://grafana.com/docs/alloy/latest/) are default log collectors for Grafana Loki. +They can be configured to send the collected logs to VictoriaLogs according to the following docs. Specify [`clients`](https://grafana.com/docs/loki/latest/clients/promtail/configuration/#clients) section in the configuration file for sending the collected logs to [VictoriaLogs](https://docs.victoriametrics.com/victorialogs/): ```yaml clients: - - url: http://localhost:9428/insert/loki/api/v1/push?_stream_fields=instance,job,host,app + - url: "http://localhost:9428/insert/loki/api/v1/push?_stream_fields=instance,job,host,app" ``` Substitute `localhost:9428` address inside `clients` with the real TCP address of VictoriaLogs. @@ -40,7 +41,7 @@ and inspecting VictoriaLogs logs then: ```yaml clients: - - url: http://localhost:9428/insert/loki/api/v1/push?_stream_fields=instance,job,host,app&debug=1 + - url: "http://localhost:9428/insert/loki/api/v1/push?_stream_fields=instance,job,host,app&debug=1" ``` If some [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) must be skipped @@ -49,7 +50,7 @@ For example, the following config instructs VictoriaLogs to ignore `filename` an ```yaml clients: - - url: http://localhost:9428/insert/loki/api/v1/push?_stream_fields=instance,job,host,app&ignore_fields=filename,stream + - url: 'http://localhost:9428/insert/loki/api/v1/push?_stream_fields=instance,job,host,app&ignore_fields=filename,stream' ``` By default the ingested logs are stored in the `(AccountID=0, ProjectID=0)` [tenant](https://docs.victoriametrics.com/victorialogs/#multitenancy). @@ -60,7 +61,7 @@ For example, the following config instructs VictoriaLogs to store logs in the `( ```yaml clients: - - url: http://localhost:9428/insert/loki/api/v1/push?_stream_fields=instance,job,host,app&debug=1 + - url: "http://localhost:9428/insert/loki/api/v1/push?_stream_fields=instance,job,host,app&debug=1" tenant_id: "12:34" ``` diff --git a/docs/VictoriaLogs/data-ingestion/README.md b/docs/VictoriaLogs/data-ingestion/README.md index 4be5d9a2e..09e56f58c 100644 --- a/docs/VictoriaLogs/data-ingestion/README.md +++ b/docs/VictoriaLogs/data-ingestion/README.md @@ -6,7 +6,7 @@ - Fluentd - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/fluentd/). - Logstash - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/logstash/). - Vector - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/vector/). -- Promtail (aka Grafana Loki) - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/promtail/). +- Promtail (aka Grafana Loki, Grafana Agent or Grafana Alloy) - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/promtail/). - Telegraf - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/telegraf/). - OpenTelemetry Collector - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/opentelemetry/). - Journald - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/journald/). From 5733e56e403bba397cedb7bdd8b5aa3bc2c55354 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sat, 2 Nov 2024 12:31:36 +0100 Subject: [PATCH 87/90] docs/VictoriaLogs/querying: refer to vlogscli from docs for /select/logsql/query and /select/logsql/tail HTTP endpoints These endpoints are easier to query via vlogscli --- docs/VictoriaLogs/querying/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/VictoriaLogs/querying/README.md b/docs/VictoriaLogs/querying/README.md index 089644cb6..bc4d02ea2 100644 --- a/docs/VictoriaLogs/querying/README.md +++ b/docs/VictoriaLogs/querying/README.md @@ -1,6 +1,7 @@ [VictoriaLogs](https://docs.victoriametrics.com/victorialogs/) can be queried with [LogsQL](https://docs.victoriametrics.com/victorialogs/logsql/) via the following ways: +- [vlogscli](https://docs.victoriametrics.com/victorialogs/querying/vlogscli/) - [Command-line interface](#command-line) - [HTTP API](#http-api) - [Web UI](#web-ui) - a web-based UI for querying logs @@ -106,6 +107,7 @@ with `vl_http_requests_total{path="/select/logsql/query"}` metric. See also: +- [vlogscli](https://docs.victoriametrics.com/victorialogs/querying/vlogscli/) - [Extra filters](#extra-filters) - [Live tailing](#live-tailing) - [Querying hits stats](#querying-hits-stats) @@ -161,6 +163,7 @@ with `vl_live_tailing_requests` metric. See also: +- [Live tailing in vlogscli](https://docs.victoriametrics.com/victorialogs/querying/vlogscli/#live-tailing) - [Extra filters](#extra-filters) - [Querying logs](#querying-logs) - [Querying streams](#querying-streams) From 9f9cc24e4caa04e581b23d4949cabd4b000b8544 Mon Sep 17 00:00:00 2001 From: Zakhar Bessarab Date: Mon, 4 Nov 2024 10:29:14 -0300 Subject: [PATCH 88/90] Revert "lib/mergeset: add sparse indexdb cache (#7269)" This reverts commit 837d0d136dda3d4dc96ce18eecc2f24c45a2e955. --- app/vmstorage/main.go | 8 ---- docs/Cluster-VictoriaMetrics.md | 3 -- docs/README.md | 3 -- lib/logstorage/indexdb.go | 2 +- lib/mergeset/part.go | 21 +-------- lib/mergeset/part_search.go | 13 ++--- lib/mergeset/part_search_test.go | 2 +- lib/mergeset/table.go | 12 ----- lib/mergeset/table_search.go | 4 +- lib/mergeset/table_search_test.go | 2 +- lib/mergeset/table_search_timing_test.go | 2 +- lib/mergeset/table_test.go | 6 +-- lib/storage/index_db.go | 60 ++---------------------- 13 files changed, 16 insertions(+), 122 deletions(-) diff --git a/app/vmstorage/main.go b/app/vmstorage/main.go index 698277502..01235c0c2 100644 --- a/app/vmstorage/main.go +++ b/app/vmstorage/main.go @@ -67,8 +67,6 @@ var ( "See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning") cacheSizeIndexDBDataBlocks = flagutil.NewBytes("storage.cacheSizeIndexDBDataBlocks", 0, "Overrides max size for indexdb/dataBlocks cache. "+ "See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning") - cacheSizeIndexDBDataBlocksSparse = flagutil.NewBytes("storage.cacheSizeIndexDBDataBlocksSparse", 0, "Overrides max size for indexdb/dataBlocksSparse cache. "+ - "See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning") cacheSizeIndexDBTagFilters = flagutil.NewBytes("storage.cacheSizeIndexDBTagFilters", 0, "Overrides max size for indexdb/tagFiltersToMetricIDs cache. "+ "See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning") ) @@ -102,7 +100,6 @@ func Init(resetCacheIfNeeded func(mrs []storage.MetricRow)) { storage.SetTagFiltersCacheSize(cacheSizeIndexDBTagFilters.IntN()) mergeset.SetIndexBlocksCacheSize(cacheSizeIndexDBIndexBlocks.IntN()) mergeset.SetDataBlocksCacheSize(cacheSizeIndexDBDataBlocks.IntN()) - mergeset.SetDataBlocksSparseCacheSize(cacheSizeIndexDBDataBlocksSparse.IntN()) if retentionPeriod.Duration() < 24*time.Hour { logger.Fatalf("-retentionPeriod cannot be smaller than a day; got %s", retentionPeriod) @@ -584,7 +581,6 @@ func writeStorageMetrics(w io.Writer, strg *storage.Storage) { metrics.WriteGaugeUint64(w, `vm_cache_entries{type="storage/next_day_metric_ids"}`, m.NextDayMetricIDCacheSize) metrics.WriteGaugeUint64(w, `vm_cache_entries{type="storage/indexBlocks"}`, tm.IndexBlocksCacheSize) metrics.WriteGaugeUint64(w, `vm_cache_entries{type="indexdb/dataBlocks"}`, idbm.DataBlocksCacheSize) - metrics.WriteGaugeUint64(w, `vm_cache_entries{type="indexdb/dataBlocksSparse"}`, idbm.DataBlocksSparseCacheSize) metrics.WriteGaugeUint64(w, `vm_cache_entries{type="indexdb/indexBlocks"}`, idbm.IndexBlocksCacheSize) metrics.WriteGaugeUint64(w, `vm_cache_entries{type="indexdb/tagFiltersToMetricIDs"}`, idbm.TagFiltersToMetricIDsCacheSize) metrics.WriteGaugeUint64(w, `vm_cache_entries{type="storage/regexps"}`, uint64(storage.RegexpCacheSize())) @@ -596,7 +592,6 @@ func writeStorageMetrics(w io.Writer, strg *storage.Storage) { metrics.WriteGaugeUint64(w, `vm_cache_size_bytes{type="storage/metricName"}`, m.MetricNameCacheSizeBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_bytes{type="storage/indexBlocks"}`, tm.IndexBlocksCacheSizeBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_bytes{type="indexdb/dataBlocks"}`, idbm.DataBlocksCacheSizeBytes) - metrics.WriteGaugeUint64(w, `vm_cache_size_bytes{type="indexdb/dataBlocksSparse"}`, idbm.DataBlocksSparseCacheSizeBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_bytes{type="indexdb/indexBlocks"}`, idbm.IndexBlocksCacheSizeBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_bytes{type="storage/date_metricID"}`, m.DateMetricIDCacheSizeBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_bytes{type="storage/hour_metric_ids"}`, m.HourMetricIDCacheSizeBytes) @@ -611,7 +606,6 @@ func writeStorageMetrics(w io.Writer, strg *storage.Storage) { metrics.WriteGaugeUint64(w, `vm_cache_size_max_bytes{type="storage/metricName"}`, m.MetricNameCacheSizeMaxBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_max_bytes{type="storage/indexBlocks"}`, tm.IndexBlocksCacheSizeMaxBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_max_bytes{type="indexdb/dataBlocks"}`, idbm.DataBlocksCacheSizeMaxBytes) - metrics.WriteGaugeUint64(w, `vm_cache_size_max_bytes{type="indexdb/dataBlocksSparse"}`, idbm.DataBlocksSparseCacheSizeMaxBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_max_bytes{type="indexdb/indexBlocks"}`, idbm.IndexBlocksCacheSizeMaxBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_max_bytes{type="indexdb/tagFiltersToMetricIDs"}`, idbm.TagFiltersToMetricIDsCacheSizeMaxBytes) metrics.WriteGaugeUint64(w, `vm_cache_size_max_bytes{type="storage/regexps"}`, uint64(storage.RegexpCacheMaxSizeBytes())) @@ -622,7 +616,6 @@ func writeStorageMetrics(w io.Writer, strg *storage.Storage) { metrics.WriteCounterUint64(w, `vm_cache_requests_total{type="storage/metricName"}`, m.MetricNameCacheRequests) metrics.WriteCounterUint64(w, `vm_cache_requests_total{type="storage/indexBlocks"}`, tm.IndexBlocksCacheRequests) metrics.WriteCounterUint64(w, `vm_cache_requests_total{type="indexdb/dataBlocks"}`, idbm.DataBlocksCacheRequests) - metrics.WriteCounterUint64(w, `vm_cache_requests_total{type="indexdb/dataBlocksSparse"}`, idbm.DataBlocksSparseCacheRequests) metrics.WriteCounterUint64(w, `vm_cache_requests_total{type="indexdb/indexBlocks"}`, idbm.IndexBlocksCacheRequests) metrics.WriteCounterUint64(w, `vm_cache_requests_total{type="indexdb/tagFiltersToMetricIDs"}`, idbm.TagFiltersToMetricIDsCacheRequests) metrics.WriteCounterUint64(w, `vm_cache_requests_total{type="storage/regexps"}`, storage.RegexpCacheRequests()) @@ -633,7 +626,6 @@ func writeStorageMetrics(w io.Writer, strg *storage.Storage) { metrics.WriteCounterUint64(w, `vm_cache_misses_total{type="storage/metricName"}`, m.MetricNameCacheMisses) metrics.WriteCounterUint64(w, `vm_cache_misses_total{type="storage/indexBlocks"}`, tm.IndexBlocksCacheMisses) metrics.WriteCounterUint64(w, `vm_cache_misses_total{type="indexdb/dataBlocks"}`, idbm.DataBlocksCacheMisses) - metrics.WriteCounterUint64(w, `vm_cache_misses_total{type="indexdb/dataBlocksSparse"}`, idbm.DataBlocksSparseCacheMisses) metrics.WriteCounterUint64(w, `vm_cache_misses_total{type="indexdb/indexBlocks"}`, idbm.IndexBlocksCacheMisses) metrics.WriteCounterUint64(w, `vm_cache_misses_total{type="indexdb/tagFiltersToMetricIDs"}`, idbm.TagFiltersToMetricIDsCacheMisses) metrics.WriteCounterUint64(w, `vm_cache_misses_total{type="storage/regexps"}`, storage.RegexpCacheMisses()) diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md index adaf8541e..2ff400a52 100644 --- a/docs/Cluster-VictoriaMetrics.md +++ b/docs/Cluster-VictoriaMetrics.md @@ -1910,9 +1910,6 @@ Below is the output for `/path/to/vmstorage -help`: -storage.cacheSizeIndexDBDataBlocks size Overrides max size for indexdb/dataBlocks cache. See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning Supports the following optional suffixes for size values: KB, MB, GB, TB, KiB, MiB, GiB, TiB (default 0) - -storage.cacheSizeIndexDBDataBlocksSparse size - Overrides max size for indexdb/dataBlocksSparse cache. See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning - Supports the following optional suffixes for size values: KB, MB, GB, TB, KiB, MiB, GiB, TiB (default 0) -storage.cacheSizeIndexDBIndexBlocks size Overrides max size for indexdb/indexBlocks cache. See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning Supports the following optional suffixes for size values: KB, MB, GB, TB, KiB, MiB, GiB, TiB (default 0) diff --git a/docs/README.md b/docs/README.md index 1aec6a539..e4885bab0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3267,9 +3267,6 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -storage.cacheSizeIndexDBDataBlocks size Overrides max size for indexdb/dataBlocks cache. See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning Supports the following optional suffixes for size values: KB, MB, GB, TB, KiB, MiB, GiB, TiB (default 0) - -storage.cacheSizeIndexDBDataBlocksSparse size - Overrides max size for indexdb/dataBlocksSparse cache. See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning - Supports the following optional suffixes for size values: KB, MB, GB, TB, KiB, MiB, GiB, TiB (default 0) -storage.cacheSizeIndexDBIndexBlocks size Overrides max size for indexdb/indexBlocks cache. See https://docs.victoriametrics.com/single-server-victoriametrics/#cache-tuning Supports the following optional suffixes for size values: KB, MB, GB, TB, KiB, MiB, GiB, TiB (default 0) diff --git a/lib/logstorage/indexdb.go b/lib/logstorage/indexdb.go index 89efb6015..811d2b536 100644 --- a/lib/logstorage/indexdb.go +++ b/lib/logstorage/indexdb.go @@ -166,7 +166,7 @@ func (idb *indexdb) getIndexSearch() *indexSearch { } } is := v.(*indexSearch) - is.ts.Init(idb.tb, false) + is.ts.Init(idb.tb) return is } diff --git a/lib/mergeset/part.go b/lib/mergeset/part.go index 9fc6e1ed6..da47f1ccc 100644 --- a/lib/mergeset/part.go +++ b/lib/mergeset/part.go @@ -14,7 +14,6 @@ import ( var idxbCache = blockcache.NewCache(getMaxIndexBlocksCacheSize) var ibCache = blockcache.NewCache(getMaxInmemoryBlocksCacheSize) -var ibSparseCache = blockcache.NewCache(getMaxInmemoryBlocksSparseCacheSize) // SetIndexBlocksCacheSize overrides the default size of indexdb/indexBlocks cache func SetIndexBlocksCacheSize(size int) { @@ -43,32 +42,15 @@ func SetDataBlocksCacheSize(size int) { func getMaxInmemoryBlocksCacheSize() int { maxInmemoryBlockCacheSizeOnce.Do(func() { if maxInmemoryBlockCacheSize <= 0 { - maxInmemoryBlockCacheSize = int(0.20 * float64(memory.Allowed())) + maxInmemoryBlockCacheSize = int(0.25 * float64(memory.Allowed())) } }) return maxInmemoryBlockCacheSize } -// SetDataBlocksSparseCacheSize overrides the default size of indexdb/dataBlocksSparse cache -func SetDataBlocksSparseCacheSize(size int) { - maxInmemorySparseMergeCacheSize = size -} - -func getMaxInmemoryBlocksSparseCacheSize() int { - maxInmemoryBlockSparseCacheSizeOnce.Do(func() { - if maxInmemorySparseMergeCacheSize <= 0 { - maxInmemorySparseMergeCacheSize = int(0.05 * float64(memory.Allowed())) - } - }) - return maxInmemorySparseMergeCacheSize -} - var ( maxInmemoryBlockCacheSize int maxInmemoryBlockCacheSizeOnce sync.Once - - maxInmemorySparseMergeCacheSize int - maxInmemoryBlockSparseCacheSizeOnce sync.Once ) type part struct { @@ -136,7 +118,6 @@ func (p *part) MustClose() { idxbCache.RemoveBlocksForPart(p) ibCache.RemoveBlocksForPart(p) - ibSparseCache.RemoveBlocksForPart(p) } type indexBlock struct { diff --git a/lib/mergeset/part_search.go b/lib/mergeset/part_search.go index 48f854b99..29a0a6723 100644 --- a/lib/mergeset/part_search.go +++ b/lib/mergeset/part_search.go @@ -36,8 +36,6 @@ type partSearch struct { ib *inmemoryBlock ibItemIdx int - - sparse bool } func (ps *partSearch) reset() { @@ -59,11 +57,10 @@ func (ps *partSearch) reset() { // Init initializes ps for search in the p. // // Use Seek for search in p. -func (ps *partSearch) Init(p *part, sparse bool) { +func (ps *partSearch) Init(p *part) { ps.reset() ps.p = p - ps.sparse = sparse } // Seek seeks for the first item greater or equal to k in ps. @@ -302,22 +299,18 @@ func (ps *partSearch) readIndexBlock(mr *metaindexRow) (*indexBlock, error) { } func (ps *partSearch) getInmemoryBlock(bh *blockHeader) (*inmemoryBlock, error) { - cache := ibCache - if ps.sparse { - cache = ibSparseCache - } ibKey := blockcache.Key{ Part: ps.p, Offset: bh.itemsBlockOffset, } - b := cache.GetBlock(ibKey) + b := ibCache.GetBlock(ibKey) if b == nil { ib, err := ps.readInmemoryBlock(bh) if err != nil { return nil, err } b = ib - cache.PutBlock(ibKey, b) + ibCache.PutBlock(ibKey, b) } ib := b.(*inmemoryBlock) return ib, nil diff --git a/lib/mergeset/part_search_test.go b/lib/mergeset/part_search_test.go index 0cd076ca2..fb141b3f7 100644 --- a/lib/mergeset/part_search_test.go +++ b/lib/mergeset/part_search_test.go @@ -54,7 +54,7 @@ func testPartSearchConcurrent(p *part, items []string) error { func testPartSearchSerial(r *rand.Rand, p *part, items []string) error { var ps partSearch - ps.Init(p, true) + ps.Init(p) var k []byte // Search for the item smaller than the items[0] diff --git a/lib/mergeset/table.go b/lib/mergeset/table.go index 6559a2c48..f4b7edcdc 100644 --- a/lib/mergeset/table.go +++ b/lib/mergeset/table.go @@ -574,12 +574,6 @@ type TableMetrics struct { DataBlocksCacheRequests uint64 DataBlocksCacheMisses uint64 - DataBlocksSparseCacheSize uint64 - DataBlocksSparseCacheSizeBytes uint64 - DataBlocksSparseCacheSizeMaxBytes uint64 - DataBlocksSparseCacheRequests uint64 - DataBlocksSparseCacheMisses uint64 - IndexBlocksCacheSize uint64 IndexBlocksCacheSizeBytes uint64 IndexBlocksCacheSizeMaxBytes uint64 @@ -641,12 +635,6 @@ func (tb *Table) UpdateMetrics(m *TableMetrics) { m.DataBlocksCacheRequests = ibCache.Requests() m.DataBlocksCacheMisses = ibCache.Misses() - m.DataBlocksSparseCacheSize = uint64(ibSparseCache.Len()) - m.DataBlocksSparseCacheSizeBytes = uint64(ibSparseCache.SizeBytes()) - m.DataBlocksSparseCacheSizeMaxBytes = uint64(ibSparseCache.SizeMaxBytes()) - m.DataBlocksSparseCacheRequests = ibSparseCache.Requests() - m.DataBlocksSparseCacheMisses = ibSparseCache.Misses() - m.IndexBlocksCacheSize = uint64(idxbCache.Len()) m.IndexBlocksCacheSizeBytes = uint64(idxbCache.SizeBytes()) m.IndexBlocksCacheSizeMaxBytes = uint64(idxbCache.SizeMaxBytes()) diff --git a/lib/mergeset/table_search.go b/lib/mergeset/table_search.go index c006f91f3..2da5f0cca 100644 --- a/lib/mergeset/table_search.go +++ b/lib/mergeset/table_search.go @@ -59,7 +59,7 @@ func (ts *TableSearch) reset() { // Init initializes ts for searching in the tb. // // MustClose must be called when the ts is no longer needed. -func (ts *TableSearch) Init(tb *Table, sparse bool) { +func (ts *TableSearch) Init(tb *Table) { if ts.needClosing { logger.Panicf("BUG: missing MustClose call before the next call to Init") } @@ -74,7 +74,7 @@ func (ts *TableSearch) Init(tb *Table, sparse bool) { // Initialize the psPool. ts.psPool = slicesutil.SetLength(ts.psPool, len(ts.pws)) for i, pw := range ts.pws { - ts.psPool[i].Init(pw.p, sparse) + ts.psPool[i].Init(pw.p) } } diff --git a/lib/mergeset/table_search_test.go b/lib/mergeset/table_search_test.go index 5bc2ae02a..79a652ff7 100644 --- a/lib/mergeset/table_search_test.go +++ b/lib/mergeset/table_search_test.go @@ -107,7 +107,7 @@ func testTableSearchConcurrent(tb *Table, items []string) error { func testTableSearchSerial(tb *Table, items []string) error { var ts TableSearch - ts.Init(tb, false) + ts.Init(tb) for _, key := range []string{ "", "123", diff --git a/lib/mergeset/table_search_timing_test.go b/lib/mergeset/table_search_timing_test.go index f97d55f5f..f8deb4d17 100644 --- a/lib/mergeset/table_search_timing_test.go +++ b/lib/mergeset/table_search_timing_test.go @@ -83,7 +83,7 @@ func benchmarkTableSearchKeysExt(b *testing.B, tb *Table, keys [][]byte, stripSu b.RunParallel(func(pb *testing.PB) { r := rand.New(rand.NewSource(1)) var ts TableSearch - ts.Init(tb, false) + ts.Init(tb) defer ts.MustClose() for pb.Next() { startIdx := r.Intn(len(keys) - searchKeysCount) diff --git a/lib/mergeset/table_test.go b/lib/mergeset/table_test.go index eb474471d..810dd5a04 100644 --- a/lib/mergeset/table_test.go +++ b/lib/mergeset/table_test.go @@ -139,9 +139,9 @@ func TestTableCreateSnapshotAt(t *testing.T) { tb2 := MustOpenTable(snapshot2, nil, nil, &isReadOnly) var ts, ts1, ts2 TableSearch - ts.Init(tb, false) - ts1.Init(tb1, false) - ts2.Init(tb2, false) + ts.Init(tb) + ts1.Init(tb1) + ts2.Init(tb2) for i := 0; i < itemsCount; i++ { key := []byte(fmt.Sprintf("item %d", i)) if err := ts.FirstItemWithPrefix(key); err != nil { diff --git a/lib/storage/index_db.go b/lib/storage/index_db.go index a7c4068e5..c935e33b8 100644 --- a/lib/storage/index_db.go +++ b/lib/storage/index_db.go @@ -14,9 +14,6 @@ import ( "time" "unsafe" - "github.com/VictoriaMetrics/fastcache" - "github.com/cespare/xxhash/v2" - "github.com/VictoriaMetrics/VictoriaMetrics/lib/bytesutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/encoding" "github.com/VictoriaMetrics/VictoriaMetrics/lib/fasttime" @@ -28,6 +25,8 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/slicesutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/uint64set" "github.com/VictoriaMetrics/VictoriaMetrics/lib/workingsetcache" + "github.com/VictoriaMetrics/fastcache" + "github.com/cespare/xxhash/v2" ) const ( @@ -521,21 +520,7 @@ type indexSearch struct { deadline uint64 } -// getIndexSearch returns an indexSearch with default configuration func (db *indexDB) getIndexSearch(deadline uint64) *indexSearch { - return db.getIndexSearchInternal(deadline, false) -} - -// getIndexSearchSparse returns an indexSearch with sparse cache -// It is useful for search operations that can scan through the large amount index entries -// Without the need to keep all the entries in the caches used for queries -// used in ENT version -// nolint:unused -func (db *indexDB) getIndexSearchSparse(deadline uint64) *indexSearch { - return db.getIndexSearchInternal(deadline, true) -} - -func (db *indexDB) getIndexSearchInternal(deadline uint64, sparse bool) *indexSearch { v := db.indexSearchPool.Get() if v == nil { v = &indexSearch{ @@ -543,7 +528,7 @@ func (db *indexDB) getIndexSearchInternal(deadline uint64, sparse bool) *indexSe } } is := v.(*indexSearch) - is.ts.Init(db.tb, sparse) + is.ts.Init(db.tb) is.deadline = deadline return is } @@ -1579,45 +1564,6 @@ func (db *indexDB) searchMetricNameWithCache(dst []byte, metricID uint64) ([]byt return dst, false } -// searchMetricNameWithoutCache appends metric name for the given metricID to dst -// and returns the result. -// It does not cache the result and uses sparse cache for index scan. -// used in ENT version -// nolint:unused -func (db *indexDB) searchMetricNameWithoutCache(dst []byte, metricID uint64) ([]byte, bool) { - is := db.getIndexSearchSparse(noDeadline) - var ok bool - dst, ok = is.searchMetricName(dst, metricID) - db.putIndexSearch(is) - if ok { - // There is no need in verifying whether the given metricID is deleted, - // since the filtering must be performed before calling this func. - return dst, true - } - - // Try searching in the external indexDB. - db.doExtDB(func(extDB *indexDB) { - is := extDB.getIndexSearchSparse(noDeadline) - dst, ok = is.searchMetricName(dst, metricID) - extDB.putIndexSearch(is) - }) - if ok { - return dst, true - } - - if db.s.wasMetricIDMissingBefore(metricID) { - // Cannot find the MetricName for the given metricID for the last 60 seconds. - // It is likely the indexDB contains incomplete set of metricID -> metricName entries - // after unclean shutdown or after restoring from a snapshot. - // Mark the metricID as deleted, so it is created again when new sample - // for the given time series is ingested next time. - db.missingMetricNamesForMetricID.Add(1) - db.deleteMetricIDs([]uint64{metricID}) - } - - return dst, false -} - // DeleteTSIDs marks as deleted all the TSIDs matching the given tfss and // updates or resets all caches where TSIDs and the corresponding MetricIDs may // be stored. From e8adbc9f093157052d39e414acf076c70956c295 Mon Sep 17 00:00:00 2001 From: Zakhar Bessarab Date: Mon, 4 Nov 2024 10:59:42 -0300 Subject: [PATCH 89/90] app/{vmselect,vlselect}: run make vmui-update vmui-logs-update Signed-off-by: Zakhar Bessarab --- app/vlselect/vmui/asset-manifest.json | 4 ++-- app/vlselect/vmui/index.html | 2 +- .../vmui/static/js/{main.64aea685.js => main.aaafe439.js} | 4 ++-- ....64aea685.js.LICENSE.txt => main.aaafe439.js.LICENSE.txt} | 0 app/vmselect/vmui/asset-manifest.json | 4 ++-- app/vmselect/vmui/config.json | 5 +++++ app/vmselect/vmui/index.html | 2 +- app/vmselect/vmui/static/js/main.68e2aae8.js | 2 -- app/vmselect/vmui/static/js/main.7ec4e6eb.js | 2 ++ ....68e2aae8.js.LICENSE.txt => main.7ec4e6eb.js.LICENSE.txt} | 0 10 files changed, 15 insertions(+), 10 deletions(-) rename app/vlselect/vmui/static/js/{main.64aea685.js => main.aaafe439.js} (78%) rename app/vlselect/vmui/static/js/{main.64aea685.js.LICENSE.txt => main.aaafe439.js.LICENSE.txt} (100%) create mode 100644 app/vmselect/vmui/config.json delete mode 100644 app/vmselect/vmui/static/js/main.68e2aae8.js create mode 100644 app/vmselect/vmui/static/js/main.7ec4e6eb.js rename app/vmselect/vmui/static/js/{main.68e2aae8.js.LICENSE.txt => main.7ec4e6eb.js.LICENSE.txt} (100%) diff --git a/app/vlselect/vmui/asset-manifest.json b/app/vlselect/vmui/asset-manifest.json index 7f7c1a14f..af4aeded1 100644 --- a/app/vlselect/vmui/asset-manifest.json +++ b/app/vlselect/vmui/asset-manifest.json @@ -1,13 +1,13 @@ { "files": { "main.css": "./static/css/main.faf86aa5.css", - "main.js": "./static/js/main.64aea685.js", + "main.js": "./static/js/main.aaafe439.js", "static/js/685.f772060c.chunk.js": "./static/js/685.f772060c.chunk.js", "static/media/MetricsQL.md": "./static/media/MetricsQL.a00044c91d9781cf8557.md", "index.html": "./index.html" }, "entrypoints": [ "static/css/main.faf86aa5.css", - "static/js/main.64aea685.js" + "static/js/main.aaafe439.js" ] } \ No newline at end of file diff --git a/app/vlselect/vmui/index.html b/app/vlselect/vmui/index.html index 165edef93..cb49ffcbb 100644 --- a/app/vlselect/vmui/index.html +++ b/app/vlselect/vmui/index.html @@ -1 +1 @@ -UI for VictoriaLogs
    \ No newline at end of file +UI for VictoriaLogs
    \ No newline at end of file diff --git a/app/vlselect/vmui/static/js/main.64aea685.js b/app/vlselect/vmui/static/js/main.aaafe439.js similarity index 78% rename from app/vlselect/vmui/static/js/main.64aea685.js rename to app/vlselect/vmui/static/js/main.aaafe439.js index 5fec423a3..8090934eb 100644 --- a/app/vlselect/vmui/static/js/main.64aea685.js +++ b/app/vlselect/vmui/static/js/main.aaafe439.js @@ -1,2 +1,2 @@ -/*! For license information please see main.64aea685.js.LICENSE.txt */ -(()=>{var e={61:(e,t,n)=>{"use strict";var r=n(375),o=n(629),a=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&a(e,".prototype.")>-1?o(n):n}},629:(e,t,n)=>{"use strict";var r=n(989),o=n(375),a=n(259),i=n(277),l=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,l),u=n(709),d=o("%Math.max%");e.exports=function(e){if("function"!==typeof e)throw new i("a function is required");var t=c(r,s,arguments);return a(t,1+d(0,e.length-(arguments.length-1)),!0)};var h=function(){return c(r,l,arguments)};u?u(e.exports,"apply",{value:h}):e.exports.apply=h},159:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",a="minute",i="hour",l="day",s="week",c="month",u="quarter",d="year",h="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},v={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()1)return e(i[0])}else{var l=t.name;b[l]=t,o=l}return!r&&o&&(y=o),o||!r&&y},S=function(e,t){if(k(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new A(n)},C=v;C.l=x,C.i=k,C.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var A=function(){function _(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=_.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(C.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(f);if(r){var o=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return C},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return S(e)=0&&(a[d]=parseInt(u,10))}var h=a[3],p=24===h?0:h,f=a[0]+"-"+a[1]+"-"+a[2]+" "+p+":"+a[4]+":"+a[5]+":000",m=+t;return(o.utc(f).valueOf()-(m-=m%1e3))/6e4},s=r.prototype;s.tz=function(e,t){void 0===e&&(e=a);var n,r=this.utcOffset(),i=this.toDate(),l=i.toLocaleString("en-US",{timeZone:e}),s=Math.round((i-new Date(l))/1e3/60),c=15*-Math.round(i.getTimezoneOffset()/15)-s;if(Number(c)){if(n=o(l,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var u=n.utcOffset();n=n.add(r-u,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},s.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=i(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return n&&n.value};var c=s.startOf;s.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var r=n&&t,i=n||t||a,s=l(+o(),i);if("string"!=typeof e)return o(e).tz(i);var c=function(e,t,n){var r=e-60*t*1e3,o=l(r,n);if(t===o)return[r,t];var a=l(r-=60*(o-t)*1e3,n);return o===a?[r,o]:[e-60*Math.min(o,a)*1e3,Math.max(o,a)]}(o.utc(e,r).valueOf(),s,i),u=c[0],d=c[1],h=o(u).utcOffset(d);return h.$x.$timezone=i,h},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){a=e}}}()},220:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,a){var i=o.prototype;a.utc=function(e){return new o({date:e,utc:!0,args:arguments})},i.utc=function(t){var n=a(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var l=i.parse;i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),l.call(this,e)};var s=i.init;i.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else s.call(this)};var c=i.utcOffset;i.utcOffset=function(r,o){var a=this.$utils().u;if(a(r))return this.$u?0:a(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],a=o[0],i=60*+o[1]+ +o[2];return 0===i?0:"+"===a?i:-i}(r),null===r))return this;var i=Math.abs(r)<=16?60*r:r,l=this;if(o)return l.$offset=i,l.$u=0===r,l;if(0!==r){var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(l=this.local().add(i+s,e)).$offset=i,l.$x.$localOffset=s}else l=this.utc();return l};var u=i.format;i.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(e){return"s"===e&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=i.diff;i.diff=function(e,t,n){if(e&&this.$u===e.$u)return h.call(this,e,t,n);var r=this.local(),o=a(e).local();return h.call(r,o,t,n)}}}()},411:(e,t,n)=>{"use strict";var r=n(709),o=n(430),a=n(277),i=n(553);e.exports=function(e,t,n){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new a("`obj` must be an object or a function`");if("string"!==typeof t&&"symbol"!==typeof t)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!i&&i(e,t);if(r)r(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===l&&d?d.enumerable:!l,value:n,writable:null===s&&d?d.writable:!s});else{if(!u&&(l||s||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},709:(e,t,n)=>{"use strict";var r=n(375)("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(o){r=!1}e.exports=r},123:e=>{"use strict";e.exports=EvalError},953:e=>{"use strict";e.exports=Error},780:e=>{"use strict";e.exports=RangeError},768:e=>{"use strict";e.exports=ReferenceError},430:e=>{"use strict";e.exports=SyntaxError},277:e=>{"use strict";e.exports=TypeError},619:e=>{"use strict";e.exports=URIError},307:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r{"use strict";var r=n(307);e.exports=Function.prototype.bind||r},375:(e,t,n)=>{"use strict";var r,o=n(953),a=n(123),i=n(780),l=n(768),s=n(430),c=n(277),u=n(619),d=Function,h=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(t){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(L){p=null}var f=function(){throw new c},m=p?function(){try{return f}catch(e){try{return p(arguments,"callee").get}catch(t){return f}}}():f,_=n(757)(),g=n(442)(),v=Object.getPrototypeOf||(g?function(e){return e.__proto__}:null),y={},b="undefined"!==typeof Uint8Array&&v?v(Uint8Array):r,w={__proto__:null,"%AggregateError%":"undefined"===typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":_&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"===typeof Atomics?r:Atomics,"%BigInt%":"undefined"===typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":a,"%Float32Array%":"undefined"===typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":y,"%Int8Array%":"undefined"===typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"===typeof JSON?JSON:r,"%Map%":"undefined"===typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&_&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?r:Promise,"%Proxy%":"undefined"===typeof Proxy?r:Proxy,"%RangeError%":i,"%ReferenceError%":l,"%Reflect%":"undefined"===typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&_&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&v?v(""[Symbol.iterator]()):r,"%Symbol%":_?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":b,"%TypeError%":c,"%Uint8Array%":"undefined"===typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"===typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(L){var k=v(v(L));w["%Error.prototype%"]=k}var x=function e(t){var n;if("%AsyncFunction%"===t)n=h("async function () {}");else if("%GeneratorFunction%"===t)n=h("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=h("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return w[t]=n,n},S={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(989),A=n(155),E=C.call(Function.call,Array.prototype.concat),M=C.call(Function.apply,Array.prototype.splice),N=C.call(Function.call,String.prototype.replace),T=C.call(Function.call,String.prototype.slice),$=C.call(Function.call,RegExp.prototype.exec),P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,O=function(e,t){var n,r=e;if(A(S,r)&&(r="%"+(n=S[r])[0]+"%"),A(w,r)){var o=w[r];if(o===y&&(o=x(r)),"undefined"===typeof o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===$(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=T(e,0,1),n=T(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return N(e,P,(function(e,t,n,o){r[r.length]=n?N(o,D,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=O("%"+r+"%",t),a=o.name,i=o.value,l=!1,u=o.alias;u&&(r=u[0],M(n,E([0,1],u)));for(var d=1,h=!0;d=n.length){var g=p(i,f);i=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:i[f]}else h=A(i,f),i=i[f];h&&!l&&(w[a]=i)}}return i}},553:(e,t,n)=>{"use strict";var r=n(375)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(o){r=null}e.exports=r},734:(e,t,n)=>{"use strict";var r=n(709),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},442:e=>{"use strict";var t={__proto__:null,foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof n)}},757:(e,t,n)=>{"use strict";var r="undefined"!==typeof Symbol&&Symbol,o=n(175);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&o())))}},175:e=>{"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},155:(e,t,n)=>{"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,a=n(989);e.exports=a.call(r,o)},267:(e,t,n)=>{var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,l=parseInt,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,f=function(){return u.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function _(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=a.test(e);return n||i.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,a,i,l,s,c=0,u=!1,d=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,a=o;return r=o=void 0,c=t,i=e.apply(a,n)}function y(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-c>=a}function b(){var e=f();if(y(e))return w(e);l=setTimeout(b,function(e){var n=t-(e-s);return d?p(n,a-(e-c)):n}(e))}function w(e){return l=void 0,g&&r?v(e):(r=o=void 0,i)}function k(){var e=f(),n=y(e);if(r=arguments,o=this,s=e,n){if(void 0===l)return function(e){return c=e,l=setTimeout(b,t),u?v(e):i}(s);if(d)return l=setTimeout(b,t),v(s)}return void 0===l&&(l=setTimeout(b,t)),i}return t=_(t)||0,m(n)&&(u=!!n.leading,a=(d="maxWait"in n)?h(_(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g),k.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=s=o=l=void 0},k.flush=function(){return void 0===l?i:w(f())},k}},424:(e,t,n)=>{var r="__lodash_hash_undefined__",o="[object Function]",a="[object GeneratorFunction]",i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,s=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,d=/^\[object .+?Constructor\]$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,p="object"==typeof self&&self&&self.Object===Object&&self,f=h||p||Function("return this")();var m=Array.prototype,_=Function.prototype,g=Object.prototype,v=f["__core-js_shared__"],y=function(){var e=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=_.toString,w=g.hasOwnProperty,k=g.toString,x=RegExp("^"+b.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=f.Symbol,C=m.splice,A=z(f,"Map"),E=z(Object,"create"),M=S?S.prototype:void 0,N=M?M.toString:void 0;function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},$.prototype.set=function(e,t){var n=this.__data__,r=D(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},P.prototype.clear=function(){this.__data__={hash:new T,map:new(A||$),string:new T}},P.prototype.delete=function(e){return R(this,e).delete(e)},P.prototype.get=function(e){return R(this,e).get(e)},P.prototype.has=function(e){return R(this,e).has(e)},P.prototype.set=function(e,t){return R(this,e).set(e,t),this};var I=F((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(B(e))return N?N.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return s.test(e)&&n.push(""),e.replace(c,(function(e,t,r,o){n.push(r?o.replace(u,"$1"):t||e)})),n}));function j(e){if("string"==typeof e||B(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function F(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i),i};return n.cache=new(F.Cache||P),n}F.Cache=P;var H=Array.isArray;function V(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function B(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==k.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:O(e,t);return void 0===r?n:r}},141:(e,t,n)=>{var r="function"===typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,a=r&&o&&"function"===typeof o.get?o.get:null,i=r&&Map.prototype.forEach,l="function"===typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&l?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=l&&s&&"function"===typeof s.get?s.get:null,u=l&&Set.prototype.forEach,d="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,m=Object.prototype.toString,_=Function.prototype.toString,g=String.prototype.match,v=String.prototype.slice,y=String.prototype.replace,b=String.prototype.toUpperCase,w=String.prototype.toLowerCase,k=RegExp.prototype.test,x=Array.prototype.concat,S=Array.prototype.join,C=Array.prototype.slice,A=Math.floor,E="function"===typeof BigInt?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,N="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"===typeof Symbol&&"object"===typeof Symbol.iterator,$="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T||"symbol")?Symbol.toStringTag:null,P=Object.prototype.propertyIsEnumerable,D=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function O(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||k.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var r=e<0?-A(-e):A(e);if(r!==e){var o=String(r),a=v.call(t,o.length+1);return y.call(o,n,"$&_")+"."+y.call(y.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return y.call(t,n,"$&_")}var L=n(634),R=L.custom,z=V(R)?R:null;function I(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function j(e){return y.call(String(e),/"/g,""")}function F(e){return"[object Array]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}function H(e){return"[object RegExp]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}function V(e){if(T)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!N)return!1;try{return N.call(e),!0}catch(t){}return!1}e.exports=function e(t,r,o,l){var s=r||{};if(U(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(U(s,"maxStringLength")&&("number"===typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!U(s,"customInspect")||s.customInspect;if("boolean"!==typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(U(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(U(s,"numericSeparator")&&"boolean"!==typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var b=s.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return q(t,s);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var k=String(t);return b?O(t,k):k}if("bigint"===typeof t){var A=String(t)+"n";return b?O(t,A):A}var M="undefined"===typeof s.depth?5:s.depth;if("undefined"===typeof o&&(o=0),o>=M&&M>0&&"object"===typeof t)return F(t)?"[Array]":"[Object]";var R=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=S.call(Array(e.indent+1)," ")}return{base:n,prev:S.call(Array(t+1),n)}}(s,o);if("undefined"===typeof l)l=[];else if(W(l,t)>=0)return"[Circular]";function B(t,n,r){if(n&&(l=C.call(l)).push(n),r){var a={depth:s.depth};return U(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,o+1,l)}return e(t,s,o+1,l)}if("function"===typeof t&&!H(t)){var K=function(e){if(e.name)return e.name;var t=g.call(_.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=X(t,B);return"[Function"+(K?": "+K:" (anonymous)")+"]"+(ee.length>0?" { "+S.call(ee,", ")+" }":"")}if(V(t)){var te=T?y.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):N.call(t);return"object"!==typeof t||T?te:Z(te)}if(function(e){if(!e||"object"!==typeof e)return!1;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"===typeof e.nodeName&&"function"===typeof e.getAttribute}(t)){for(var ne="<"+w.call(String(t.nodeName)),re=t.attributes||[],oe=0;oe"}if(F(t)){if(0===t.length)return"[]";var ae=X(t,B);return R&&!function(e){for(var t=0;t=0)return!1;return!0}(ae)?"["+J(ae,R)+"]":"[ "+S.call(ae,", ")+" ]"}if(function(e){return"[object Error]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t)){var ie=X(t,B);return"cause"in Error.prototype||!("cause"in t)||P.call(t,"cause")?0===ie.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(ie,", ")+" }":"{ ["+String(t)+"] "+S.call(x.call("[cause]: "+B(t.cause),ie),", ")+" }"}if("object"===typeof t&&m){if(z&&"function"===typeof t[z]&&L)return L(t,{depth:M-o});if("symbol"!==m&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!a||!e||"object"!==typeof e)return!1;try{a.call(e);try{c.call(e)}catch(ne){return!0}return e instanceof Map}catch(t){}return!1}(t)){var le=[];return i&&i.call(t,(function(e,n){le.push(B(n,t,!0)+" => "+B(e,t))})),Q("Map",a.call(t),le,R)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{a.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(B(e,t))})),Q("Set",c.call(t),se,R)}if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(ne){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return G("WeakMap");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(ne){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return G("WeakSet");if(function(e){if(!p||!e||"object"!==typeof e)return!1;try{return p.call(e),!0}catch(t){}return!1}(t))return G("WeakRef");if(function(e){return"[object Number]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t))return Z(B(Number(t)));if(function(e){if(!e||"object"!==typeof e||!E)return!1;try{return E.call(e),!0}catch(t){}return!1}(t))return Z(B(E.call(t)));if(function(e){return"[object Boolean]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t))return Z(f.call(t));if(function(e){return"[object String]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t))return Z(B(String(t)));if("undefined"!==typeof window&&t===window)return"{ [object Window] }";if("undefined"!==typeof globalThis&&t===globalThis||"undefined"!==typeof n.g&&t===n.g)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t)&&!H(t)){var ce=X(t,B),ue=D?D(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",he=!ue&&$&&Object(t)===t&&$ in t?v.call(Y(t),8,-1):de?"Object":"",pe=(ue||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(he||de?"["+S.call(x.call([],he||[],de||[]),": ")+"] ":"");return 0===ce.length?pe+"{}":R?pe+"{"+J(ce,R)+"}":pe+"{ "+S.call(ce,", ")+" }"}return String(t)};var B=Object.prototype.hasOwnProperty||function(e){return e in this};function U(e,t){return B.call(e,t)}function Y(e){return m.call(e)}function W(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return q(v.call(e,0,t.maxStringLength),t)+r}return I(y.call(y.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",t)}function K(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+b.call(t.toString(16))}function Z(e){return"Object("+e+")"}function G(e){return e+" { ? }"}function Q(e,t,n,r){return e+" ("+t+") {"+(r?J(n,r):S.call(n,", "))+"}"}function J(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+S.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=F(e),r=[];if(n){r.length=e.length;for(var o=0;o{"use strict";n.r(t),n.d(t,{Children:()=>U,Component:()=>l.uA,Fragment:()=>l.FK,PureComponent:()=>I,StrictMode:()=>$e,Suspense:()=>Z,SuspenseList:()=>J,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>be,cloneElement:()=>Ae,createContext:()=>l.q6,createElement:()=>l.n,createFactory:()=>ke,createPortal:()=>ne,createRef:()=>l._3,default:()=>je,findDOMNode:()=>Me,flushSync:()=>Te,forwardRef:()=>V,hydrate:()=>ue,isElement:()=>Re,isFragment:()=>Se,isMemo:()=>Ce,isValidElement:()=>xe,lazy:()=>Q,memo:()=>j,render:()=>ce,startTransition:()=>Pe,unmountComponentAtNode:()=>Ee,unstable_batchedUpdates:()=>Ne,useCallback:()=>C,useContext:()=>A,useDebugValue:()=>E,useDeferredValue:()=>De,useEffect:()=>b,useErrorBoundary:()=>M,useId:()=>N,useImperativeHandle:()=>x,useInsertionEffect:()=>Le,useLayoutEffect:()=>w,useMemo:()=>S,useReducer:()=>y,useRef:()=>k,useState:()=>v,useSyncExternalStore:()=>ze,useTransition:()=>Oe,version:()=>we});var r,o,a,i,l=n(746),s=0,c=[],u=l.fF,d=u.__b,h=u.__r,p=u.diffed,f=u.__c,m=u.unmount,_=u.__;function g(e,t){u.__h&&u.__h(o,e,s||t),s=0;var n=o.__H||(o.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function v(e){return s=1,y(R,e)}function y(e,t,n){var a=g(r++,2);if(a.t=e,!a.__c&&(a.__=[n?n(t):R(void 0,t),function(e){var t=a.__N?a.__N[0]:a.__[0],n=a.t(t,e);t!==n&&(a.__N=[n,a.__[1]],a.__c.setState({}))}],a.__c=o,!o.u)){var i=function(e,t,n){if(!a.__c.__H)return!0;var r=a.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!l||l.call(this,e,t,n);var o=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),!(!o&&a.__c.props===e)&&(!l||l.call(this,e,t,n))};o.u=!0;var l=o.shouldComponentUpdate,s=o.componentWillUpdate;o.componentWillUpdate=function(e,t,n){if(this.__e){var r=l;l=void 0,i(e,t,n),l=r}s&&s.call(this,e,t,n)},o.shouldComponentUpdate=i}return a.__N||a.__}function b(e,t){var n=g(r++,3);!u.__s&&L(n.__H,t)&&(n.__=e,n.i=t,o.__H.__h.push(n))}function w(e,t){var n=g(r++,4);!u.__s&&L(n.__H,t)&&(n.__=e,n.i=t,o.__h.push(n))}function k(e){return s=5,S((function(){return{current:e}}),[])}function x(e,t,n){s=6,w((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function S(e,t){var n=g(r++,7);return L(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function C(e,t){return s=8,S((function(){return e}),t)}function A(e){var t=o.context[e.__c],n=g(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(o)),t.props.value):e.__}function E(e,t){u.useDebugValue&&u.useDebugValue(t?t(e):e)}function M(e){var t=g(r++,10),n=v();return t.__=e,o.componentDidCatch||(o.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function N(){var e=g(r++,11);if(!e.__){for(var t=o.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function T(){for(var e;e=c.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(D),e.__H.__h.forEach(O),e.__H.__h=[]}catch(r){e.__H.__h=[],u.__e(r,e.__v)}}u.__b=function(e){o=null,d&&d(e)},u.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),_&&_(e,t)},u.__r=function(e){h&&h(e),r=0;var t=(o=e.__c).__H;t&&(a===o?(t.__h=[],o.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(D),t.__h.forEach(O),t.__h=[],r=0)),a=o},u.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==c.push(t)&&i===u.requestAnimationFrame||((i=u.requestAnimationFrame)||P)(T)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),a=o=null},u.__c=function(e,t){t.some((function(e){try{e.__h.forEach(D),e.__h=e.__h.filter((function(e){return!e.__||O(e)}))}catch(o){t.some((function(e){e.__h&&(e.__h=[])})),t=[],u.__e(o,e.__v)}})),f&&f(e,t)},u.unmount=function(e){m&&m(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{D(e)}catch(e){t=e}})),n.__H=void 0,t&&u.__e(t,n.__v))};var $="function"==typeof requestAnimationFrame;function P(e){var t,n=function(){clearTimeout(r),$&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);$&&(t=requestAnimationFrame(n))}function D(e){var t=o,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),o=t}function O(e){var t=o;e.__c=e.__(),o=t}function L(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function R(e,t){return"function"==typeof t?t(e):t}function z(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function I(e,t){this.props=e,this.context=t}function j(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:z(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,l.n)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(I.prototype=new l.uA).isPureReactComponent=!0,I.prototype.shouldComponentUpdate=function(e,t){return z(this.props,e)||z(this.state,t)};var F=l.fF.__b;l.fF.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),F&&F(e)};var H="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function V(e){function t(t){if(!("ref"in t))return e(t,null);var n=t.ref;delete t.ref;var r=e(t,n);return t.ref=n,r}return t.$$typeof=H,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var B=function(e,t){return null==e?null:(0,l.v2)((0,l.v2)(e).map(t))},U={map:B,forEach:B,count:function(e){return e?(0,l.v2)(e).length:0},only:function(e){var t=(0,l.v2)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:l.v2},Y=l.fF.__e;l.fF.__e=function(e,t,n,r){if(e.then)for(var o,a=t;a=a.__;)if((o=a.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);Y(e,t,n,r)};var W=l.fF.unmount;function q(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return q(e,t,n)}))),e}function K(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return K(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Z(){this.__u=0,this.t=null,this.__b=null}function G(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Q(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,l.n)(n,o)}return o.displayName="Lazy",o.__f=!0,o}function J(){this.u=null,this.o=null}l.fF.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),W&&W(e)},(Z.prototype=new l.uA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=G(r.__v),a=!1,i=function(){a||(a=!0,n.__R=null,o?o(l):l())};n.__R=i;var l=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=K(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},Z.prototype.componentWillUnmount=function(){this.t=[]},Z.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=q(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&(0,l.n)(l.FK,null,e.fallback);return o&&(o.__u&=-33),[(0,l.n)(l.FK,null,t.__a?null:e.children),o]};var X=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),(0,l.XX)((0,l.n)(ee,{context:t.context},e.__v),t.l)}function ne(e,t){var n=(0,l.n)(te,{__v:e,i:t});return n.containerInfo=t,n}(J.prototype=new l.uA).__a=function(e){var t=this,n=G(t.__v),r=t.o.get(e);return r[0]++,function(o){var a=function(){t.props.revealOrder?(r.push(o),X(t,e,r)):o()};n?n(a):a()}},J.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,l.v2)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},J.prototype.componentDidUpdate=J.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){X(e,n,t)}))};var re="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,oe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ae=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ie=/[A-Z0-9]/g,le="undefined"!=typeof document,se=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function ce(e,t,n){return null==t.__k&&(t.textContent=""),(0,l.XX)(e,t),"function"==typeof n&&n(),e?e.__c:null}function ue(e,t,n){return(0,l.Qv)(e,t),"function"==typeof n&&n(),e?e.__c:null}l.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(l.uA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var de=l.fF.event;function he(){}function pe(){return this.cancelBubble}function fe(){return this.defaultPrevented}l.fF.event=function(e){return de&&(e=de(e)),e.persist=he,e.isPropagationStopped=pe,e.isDefaultPrevented=fe,e.nativeEvent=e};var me,_e={enumerable:!1,configurable:!0,get:function(){return this.class}},ge=l.fF.vnode;l.fF.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1===n.indexOf("-");for(var a in t){var i=t[a];if(!("value"===a&&"defaultValue"in t&&null==i||le&&"children"===a&&"noscript"===n||"class"===a||"className"===a)){var s=a.toLowerCase();"defaultValue"===a&&"value"in t&&null==t.value?a="value":"download"===a&&!0===i?i="":"translate"===s&&"no"===i?i=!1:"o"===s[0]&&"n"===s[1]?"ondoubleclick"===s?a="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||se(t.type)?"onfocus"===s?a="onfocusin":"onblur"===s?a="onfocusout":ae.test(a)&&(a=s):s=a="oninput":o&&oe.test(a)?a=a.replace(ie,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===s&&r[a=s]&&(a="oninputCapture"),r[a]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",_e)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=re,ge&&ge(e)};var ve=l.fF.__r;l.fF.__r=function(e){ve&&ve(e),me=e.__c};var ye=l.fF.diffed;l.fF.diffed=function(e){ye&&ye(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),me=null};var be={ReactCurrentDispatcher:{current:{readContext:function(e){return me.__n[e.__c].props.value},useCallback:C,useContext:A,useDebugValue:E,useDeferredValue:De,useEffect:b,useId:N,useImperativeHandle:x,useInsertionEffect:Le,useLayoutEffect:w,useMemo:S,useReducer:y,useRef:k,useState:v,useSyncExternalStore:ze,useTransition:Oe}}},we="18.3.1";function ke(e){return l.n.bind(null,e)}function xe(e){return!!e&&e.$$typeof===re}function Se(e){return xe(e)&&e.type===l.FK}function Ce(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ae(e){return xe(e)?l.Ob.apply(null,arguments):e}function Ee(e){return!!e.__k&&((0,l.XX)(null,e),!0)}function Me(e){return e&&(e.base||1===e.nodeType&&e)||null}var Ne=function(e,t){return e(t)},Te=function(e,t){return e(t)},$e=l.FK;function Pe(e){e()}function De(e){return e}function Oe(){return[!1,Pe]}var Le=w,Re=xe;function ze(e,t){var n=t(),r=v({h:{__:n,v:t}}),o=r[0].h,a=r[1];return w((function(){o.__=n,o.v=t,Ie(o)&&a({h:o})}),[e,n,t]),b((function(){return Ie(o)&&a({h:o}),e((function(){Ie(o)&&a({h:o})}))}),[e]),n}function Ie(e){var t,n,r=e.v,o=e.__;try{var a=r();return!((t=o)===(n=a)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}var je={useState:v,useId:N,useReducer:y,useEffect:b,useLayoutEffect:w,useInsertionEffect:Le,useTransition:Oe,useDeferredValue:De,useSyncExternalStore:ze,startTransition:Pe,useRef:k,useImperativeHandle:x,useMemo:S,useCallback:C,useContext:A,useDebugValue:E,version:"18.3.1",Children:U,render:ce,hydrate:ue,unmountComponentAtNode:Ee,createPortal:ne,createElement:l.n,createContext:l.q6,createFactory:ke,cloneElement:Ae,createRef:l._3,Fragment:l.FK,isValidElement:xe,isElement:Re,isFragment:Se,isMemo:Ce,findDOMNode:Me,Component:l.uA,PureComponent:I,memo:j,forwardRef:V,flushSync:Te,unstable_batchedUpdates:Ne,StrictMode:$e,Suspense:Z,SuspenseList:J,lazy:Q,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:be}},746:(e,t,n)=>{"use strict";n.d(t,{FK:()=>x,Ob:()=>Y,Qv:()=>U,XX:()=>B,_3:()=>k,fF:()=>o,n:()=>b,q6:()=>W,uA:()=>S,v2:()=>P});var r,o,a,i,l,s,c,u,d,h,p,f={},m=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function v(e,t){for(var n in t)e[n]=t[n];return e}function y(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function b(e,t,n){var o,a,i,l={};for(i in t)"key"==i?o=t[i]:"ref"==i?a=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return w(e,l,o,a,null)}function w(e,t,n,r,i){var l={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++a:i,__i:-1,__u:0};return null==i&&null!=o.vnode&&o.vnode(l),l}function k(){return{current:null}}function x(e){return e.children}function S(e,t){this.props=e,this.context=t}function C(e,t){if(null==t)return e.__?C(e.__,e.__i+1):null;for(var n;tt&&i.sort(c));M.__r=0}function N(e,t,n,r,o,a,i,l,s,c,u){var d,h,p,_,g,v=r&&r.__k||m,y=t.length;for(n.__d=s,T(n,t,v),s=n.__d,d=0;d0?w(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,a=null,-1!==(l=o.__i=D(o,n,i,u))&&(u--,(a=n[l])&&(a.__u|=131072)),null==a||null===a.__v?(-1==l&&d--,"function"!=typeof o.type&&(o.__u|=65536)):l!==i&&(l==i-1?d--:l==i+1?d++:(l>i?d--:d++,o.__u|=65536))):o=e.__k[r]=null;if(u)for(r=0;r(null!=s&&0==(131072&s.__u)?1:0))for(;i>=0||l=0){if((s=t[i])&&0==(131072&s.__u)&&o==s.key&&a===s.type)return i;i--}if(l2&&(s.children=arguments.length>3?r.call(arguments,2):n),w(e.type,s,o||e.key,a||e.ref,null)}function W(e,t){var n={__c:t="__cC"+p++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,E(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=m.slice,o={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&null!=a.getDerivedStateFromError&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(t){e=t}throw e}},a=0,S.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=v({},this.state),"function"==typeof e&&(e=e(v({},n),this.props)),e&&v(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),E(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),E(this))},S.prototype.render=x,i=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},M.__r=0,u=0,d=R(!1),h=R(!0),p=0},640:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",o="RFC3986";e.exports={default:o,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:o}},215:(e,t,n)=>{"use strict";var r=n(518),o=n(968),a=n(640);e.exports={formats:a,parse:o,stringify:r}},968:(e,t,n)=>{"use strict";var r=n(570),o=Object.prototype.hasOwnProperty,a=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},l=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,l=n.depth>0&&/(\[[^[\]]*])/.exec(a),c=l?a.slice(0,l.index):a,u=[];if(c){if(!n.plainObjects&&o.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var d=0;n.depth>0&&null!==(l=i.exec(a))&&d=0;--a){var i,l=e[a];if("[]"===l&&n.parseArrays)i=n.allowEmptyArrays&&(""===o||n.strictNullHandling&&null===o)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var c="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,u=n.decodeDotInKeys?c.replace(/%2E/g,"."):c,d=parseInt(u,10);n.parseArrays||""!==u?!isNaN(d)&&l!==u&&String(d)===u&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(i=[])[d]=o:"__proto__"!==u&&(i[u]=o):i={0:o}}o=i}return o}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return i;if("undefined"!==typeof e.allowEmptyArrays&&"boolean"!==typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if("undefined"!==typeof e.decodeDotInKeys&&"boolean"!==typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&"undefined"!==typeof e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?i.charset:e.charset,n="undefined"===typeof e.duplicates?i.duplicates:e.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:"undefined"===typeof e.allowDots?!0===e.decodeDotInKeys||i.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"===typeof e.allowEmptyArrays?!!e.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:i.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:i.comma,decodeDotInKeys:"boolean"===typeof e.decodeDotInKeys?e.decodeDotInKeys:i.decodeDotInKeys,decoder:"function"===typeof e.decoder?e.decoder:i.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:i.depth,duplicates:n,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:i.plainObjects,strictDepth:"boolean"===typeof e.strictDepth?!!e.strictDepth:i.strictDepth,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var u="string"===typeof e?function(e,t){var n={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=c.split(t.delimiter,d),p=-1,f=t.charset;if(t.charsetSentinel)for(u=0;u-1&&(_=a(_)?[_]:_);var b=o.call(n,m);b&&"combine"===t.duplicates?n[m]=r.combine(n[m],_):b&&"last"!==t.duplicates||(n[m]=_)}return n}(e,n):e,d=n.plainObjects?Object.create(null):{},h=Object.keys(u),p=0;p{"use strict";var r=n(670),o=n(570),a=n(640),i=Object.prototype.hasOwnProperty,l={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,s(t)?t:[t])},d=Date.prototype.toISOString,h=a.default,p={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o.encode,encodeValuesOnly:!1,format:h,formatter:a.formatters[h],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},f={},m=function e(t,n,a,i,l,c,d,h,m,_,g,v,y,b,w,k,x,S){for(var C,A=t,E=S,M=0,N=!1;void 0!==(E=E.get(f))&&!N;){var T=E.get(t);if(M+=1,"undefined"!==typeof T){if(T===M)throw new RangeError("Cyclic object value");N=!0}"undefined"===typeof E.get(f)&&(M=0)}if("function"===typeof _?A=_(n,A):A instanceof Date?A=y(A):"comma"===a&&s(A)&&(A=o.maybeMap(A,(function(e){return e instanceof Date?y(e):e}))),null===A){if(c)return m&&!k?m(n,p.encoder,x,"key",b):n;A=""}if("string"===typeof(C=A)||"number"===typeof C||"boolean"===typeof C||"symbol"===typeof C||"bigint"===typeof C||o.isBuffer(A))return m?[w(k?n:m(n,p.encoder,x,"key",b))+"="+w(m(A,p.encoder,x,"value",b))]:[w(n)+"="+w(String(A))];var $,P=[];if("undefined"===typeof A)return P;if("comma"===a&&s(A))k&&m&&(A=o.maybeMap(A,m)),$=[{value:A.length>0?A.join(",")||null:void 0}];else if(s(_))$=_;else{var D=Object.keys(A);$=g?D.sort(g):D}var O=h?n.replace(/\./g,"%2E"):n,L=i&&s(A)&&1===A.length?O+"[]":O;if(l&&s(A)&&0===A.length)return L+"[]";for(var R=0;R<$.length;++R){var z=$[R],I="object"===typeof z&&"undefined"!==typeof z.value?z.value:A[z];if(!d||null!==I){var j=v&&h?z.replace(/\./g,"%2E"):z,F=s(A)?"function"===typeof a?a(L,j):L:L+(v?"."+j:"["+j+"]");S.set(t,M);var H=r();H.set(f,S),u(P,e(I,F,a,i,l,c,d,h,"comma"===a&&k&&s(A)?null:m,_,g,v,y,b,w,k,x,H))}}return P};e.exports=function(e,t){var n,o=e,c=function(e){if(!e)return p;if("undefined"!==typeof e.allowEmptyArrays&&"boolean"!==typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if("undefined"!==typeof e.encodeDotInKeys&&"boolean"!==typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&"undefined"!==typeof e.encoder&&"function"!==typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=a.default;if("undefined"!==typeof e.format){if(!i.call(a.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r,o=a.formatters[n],c=p.filter;if(("function"===typeof e.filter||s(e.filter))&&(c=e.filter),r=e.arrayFormat in l?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":p.arrayFormat,"commaRoundTrip"in e&&"boolean"!==typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u="undefined"===typeof e.allowDots?!0===e.encodeDotInKeys||p.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"===typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:u,allowEmptyArrays:"boolean"===typeof e.allowEmptyArrays?!!e.allowEmptyArrays:p.allowEmptyArrays,arrayFormat:r,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:"undefined"===typeof e.delimiter?p.delimiter:e.delimiter,encode:"boolean"===typeof e.encode?e.encode:p.encode,encodeDotInKeys:"boolean"===typeof e.encodeDotInKeys?e.encodeDotInKeys:p.encodeDotInKeys,encoder:"function"===typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"===typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:c,format:n,formatter:o,serializeDate:"function"===typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"===typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"===typeof e.sort?e.sort:null,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"===typeof c.filter?o=(0,c.filter)("",o):s(c.filter)&&(n=c.filter);var d=[];if("object"!==typeof o||null===o)return"";var h=l[c.arrayFormat],f="comma"===h&&c.commaRoundTrip;n||(n=Object.keys(o)),c.sort&&n.sort(c.sort);for(var _=r(),g=0;g0?b+y:""}},570:(e,t,n)=>{"use strict";var r=n(640),o=Object.prototype.hasOwnProperty,a=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),l=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(a(n)){for(var r=[],o=0;o=s?l.slice(u,u+s):l,h=[],p=0;p=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||a===r.RFC1738&&(40===f||41===f)?h[h.length]=d.charAt(p):f<128?h[h.length]=i[f]:f<2048?h[h.length]=i[192|f>>6]+i[128|63&f]:f<55296||f>=57344?h[h.length]=i[224|f>>12]+i[128|f>>6&63]+i[128|63&f]:(p+=1,f=65536+((1023&f)<<10|1023&d.charCodeAt(p)),h[h.length]=i[240|f>>18]+i[128|f>>12&63]+i[128|f>>6&63]+i[128|63&f])}c+=h.join("")}return c},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var n=[],r=0;r{e.exports=n(204)},204:(e,t,n)=>{"use strict";var r=function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(n(609)),o=n(609);function a(){return(a=Object.assign||function(e){for(var t=1;tr.length&&h(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var o=r.length,a=t.length;a>=r.length;a--){var i=t[a];if(!h(e,a)&&p(e,a,i)){o=a+1;break}}return o}function _(e,t){return m(e,t)===e.mask.length}function g(e,t){var n=e.maskChar,r=e.mask,o=e.prefix;if(!n){for((t=v(e,"",t,0)).lengtht.length&&(t+=o.slice(t.length,r)),l.every((function(n){for(;u=n,h(e,c=r)&&u!==o[c];){if(r>=t.length&&(t+=o[r]),l=n,a&&h(e,r)&&l===a)return!0;if(++r>=o.length)return!1}var l,c,u;return!p(e,r,n)&&n!==a||(ro.start?d=(u=function(e,t,n,r){var o=e.mask,a=e.maskChar,i=n.split(""),l=r;return i.every((function(t){for(;i=t,h(e,n=r)&&i!==o[n];)if(++r>=o.length)return!1;var n,i;return(p(e,r,t)||t===a)&&r++,r=a.length?f=a.length:f=i.length&&f{"use strict";var r=n(375),o=n(411),a=n(734)(),i=n(553),l=n(277),s=r("%Math.floor%");e.exports=function(e,t){if("function"!==typeof e)throw new l("`fn` is not a function");if("number"!==typeof t||t<0||t>4294967295||s(t)!==t)throw new l("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&i){var u=i(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(a?o(e,"length",t,!0,!0):o(e,"length",t)),e}},670:(e,t,n)=>{"use strict";var r=n(375),o=n(61),a=n(141),i=n(277),l=r("%WeakMap%",!0),s=r("%Map%",!0),c=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),d=o("WeakMap.prototype.has",!0),h=o("Map.prototype.get",!0),p=o("Map.prototype.set",!0),f=o("Map.prototype.has",!0),m=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new i("Side channel does not contain "+a(e))},get:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return c(e,r)}else if(s){if(t)return h(t,r)}else if(n)return function(e,t){var n=m(e,t);return n&&n.value}(n,r)},has:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return d(e,r)}else if(s){if(t)return f(t,r)}else if(n)return function(e,t){return!!m(e,t)}(n,r);return!1},set:function(r,o){l&&r&&("object"===typeof r||"function"===typeof r)?(e||(e=new l),u(e,r,o)):s?(t||(t=new s),p(t,r,o)):(n||(n={key:{},next:null}),function(e,t,n){var r=m(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,o))}};return r}},634:()=>{},738:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+e+".f772060c.chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="vmui:";n.l=(r,o,a,i)=>{if(e[r])e[r].push(o);else{var l,s;if(void 0!==a)for(var c=document.getElementsByTagName("script"),u=0;u{l.onerror=l.onload=null,clearTimeout(p);var o=e[r];if(delete e[r],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(n))),t)return t(n)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=h.bind(null,l.onerror),l.onload=h.bind(null,l.onload),s&&document.head.appendChild(l)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="./",(()=>{var e={792:0};n.f.j=(t,r)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var a=new Promise(((n,r)=>o=e[t]=[n,r]));r.push(o[2]=a);var i=n.p+n.u(t),l=new Error;n.l(i,(r=>{if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var a=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",l.name="ChunkLoadError",l.type=a,l.request=i,o[1](l)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,a,i=r[0],l=r[1],s=r[2],c=0;if(i.some((t=>0!==e[t]))){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(s)s(n)}for(t&&t(r);c{"use strict";var e,t=n(609),r=n(159),o=n.n(r),a=n(7),i=n.n(a),l=n(648),s=n.n(l),c=n(220),u=n.n(c);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function y(t,n,r,o){void 0===o&&(o={});let{window:a=document.defaultView,v5Compat:i=!1}=o,l=a.history,s=e.Pop,c=null,u=f();function f(){return(l.state||{idx:null}).idx}function v(){s=e.Pop;let t=f(),n=null==t?null:t-u;u=t,c&&c({action:s,location:b.location,delta:n})}function y(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,n="string"===typeof e?e:g(e);return n=n.replace(/ $/,"%20"),p(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==u&&(u=0,l.replaceState(d({},l.state,{idx:u}),""));let b={get action(){return s},get location(){return t(a,l)},listen(e){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(h,v),c=e,()=>{a.removeEventListener(h,v),c=null}},createHref:e=>n(a,e),createURL:y,encodeLocation(e){let t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(t,n){s=e.Push;let o=_(b.location,t,n);r&&r(o,t),u=f()+1;let d=m(o,u),h=b.createHref(o);try{l.pushState(d,"",h)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;a.location.assign(h)}i&&c&&c({action:s,location:b.location,delta:1})},replace:function(t,n){s=e.Replace;let o=_(b.location,t,n);r&&r(o,t),u=f();let a=m(o,u),d=b.createHref(o);l.replaceState(a,"",d),i&&c&&c({action:s,location:b.location,delta:0})},go:e=>l.go(e)};return b}var b;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(b||(b={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function w(e,t,n){return void 0===n&&(n="/"),k(e,t,n,!1)}function k(e,t,n,r){let o=R(("string"===typeof t?v(t):t).pathname||"/",n);if(null==o)return null;let a=x(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let i=null;for(let l=0;null==i&&l{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(p(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));let l=H([r,i.relativePath]),s=n.concat(i);e.children&&e.children.length>0&&(p(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),x(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:P(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of S(e.path))o(e,t,r);else o(e,t)})),t}function S(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return o?[a,""]:[a];let i=S(r.join("/")),l=[];return l.push(...i.map((e=>""===e?a:[a,e].join("/")))),o&&l.push(...i),l.map((t=>e.startsWith("/")&&""===t?"/":t))}const C=/^:[\w-]+$/,A=3,E=2,M=1,N=10,T=-2,$=e=>"*"===e;function P(e,t){let n=e.split("/"),r=n.length;return n.some($)&&(r+=T),t&&(r+=E),n.filter((e=>!$(e))).reduce(((e,t)=>e+(C.test(t)?A:""===t?M:N)),r)}function D(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},a="/",i=[];for(let l=0;l(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let a=new RegExp(o,t?void 0:"i");return[a,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=l[n]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const s=l[n];return e[r]=o&&!s?void 0:(s||"").replace(/%2F/g,"/"),e}),{}),pathname:a,pathnameBase:i,pattern:e}}function L(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return f(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function R(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function z(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function I(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function j(e,t){let n=I(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function F(e,t,n,r){let o;void 0===r&&(r=!1),"string"===typeof e?o=v(e):(o=d({},e),p(!o.pathname||!o.pathname.includes("?"),z("?","pathname","search",o)),p(!o.pathname||!o.pathname.includes("#"),z("#","pathname","hash",o)),p(!o.search||!o.search.includes("#"),z("#","search","hash",o)));let a,i=""===e||""===o.pathname,l=i?"/":o.pathname;if(null==l)a=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"===typeof e?v(e):e,a=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:a,search:B(r),hash:U(o)}}(o,a),c=l&&"/"!==l&&l.endsWith("/"),u=(i||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!c&&!u||(s.pathname+="/"),s}const H=e=>e.join("/").replace(/\/\/+/g,"/"),V=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",U=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function Y(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const W=["post","put","patch","delete"],q=(new Set(W),["get",...W]);new Set(q),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r.current=!0}));let o=t.useCallback((function(t,o){void 0===o&&(o={}),r.current&&("number"===typeof t?e.navigate(t):e.navigate(t,K({fromRouteId:n},o)))}),[e,n]);return o}():function(){te()||p(!1);let e=t.useContext(Z),{basename:n,future:r,navigator:o}=t.useContext(Q),{matches:a}=t.useContext(X),{pathname:i}=ne(),l=JSON.stringify(j(a,r.v7_relativeSplatPath)),s=t.useRef(!1);re((()=>{s.current=!0}));let c=t.useCallback((function(t,r){if(void 0===r&&(r={}),!s.current)return;if("number"===typeof t)return void o.go(t);let a=F(t,JSON.parse(l),i,"path"===r.relative);null==e&&"/"!==n&&(a.pathname="/"===a.pathname?n:H([n,a.pathname])),(r.replace?o.replace:o.push)(a,r.state,r)}),[n,o,l,i,e]);return c}()}const ae=t.createContext(null);function ie(e,n){let{relative:r}=void 0===n?{}:n,{future:o}=t.useContext(Q),{matches:a}=t.useContext(X),{pathname:i}=ne(),l=JSON.stringify(j(a,o.v7_relativeSplatPath));return t.useMemo((()=>F(e,JSON.parse(l),i,"path"===r)),[e,l,i,r])}function le(n,r,o,a){te()||p(!1);let{navigator:i}=t.useContext(Q),{matches:l}=t.useContext(X),s=l[l.length-1],c=s?s.params:{},u=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let d,h=ne();if(r){var f;let e="string"===typeof r?v(r):r;"/"===u||(null==(f=e.pathname)?void 0:f.startsWith(u))||p(!1),d=e}else d=h;let m=d.pathname||"/",_=m;if("/"!==u){let e=u.replace(/^\//,"").split("/");_="/"+m.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=w(n,{pathname:_});let y=he(g&&g.map((e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:H([u,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:H([u,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,o,a);return r&&y?t.createElement(J.Provider,{value:{location:K({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:e.Pop}},y):y}function se(){let e=function(){var e;let n=t.useContext(ee),r=_e(fe.UseRouteError),o=ge(fe.UseRouteError);if(void 0!==n)return n;return null==(e=r.errors)?void 0:e[o]}(),n=Y(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:o};return t.createElement(t.Fragment,null,t.createElement("h2",null,"Unexpected Application Error!"),t.createElement("h3",{style:{fontStyle:"italic"}},n),r?t.createElement("pre",{style:a},r):null,null)}const ce=t.createElement(se,null);class ue extends t.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?t.createElement(X.Provider,{value:this.props.routeContext},t.createElement(ee.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function de(e){let{routeContext:n,match:r,children:o}=e,a=t.useContext(Z);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),t.createElement(X.Provider,{value:n},o)}function he(e,n,r,o){var a;if(void 0===n&&(n=[]),void 0===r&&(r=null),void 0===o&&(o=null),null==e){var i;if(!r)return null;if(r.errors)e=r.matches;else{if(!(null!=(i=o)&&i.v7_partialHydration&&0===n.length&&!r.initialized&&r.matches.length>0))return null;e=r.matches}}let l=e,s=null==(a=r)?void 0:a.errors;if(null!=s){let e=l.findIndex((e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id])));e>=0||p(!1),l=l.slice(0,Math.min(l.length,e+1))}let c=!1,u=-1;if(r&&o&&o.v7_partialHydration)for(let t=0;t=0?l.slice(0,u+1):[l[0]];break}}}return l.reduceRight(((e,o,a)=>{let i,d=!1,h=null,p=null;var f;r&&(i=s&&o.route.id?s[o.route.id]:void 0,h=o.route.errorElement||ce,c&&(u<0&&0===a?(f="route-fallback",!1||ve[f]||(ve[f]=!0),d=!0,p=null):u===a&&(d=!0,p=o.route.hydrateFallbackElement||null)));let m=n.concat(l.slice(0,a+1)),_=()=>{let n;return n=i?h:d?p:o.route.Component?t.createElement(o.route.Component,null):o.route.element?o.route.element:e,t.createElement(de,{match:o,routeContext:{outlet:e,matches:m,isDataRoute:null!=r},children:n})};return r&&(o.route.ErrorBoundary||o.route.errorElement||0===a)?t.createElement(ue,{location:r.location,revalidation:r.revalidation,component:h,error:i,children:_(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):_()}),null)}var pe=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(pe||{}),fe=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(fe||{});function me(e){let n=t.useContext(Z);return n||p(!1),n}function _e(e){let n=t.useContext(G);return n||p(!1),n}function ge(e){let n=function(){let e=t.useContext(X);return e||p(!1),e}(),r=n.matches[n.matches.length-1];return r.route.id||p(!1),r.route.id}const ve={};t.startTransition;function ye(e){return function(e){let n=t.useContext(X).outlet;return n?t.createElement(ae.Provider,{value:e},n):n}(e.context)}function be(e){p(!1)}function we(n){let{basename:r="/",children:o=null,location:a,navigationType:i=e.Pop,navigator:l,static:s=!1,future:c}=n;te()&&p(!1);let u=r.replace(/^\/*/,"/"),d=t.useMemo((()=>({basename:u,navigator:l,static:s,future:K({v7_relativeSplatPath:!1},c)})),[u,c,l,s]);"string"===typeof a&&(a=v(a));let{pathname:h="/",search:f="",hash:m="",state:_=null,key:g="default"}=a,y=t.useMemo((()=>{let e=R(h,u);return null==e?null:{location:{pathname:e,search:f,hash:m,state:_,key:g},navigationType:i}}),[u,h,f,m,_,g,i]);return null==y?null:t.createElement(Q.Provider,{value:d},t.createElement(J.Provider,{children:o,value:y}))}function ke(e){let{children:t,location:n}=e;return le(xe(t),n)}new Promise((()=>{}));t.Component;function xe(e,n){void 0===n&&(n=[]);let r=[];return t.Children.forEach(e,((e,o)=>{if(!t.isValidElement(e))return;let a=[...n,o];if(e.type===t.Fragment)return void r.push.apply(r,xe(e.props.children,a));e.type!==be&&p(!1),e.props.index&&e.props.children&&p(!1);let i={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=xe(e.props.children,a)),r.push(i)})),r}function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function Ae(e){return void 0===e&&(e=""),new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Ee=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Me=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(Id){}const Ne=t.createContext({isTransitioning:!1});new Map;const Te=t.startTransition;t.flushSync,t.useId;function $e(e){let{basename:n,children:r,future:o,window:a}=e,i=t.useRef();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),y((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=v(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),_("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"===typeof t?t:g(t))}),(function(e,t){f("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:a,v5Compat:!0}));let l=i.current,[s,c]=t.useState({action:l.action,location:l.location}),{v7_startTransition:u}=o||{},d=t.useCallback((e=>{u&&Te?Te((()=>c(e))):c(e)}),[c,u]);return t.useLayoutEffect((()=>l.listen(d)),[l,d]),t.createElement(we,{basename:n,children:r,location:s.location,navigationType:s.action,navigator:l,future:o})}const Pe="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,De=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Oe=t.forwardRef((function(e,n){let r,{onClick:o,relative:a,reloadDocument:i,replace:l,state:s,target:c,to:u,preventScrollReset:d,unstable_viewTransition:h}=e,f=Ce(e,Ee),{basename:m}=t.useContext(Q),_=!1;if("string"===typeof u&&De.test(u)&&(r=u,Pe))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=R(t.pathname,m);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:_=!0}catch(Id){}let v=function(e,n){let{relative:r}=void 0===n?{}:n;te()||p(!1);let{basename:o,navigator:a}=t.useContext(Q),{hash:i,pathname:l,search:s}=ie(e,{relative:r}),c=l;return"/"!==o&&(c="/"===l?o:H([o,l])),a.createHref({pathname:c,search:s,hash:i})}(u,{relative:a}),y=function(e,n){let{target:r,replace:o,state:a,preventScrollReset:i,relative:l,unstable_viewTransition:s}=void 0===n?{}:n,c=oe(),u=ne(),d=ie(e,{relative:l});return t.useCallback((t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,r)){t.preventDefault();let n=void 0!==o?o:g(u)===g(d);c(e,{replace:n,state:a,preventScrollReset:i,relative:l,unstable_viewTransition:s})}}),[u,c,d,o,a,r,e,i,l,s])}(u,{replace:l,state:s,target:c,preventScrollReset:d,relative:a,unstable_viewTransition:h});return t.createElement("a",Se({},f,{href:r||v,onClick:_||i?o:function(e){o&&o(e),e.defaultPrevented||y(e)},ref:n,target:c}))}));const Le=t.forwardRef((function(e,n){let{"aria-current":r="page",caseSensitive:o=!1,className:a="",end:i=!1,style:l,to:s,unstable_viewTransition:c,children:u}=e,d=Ce(e,Me),h=ie(s,{relative:d.relative}),f=ne(),m=t.useContext(G),{navigator:_,basename:g}=t.useContext(Q),v=null!=m&&function(e,n){void 0===n&&(n={});let r=t.useContext(Ne);null==r&&p(!1);let{basename:o}=Ie(Re.useViewTransitionState),a=ie(e,{relative:n.relative});if(!r.isTransitioning)return!1;let i=R(r.currentLocation.pathname,o)||r.currentLocation.pathname,l=R(r.nextLocation.pathname,o)||r.nextLocation.pathname;return null!=O(a.pathname,l)||null!=O(a.pathname,i)}(h)&&!0===c,y=_.encodeLocation?_.encodeLocation(h).pathname:h.pathname,b=f.pathname,w=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;o||(b=b.toLowerCase(),w=w?w.toLowerCase():null,y=y.toLowerCase()),w&&g&&(w=R(w,g)||w);const k="/"!==y&&y.endsWith("/")?y.length-1:y.length;let x,S=b===y||!i&&b.startsWith(y)&&"/"===b.charAt(k),C=null!=w&&(w===y||!i&&w.startsWith(y)&&"/"===w.charAt(y.length)),A={isActive:S,isPending:C,isTransitioning:v},E=S?r:void 0;x="function"===typeof a?a(A):[a,S?"active":null,C?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let M="function"===typeof l?l(A):l;return t.createElement(Oe,Se({},d,{"aria-current":E,className:x,ref:n,style:M,to:s,unstable_viewTransition:c}),"function"===typeof u?u(A):u)}));var Re,ze;function Ie(e){let n=t.useContext(Z);return n||p(!1),n}function je(e){let n=t.useRef(Ae(e)),r=t.useRef(!1),o=ne(),a=t.useMemo((()=>function(e,t){let n=Ae(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(o.search,r.current?null:n.current)),[o.search]),i=oe(),l=t.useCallback(((e,t)=>{const n=Ae("function"===typeof e?e(a):e);r.current=!0,i("?"+n,t)}),[i,a]);return[a,l]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Re||(Re={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(ze||(ze={}));const Fe=()=>{var e;const t=(null===(e=document.getElementById("root"))||void 0===e?void 0:e.dataset.params)||"{}";try{return JSON.parse(t)}catch(Id){return console.error(Id),{}}},He=()=>!!Object.keys(Fe()).length,Ve=/(\/select\/)(\d+|\d.+)(\/)(.+)/,Be=e=>{var t;return(null===(t=e.match(Ve))||void 0===t?void 0:t[2])||""};let Ue=function(e){return e.logs="logs",e.anomaly="anomaly",e}({});const Ye=(e,t)=>{t?window.localStorage.setItem(e,JSON.stringify({value:t})):qe([e]),window.dispatchEvent(new Event("storage"))},We=e=>{const t=window.localStorage.getItem(e);if(null!==t)try{var n;return null===(n=JSON.parse(t))||void 0===n?void 0:n.value}catch(Id){return t}},qe=e=>e.forEach((e=>window.localStorage.removeItem(e))),{REACT_APP_TYPE:Ke}={REACT_APP_TYPE:"logs"};var Ze=n(215),Ge=n.n(Ze),Qe=n(424),Je=n.n(Qe);const Xe={table:100,chart:20,code:1e3},et=(e,t)=>{const n=window.location.hash.split("?")[1],r=Ge().parse(n,{ignoreQueryPrefix:!0});return Je()(r,e,t||"")};let tt=function(e){return e.yhat="yhat",e.yhatUpper="yhat_upper",e.yhatLower="yhat_lower",e.anomaly="vmui_anomalies_points",e.training="vmui_training_data",e.actual="actual",e.anomalyScore="anomaly_score",e}({}),nt=function(e){return e.table="table",e.chart="chart",e.code="code",e}({}),rt=function(e){return e.emptyServer="Please enter Server URL",e.validServer="Please provide a valid Server URL",e.validQuery="Please enter a valid Query and execute it",e.traceNotFound="Not found the tracing information",e.emptyTitle="Please enter title",e.positiveNumber="Please enter positive number",e.validStep="Please enter a valid step",e.unknownType="Unknown server response format: must have 'errorType'",e}({}),ot=function(e){return e.system="system",e.light="light",e.dark="dark",e}({}),at=function(e){return e.empty="empty",e.metricsql="metricsql",e.label="label",e.labelValue="labelValue",e}({});const it=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),lt=(e,t)=>{document.documentElement.style.setProperty(`--${e}`,t)},st=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,ct=e=>e.replace(/\/$/,""),ut=et("g0.tenantID",""),dt={serverUrl:ct((e=>{const{serverURL:t}=Fe(),n=We("SERVER_URL"),r=window.location.href.replace(/\/(select\/)?(vmui)\/.*/,""),o=`${window.location.origin}${window.location.pathname.replace(/^\/vmui/,"")}`,a=window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),i=t||n||a;switch(Ke){case Ue.logs:return r;case Ue.anomaly:return n||o;default:return e?((e,t)=>e.replace(Ve,`$1${t}/$4`))(i,e):i}})(ut)),tenantId:ut,theme:We("THEME")||ot.system,isDarkTheme:null,flags:{},appConfig:{}};function ht(e,t){switch(t.type){case"SET_SERVER":return{...e,serverUrl:ct(t.payload)};case"SET_TENANT_ID":return{...e,tenantId:t.payload};case"SET_THEME":return Ye("THEME",t.payload),{...e,theme:t.payload};case"SET_DARK_THEME":return{...e,isDarkTheme:(n=e.theme,n===ot.system&&st()||n===ot.dark)};case"SET_FLAGS":return{...e,flags:t.payload};case"SET_APP_CONFIG":return{...e,appConfig:t.payload};default:throw new Error}var n}var pt=n(746);var ft=0;Array.isArray;function mt(e,t,n,r,o,a){t||(t={});var i,l,s=t;"ref"in t&&(i=t.ref,delete t.ref);var c={type:e,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--ft,__i:-1,__u:0,__source:o,__self:a};if("function"==typeof e&&(i=e.defaultProps))for(l in i)void 0===s[l]&&(s[l]=i[l]);return pt.fF.vnode&&pt.fF.vnode(c),c}const _t=(0,t.createContext)({}),gt=()=>(0,t.useContext)(_t).state,vt=()=>(0,t.useContext)(_t).dispatch,yt=Object.entries(dt).reduce(((e,t)=>{let[n,r]=t;return{...e,[n]:et(n)||r}}),{}),bt="YYYY-MM-DD",wt="YYYY-MM-DD HH:mm:ss",kt="YYYY-MM-DD[T]HH:mm:ss",xt=window.innerWidth/4,St=window.innerWidth/40,Ct=1,At=1578e8,Et=Intl.supportedValuesOf,Mt=Et?Et("timeZone"):["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Katmandu","Asia/Khandyga","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis"],Nt=[{long:"years",short:"y",possible:"year"},{long:"weeks",short:"w",possible:"week"},{long:"days",short:"d",possible:"day"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}],Tt=Nt.map((e=>e.short)),$t=e=>{let t=(n=e,Math.round(1e3*n)/1e3);var n;const r=Math.round(e);e>=100&&(t=r-r%10),e<100&&e>=10&&(t=r-r%5),e<10&&e>=1&&(t=r),e<1&&e>.01&&(t=Math.round(40*e)/40);const a=(e=>zt(o().duration(e,"seconds").asMilliseconds()))(t||.001);return a.replace(/\s/g,"")},Pt=e=>{const t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Tt.includes(n[0]))return{[n[0]]:t[0]}},Dt=(e,t)=>$t(e/(t?St:xt)),Ot=(e,t)=>{const n=(t||o()().toDate()).valueOf()/1e3,r=(e=>{const t=Nt.map((e=>e.short)).join("|"),n=new RegExp(`\\d+(\\.\\d+)?[${t}]+`,"g"),r=(e.match(n)||[]).reduce(((e,t)=>{const n=Pt(t);return n?{...e,...n}:{...e}}),{});return o().duration(r).asSeconds()})(e);return{start:n-r,end:n,step:Dt(r),date:Lt(t||o()().toDate())}},Lt=e=>o().tz(e).utc().format(kt),Rt=e=>o().tz(e).format(kt),zt=e=>{const t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),o=Math.floor(e/1e3/3600%24),a=Math.floor(e/864e5),i=["d","h","m","s","ms"],l=[a,o,r,n,t].map(((e,t)=>e?`${e}${i[t]}`:""));return l.filter((e=>e)).join("")},It=e=>{const t=o()(1e3*e);return t.isValid()?t.toDate():new Date},jt="logs"===Ue.logs,Ft=[{title:"Last 5 minutes",duration:"5m",isDefault:jt},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!jt},{title:"Last 1 hour",duration:"1h"},{title:"Last 3 hours",duration:"3h"},{title:"Last 6 hours",duration:"6h"},{title:"Last 12 hours",duration:"12h"},{title:"Last 24 hours",duration:"24h"},{title:"Last 2 days",duration:"2d"},{title:"Last 7 days",duration:"7d"},{title:"Last 30 days",duration:"30d"},{title:"Last 90 days",duration:"90d"},{title:"Last 180 days",duration:"180d"},{title:"Last 1 year",duration:"1y"},{title:"Yesterday",duration:"1d",until:()=>o()().tz().subtract(1,"day").endOf("day").toDate()},{title:"Today",duration:"1d",until:()=>o()().tz().endOf("day").toDate()}].map((e=>({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:()=>o()().tz().toDate(),...e}))),Ht=e=>{var t;let{relativeTimeId:n,defaultDuration:r,defaultEndInput:o}=e;const a=null===(t=Ft.find((e=>e.isDefault)))||void 0===t?void 0:t.id,i=n||et("g0.relative_time",a),l=Ft.find((e=>e.id===i));return{relativeTimeId:l?i:"none",duration:l?l.duration:r,endInput:l?l.until():o}},Vt=e=>`UTC${o()().tz(e).format("Z")}`,Bt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=new RegExp(e,"i");return Mt.reduce(((n,r)=>{const o=(r.match(/^(.*?)\//)||[])[1]||"unknown",a=Vt(r),i=a.replace(/UTC|0/,""),l=r.replace(/[/_]/g," "),s={region:r,utc:a,search:`${r} ${a} ${l} ${i}`},c=!e||e&&t.test(s.search);return c&&n[o]?n[o].push(s):c&&(n[o]=[s]),n}),{})},Ut=e=>{o().tz.setDefault(e)},Yt=()=>{const e=o().tz.guess(),t=(e=>{try{return o()().tz(e),!0}catch(Id){return!1}})(e);return{isValid:t,title:t?`Browser Time (${e})`:"Browser timezone (UTC)",region:t?e:"UTC"}},Wt=We("TIMEZONE")||Yt().region;Ut(Wt);const qt={...(()=>{const e=et("g0.range_input"),{duration:t,endInput:n,relativeTimeId:r}=Ht({defaultDuration:e||"1h",defaultEndInput:(a=et("g0.end_input",o()().utc().format(kt)),o()(a).utcOffset(0,!0).toDate()),relativeTimeId:e?et("g0.relative_time","none"):void 0});var a;return{duration:t,period:Ot(t,n),relativeTime:r}})(),timezone:Wt};function Kt(e,t){switch(t.type){case"SET_TIME_STATE":return{...e,...t.payload};case"SET_DURATION":return{...e,duration:t.payload,period:Ot(t.payload,It(e.period.end)),relativeTime:"none"};case"SET_RELATIVE_TIME":return{...e,duration:t.payload.duration,period:Ot(t.payload.duration,t.payload.until),relativeTime:t.payload.id};case"SET_PERIOD":const n=(e=>{const t=e.to.valueOf()-e.from.valueOf();return zt(t)})(t.payload);return{...e,duration:n,period:Ot(n,t.payload.to),relativeTime:"none"};case"RUN_QUERY":const{duration:r,endInput:o}=Ht({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:It(e.period.end)});return{...e,period:Ot(r,o)};case"RUN_QUERY_TO_NOW":return{...e,period:Ot(e.duration)};case"SET_TIMEZONE":return Ut(t.payload),Ye("TIMEZONE",t.payload),e.defaultTimezone&&Ye("DISABLED_DEFAULT_TIMEZONE",t.payload!==e.defaultTimezone),{...e,timezone:t.payload};case"SET_DEFAULT_TIMEZONE":return{...e,defaultTimezone:t.payload};default:throw new Error}}const Zt=(0,t.createContext)({}),Gt=()=>(0,t.useContext)(Zt).state,Qt=()=>(0,t.useContext)(Zt).dispatch,Jt=e=>{const t=e.map((e=>e.values[e.index])),n=(e=>{const t=We(e);return t?JSON.parse(t):[]})("QUERY_HISTORY");n[0]||(n[0]=[]);const r=n[0];t.forEach((e=>{!r.includes(e)&&e&&r.unshift(e),r.length>250&&r.shift()})),Ye("QUERY_HISTORY",JSON.stringify(n))},Xt=50,en=1e3,tn=1e3;const nn=(()=>{var e;const t=(null===(e=(window.location.hash.split("?")[1]||"").match(/g\d+\.expr/g))||void 0===e?void 0:e.length)||1;return new Array(t>10?10:t).fill(1).map(((e,t)=>et(`g${t}.expr`,"")))})(),rn={query:nn,queryHistory:nn.map((e=>({index:0,values:[e]}))),autocomplete:We("AUTOCOMPLETE")||!1,autocompleteQuick:!1,autocompleteCache:new class{constructor(){this.maxSize=void 0,this.map=void 0,this.maxSize=tn,this.map=new Map}get(e){for(const[t,n]of this.map){const r=JSON.parse(t),o=r.start===e.start&&r.end===e.end,a=r.type===e.type,i=e.value&&r.value&&e.value.includes(r.value),l=r.match===e.match||i,s=n.length=this.maxSize){const e=this.map.keys().next().value;this.map.delete(e)}this.map.set(JSON.stringify(e),t)}},metricsQLFunctions:[]};function on(e,t){switch(t.type){case"SET_QUERY":return{...e,query:t.payload.map((e=>e))};case"SET_QUERY_HISTORY":return Jt(t.payload),{...e,queryHistory:t.payload};case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),{...e,queryHistory:e.queryHistory};case"TOGGLE_AUTOCOMPLETE":return Ye("AUTOCOMPLETE",!e.autocomplete),{...e,autocomplete:!e.autocomplete};case"SET_AUTOCOMPLETE_QUICK":return{...e,autocompleteQuick:t.payload};case"SET_AUTOCOMPLETE_CACHE":return e.autocompleteCache.put(t.payload.key,t.payload.value),{...e};case"SET_METRICSQL_FUNCTIONS":return{...e,metricsQLFunctions:t.payload};default:throw new Error}}const an=(0,t.createContext)({}),ln=()=>(0,t.useContext)(an).state,sn=()=>(0,t.useContext)(an).dispatch,cn=()=>mt("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:mt("path",{d:"M6.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29C15.73 4.1 12.46 3.01 7.43 3h-.06C2.33 3-.93 4.1.24 5.18c0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a454.94 454.94 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44a454.4 454.4 0 0 0 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM35 5l-5.84 14.46h-2.43L20.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H35Zm17.18 0v14.46H49.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L38.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H36.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15Z"})}),un=()=>mt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:[mt("path",{d:"M11.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29 1.17-1.09-2.1-2.17-7.13-2.18h-.06c-5.04 0-8.3 1.1-7.13 2.18 0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a455.13 455.13 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44 2.05-1.82 4.09-3.65 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM40 5l-5.84 14.46h-2.43L25.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H40Zm17.18 0v14.46H54.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L43.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H41.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15ZM1.73 36v-5.17l-.67-.07a.6.6 0 0 1-.21-.1.23.23 0 0 1-.08-.18v-.44h.96v-.59c0-.34.05-.65.14-.92a1.79 1.79 0 0 1 1.08-1.11 2.45 2.45 0 0 1 1.62-.02l-.03.53c0 .1-.06.15-.16.16H4c-.18 0-.35.03-.5.08a.95.95 0 0 0-.39.23c-.1.11-.19.25-.25.43-.05.18-.08.4-.08.65v.56h1.75v.78H2.8V36H1.73Zm6.17-6.17c.45 0 .85.07 1.2.22a2.57 2.57 0 0 1 1.5 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.86-.07-1.22-.21a2.57 2.57 0 0 1-1.5-1.62c-.12-.38-.19-.81-.19-1.3 0-.47.07-.9.2-1.28a2.57 2.57 0 0 1 1.5-1.62c.35-.15.76-.22 1.2-.22Zm0 5.42c.6 0 1.05-.2 1.35-.6.3-.4.44-.97.44-1.69s-.15-1.28-.44-1.69c-.3-.4-.75-.6-1.35-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.33.73-.08.28-.11.6-.11.96 0 .72.15 1.29.44 1.69.3.4.76.6 1.36.6Zm5.26-4.11c.2-.42.43-.74.71-.97.28-.24.62-.36 1.03-.36.13 0 .25.02.36.05.12.02.23.07.32.13l-.08.8c-.02.1-.08.15-.18.15l-.24-.04a1.7 1.7 0 0 0-.88.05c-.15.05-.29.14-.4.25-.12.1-.23.24-.32.4-.1.17-.18.35-.26.56V36h-1.07v-6.08h.61c.12 0 .2.02.24.07.05.04.08.12.1.23l.06.92Zm13.73-3.82L23.39 36h-1.46l-3.5-8.68h1.29a.54.54 0 0 1 .54.37l2.04 5.3a11.31 11.31 0 0 1 .37 1.21 11.65 11.65 0 0 1 .35-1.22l2.03-5.29c.03-.1.1-.18.19-.25.1-.08.21-.12.35-.12h1.3Zm2.2 2.52V36H27.6v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.08.36a1 1 0 0 1-.51.5.96.96 0 0 1-.73 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .37.08c.12.05.22.11.3.2a.94.94 0 0 1 .3.67Zm5.72 3.1a.68.68 0 0 1-.13.13c-.04.03-.1.05-.18.05a.42.42 0 0 1-.22-.07 3.95 3.95 0 0 0-.62-.31c-.14-.05-.3-.07-.51-.07-.26 0-.5.04-.69.14-.2.1-.36.23-.49.4-.13.18-.22.4-.29.64-.06.25-.1.53-.1.85 0 .33.04.62.1.88.08.25.18.47.32.64.13.18.29.3.48.4.18.09.4.13.63.13a1.6 1.6 0 0 0 .94-.27l.26-.2a.4.4 0 0 1 .25-.09.3.3 0 0 1 .27.14l.43.54a2.76 2.76 0 0 1-1.77.96c-.22.03-.43.05-.65.05a2.57 2.57 0 0 1-1.96-.83c-.25-.28-.45-.6-.6-1-.14-.4-.21-.85-.21-1.35 0-.45.06-.87.2-1.25a2.61 2.61 0 0 1 1.51-1.67c.37-.16.8-.24 1.28-.24.46 0 .86.07 1.2.22.35.15.66.36.94.64l-.4.54Zm3.43 4.95c-.54 0-.95-.15-1.24-.45-.28-.3-.42-.73-.42-1.26v-3.44h-.63a.29.29 0 0 1-.2-.07c-.06-.06-.09-.13-.09-.24v-.59l.99-.16.31-1.68a.33.33 0 0 1 .12-.18.34.34 0 0 1 .21-.07h.77v1.94h1.64v1.05h-1.64v3.34c0 .2.05.34.14.45.1.1.22.16.39.16a.73.73 0 0 0 .39-.1l.12-.07a.2.2 0 0 1 .11-.03c.05 0 .08.01.11.03l.09.1.44.72c-.21.18-.46.32-.74.4-.28.1-.57.15-.87.15Zm5.09-6.35c.46 0 .87.07 1.24.22a2.7 2.7 0 0 1 1.58 1.63c.14.39.22.83.22 1.31 0 .49-.08.93-.22 1.32-.14.4-.35.73-.62 1-.26.28-.58.49-.96.64-.37.15-.78.22-1.24.22a3.4 3.4 0 0 1-1.25-.22 2.71 2.71 0 0 1-1.59-1.64 3.8 3.8 0 0 1-.21-1.32c0-.48.07-.92.21-1.31a2.75 2.75 0 0 1 1.58-1.63c.38-.15.8-.22 1.26-.22Zm0 5.2c.51 0 .89-.17 1.13-.52.25-.34.38-.84.38-1.5a2.6 2.6 0 0 0-.38-1.53c-.24-.34-.62-.52-1.13-.52-.52 0-.9.18-1.16.53-.25.35-.37.85-.37 1.51s.12 1.17.37 1.51c.25.35.64.52 1.16.52Zm5.56-4.04c.2-.37.42-.65.69-.86.26-.21.57-.32.94-.32.28 0 .5.06.68.19l-.1 1.1a.3.3 0 0 1-.09.16.24.24 0 0 1-.15.04 1.8 1.8 0 0 1-.27-.03 2.01 2.01 0 0 0-.34-.03c-.16 0-.3.03-.44.08a1.1 1.1 0 0 0-.34.2c-.1.1-.2.2-.27.33-.08.13-.15.27-.22.44V36H47.7v-6.16h.87c.15 0 .26.03.31.09.06.05.1.15.13.29l.09.7Zm4.62-1.07V36h-1.49v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.07.36a1 1 0 0 1-.51.5.96.96 0 0 1-.74 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .38.08c.11.05.21.11.3.2a.94.94 0 0 1 .28.67Zm4.56 5.32a7.8 7.8 0 0 0-1.08.12c-.29.05-.52.12-.7.2a.92.92 0 0 0-.38.3.64.64 0 0 0-.11.36c0 .26.07.45.23.56.15.11.35.17.6.17.3 0 .57-.06.79-.17.22-.1.44-.28.65-.5v-1.04Zm-3.4-2.67c.71-.65 1.57-.97 2.56-.97.36 0 .68.06.97.18a1.99 1.99 0 0 1 1.16 1.24c.1.3.16.61.16.96V36h-.67a.7.7 0 0 1-.33-.06c-.07-.04-.13-.13-.18-.26l-.13-.44c-.16.14-.3.26-.46.37a2.8 2.8 0 0 1-.97.43 2.77 2.77 0 0 1-1.32-.05 1.62 1.62 0 0 1-.57-.31 1.41 1.41 0 0 1-.38-.53 1.85 1.85 0 0 1-.05-1.18c.05-.16.14-.3.25-.45.12-.14.28-.27.46-.4a3 3 0 0 1 .7-.32 9.19 9.19 0 0 1 2.2-.33v-.36c0-.41-.09-.71-.26-.91-.18-.2-.43-.3-.76-.3a1.84 1.84 0 0 0-1.02.28l-.33.18c-.1.06-.2.09-.32.09-.1 0-.2-.03-.27-.08a.72.72 0 0 1-.17-.2l-.26-.47Zm11.49 4.32V36h-4.88v-8.6h1.16v7.62h3.72Zm3.16-5.2c.44 0 .84.08 1.2.23a2.57 2.57 0 0 1 1.49 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.85-.07-1.21-.21a2.57 2.57 0 0 1-1.5-1.62c-.13-.38-.2-.81-.2-1.3 0-.47.07-.9.2-1.28.14-.39.33-.72.59-1 .25-.26.55-.47.9-.62.37-.15.77-.22 1.22-.22Zm0 5.43c.6 0 1.05-.2 1.34-.6.3-.4.45-.97.45-1.69s-.15-1.28-.45-1.69c-.3-.4-.74-.6-1.34-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.34.73-.07.28-.1.6-.1.96 0 .72.14 1.29.44 1.69.3.4.75.6 1.36.6Zm6.33-2.22c.22 0 .4-.03.57-.09.16-.06.3-.14.41-.25.12-.11.2-.24.26-.39.05-.15.08-.31.08-.5 0-.37-.11-.66-.34-.88-.23-.22-.55-.33-.98-.33-.43 0-.76.1-.99.33-.22.22-.34.51-.34.89 0 .18.03.34.09.5a1.1 1.1 0 0 0 .67.63c.16.06.35.09.57.09Zm1.93 3.3a.51.51 0 0 0-.13-.36.84.84 0 0 0-.34-.22 8.57 8.57 0 0 0-1.73-.2 7.5 7.5 0 0 1-.62-.05c-.23.1-.41.23-.56.4a.8.8 0 0 0-.1.92c.07.12.18.22.32.3.14.1.32.16.54.21a3.5 3.5 0 0 0 1.55 0c.23-.05.42-.12.57-.22.16-.1.29-.21.37-.34a.8.8 0 0 0 .13-.44Zm1.08-6.17v.4c0 .13-.08.21-.25.25l-.69.09c.14.26.2.56.2.88a1.86 1.86 0 0 1-1.36 1.82 3.07 3.07 0 0 1-1.72.04c-.12.08-.22.16-.29.25a.44.44 0 0 0-.1.27c0 .15.06.26.17.33.12.08.28.13.47.16a5 5 0 0 0 .66.06 16.56 16.56 0 0 1 1.5.13c.26.05.48.12.67.22.19.1.34.24.46.41.12.18.18.4.18.69 0 .26-.07.5-.2.75s-.31.46-.56.65c-.24.2-.54.34-.9.46a4.57 4.57 0 0 1-2.36.04c-.33-.09-.6-.2-.82-.36a1.56 1.56 0 0 1-.5-.51c-.1-.2-.16-.4-.16-.6 0-.3.1-.56.28-.77.19-.2.45-.37.77-.5a1.15 1.15 0 0 1-.43-.32.88.88 0 0 1-.15-.54c0-.09.01-.18.04-.27.04-.1.08-.2.15-.28a1.55 1.55 0 0 1 .58-.5c-.3-.16-.53-.39-.7-.66-.17-.28-.25-.6-.25-.97 0-.3.05-.57.16-.8.12-.25.28-.46.48-.63.2-.17.45-.3.73-.4a3 3 0 0 1 2.3.21h1.64Zm4.65.76a.24.24 0 0 1-.23.14.42.42 0 0 1-.2-.07 3.59 3.59 0 0 0-.67-.3 1.8 1.8 0 0 0-1.03 0c-.14.05-.27.11-.37.2a.87.87 0 0 0-.23.27.75.75 0 0 0-.08.35c0 .15.04.28.13.39.1.1.21.19.36.27.15.07.32.14.5.2a13.63 13.63 0 0 1 1.16.4c.2.08.36.18.5.3a1.33 1.33 0 0 1 .5 1.07 2 2 0 0 1-.15.78c-.1.24-.25.44-.45.62-.2.17-.43.3-.72.4a3.1 3.1 0 0 1-2.14-.05 2.97 2.97 0 0 1-.87-.53l.25-.41c.04-.05.07-.1.12-.12a.3.3 0 0 1 .17-.04.4.4 0 0 1 .22.08l.3.19a1.91 1.91 0 0 0 1.03.27c.2 0 .38-.03.54-.08.16-.06.29-.13.4-.22a.96.96 0 0 0 .3-.7c0-.17-.05-.31-.14-.42-.09-.11-.2-.2-.36-.28a2.6 2.6 0 0 0-.5-.2l-.59-.19c-.2-.06-.39-.14-.58-.22a2.14 2.14 0 0 1-.5-.3 1.45 1.45 0 0 1-.36-.46c-.1-.19-.14-.41-.14-.67a1.6 1.6 0 0 1 .57-1.23c.18-.16.4-.3.68-.39.26-.1.57-.14.91-.14a2.84 2.84 0 0 1 1.9.7l-.23.4Z"}),mt("defs",{children:mt("path",{d:"M0 0h85v38H0z"})})]}),dn=()=>mt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:mt("path",{d:"M11.118 10.476c.36.28.801.433 1.257.436h.052c.48-.007.961-.192 1.25-.444 1.509-1.279 5.88-5.287 5.88-5.287 1.168-1.087-2.093-2.174-7.13-2.181h-.06c-5.036.007-8.298 1.094-7.13 2.181 0 0 4.372 4.008 5.88 5.295zm2.559 2.166c-.359.283-.801.439-1.258.444h-.044a2.071 2.071 0 0 1-1.257-.444C10.082 11.755 6.384 8.42 5 7.148v1.93c0 .215.081.496.222.629l.07.064c1.045.955 4.546 4.154 5.825 5.245.358.283.8.438 1.257.444h.044c.489-.015.962-.2 1.258-.444 1.309-1.11 4.948-4.444 5.887-5.31.148-.132.222-.413.222-.628v-1.93a455.127 455.127 0 0 1-6.11 5.494zm-1.258 4.984a2.071 2.071 0 0 0 1.258-.436c2.053-1.815 4.09-3.65 6.11-5.502v1.938c0 .207-.075.488-.223.621-.94.873-4.578 4.2-5.887 5.31-.296.25-.77.436-1.258.443h-.044a2.071 2.071 0 0 1-1.257-.436c-1.204-1.027-4.376-3.928-5.616-5.062l-.28-.255c-.14-.133-.221-.414-.221-.621v-1.938c1.383 1.265 5.081 4.607 6.117 5.495.358.282.8.438 1.257.443h.044zM40 5l-5.84 14.46h-2.43L25.89 5h2.16c.233 0 .423.057.57.17.146.113.256.26.33.44l3.41 8.82c.113.287.22.603.32.95.106.34.206.697.3 1.07.08-.373.166-.73.26-1.07a8.84 8.84 0 0 1 .31-.95l3.39-8.82a.959.959 0 0 1 .31-.42.906.906 0 0 1 .58-.19H40zm17.176 0v14.46h-2.37v-9.34c0-.373.02-.777.06-1.21l-4.37 8.21c-.206.393-.523.59-.95.59h-.38c-.426 0-.743-.197-.95-.59l-4.42-8.24c.02.22.037.437.05.65.014.213.02.41.02.59v9.34h-2.37V5h2.03c.12 0 .224.003.31.01a.778.778 0 0 1 .23.05c.074.027.137.07.19.13.06.06.117.14.17.24l4.33 8.03c.114.213.217.433.31.66.1.227.197.46.29.7.094-.247.19-.483.29-.71.1-.233.207-.457.32-.67l4.27-8.01c.054-.1.11-.18.17-.24a.57.57 0 0 1 .19-.13.903.903 0 0 1 .24-.05c.087-.007.19-.01.31-.01h2.03zm8.887 13.73c.68 0 1.286-.117 1.82-.35.54-.24.996-.57 1.37-.99a4.28 4.28 0 0 0 .85-1.48c.2-.573.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.124 1.51-.37 2.19a5.248 5.248 0 0 1-1.07 1.77c-.46.5-1.024.893-1.69 1.18-.66.287-1.404.43-2.23.43-.827 0-1.574-.143-2.24-.43a5.012 5.012 0 0 1-1.69-1.18 5.33 5.33 0 0 1-1.06-1.77 6.373 6.373 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.096 1.277.29 1.85.2.567.483 1.06.85 1.48.373.42.826.75 1.36.99.54.24 1.15.36 1.83.36zm10.38.73h-1.03V5.31h1.03v14.15zM4.242 35v-5.166l-.672-.078a.595.595 0 0 1-.21-.09.23.23 0 0 1-.078-.186v-.438h.96v-.588c0-.348.048-.656.144-.924.1-.272.24-.5.42-.684a1.79 1.79 0 0 1 .66-.426c.256-.096.544-.144.864-.144.272 0 .522.04.75.12l-.024.534c-.008.096-.062.148-.162.156a4.947 4.947 0 0 1-.39.012c-.184 0-.352.024-.504.072a.949.949 0 0 0-.384.234c-.108.108-.192.25-.252.426a2.184 2.184 0 0 0-.084.654v.558h1.752v.774H5.316V35H4.242zM10.416 28.826a3.1 3.1 0 0 1 1.2.222c.356.148.66.358.912.63s.444.602.576.99c.136.384.204.814.204 1.29 0 .48-.068.912-.204 1.296a2.735 2.735 0 0 1-.576.984 2.572 2.572 0 0 1-.912.63 3.175 3.175 0 0 1-1.2.216c-.448 0-.852-.072-1.212-.216a2.572 2.572 0 0 1-.912-.63 2.805 2.805 0 0 1-.582-.984 3.972 3.972 0 0 1-.198-1.296c0-.476.066-.906.198-1.29.136-.388.33-.718.582-.99.252-.272.556-.482.912-.63.36-.148.764-.222 1.212-.222zm0 5.424c.6 0 1.048-.2 1.344-.6.296-.404.444-.966.444-1.686 0-.724-.148-1.288-.444-1.692-.296-.404-.744-.606-1.344-.606-.304 0-.57.052-.798.156a1.507 1.507 0 0 0-.564.45c-.148.196-.26.438-.336.726a3.941 3.941 0 0 0-.108.966c0 .72.148 1.282.444 1.686.3.4.754.6 1.362.6zM15.677 30.14c.192-.416.428-.74.708-.972.28-.236.622-.354 1.026-.354.128 0 .25.014.366.042.12.028.226.072.318.132l-.078.798c-.024.1-.084.15-.18.15-.056 0-.138-.012-.246-.036a1.694 1.694 0 0 0-.366-.036c-.192 0-.364.028-.516.084-.148.056-.282.14-.402.252a1.782 1.782 0 0 0-.318.408c-.092.16-.176.344-.252.552V35h-1.074v-6.078h.612c.116 0 .196.022.24.066.044.044.074.12.09.228l.072.924zM26.761 28.922 24.283 35h-.96l-2.478-6.078h.87a.33.33 0 0 1 .33.222l1.542 3.912c.048.148.09.292.126.432.036.14.07.28.102.42.032-.14.066-.28.102-.42.036-.14.08-.284.132-.432l1.56-3.912a.33.33 0 0 1 .12-.156.311.311 0 0 1 .198-.066h.834zM27.74 35v-6.078h.643c.152 0 .246.074.282.222l.078.624c.224-.276.476-.502.756-.678.28-.176.604-.264.972-.264.408 0 .738.114.99.342.256.228.44.536.552.924.088-.22.2-.41.336-.57a1.987 1.987 0 0 1 1.014-.624c.196-.048.394-.072.594-.072.32 0 .604.052.852.156.252.1.464.248.636.444.176.196.31.438.402.726.092.284.138.61.138.978V35H34.91v-3.87c0-.476-.104-.836-.312-1.08-.208-.248-.508-.372-.9-.372-.176 0-.344.032-.504.096-.156.06-.294.15-.414.27-.12.12-.216.272-.288.456-.068.18-.102.39-.102.63V35h-1.074v-3.87c0-.488-.098-.852-.294-1.092-.196-.24-.482-.36-.858-.36-.264 0-.508.072-.732.216a2.38 2.38 0 0 0-.618.576V35H27.74zM40.746 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM44.974 29.6c.124-.124.254-.238.39-.342a2.395 2.395 0 0 1 .936-.444c.176-.044.368-.066.576-.066.336 0 .634.058.894.174.26.112.476.272.648.48.176.204.308.45.396.738.092.284.138.598.138.942V35H47.47v-3.918c0-.376-.086-.666-.258-.87-.172-.208-.434-.312-.786-.312-.256 0-.496.058-.72.174a2.58 2.58 0 0 0-.636.474V35h-1.482v-6.156h.906c.192 0 .318.09.378.27l.102.486zM53.085 28.748c.456 0 .87.074 1.242.222a2.692 2.692 0 0 1 1.578 1.626c.144.392.216.83.216 1.314 0 .488-.072.928-.216 1.32-.144.392-.35.726-.618 1.002a2.653 2.653 0 0 1-.96.636 3.333 3.333 0 0 1-1.242.222c-.46 0-.878-.074-1.254-.222a2.712 2.712 0 0 1-.966-.636 2.922 2.922 0 0 1-.618-1.002 3.807 3.807 0 0 1-.216-1.32c0-.484.072-.922.216-1.314.148-.392.354-.724.618-.996.268-.272.59-.482.966-.63a3.397 3.397 0 0 1 1.254-.222zm0 5.202c.512 0 .89-.172 1.134-.516.248-.344.372-.848.372-1.512s-.124-1.17-.372-1.518c-.244-.348-.622-.522-1.134-.522-.52 0-.906.176-1.158.528-.248.348-.372.852-.372 1.512s.124 1.164.372 1.512c.252.344.638.516 1.158.516zM57.252 35v-6.156h.906c.192 0 .318.09.378.27l.096.456c.108-.12.22-.23.336-.33a2.017 2.017 0 0 1 1.32-.492c.388 0 .706.106.954.318.252.208.44.486.564.834a1.93 1.93 0 0 1 .834-.882c.172-.092.354-.16.546-.204.196-.044.392-.066.588-.066.34 0 .642.052.906.156.264.104.486.256.666.456.18.2.316.444.408.732.096.288.144.618.144.99V35h-1.482v-3.918c0-.392-.086-.686-.258-.882-.172-.2-.424-.3-.756-.3-.152 0-.294.026-.426.078a1.026 1.026 0 0 0-.342.228 1.019 1.019 0 0 0-.228.366 1.435 1.435 0 0 0-.084.51V35h-1.488v-3.918c0-.412-.084-.712-.252-.9-.164-.188-.406-.282-.726-.282-.216 0-.418.054-.606.162a1.979 1.979 0 0 0-.516.432V35h-1.482zM70.558 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM74.9 26.084V35h-1.482v-8.916H74.9zM81.969 28.844l-3.354 7.848a.538.538 0 0 1-.174.234c-.068.056-.174.084-.318.084h-1.104l1.152-2.472-2.49-5.694h1.302c.116 0 .206.028.27.084.068.056.118.12.15.192l1.308 3.192c.044.108.08.216.108.324.032.108.062.218.09.33a32.3 32.3 0 0 1 .108-.33c.036-.112.076-.222.12-.33l1.236-3.186a.437.437 0 0 1 .408-.276h1.188z"})}),hn=()=>mt("svg",{viewBox:"0 0 15 17",fill:"currentColor",children:mt("path",{d:"M6.11767 7.47586C6.47736 7.75563 6.91931 7.90898 7.37503 7.91213H7.42681C7.90756 7.90474 8.38832 7.71987 8.67677 7.46846C10.1856 6.18921 14.5568 2.18138 14.5568 2.18138C15.7254 1.09438 12.4637 0.00739 7.42681 0H7.36764C2.3308 0.00739 -0.930935 1.09438 0.237669 2.18138C0.237669 2.18138 4.60884 6.18921 6.11767 7.47586ZM8.67677 9.64243C8.31803 9.92483 7.87599 10.0808 7.41941 10.0861H7.37503C6.91845 10.0808 6.47641 9.92483 6.11767 9.64243C5.0822 8.75513 1.38409 5.42018 0.000989555 4.14832V6.07829C0.000989555 6.29273 0.0823481 6.57372 0.222877 6.70682L0.293316 6.7712L0.293344 6.77122C1.33784 7.72579 4.83903 10.9255 6.11767 12.0161C6.47641 12.2985 6.91845 12.4545 7.37503 12.4597H7.41941C7.90756 12.4449 8.38092 12.2601 8.67677 12.0161C9.9859 10.9069 13.6249 7.57198 14.5642 6.70682C14.7121 6.57372 14.7861 6.29273 14.7861 6.07829V4.14832C12.7662 5.99804 10.7297 7.82949 8.67677 9.64243ZM7.41941 14.6263C7.87513 14.6232 8.31708 14.4698 8.67677 14.19C10.7298 12.3746 12.7663 10.5407 14.7861 8.68853V10.6259C14.7861 10.8329 14.7121 11.1139 14.5642 11.247C13.6249 12.1196 9.9859 15.4471 8.67677 16.5563C8.38092 16.8077 7.90756 16.9926 7.41941 17H7.37503C6.91931 16.9968 6.47736 16.8435 6.11767 16.5637C4.91427 15.5373 1.74219 12.6364 0.502294 11.5025C0.393358 11.4029 0.299337 11.3169 0.222877 11.247C0.0823481 11.1139 0.000989555 10.8329 0.000989555 10.6259V8.68853C1.38409 9.95303 5.0822 13.2953 6.11767 14.1827C6.47641 14.4651 6.91845 14.6211 7.37503 14.6263H7.41941Z"})}),pn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"})}),fn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),mn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zm-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z"})}),_n=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})}),gn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),vn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),yn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),bn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"})}),wn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),kn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"m7 10 5 5 5-5z"})}),xn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[mt("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),mt("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),Sn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"})}),Cn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"})}),An=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"})}),En=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M8 5v14l11-7z"})}),Mn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"})}),Nn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10H3v9z"})}),Tn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"})}),$n=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M8.9999 14.7854L18.8928 4.8925C19.0803 4.70497 19.3347 4.59961 19.5999 4.59961C19.8651 4.59961 20.1195 4.70497 20.307 4.8925L21.707 6.2925C22.0975 6.68303 22.0975 7.31619 21.707 7.70672L9.70701 19.7067C9.31648 20.0972 8.68332 20.0972 8.2928 19.7067L2.6928 14.1067C2.50526 13.9192 2.3999 13.6648 2.3999 13.3996C2.3999 13.1344 2.50526 12.88 2.6928 12.6925L4.0928 11.2925C4.48332 10.902 5.11648 10.902 5.50701 11.2925L8.9999 14.7854Z"})}),Pn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})}),Dn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"})}),On=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),Ln=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})}),Rn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 5C19.89 4.65 18.67 4.5 17.5 4.5C15.55 4.5 13.45 4.9 12 6C10.55 4.9 8.45 4.5 6.5 4.5C5.33 4.5 4.11 4.65 3 5C2.25 5.25 1.6 5.55 1 6V20.6C1 20.85 1.25 21.1 1.5 21.1C1.6 21.1 1.65 21.1 1.75 21.05C3.15 20.3 4.85 20 6.5 20C8.2 20 10.65 20.65 12 21.5C13.35 20.65 15.8 20 17.5 20C19.15 20 20.85 20.3 22.25 21.05C22.35 21.1 22.4 21.1 22.5 21.1C22.75 21.1 23 20.85 23 20.6V6C22.4 5.55 21.75 5.25 21 5ZM21 18.5C19.9 18.15 18.7 18 17.5 18C15.8 18 13.35 18.65 12 19.5C10.65 18.65 8.2 18 6.5 18C5.3 18 4.1 18.15 3 18.5V7C4.1 6.65 5.3 6.5 6.5 6.5C8.2 6.5 10.65 7.15 12 8C13.35 7.15 15.8 6.5 17.5 6.5C18.7 6.5 19.9 6.65 21 7V18.5Z"}),mt("path",{d:"M17.5 10.5C18.38 10.5 19.23 10.59 20 10.76V9.24C19.21 9.09 18.36 9 17.5 9C15.8 9 14.26 9.29 13 9.83V11.49C14.13 10.85 15.7 10.5 17.5 10.5ZM13 12.49V14.15C14.13 13.51 15.7 13.16 17.5 13.16C18.38 13.16 19.23 13.25 20 13.42V11.9C19.21 11.75 18.36 11.66 17.5 11.66C15.8 11.66 14.26 11.96 13 12.49ZM17.5 14.33C15.8 14.33 14.26 14.62 13 15.16V16.82C14.13 16.18 15.7 15.83 17.5 15.83C18.38 15.83 19.23 15.92 20 16.09V14.57C19.21 14.41 18.36 14.33 17.5 14.33Z"}),mt("path",{d:"M6.5 10.5C5.62 10.5 4.77 10.59 4 10.76V9.24C4.79 9.09 5.64 9 6.5 9C8.2 9 9.74 9.29 11 9.83V11.49C9.87 10.85 8.3 10.5 6.5 10.5ZM11 12.49V14.15C9.87 13.51 8.3 13.16 6.5 13.16C5.62 13.16 4.77 13.25 4 13.42V11.9C4.79 11.75 5.64 11.66 6.5 11.66C8.2 11.66 9.74 11.96 11 12.49ZM6.5 14.33C8.2 14.33 9.74 14.62 11 15.16V16.82C9.87 16.18 8.3 15.83 6.5 15.83C5.62 15.83 4.77 15.92 4 16.09V14.57C4.79 14.41 5.64 14.33 6.5 14.33Z"})]}),zn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 6C9.79 6 8 7.79 8 10H10C10 8.9 10.9 8 12 8C13.1 8 14 8.9 14 10C14 10.8792 13.4202 11.3236 12.7704 11.8217C11.9421 12.4566 11 13.1787 11 15H13C13 13.9046 13.711 13.2833 14.4408 12.6455C15.21 11.9733 16 11.2829 16 10C16 7.79 14.21 6 12 6ZM13 16V18H11V16H13Z"})}),In=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2zm4 1H4V5h2v2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2z"})}),jn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),Fn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M7 20h4c0 1.1-.9 2-2 2s-2-.9-2-2zm-2-1h8v-2H5v2zm11.5-9.5c0 3.82-2.66 5.86-3.77 6.5H5.27c-1.11-.64-3.77-2.68-3.77-6.5C1.5 5.36 4.86 2 9 2s7.5 3.36 7.5 7.5zm4.87-2.13L20 8l1.37.63L22 10l.63-1.37L24 8l-1.37-.63L22 6l-.63 1.37zM19 6l.94-2.06L22 3l-2.06-.94L19 0l-.94 2.06L16 3l2.06.94L19 6z"})}),Hn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M3 14h4v-4H3v4zm0 5h4v-4H3v4zM3 9h4V5H3v4zm5 5h13v-4H8v4zm0 5h13v-4H8v4zM8 5v4h13V5H8z"})}),Vn=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-error"),children:mt("path",{d:"M13.5095 4L8.50952 1H7.50952L2.50952 4L2.01953 4.85999V10.86L2.50952 11.71L7.50952 14.71H8.50952L13.5095 11.71L13.9995 10.86V4.85999L13.5095 4ZM7.50952 13.5601L3.00952 10.86V5.69995L7.50952 8.15002V13.5601ZM3.26953 4.69995L8.00952 1.85999L12.7495 4.69995L8.00952 7.29004L3.26953 4.69995ZM13.0095 10.86L8.50952 13.5601V8.15002L13.0095 5.69995V10.86Z"})}),Bn=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-primary"),children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 5H4V4H1.5L1 4.5V12.5L1.5 13H4V12H2V5ZM14.5 4H12V5H14V12H12V13H14.5L15 12.5V4.5L14.5 4ZM11.76 6.56995L12 7V9.51001L11.7 9.95996L7.19995 11.96H6.73999L4.23999 10.46L4 10.03V7.53003L4.30005 7.06995L8.80005 5.06995H9.26001L11.76 6.56995ZM5 9.70996L6.5 10.61V9.28003L5 8.38V9.70996ZM5.57996 7.56006L7.03003 8.43005L10.42 6.93005L8.96997 6.06006L5.57996 7.56006ZM7.53003 10.73L11.03 9.17004V7.77002L7.53003 9.31995V10.73Z"})}),Un=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-warning"),children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 2H8L7 3V6H8V3H14V8H10V9H14L15 8V3L14 2ZM9 6H13V7H9.41L9 6.59V6ZM7 7H2L1 8V13L2 14H8L9 13V8L8 7H7ZM8 13H2V8H8V9V13ZM3 9H7V10H3V9ZM3 11H7V12H3V11ZM9 4H13V5H9V4Z"})}),Yn=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-primary"),children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 3L8 2H14L15 3V8L14 9H10V8H14V3H8V6H7V3ZM9 9V8L8 7H7H2L1 8V13L2 14H8L9 13V9ZM8 8V9V13H2V8H7H8ZM9.41421 7L9 6.58579V6H13V7H9.41421ZM9 4H13V5H9V4ZM7 10H3V11H7V10Z"})}),Wn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"})}),qn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z"})}),Kn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"})}),Zn=()=>mt("svg",{viewBox:"0 0 24 24",children:mt("path",{fill:"currentColor",d:"M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z",children:mt("animateTransform",{attributeName:"transform",dur:"0.75s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})})});var Gn=n(738),Qn=n.n(Gn);const Jn=e=>{let{to:t,isNavLink:n,children:r,...o}=e;return n?mt(Le,{to:t,...o,children:r}):mt("div",{...o,children:r})},Xn=e=>{let{activeItem:t,item:n,color:r=it("color-primary"),activeNavRef:o,onChange:a,isNavLink:i}=e;return mt(Jn,{className:Qn()({"vm-tabs-item":!0,"vm-tabs-item_active":t===n.value,[n.className||""]:n.className}),isNavLink:i,to:n.value,style:{color:r},onClick:(l=n.value,()=>{a&&a(l)}),ref:t===n.value?o:void 0,children:[n.icon&&mt("div",{className:Qn()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!n.label}),children:n.icon}),n.label]});var l};const er=function(e,n,r,o){const a=(0,t.useRef)(n);(0,t.useEffect)((()=>{a.current=n}),[n]),(0,t.useEffect)((()=>{var t;const n=null!==(t=null===r||void 0===r?void 0:r.current)&&void 0!==t?t:window;if(!n||!n.addEventListener)return;const i=e=>a.current(e);return n.addEventListener(e,i,o),()=>{n.removeEventListener(e,i,o)}}),[e,r,o])},tr=()=>{const[e,n]=(0,t.useState)({width:0,height:0}),r=()=>{n({width:window.innerWidth,height:window.innerHeight})};return er("resize",r),(0,t.useEffect)(r,[]),e},nr=e=>{let{activeItem:n,items:r,color:o=it("color-primary"),onChange:a,indicatorPlacement:i="bottom",isNavLink:l}=e;const s=tr(),c=(0,t.useRef)(null),[u,d]=(0,t.useState)({left:0,width:0,bottom:0});return(0,t.useEffect)((()=>{var e;if((null===(e=c.current)||void 0===e?void 0:e.base)instanceof HTMLElement){const{offsetLeft:e,offsetWidth:t,offsetHeight:n}=c.current.base;d({left:e,width:t,bottom:"top"===i?n-2:0})}}),[s,n,c,r]),mt("div",{className:"vm-tabs",children:[r.map((e=>mt(Xn,{activeItem:n,item:e,onChange:a,color:o,activeNavRef:c,isNavLink:l},e.value))),mt("div",{className:"vm-tabs__indicator",style:{...u,borderColor:o}})]})},rr=[{value:nt.chart,icon:mt(Mn,{}),label:"Graph",prometheusCode:0},{value:nt.code,icon:mt(Tn,{}),label:"JSON",prometheusCode:3},{value:nt.table,icon:mt(Nn,{}),label:"Table",prometheusCode:1}],or=We("SERIES_LIMITS"),ar={displayType:(()=>{const e=et("g0.tab",0),t=rr.find((t=>t.prometheusCode===+e||t.value===e));return(null===t||void 0===t?void 0:t.value)||nt.chart})(),nocache:!1,isTracingEnabled:!1,seriesLimits:or?JSON.parse(or):Xe,tableCompact:We("TABLE_COMPACT")||!1};function ir(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return{...e,displayType:t.payload};case"SET_SERIES_LIMITS":return Ye("SERIES_LIMITS",JSON.stringify(t.payload)),{...e,seriesLimits:t.payload};case"TOGGLE_QUERY_TRACING":return{...e,isTracingEnabled:!e.isTracingEnabled};case"TOGGLE_NO_CACHE":return{...e,nocache:!e.nocache};case"TOGGLE_TABLE_COMPACT":return Ye("TABLE_COMPACT",!e.tableCompact),{...e,tableCompact:!e.tableCompact};default:throw new Error}}const lr=(0,t.createContext)({}),sr={customStep:et("g0.step_input",""),yaxis:{limits:{enable:!1,range:{1:[0,0]}}},isHistogram:!1,spanGaps:!1};function cr(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,enable:!e.yaxis.limits.enable}}};case"SET_CUSTOM_STEP":return{...e,customStep:t.payload};case"SET_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,range:t.payload}}};case"SET_IS_HISTOGRAM":return{...e,isHistogram:t.payload};case"SET_SPAN_GAPS":return{...e,spanGaps:t.payload};default:throw new Error}}const ur=(0,t.createContext)({}),dr={dashboardsSettings:[],dashboardsLoading:!1,dashboardsError:""};function hr(e,t){switch(t.type){case"SET_DASHBOARDS_SETTINGS":return{...e,dashboardsSettings:t.payload};case"SET_DASHBOARDS_LOADING":return{...e,dashboardsLoading:t.payload};case"SET_DASHBOARDS_ERROR":return{...e,dashboardsError:t.payload};default:throw new Error}}const pr=(0,t.createContext)({}),fr={markdownParsing:"true"===We("LOGS_MARKDOWN")};function mr(e,t){if("SET_MARKDOWN_PARSING"===t.type)return Ye("LOGS_MARKDOWN",`${t.payload}`),{...e,markdownParsing:t.payload};throw new Error}const _r=(0,t.createContext)({}),gr=()=>(0,t.useContext)(_r).state,vr={windows:"Windows",mac:"Mac OS",linux:"Linux"},yr=()=>(Object.values(vr).find((e=>navigator.userAgent.indexOf(e)>=0))||"unknown")===vr.mac;function br(){const e=tr(),n=()=>{const e=["Android","webOS","iPhone","iPad","iPod","BlackBerry","Windows Phone"].map((e=>navigator.userAgent.match(new RegExp(e,"i")))).some((e=>e)),t=window.innerWidth<500;return e||t},[r,o]=(0,t.useState)(n());return(0,t.useEffect)((()=>{o(n())}),[e]),{isMobile:r}}const wr={success:mt(yn,{}),error:mt(vn,{}),warning:mt(gn,{}),info:mt(_n,{})},kr=e=>{let{variant:t,children:n}=e;const{isDarkTheme:r}=gt(),{isMobile:o}=br();return mt("div",{className:Qn()({"vm-alert":!0,[`vm-alert_${t}`]:t,"vm-alert_dark":r,"vm-alert_mobile":o}),children:[mt("div",{className:"vm-alert__icon",children:wr[t||"info"]}),mt("div",{className:"vm-alert__content",children:n})]})},xr=(0,t.createContext)({showInfoMessage:()=>{}}),Sr=function(){for(var e=arguments.length,t=new Array(e),n=0;nn=>{let{children:r}=n;return mt(e,{children:mt(t,{children:r})})}),(e=>{let{children:t}=e;return mt(pt.FK,{children:t})}))}(...[e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(ht,yt),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(_t.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(Kt,qt),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(Zt.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(on,rn),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(an.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(ir,ar),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(lr.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(cr,sr),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(ur.Provider,{value:a,children:n})},e=>{let{children:n}=e;const{isMobile:r}=br(),[o,a]=(0,t.useState)({}),[i,l]=(0,t.useState)(!1),[s,c]=(0,t.useState)(void 0);(0,t.useEffect)((()=>{if(!s)return;a({message:s.text,variant:s.type,key:Date.now()}),l(!0);const e=setTimeout(u,4e3);return()=>clearTimeout(e)}),[s]);const u=()=>{c(void 0),l(!1)};return mt(xr.Provider,{value:{showInfoMessage:c},children:[i&&mt("div",{className:Qn()({"vm-snackbar":!0,"vm-snackbar_mobile":r}),children:mt(kr,{variant:o.variant,children:mt("div",{className:"vm-snackbar-content",children:[mt("span",{children:o.message}),mt("div",{className:"vm-snackbar-content__close",onClick:u,children:mt(fn,{})})]})})}),n]})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(hr,dr),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(pr.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(mr,fr),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(_r.Provider,{value:a,children:n})}]),Cr=e=>{if(7!=e.length)return"0, 0, 0";return`${parseInt(e.slice(1,3),16)}, ${parseInt(e.slice(3,5),16)}, ${parseInt(e.slice(5,7),16)}`},Ar={[tt.yhatUpper]:"#7126a1",[tt.yhatLower]:"#7126a1",[tt.yhat]:"#da42a6",[tt.anomaly]:"#da4242",[tt.anomalyScore]:"#7126a1",[tt.actual]:"#203ea9",[tt.training]:`rgba(${Cr("#203ea9")}, 0.2)`},Er={"color-primary":"#589DF6","color-secondary":"#316eca","color-error":"#e5534b","color-warning":"#c69026","color-info":"#539bf5","color-success":"#57ab5a","color-background-body":"#22272e","color-background-block":"#2d333b","color-background-tooltip":"rgba(22, 22, 22, 0.8)","color-text":"#cdd9e5","color-text-secondary":"#768390","color-text-disabled":"#636e7b","box-shadow":"rgba(0, 0, 0, 0.16) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.2) 0px 2px 8px 0px","border-divider":"1px solid rgba(99, 110, 123, 0.5)","color-hover-black":"rgba(0, 0, 0, 0.12)","color-log-hits-bar-0":"rgba(255, 255, 255, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},Mr={"color-primary":"#3F51B5","color-secondary":"#E91E63","color-error":"#FD080E","color-warning":"#FF8308","color-info":"#03A9F4","color-success":"#4CAF50","color-background-body":"#FEFEFF","color-background-block":"#FFFFFF","color-background-tooltip":"rgba(80,80,80,0.9)","color-text":"#110f0f","color-text-secondary":"#706F6F","color-text-disabled":"#A09F9F","box-shadow":"rgba(0, 0, 0, 0.08) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.1) 0px 2px 8px 0px","border-divider":"1px solid rgba(0, 0, 0, 0.15)","color-hover-black":"rgba(0, 0, 0, 0.06)","color-log-hits-bar-0":"rgba(0, 0, 0, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},Nr=()=>{const[e,n]=(0,t.useState)(st()),r=e=>{n(e.matches)};return(0,t.useEffect)((()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");return e.addEventListener("change",r),()=>e.removeEventListener("change",r)}),[]),e},Tr=["primary","secondary","error","warning","info","success"],$r=e=>{let{onLoaded:n}=e;const r=He(),{palette:o={}}=Fe(),{theme:a}=gt(),i=Nr(),l=vt(),s=tr(),[c,u]=(0,t.useState)({[ot.dark]:Er,[ot.light]:Mr,[ot.system]:st()?Er:Mr}),d=()=>{const{innerWidth:e,innerHeight:t}=window,{clientWidth:n,clientHeight:r}=document.documentElement;lt("scrollbar-width",e-n+"px"),lt("scrollbar-height",t-r+"px"),lt("vh",.01*t+"px")},h=()=>{Tr.forEach(((e,t)=>{const r=(e=>{let t=e.replace("#","").trim();if(3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length)throw new Error("Invalid HEX color.");return(299*parseInt(t.slice(0,2),16)+587*parseInt(t.slice(2,4),16)+114*parseInt(t.slice(4,6),16))/1e3>=128?"#000000":"#FFFFFF"})(it(`color-${e}`));lt(`${e}-text`,r),t===Tr.length-1&&(l({type:"SET_DARK_THEME"}),n(!0))}))},p=()=>{const e=We("THEME")||ot.system,t=c[e];Object.entries(t).forEach((e=>{let[t,n]=e;lt(t,n)})),h(),r&&(Tr.forEach((e=>{const t=o[e];t&<(`color-${e}`,t)})),h())};return(0,t.useEffect)((()=>{d(),p()}),[c]),(0,t.useEffect)(d,[s]),(0,t.useEffect)((()=>{const e=st()?Er:Mr;c[ot.system]!==e?u((t=>({...t,[ot.system]:e}))):p()}),[a,i]),(0,t.useEffect)((()=>{r&&l({type:"SET_THEME",payload:ot.light})}),[]),null},Pr=()=>{const{showInfoMessage:e}=(0,t.useContext)(xr);return async(t,n)=>{var r;if(null===(r=navigator)||void 0===r||!r.clipboard)return e({text:"Clipboard not supported",type:"error"}),console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(t),n&&e({text:n,type:"success"}),!0}catch(o){return o instanceof Error&&e({text:`${o.name}: ${o.message}`,type:"error"}),console.warn("Copy failed",o),!1}}},Dr=e=>{let{variant:t="contained",color:n="primary",size:r="medium",ariaLabel:o,children:a,endIcon:i,startIcon:l,fullWidth:s=!1,className:c,disabled:u,onClick:d,onMouseDown:h}=e;return mt("button",{className:Qn()({"vm-button":!0,[`vm-button_${t}_${n}`]:!0,[`vm-button_${r}`]:r,"vm-button_icon":(l||i)&&!a,"vm-button_full-width":s,"vm-button_with-icon":l||i,"vm-button_disabled":u,[c||""]:c}),disabled:u,"aria-label":o,onClick:d,onMouseDown:h,children:mt(pt.FK,{children:[l&&mt("span",{className:"vm-button__start-icon",children:l}),a&&mt("span",{children:a}),i&&mt("span",{className:"vm-button__end-icon",children:i})]})})},Or=e=>{let{data:n}=e;const r=Pr(),o=(0,t.useMemo)((()=>`[\n${n.map((e=>1===Object.keys(e).length?JSON.stringify(e):JSON.stringify(e,null,2))).join(",\n").replace(/^/gm," ")}\n]`),[n]);return mt("div",{className:"vm-json-view",children:[mt("div",{className:"vm-json-view__copy",children:mt(Dr,{variant:"outlined",onClick:async()=>{await r(o,"Formatted JSON has been copied")},children:"Copy JSON"})}),mt("pre",{className:"vm-json-view__code",children:mt("code",{children:o})})]})},Lr=(e,n)=>{const[r]=je(),o=r.get(n)?r.get(n):e,[a,i]=(0,t.useState)(o);return(0,t.useEffect)((()=>{o!==a&&i(o)}),[o]),[a,i]},Rr=()=>{const e=oe(),[n,r]=je();return{setSearchParamsFromKeys:(0,t.useCallback)((t=>{const o=!!Array.from(n.values()).length;let a=!1;Object.entries(t).forEach((e=>{let[t,r]=e;n.get(t)!==`${r}`&&(n.set(t,`${r}`),a=!0)})),a&&(o?r(n):e(`?${n.toString()}`,{replace:!0}))}),[n,e])}},zr=e=>{let{checked:t=!1,disabled:n=!1,label:r,color:o="secondary",onChange:a}=e;return mt("div",{className:Qn()({"vm-checkbox":!0,"vm-checkbox_disabled":n,"vm-checkbox_active":t,[`vm-checkbox_${o}_active`]:t,[`vm-checkbox_${o}`]:o}),onClick:()=>{n||a(!t)},children:[mt("div",{className:"vm-checkbox-track",children:mt("div",{className:"vm-checkbox-track__thumb",children:mt($n,{})})}),r&&mt("span",{className:"vm-checkbox__label",children:r})]})},Ir=e=>{let{children:n,title:r,open:o,placement:a="bottom-center",offset:i={top:6,left:0}}=e;const{isMobile:l}=br(),[s,c]=(0,t.useState)(!1),[u,d]=(0,t.useState)({width:0,height:0}),h=(0,t.useRef)(null),p=(0,t.useRef)(null),f=()=>c(!1);(0,t.useEffect)((()=>{if(p.current&&s)return d({width:p.current.clientWidth,height:p.current.clientHeight}),window.addEventListener("scroll",f),()=>{window.removeEventListener("scroll",f)}}),[s,r]);const m=(0,t.useMemo)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(!t||!s)return{};const n=t.getBoundingClientRect(),r={top:0,left:0},o="bottom-right"===a||"top-right"===a,l="bottom-left"===a||"top-left"===a,c=null===a||void 0===a?void 0:a.includes("top"),d=(null===i||void 0===i?void 0:i.top)||0,p=(null===i||void 0===i?void 0:i.left)||0;r.left=n.left-(u.width-n.width)/2+p,r.top=n.height+n.top+d,o&&(r.left=n.right-u.width),l&&(r.left=n.left+p),c&&(r.top=n.top-u.height-d);const{innerWidth:f,innerHeight:m}=window,_=r.top+u.height+20>m,g=r.top-20<0,v=r.left+u.width+20>f,y=r.left-20<0;return _&&(r.top=n.top-u.height-d),g&&(r.top=n.height+n.top+d),v&&(r.left=n.right-u.width-p),y&&(r.left=n.left+p),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[h,a,s,u]),_=()=>{"boolean"!==typeof o&&c(!0)},g=()=>{c(!1)};return(0,t.useEffect)((()=>{"boolean"===typeof o&&c(o)}),[o]),(0,t.useEffect)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",_),t.addEventListener("mouseleave",g),()=>{t.removeEventListener("mouseenter",_),t.removeEventListener("mouseleave",g)}}),[h]),mt(pt.FK,{children:[mt(t.Fragment,{ref:h,children:n}),!l&&s&&t.default.createPortal(mt("div",{className:"vm-tooltip",ref:p,style:m,children:r}),document.body)]})},jr=e=>{let{value:t=!1,disabled:n=!1,label:r,color:o="secondary",fullWidth:a,onChange:i}=e;return mt("div",{className:Qn()({"vm-switch":!0,"vm-switch_full-width":a,"vm-switch_disabled":n,"vm-switch_active":t,[`vm-switch_${o}_active`]:t,[`vm-switch_${o}`]:o}),onClick:()=>{n||i(!t)},children:[mt("div",{className:"vm-switch-track",children:mt("div",{className:"vm-switch-track__thumb"})}),r&&mt("span",{className:"vm-switch__label",children:r})]})};const Fr=e=>{const[n,r]=(0,t.useState)(!!e),o=(0,t.useCallback)((()=>r(!0)),[]),a=(0,t.useCallback)((()=>r(!1)),[]),i=(0,t.useCallback)((()=>r((e=>!e))),[]);return{value:n,setValue:r,setTrue:o,setFalse:a,toggle:i}},Hr=e=>{let{error:n,warning:r,info:o}=e;const a=(0,t.useRef)(null),[i,l]=(0,t.useState)(!1),[s,c]=(0,t.useState)(!1),u=`${(0,t.useMemo)((()=>n?"ERROR: ":r?"WARNING: ":""),[n,r])}${n||r||o}`,d=()=>{const e=a.current;if(e){const{offsetWidth:t,scrollWidth:n,offsetHeight:r,scrollHeight:o}=e;l(t+1{c(!1),d()}),[a,u]),er("resize",d),n||r||o?mt("span",{className:Qn()({"vm-text-field__error":!0,"vm-text-field__warning":r&&!n,"vm-text-field__helper-text":!r&&!n,"vm-text-field__error_overflowed":i,"vm-text-field__error_full":s}),"data-show":!!u,ref:a,onClick:()=>{i&&(c(!0),l(!1))},children:u}):null},Vr=e=>{let{label:n,value:r,type:o="text",error:a="",warning:i="",helperText:l="",placeholder:s,endIcon:c,startIcon:u,disabled:d=!1,autofocus:h=!1,inputmode:p="text",caretPosition:f,onChange:m,onEnter:_,onKeyDown:g,onFocus:v,onBlur:y,onChangeCaret:b}=e;const{isDarkTheme:w}=gt(),{isMobile:k}=br(),x=(0,t.useRef)(null),S=(0,t.useRef)(null),C=(0,t.useMemo)((()=>"textarea"===o?S:x),[o]),[A,E]=(0,t.useState)([0,0]),M=Qn()({"vm-text-field__input":!0,"vm-text-field__input_error":a,"vm-text-field__input_warning":!a&&i,"vm-text-field__input_icon-start":u,"vm-text-field__input_disabled":d,"vm-text-field__input_textarea":"textarea"===o}),N=e=>{const{selectionStart:t,selectionEnd:n}=e;E([t||0,n||0])},T=e=>{N(e.currentTarget)},$=e=>{g&&g(e);const{key:t,ctrlKey:n,metaKey:r}=e,a="Enter"===t;("textarea"!==o?a:a&&(r||n))&&_&&(e.preventDefault(),_())},P=e=>{N(e.currentTarget)},D=e=>{d||(m&&m(e.currentTarget.value),N(e.currentTarget))},O=()=>{v&&v()},L=()=>{y&&y()},R=e=>{try{C.current&&C.current.setSelectionRange(e[0],e[1])}catch(Id){return Id}};return(0,t.useEffect)((()=>{var e;h&&!k&&(null===C||void 0===C||null===(e=C.current)||void 0===e?void 0:e.focus)&&C.current.focus()}),[C,h]),(0,t.useEffect)((()=>{b&&b(A)}),[A]),(0,t.useEffect)((()=>{R(A)}),[r]),(0,t.useEffect)((()=>{f&&R(f)}),[f]),mt("label",{className:Qn()({"vm-text-field":!0,"vm-text-field_textarea":"textarea"===o,"vm-text-field_dark":w}),"data-replicated-value":r,children:[u&&mt("div",{className:"vm-text-field__icon-start",children:u}),c&&mt("div",{className:"vm-text-field__icon-end",children:c}),"textarea"===o?mt("textarea",{className:M,disabled:d,ref:S,value:r,rows:1,inputMode:p,placeholder:s,autoCapitalize:"none",onInput:D,onKeyDown:$,onKeyUp:P,onFocus:O,onBlur:L,onMouseUp:T}):mt("input",{className:M,disabled:d,ref:x,value:r,type:o,placeholder:s,inputMode:p,autoCapitalize:"none",onInput:D,onKeyDown:$,onKeyUp:P,onFocus:O,onBlur:L,onMouseUp:T}),n&&mt("span",{className:"vm-text-field__label",children:n}),mt(Hr,{error:a,warning:i,info:l})]})},Br=e=>{let{title:n,children:r,onClose:o,className:a,isOpen:i=!0}=e;const{isMobile:l}=br(),s=oe(),c=ne(),u=(0,t.useCallback)((e=>{i&&"Escape"===e.key&&o()}),[i]),d=e=>{e.stopPropagation()},h=(0,t.useCallback)((()=>{i&&(s(c,{replace:!0}),o())}),[i,c,o]);return(0,t.useEffect)((()=>{if(i)return document.body.style.overflow="hidden",()=>{document.body.style.overflow="auto"}}),[i]),er("popstate",h),er("keyup",u),t.default.createPortal(mt("div",{className:Qn()({"vm-modal":!0,"vm-modal_mobile":l,[`${a}`]:a}),onMouseDown:o,children:mt("div",{className:"vm-modal-content",children:[mt("div",{className:"vm-modal-content-header",onMouseDown:d,children:[n&&mt("div",{className:"vm-modal-content-header__title",children:n}),mt("div",{className:"vm-modal-header__close",children:mt(Dr,{variant:"text",size:"small",onClick:o,ariaLabel:"close",children:mt(fn,{})})})]}),mt("div",{className:"vm-modal-content-body",onMouseDown:d,tabIndex:0,children:r})]})}),document.body)},Ur="Table settings",Yr=e=>{let{columns:n,selectedColumns:r=[],tableCompact:o,onChangeColumns:a,toggleTableCompact:i}=e;const l=(0,t.useRef)(null),{value:s,toggle:c,setFalse:u}=Fr(!1),{value:d,toggle:h}=Fr(Boolean(We("TABLE_COLUMNS"))),[p,f]=(0,t.useState)(""),[m,_]=(0,t.useState)(-1),g=(0,t.useMemo)((()=>r.filter((e=>!n.includes(e)))),[n,r]),v=(0,t.useMemo)((()=>{const e=g.concat(n);return p?e.filter((e=>e.includes(p))):e}),[n,g,p]),y=(0,t.useMemo)((()=>v.every((e=>r.includes(e)))),[r,v]),b=e=>{a(r.includes(e)?r.filter((t=>t!==e)):[...r,e])};return(0,t.useEffect)((()=>{((e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n])))(n,r)||d||a(n)}),[n]),(0,t.useEffect)((()=>{d?r.length&&Ye("TABLE_COLUMNS",r.join(",")):qe(["TABLE_COLUMNS"])}),[d,r]),(0,t.useEffect)((()=>{const e=We("TABLE_COLUMNS");e&&a(e.split(","))}),[]),mt("div",{className:"vm-table-settings",children:[mt(Ir,{title:Ur,children:mt("div",{ref:l,children:mt(Dr,{variant:"text",startIcon:mt(pn,{}),onClick:c,ariaLabel:Ur})})}),s&&mt(Br,{title:Ur,className:"vm-table-settings-modal",onClose:u,children:[mt("div",{className:"vm-table-settings-modal-section",children:[mt("div",{className:"vm-table-settings-modal-section__title",children:"Customize columns"}),mt("div",{className:"vm-table-settings-modal-columns",children:[mt("div",{className:"vm-table-settings-modal-columns__search",children:mt(Vr,{placeholder:"Search columns",startIcon:mt(Kn,{}),value:p,onChange:f,onBlur:()=>{_(-1)},onKeyDown:e=>{const t="ArrowUp"===e.key,n="ArrowDown"===e.key,r="Enter"===e.key;(n||t||r)&&e.preventDefault(),n?_((e=>e+1>v.length-1?e:e+1)):t?_((e=>e-1<0?e:e-1)):r&&b(v[m])},type:"search"})}),mt("div",{className:"vm-table-settings-modal-columns-list",children:[!!v.length&&mt("div",{className:"vm-table-settings-modal-columns-list__item vm-table-settings-modal-columns-list__item_all",children:mt(zr,{checked:y,onChange:()=>{a(y?r.filter((e=>!v.includes(e))):v)},label:y?"Uncheck all":"Check all",disabled:o})}),!v.length&&mt("div",{className:"vm-table-settings-modal-columns-no-found",children:mt("p",{className:"vm-table-settings-modal-columns-no-found__info",children:"No columns found."})}),v.map(((e,t)=>{return mt("div",{className:Qn()({"vm-table-settings-modal-columns-list__item":!0,"vm-table-settings-modal-columns-list__item_focus":t===m,"vm-table-settings-modal-columns-list__item_custom":g.includes(e)}),children:mt(zr,{checked:r.includes(e),onChange:(n=e,()=>{b(n)}),label:e,disabled:o})},e);var n}))]}),mt("div",{className:"vm-table-settings-modal-preserve",children:[mt(zr,{checked:d,onChange:h,label:"Preserve column settings",disabled:o,color:"primary"}),mt("p",{className:"vm-table-settings-modal-preserve__info",children:"This label indicates that when the checkbox is activated, the current column configurations will not be reset."})]})]})]}),mt("div",{className:"vm-table-settings-modal-section",children:[mt("div",{className:"vm-table-settings-modal-section__title",children:"Table view"}),mt("div",{className:"vm-table-settings-modal-columns-list__item",children:mt(jr,{label:"Compact view",value:o,onChange:i})})]})]})]})},Wr=["date","timestamp","time"];function qr(e,t,n){const r=e[n],a=t[n],i=Wr.includes(`${n}`)?o()(`${r}`).unix():r,l=Wr.includes(`${n}`)?o()(`${a}`).unix():a;return li?1:0}const Kr=e=>{let{rows:n,columns:r,defaultOrderBy:o,defaultOrderDir:a,copyToClipboard:i,paginationOffset:l}=e;const[s,c]=(0,t.useState)(o),[u,d]=(0,t.useState)(a||"desc"),[h,p]=(0,t.useState)(null),f=(0,t.useMemo)((()=>{const{startIndex:e,endIndex:t}=l;return function(e,t){const n=e.map(((e,t)=>[e,t]));return n.sort(((e,n)=>{const r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((e=>e[0]))}(n,function(e,t){return"desc"===e?(e,n)=>qr(e,n,t):(e,n)=>-qr(e,n,t)}(u,s)).slice(e,t)}),[n,s,u,l]),m=(e,t)=>async()=>{if(h!==t)try{await navigator.clipboard.writeText(String(e)),p(t)}catch(Id){console.error(Id)}};return(0,t.useEffect)((()=>{if(null===h)return;const e=setTimeout((()=>p(null)),2e3);return()=>clearTimeout(e)}),[h]),mt("table",{className:"vm-table",children:[mt("thead",{className:"vm-table-header",children:mt("tr",{className:"vm-table__row vm-table__row_header",children:[r.map((e=>{return mt("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:(t=e.key,()=>{d((e=>"asc"===e&&s===t?"desc":"asc")),c(t)}),children:mt("div",{className:"vm-table-cell__content",children:[mt("div",{children:String(e.title||e.key)}),mt("div",{className:Qn()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":s===e.key,"vm-table__sort-icon_desc":"desc"===u&&s===e.key}),children:mt(kn,{})})]})},String(e.key));var t})),i&&mt("th",{className:"vm-table-cell vm-table-cell_header"})]})}),mt("tbody",{className:"vm-table-body",children:f.map(((e,t)=>mt("tr",{className:"vm-table__row",children:[r.map((t=>mt("td",{className:Qn()({"vm-table-cell":!0,[`${t.className}`]:t.className}),children:e[t.key]||"-"},String(t.key)))),i&&mt("td",{className:"vm-table-cell vm-table-cell_right",children:e[i]&&mt("div",{className:"vm-table-cell__content",children:mt(Ir,{title:h===t?"Copied":"Copy row",children:mt(Dr,{variant:"text",color:h===t?"success":"gray",size:"small",startIcon:mt(h===t?$n:On,{}),onClick:m(e[i],t),ariaLabel:"copy row"})})})})]},t)))})]})},Zr=e=>{let{logs:n,displayColumns:r,tableCompact:o,columns:a}=e;const i=e=>{switch(e){case"_time":return"vm-table-cell_logs-time";case"_vmui_data":return"vm-table-cell_logs vm-table-cell_pre";default:return"vm-table-cell_logs"}},l=(0,t.useMemo)((()=>o?[{key:"_vmui_data",title:"Data",className:i("_vmui_data")}]:a.map((e=>({key:e,title:e,className:i(e)})))),[o,a]),s=(0,t.useMemo)((()=>o?l:null!==r&&void 0!==r&&r.length?l.filter((e=>r.includes(e.key))):[]),[l,r,o]);return mt(pt.FK,{children:mt(Kr,{rows:n,columns:s,defaultOrderBy:"_time",defaultOrderDir:"desc",copyToClipboard:"_vmui_data",paginationOffset:{startIndex:0,endIndex:1/0}})})},Gr=e=>{let{defaultExpanded:n=!1,onChange:r,title:o,children:a}=e;const[i,l]=(0,t.useState)(n);return(0,t.useEffect)((()=>{r&&r(i)}),[i]),mt(pt.FK,{children:[mt("header",{className:`vm-accordion-header ${i&&"vm-accordion-header_open"}`,onClick:()=>{l((e=>!e))},children:[o,mt("div",{className:`vm-accordion-header__arrow ${i&&"vm-accordion-header__arrow_open"}`,children:mt(wn,{})})]}),i&&mt("section",{className:"vm-accordion-section",children:a},"content")]})},Qr=e=>{let{log:n}=e;const{value:r,toggle:o}=Fr(!1),{markdownParsing:a}=gr(),i=["_msg","_vmui_time","_vmui_data","_vmui_markdown"],l=Object.entries(n).filter((e=>{let[t]=e;return!i.includes(t)})),s=l.length>0,c=(0,t.useMemo)((()=>{if(n._msg)return n._msg;if(!s)return;const e=l.reduce(((e,t)=>{let[n,r]=t;return e[n]=r,e}),{});return JSON.stringify(e)}),[n,l,s]),u=Pr(),[d,h]=(0,t.useState)(null);return(0,t.useEffect)((()=>{if(null===d)return;const e=setTimeout((()=>h(null)),2e3);return()=>clearTimeout(e)}),[d]),mt("div",{className:"vm-group-logs-row",children:[mt("div",{className:"vm-group-logs-row-content",onClick:o,children:[s&&mt("div",{className:Qn()({"vm-group-logs-row-content__arrow":!0,"vm-group-logs-row-content__arrow_open":r}),children:mt(wn,{})}),mt("div",{className:Qn()({"vm-group-logs-row-content__time":!0,"vm-group-logs-row-content__time_missing":!n._vmui_time}),children:n._vmui_time||"timestamp missing"}),mt("div",{className:Qn()({"vm-group-logs-row-content__msg":!0,"vm-group-logs-row-content__msg_empty-msg":!n._msg,"vm-group-logs-row-content__msg_missing":!c}),dangerouslySetInnerHTML:a&&n._vmui_markdown?{__html:n._vmui_markdown}:void 0,children:c||"-"})]},`${n._msg}${n._time}`),s&&r&&mt("div",{className:"vm-group-logs-row-fields",children:mt("table",{children:mt("tbody",{children:l.map(((e,t)=>{let[n,r]=e;return mt("tr",{className:"vm-group-logs-row-fields-item",children:[mt("td",{className:"vm-group-logs-row-fields-item-controls",children:mt("div",{className:"vm-group-logs-row-fields-item-controls__wrapper",children:mt(Ir,{title:d===t?"Copied":"Copy to clipboard",children:mt(Dr,{variant:"text",color:"gray",size:"small",startIcon:mt(On,{}),onClick:(o=`${n}: "${r}"`,a=t,async()=>{if(d!==a)try{await u(o),h(a)}catch(Id){console.error(Id)}}),ariaLabel:"copy to clipboard"})})})}),mt("td",{className:"vm-group-logs-row-fields-item__key",children:n}),mt("td",{className:"vm-group-logs-row-fields-item__value",children:r})]},n);var o,a}))})})})]})},Jr=(e,n,r)=>{const o=(0,t.useCallback)((t=>{const o=null===e||void 0===e?void 0:e.current,a=t.target,i=(null===r||void 0===r?void 0:r.current)&&r.current.contains(a);!o||o.contains((null===t||void 0===t?void 0:t.target)||null)||i||n(t)}),[e,n]);er("mousedown",o),er("touchstart",o)},Xr=e=>{let{children:n,buttonRef:r,placement:o="bottom-left",open:a=!1,onClose:i,offset:l={top:6,left:0},clickOutside:s=!0,fullWidth:c,title:u,disabledFullScreen:d,variant:h}=e;const{isMobile:p}=br(),f=oe(),m=ne(),[_,g]=(0,t.useState)({width:0,height:0}),[v,y]=(0,t.useState)(!1),b=(0,t.useRef)(null);(0,t.useEffect)((()=>(y(a),!a&&i&&i(),a&&p&&!d&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="auto"})),[a]),(0,t.useEffect)((()=>{var e,t;g({width:(null===b||void 0===b||null===(e=b.current)||void 0===e?void 0:e.clientWidth)||0,height:(null===b||void 0===b||null===(t=b.current)||void 0===t?void 0:t.clientHeight)||0}),y(!1)}),[b]);const w=(0,t.useMemo)((()=>{const e=r.current;if(!e||!v)return{};const t=e.getBoundingClientRect(),n={top:0,left:0,width:"auto"},a="bottom-right"===o||"top-right"===o,i=null===o||void 0===o?void 0:o.includes("top"),s=(null===l||void 0===l?void 0:l.top)||0,u=(null===l||void 0===l?void 0:l.left)||0;n.left=n.left=t.left+u,n.top=t.height+t.top+s,a&&(n.left=t.right-_.width),i&&(n.top=t.top-_.height-s);const{innerWidth:d,innerHeight:h}=window,p=n.top+_.height+20>h,f=n.top-20<0,m=n.left+_.width+20>d,g=n.left-20<0;return p&&(n.top=t.top-_.height-s),f&&(n.top=t.height+t.top+s),m&&(n.left=t.right-_.width-u),g&&(n.left=t.left+u),c&&(n.width=`${t.width}px`),n.top<0&&(n.top=20),n.left<0&&(n.left=20),n}),[r,o,v,n,c]),k=()=>{y(!1),i()};(0,t.useEffect)((()=>{if(!b.current||!v||p&&!d)return;const{right:e,width:t}=b.current.getBoundingClientRect();if(e>window.innerWidth){const e=window.innerWidth-20-t;b.current.style.left=e{v&&p&&!d&&(f(m,{replace:!0}),i())}),[v,p,d,m,i]);return er("scroll",k),er("popstate",x),Jr(b,(()=>{s&&k()}),r),mt(pt.FK,{children:(v||!_.width)&&t.default.createPortal(mt("div",{className:Qn()({"vm-popper":!0,[`vm-popper_${h}`]:h,"vm-popper_mobile":p&&!d,"vm-popper_open":(p||Object.keys(w).length)&&v}),ref:b,style:p&&!d?{}:w,children:[(u||p&&!d)&&mt("div",{className:"vm-popper-header",children:[mt("p",{className:"vm-popper-header__title",children:u}),mt(Dr,{variant:"text",color:"dark"===h?"white":"primary",size:"small",onClick:e=>{e.stopPropagation(),i()},ariaLabel:"close",children:mt(fn,{})})]}),n]}),document.body)})},eo=e=>(/^{.+}$/.test(e)?e.slice(1,-1).split(","):[e]).filter(Boolean),to=e=>{const t=o()(1e3*e.start),n=o()(1e3*e.end),r=n.diff(t,"milliseconds");return{start:t,end:n,step:Math.ceil(r/100)||1}},no="No Grouping",ro=e=>{let{logs:n,settingsRef:r}=e;const{isDarkTheme:o}=gt(),a=Pr(),[i,l]=je(),[s,c]=(0,t.useState)([]),[u,d]=Lr("_stream","groupBy"),[h,p]=(0,t.useState)(null),[f,m]=(0,t.useState)(""),_=(0,t.useRef)(null),{value:g,toggle:v,setFalse:y}=Fr(!1),b=(0,t.useMemo)((()=>s.every(Boolean)),[s]),w=(0,t.useMemo)((()=>{const e=["_msg","_time","_vmui_time","_vmui_data","_vmui_markdown"],t=Array.from(new Set(n.map((e=>Object.keys(e))).flat())),r=[no,...t.filter((t=>!e.includes(t)))];if(!f)return r;try{const e=new RegExp(f,"i");return r.filter((t=>e.test(t))).sort(((t,n)=>{var r,o;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(o=n.match(e))||void 0===o?void 0:o.index)||0)}))}catch(Id){return[]}}),[n,f]),k=(0,t.useMemo)((()=>function(e,t){const n=e.reduce(((e,n)=>{const r=t.map((e=>`${e}: ${n[e]||"-"}`)).join("|");return(e[r]=e[r]||[]).push(n),e}),{});return Object.entries(n).map((e=>{let[t,n]=e;return{keys:t.split("|"),values:n}}))}(n,[u]).map((e=>{var t;const n=(null===(t=e.values[0])||void 0===t?void 0:t[u])||"",r=eo(n);return{...e,pairs:r}}))),[n,u]),x=(0,t.useCallback)((()=>{c(new Array(k.length).fill(!b))}),[b]),S=e=>t=>{c((n=>{const r=[...n];return r[e]=t,r}))};return(0,t.useEffect)((()=>{if(null===h)return;const e=setTimeout((()=>p(null)),2e3);return()=>clearTimeout(e)}),[h]),(0,t.useEffect)((()=>{c(new Array(k.length).fill(!0))}),[k]),mt(pt.FK,{children:[mt("div",{className:"vm-group-logs",children:k.map(((e,t)=>mt("div",{className:"vm-group-logs-section",children:mt(Gr,{defaultExpanded:s[t],onChange:S(t),title:u!==no&&mt("div",{className:"vm-group-logs-section-keys",children:[mt("span",{className:"vm-group-logs-section-keys__title",children:["Group by ",mt("code",{children:u}),":"]}),e.pairs.map((t=>{return mt(Ir,{title:h===t?"Copied":"Copy to clipboard",placement:"top-center",children:mt("div",{className:Qn()({"vm-group-logs-section-keys__pair":!0,"vm-group-logs-section-keys__pair_dark":o}),onClick:(n=t,async e=>{e.stopPropagation();const t=/(.+)?=(".+")/.test(n)?`${n.replace(/=/,": ")}`:`${u}: "${n}"`;await a(t)&&p(n)}),children:t})},`${e.keys.join("")}_${t}`);var n})),mt("span",{className:"vm-group-logs-section-keys__count",children:[e.values.length," entries"]})]}),children:mt("div",{className:"vm-group-logs-section-rows",children:e.values.map((e=>mt(Qr,{log:e},`${e._msg}${e._time}`)))})},String(s[t]))},e.keys.join(""))))}),r.current&&t.default.createPortal(mt("div",{className:"vm-group-logs-header",children:[mt(Ir,{title:b?"Collapse All":"Expand All",children:mt(Dr,{variant:"text",startIcon:mt(b?qn:Wn,{}),onClick:x,ariaLabel:b?"Collapse All":"Expand All"})}),mt(Ir,{title:"Group by",children:mt("div",{ref:_,children:mt(Dr,{variant:"text",startIcon:mt(In,{}),onClick:v,ariaLabel:"Group by"})})}),mt(Xr,{open:g,placement:"bottom-right",onClose:y,buttonRef:_,children:mt("div",{className:"vm-list vm-group-logs-header-keys",children:[mt("div",{className:"vm-group-logs-header-keys__search",children:mt(Vr,{label:"Search key",value:f,onChange:m,type:"search"})}),w.map((e=>{return mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_active":e===u}),onClick:(t=e,()=>{d(t),i.set("groupBy",t),l(i),y()}),children:e},e);var t}))]})})]}),r.current)]})};function oo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let ao={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function io(e){ao=e}const lo=/[&<>"']/,so=new RegExp(lo.source,"g"),co=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,uo=new RegExp(co.source,"g"),ho={"&":"&","<":"<",">":">",'"':""","'":"'"},po=e=>ho[e];function fo(e,t){if(t){if(lo.test(e))return e.replace(so,po)}else if(co.test(e))return e.replace(uo,po);return e}const mo=/(^|[^\[])\^/g;function _o(e,t){let n="string"===typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let o="string"===typeof t?t:t.source;return o=o.replace(mo,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}function go(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const vo={exec:()=>null};function yo(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:bo(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=bo(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:bo(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=bo(t[0],"\n").split("\n"),n="",r="";const o=[];for(;e.length>0;){let t=!1;const a=[];let i;for(i=0;i/.test(e[i]))a.push(e[i]),t=!0;else{if(t)break;a.push(e[i])}e=e.slice(i);const l=a.join("\n"),s=l.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");n=n?`${n}\n${l}`:l,r=r?`${r}\n${s}`:s;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(s,o,!0),this.lexer.state.top=c,0===e.length)break;const u=o[o.length-1];if("code"===u?.type)break;if("blockquote"===u?.type){const t=u,a=t.raw+"\n"+e.join("\n"),i=this.blockquote(a);o[o.length-1]=i,n=n.substring(0,n.length-t.raw.length)+i.raw,r=r.substring(0,r.length-t.text.length)+i.text;break}if("list"!==u?.type);else{const t=u,a=t.raw+"\n"+e.join("\n"),i=this.list(a);o[o.length-1]=i,n=n.substring(0,n.length-u.raw.length)+i.raw,r=r.substring(0,r.length-t.raw.length)+i.raw,e=a.substring(o[o.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const a=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let i=!1;for(;e;){let n=!1,r="",l="";if(!(t=a.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let s=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],u=!s.trim(),d=0;if(this.options.pedantic?(d=2,l=s.trimStart()):u?d=t[1].length+1:(d=t[2].search(/[^ ]/),d=d>4?1:d,l=s.slice(d),d+=t[1].length),u&&/^[ \t]*$/.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,d-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:\`\`\`|~~~)`),a=new RegExp(`^ {0,${Math.min(3,d-1)}}#`),i=new RegExp(`^ {0,${Math.min(3,d-1)}}<[a-z].*>`,"i");for(;e;){const h=e.split("\n",1)[0];let p;if(c=h,this.options.pedantic?(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),p=c):p=c.replace(/\t/g," "),o.test(c))break;if(a.test(c))break;if(i.test(c))break;if(t.test(c))break;if(n.test(c))break;if(p.search(/[^ ]/)>=d||!c.trim())l+="\n"+p.slice(d);else{if(u)break;if(s.replace(/\t/g," ").search(/[^ ]/)>=4)break;if(o.test(s))break;if(a.test(s))break;if(n.test(s))break;l+="\n"+c}u||c.trim()||(u=!0),r+=h+"\n",e=e.substring(h.length+1),s=p.slice(d)}}o.loose||(i?o.loose=!0:/\n[ \t]*\n[ \t]*$/.test(r)&&(i=!0));let h,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(l),p&&(h="[ ] "!==p[0],l=l.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:r,task:!!p,checked:h,loose:!1,text:l,tokens:[]}),o.raw+=r}o.items[o.items.length-1].raw=o.items[o.items.length-1].raw.trimEnd(),o.items[o.items.length-1].text=o.items[o.items.length-1].text.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));o.loose=n}if(o.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=yo(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?a.align.push("right"):/^ *:-+: *$/.test(e)?a.align.push("center"):/^ *:-+ *$/.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]}))));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:fo(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=bo(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),wo(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return wo(n,e,n[0],this.lexer)}}emStrong(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let o,a,i=n,l=0;const s="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=s.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(a=[...o].length,r[3]||r[4]){i+=a;continue}if((r[5]||r[6])&&n%3&&!((n+a)%3)){l+=a;continue}if(i-=a,i>0)continue;a=Math.min(a,a+i+l);const t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){const e=s.slice(1,-1);return{type:"em",raw:s,text:e,tokens:this.lexer.inlineTokens(e)}}const c=s.slice(2,-2);return{type:"strong",raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=fo(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=fo(t[1]),n="mailto:"+e):(e=fo(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])e=fo(t[0]),r="mailto:"+e;else{let o;do{var n;o=t[0],t[0]=null!==(n=this.rules.inline._backpedal.exec(t[0])?.[0])&&void 0!==n?n:""}while(o!==t[0]);e=fo(t[0]),r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:fo(t[0]),{type:"text",raw:t[0],text:e}}}}const xo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,So=/(?:[*+-]|\d{1,9}[.)])/,Co=_o(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,So).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Ao=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Eo=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Mo=_o(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Eo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),No=_o(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,So).getRegex(),To="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",$o=/|$))/,Po=_o("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",$o).replace("tag",To).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Do=_o(Ao).replace("hr",xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",To).getRegex(),Oo={blockquote:_o(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Do).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Mo,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:xo,html:Po,lheading:Co,list:No,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Do,table:vo,text:/^[^\n]+/},Lo=_o("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",To).getRegex(),Ro={...Oo,table:Lo,paragraph:_o(Ao).replace("hr",xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Lo).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",To).getRegex()},zo={...Oo,html:_o("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",$o).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:vo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_o(Ao).replace("hr",xo).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Co).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Io=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,jo=/^( {2,}|\\)\n(?!\s*$)/,Fo="\\p{P}\\p{S}",Ho=_o(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Fo).getRegex(),Vo=_o(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Fo).getRegex(),Bo=_o("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Fo).getRegex(),Uo=_o("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Fo).getRegex(),Yo=_o(/\\([punct])/,"gu").replace(/punct/g,Fo).getRegex(),Wo=_o(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),qo=_o($o).replace("(?:--\x3e|$)","--\x3e").getRegex(),Ko=_o("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",qo).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Zo=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Go=_o(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Zo).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Qo=_o(/^!?\[(label)\]\[(ref)\]/).replace("label",Zo).replace("ref",Eo).getRegex(),Jo=_o(/^!?\[(ref)\](?:\[\])?/).replace("ref",Eo).getRegex(),Xo={_backpedal:vo,anyPunctuation:Yo,autolink:Wo,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:jo,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:vo,emStrongLDelim:Vo,emStrongRDelimAst:Bo,emStrongRDelimUnd:Uo,escape:Io,link:Go,nolink:Jo,punctuation:Ho,reflink:Qo,reflinkSearch:_o("reflink|nolink(?!\\()","g").replace("reflink",Qo).replace("nolink",Jo).getRegex(),tag:Ko,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(/\t/g," ").replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(t=n.call({lexer:this},e,o))&&(e=e.substring(t.raw.length),o.push(t),!0)))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&o.length>0?o[o.length-1].raw+="\n":o.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),n=o[o.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?o.push(t):(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),n=o[o.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(n.raw+="\n"+t.raw,n.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),o.push(t);else{if(r=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let o;this.options.extensions.startBlock.forEach((e=>{o=e.call({lexer:this},n),"number"===typeof o&&o>=0&&(t=Math.min(t,o))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(r)))n=o[o.length-1],a&&"paragraph"===n?.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):o.push(t),a=r.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),n=o[o.length-1],n&&"text"===n.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):o.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,o}inline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){let t,n,r,o,a,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(s));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(s));)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(i=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(t=n.call({lexer:this},e,l))&&(e=e.substring(t.raw.length),l.push(t),!0)))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,s,i))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.autolink(e))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e))){if(r=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let o;this.options.extensions.startInline.forEach((e=>{o=e.call({lexer:this},n),"number"===typeof o&&o>=0&&(t=Math.min(t,o))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(t=this.tokenizer.inlineText(r))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(i=t.raw.slice(-1)),a=!0,n=l[l.length-1],n&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(t.raw.length),l.push(t);return l}}class ia{options;parser;constructor(e){this.options=e||ao}space(e){return""}code(e){let{text:t,lang:n,escaped:r}=e;const o=(n||"").match(/^\S*/)?.[0],a=t.replace(/\n$/,"")+"\n";return o?'
    '+(r?a:fo(a,!0))+"
    \n":"
    "+(r?a:fo(a,!0))+"
    \n"}blockquote(e){let{tokens:t}=e;return`
    \n${this.parser.parse(t)}
    \n`}html(e){let{text:t}=e;return t}heading(e){let{tokens:t,depth:n}=e;return`${this.parser.parseInline(t)}\n`}hr(e){return"
    \n"}list(e){const t=e.ordered,n=e.start;let r="";for(let a=0;a\n"+r+"\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox(e){let{checked:t}=e;return"'}paragraph(e){let{tokens:t}=e;return`

    ${this.parser.parseInline(t)}

    \n`}table(e){let t="",n="";for(let o=0;o${r}`),"\n\n"+t+"\n"+r+"
    \n"}tablerow(e){let{text:t}=e;return`\n${t}\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}em(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}codespan(e){let{text:t}=e;return`${t}`}br(e){return"
    "}del(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}link(e){let{href:t,title:n,tokens:r}=e;const o=this.parser.parseInline(r),a=go(t);if(null===a)return o;t=a;let i='
    ",i}image(e){let{href:t,title:n,text:r}=e;const o=go(t);if(null===o)return r;t=o;let a=`${r}1&&void 0!==arguments[1])||arguments[1],n="";for(let r=0;rnew Set(["preprocess","postprocess","processAllTokens"]))();preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?aa.lex:aa.lexInline}provideParser(){return this.block?sa.parse:sa.parseInline}}const ua=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=(()=>sa)();Renderer=(()=>ia)();TextRenderer=(()=>la)();Lexer=(()=>aa)();Tokenizer=(()=>ko)();Hooks=(()=>ca)();constructor(){this.use(...arguments)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const o=e[r].flat(1/0);n=n.concat(this.walkTokens(o,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(){const e=this.defaults.extensions||{renderers:{},childTokens:{}};for(var t=arguments.length,n=new Array(t),r=0;r{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const n=e.renderers[t.name];e.renderers[t.name]=n?function(){for(var e=arguments.length,r=new Array(e),o=0;o{if(this.defaults.async)return Promise.resolve(o.call(e,t)).then((t=>a.call(e,t)));const n=o.call(e,t);return a.call(e,n)}:e[r]=function(){for(var t=arguments.length,n=new Array(t),r=0;r{const r={...n},o={...this.defaults,...r},a=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===r.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("undefined"===typeof t||null===t)return a(new Error("marked(): input parameter is undefined or null"));if("string"!==typeof t)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const i=o.hooks?o.hooks.provideLexer():e?aa.lex:aa.lexInline,l=o.hooks?o.hooks.provideParser():e?sa.parse:sa.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then((e=>i(e,o))).then((e=>o.hooks?o.hooks.processAllTokens(e):e)).then((e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then((()=>e)):e)).then((e=>l(e,o))).then((e=>o.hooks?o.hooks.postprocess(e):e)).catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let e=i(t,o);o.hooks&&(e=o.hooks.processAllTokens(e)),o.walkTokens&&this.walkTokens(e,o.walkTokens);let n=l(e,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(Id){return a(Id)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+fo(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function da(e,t){return ua.parse(e,t)}da.options=da.setOptions=function(e){return ua.setOptions(e),da.defaults=ua.defaults,io(da.defaults),da},da.getDefaults=oo,da.defaults=ao,da.use=function(){return ua.use(...arguments),da.defaults=ua.defaults,io(da.defaults),da},da.walkTokens=function(e,t){return ua.walkTokens(e,t)},da.parseInline=ua.parseInline,da.Parser=sa,da.parser=sa.parse,da.Renderer=ia,da.TextRenderer=la,da.Lexer=aa,da.lexer=aa.lex,da.Tokenizer=ko,da.Hooks=ca,da.parse=da;da.options,da.setOptions,da.use,da.walkTokens,da.parseInline,sa.parse,aa.lex;const ha=()=>mt("div",{className:"vm-line-loader",children:[mt("div",{className:"vm-line-loader__background"}),mt("div",{className:"vm-line-loader__line"})]});var pa=function(e){return e.group="group",e.table="table",e.json="json",e}(pa||{});const fa=[{label:"Group",value:pa.group,icon:mt(Hn,{})},{label:"Table",value:pa.table,icon:mt(Nn,{})},{label:"JSON",value:pa.json,icon:mt(Tn,{})}],ma=e=>{let{data:n,isLoading:r}=e;const{isMobile:a}=br(),{timezone:i}=Gt(),{setSearchParamsFromKeys:l}=Rr(),s=(0,t.useRef)(null),[c,u]=Lr(pa.group,"view"),[d,h]=(0,t.useState)([]),{value:p,toggle:f}=Fr(!1),m=(0,t.useMemo)((()=>n.map((e=>({...e,_vmui_time:e._time?o()(e._time).tz().format(`${wt}.SSS`):"",_vmui_data:JSON.stringify(e,null,2),_vmui_markdown:e._msg?da(e._msg.replace(/```/g,"\n```\n")):""})))),[n,i]),_=(0,t.useMemo)((()=>{if(null===m||void 0===m||!m.length)return[];const e=["_vmui_data","_vmui_time","_vmui_markdown"],t=new Set;for(const n of m)for(const e in n)t.add(e);return Array.from(t).filter((t=>!e.includes(t)))}),[m]);return mt("div",{className:Qn()({"vm-explore-logs-body":!0,"vm-block":!0,"vm-block_mobile":a}),children:[r&&mt(ha,{}),mt("div",{className:Qn()({"vm-explore-logs-body-header":!0,"vm-section-header":!0,"vm-explore-logs-body-header_mobile":a}),children:[mt("div",{className:"vm-section-header__tabs",children:[mt(nr,{activeItem:String(c),items:fa,onChange:e=>{u(e),l({view:e})}}),mt("div",{className:"vm-explore-logs-body-header__log-info",children:["Total logs returned: ",mt("b",{children:n.length})]})]}),c===pa.table&&mt("div",{className:"vm-explore-logs-body-header__settings",children:mt(Yr,{columns:_,selectedColumns:d,onChangeColumns:h,tableCompact:p,toggleTableCompact:f})}),c===pa.group&&mt("div",{className:"vm-explore-logs-body-header__settings",ref:s})]}),mt("div",{className:Qn()({"vm-explore-logs-body__table":!0,"vm-explore-logs-body__table_mobile":a}),children:[!n.length&&mt("div",{className:"vm-explore-logs-body__empty",children:"No logs found"}),!!n.length&&mt(pt.FK,{children:[c===pa.table&&mt(Zr,{logs:m,displayColumns:d,tableCompact:p,columns:_}),c===pa.group&&mt(ro,{logs:m,columns:_,settingsRef:s}),c===pa.json&&mt(Or,{data:n})]})]})]})},_a=(e,n,r)=>{const[a]=je(),[i,l]=(0,t.useState)([]),[s,c]=(0,t.useState)([]),[u,d]=(0,t.useState)(),h=(0,t.useRef)(new AbortController),p=(0,t.useMemo)((()=>(e=>`${e}/select/logsql/query`)(e)),[e]),f=e=>{try{return JSON.parse(e)}catch(Id){return null}},m=(0,t.useCallback)((async e=>{h.current.abort(),h.current=new AbortController;const{signal:t}=h.current,i=Date.now();c((e=>({...e,[i]:!0}))),d(void 0);try{const s=((e,t,n,r)=>({signal:r,method:"POST",headers:{Accept:"application/stream+json",AccountID:a.get("accountID")||"0",ProjectID:a.get("projectID")||"0"},body:new URLSearchParams({query:e.trim(),limit:`${n}`,start:o()(1e3*t.start).tz().toISOString(),end:o()(1e3*t.end).tz().toISOString()})}))(n,e,r,t),u=await fetch(p,s),h=await u.text();if(!u.ok||!u.body)return d(h),l([]),c((e=>({...e,[i]:!1}))),!1;const m=h.split("\n").filter((e=>e)).slice(0,r).map(f).filter((e=>e));return l(m),c((e=>({...e,[i]:!1}))),!0}catch(Id){return c((e=>({...e,[i]:!1}))),Id instanceof Error&&"AbortError"!==Id.name&&(d(String(Id)),console.error(Id),l([])),!1}}),[p,n,r,a]);return{logs:i,isLoading:Object.values(s).some((e=>e)),error:u,fetchLogs:m,abortController:h.current}};var ga=function(e){return e[e.mouse=0]="mouse",e[e.keyboard=1]="keyboard",e}(ga||{});const va=e=>{var n;let{value:r,options:o,anchor:a,disabled:i,minLength:l=2,fullWidth:s,selected:c,noOptionsText:u,label:d,disabledFullScreen:h,offset:p,maxDisplayResults:f,loading:m,onSelect:_,onOpenAutocomplete:g,onFoundOptions:v,onChangeWrapperRef:y}=e;const{isMobile:b}=br(),w=(0,t.useRef)(null),[k,x]=(0,t.useState)({index:-1}),[S,C]=(0,t.useState)(""),[A,E]=(0,t.useState)(0),{value:M,setValue:N,setFalse:T}=Fr(!1),$=(0,t.useMemo)((()=>{if(!M)return[];try{const e=new RegExp(String(r.trim()),"i"),t=o.filter((t=>e.test(t.value))).sort(((t,n)=>{var o,a;return t.value.toLowerCase()===r.trim().toLowerCase()?-1:n.value.toLowerCase()===r.trim().toLowerCase()?1:((null===(o=t.value.match(e))||void 0===o?void 0:o.index)||0)-((null===(a=n.value.match(e))||void 0===a?void 0:a.index)||0)}));return E(t.length),C(t.length>Number(null===f||void 0===f?void 0:f.limit)&&(null===f||void 0===f?void 0:f.message)||""),null!==f&&void 0!==f&&f.limit?t.slice(0,f.limit):t}catch(Id){return[]}}),[M,o,r]),P=(0,t.useMemo)((()=>{var e;return 1===$.length&&(null===(e=$[0])||void 0===e?void 0:e.value)===r}),[$]),D=(0,t.useMemo)((()=>u&&!$.length),[u,$]),O=()=>{x({index:-1})},L=(0,t.useCallback)((e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:o}=e,a=n||r||o,i=$.length&&!P;if("ArrowUp"===t&&!a&&i&&(e.preventDefault(),x((e=>{let{index:t}=e;return{index:t<=0?0:t-1,type:ga.keyboard}}))),"ArrowDown"===t&&!a&&i){e.preventDefault();const t=$.length-1;x((e=>{let{index:n}=e;return{index:n>=t?t:n+1,type:ga.keyboard}}))}if("Enter"===t){const e=$[k.index];e&&_(e.value),c||T()}"Escape"===t&&T()}),[k,$,P,T,_,c]);return(0,t.useEffect)((()=>{N(r.length>=l)}),[r,o]),er("keydown",L),(0,t.useEffect)((()=>{if(!w.current||k.type===ga.mouse)return;const e=w.current.childNodes[k.index];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}),[k,$]),(0,t.useEffect)((()=>{x({index:-1})}),[$]),(0,t.useEffect)((()=>{g&&g(M)}),[M]),(0,t.useEffect)((()=>{v&&v(P?[]:$)}),[$,P]),(0,t.useEffect)((()=>{y&&y(w)}),[w]),mt(Xr,{open:M,buttonRef:a,placement:"bottom-left",onClose:T,fullWidth:s,title:b?d:void 0,disabledFullScreen:h,offset:p,children:[mt("div",{className:Qn()({"vm-autocomplete":!0,"vm-autocomplete_mobile":b&&!h}),ref:w,children:[m&&mt("div",{className:"vm-autocomplete__loader",children:[mt(bn,{}),mt("span",{children:"Loading..."})]}),D&&mt("div",{className:"vm-autocomplete__no-options",children:u}),!P&&$.map(((e,t)=>{return mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_mobile":b,"vm-list-item_active":t===k.index,"vm-list-item_multiselect":c,"vm-list-item_multiselect_selected":null===c||void 0===c?void 0:c.includes(e.value),"vm-list-item_with-icon":e.icon}),id:`$autocomplete$${e.value}`,onClick:(r=e.value,()=>{i||(_(r),c||T())}),onMouseEnter:(n=t,()=>{x({index:n,type:ga.mouse})}),onMouseLeave:O,children:[(null===c||void 0===c?void 0:c.includes(e.value))&&mt($n,{}),mt(pt.FK,{children:e.icon}),mt("span",{children:e.value})]},`${t}${e.value}`);var n,r}))]}),S&&mt("div",{className:"vm-autocomplete-message",children:["Shown ",null===f||void 0===f?void 0:f.limit," results out of ",A,". ",S]}),(null===(n=$[k.index])||void 0===n?void 0:n.description)&&mt("div",{className:"vm-autocomplete-info",children:[mt("div",{className:"vm-autocomplete-info__type",children:$[k.index].type}),mt("div",{className:"vm-autocomplete-info__description",dangerouslySetInnerHTML:{__html:$[k.index].description||""}})]})]})};var ya=n(267),ba=n.n(ya);const wa=e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&"),ka=e=>JSON.stringify(e).slice(1,-1),xa=e=>{const t=e.match(/["`']/g);return!!t&&t.length%2!==0};var Sa=function(e){return e.metric="metric",e.label="label",e.labelValue="labelValue",e}(Sa||{});const Ca={[Sa.metric]:mt(Vn,{}),[Sa.label]:mt(Un,{}),[Sa.labelValue]:mt(Yn,{})},Aa=n.p+"static/media/MetricsQL.a00044c91d9781cf8557.md",Ea=e=>{let t="";return Array.from(e).map((e=>{var n;const r="h3"===e.tagName.toLowerCase();return t=r?null!==(n=e.textContent)&&void 0!==n?n:"":t,r?null:((e,t)=>{var n;const r=null!==(n=t.textContent)&&void 0!==n?n:"",o=(e=>{const t=[];let n=e.nextElementSibling;for(;n&&"p"===n.tagName.toLowerCase();)n&&t.push(n),n=n.nextElementSibling;return t})(t).map((e=>{var t;return null!==(t=e.outerHTML)&&void 0!==t?t:""})).join("\n");return{type:e,value:r,description:(a=o,a.replace(/({const{metricsQLFunctions:e}=ln(),n=sn();return(0,t.useEffect)((()=>{e.length||(async()=>{try{const e=await fetch(Aa),t=(e=>{const t=document.createElement("div");t.innerHTML=da(e);const n=t.querySelectorAll("h3, h4");return Ea(n)})(await e.text());n({type:"SET_METRICSQL_FUNCTIONS",payload:t})}catch(Id){console.error("Error fetching or processing the MetricsQL.md file:",Id)}})()}),[]),e},Na=e=>{let{value:n,anchorEl:r,caretPosition:a,hasHelperText:i,onSelect:l,onFoundOptions:s}=e;const[c,u]=(0,t.useState)({top:0,left:0}),d=Ma(),h=(0,t.useMemo)((()=>{if(a[0]!==a[1])return{beforeCursor:n,afterCursor:""};return{beforeCursor:n.substring(0,a[0]),afterCursor:n.substring(a[1])}}),[n,a]),p=(0,t.useMemo)((()=>{const e=h.beforeCursor.split(/\s(or|and|unless|default|ifnot|if|group_left|group_right)\s|}|\+|\|-|\*|\/|\^/i);return e[e.length-1]}),[h]),f=(0,t.useMemo)((()=>{const e=[...p.matchAll(/\w+\((?[^)]+)\)\s+(by|without|on|ignoring)\s*\(\w*/gi)];if(e.length>0&&e[0].groups&&e[0].groups.metricName)return e[0].groups.metricName;const t=[...p.matchAll(/^\s*\b(?[^{}(),\s]+)(?={|$)/g)];return t.length>0&&t[0].groups&&t[0].groups.metricName?t[0].groups.metricName:""}),[p]),m=(0,t.useMemo)((()=>{const e=p.match(/[a-z_:-][\w\-.:/]*\b(?=\s*(=|!=|=~|!~))/g);return e?e[e.length-1]:""}),[p]),_=(0,t.useMemo)((()=>{const e=h.beforeCursor.trim(),t=["}",")"].some((t=>e.endsWith(t))),n=!xa(e)&&["`","'",'"'].some((t=>e.endsWith(t)));if(!h.beforeCursor||t||n||(e=>{const t=e.split(/\s+/),n=t.length,r=t[n-1],o=t[n-2],a=!r&&xa(e),i=(!r||t.length>1)&&!/([{(),+\-*/^]|\b(?:or|and|unless|default|ifnot|if|group_left|group_right|by|without|on|ignoring)\b)/i.test(o);return a||i})(h.beforeCursor))return at.empty;const r=/(?:by|without|on|ignoring)\s*\(\s*[^)]*$|\{[^}]*$/i,o=`(${wa(f)})?{?.+${wa(m)}(=|!=|=~|!~)"?([^"]*)$`;switch(!0){case new RegExp(o,"g").test(h.beforeCursor):return at.labelValue;case r.test(h.beforeCursor):return at.label;default:return at.metricsql}}),[h,f,m]),g=(0,t.useMemo)((()=>{const e=h.beforeCursor.match(/([\w_.:]+(?![},]))$/);return e?e[0]:""}),[h.beforeCursor]),{metrics:v,labels:y,labelValues:b,loading:w}=(e=>{let{valueByContext:n,metric:r,label:a,context:i}=e;const{serverUrl:l}=gt(),{period:{start:s,end:c}}=Gt(),{autocompleteCache:u}=ln(),d=sn(),[h,p]=(0,t.useState)(!1),[f,m]=(0,t.useState)(n),_=ba()(m,500);(0,t.useEffect)((()=>(_(n),_.cancel)),[n,_]);const[g,v]=(0,t.useState)([]),[y,b]=(0,t.useState)([]),[w,k]=(0,t.useState)([]),x=(0,t.useRef)(new AbortController),S=(0,t.useCallback)((e=>{const t=o()(1e3*s).startOf("day").valueOf()/1e3,n=o()(1e3*c).endOf("day").valueOf()/1e3;return new URLSearchParams({...e||{},limit:`${en}`,start:`${t}`,end:`${n}`})}),[s,c]),C=(e,t)=>e.map((e=>({value:e,type:`${t}`,icon:Ca[t]}))),A=async e=>{let{value:t,urlSuffix:n,setter:r,type:o,params:a}=e;if(!t&&o===Sa.metric)return;x.current.abort(),x.current=new AbortController;const{signal:i}=x.current,s={type:o,value:t,start:(null===a||void 0===a?void 0:a.get("start"))||"",end:(null===a||void 0===a?void 0:a.get("end"))||"",match:(null===a||void 0===a?void 0:a.get("match[]"))||""};p(!0);try{const e=u.get(s);if(e)return r(C(e,o)),void p(!1);const t=await fetch(`${l}/api/v1/${n}?${a}`,{signal:i});if(t.ok){const{data:e}=await t.json();r(C(e,o)),d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:e}})}p(!1)}catch(Id){Id instanceof Error&&"AbortError"!==Id.name&&(d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:[]}}),p(!1),console.error(Id))}};return(0,t.useEffect)((()=>{const e=i!==at.metricsql&&i!==at.empty;if(!l||!r||e)return;v([]);const t=ka(wa(r));return A({value:f,urlSuffix:"label/__name__/values",setter:v,type:Sa.metric,params:S({"match[]":`{__name__=~".*${t}.*"}`})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,f,i,r]),(0,t.useEffect)((()=>{if(!l||i!==at.label)return;b([]);const e=ka(r);return A({value:f,urlSuffix:"labels",setter:b,type:Sa.label,params:S(r?{"match[]":`{__name__="${e}"}`}:void 0)}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,f,i,r]),(0,t.useEffect)((()=>{if(!l||!a||i!==at.labelValue)return;k([]);const e=ka(r),t=ka(wa(f)),n=[r?`__name__="${e}"`:"",`${a}=~".*${t}.*"`].filter(Boolean).join(",");return A({value:f,urlSuffix:`label/${a}/values`,setter:k,type:Sa.labelValue,params:S({"match[]":`{${n}}`})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,f,i,r,a]),{metrics:g,labels:y,labelValues:w,loading:h}})({valueByContext:g,metric:f,label:m,context:_}),k=(0,t.useMemo)((()=>{switch(_){case at.metricsql:return[...v,...d];case at.label:return y;case at.labelValue:return b;default:return[]}}),[_,v,y,b]),x=(0,t.useCallback)((e=>{const t=h.beforeCursor;let n=h.afterCursor;const r=t.lastIndexOf(g,a[0]),o=r+g.length,i=t.substring(0,r),s=t.substring(o);if(_===at.labelValue){const t='"';n=n.replace(/^[^\s"|},]*/,"");e=`${/(?:=|!=|=~|!~)$/.test(i)?t:""}${e}${'"'!==n.trim()[0]?t:""}`}_===at.label&&(n=n.replace(/^[^\s=!,{}()"|+\-/*^]*/,"")),_===at.metricsql&&(n=n.replace(/^[^\s[\]{}()"|+\-/*^]*/,""));l(`${i}${e}${s}${n}`,i.length+e.length)}),[h]);return(0,t.useEffect)((()=>{if(!r.current)return void u({top:0,left:0});const e=r.current.querySelector("textarea")||r.current,t=window.getComputedStyle(e),n=`${t.getPropertyValue("font-size")}`,o=`${t.getPropertyValue("font-family")}`,a=parseInt(`${t.getPropertyValue("line-height")}`),l=document.createElement("div");l.style.font=`${n} ${o}`,l.style.padding=t.getPropertyValue("padding"),l.style.lineHeight=`${a}px`,l.style.width=`${e.offsetWidth}px`,l.style.maxWidth=`${e.offsetWidth}px`,l.style.whiteSpace=t.getPropertyValue("white-space"),l.style.overflowWrap=t.getPropertyValue("overflow-wrap");const s=document.createElement("span");l.appendChild(document.createTextNode(h.beforeCursor)),l.appendChild(s),l.appendChild(document.createTextNode(h.afterCursor)),document.body.appendChild(l);const c=l.getBoundingClientRect(),d=s.getBoundingClientRect(),p=d.left-c.left,f=d.bottom-c.bottom-(i?a:0);u({top:f,left:p}),l.remove(),s.remove()}),[r,a,i]),mt(pt.FK,{children:mt(va,{loading:w,disabledFullScreen:!0,value:g,options:k,anchor:r,minLength:0,offset:c,onSelect:x,onFoundOptions:s,maxDisplayResults:{limit:Xt,message:"Please, specify the query more precisely."}})})},Ta="No match! \nThis query hasn't selected any time series from database.\nEither the requested metrics are missing in the database,\nor there is a typo in series selector.",$a="The shown results are marked as PARTIAL.\nThe result is marked as partial if one or more vmstorage nodes failed to respond to the query.",Pa=e=>{let{value:n,onChange:r,onEnter:o,onArrowUp:a,onArrowDown:i,autocomplete:l,error:s,stats:c,label:u,disabled:d=!1}=e;const{autocompleteQuick:h}=ln(),{isMobile:p}=br(),[f,m]=(0,t.useState)(!1),[_,g]=(0,t.useState)([0,0]),v=(0,t.useRef)(null),[y,b]=(0,t.useState)(l),w=(0,t.useRef)(ba()(b,500)).current,k=[{show:"0"===(null===c||void 0===c?void 0:c.seriesFetched)&&!c.resultLength,text:Ta},{show:null===c||void 0===c?void 0:c.isPartial,text:$a}].filter((e=>e.show)).map((e=>e.text)).join("");c&&(u=`${u} (${c.executionTimeMsec||0}ms)`);return(0,t.useEffect)((()=>{m(l)}),[h]),(0,t.useEffect)((()=>{b(!1),w(!0)}),[_]),mt("div",{className:"vm-query-editor",ref:v,children:[mt(Vr,{value:n,label:u,type:"textarea",autofocus:!p,error:s,warning:k,onKeyDown:e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:l}=e,s=(e.target.value||"").split("\n").length>1,c=n||r,u="ArrowDown"===t,d="Enter"===t;"ArrowUp"===t&&c&&(e.preventDefault(),a()),u&&c&&(e.preventDefault(),i()),d&&f&&e.preventDefault(),!d||l||s&&!c||f||(e.preventDefault(),o())},onChange:r,onChangeCaret:e=>{g((t=>t[0]===e[0]&&t[1]===e[1]?t:e))},disabled:d,inputmode:"search",caretPosition:_}),y&&l&&mt(Na,{value:n,anchorEl:v,caretPosition:_,hasHelperText:Boolean(k||s),onSelect:(e,t)=>{r(e),g([t,t])},onFoundOptions:e=>{m(!!e.length)}})]})},Da=e=>{let{query:n,limit:r,error:o,isLoading:a,onChange:i,onChangeLimit:l,onRun:s}=e;const{isMobile:c}=br(),[u,d]=(0,t.useState)(""),[h,p]=(0,t.useState)(r);return(0,t.useEffect)((()=>{p(r)}),[r]),mt("div",{className:Qn()({"vm-explore-logs-header":!0,"vm-block":!0,"vm-block_mobile":c}),children:[mt("div",{className:"vm-explore-logs-header-top",children:[mt(Pa,{value:n,autocomplete:!1,onArrowUp:()=>null,onArrowDown:()=>null,onEnter:s,onChange:i,label:"Log query",error:o}),mt(Vr,{label:"Limit entries",type:"number",value:h,error:u,onChange:e=>{const t=+e;p(t),isNaN(t)||t<0?d("Number must be bigger than zero"):(d(""),l(t))},onEnter:s})]}),mt("div",{className:"vm-explore-logs-header-bottom",children:[mt("div",{className:"vm-explore-logs-header-bottom-contols"}),mt("div",{className:"vm-explore-logs-header-bottom-helpful",children:[mt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/victorialogs/logsql/",rel:"help noreferrer",children:[mt(_n,{}),"Query language docs"]}),mt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/victorialogs/",rel:"help noreferrer",children:[mt(Rn,{}),"Documentation"]})]}),mt("div",{className:"vm-explore-logs-header-bottom-execute",children:mt(Dr,{startIcon:mt(a?Zn:En,{}),onClick:s,fullWidth:!0,children:[mt("span",{className:"vm-explore-logs-header-bottom-execute__text",children:a?"Cancel Query":"Execute Query"}),mt("span",{className:"vm-explore-logs-header-bottom-execute__text_hidden",children:"Execute Query"})]})})]})]})},Oa=()=>{const[e,n]=(0,t.useState)(null),[r,o]=(0,t.useState)({width:0,height:0}),a=(0,t.useCallback)((()=>{o({width:(null===e||void 0===e?void 0:e.offsetWidth)||0,height:(null===e||void 0===e?void 0:e.offsetHeight)||0})}),[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]);return er("resize",a),(0,t.useEffect)(a,[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]),[n,r]},La="u-off",Ra="u-label",za="width",Ia="height",ja="top",Fa="bottom",Ha="left",Va="right",Ba="#000",Ua=Ba+"0",Ya="mousemove",Wa="mousedown",qa="mouseup",Ka="mouseenter",Za="mouseleave",Ga="dblclick",Qa="change",Ja="dppxchange",Xa="--",ei="undefined"!=typeof window,ti=ei?document:null,ni=ei?window:null,ri=ei?navigator:null;let oi,ai;function ii(e,t){if(null!=t){let n=e.classList;!n.contains(t)&&n.add(t)}}function li(e,t){let n=e.classList;n.contains(t)&&n.remove(t)}function si(e,t,n){e.style[t]=n+"px"}function ci(e,t,n,r){let o=ti.createElement(e);return null!=t&&ii(o,t),null!=n&&n.insertBefore(o,r),o}function ui(e,t){return ci("div",e,t)}const di=new WeakMap;function hi(e,t,n,r,o){let a="translate("+t+"px,"+n+"px)";a!=di.get(e)&&(e.style.transform=a,di.set(e,a),t<0||n<0||t>r||n>o?ii(e,La):li(e,La))}const pi=new WeakMap;function fi(e,t,n){let r=t+n;r!=pi.get(e)&&(pi.set(e,r),e.style.background=t,e.style.borderColor=n)}const mi=new WeakMap;function _i(e,t,n,r){let o=t+""+n;o!=mi.get(e)&&(mi.set(e,o),e.style.height=n+"px",e.style.width=t+"px",e.style.marginLeft=r?-t/2+"px":0,e.style.marginTop=r?-n/2+"px":0)}const gi={passive:!0},vi={...gi,capture:!0};function yi(e,t,n,r){t.addEventListener(e,n,r?vi:gi)}function bi(e,t,n,r){t.removeEventListener(e,n,gi)}function wi(e,t,n,r){let o;n=n||0;let a=(r=r||t.length-1)<=2147483647;for(;r-n>1;)o=a?n+r>>1:Ri((n+r)/2),t[o]=t&&o<=n;o+=r)if(null!=e[o])return o;return-1}function xi(e,t,n,r){let o=Vi(e),a=Vi(t);e==t&&(-1==o?(e*=n,t/=n):(e/=n,t*=n));let i=10==n?Bi:Ui,l=1==a?Ii:Ri,s=(1==o?Ri:Ii)(i(Li(e))),c=l(i(Li(t))),u=Hi(n,s),d=Hi(n,c);return 10==n&&(s<0&&(u=il(u,-s)),c<0&&(d=il(d,-c))),r||2==n?(e=u*o,t=d*a):(e=al(e,u),t=ol(t,d)),[e,t]}function Si(e,t,n,r){let o=xi(e,t,n,r);return 0==e&&(o[0]=0),0==t&&(o[1]=0),o}ei&&function e(){let t=devicePixelRatio;oi!=t&&(oi=t,ai&&bi(Qa,ai,e),ai=matchMedia(`(min-resolution: ${oi-.001}dppx) and (max-resolution: ${oi+.001}dppx)`),yi(Qa,ai,e),ni.dispatchEvent(new CustomEvent(Ja)))}();const Ci={mode:3,pad:.1},Ai={pad:0,soft:null,mode:0},Ei={min:Ai,max:Ai};function Mi(e,t,n,r){return _l(n)?Ti(e,t,n):(Ai.pad=n,Ai.soft=r?0:null,Ai.mode=r?3:0,Ti(e,t,Ei))}function Ni(e,t){return null==e?t:e}function Ti(e,t,n){let r=n.min,o=n.max,a=Ni(r.pad,0),i=Ni(o.pad,0),l=Ni(r.hard,-Wi),s=Ni(o.hard,Wi),c=Ni(r.soft,Wi),u=Ni(o.soft,-Wi),d=Ni(r.mode,0),h=Ni(o.mode,0),p=t-e,f=Bi(p),m=Fi(Li(e),Li(t)),_=Bi(m),g=Li(_-f);(p<1e-24||g>10)&&(p=0,0!=e&&0!=t||(p=1e-24,2==d&&c!=Wi&&(a=0),2==h&&u!=-Wi&&(i=0)));let v=p||m||1e3,y=Bi(v),b=Hi(10,Ri(y)),w=il(al(e-v*(0==p?0==e?.1:1:a),b/10),24),k=e>=c&&(1==d||3==d&&w<=c||2==d&&w>=c)?c:Wi,x=Fi(l,w=k?k:ji(k,w)),S=il(ol(t+v*(0==p?0==t?.1:1:i),b/10),24),C=t<=u&&(1==h||3==h&&S>=u||2==h&&S<=u)?u:-Wi,A=ji(s,S>C&&t<=C?C:Fi(C,S));return x==A&&0==x&&(A=100),[x,A]}const $i=new Intl.NumberFormat(ei?ri.language:"en-US"),Pi=e=>$i.format(e),Di=Math,Oi=Di.PI,Li=Di.abs,Ri=Di.floor,zi=Di.round,Ii=Di.ceil,ji=Di.min,Fi=Di.max,Hi=Di.pow,Vi=Di.sign,Bi=Di.log10,Ui=Di.log2,Yi=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Di.asinh(e/t)},Wi=1/0;function qi(e){return 1+(0|Bi((e^e>>31)-(e>>31)))}function Ki(e,t,n){return ji(Fi(e,t),n)}function Zi(e){return"function"==typeof e?e:()=>e}const Gi=e=>e,Qi=(e,t)=>t,Ji=e=>null,Xi=e=>!0,el=(e,t)=>e==t,tl=/\.\d*?(?=9{6,}|0{6,})/gm,nl=e=>{if(fl(e)||ll.has(e))return e;const t=`${e}`,n=t.match(tl);if(null==n)return e;let r=n[0].length-1;if(-1!=t.indexOf("e-")){let[e,n]=t.split("e");return+`${nl(e)}e${n}`}return il(e,r)};function rl(e,t){return nl(il(nl(e/t))*t)}function ol(e,t){return nl(Ii(nl(e/t))*t)}function al(e,t){return nl(Ri(nl(e/t))*t)}function il(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(fl(e))return e;let n=10**t,r=e*n*(1+Number.EPSILON);return zi(r)/n}const ll=new Map;function sl(e){return((""+e).split(".")[1]||"").length}function cl(e,t,n,r){let o=[],a=r.map(sl);for(let i=t;i=0?0:t)+(i>=a[l]?0:a[l]),u=10==e?s:il(s,c);o.push(u),ll.set(u,c)}}return o}const ul={},dl=[],hl=[null,null],pl=Array.isArray,fl=Number.isInteger;function ml(e){return"string"==typeof e}function _l(e){let t=!1;if(null!=e){let n=e.constructor;t=null==n||n==Object}return t}function gl(e){return null!=e&&"object"==typeof e}const vl=Object.getPrototypeOf(Uint8Array),yl="__proto__";function bl(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_l;if(pl(e)){let r=e.find((e=>null!=e));if(pl(r)||n(r)){t=Array(e.length);for(let r=0;ra){for(r=i-1;r>=0&&null==e[r];)e[r--]=null;for(r=i+1;rPromise.resolve().then(e):queueMicrotask;const Sl=["January","February","March","April","May","June","July","August","September","October","November","December"],Cl=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Al(e){return e.slice(0,3)}const El=Cl.map(Al),Ml=Sl.map(Al),Nl={MMMM:Sl,MMM:Ml,WWWW:Cl,WWW:El};function Tl(e){return(e<10?"0":"")+e}const $l={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,t)=>t.MMMM[e.getMonth()],MMM:(e,t)=>t.MMM[e.getMonth()],MM:e=>Tl(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>Tl(e.getDate()),D:e=>e.getDate(),WWWW:(e,t)=>t.WWWW[e.getDay()],WWW:(e,t)=>t.WWW[e.getDay()],HH:e=>Tl(e.getHours()),H:e=>e.getHours(),h:e=>{let t=e.getHours();return 0==t?12:t>12?t-12:t},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>Tl(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>Tl(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>{return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Pl(e,t){t=t||Nl;let n,r=[],o=/\{([a-z]+)\}|[^{]+/gi;for(;n=o.exec(e);)r.push("{"==n[0][0]?$l[n[1]]:n[0]);return e=>{let n="";for(let o=0;oe%1==0,Ll=[1,2,2.5,5],Rl=cl(10,-32,0,Ll),zl=cl(10,0,32,Ll),Il=zl.filter(Ol),jl=Rl.concat(zl),Fl="{YYYY}",Hl="\n"+Fl,Vl="{M}/{D}",Bl="\n"+Vl,Ul=Bl+"/{YY}",Yl="{aa}",Wl="{h}:{mm}"+Yl,ql="\n"+Wl,Kl=":{ss}",Zl=null;function Gl(e){let t=1e3*e,n=60*t,r=60*n,o=24*r,a=30*o,i=365*o;return[(1==e?cl(10,0,3,Ll).filter(Ol):cl(10,-3,0,Ll)).concat([t,5*t,10*t,15*t,30*t,n,5*n,10*n,15*n,30*n,r,2*r,3*r,4*r,6*r,8*r,12*r,o,2*o,3*o,4*o,5*o,6*o,7*o,8*o,9*o,10*o,15*o,a,2*a,3*a,4*a,6*a,i,2*i,5*i,10*i,25*i,50*i,100*i]),[[i,Fl,Zl,Zl,Zl,Zl,Zl,Zl,1],[28*o,"{MMM}",Hl,Zl,Zl,Zl,Zl,Zl,1],[o,Vl,Hl,Zl,Zl,Zl,Zl,Zl,1],[r,"{h}"+Yl,Ul,Zl,Bl,Zl,Zl,Zl,1],[n,Wl,Ul,Zl,Bl,Zl,Zl,Zl,1],[t,Kl,Ul+" "+Wl,Zl,Bl+" "+Wl,Zl,ql,Zl,1],[e,Kl+".{fff}",Ul+" "+Wl,Zl,Bl+" "+Wl,Zl,ql,Zl,1]],function(t){return(l,s,c,u,d,h)=>{let p=[],f=d>=i,m=d>=a&&d=o?o:d,i=y+(Ri(c)-Ri(g))+ol(g-y,a);p.push(i);let f=t(i),m=f.getHours()+f.getMinutes()/n+f.getSeconds()/r,_=d/r,v=h/l.axes[s]._space;for(;i=il(i+d,1==e?0:3),!(i>u);)if(_>1){let e=Ri(il(m+_,6))%24,n=t(i).getHours()-e;n>1&&(n=-1),i-=n*r,m=(m+_)%24,il((i-p[p.length-1])/d,3)*v>=.7&&p.push(i)}else p.push(i)}return p}}]}const[Ql,Jl,Xl]=Gl(1),[es,ts,ns]=Gl(.001);function rs(e,t){return e.map((e=>e.map(((n,r)=>0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)))))}function os(e,t){return(n,r,o,a,i)=>{let l,s,c,u,d,h,p=t.find((e=>i>=e[0]))||t[t.length-1];return r.map((t=>{let n=e(t),r=n.getFullYear(),o=n.getMonth(),a=n.getDate(),i=n.getHours(),f=n.getMinutes(),m=n.getSeconds(),_=r!=l&&p[2]||o!=s&&p[3]||a!=c&&p[4]||i!=u&&p[5]||f!=d&&p[6]||m!=h&&p[7]||p[1];return l=r,s=o,c=a,u=i,d=f,h=m,_(n)}))}}function as(e,t,n){return new Date(e,t,n)}function is(e,t){return t(e)}cl(2,-53,53,[1]);function ls(e,t){return(n,r,o,a)=>null==a?Xa:t(e(r))}const ss={show:!0,live:!0,isolate:!1,mount:()=>{},markers:{show:!0,width:2,stroke:function(e,t){let n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null},fill:function(e,t){return e.series[t].fill(e,t)},dash:"solid"},idx:null,idxs:null,values:[]};const cs=[0,0];function us(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{0==e.button&&(!r||e.target==t)&&n(e)}}function ds(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{(!r||e.target==t)&&n(e)}}const hs={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return cs[0]=t,cs[1]=n,cs},points:{one:!1,show:function(e,t){let n=e.cursor.points,r=ui(),o=n.size(e,t);si(r,za,o),si(r,Ia,o);let a=o/-2;si(r,"marginLeft",a),si(r,"marginTop",a);let i=n.width(e,t,o);return i&&si(r,"borderWidth",i),r},size:function(e,t){return e.series[t].points.size},width:0,stroke:function(e,t){let n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){let n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:us,mouseup:us,click:us,dblclick:us,mousemove:ds,mouseleave:ds,mouseenter:ds},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,t,n,r,o)=>r-o,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},ps={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},fs=wl({},ps,{filter:Qi}),ms=wl({},fs,{size:10}),_s=wl({},ps,{show:!1}),gs='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',vs="bold "+gs,ys={show:!0,scale:"x",stroke:Ba,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:vs,side:2,grid:fs,ticks:ms,border:_s,font:gs,lineGap:1.5,rotate:0},bs={show:!0,scale:"x",auto:!1,sorted:1,min:Wi,max:-Wi,idxs:[]};function ws(e,t,n,r,o){return t.map((e=>null==e?"":Pi(e)))}function ks(e,t,n,r,o,a,i){let l=[],s=ll.get(o)||0;for(let c=n=i?n:il(ol(n,o),s);c<=r;c=il(c+o,s))l.push(Object.is(c,-0)?0:c);return l}function xs(e,t,n,r,o,a,i){const l=[],s=e.scales[e.axes[t].scale].log,c=Ri((10==s?Bi:Ui)(n));o=Hi(s,c),10==s&&(o=jl[wi(o,jl)]);let u=n,d=o*s;10==s&&(d=jl[wi(d,jl)]);do{l.push(u),u+=o,10!=s||ll.has(u)||(u=il(u,ll.get(o))),u>=d&&(d=(o=u)*s,10==s&&(d=jl[wi(d,jl)]))}while(u<=r);return l}function Ss(e,t,n,r,o,a,i){let l=e.scales[e.axes[t].scale].asinh,s=r>l?xs(e,t,Fi(l,n),r,o):[l],c=r>=0&&n<=0?[0]:[];return(n<-l?xs(e,t,Fi(l,-r),-n,o):[l]).reverse().map((e=>-e)).concat(c,s)}const Cs=/./,As=/[12357]/,Es=/[125]/,Ms=/1/,Ns=(e,t,n,r)=>e.map(((e,o)=>4==t&&0==e||o%r==0&&n.test(e.toExponential()[e<0?1:0])?e:null));function Ts(e,t,n,r,o){let a=e.axes[n],i=a.scale,l=e.scales[i],s=e.valToPos,c=a._space,u=s(10,i),d=s(9,i)-u>=c?Cs:s(7,i)-u>=c?As:s(5,i)-u>=c?Es:Ms;if(d==Ms){let e=Li(s(1,i)-u);if(eo,Rs={show:!0,auto:!0,sorted:0,gaps:Ls,alpha:1,facets:[wl({},Os,{scale:"x"}),wl({},Os,{scale:"y"})]},zs={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Ls,alpha:1,points:{show:function(e,t){let{scale:n,idxs:r}=e.series[0],o=e._data[0],a=e.valToPos(o[r[0]],n,!0),i=e.valToPos(o[r[1]],n,!0),l=Li(i-a)/(e.series[t].points.space*oi);return r[1]-r[0]<=l},filter:null},values:null,min:Wi,max:-Wi,idxs:[],path:null,clip:null};function Is(e,t,n,r,o){return n/10}const js={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Fs=wl({},js,{time:!1,ori:1}),Hs={};function Vs(e,t){let n=Hs[e];return n||(n={key:e,plots:[],sub(e){n.plots.push(e)},unsub(e){n.plots=n.plots.filter((t=>t!=e))},pub(e,t,r,o,a,i,l){for(let s=0;s{let m=e.pxRound;const _=l.dir*(0==l.ori?1:-1),g=0==l.ori?Xs:ec;let v,y;1==_?(v=n,y=r):(v=r,y=n);let b=m(c(t[v],l,p,d)),w=m(u(i[v],s,f,h)),k=m(c(t[y],l,p,d)),x=m(u(1==a?s.max:s.min,s,f,h)),S=new Path2D(o);return g(S,k,x),g(S,b,x),g(S,b,w),S}))}function qs(e,t,n,r,o,a){let i=null;if(e.length>0){i=new Path2D;const l=0==t?tc:nc;let s=n;for(let t=0;tn[0]){let e=n[0]-s;e>0&&l(i,s,r,e,r+a),s=n[1]}}let c=n+o-s,u=10;c>0&&l(i,s,r-u/2,c,r+a+u)}return i}function Ks(e,t,n,r,o,a,i){let l=[],s=e.length;for(let c=1==o?n:r;c>=n&&c<=r;c+=o){if(null===t[c]){let u=c,d=c;if(1==o)for(;++c<=r&&null===t[c];)d=c;else for(;--c>=n&&null===t[c];)d=c;let h=a(e[u]),p=d==u?h:a(e[d]),f=u-o;h=i<=0&&f>=0&&f=0&&m>=0&&m=h&&l.push([h,p])}}return l}function Zs(e){return 0==e?Gi:1==e?zi:t=>rl(t,e)}function Gs(e){let t=0==e?Qs:Js,n=0==e?(e,t,n,r,o,a)=>{e.arcTo(t,n,r,o,a)}:(e,t,n,r,o,a)=>{e.arcTo(n,t,o,r,a)},r=0==e?(e,t,n,r,o)=>{e.rect(t,n,r,o)}:(e,t,n,r,o)=>{e.rect(n,t,o,r)};return function(e,o,a,i,l){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;0==s&&0==c?r(e,o,a,i,l):(s=ji(s,i/2,l/2),c=ji(c,i/2,l/2),t(e,o+s,a),n(e,o+i,a,o+i,a+l,s),n(e,o+i,a+l,o,a+l,c),n(e,o,a+l,o,a,c),n(e,o,a,o+i,a,s),e.closePath())}}const Qs=(e,t,n)=>{e.moveTo(t,n)},Js=(e,t,n)=>{e.moveTo(n,t)},Xs=(e,t,n)=>{e.lineTo(t,n)},ec=(e,t,n)=>{e.lineTo(n,t)},tc=Gs(0),nc=Gs(1),rc=(e,t,n,r,o,a)=>{e.arc(t,n,r,o,a)},oc=(e,t,n,r,o,a)=>{e.arc(n,t,r,o,a)},ac=(e,t,n,r,o,a,i)=>{e.bezierCurveTo(t,n,r,o,a,i)},ic=(e,t,n,r,o,a,i)=>{e.bezierCurveTo(n,t,o,r,i,a)};function lc(e){return(e,t,n,r,o)=>Bs(e,t,((t,a,i,l,s,c,u,d,h,p,f)=>{let m,_,{pxRound:g,points:v}=t;0==l.ori?(m=Qs,_=rc):(m=Js,_=oc);const y=il(v.width*oi,3);let b=(v.size-v.width)/2*oi,w=il(2*b,3),k=new Path2D,x=new Path2D,{left:S,top:C,width:A,height:E}=e.bbox;tc(x,S-w,C-w,A+2*w,E+2*w);const M=e=>{if(null!=i[e]){let t=g(c(a[e],l,p,d)),n=g(u(i[e],s,f,h));m(k,t+b,n),_(k,t,n,b,0,2*Oi)}};if(o)o.forEach(M);else for(let e=n;e<=r;e++)M(e);return{stroke:y>0?k:null,fill:k,clip:x,flags:3}}))}function sc(e){return(t,n,r,o,a,i)=>{r!=o&&(a!=r&&i!=r&&e(t,n,r),a!=o&&i!=o&&e(t,n,o),e(t,n,i))}}const cc=sc(Xs),uc=sc(ec);function dc(e){const t=Ni(e?.alignGaps,0);return(e,n,r,o)=>Bs(e,n,((a,i,l,s,c,u,d,h,p,f,m)=>{let _,g,v=a.pxRound,y=e=>v(u(e,s,f,h)),b=e=>v(d(e,c,m,p));0==s.ori?(_=Xs,g=cc):(_=ec,g=uc);const w=s.dir*(0==s.ori?1:-1),k={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},x=k.stroke;let S,C,A,E=Wi,M=-Wi,N=y(i[1==w?r:o]),T=ki(l,r,o,1*w),$=ki(l,r,o,-1*w),P=y(i[T]),D=y(i[$]),O=!1;for(let e=1==w?r:o;e>=r&&e<=o;e+=w){let t=y(i[e]),n=l[e];t==N?null!=n?(C=b(n),E==Wi&&(_(x,t,C),S=C),E=ji(C,E),M=Fi(C,M)):null===n&&(O=!0):(E!=Wi&&(g(x,N,E,M,S,C),A=N),null!=n?(C=b(n),_(x,t,C),E=M=S=C):(E=Wi,M=-Wi,null===n&&(O=!0)),N=t)}E!=Wi&&E!=M&&A!=N&&g(x,N,E,M,S,C);let[L,R]=Us(e,n);if(null!=a.fill||0!=L){let t=k.fill=new Path2D(x),r=b(a.fillTo(e,n,a.min,a.max,L));_(t,D,r),_(t,P,r)}if(!a.spanGaps){let c=[];O&&c.push(...Ks(i,l,r,o,w,y,t)),k.gaps=c=a.gaps(e,n,r,o,c),k.clip=qs(c,s.ori,h,p,f,m)}return 0!=R&&(k.band=2==R?[Ws(e,n,r,o,x,-1),Ws(e,n,r,o,x,1)]:Ws(e,n,r,o,x,R)),k}))}function hc(e,t,n,r,o,a){let i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Wi;if(e.length>1){let l=null;for(let s=0,c=1/0;s0!==r[e]>0?n[e]=0:(n[e]=3*(s[e-1]+s[e])/((2*s[e]+s[e-1])/r[e-1]+(s[e]+2*s[e-1])/r[e]),isFinite(n[e])||(n[e]=0));n[i-1]=r[i-2];for(let c=0;c{Tc.pxRatio=oi})));const _c=dc(),gc=lc();function vc(e,t,n,r){return(r?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map(((e,r)=>yc(e,r,t,n)))}function yc(e,t,n,r){return wl({},0==t?n:r,e)}function bc(e,t,n){return null==t?hl:[t,n]}const wc=bc;function kc(e,t,n){return null==t?hl:Mi(t,n,.1,!0)}function xc(e,t,n,r){return null==t?hl:xi(t,n,e.scales[r].log,!1)}const Sc=xc;function Cc(e,t,n,r){return null==t?hl:Si(t,n,e.scales[r].log,!1)}const Ac=Cc;function Ec(e,t,n,r,o){let a=Fi(qi(e),qi(t)),i=t-e,l=wi(o/r*i,n);do{let e=n[l],t=r*e/i;if(t>=o&&a+(e<5?ll.get(e):0)<=17)return[e,t]}while(++l(t=zi((n=+r)*oi))+"px")),t,n]}function Nc(e){e.show&&[e.font,e.labelFont].forEach((e=>{let t=il(e[2]*oi,1);e[0]=e[0].replace(/[0-9.]+px/,t+"px"),e[1]=t}))}function Tc(e,t,n){const r={mode:Ni(e.mode,1)},o=r.mode;function a(e,t){return((3==t.distr?Bi(e>0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?Yi(e,t.asinh):100==t.distr?t.fwd(e):e)-t._min)/(t._max-t._min)}function i(e,t,n,r){let o=a(e,t);return r+n*(-1==t.dir?1-o:o)}function l(e,t,n,r){let o=a(e,t);return r+n*(-1==t.dir?o:1-o)}function s(e,t,n,r){return 0==t.ori?i(e,t,n,r):l(e,t,n,r)}r.valToPosH=i,r.valToPosV=l;let c=!1;r.status=0;const u=r.root=ui("uplot");if(null!=e.id&&(u.id=e.id),ii(u,e.class),e.title){ui("u-title",u).textContent=e.title}const d=ci("canvas"),h=r.ctx=d.getContext("2d"),p=ui("u-wrap",u);yi("click",p,(e=>{if(e.target===m){(Tt!=At||$t!=Et)&&Ft.click(r,e)}}),!0);const f=r.under=ui("u-under",p);p.appendChild(d);const m=r.over=ui("u-over",p),_=+Ni((e=bl(e)).pxAlign,1),g=Zs(_);(e.plugins||[]).forEach((t=>{t.opts&&(e=t.opts(r,e)||e)}));const v=e.ms||.001,y=r.series=1==o?vc(e.series||[],bs,zs,!1):(b=e.series||[null],w=Rs,b.map(((e,t)=>0==t?{}:wl({},w,e))));var b,w;const k=r.axes=vc(e.axes||[],ys,Ds,!0),x=r.scales={},S=r.bands=e.bands||[];S.forEach((e=>{e.fill=Zi(e.fill||null),e.dir=Ni(e.dir,-1)}));const C=2==o?y[1].facets[0].scale:y[0].scale,A={axes:function(){for(let e=0;ent[e])):v,b=2==p.distr?nt[v[1]]-nt[v[0]]:u,w=t.ticks,S=t.border,C=w.show?zi(w.size*oi):0,A=t._rotate*-Oi/180,E=g(t._pos*oi),M=E+(C+_)*c;o=0==i?M:0,n=1==i?M:0,lt(t.font[0],l,1==t.align?Ha:2==t.align?Va:A>0?Ha:A<0?Va:0==i?"center":3==a?Va:Ha,A||1==i?"middle":2==a?ja:Fa);let N=t.font[1]*t.lineGap,T=v.map((e=>g(s(e,p,f,m)))),$=t._values;for(let e=0;e<$.length;e++){let t=$[e];if(null!=t){0==i?n=T[e]:o=T[e],t=""+t;let r=-1==t.indexOf("\n")?[t]:t.split(/\n/gm);for(let e=0;e0&&(y.forEach(((e,n)=>{if(n>0&&e.show&&(ut(n,!1),ut(n,!0),null==e._paths)){tt!=e.alpha&&(h.globalAlpha=tt=e.alpha);let a=2==o?[0,t[n][0].length-1]:function(e){let t=Ki(Be-1,0,Ve-1),n=Ki(Ue+1,0,Ve-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n{if(t>0&&e.show){tt!=e.alpha&&(h.globalAlpha=tt=e.alpha),null!=e._paths&&dt(t,!1);{let n=null!=e._paths?e._paths.gaps:null,o=e.points.show(r,t,Be,Ue,n),a=e.points.filter(r,t,o,n);(o||a)&&(e.points._paths=e.points.paths(r,t,Be,Ue,a),dt(t,!0))}1!=tt&&(h.globalAlpha=tt=1),xn("drawSeries",t)}})))}},E=(e.drawOrder||["axes","series"]).map((e=>A[e]));function M(t){let n=x[t];if(null==n){let r=(e.scales||ul)[t]||ul;if(null!=r.from)M(r.from),x[t]=wl({},x[r.from],r,{key:t});else{n=x[t]=wl({},t==C?js:Fs,r),n.key=t;let e=n.time,a=n.range,i=pl(a);if((t!=C||2==o&&!e)&&(!i||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?Ci:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?Ci:{mode:1,hard:a[1],soft:a[1]}},i=!1),!i&&_l(a))){let e=a;a=(t,n,r)=>null==n?hl:Mi(n,r,e)}n.range=Zi(a||(e?wc:t==C?3==n.distr?Sc:4==n.distr?Ac:bc:3==n.distr?xc:4==n.distr?Cc:kc)),n.auto=Zi(!i&&n.auto),n.clamp=Zi(n.clamp||Is),n._min=n._max=null}}}M("x"),M("y"),1==o&&y.forEach((e=>{M(e.scale)})),k.forEach((e=>{M(e.scale)}));for(let Tn in e.scales)M(Tn);const N=x[C],T=N.distr;let $,P;0==N.ori?(ii(u,"u-hz"),$=i,P=l):(ii(u,"u-vt"),$=l,P=i);const D={};for(let Tn in x){let e=x[Tn];null==e.min&&null==e.max||(D[Tn]={min:e.min,max:e.max},e.min=e.max=null)}const O=e.tzDate||(e=>new Date(zi(e/v))),L=e.fmtDate||Pl,R=1==v?Xl(O):ns(O),z=os(O,rs(1==v?Jl:ts,L)),I=ls(O,is("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",L)),j=[],F=r.legend=wl({},ss,e.legend),H=F.show,V=F.markers;let B,U,Y;F.idxs=j,V.width=Zi(V.width),V.dash=Zi(V.dash),V.stroke=Zi(V.stroke),V.fill=Zi(V.fill);let W,q=[],K=[],Z=!1,G={};if(F.live){const e=y[1]?y[1].values:null;Z=null!=e,W=Z?e(r,1,0):{_:0};for(let t in W)G[t]=Xa}if(H)if(B=ci("table","u-legend",u),Y=ci("tbody",null,B),F.mount(r,B),Z){U=ci("thead",null,B,Y);let e=ci("tr",null,U);for(var Q in ci("th",null,e),W)ci("th",Ra,e).textContent=Q}else ii(B,"u-inline"),F.live&&ii(B,"u-live");const J={show:!0},X={show:!1};const ee=new Map;function te(e,t,n){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const a=ee.get(t)||{},i=Ae.bind[e](r,t,n,o);i&&(yi(e,t,a[e]=i),ee.set(t,a))}function ne(e,t,n){const r=ee.get(t)||{};for(let o in r)null!=e&&o!=e||(bi(o,t,r[o]),delete r[o]);null==e&&ee.delete(t)}let re=0,oe=0,ae=0,ie=0,le=0,se=0,ce=le,ue=se,de=ae,he=ie,pe=0,fe=0,me=0,_e=0;r.bbox={};let ge=!1,ve=!1,ye=!1,be=!1,we=!1,ke=!1;function xe(e,t,n){(n||e!=r.width||t!=r.height)&&Se(e,t),yt(!1),ye=!0,ve=!0,Rt()}function Se(e,t){r.width=re=ae=e,r.height=oe=ie=t,le=se=0,function(){let e=!1,t=!1,n=!1,r=!1;k.forEach(((o,a)=>{if(o.show&&o._show){let{side:a,_size:i}=o,l=a%2,s=i+(null!=o.label?o.labelSize:0);s>0&&(l?(ae-=s,3==a?(le+=s,r=!0):n=!0):(ie-=s,0==a?(se+=s,e=!0):t=!0))}})),Ie[0]=e,Ie[1]=n,Ie[2]=t,Ie[3]=r,ae-=He[1]+He[3],le+=He[3],ie-=He[2]+He[0],se+=He[0]}(),function(){let e=le+ae,t=se+ie,n=le,r=se;function o(o,a){switch(o){case 1:return e+=a,e-a;case 2:return t+=a,t-a;case 3:return n-=a,n+a;case 0:return r-=a,r+a}}k.forEach(((e,t)=>{if(e.show&&e._show){let t=e.side;e._pos=o(t,e._size),null!=e.label&&(e._lpos=o(t,e.labelSize))}}))}();let n=r.bbox;pe=n.left=rl(le*oi,.5),fe=n.top=rl(se*oi,.5),me=n.width=rl(ae*oi,.5),_e=n.height=rl(ie*oi,.5)}const Ce=3;r.setSize=function(e){let{width:t,height:n}=e;xe(t,n)};const Ae=r.cursor=wl({},hs,{drag:{y:2==o}},e.cursor);if(null==Ae.dataIdx){var Ee;let e=Ae.hover,n=e.skip=new Set(null!==(Ee=e.skip)&&void 0!==Ee?Ee:[]);n.add(void 0);let r=e.prox=Zi(e.prox),o=e.bias??=0;Ae.dataIdx=(e,a,i,l)=>{var s;if(0==a)return i;let c=i,u=null!==(s=r(e,a,i,l))&&void 0!==s?s:Wi,d=u>=0&&u0;)n.has(m[e])||(t=e);if(0==o||1==o)for(e=i;null==r&&e++u&&(c=null)}return c}}const Me=e=>{Ae.event=e};Ae.idxs=j,Ae._lock=!1;let Ne=Ae.points;Ne.show=Zi(Ne.show),Ne.size=Zi(Ne.size),Ne.stroke=Zi(Ne.stroke),Ne.width=Zi(Ne.width),Ne.fill=Zi(Ne.fill);const Te=r.focus=wl({},e.focus||{alpha:.3},Ae.focus),$e=Te.prox>=0,Pe=$e&&Ne.one;let De=[],Oe=[],Le=[];function Re(e,t){let n=Ne.show(r,t);if(n)return ii(n,"u-cursor-pt"),ii(n,e.class),hi(n,-10,-10,ae,ie),m.insertBefore(n,De[t]),n}function ze(e,t){if(1==o||t>0){let t=1==o&&x[e.scale].time,n=e.value;e.value=t?ml(n)?ls(O,is(n,L)):n||I:n||Ps,e.label=e.label||(t?"Time":"Value")}if(Pe||t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||_c||Ji,e.fillTo=Zi(e.fillTo||Ys),e.pxAlign=+Ni(e.pxAlign,_),e.pxRound=Zs(e.pxAlign),e.stroke=Zi(e.stroke||null),e.fill=Zi(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;let t=il((3+2*(Fi(1,e.width)||1))*1,3),n=e.points=wl({},{size:t,width:Fi(1,.2*t),stroke:e.stroke,space:2*t,paths:gc,_stroke:null,_fill:null},e.points);n.show=Zi(n.show),n.filter=Zi(n.filter),n.fill=Zi(n.fill),n.stroke=Zi(n.stroke),n.paths=Zi(n.paths),n.pxAlign=e.pxAlign}if(H){let n=function(e,t){if(0==t&&(Z||!F.live||2==o))return hl;let n=[],a=ci("tr","u-series",Y,Y.childNodes[t]);ii(a,e.class),e.show||ii(a,La);let i=ci("th",null,a);if(V.show){let e=ui("u-marker",i);if(t>0){let n=V.width(r,t);n&&(e.style.border=n+"px "+V.dash(r,t)+" "+V.stroke(r,t)),e.style.background=V.fill(r,t)}}let l=ui(Ra,i);for(var s in l.textContent=e.label,t>0&&(V.show||(l.style.color=e.width>0?V.stroke(r,t):V.fill(r,t)),te("click",i,(t=>{if(Ae._lock)return;Me(t);let n=y.indexOf(e);if((t.ctrlKey||t.metaKey)!=F.isolate){let e=y.some(((e,t)=>t>0&&t!=n&&e.show));y.forEach(((t,r)=>{r>0&&qt(r,e?r==n?J:X:J,!0,Cn.setSeries)}))}else qt(n,{show:!e.show},!0,Cn.setSeries)}),!1),$e&&te(Ka,i,(t=>{Ae._lock||(Me(t),qt(y.indexOf(e),Qt,!0,Cn.setSeries))}),!1)),W){let e=ci("td","u-value",a);e.textContent="--",n.push(e)}return[a,n]}(e,t);q.splice(t,0,n[0]),K.splice(t,0,n[1]),F.values.push(null)}if(Ae.show){j.splice(t,0,null);let n=null;Pe?0==t&&(n=Re(e,t)):t>0&&(n=Re(e,t)),De.splice(t,0,n),Oe.splice(t,0,0),Le.splice(t,0,0)}xn("addSeries",t)}r.addSeries=function(e,t){t=null==t?y.length:t,e=1==o?yc(e,t,bs,zs):yc(e,t,{},Rs),y.splice(t,0,e),ze(y[t],t)},r.delSeries=function(e){if(y.splice(e,1),H){F.values.splice(e,1),K.splice(e,1);let t=q.splice(e,1)[0];ne(null,t.firstChild),t.remove()}Ae.show&&(j.splice(e,1),De.splice(e,1)[0].remove(),Oe.splice(e,1),Le.splice(e,1)),xn("delSeries",e)};const Ie=[!1,!1,!1,!1];function je(e,t,n,r){let[o,a,i,l]=n,s=t%2,c=0;return 0==s&&(l||a)&&(c=0==t&&!o||2==t&&!i?zi(ys.size/3):0),1==s&&(o||i)&&(c=1==t&&!a||3==t&&!l?zi(Ds.size/2):0),c}const Fe=r.padding=(e.padding||[je,je,je,je]).map((e=>Zi(Ni(e,je)))),He=r._padding=Fe.map(((e,t)=>e(r,t,Ie,0)));let Ve,Be=null,Ue=null;const Ye=1==o?y[0].idxs:null;let We,qe,Ke,Ze,Ge,Qe,Je,Xe,et,tt,nt=null,rt=!1;function ot(e,n){if(t=null==e?[]:e,r.data=r._data=t,2==o){Ve=0;for(let e=1;e=0,ke=!0,Rt()}}function at(){let e,n;rt=!0,1==o&&(Ve>0?(Be=Ye[0]=0,Ue=Ye[1]=Ve-1,e=t[0][Be],n=t[0][Ue],2==T?(e=Be,n=Ue):e==n&&(3==T?[e,n]=xi(e,e,N.log,!1):4==T?[e,n]=Si(e,e,N.log,!1):N.time?n=e+zi(86400/v):[e,n]=Mi(e,n,.1,!0))):(Be=Ye[0]=e=null,Ue=Ye[1]=n=null)),Wt(C,e,n)}function it(e,t,n,r,o,a){e??=Ua,n??=dl,r??="butt",o??=Ua,a??="round",e!=We&&(h.strokeStyle=We=e),o!=qe&&(h.fillStyle=qe=o),t!=Ke&&(h.lineWidth=Ke=t),a!=Ge&&(h.lineJoin=Ge=a),r!=Qe&&(h.lineCap=Qe=r),n!=Ze&&h.setLineDash(Ze=n)}function lt(e,t,n,r){t!=qe&&(h.fillStyle=qe=t),e!=Je&&(h.font=Je=e),n!=Xe&&(h.textAlign=Xe=n),r!=et&&(h.textBaseline=et=r)}function st(e,t,n,o){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(o.length>0&&e.auto(r,rt)&&(null==t||null==t.min)){let t=Ni(Be,0),r=Ni(Ue,o.length-1),i=null==n.min?3==e.distr?function(e,t,n){let r=Wi,o=-Wi;for(let a=t;a<=n;a++){let t=e[a];null!=t&&t>0&&(to&&(o=t))}return[r,o]}(o,t,r):function(e,t,n,r){let o=Wi,a=-Wi;if(1==r)o=e[t],a=e[n];else if(-1==r)o=e[n],a=e[t];else for(let i=t;i<=n;i++){let t=e[i];null!=t&&(ta&&(a=t))}return[o,a]}(o,t,r,a):[n.min,n.max];e.min=ji(e.min,n.min=i[0]),e.max=Fi(e.max,n.max=i[1])}}r.setData=ot;const ct={min:null,max:null};function ut(e,t){let n=t?y[e].points:y[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function dt(e,n){let o=n?y[e].points:y[e],{stroke:a,fill:i,clip:l,flags:s,_stroke:c=o._stroke,_fill:u=o._fill,_width:d=o.width}=o._paths;d=il(d*oi,3);let p=null,f=d%2/2;n&&null==u&&(u=d>0?"#fff":c);let m=1==o.pxAlign&&f>0;if(m&&h.translate(f,f),!n){let e=pe-d/2,t=fe-d/2,n=me+d,r=_e+d;p=new Path2D,p.rect(e,t,n,r)}n?pt(c,d,o.dash,o.cap,u,a,i,s,l):function(e,n,o,a,i,l,s,c,u,d,h){let p=!1;0!=u&&S.forEach(((f,m)=>{if(f.series[0]==e){let e,_=y[f.series[1]],g=t[f.series[1]],v=(_._paths||ul).band;pl(v)&&(v=1==f.dir?v[0]:v[1]);let b=null;_.show&&v&&function(e,t,n){for(t=Ni(t,0),n=Ni(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,Be,Ue)?(b=f.fill(r,m)||l,e=_._paths.clip):v=null,pt(n,o,a,i,b,s,c,u,d,h,e,v),p=!0}})),p||pt(n,o,a,i,l,s,c,u,d,h)}(e,c,d,o.dash,o.cap,u,a,i,s,p,l),m&&h.translate(-f,-f)}const ht=3;function pt(e,t,n,r,o,a,i,l,s,c,u,d){it(e,t,n,r,o),(s||c||d)&&(h.save(),s&&h.clip(s),c&&h.clip(c)),d?(l&ht)==ht?(h.clip(d),u&&h.clip(u),mt(o,i),ft(e,a,t)):2&l?(mt(o,i),h.clip(d),ft(e,a,t)):1&l&&(h.save(),h.clip(d),u&&h.clip(u),mt(o,i),h.restore(),ft(e,a,t)):(mt(o,i),ft(e,a,t)),(s||c||d)&&h.restore()}function ft(e,t,n){n>0&&(t instanceof Map?t.forEach(((e,t)=>{h.strokeStyle=We=t,h.stroke(e)})):null!=t&&e&&h.stroke(t))}function mt(e,t){t instanceof Map?t.forEach(((e,t)=>{h.fillStyle=qe=t,h.fill(e)})):null!=t&&e&&h.fill(t)}function _t(e,t,n,r,o,a,i,l,s,c){let u=i%2/2;1==_&&h.translate(u,u),it(l,i,s,c,l),h.beginPath();let d,p,f,m,g=o+(0==r||3==r?-a:a);0==n?(p=o,m=g):(d=o,f=g);for(let _=0;_{if(!n.show)return;let a=x[n.scale];if(null==a.min)return void(n._show&&(t=!1,n._show=!1,yt(!1)));n._show||(t=!1,n._show=!0,yt(!1));let i=n.side,l=i%2,{min:s,max:c}=a,[u,d]=function(e,t,n,o){let a,i=k[e];if(o<=0)a=[0,0];else{let l=i._space=i.space(r,e,t,n,o);a=Ec(t,n,i._incrs=i.incrs(r,e,t,n,o,l),o,l)}return i._found=a}(o,s,c,0==l?ae:ie);if(0==d)return;let h=2==a.distr,p=n._splits=n.splits(r,o,s,c,u,d,h),f=2==a.distr?p.map((e=>nt[e])):p,m=2==a.distr?nt[p[1]]-nt[p[0]]:u,_=n._values=n.values(r,n.filter(r,f,o,d,m),o,d,m);n._rotate=2==i?n.rotate(r,_,o,d):0;let g=n._size;n._size=Ii(n.size(r,_,o,e)),null!=g&&n._size!=g&&(t=!1)})),t}function vt(e){let t=!0;return Fe.forEach(((n,o)=>{let a=n(r,o,Ie,e);a!=He[o]&&(t=!1),He[o]=a})),t}function yt(e){y.forEach(((t,n)=>{n>0&&(t._paths=null,e&&(1==o?(t.min=null,t.max=null):t.facets.forEach((e=>{e.min=null,e.max=null}))))}))}let bt,wt,kt,xt,St,Ct,At,Et,Mt,Nt,Tt,$t,Pt=!1,Dt=!1,Ot=[];function Lt(){Dt=!1;for(let e=0;e0){y.forEach(((n,a)=>{if(1==o){let o=n.scale,i=D[o];if(null==i)return;let l=e[o];if(0==a){let e=l.range(r,l.min,l.max,o);l.min=e[0],l.max=e[1],Be=wi(l.min,t[0]),Ue=wi(l.max,t[0]),Ue-Be>1&&(t[0][Be]l.max&&Ue--),n.min=nt[Be],n.max=nt[Ue]}else n.show&&n.auto&&st(l,i,n,t[a],n.sorted);n.idxs[0]=Be,n.idxs[1]=Ue}else if(a>0&&n.show&&n.auto){let[r,o]=n.facets,i=r.scale,l=o.scale,[s,c]=t[a],u=e[i],d=e[l];null!=u&&st(u,D[i],r,s,r.sorted),null!=d&&st(d,D[l],o,c,o.sorted),n.min=o.min,n.max=o.max}}));for(let t in e){let n=e[t],o=D[t];if(null==n.from&&(null==o||null==o.min)){let e=n.range(r,n.min==Wi?null:n.min,n.max==-Wi?null:n.max,t);n.min=e[0],n.max=e[1]}}}for(let t in e){let n=e[t];if(null!=n.from){let o=e[n.from];if(null==o.min)n.min=n.max=null;else{let e=n.range(r,o.min,o.max,t);n.min=e[0],n.max=e[1]}}}let n={},a=!1;for(let t in e){let r=e[t],o=x[t];if(o.min!=r.min||o.max!=r.max){o.min=r.min,o.max=r.max;let e=o.distr;o._min=3==e?Bi(o.min):4==e?Yi(o.min,o.asinh):100==e?o.fwd(o.min):o.min,o._max=3==e?Bi(o.max):4==e?Yi(o.max,o.asinh):100==e?o.fwd(o.max):o.max,n[t]=a=!0}}if(a){y.forEach(((e,t)=>{2==o?t>0&&n.y&&(e._paths=null):n[e.scale]&&(e._paths=null)}));for(let e in n)ye=!0,xn("setScale",e);Ae.show&&Ae.left>=0&&(be=ke=!0)}for(let t in D)D[t]=null}(),ge=!1),ye&&(!function(){let e=!1,t=0;for(;!e;){t++;let n=gt(t),o=vt(t);e=t==Ce||n&&o,e||(Se(r.width,r.height),ve=!0)}}(),ye=!1),ve){if(si(f,Ha,le),si(f,ja,se),si(f,za,ae),si(f,Ia,ie),si(m,Ha,le),si(m,ja,se),si(m,za,ae),si(m,Ia,ie),si(p,za,re),si(p,Ia,oe),d.width=zi(re*oi),d.height=zi(oe*oi),k.forEach((e=>{let{_el:t,_show:n,_size:r,_pos:o,side:a}=e;if(null!=t)if(n){let e=a%2==1;si(t,e?"left":"top",o-(3===a||0===a?r:0)),si(t,e?"width":"height",r),si(t,e?"top":"left",e?se:le),si(t,e?"height":"width",e?ie:ae),li(t,La)}else ii(t,La)})),We=qe=Ke=Ge=Qe=Je=Xe=et=Ze=null,tt=1,sn(!0),le!=ce||se!=ue||ae!=de||ie!=he){yt(!1);let e=ae/de,t=ie/he;if(Ae.show&&!be&&Ae.left>=0){Ae.left*=e,Ae.top*=t,kt&&hi(kt,zi(Ae.left),0,ae,ie),xt&&hi(xt,0,zi(Ae.top),ae,ie);for(let n=0;n=0&&Bt.width>0){Bt.left*=e,Bt.width*=e,Bt.top*=t,Bt.height*=t;for(let e in dn)si(Ut,e,Bt[e])}ce=le,ue=se,de=ae,he=ie}xn("setSize"),ve=!1}re>0&&oe>0&&(h.clearRect(0,0,d.width,d.height),xn("drawClear"),E.forEach((e=>e())),xn("draw")),Bt.show&&we&&(Yt(Bt),we=!1),Ae.show&&be&&(an(null,!0,!1),be=!1),F.show&&F.live&&ke&&(rn(),ke=!1),c||(c=!0,r.status=1,xn("ready")),rt=!1,Pt=!1}function It(e,n){let o=x[e];if(null==o.from){if(0==Ve){let t=o.range(r,n.min,n.max,e);n.min=t[0],n.max=t[1]}if(n.min>n.max){let e=n.min;n.min=n.max,n.max=e}if(Ve>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==C&&2==o.distr&&Ve>0&&(n.min=wi(n.min,t[0]),n.max=wi(n.max,t[0]),n.min==n.max&&n.max++),D[e]=n,ge=!0,Rt()}}r.batch=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Pt=!0,Dt=t,e(r),zt(),t&&Ot.length>0&&queueMicrotask(Lt)},r.redraw=(e,t)=>{ye=t||!1,!1!==e?Wt(C,N.min,N.max):Rt()},r.setScale=It;let jt=!1;const Ft=Ae.drag;let Ht=Ft.x,Vt=Ft.y;Ae.show&&(Ae.x&&(bt=ui("u-cursor-x",m)),Ae.y&&(wt=ui("u-cursor-y",m)),0==N.ori?(kt=bt,xt=wt):(kt=wt,xt=bt),Tt=Ae.left,$t=Ae.top);const Bt=r.select=wl({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Ut=Bt.show?ui("u-select",Bt.over?m:f):null;function Yt(e,t){if(Bt.show){for(let t in e)Bt[t]=e[t],t in dn&&si(Ut,t,e[t]);!1!==t&&xn("setSelect")}}function Wt(e,t,n){It(e,{min:t,max:n})}function qt(e,t,n,a){null!=t.focus&&function(e){if(e!=Gt){let t=null==e,n=1!=Te.alpha;y.forEach(((r,a)=>{if(1==o||a>0){let o=t||0==a||a==e;r._focus=t?null:o,n&&function(e,t){y[e].alpha=t,Ae.show&&De[e]&&(De[e].style.opacity=t);H&&q[e]&&(q[e].style.opacity=t)}(a,o?1:Te.alpha)}})),Gt=e,n&&Rt()}}(e),null!=t.show&&y.forEach(((n,r)=>{r>0&&(e==r||null==e)&&(n.show=t.show,function(e){let t=y[e],n=H?q[e]:null;t.show?n&&li(n,La):(n&&ii(n,La),hi(Pe?De[0]:De[e],-10,-10,ae,ie))}(r,t.show),2==o?(Wt(n.facets[0].scale,null,null),Wt(n.facets[1].scale,null,null)):Wt(n.scale,null,null),Rt())})),!1!==n&&xn("setSeries",e,t),a&&Mn("setSeries",r,e,t)}let Kt,Zt,Gt;r.setSelect=Yt,r.setSeries=qt,r.addBand=function(e,t){e.fill=Zi(e.fill||null),e.dir=Ni(e.dir,-1),t=null==t?S.length:t,S.splice(t,0,e)},r.setBand=function(e,t){wl(S[e],t)},r.delBand=function(e){null==e?S.length=0:S.splice(e,1)};const Qt={focus:!0};function Jt(e,t,n){let r=x[t];n&&(e=e/oi-(1==r.ori?se:le));let o=ae;1==r.ori&&(o=ie,e=o-e),-1==r.dir&&(e=o-e);let a=r._min,i=a+(r._max-a)*(e/o),l=r.distr;return 3==l?Hi(10,i):4==l?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Di.sinh(e)*t}(i,r.asinh):100==l?r.bwd(i):i}function Xt(e,t){si(Ut,Ha,Bt.left=e),si(Ut,za,Bt.width=t)}function en(e,t){si(Ut,ja,Bt.top=e),si(Ut,Ia,Bt.height=t)}H&&$e&&te(Za,B,(e=>{Ae._lock||(Me(e),null!=Gt&&qt(null,Qt,!0,Cn.setSeries))})),r.valToIdx=e=>wi(e,t[0]),r.posToIdx=function(e,n){return wi(Jt(e,C,n),t[0],Be,Ue)},r.posToVal=Jt,r.valToPos=(e,t,n)=>0==x[t].ori?i(e,x[t],n?me:ae,n?pe:0):l(e,x[t],n?_e:ie,n?fe:0),r.setCursor=(e,t,n)=>{Tt=e.left,$t=e.top,an(null,t,n)};let tn=0==N.ori?Xt:en,nn=1==N.ori?Xt:en;function rn(e,t){if(null!=e&&(e.idxs?e.idxs.forEach(((e,t)=>{j[t]=e})):void 0!==e.idx&&j.fill(e.idx),F.idx=j[0]),H&&F.live){for(let e=0;e0||1==o&&!Z)&&on(e,j[e]);!function(){if(H&&F.live)for(let e=2==o?1:0;eUe;Kt=Wi,Zt=null;let s=0==N.ori?ae:ie,c=1==N.ori?ae:ie;if(Tt<0||0==Ve||l){i=Ae.idx=null;for(let e=0;e0&&e.show){let t=null==w?-10:P(w,1==o?x[e.scale]:x[e.facets[1].scale],c,0);if($e&&null!=w){let n=1==N.ori?Tt:$t,o=Li(Te.dist(r,_,b,t,n));if(o=0?1:-1;a==(w>=0?1:-1)&&(1==a?1==t?w>=r:w<=r:1==t?w<=r:w>=r)&&(Kt=o,Zt=_)}else Kt=o,Zt=_}}if(ke||Pe){let e,n;0==N.ori?(e=k,n=t):(e=t,n=k);let o,a,i,s,c,g,v=!0,y=Ne.bbox;if(null!=y){v=!1;let e=y(r,_);i=e.left,s=e.top,o=e.width,a=e.height}else i=e,s=n,o=a=Ne.size(r,_);if(g=Ne.fill(r,_),c=Ne.stroke(r,_),Pe)_==Zt&&Kt<=Te.prox&&(l=i,u=s,d=o,h=a,p=v,f=g,m=c);else{let e=De[_];null!=e&&(Oe[_]=i,Le[_]=s,_i(e,o,a,v),fi(e,g,c),hi(e,Ii(i),Ii(s),ae,ie))}}}}if(Pe){let e=Te.prox;if(ke||(null==Gt?Kt<=e:Kt>e||Zt!=Gt)){let e=De[0];Oe[0]=l,Le[0]=u,_i(e,d,h,p),fi(e,f,m),hi(e,Ii(l),Ii(u),ae,ie)}}}if(Bt.show&&jt)if(null!=e){let[t,n]=Cn.scales,[r,o]=Cn.match,[a,i]=e.cursor.sync.scales,l=e.cursor.drag;if(Ht=l._x,Vt=l._y,Ht||Vt){let l,u,d,h,p,{left:f,top:m,width:_,height:g}=e.select,v=e.scales[a].ori,y=e.posToVal,b=null!=t&&r(t,a),w=null!=n&&o(n,i);b&&Ht?(0==v?(l=f,u=_):(l=m,u=g),d=x[t],h=$(y(l,a),d,s,0),p=$(y(l+u,a),d,s,0),tn(ji(h,p),Li(p-h))):tn(0,s),w&&Vt?(1==v?(l=f,u=_):(l=m,u=g),d=x[n],h=P(y(l,i),d,c,0),p=P(y(l+u,i),d,c,0),nn(ji(h,p),Li(p-h))):nn(0,c)}else hn()}else{let e=Li(Mt-St),t=Li(Nt-Ct);if(1==N.ori){let n=e;e=t,t=n}Ht=Ft.x&&e>=Ft.dist,Vt=Ft.y&&t>=Ft.dist;let n,r,o=Ft.uni;null!=o?Ht&&Vt&&(Ht=e>=o,Vt=t>=o,Ht||Vt||(t>e?Vt=!0:Ht=!0)):Ft.x&&Ft.y&&(Ht||Vt)&&(Ht=Vt=!0),Ht&&(0==N.ori?(n=At,r=Tt):(n=Et,r=$t),tn(ji(n,r),Li(r-n)),Vt||nn(0,c)),Vt&&(1==N.ori?(n=At,r=Tt):(n=Et,r=$t),nn(ji(n,r),Li(r-n)),Ht||tn(0,s)),Ht||Vt||(tn(0,0),nn(0,0))}if(Ft._x=Ht,Ft._y=Vt,null==e){if(a){if(null!=An){let[e,t]=Cn.scales;Cn.values[0]=null!=e?Jt(0==N.ori?Tt:$t,e):null,Cn.values[1]=null!=t?Jt(1==N.ori?Tt:$t,t):null}Mn(Ya,r,Tt,$t,ae,ie,i)}if($e){let e=a&&Cn.setSeries,t=Te.prox;null==Gt?Kt<=t&&qt(Zt,Qt,!0,e):Kt>t?qt(null,Qt,!0,e):Zt!=Gt&&qt(Zt,Qt,!0,e)}}ke&&(F.idx=i,rn()),!1!==n&&xn("setCursor")}r.setLegend=rn;let ln=null;function sn(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?ln=null:(ln=m.getBoundingClientRect(),xn("syncRect",ln))}function cn(e,t,n,r,o,a,i){Ae._lock||jt&&null!=e&&0==e.movementX&&0==e.movementY||(un(e,t,n,r,o,a,i,!1,null!=e),null!=e?an(null,!0,!0):an(t,!0,!1))}function un(e,t,n,o,a,i,l,c,u){if(null==ln&&sn(!1),Me(e),null!=e)n=e.clientX-ln.left,o=e.clientY-ln.top;else{if(n<0||o<0)return Tt=-10,void($t=-10);let[e,r]=Cn.scales,l=t.cursor.sync,[c,u]=l.values,[d,h]=l.scales,[p,f]=Cn.match,m=t.axes[0].side%2==1,_=0==N.ori?ae:ie,g=1==N.ori?ae:ie,v=m?i:a,y=m?a:i,b=m?o:n,w=m?n:o;if(n=null!=d?p(e,d)?s(c,x[e],_,0):-10:_*(b/v),o=null!=h?f(r,h)?s(u,x[r],g,0):-10:g*(w/y),1==N.ori){let e=n;n=o,o=e}}u&&((n<=1||n>=ae-1)&&(n=rl(n,ae)),(o<=1||o>=ie-1)&&(o=rl(o,ie))),c?(St=n,Ct=o,[At,Et]=Ae.move(r,n,o)):(Tt=n,$t=o)}Object.defineProperty(r,"rect",{get:()=>(null==ln&&sn(!1),ln)});const dn={width:0,height:0,left:0,top:0};function hn(){Yt(dn,!1)}let pn,fn,mn,_n;function gn(e,t,n,o,a,i,l){jt=!0,Ht=Vt=Ft._x=Ft._y=!1,un(e,t,n,o,a,i,0,!0,!1),null!=e&&(te(qa,ti,vn,!1),Mn(Wa,r,At,Et,ae,ie,null));let{left:s,top:c,width:u,height:d}=Bt;pn=s,fn=c,mn=u,_n=d,hn()}function vn(e,t,n,o,a,i,l){jt=Ft._x=Ft._y=!1,un(e,t,n,o,a,i,0,!1,!0);let{left:s,top:c,width:u,height:d}=Bt,h=u>0||d>0,p=pn!=s||fn!=c||mn!=u||_n!=d;if(h&&p&&Yt(Bt),Ft.setScale&&h&&p){let e=s,t=u,n=c,r=d;if(1==N.ori&&(e=c,t=d,n=s,r=u),Ht&&Wt(C,Jt(e,C),Jt(e+t,C)),Vt)for(let o in x){let e=x[o];o!=C&&null==e.from&&e.min!=Wi&&Wt(o,Jt(n+r,o),Jt(n,o))}hn()}else Ae.lock&&(Ae._lock=!Ae._lock,an(null,!0,!1));null!=e&&(ne(qa,ti),Mn(qa,r,Tt,$t,ae,ie,null))}function yn(e,t,n,o,a,i,l){Ae._lock||(Me(e),at(),hn(),null!=e&&Mn(Ga,r,Tt,$t,ae,ie,null))}function bn(){k.forEach(Nc),xe(r.width,r.height,!0)}yi(Ja,ni,bn);const wn={};wn.mousedown=gn,wn.mousemove=cn,wn.mouseup=vn,wn.dblclick=yn,wn.setSeries=(e,t,n,o)=>{-1!=(n=(0,Cn.match[2])(r,t,n))&&qt(n,o,!0,!1)},Ae.show&&(te(Wa,m,gn),te(Ya,m,cn),te(Ka,m,(e=>{Me(e),sn(!1)})),te(Za,m,(function(e,t,n,r,o,a,i){if(Ae._lock)return;Me(e);let l=jt;if(jt){let e,t,n=!0,r=!0,o=10;0==N.ori?(e=Ht,t=Vt):(e=Vt,t=Ht),e&&t&&(n=Tt<=o||Tt>=ae-o,r=$t<=o||$t>=ie-o),e&&n&&(Tt=Tt{e.call(null,r,t,n)}))}(e.plugins||[]).forEach((e=>{for(let t in e.hooks)kn[t]=(kn[t]||[]).concat(e.hooks[t])}));const Sn=(e,t,n)=>n,Cn=wl({key:null,setSeries:!1,filters:{pub:Xi,sub:Xi},scales:[C,y[1]?y[1].scale:null],match:[el,el,Sn],values:[null,null]},Ae.sync);2==Cn.match.length&&Cn.match.push(Sn),Ae.sync=Cn;const An=Cn.key,En=Vs(An);function Mn(e,t,n,r,o,a,i){Cn.filters.pub(e,t,n,r,o,a,i)&&En.pub(e,t,n,r,o,a,i)}function Nn(){xn("init",e,t),ot(t||e.data,!1),D[C]?It(C,D[C]):at(),we=Bt.show&&(Bt.width>0||Bt.height>0),be=ke=!0,xe(e.width,e.height)}return En.sub(r),r.pub=function(e,t,n,r,o,a,i){Cn.filters.sub(e,t,n,r,o,a,i)&&wn[e](null,t,n,r,o,a,i)},r.destroy=function(){En.unsub(r),fc.delete(r),ee.clear(),bi(Ja,ni,bn),u.remove(),B?.remove(),xn("destroy")},y.forEach(ze),k.forEach((function(e,t){if(e._show=e.show,e.show){let n=e.side%2,o=x[e.scale];null==o&&(e.scale=n?y[1].scale:C,o=x[e.scale]);let a=o.time;e.size=Zi(e.size),e.space=Zi(e.space),e.rotate=Zi(e.rotate),pl(e.incrs)&&e.incrs.forEach((e=>{!ll.has(e)&&ll.set(e,sl(e))})),e.incrs=Zi(e.incrs||(2==o.distr?Il:a?1==v?Ql:es:jl)),e.splits=Zi(e.splits||(a&&1==o.distr?R:3==o.distr?xs:4==o.distr?Ss:ks)),e.stroke=Zi(e.stroke),e.grid.stroke=Zi(e.grid.stroke),e.ticks.stroke=Zi(e.ticks.stroke),e.border.stroke=Zi(e.border.stroke);let i=e.values;e.values=pl(i)&&!pl(i[0])?Zi(i):a?pl(i)?os(O,rs(i,L)):ml(i)?function(e,t){let n=Pl(t);return(t,r,o,a,i)=>r.map((t=>n(e(t))))}(O,i):i||z:i||ws,e.filter=Zi(e.filter||(o.distr>=3&&10==o.log?Ts:3==o.distr&&2==o.log?$s:Qi)),e.font=Mc(e.font),e.labelFont=Mc(e.labelFont),e._size=e.size(r,null,t,0),e._space=e._rotate=e._incrs=e._found=e._splits=e._values=null,e._size>0&&(Ie[t]=!0,e._el=ui("u-axis",p))}})),n?n instanceof HTMLElement?(n.appendChild(u),Nn()):n(r,Nn):Nn(),r}Tc.assign=wl,Tc.fmtNum=Pi,Tc.rangeNum=Mi,Tc.rangeLog=xi,Tc.rangeAsinh=Si,Tc.orient=Bs,Tc.pxRatio=oi,Tc.join=function(e,t){if(function(e){let t=e[0][0],n=t.length;for(let r=1;r1&&void 0!==arguments[1]?arguments[1]:100;const n=e.length;if(n<=1)return!0;let r=0,o=n-1;for(;r<=o&&null==e[r];)r++;for(;o>=r&&null==e[o];)o--;if(o<=r)return!0;const a=Fi(1,Ri((o-r+1)/t));for(let i=e[r],l=r+a;l<=o;l+=a){const t=e[l];if(null!=t){if(t<=i)return!1;i=t}}return!0}(t[0])||(t=function(e){let t=e[0],n=t.length,r=Array(n);for(let a=0;at[e]-t[n]));let o=[];for(let a=0;ae-t))],o=r[0].length,a=new Map;for(let i=0;iBs(e,a,((s,c,u,d,h,p,f,m,_,g,v)=>{let y=s.pxRound,{left:b,width:w}=e.bbox,k=e=>y(p(e,d,g,m)),x=e=>y(f(e,h,v,_)),S=0==d.ori?Xs:ec;const C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},A=C.stroke,E=d.dir*(0==d.ori?1:-1);i=ki(u,i,l,1),l=ki(u,i,l,-1);let M=x(u[1==E?i:l]),N=k(c[1==E?i:l]),T=N,$=N;o&&-1==t&&($=b,S(A,$,M)),S(A,N,M);for(let e=1==E?i:l;e>=i&&e<=l;e+=E){let n=u[e];if(null==n)continue;let r=k(c[e]),o=x(n);1==t?S(A,r,M):S(A,T,o),S(A,r,o),M=o,T=r}let P=T;o&&1==t&&(P=b+w,S(A,P,M));let[D,O]=Us(e,a);if(null!=s.fill||0!=D){let t=C.fill=new Path2D(A),n=x(s.fillTo(e,a,s.min,s.max,D));S(t,P,n),S(t,$,n)}if(!s.spanGaps){let o=[];o.push(...Ks(c,u,i,l,E,k,r));let h=s.width*oi/2,p=n||1==t?h:-h,f=n||-1==t?-h:h;o.forEach((e=>{e[0]+=p,e[1]+=f})),C.gaps=o=s.gaps(e,a,i,l,o),C.clip=qs(o,d.ori,m,_,g,v)}return 0!=O&&(C.band=2==O?[Ws(e,a,i,l,A,-1),Ws(e,a,i,l,A,1)]:Ws(e,a,i,l,A,O)),C}))},e.bars=function(e){const t=Ni((e=e||ul).size,[.6,Wi,1]),n=e.align||0,r=e.gap||0;let o=e.radius;o=null==o?[0,0]:"number"==typeof o?[o,0]:o;const a=Zi(o),i=1-t[0],l=Ni(t[1],Wi),s=Ni(t[2],1),c=Ni(e.disp,ul),u=Ni(e.each,(e=>{})),{fill:d,stroke:h}=c;return(e,t,o,p)=>Bs(e,t,((f,m,_,g,v,y,b,w,k,x,S)=>{let C,A,E=f.pxRound,M=n,N=r*oi,T=l*oi,$=s*oi;0==g.ori?[C,A]=a(e,t):[A,C]=a(e,t);const P=g.dir*(0==g.ori?1:-1);let D,O,L,R=0==g.ori?tc:nc,z=0==g.ori?u:(e,t,n,r,o,a,i)=>{u(e,t,n,o,r,i,a)},I=Ni(e.bands,dl).find((e=>e.series[0]==t)),j=null!=I?I.dir:0,F=f.fillTo(e,t,f.min,f.max,j),H=E(b(F,v,S,k)),V=x,B=E(f.width*oi),U=!1,Y=null,W=null,q=null,K=null;null==d||0!=B&&null==h||(U=!0,Y=d.values(e,t,o,p),W=new Map,new Set(Y).forEach((e=>{null!=e&&W.set(e,new Path2D)})),B>0&&(q=h.values(e,t,o,p),K=new Map,new Set(q).forEach((e=>{null!=e&&K.set(e,new Path2D)}))));let{x0:Z,size:G}=c;if(null!=Z&&null!=G){M=1,m=Z.values(e,t,o,p),2==Z.unit&&(m=m.map((t=>e.posToVal(w+t*x,g.key,!0))));let n=G.values(e,t,o,p);O=2==G.unit?n[0]*x:y(n[0],g,x,w)-y(0,g,x,w),V=hc(m,_,y,g,x,w,V),L=V-O+N}else V=hc(m,_,y,g,x,w,V),L=V*i+N,O=V-L;L<1&&(L=0),B>=O/2&&(B=0),L<5&&(E=Gi);let Q=L>0;O=E(Ki(V-L-(Q?B:0),$,T)),D=(0==M?O/2:M==P?0:O)-M*P*((0==M?N/2:0)+(Q?B/2:0));const J={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},X=U?null:new Path2D;let ee=null;if(null!=I)ee=e.data[I.series[1]];else{let{y0:n,y1:r}=c;null!=n&&null!=r&&(_=r.values(e,t,o,p),ee=n.values(e,t,o,p))}let te=C*O,ne=A*O;for(let n=1==P?o:p;n>=o&&n<=p;n+=P){let r=_[n];if(null==r)continue;if(null!=ee){var re;let e=null!==(re=ee[n])&&void 0!==re?re:0;if(r-e==0)continue;H=b(e,v,S,k)}let o=y(2!=g.distr||null!=c?m[n]:n,g,x,w),a=b(Ni(r,F),v,S,k),i=E(o-D),l=E(Fi(a,H)),s=E(ji(a,H)),u=l-s;if(null!=r){let o=r<0?ne:te,a=r<0?te:ne;U?(B>0&&null!=q[n]&&R(K.get(q[n]),i,s+Ri(B/2),O,Fi(0,u-B),o,a),null!=Y[n]&&R(W.get(Y[n]),i,s+Ri(B/2),O,Fi(0,u-B),o,a)):R(X,i,s+Ri(B/2),O,Fi(0,u-B),o,a),z(e,t,n,i-B/2,s,O+B,u)}}if(B>0)J.stroke=U?K:X;else if(!U){var oe;J._fill=0==f.width?f._fill:null!==(oe=f._stroke)&&void 0!==oe?oe:f._fill,J.width=0}return J.fill=U?W:X,J}))},e.spline=function(e){return function(e,t){const n=Ni(t?.alignGaps,0);return(t,r,o,a)=>Bs(t,r,((i,l,s,c,u,d,h,p,f,m,_)=>{let g,v,y,b=i.pxRound,w=e=>b(d(e,c,m,p)),k=e=>b(h(e,u,_,f));0==c.ori?(g=Qs,y=Xs,v=ac):(g=Js,y=ec,v=ic);const x=c.dir*(0==c.ori?1:-1);o=ki(s,o,a,1),a=ki(s,o,a,-1);let S=w(l[1==x?o:a]),C=S,A=[],E=[];for(let e=1==x?o:a;e>=o&&e<=a;e+=x)if(null!=s[e]){let t=w(l[e]);A.push(C=t),E.push(k(s[e]))}const M={stroke:e(A,E,g,y,v,b),fill:null,clip:null,band:null,gaps:null,flags:1},N=M.stroke;let[T,$]=Us(t,r);if(null!=i.fill||0!=T){let e=M.fill=new Path2D(N),n=k(i.fillTo(t,r,i.min,i.max,T));y(e,C,n),y(e,S,n)}if(!i.spanGaps){let e=[];e.push(...Ks(l,s,o,a,x,w,n)),M.gaps=e=i.gaps(t,r,o,a,e),M.clip=qs(e,c.ori,p,f,m,_)}return 0!=$&&(M.band=2==$?[Ws(t,r,o,a,N,-1),Ws(t,r,o,a,N,1)]:Ws(t,r,o,a,N,$)),M}))}(pc,e)}}const $c=(e,t,n)=>{if(void 0===e||null===e)return"";n=n||0,t=t||0;const r=Math.abs(n-t);if(isNaN(r)||0==r)return Math.abs(e)>=1e3?e.toLocaleString("en-US"):e.toString();let o=3+Math.floor(1+Math.log10(Math.max(Math.abs(t),Math.abs(n)))-Math.log10(r));return(isNaN(o)||o>20)&&(o=20),e.toLocaleString("en-US",{minimumSignificantDigits:1,maximumSignificantDigits:o})},Pc=[[31536e3,"{YYYY}",null,null,null,null,null,null,1],[2419200,"{MMM}","\n{YYYY}",null,null,null,null,null,1],[86400,"{MM}-{DD}","\n{YYYY}",null,null,null,null,null,1],[3600,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[60,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[1,"{HH}:{mm}:{ss}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD} {HH}:{mm}",null,null,null,1],[.001,":{ss}.{fff}","\n{YYYY}-{MM}-{DD} {HH}:{mm}",null,"\n{MM}-{DD} {HH}:{mm}",null,"\n{HH}:{mm}",null,1]],Dc=(e,t)=>Array.from(new Set(e.map((e=>e.scale)))).map((e=>{const n="10px Arial",r=it("color-text"),o={scale:e,show:!0,size:Oc,stroke:r,font:n,values:(e,n)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=t[0],o=t[t.length-1];return n?t.map((e=>`${$c(e,r,o)} ${n}`)):t.map((e=>$c(e,r,o)))}(e,n,t)};return e?Number(e)%2||"y"===e?o:{...o,side:1}:{space:80,values:Pc,stroke:r,font:n}})),Oc=(e,t,n,r)=>{var o;const a=e.axes[n];if(r>1)return a._size||60;let i=6+((null===a||void 0===a||null===(o=a.ticks)||void 0===o?void 0:o.size)||0)+(a.gap||0);const l=(null!==t&&void 0!==t?t:[]).reduce(((e,t)=>(null===t||void 0===t?void 0:t.length)>e.length?t:e),"");return""!=l&&(i+=((e,t)=>{const n=document.createElement("span");n.innerText=e,n.style.cssText=`position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ${t}`,document.body.appendChild(n);const r=n.offsetWidth;return n.remove(),r})(l,"10px Arial")),Math.ceil(i)},Lc=(((e,t,n)=>{const r=[];for(let o=0;oMath.round(e))).join(", "))}r.map((e=>`rgb(${e})`))})([246,226,219],[127,39,4],16),e=>{for(let t=e.series.length-1;t>=0;t--)t&&e.delSeries(t)}),Rc=e=>{Lc(e),(e=>{Object.keys(e.hooks).forEach((t=>{e.hooks[t]=[]}))})(e),e.setData([])},zc=e=>t=>{const n=t.posToVal(t.select.left,"x"),r=t.posToVal(t.select.left+t.select.width,"x");e({min:n,max:r})};function Ic(e){return`rgba(${Cr(Ar[e])}, 0.05)`}let jc=function(e){return e.BAR="Bars",e.LINE="Lines",e.LINE_STEPPED="Stepped lines",e.POINTS="Points",e}({});const Fc=(e,t,n,r)=>{var o,a;const i=e.under.clientWidth/100-1,l=null===Tc||void 0===Tc||null===(o=Tc.paths)||void 0===o||null===(a=o.bars)||void 0===a?void 0:a.call(o,{size:[.96,i]});return l?l(e,t,n,r):null},Hc=(e,t,n,r)=>{var o,a;const i=null===Tc||void 0===Tc||null===(o=Tc.paths)||void 0===o||null===(a=o.stepped)||void 0===a?void 0:a.call(o,{align:1});return i?i(e,t,n,r):null},Vc=e=>{switch(e){case jc.BAR:return Fc;case jc.LINE_STEPPED:return Hc;default:return}},Bc=["color-log-hits-bar-1","color-log-hits-bar-2","color-log-hits-bar-3","color-log-hits-bar-4","color-log-hits-bar-5"],Uc={[jc.BAR]:1,[jc.LINE_STEPPED]:2,[jc.LINE]:1.2,[jc.POINTS]:0},Yc=e=>{let{data:n,logHits:r,xRange:a,bands:i,containerSize:l,onReadyChart:s,setPlotScale:c,graphOptions:u}=e;const{isDarkTheme:d}=gt(),[h,p]=(0,t.useState)(-1),f=e=>{var t;const n=null!==(t=e.cursor.idx)&&void 0!==t?t:-1;p(n)},m=(0,t.useMemo)((()=>{let e=0;return n.map(((t,n)=>{var o;if(0===n)return{};const a=Object.values((null===r||void 0===r||null===(o=r[n-1])||void 0===o?void 0:o.fields)||{}).map((e=>e||'""')).join(", "),i=it(a?Bc[e]:"color-log-hits-bar-0");return a&&e++,{label:a||"other",width:Uc[u.graphStyle],spanGaps:!0,stroke:i,fill:u.fill?i+"80":"",paths:Vc(u.graphStyle)}}))}),[d,n,u]),_=(0,t.useMemo)((()=>({series:m,bands:i,width:l.width||window.innerWidth/2,height:l.height||200,cursor:{points:{width:(e,t,n)=>n/4,size:(e,t)=>{var n,r,o;return 1.5*((null===(n=e.series)||void 0===n||null===(r=n[t])||void 0===r||null===(o=r.points)||void 0===o?void 0:o.size)||1)},stroke:(e,t)=>{var n;return`${(null===m||void 0===m||null===(n=m[t])||void 0===n?void 0:n.stroke)||"#ffffff"}`},fill:()=>"#ffffff"}},scales:{x:{time:!0,range:()=>[a.min,a.max]}},hooks:{drawSeries:[],ready:[s],setCursor:[f],setSelect:[zc(c)],destroy:[Rc]},legend:{show:!1},axes:Dc([{},{scale:"y"}]),tzDate:e=>o()(Rt(It(e))).local().toDate()})),[d,m,i]);return{options:_,series:m,focusDataIdx:h}},Wc=e=>o()(1e3*e).tz().format(wt),qc=e=>{let{data:n,focusDataIdx:r,uPlotInst:o}=e;const a=(0,t.useRef)(null),i=(0,t.useMemo)((()=>{var e,t;const a=(null===o||void 0===o?void 0:o.series)||[],[i,...l]=n.map((e=>e[r]||0)),s=i+(n[0][1]-n[0][0]),c=l.map(((e,t)=>{var n;const r=a[t+1],o=null===r||void 0===r||null===(n=r.stroke)||void 0===n?void 0:n.call(r);return{label:(null===r||void 0===r?void 0:r.label)||"other",stroke:o,value:e,show:null===r||void 0===r?void 0:r.show}})).filter((e=>e.value>0&&e.show)).sort(((e,t)=>t.value-e.value));return{point:{top:c[0]&&(null===o||void 0===o||null===(e=o.valToPos)||void 0===e?void 0:e.call(o,c[0].value,"y"))||0,left:(null===o||void 0===o||null===(t=o.valToPos)||void 0===t?void 0:t.call(o,i,"x"))||0},values:c,total:c.reduce(((e,t)=>e+t.value),0),timestamp:`${Wc(i)} - ${Wc(s)}`}}),[r,o,n]),l=(0,t.useMemo)((()=>{if(!o||!i.total||!a.current)return;const{top:e,left:t}=i.point,n=parseFloat(o.over.style.left),r=parseFloat(o.over.style.top),{width:l,height:s}=o.over.getBoundingClientRect(),{width:c,height:u}=a.current.getBoundingClientRect(),d={top:e+r+50-(e+u>=s?u+100:0),left:t+n+50-(t+c>=l?c+100:0)};return d.left<0&&(d.left=20),d.top<0&&(d.top=20),d}),[i,o,a.current]);return mt("div",{className:Qn()({"vm-chart-tooltip":!0,"vm-chart-tooltip_hits":!0,"vm-bar-hits-tooltip":!0,"vm-bar-hits-tooltip_visible":-1!==r&&i.values.length}),ref:a,style:l,children:[mt("div",{children:i.values.map(((e,t)=>mt("div",{className:"vm-chart-tooltip-data",children:[mt("span",{className:"vm-chart-tooltip-data__marker",style:{background:e.stroke}}),mt("p",{children:[e.label,": ",mt("b",{children:e.value})]})]},t)))}),i.values.length>1&&mt("div",{className:"vm-chart-tooltip-data",children:mt("p",{children:["Total records: ",mt("b",{children:i.total})]})}),mt("div",{className:"vm-chart-tooltip-header",children:mt("div",{className:"vm-chart-tooltip-header__title",children:i.timestamp})})]})},Kc=e=>{let{period:n,setPeriod:r}=e;const[a,i]=(0,t.useState)({min:n.start,max:n.end});return(0,t.useEffect)((()=>{i({min:n.start,max:n.end})}),[n]),{xRange:a,setPlotScale:e=>{let{min:t,max:n}=e;const a=1e3*(n-t);aAt||r({from:o()(1e3*t).toDate(),to:o()(1e3*n).toDate()})}}},Zc=e=>(e=>e instanceof MouseEvent)(e)?e.clientX:e.touches[0].clientX,Gc=e=>{let{dragSpeed:n=.85,setPanning:r,setPlotScale:o}=e;const a=(0,t.useRef)({leftStart:0,xUnitsPerPx:0,scXMin:0,scXMax:0}),i=e=>{e.preventDefault();const t=Zc(e),{leftStart:r,xUnitsPerPx:i,scXMin:l,scXMax:s}=a.current,c=i*((t-r)*n);o({min:l-c,max:s-c})},l=()=>{r(!1),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",l),document.removeEventListener("touchmove",i),document.removeEventListener("touchend",l)};return e=>{let{e:t,u:n}=e;t.preventDefault(),r(!0),a.current={leftStart:Zc(t),xUnitsPerPx:n.posToVal(1,"x")-n.posToVal(0,"x"),scXMin:n.scales.x.min||0,scXMax:n.scales.x.max||0},document.addEventListener("mousemove",i),document.addEventListener("mouseup",l),document.addEventListener("touchmove",i),document.addEventListener("touchend",l)}},Qc=e=>{const[n,r]=(0,t.useState)(!1),o=Gc({dragSpeed:.9,setPanning:r,setPlotScale:e});return{onReadyChart:t=>{const n=e=>{const n=e instanceof MouseEvent&&(e=>{const{ctrlKey:t,metaKey:n,button:r}=e;return 0===r&&(t||n)})(e),r=window.TouchEvent&&e instanceof TouchEvent&&e.touches.length>1;(n||r)&&o({u:t,e:e})};t.over.addEventListener("mousedown",n),t.over.addEventListener("touchstart",n),t.over.addEventListener("wheel",(n=>{if(!n.ctrlKey&&!n.metaKey)return;n.preventDefault();const{width:r}=t.over.getBoundingClientRect(),o=t.cursor.left&&t.cursor.left>0?t.cursor.left:0,a=t.posToVal(o,"x"),i=(t.scales.x.max||0)-(t.scales.x.min||0),l=n.deltaY<0?.9*i:i/.9,s=a-o/r*l,c=s+l;t.batch((()=>e({min:s,max:c})))}))},isPanning:n}},Jc=e=>{const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)},Xc=e=>{let{uPlotInst:n,xRange:r,setPlotScale:o}=e;const[a,i]=(0,t.useState)(0),l=(0,t.useCallback)((e=>{const{target:t,ctrlKey:a,metaKey:i,key:l}=e,s=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;if(!n||s)return;const c="+"===l||"="===l;if(("-"===l||c)&&!(a||i)){e.preventDefault();const t=(r.max-r.min)/10*(c?1:-1);o({min:r.min+t,max:r.max-t})}}),[n,r]),s=(0,t.useCallback)((e=>{if(!n||2!==e.touches.length)return;e.preventDefault();const t=Jc(e.touches),i=a-t,l=n.scales.x.max||r.max,s=n.scales.x.min||r.min,c=(l-s)/50*(i>0?-1:1);n.batch((()=>o({min:s+c,max:l-c})))}),[n,a,r]);return er("keydown",l),er("touchmove",s),er("touchstart",(e=>{2===e.touches.length&&(e.preventDefault(),i(Jc(e.touches)))})),null},eu=e=>{let{onChange:n}=e;const[r,o]=je(),a=(0,t.useRef)(null),{value:i,toggle:l,setFalse:s}=Fr(!1),[c,u]=Lr(jc.LINE_STEPPED,"graph"),[d,h]=Lr(!1,"stacked"),[p,f]=Lr(!1,"fill"),[m,_]=Lr(!1,"hide_chart"),g=(0,t.useMemo)((()=>({graphStyle:c,stacked:d,fill:p,hideChart:m})),[c,d,p,m]);return(0,t.useEffect)((()=>{n(g)}),[g]),mt("div",{className:"vm-bar-hits-options",children:[mt(Ir,{title:m?"Show chart and resume hits updates":"Hide chart and pause hits updates",children:mt(Dr,{variant:"text",color:"primary",startIcon:mt(m?Dn:Pn,{}),onClick:()=>{_((e=>{const t=!e;return t?r.set("hide_chart","true"):r.delete("hide_chart"),o(r),t}))},ariaLabel:"settings"})}),mt("div",{ref:a,children:mt(Ir,{title:"Graph settings",children:mt(Dr,{variant:"text",color:"primary",startIcon:mt(pn,{}),onClick:l,ariaLabel:"settings"})})}),mt(Xr,{open:i,placement:"bottom-right",onClose:s,buttonRef:a,title:"Graph settings",children:mt("div",{className:"vm-bar-hits-options-settings",children:[mt("div",{className:"vm-bar-hits-options-settings-item vm-bar-hits-options-settings-item_list",children:[mt("p",{className:"vm-bar-hits-options-settings-item__title",children:"Graph style:"}),Object.values(jc).map((e=>{return mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_active":c===e}),onClick:(t=e,()=>{u(t),r.set("graph",t),o(r)}),children:e},e);var t}))]}),mt("div",{className:"vm-bar-hits-options-settings-item",children:mt(jr,{label:"Stacked",value:d,onChange:e=>{h(e),e?r.set("stacked","true"):r.delete("stacked"),o(r)}})}),mt("div",{className:"vm-bar-hits-options-settings-item",children:mt(jr,{label:"Fill",value:p,onChange:e=>{f(e),e?r.set("fill","true"):r.delete("fill"),o(r)}})})]})})]})};const tu=function(e,t){const n=[];let r=[];const o=e[0].length,a=Array(o);for(let i=0;ia[t]+=+(null!==e&&void 0!==e?e:0))));for(let i=1;in>i&&!t(n))),i]});return r=r.filter((e=>e.series[1]>-1)),{data:[e[0]].concat(n),bands:r}},nu=e=>{let{uPlotInst:n,onApplyFilter:r}=e;const[o,a]=(0,t.useState)([]),[i,l]=(0,t.useState)([]),s=(0,t.useCallback)((()=>{const e=n.series.filter((e=>"x"!==e.scale));a(e),l(e.map((e=>eo(e.label||""))))}),[n]),c=e=>t=>{(t.metaKey||t.ctrlKey)&&(r(`{${e}}`||""),s(),n.redraw())};return(0,t.useEffect)(s,[n]),mt("div",{className:"vm-bar-hits-legend",children:o.map(((e,t)=>{var r,o;return mt(Ir,{title:mt("ul",{className:"vm-bar-hits-legend-info",children:[mt("li",{children:["Click to ",e.show?"hide":"show"," the _stream."]}),mt("li",{children:[yr()?"Cmd":"Ctrl"," + Click to filter by the _stream."]})]}),children:mt("div",{className:Qn()({"vm-bar-hits-legend-item":!0,"vm-bar-hits-legend-item_hide":!e.show}),onClick:(o=e,e=>{e.metaKey||e.ctrlKey||(o.show=!o.show,s(),n.redraw())}),children:[mt("div",{className:"vm-bar-hits-legend-item__marker",style:{backgroundColor:`${null===e||void 0===e||null===(r=e.stroke)||void 0===r?void 0:r.call(e)}`}}),mt("div",{className:"vm-bar-hits-legend-item-pairs",children:i[t].map((e=>mt("span",{className:"vm-bar-hits-legend-item-pairs__value",onClick:c(e),children:e},e)))})]})},e.label)}))})},ru=e=>{let{logHits:n,data:r,period:o,setPeriod:a,onApplyFilter:i}=e;const[l,s]=Oa(),c=(0,t.useRef)(null),[u,d]=(0,t.useState)(),[h,p]=(0,t.useState)({graphStyle:jc.LINE_STEPPED,stacked:!1,fill:!1,hideChart:!1}),{xRange:f,setPlotScale:m}=Kc({period:o,setPeriod:a}),{onReadyChart:_,isPanning:g}=Qc(m);Xc({uPlotInst:u,xRange:f,setPlotScale:m});const v=(0,t.useMemo)((()=>r.every((e=>0===e.length))),[r]),{data:y,bands:b}=(0,t.useMemo)((()=>h.stacked?tu(r,(()=>!1)):{data:r,bands:[]}),[h,r]),{options:w,series:k,focusDataIdx:x}=Yc({data:y,logHits:n,bands:b,xRange:f,containerSize:s,onReadyChart:_,setPlotScale:m,graphOptions:h});return(0,t.useEffect)((()=>{u&&(Lc(u),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(((t,r)=>{t.label&&(t.spanGaps=n),r&&e.addSeries(t)}))}(u,k,!0),((e,t)=>{if(e.delBand(),t.length<2)return;const n=t.map(((e,t)=>({...e,index:t}))),r=n.filter((e=>e.forecast===tt.yhatUpper)),o=n.filter((e=>e.forecast===tt.yhatLower)),a=r.map((e=>{const t=o.find((t=>t.forecastGroup===e.forecastGroup));return t?{series:[e.index,t.index],fill:Ic(tt.yhatUpper)}:null})).filter((e=>null!==e));a.length&&a.forEach((t=>{e.addBand(t)}))})(u,k),u.redraw())}),[k]),(0,t.useEffect)((()=>{if(!c.current)return;const e=new Tc(w,y,c.current);return d(e),()=>e.destroy()}),[c.current,w]),(0,t.useEffect)((()=>{u&&(u.scales.x.range=()=>[f.min,f.max],u.redraw())}),[f]),(0,t.useEffect)((()=>{u&&(u.setSize(s),u.redraw())}),[s]),(0,t.useEffect)((()=>{u&&(u.setData(y),u.redraw())}),[y]),mt("div",{className:Qn()({"vm-bar-hits-chart__wrapper":!0,"vm-bar-hits-chart__wrapper_hidden":h.hideChart}),children:[!h.hideChart&&mt("div",{className:Qn()({"vm-bar-hits-chart":!0,"vm-bar-hits-chart_panning":g}),ref:l,children:[mt("div",{className:"vm-line-chart__u-plot",ref:c}),mt(qc,{uPlotInst:u,data:r,focusDataIdx:x})]}),mt(eu,{onChange:p}),u&&!v&&!h.hideChart&&mt(nu,{uPlotInst:u,onApplyFilter:i})]})},ou=e=>{let{logHits:n,period:r,error:a,isLoading:i,onApplyFilter:l}=e;const{isMobile:s}=br(),c=Qt(),[u]=je(),d=(0,t.useMemo)((()=>u.get("hide_chart")),[u]),h=(0,t.useCallback)((e=>{const t=[],{start:n,end:o,step:a}=to(r),i=Math.ceil(n.diff(e,"milliseconds")/a);let l=e.add(i*a,"milliseconds");l.isBefore(n)&&(l=n.clone());const s=Math.floor(o.diff(l,"milliseconds")/a);for(let r=0;r<=s;r++)t.push(l.add(r*a,"milliseconds").unix());return t}),[r]),p=(0,t.useMemo)((()=>{if(!n.length)return[[],[]];const e=h(o()(n[0].timestamps[0])),t=((e,t)=>e.map((e=>{const n=new Map;return e.timestamps.forEach(((t,r)=>{const a=o()(t).unix();n.set(a,e.values[r]||null)})),t.map((e=>n.get(e)||null))})))(n,e);return[e,...t]}),[n]),f=(0,t.useMemo)((()=>{const e=p.every((e=>0===e.length)),t=0===p[0].length,n=0===p[1].length;return d?"Chart hidden. Hits updates paused.":e?"No logs volume available\nNo volume information available for the current queries and time range.":t?"No timestamp information available for the current queries and time range.":n?"No value information available for the current queries and time range.":""}),[p,d]);return mt("section",{className:Qn()({"vm-explore-logs-chart":!0,"vm-block":!0,"vm-block_mobile":s}),children:[i&&mt(ha,{}),!a&&f&&mt("div",{className:"vm-explore-logs-chart__empty",children:mt(kr,{variant:"info",children:f})}),a&&f&&mt("div",{className:"vm-explore-logs-chart__empty",children:mt(kr,{variant:"error",children:a})}),p&&mt(ru,{logHits:n,data:p,period:r,setPeriod:e=>{let{from:t,to:n}=e;c({type:"SET_PERIOD",payload:{from:t,to:n}})},onApplyFilter:l})]})},au=(e,n)=>{const[r]=je(),[o,a]=(0,t.useState)([]),[i,l]=(0,t.useState)([]),[s,c]=(0,t.useState)(),u=(0,t.useRef)(new AbortController),d=(0,t.useMemo)((()=>(e=>`${e}/select/logsql/hits`)(e)),[e]),h=(e,t)=>(e.total=(e.total||0)+(t.total||0),t.timestamps.forEach(((n,r)=>{const o=e.timestamps.findIndex((e=>e===n));-1===o?(e.timestamps.push(n),e.values.push(t.values[r])):e.values[o]+=t.values[r]})),e),p=(0,t.useCallback)((async e=>{u.current.abort(),u.current=new AbortController;const{signal:t}=u.current,o=Date.now();l((e=>({...e,[o]:!0}))),c(void 0);try{const i=((e,t,n)=>{const{start:o,end:a,step:i}=to(t);return{signal:n,method:"POST",headers:{AccountID:r.get("accountID")||"0",ProjectID:r.get("projectID")||"0"},body:new URLSearchParams({query:e.trim(),step:`${i}ms`,start:o.toISOString(),end:a.toISOString(),field:"_stream"})}})(n,e,t),s=await fetch(d,i);if(!s.ok||!s.body){const e=await s.text();return c(e),a([]),void l((e=>({...e,[o]:!1})))}const u=await s.json(),p=null===u||void 0===u?void 0:u.hits;if(!p){c("Error: No 'hits' field in response")}a(p?(e=>{const t=e.sort(((e,t)=>(t.total||0)-(e.total||0))),n=[],r=t.slice(5).reduce(h,{fields:{},timestamps:[],values:[],total:0});r.total&&n.push(r);const o=t.slice(0,5);return o.length&&n.push(...o),n})(p):[])}catch(Id){Id instanceof Error&&"AbortError"!==Id.name&&(c(String(Id)),console.error(Id),a([]))}l((e=>({...e,[o]:!1})))}),[d,n,r]);return{logHits:o,isLoading:Object.values(i).some((e=>e)),error:s,fetchLogHits:p,abortController:u.current}},iu=Number(We("LOGS_LIMIT")),lu=isNaN(iu)?50:iu,su=()=>{const{serverUrl:e}=gt(),{duration:n,relativeTime:r,period:o}=Gt(),{setSearchParamsFromKeys:a}=Rr(),[i]=je(),l=(0,t.useMemo)((()=>i.get("hide_chart")),[i]),[s,c]=Lr(lu,"limit"),[u,d]=Lr("*","query"),[h,p]=(0,t.useState)(!1),[f,m]=(0,t.useState)(o),[_,g]=(0,t.useState)(""),{logs:v,isLoading:y,error:b,fetchLogs:w,abortController:k}=_a(e,u,s),{fetchLogHits:x,...S}=au(e,u),C=(0,t.useCallback)((()=>{const e=Ft.find((e=>e.id===r));if(!e)return o;const{duration:t,until:n}=e;return Ot(t,n())}),[o,r]),A=()=>{if(!u)return void g(rt.validQuery);g("");const e=C();m(e),w(e).then((t=>{t&&!l&&x(e)})).catch((e=>e)),a({query:u,"g0.range_input":n,"g0.end_input":e.date,"g0.relative_time":r||"none"})};return(0,t.useEffect)((()=>{u&&A()}),[o]),(0,t.useEffect)((()=>{h&&(A(),p(!1))}),[u,h]),(0,t.useEffect)((()=>{!l&&x(f)}),[l]),mt("div",{className:"vm-explore-logs",children:[mt(Da,{query:u,error:_,limit:s,onChange:d,onChangeLimit:e=>{c(e),a({limit:e}),Ye("LOGS_LIMIT",`${e}`)},onRun:()=>{y||S.isLoading?(k.abort&&k.abort(),S.abortController.abort&&S.abortController.abort()):A()},isLoading:y||S.isLoading}),b&&mt(kr,{variant:"error",children:b}),!b&&mt(ou,{...S,query:u,period:f,onApplyFilter:e=>{d((t=>`_stream: ${"other"===e?"{}":e} AND (${t})`)),p(!0)}}),mt(ma,{data:v,isLoading:y})]})},cu={home:"/",metrics:"/metrics",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries",trace:"/trace",withTemplate:"/expand-with-exprs",relabel:"/relabeling",logs:"/logs",activeQueries:"/active-queries",queryAnalyzer:"/query-analyzer",icons:"/icons",anomaly:"/anomaly",query:"/query",downsamplingDebug:"/downsampling-filters-debug",retentionDebug:"/retention-filters-debug"},{REACT_APP_TYPE:uu}={REACT_APP_TYPE:"logs"},du=uu===Ue.logs,hu={header:{tenant:!0,stepControl:!du,timeSelector:!du,executionControls:!du}},pu={[cu.home]:{title:"Query",...hu},[cu.metrics]:{title:"Explore Prometheus metrics",header:{tenant:!0,stepControl:!0,timeSelector:!0}},[cu.cardinality]:{title:"Explore cardinality",header:{tenant:!0,cardinalityDatePicker:!0}},[cu.topQueries]:{title:"Top queries",header:{tenant:!0}},[cu.trace]:{title:"Trace analyzer",header:{}},[cu.queryAnalyzer]:{title:"Query analyzer",header:{}},[cu.dashboards]:{title:"Dashboards",...hu},[cu.withTemplate]:{title:"WITH templates",header:{}},[cu.relabel]:{title:"Metric relabel debug",header:{}},[cu.logs]:{title:"Logs Explorer",header:{}},[cu.activeQueries]:{title:"Active Queries",header:{}},[cu.icons]:{title:"Icons",header:{}},[cu.anomaly]:{title:"Anomaly exploration",...hu},[cu.query]:{title:"Query",...hu},[cu.downsamplingDebug]:{title:"Downsampling filters debug",header:{}},[cu.retentionDebug]:{title:"Retention filters debug",header:{}}},fu=cu;let mu=function(e){return e[e.internalLink=0]="internalLink",e[e.externalLink=1]="externalLink",e}({});const _u=(e,t)=>({label:"Alerts",value:`${e}/vmalert`,type:mu.externalLink,hide:!t}),gu=e=>[{value:fu.trace},{value:fu.queryAnalyzer},{value:fu.withTemplate},{value:fu.relabel},{value:fu.downsamplingDebug,hide:!e},{value:fu.retentionDebug,hide:!e}],vu=e=>{let{activeMenu:t,label:n,value:r,type:o,color:a}=e;return o===mu.externalLink?mt("a",{className:Qn()({"vm-header-nav-item":!0,"vm-header-nav-item_active":t===r}),style:{color:a},href:r,target:"_blank",rel:"noreferrer",children:n}):mt(Le,{className:Qn()({"vm-header-nav-item":!0,"vm-header-nav-item_active":t===r}),style:{color:a},to:r,children:n})},yu=e=>{let{activeMenu:n,label:r,color:o,background:a,submenu:i,direction:l}=e;const{pathname:s}=ne(),[c,u]=(0,t.useState)(null),d=(0,t.useRef)(null),{value:h,setFalse:p,setTrue:f}=Fr(!1),m=()=>{c&&clearTimeout(c);const e=setTimeout(p,300);u(e)};return(0,t.useEffect)((()=>{p()}),[s]),"column"===l?mt(pt.FK,{children:i.map((e=>mt(vu,{activeMenu:n,value:e.value||"",label:e.label||"",type:e.type||mu.internalLink},e.value)))}):mt("div",{className:Qn()({"vm-header-nav-item":!0,"vm-header-nav-item_sub":!0,"vm-header-nav-item_open":h,"vm-header-nav-item_active":i.find((e=>e.value===n))}),style:{color:o},onMouseEnter:()=>{f(),c&&clearTimeout(c)},onMouseLeave:m,ref:d,children:[r,mt(kn,{}),mt(Xr,{open:h,placement:"bottom-left",offset:{top:12,left:0},onClose:p,buttonRef:d,children:mt("div",{className:"vm-header-nav-item-submenu",style:{background:a},onMouseLeave:m,onMouseEnter:()=>{c&&clearTimeout(c)},children:i.map((e=>mt(vu,{activeMenu:n,value:e.value||"",label:e.label||"",color:o,type:e.type||mu.internalLink},e.value)))})})]})},bu=e=>e.filter((e=>!e.hide)).map((e=>{const t={...e};var n;t.value&&!t.label&&(t.label=(null===(n=pu[t.value])||void 0===n?void 0:n.title)||(e=>{try{return e.replace(/^\/+/,"").replace(/-/g," ").trim().replace(/^\w/,(e=>e.toUpperCase()))}catch(Id){return e}})(t.value));return t.submenu&&t.submenu.length>0&&(t.submenu=bu(t.submenu)),t})),wu=()=>{var e;const n=He(),{dashboardsSettings:r}=(0,t.useContext)(pr).state,{serverUrl:o,flags:a,appConfig:i}=gt(),l="enterprise"===(null===(e=i.license)||void 0===e?void 0:e.type),s=Boolean(a["vmalert.proxyURL"]),c=Boolean(!n&&r.length),u=(0,t.useMemo)((()=>({serverUrl:o,isEnterpriseLicense:l,showAlertLink:s,showPredefinedDashboards:c})),[o,l,s,c]),d=(0,t.useMemo)((()=>{switch("logs"){case Ue.logs:return[{label:pu[fu.logs].title,value:fu.home}];case Ue.anomaly:return[{label:pu[fu.anomaly].title,value:fu.home}];default:return(e=>{let{serverUrl:t,isEnterpriseLicense:n,showPredefinedDashboards:r,showAlertLink:o}=e;return[{value:fu.home},{label:"Explore",submenu:[{value:fu.metrics},{value:fu.cardinality},{value:fu.topQueries},{value:fu.activeQueries}]},{label:"Tools",submenu:gu(n)},{value:fu.dashboards,hide:!r},_u(t,o)]})(u)}}),[u]);return bu(d)},ku=e=>{let{color:n,background:r,direction:o}=e;const{pathname:a}=ne(),[i,l]=(0,t.useState)(a),s=wu();return(0,t.useEffect)((()=>{l(a)}),[a]),mt("nav",{className:Qn()({"vm-header-nav":!0,[`vm-header-nav_${o}`]:o}),children:s.map((e=>e.submenu?mt(yu,{activeMenu:i,label:e.label||"",submenu:e.submenu,color:n,background:r,direction:o},e.label):mt(vu,{activeMenu:i,value:e.value||"",label:e.label||"",color:n,type:e.type||mu.internalLink},e.value)))})},xu=mt("code",{children:yr()?"Cmd":"Ctrl"}),Su=[{title:"Zoom in",description:mt(pt.FK,{children:["To zoom in, hold down the ",xu," + ",mt("code",{children:"scroll up"}),", or press the ",mt("code",{children:"+"}),". Also, you can zoom in on a range on the graph by holding down your mouse button and selecting the range."]})},{title:"Zoom out",description:mt(pt.FK,{children:["To zoom out, hold down the ",xu," + ",mt("code",{children:"scroll down"}),", or press the ",mt("code",{children:"-"}),"."]})},{title:"Move horizontal axis",description:mt(pt.FK,{children:["To move the graph, hold down the ",xu," + ",mt("code",{children:"drag"})," the graph to the right or left."]})},{title:"Fixing a tooltip",description:mt(pt.FK,{children:["To fix the tooltip, ",mt("code",{children:"click"})," mouse when it's open. Then, you can drag the fixed tooltip by ",mt("code",{children:"clicking"})," and ",mt("code",{children:"dragging"})," on the ",mt(Ln,{})," icon."]})},{title:"Set a custom range for the vertical axis",description:mt(pt.FK,{children:["To set a custom range for the vertical axis, click on the ",mt(pn,{})," icon located in the upper right corner of the graph, activate the toggle, and set the values."]})}],Cu=[{title:"Show/hide a legend item",description:mt(pt.FK,{children:[mt("code",{children:"click"})," on a legend item to isolate it on the graph.",xu," + ",mt("code",{children:"click"})," on a legend item to remove it from the graph. To revert to the previous state, click again."]})},{title:"Copy label key-value pairs",description:mt(pt.FK,{children:[mt("code",{children:"click"})," on a label key-value pair to save it to the clipboard."]})},{title:"Collapse/Expand the legend group",description:mt(pt.FK,{children:[mt("code",{children:"click"})," on the group name (e.g. ",mt("b",{children:'Query 1: {__name__!=""}'}),") to collapse or expand the legend."]})}],Au=Su.concat(Cu),Eu=()=>{const{value:e,setFalse:t,setTrue:n}=Fr(!1);return mt(pt.FK,{children:[mt(Ir,{title:"Show tips on working with the graph",children:mt(Dr,{variant:"text",color:"gray",startIcon:mt(Fn,{}),onClick:n,ariaLabel:"open the tips"})}),e&&mt(Br,{title:"Tips on working with the graph and the legend",onClose:t,children:mt("div",{className:"fc-graph-tips",children:Au.map((e=>{let{title:t,description:n}=e;return mt("div",{className:"fc-graph-tips-item",children:[mt("h4",{className:"fc-graph-tips-item__action",children:t}),mt("p",{className:"fc-graph-tips-item__description",children:n})]},t)}))})})]})},Mu=mt("code",{children:yr()?"Cmd":"Ctrl"}),Nu=mt(pt.FK,{children:[mt("code",{children:yr()?"Option":"Ctrl"})," + ",mt("code",{children:"Space"})]}),Tu=[{title:"Query",list:[{keys:mt("code",{children:"Enter"}),description:"Run"},{keys:mt(pt.FK,{children:[mt("code",{children:"Shift"})," + ",mt("code",{children:"Enter"})]}),description:"Multi-line queries"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"Arrow Up"})]}),description:"Previous command from the Query history"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"Arrow Down"})]}),description:"Next command from the Query history"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"click"})," by ",mt(Pn,{})]}),description:"Toggle multiple queries"},{keys:Nu,description:"Show quick autocomplete tips"}]},{title:"Graph",readMore:mt(Eu,{}),list:[{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"scroll Up"})," or ",mt("code",{children:"+"})]}),description:"Zoom in"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"scroll Down"})," or ",mt("code",{children:"-"})]}),description:"Zoom out"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"drag"})]}),description:"Move the graph left/right"},{keys:mt(pt.FK,{children:mt("code",{children:"click"})}),description:"Select the series in the legend"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"click"})]}),description:"Toggle multiple series in the legend"}]}],$u="Shortcut keys",Pu=yr(),Du=Pu?"Cmd + /":"F1",Ou=e=>{let{showTitle:n}=e;const r=He(),{value:o,setTrue:a,setFalse:i}=Fr(!1),l=(0,t.useCallback)((e=>{const t=Pu&&"/"===e.key&&e.metaKey,n=!Pu&&"F1"===e.key&&!e.metaKey;(t||n)&&a()}),[a]);return er("keydown",l),mt(pt.FK,{children:[mt(Ir,{open:!0!==n&&void 0,title:`${$u} (${Du})`,placement:"bottom-center",children:mt(Dr,{className:r?"":"vm-header-button",variant:"contained",color:"primary",startIcon:mt(An,{}),onClick:a,ariaLabel:$u,children:n&&$u})}),o&&mt(Br,{title:"Shortcut keys",onClose:i,children:mt("div",{className:"vm-shortcuts",children:Tu.map((e=>mt("div",{className:"vm-shortcuts-section",children:[e.readMore&&mt("div",{className:"vm-shortcuts-section__read-more",children:e.readMore}),mt("h3",{className:"vm-shortcuts-section__title",children:e.title}),mt("div",{className:"vm-shortcuts-section-list",children:e.list.map(((t,n)=>mt("div",{className:"vm-shortcuts-section-list-item",children:[mt("div",{className:"vm-shortcuts-section-list-item__key",children:t.keys}),mt("p",{className:"vm-shortcuts-section-list-item__description",children:t.description})]},`${e.title}_${n}`)))})]},e.title)))})})]})},Lu=e=>{let{open:t}=e;return mt("button",{className:Qn()({"vm-menu-burger":!0,"vm-menu-burger_opened":t}),"aria-label":"menu",children:mt("span",{})})},{REACT_APP_TYPE:Ru}={REACT_APP_TYPE:"logs"},zu=Ru===Ue.logs,Iu=e=>{let{background:n,color:r}=e;const{pathname:o}=ne(),{isMobile:a}=br(),i=(0,t.useRef)(null),{value:l,toggle:s,setFalse:c}=Fr(!1);return(0,t.useEffect)(c,[o]),Jr(i,c),mt("div",{className:"vm-header-sidebar",ref:i,children:[mt("div",{className:Qn()({"vm-header-sidebar-button":!0,"vm-header-sidebar-button_open":l}),onClick:s,children:mt(Lu,{open:l})}),mt("div",{className:Qn()({"vm-header-sidebar-menu":!0,"vm-header-sidebar-menu_open":l}),children:[mt("div",{children:mt(ku,{color:r,background:n,direction:"column"})}),mt("div",{className:"vm-header-sidebar-menu-settings",children:!a&&!zu&&mt(Ou,{showTitle:!0})})]})]})},ju=e=>{let{controlsComponent:n,isMobile:r,...o}=e;const a=He(),{pathname:i}=ne(),{accountIds:l}=(()=>{const{useTenantID:e}=Fe(),n=He(),{serverUrl:r}=gt(),[o,a]=(0,t.useState)(!1),[i,l]=(0,t.useState)(),[s,c]=(0,t.useState)([]),u=(0,t.useMemo)((()=>`${r.replace(/^(.+)(\/select.+)/,"$1")}/admin/tenants`),[r]),d=(0,t.useMemo)((()=>!!Be(r)),[r]),h=n?!e:!d;return(0,t.useEffect)((()=>{h||(async()=>{a(!0);try{const e=await fetch(u),t=await e.json(),n=t.data||[];c(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?l(void 0):l(`${t.errorType}\r\n${null===t||void 0===t?void 0:t.error}`)}catch(Id){Id instanceof Error&&l(`${Id.name}: ${Id.message}`)}a(!1)})().catch(console.error)}),[u]),{accountIds:s,isLoading:o,error:i}})(),{value:s,toggle:c,setFalse:u}=Fr(!1),d=mt(n,{...o,isMobile:r,accountIds:l,headerSetup:(0,t.useMemo)((()=>(pu[i]||{}).header||{}),[i])});return r?mt(pt.FK,{children:[mt("div",{children:mt(Dr,{className:Qn()({"vm-header-button":!a}),startIcon:mt(jn,{}),onClick:c,ariaLabel:"controls"})}),mt(Br,{title:"Controls",onClose:u,isOpen:s,className:Qn()({"vm-header-controls-modal":!0,"vm-header-controls-modal_open":s}),children:d})]}):d},{REACT_APP_TYPE:Fu}={REACT_APP_TYPE:"logs"},Hu=Fu===Ue.logs||Fu===Ue.anomaly,Vu=()=>{switch(Fu){case Ue.logs:return mt(un,{});case Ue.anomaly:return mt(dn,{});default:return mt(cn,{})}},Bu=e=>{let{controlsComponent:n}=e;const{isMobile:r}=br(),o=tr(),a=(0,t.useMemo)((()=>window.innerWidth<1e3),[o]),{isDarkTheme:i}=gt(),l=He(),s=(0,t.useMemo)((()=>it(i?"color-background-block":"color-primary")),[i]),{background:c,color:u}=(0,t.useMemo)((()=>{const{headerStyles:{background:e=(l?"#FFF":s),color:t=(l?s:"#FFF")}={}}=Fe();return{background:e,color:t}}),[s]),d=oe(),h=()=>{d({pathname:fu.home}),window.location.reload()};return mt("header",{className:Qn()({"vm-header":!0,"vm-header_app":l,"vm-header_dark":i,"vm-header_sidebar":a,"vm-header_mobile":r}),style:{background:c,color:u},children:[a?mt(Iu,{background:c,color:u}):mt(pt.FK,{children:[!l&&mt("div",{className:Qn()({"vm-header-logo":!0,"vm-header-logo_logs":Hu}),onClick:h,style:{color:u},children:mt(Vu,{})}),mt(ku,{color:u,background:c})]}),a&&mt("div",{className:Qn()({"vm-header-logo":!0,"vm-header-logo_mobile":!0,"vm-header-logo_logs":Hu}),onClick:h,style:{color:u},children:mt(Vu,{})}),mt(ju,{controlsComponent:n,displaySidebar:a,isMobile:r})]})},Uu={href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new/choose",Icon:()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z"})}),title:"Create an issue"},Yu=[{href:"https://docs.victoriametrics.com/MetricsQL.html",Icon:Tn,title:"MetricsQL"},{href:"https://docs.victoriametrics.com/#vmui",Icon:Rn,title:"Documentation"},Uu],Wu=[{href:"https://docs.victoriametrics.com/victorialogs/logsql/",Icon:Tn,title:"LogsQL"},{href:"https://docs.victoriametrics.com/victorialogs/",Icon:Rn,title:"Documentation"},Uu],qu=(0,t.memo)((e=>{let{links:t=Yu}=e;const n=`2019-${(new Date).getFullYear()}`;return mt("footer",{className:"vm-footer",children:[mt("a",{className:"vm-link vm-footer__website",target:"_blank",href:"https://victoriametrics.com/",rel:"me noreferrer",children:[mt(hn,{}),"victoriametrics.com"]}),t.map((e=>{let{href:t,Icon:n,title:r}=e;return mt("a",{className:"vm-link vm-footer__link",target:"_blank",href:t,rel:"help noreferrer",children:[mt(n,{}),r]},`${t}-${r}`)})),mt("div",{className:"vm-footer__copyright",children:["\xa9 ",n," VictoriaMetrics"]})]})})),Ku=qu,Zu="Enable to save the modified server URL to local storage, preventing reset upon page refresh.",Gu="Disable to stop saving the server URL to local storage, reverting to the default URL on page refresh.",Qu=(0,t.forwardRef)(((e,n)=>{let{onClose:r}=e;const{serverUrl:o}=gt(),a=vt(),{value:i,toggle:l}=Fr(!!We("SERVER_URL")),[s,c]=(0,t.useState)(o),[u,d]=(0,t.useState)(""),h=(0,t.useCallback)((()=>{const e=Be(s);""!==e&&a({type:"SET_TENANT_ID",payload:e}),a({type:"SET_SERVER",payload:s}),r()}),[s]);return(0,t.useEffect)((()=>{o||d(rt.emptyServer),(e=>{let t;try{t=new URL(e)}catch(n){return!1}return"http:"===t.protocol||"https:"===t.protocol})(o)||d(rt.validServer)}),[o]),(0,t.useEffect)((()=>{i?Ye("SERVER_URL",s):qe(["SERVER_URL"])}),[i]),(0,t.useEffect)((()=>{i&&Ye("SERVER_URL",s)}),[s]),(0,t.useEffect)((()=>{o!==s&&c(o)}),[o]),(0,t.useImperativeHandle)(n,(()=>({handleApply:h})),[h]),mt("div",{children:[mt("div",{className:"vm-server-configurator__title",children:"Server URL"}),mt("div",{className:"vm-server-configurator-url",children:[mt(Vr,{autofocus:!0,value:s,error:u,onChange:e=>{c(e||""),d("")},onEnter:h,inputmode:"url"}),mt(Ir,{title:i?Gu:Zu,children:mt(Dr,{className:"vm-server-configurator-url__button",variant:"text",color:i?"primary":"gray",onClick:l,startIcon:mt(In,{})})})]})]})})),Ju=[{label:"Graph",type:nt.chart},{label:"JSON",type:nt.code},{label:"Table",type:nt.table}],Xu=(0,t.forwardRef)(((e,n)=>{let{onClose:r}=e;const{isMobile:o}=br(),{seriesLimits:a}=(0,t.useContext)(lr).state,i=(0,t.useContext)(lr).dispatch,[l,s]=(0,t.useState)(a),[c,u]=(0,t.useState)({table:"",chart:"",code:""}),d=(0,t.useCallback)((()=>{i({type:"SET_SERIES_LIMITS",payload:l}),r()}),[l]);return(0,t.useImperativeHandle)(n,(()=>({handleApply:d})),[d]),mt("div",{className:"vm-limits-configurator",children:[mt("div",{className:"vm-server-configurator__title",children:["Series limits by tabs",mt(Ir,{title:"Set to 0 to disable the limit",children:mt(Dr,{variant:"text",color:"primary",size:"small",startIcon:mt(_n,{})})}),mt("div",{className:"vm-limits-configurator-title__reset",children:mt(Dr,{variant:"text",color:"primary",size:"small",startIcon:mt(mn,{}),onClick:()=>{s(Xe)},children:"Reset limits"})})]}),mt("div",{className:Qn()({"vm-limits-configurator__inputs":!0,"vm-limits-configurator__inputs_mobile":o}),children:Ju.map((e=>{return mt("div",{children:mt(Vr,{label:e.label,value:l[e.type],error:c[e.type],onChange:(t=e.type,e=>{const n=e||"";u((e=>({...e,[t]:+n<0?rt.positiveNumber:""}))),s({...l,[t]:n||1/0})}),onEnter:d,type:"number"})},e.type);var t}))})]})})),ed=Xu,td=()=>mt(Ir,{title:"Browser timezone is not recognized, supported, or could not be determined.",children:mt(gn,{})}),nd=Yt(),rd=(0,t.forwardRef)(((e,n)=>{const{isMobile:r}=br(),o=Bt(),{timezone:a,defaultTimezone:i}=Gt(),l=Qt(),[s,c]=(0,t.useState)(a),[u,d]=(0,t.useState)(""),h=(0,t.useRef)(null),{value:p,toggle:f,setFalse:m}=Fr(!1),_=(0,t.useMemo)((()=>[{title:`Default time (${i})`,region:i,utc:i?Vt(i):"UTC"},{title:nd.title,region:nd.region,utc:Vt(nd.region),isInvalid:!nd.isValid},{title:"UTC (Coordinated Universal Time)",region:"UTC",utc:"UTC"}].filter((e=>e.region))),[i]),g=(0,t.useMemo)((()=>{if(!u)return o;try{return Bt(u)}catch(Id){return{}}}),[u,o]),v=(0,t.useMemo)((()=>Object.keys(g)),[g]),y=(0,t.useMemo)((()=>({region:s,utc:Vt(s)})),[s]),b=e=>()=>{(e=>{c(e.region),d(""),m()})(e)};return(0,t.useEffect)((()=>{c(a)}),[a]),(0,t.useImperativeHandle)(n,(()=>({handleApply:()=>{l({type:"SET_TIMEZONE",payload:s})}})),[s]),mt("div",{className:"vm-timezones",children:[mt("div",{className:"vm-server-configurator__title",children:"Time zone"}),mt("div",{className:"vm-timezones-item vm-timezones-item_selected",onClick:f,ref:h,children:[mt("div",{className:"vm-timezones-item__title",children:y.region}),mt("div",{className:"vm-timezones-item__utc",children:y.utc}),mt("div",{className:Qn()({"vm-timezones-item__icon":!0,"vm-timezones-item__icon_open":p}),children:mt(kn,{})})]}),mt(Xr,{open:p,buttonRef:h,placement:"bottom-left",onClose:m,fullWidth:!0,title:r?"Time zone":void 0,children:mt("div",{className:Qn()({"vm-timezones-list":!0,"vm-timezones-list_mobile":r}),children:[mt("div",{className:"vm-timezones-list-header",children:[mt("div",{className:"vm-timezones-list-header__search",children:mt(Vr,{autofocus:!0,label:"Search",value:u,onChange:e=>{d(e)}})}),_.map(((e,t)=>e&&mt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[mt("div",{className:"vm-timezones-item__title",children:[e.title,e.isInvalid&&mt(td,{})]}),mt("div",{className:"vm-timezones-item__utc",children:e.utc})]},`${t}_${e.region}`)))]}),v.map((e=>mt("div",{className:"vm-timezones-list-group",children:mt(Gr,{defaultExpanded:!0,title:mt("div",{className:"vm-timezones-list-group__title",children:e}),children:mt("div",{className:"vm-timezones-list-group-options",children:g[e]&&g[e].map((e=>mt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[mt("div",{className:"vm-timezones-item__title",children:e.region}),mt("div",{className:"vm-timezones-item__utc",children:e.utc})]},e.search)))})})},e)))]})})]})})),od=rd,ad=e=>{let{options:n,value:r,label:o,onChange:a}=e;const i=(0,t.useRef)(null),[l,s]=(0,t.useState)({width:"0px",left:"0px",borderRadius:"0px"}),c=e=>()=>{a(e)};return(0,t.useEffect)((()=>{if(!i.current)return void s({width:"0px",left:"0px",borderRadius:"0px"});const e=n.findIndex((e=>e.value===r)),{width:t}=i.current.getBoundingClientRect();let o=t,a=e*o,l="0";0===e&&(l="16px 0 0 16px"),e===n.length-1&&(l="10px",a-=1,l="0 16px 16px 0"),0!==e&&e!==n.length-1&&(o+=1,a-=1),s({width:`${o}px`,left:`${a}px`,borderRadius:l})}),[i,r,n]),mt("div",{className:"vm-toggles",children:[o&&mt("label",{className:"vm-toggles__label",children:o}),mt("div",{className:"vm-toggles-group",style:{gridTemplateColumns:`repeat(${n.length}, 1fr)`},children:[l.borderRadius&&mt("div",{className:"vm-toggles-group__highlight",style:l}),n.map(((e,t)=>mt("div",{className:Qn()({"vm-toggles-group-item":!0,"vm-toggles-group-item_first":0===t,"vm-toggles-group-item_active":e.value===r,"vm-toggles-group-item_icon":e.icon&&e.title}),onClick:c(e.value),ref:e.value===r?i:null,children:[e.icon,e.title]},e.value)))]})]})},id=Object.values(ot).map((e=>({title:e,value:e}))),ld=()=>{const{isMobile:e}=br(),t=vt(),{theme:n}=gt();return mt("div",{className:Qn()({"vm-theme-control":!0,"vm-theme-control_mobile":e}),children:[mt("div",{className:"vm-server-configurator__title",children:"Theme preferences"}),mt("div",{className:"vm-theme-control__toggle",children:mt(ad,{options:id,value:n,onChange:e=>{t({type:"SET_THEME",payload:e})}})},`${e}`)]})},sd=()=>{const{isMobile:e}=br(),{markdownParsing:n}=gr(),r=(0,t.useContext)(_r).dispatch;return mt("div",{children:[mt("div",{className:"vm-server-configurator__title",children:"Markdown Parsing for Logs"}),mt(jr,{label:n?"Disable markdown parsing":"Enable markdown parsing",value:n,onChange:e=>{r({type:"SET_MARKDOWN_PARSING",payload:e})},fullWidth:e}),mt("div",{className:"vm-server-configurator__info",children:"Toggle this switch to enable or disable the Markdown formatting for log entries. Enabling this will parse log texts to Markdown."})]})},cd="Settings",{REACT_APP_TYPE:ud}={REACT_APP_TYPE:"logs"},dd=ud===Ue.logs,hd=()=>{const{isMobile:e}=br(),n=He(),r=(0,t.useRef)(null),o=(0,t.useRef)(null),a=(0,t.useRef)(null),{value:i,setTrue:l,setFalse:s}=Fr(!1),c=[{show:!n&&!dd,component:mt(Qu,{ref:r,onClose:s})},{show:!dd,component:mt(ed,{ref:o,onClose:s})},{show:dd,component:mt(sd,{})},{show:!0,component:mt(od,{ref:a})},{show:!n,component:mt(ld,{})}].filter((e=>e.show));return mt(pt.FK,{children:[e?mt("div",{className:"vm-mobile-option",onClick:l,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(pn,{})}),mt("div",{className:"vm-mobile-option-text",children:mt("span",{className:"vm-mobile-option-text__label",children:cd})}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Ir,{title:cd,children:mt(Dr,{className:Qn()({"vm-header-button":!n}),variant:"contained",color:"primary",startIcon:mt(pn,{}),onClick:l,ariaLabel:"settings"})}),i&&mt(Br,{title:cd,onClose:s,children:mt("div",{className:Qn()({"vm-server-configurator":!0,"vm-server-configurator_mobile":e}),children:[c.map(((e,t)=>mt("div",{className:"vm-server-configurator__input",children:e.component},t))),mt("div",{className:"vm-server-configurator-footer",children:[mt(Dr,{color:"error",variant:"outlined",onClick:s,children:"Cancel"}),mt(Dr,{color:"primary",variant:"contained",onClick:()=>{r.current&&r.current.handleApply(),o.current&&o.current.handleApply(),a.current&&a.current.handleApply(),s()},children:"Apply"})]})]})})]})},pd=e=>{let{relativeTime:t,setDuration:n}=e;const{isMobile:r}=br();return mt("div",{className:Qn()({"vm-time-duration":!0,"vm-time-duration_mobile":r}),children:Ft.map((e=>{let{id:o,duration:a,until:i,title:l}=e;return mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_mobile":r,"vm-list-item_active":o===t}),onClick:(s={duration:a,until:i(),id:o},()=>{n(s)}),children:l||a},o);var s}))})},fd=e=>{let{viewDate:t,showArrowNav:n,onChangeViewDate:r,toggleDisplayYears:o}=e;return mt("div",{className:"vm-calendar-header",children:[mt("div",{className:"vm-calendar-header-left",onClick:o,children:[mt("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),mt("div",{className:"vm-calendar-header-left__select-year",children:mt(kn,{})})]}),n&&mt("div",{className:"vm-calendar-header-right",children:[mt("div",{className:"vm-calendar-header-right__prev",onClick:()=>{r(t.subtract(1,"month"))},children:mt(wn,{})}),mt("div",{className:"vm-calendar-header-right__next",onClick:()=>{r(t.add(1,"month"))},children:mt(wn,{})})]})]})},md=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],_d=e=>{let{viewDate:n,selectDate:r,onChangeSelectDate:a}=e;const i="YYYY-MM-DD",l=o().tz(),s=o()(n.format(i)),c=(0,t.useMemo)((()=>{const e=new Array(42).fill(null),t=s.startOf("month"),n=s.endOf("month").diff(t,"day")+1,r=new Array(n).fill(t).map(((e,t)=>e.add(t,"day"))),o=t.day();return e.splice(o,n,...r),e}),[s]),u=e=>()=>{e&&a(e)};return mt("div",{className:"vm-calendar-body",children:[md.map((e=>mt(Ir,{title:e,children:mt("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]})},e))),c.map(((e,t)=>mt("div",{className:Qn()({"vm-calendar-body-cell":!0,"vm-calendar-body-cell_day":!0,"vm-calendar-body-cell_day_empty":!e,"vm-calendar-body-cell_day_active":(e&&e.format(i))===r.format(i),"vm-calendar-body-cell_day_today":(e&&e.format(i))===l.format(i)}),onClick:u(e),children:e&&e.format("D")},e?e.format(i):t)))]})},gd=e=>{let{viewDate:n,onChangeViewDate:r}=e;const a=o()().format("YYYY"),i=(0,t.useMemo)((()=>n.format("YYYY")),[n]),l=(0,t.useMemo)((()=>{const e=o()().subtract(9,"year");return new Array(18).fill(e).map(((e,t)=>e.add(t,"year")))}),[n]);(0,t.useEffect)((()=>{const e=document.getElementById(`vm-calendar-year-${i}`);e&&e.scrollIntoView({block:"center"})}),[]);return mt("div",{className:"vm-calendar-years",children:l.map((e=>{return mt("div",{className:Qn()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===i,"vm-calendar-years__year_today":e.format("YYYY")===a}),id:`vm-calendar-year-${e.format("YYYY")}`,onClick:(t=e,()=>{r(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})},vd=e=>{let{viewDate:n,selectDate:r,onChangeViewDate:a}=e;const i=o()().format("MM"),l=(0,t.useMemo)((()=>r.format("MM")),[r]),s=(0,t.useMemo)((()=>new Array(12).fill("").map(((e,t)=>o()(n).month(t)))),[n]);(0,t.useEffect)((()=>{const e=document.getElementById(`vm-calendar-year-${l}`);e&&e.scrollIntoView({block:"center"})}),[]);return mt("div",{className:"vm-calendar-years",children:s.map((e=>{return mt("div",{className:Qn()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("MM")===l,"vm-calendar-years__year_today":e.format("MM")===i}),id:`vm-calendar-year-${e.format("MM")}`,onClick:(t=e,()=>{a(t)}),children:e.format("MMMM")},e.format("MM"));var t}))})};var yd=function(e){return e[e.days=0]="days",e[e.months=1]="months",e[e.years=2]="years",e}(yd||{});const bd=e=>{let{date:n,format:r=wt,onChange:a}=e;const[i,l]=(0,t.useState)(yd.days),[s,c]=(0,t.useState)(o().tz(n)),[u,d]=(0,t.useState)(o().tz(n)),h=o().tz(),p=h.format(bt)===s.format(bt),{isMobile:f}=br(),m=e=>{c(e),l((e=>e===yd.years?yd.months:yd.days))};return(0,t.useEffect)((()=>{u.format()!==o().tz(n).format()&&a(u.format(r))}),[u]),(0,t.useEffect)((()=>{const e=o().tz(n);c(e),d(e)}),[n]),mt("div",{className:Qn()({"vm-calendar":!0,"vm-calendar_mobile":f}),children:[mt(fd,{viewDate:s,onChangeViewDate:m,toggleDisplayYears:()=>{l((e=>e===yd.years?yd.days:yd.years))},showArrowNav:i===yd.days}),i===yd.days&&mt(_d,{viewDate:s,selectDate:u,onChangeSelectDate:e=>{d(e)}}),i===yd.years&&mt(gd,{viewDate:s,onChangeViewDate:m}),i===yd.months&&mt(vd,{selectDate:u,viewDate:s,onChangeViewDate:m}),!p&&i===yd.days&&mt("div",{className:"vm-calendar-footer",children:mt(Dr,{variant:"text",size:"small",onClick:()=>{c(h)},children:"show today"})})]})},wd=(0,t.forwardRef)(((e,n)=>{let{date:r,targetRef:a,format:i=wt,onChange:l,label:s}=e;const c=(0,t.useMemo)((()=>o()(r).isValid()?o().tz(r):o()().tz()),[r]),{isMobile:u}=br(),{value:d,toggle:h,setFalse:p}=Fr(!1);return er("click",h,a),er("keyup",(e=>{"Escape"!==e.key&&"Enter"!==e.key||p()})),mt(pt.FK,{children:mt(Xr,{open:d,buttonRef:a,placement:"bottom-right",onClose:p,title:u?s:void 0,children:mt("div",{ref:n,children:mt(bd,{date:c,format:i,onChange:e=>{l(e),p()}})})})})}));var kd=n(494),xd=n.n(kd);const Sd=e=>o()(e).isValid()?o().tz(e).format(wt):e,Cd=e=>{let{value:n="",label:r,pickerLabel:a,pickerRef:i,onChange:l,onEnter:s}=e;const c=(0,t.useRef)(null),[u,d]=(0,t.useState)(null),[h,p]=(0,t.useState)(Sd(n)),[f,m]=(0,t.useState)(!1),[_,g]=(0,t.useState)(!1),v=o()(h).isValid()?"":"Invalid date format";return(0,t.useEffect)((()=>{const e=Sd(n);e!==h&&p(e),_&&(s(),g(!1))}),[n]),(0,t.useEffect)((()=>{f&&u&&(u.focus(),u.setSelectionRange(11,11),m(!1))}),[f]),mt("div",{className:Qn()({"vm-date-time-input":!0,"vm-date-time-input_error":v}),children:[mt("label",{children:r}),mt(xd(),{tabIndex:1,inputRef:d,mask:"9999-99-99 99:99:99",placeholder:"YYYY-MM-DD HH:mm:ss",value:h,autoCapitalize:"none",inputMode:"numeric",maskChar:null,onChange:e=>{p(e.currentTarget.value)},onBlur:()=>{l(h)},onKeyUp:e=>{"Enter"===e.key&&(l(h),g(!0))}}),v&&mt("span",{className:"vm-date-time-input__error-text",children:v}),mt("div",{className:"vm-date-time-input__icon",ref:c,children:mt(Dr,{variant:"text",color:"gray",size:"small",startIcon:mt(Sn,{}),ariaLabel:"calendar"})}),mt(wd,{label:a,ref:i,date:h,onChange:e=>{p(e),m(!0)},targetRef:c})]})};const Ad=function(e){const n=(0,t.useRef)();return(0,t.useEffect)((()=>{n.current=e}),[e]),n.current},Ed=()=>{const{isMobile:e}=br(),{isDarkTheme:n}=gt(),r=(0,t.useRef)(null),a=tr(),i=(0,t.useMemo)((()=>a.width>1120),[a]),[l,s]=(0,t.useState)(),[c,u]=(0,t.useState)(),{period:{end:d,start:h},relativeTime:p,timezone:f,duration:m}=Gt(),_=Qt(),g=He(),v=Ad(f),{value:y,toggle:b,setFalse:w}=Fr(!1),k=(0,t.useMemo)((()=>({region:f,utc:Vt(f)})),[f]);(0,t.useEffect)((()=>{s(Rt(It(d)))}),[f,d]),(0,t.useEffect)((()=>{u(Rt(It(h)))}),[f,h]);const x=e=>{let{duration:t,until:n,id:r}=e;_({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),w()},S=(0,t.useMemo)((()=>({start:o().tz(It(h)).format(wt),end:o().tz(It(d)).format(wt)})),[h,d,f]),C=(0,t.useMemo)((()=>p&&"none"!==p?p.replace(/_/g," "):`${S.start} - ${S.end}`),[p,S]),A=(0,t.useRef)(null),E=(0,t.useRef)(null),M=(0,t.useRef)(null),N=()=>{c&&l&&_({type:"SET_PERIOD",payload:{from:o().tz(c).toDate(),to:o().tz(l).toDate()}}),w()};return(0,t.useEffect)((()=>{const e=Ht({relativeTimeId:p,defaultDuration:m,defaultEndInput:It(d)});v&&f!==v&&x({id:e.relativeTimeId,duration:e.duration,until:e.endInput})}),[f,v]),Jr(r,(t=>{var n,r;if(e)return;const o=t.target,a=(null===A||void 0===A?void 0:A.current)&&(null===A||void 0===A||null===(n=A.current)||void 0===n?void 0:n.contains(o)),i=(null===E||void 0===E?void 0:E.current)&&(null===E||void 0===E||null===(r=E.current)||void 0===r?void 0:r.contains(o));a||i||w()})),mt(pt.FK,{children:[mt("div",{ref:M,children:e?mt("div",{className:"vm-mobile-option",onClick:b,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(xn,{})}),mt("div",{className:"vm-mobile-option-text",children:[mt("span",{className:"vm-mobile-option-text__label",children:"Time range"}),mt("span",{className:"vm-mobile-option-text__value",children:C})]}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Ir,{title:i?"Time range controls":C,children:mt(Dr,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:mt(xn,{}),onClick:b,ariaLabel:"time range controls",children:i&&mt("span",{children:C})})})}),mt(Xr,{open:y,buttonRef:M,placement:"bottom-right",onClose:w,clickOutside:!1,title:e?"Time range controls":"",children:mt("div",{className:Qn()({"vm-time-selector":!0,"vm-time-selector_mobile":e}),ref:r,children:[mt("div",{className:"vm-time-selector-left",children:[mt("div",{className:Qn()({"vm-time-selector-left-inputs":!0,"vm-time-selector-left-inputs_dark":n}),children:[mt(Cd,{value:c,label:"From:",pickerLabel:"Date From",pickerRef:A,onChange:u,onEnter:N}),mt(Cd,{value:l,label:"To:",pickerLabel:"Date To",pickerRef:E,onChange:s,onEnter:N})]}),mt("div",{className:"vm-time-selector-left-timezone",children:[mt("div",{className:"vm-time-selector-left-timezone__title",children:k.region}),mt("div",{className:"vm-time-selector-left-timezone__utc",children:k.utc})]}),mt(Dr,{variant:"text",startIcon:mt(Cn,{}),onClick:()=>_({type:"RUN_QUERY_TO_NOW"}),children:"switch to now"}),mt("div",{className:"vm-time-selector-left__controls",children:[mt(Dr,{color:"error",variant:"outlined",onClick:()=>{s(Rt(It(d))),u(Rt(It(h))),w()},children:"Cancel"}),mt(Dr,{color:"primary",onClick:N,children:"Apply"})]})]}),mt(pd,{relativeTime:p||"",setDuration:x})]})})]})},Md=()=>{const e=He(),{isMobile:n}=br(),r=Qt(),[o,a]=je(),[i,l]=Lr("0","accountID"),[s,c]=Lr("0","projectID"),u=`${i}:${s}`,d=(0,t.useRef)(null),{value:h,toggle:p,setFalse:f}=Fr(!1);return(0,t.useEffect)((()=>{h||(l(o.get("accountID")||"0"),c(o.get("projectID")||"0"))}),[h]),mt("div",{className:"vm-tenant-input",children:[mt(Ir,{title:"Define Tenant ID if you need request to another storage",children:mt("div",{ref:d,children:n?mt("div",{className:"vm-mobile-option",onClick:p,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(In,{})}),mt("div",{className:"vm-mobile-option-text",children:[mt("span",{className:"vm-mobile-option-text__label",children:"Tenant ID"}),mt("span",{className:"vm-mobile-option-text__value",children:u})]}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Dr,{className:e?"":"vm-header-button",variant:"contained",color:"primary",fullWidth:!0,startIcon:mt(In,{}),endIcon:mt("div",{className:Qn()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":h}),children:mt(wn,{})}),onClick:p,children:u})})}),mt(Xr,{open:h,placement:"bottom-right",onClose:f,buttonRef:d,title:n?"Define Tenant ID":void 0,children:mt("div",{className:Qn()({"vm-list vm-tenant-input-list":!0,"vm-list vm-tenant-input-list_mobile":n,"vm-tenant-input-list_inline":!0}),children:[mt(Vr,{autofocus:!0,label:"accountID",value:i,onChange:l,type:"number"}),mt(Vr,{autofocus:!0,label:"projectID",value:s,onChange:c,type:"number"}),mt("div",{className:"vm-tenant-input-list__buttons",children:[mt(Ir,{title:"Multitenancy in VictoriaLogs documentation",children:mt("a",{href:"https://docs.victoriametrics.com/victorialogs/#multitenancy",target:"_blank",rel:"help noreferrer",children:mt(Dr,{variant:"text",color:"gray",startIcon:mt(zn,{})})})}),mt(Dr,{variant:"contained",color:"primary",onClick:()=>{o.set("accountID",i),o.set("projectID",s),a(o),f(),r({type:"RUN_QUERY"})},children:"Apply"})]})]})})]})},Nd=[{seconds:0,title:"Off"},{seconds:1,title:"1s"},{seconds:2,title:"2s"},{seconds:5,title:"5s"},{seconds:10,title:"10s"},{seconds:30,title:"30s"},{seconds:60,title:"1m"},{seconds:300,title:"5m"},{seconds:900,title:"15m"},{seconds:1800,title:"30m"},{seconds:3600,title:"1h"},{seconds:7200,title:"2h"}],Td=()=>{const{isMobile:e}=br(),n=Qt(),r=He(),[o,a]=(0,t.useState)(!1),[i,l]=(0,t.useState)(Nd[0]),{value:s,toggle:c,setFalse:u}=Fr(!1),d=(0,t.useRef)(null);(0,t.useEffect)((()=>{const e=i.seconds;let t;return o?t=setInterval((()=>{n({type:"RUN_QUERY"})}),1e3*e):l(Nd[0]),()=>{t&&clearInterval(t)}}),[i,o]);const h=e=>()=>{(e=>{(o&&!e.seconds||!o&&e.seconds)&&a((e=>!e)),l(e),u()})(e)};return mt(pt.FK,{children:[mt("div",{className:"vm-execution-controls",children:mt("div",{className:Qn()({"vm-execution-controls-buttons":!0,"vm-execution-controls-buttons_mobile":e,"vm-header-button":!r}),children:[!e&&mt(Ir,{title:"Refresh dashboard",children:mt(Dr,{variant:"contained",color:"primary",onClick:()=>{n({type:"RUN_QUERY"})},startIcon:mt(bn,{}),ariaLabel:"refresh dashboard"})}),e?mt("div",{className:"vm-mobile-option",onClick:c,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(mn,{})}),mt("div",{className:"vm-mobile-option-text",children:[mt("span",{className:"vm-mobile-option-text__label",children:"Auto-refresh"}),mt("span",{className:"vm-mobile-option-text__value",children:i.title})]}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Ir,{title:"Auto-refresh control",children:mt("div",{ref:d,children:mt(Dr,{variant:"contained",color:"primary",fullWidth:!0,endIcon:mt("div",{className:Qn()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":s}),children:mt(wn,{})}),onClick:c,children:i.title})})})]})}),mt(Xr,{open:s,placement:"bottom-right",onClose:u,buttonRef:d,title:e?"Auto-refresh duration":void 0,children:mt("div",{className:Qn()({"vm-execution-controls-list":!0,"vm-execution-controls-list_mobile":e}),children:Nd.map((t=>mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_mobile":e,"vm-list-item_active":t.seconds===i.seconds}),onClick:h(t),children:t.title},t.seconds)))})})]})},$d=e=>{let{isMobile:t}=e;return mt("div",{className:Qn()({"vm-header-controls":!0,"vm-header-controls_mobile":t}),children:[mt(Md,{}),mt(Ed,{}),mt(Td,{}),mt(hd,{})]})},Pd=(Boolean(We("DISABLED_DEFAULT_TIMEZONE")),()=>{const{serverUrl:e}=gt(),[n,r]=(Qt(),(0,t.useState)(!1)),[o,a]=(0,t.useState)(""),i=async()=>{};return(0,t.useEffect)((()=>{i()}),[e]),{isLoading:n,error:o}}),Dd=()=>{const e=He(),{isMobile:n}=br(),{pathname:r}=ne();Pd();return(0,t.useEffect)((()=>{var e;const t="vmui for VictoriaLogs",n=null===(e=pu[fu.logs])||void 0===e?void 0:e.title;document.title=n?`${n} - ${t}`:t}),[r]),mt("section",{className:"vm-container",children:[mt(Bu,{controlsComponent:$d}),mt("div",{className:Qn()({"vm-container-body":!0,"vm-container-body_mobile":n,"vm-container-body_app":e}),children:mt(ye,{})}),!e&&mt(Ku,{links:Wu})]})},Od={unicode:!1,renderer:void 0};da.use(function(e){if(!(e={...Od,...e}).emojis)throw new Error("Must provide emojis to markedEmoji");const t=Object.keys(e.emojis).map((e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))).join("|"),n=new RegExp(`:(${t}):`),r=new RegExp(`^${n.source}`);return{extensions:[{name:"emoji",level:"inline",start:e=>e.match(n)?.index,tokenizer(t,n){const o=r.exec(t);if(!o)return;const a=o[1];let i=e.emojis[a],l=e.renderer?void 0:e.unicode;if("string"!==typeof i&&!e.renderer)if("string"===typeof i.char)i=i.char,l=!0;else{if("string"!==typeof i.url)return;i=i.url,l=!1}return{type:"emoji",raw:o[0],name:a,emoji:i,unicode:l}},renderer:t=>e.renderer?e.renderer(t):t.unicode?t.emoji:`${t.name}`}]}}({emojis:{100:"\ud83d\udcaf",1234:"\ud83d\udd22",grinning:"\ud83d\ude00",smiley:"\ud83d\ude03",smile:"\ud83d\ude04",grin:"\ud83d\ude01",laughing:"\ud83d\ude06",satisfied:"\ud83d\ude06",sweat_smile:"\ud83d\ude05",rofl:"\ud83e\udd23",joy:"\ud83d\ude02",slightly_smiling_face:"\ud83d\ude42",upside_down_face:"\ud83d\ude43",melting_face:"\ud83e\udee0",wink:"\ud83d\ude09",blush:"\ud83d\ude0a",innocent:"\ud83d\ude07",smiling_face_with_three_hearts:"\ud83e\udd70",heart_eyes:"\ud83d\ude0d",star_struck:"\ud83e\udd29",kissing_heart:"\ud83d\ude18",kissing:"\ud83d\ude17",relaxed:"\u263a\ufe0f",kissing_closed_eyes:"\ud83d\ude1a",kissing_smiling_eyes:"\ud83d\ude19",smiling_face_with_tear:"\ud83e\udd72",yum:"\ud83d\ude0b",stuck_out_tongue:"\ud83d\ude1b",stuck_out_tongue_winking_eye:"\ud83d\ude1c",zany_face:"\ud83e\udd2a",stuck_out_tongue_closed_eyes:"\ud83d\ude1d",money_mouth_face:"\ud83e\udd11",hugs:"\ud83e\udd17",hand_over_mouth:"\ud83e\udd2d",face_with_open_eyes_and_hand_over_mouth:"\ud83e\udee2",face_with_peeking_eye:"\ud83e\udee3",shushing_face:"\ud83e\udd2b",thinking:"\ud83e\udd14",saluting_face:"\ud83e\udee1",zipper_mouth_face:"\ud83e\udd10",raised_eyebrow:"\ud83e\udd28",neutral_face:"\ud83d\ude10",expressionless:"\ud83d\ude11",no_mouth:"\ud83d\ude36",dotted_line_face:"\ud83e\udee5",face_in_clouds:"\ud83d\ude36\u200d\ud83c\udf2b\ufe0f",smirk:"\ud83d\ude0f",unamused:"\ud83d\ude12",roll_eyes:"\ud83d\ude44",grimacing:"\ud83d\ude2c",face_exhaling:"\ud83d\ude2e\u200d\ud83d\udca8",lying_face:"\ud83e\udd25",shaking_face:"\ud83e\udee8",relieved:"\ud83d\ude0c",pensive:"\ud83d\ude14",sleepy:"\ud83d\ude2a",drooling_face:"\ud83e\udd24",sleeping:"\ud83d\ude34",mask:"\ud83d\ude37",face_with_thermometer:"\ud83e\udd12",face_with_head_bandage:"\ud83e\udd15",nauseated_face:"\ud83e\udd22",vomiting_face:"\ud83e\udd2e",sneezing_face:"\ud83e\udd27",hot_face:"\ud83e\udd75",cold_face:"\ud83e\udd76",woozy_face:"\ud83e\udd74",dizzy_face:"\ud83d\ude35",face_with_spiral_eyes:"\ud83d\ude35\u200d\ud83d\udcab",exploding_head:"\ud83e\udd2f",cowboy_hat_face:"\ud83e\udd20",partying_face:"\ud83e\udd73",disguised_face:"\ud83e\udd78",sunglasses:"\ud83d\ude0e",nerd_face:"\ud83e\udd13",monocle_face:"\ud83e\uddd0",confused:"\ud83d\ude15",face_with_diagonal_mouth:"\ud83e\udee4",worried:"\ud83d\ude1f",slightly_frowning_face:"\ud83d\ude41",frowning_face:"\u2639\ufe0f",open_mouth:"\ud83d\ude2e",hushed:"\ud83d\ude2f",astonished:"\ud83d\ude32",flushed:"\ud83d\ude33",pleading_face:"\ud83e\udd7a",face_holding_back_tears:"\ud83e\udd79",frowning:"\ud83d\ude26",anguished:"\ud83d\ude27",fearful:"\ud83d\ude28",cold_sweat:"\ud83d\ude30",disappointed_relieved:"\ud83d\ude25",cry:"\ud83d\ude22",sob:"\ud83d\ude2d",scream:"\ud83d\ude31",confounded:"\ud83d\ude16",persevere:"\ud83d\ude23",disappointed:"\ud83d\ude1e",sweat:"\ud83d\ude13",weary:"\ud83d\ude29",tired_face:"\ud83d\ude2b",yawning_face:"\ud83e\udd71",triumph:"\ud83d\ude24",rage:"\ud83d\ude21",pout:"\ud83d\ude21",angry:"\ud83d\ude20",cursing_face:"\ud83e\udd2c",smiling_imp:"\ud83d\ude08",imp:"\ud83d\udc7f",skull:"\ud83d\udc80",skull_and_crossbones:"\u2620\ufe0f",hankey:"\ud83d\udca9",poop:"\ud83d\udca9",shit:"\ud83d\udca9",clown_face:"\ud83e\udd21",japanese_ogre:"\ud83d\udc79",japanese_goblin:"\ud83d\udc7a",ghost:"\ud83d\udc7b",alien:"\ud83d\udc7d",space_invader:"\ud83d\udc7e",robot:"\ud83e\udd16",smiley_cat:"\ud83d\ude3a",smile_cat:"\ud83d\ude38",joy_cat:"\ud83d\ude39",heart_eyes_cat:"\ud83d\ude3b",smirk_cat:"\ud83d\ude3c",kissing_cat:"\ud83d\ude3d",scream_cat:"\ud83d\ude40",crying_cat_face:"\ud83d\ude3f",pouting_cat:"\ud83d\ude3e",see_no_evil:"\ud83d\ude48",hear_no_evil:"\ud83d\ude49",speak_no_evil:"\ud83d\ude4a",love_letter:"\ud83d\udc8c",cupid:"\ud83d\udc98",gift_heart:"\ud83d\udc9d",sparkling_heart:"\ud83d\udc96",heartpulse:"\ud83d\udc97",heartbeat:"\ud83d\udc93",revolving_hearts:"\ud83d\udc9e",two_hearts:"\ud83d\udc95",heart_decoration:"\ud83d\udc9f",heavy_heart_exclamation:"\u2763\ufe0f",broken_heart:"\ud83d\udc94",heart_on_fire:"\u2764\ufe0f\u200d\ud83d\udd25",mending_heart:"\u2764\ufe0f\u200d\ud83e\ude79",heart:"\u2764\ufe0f",pink_heart:"\ud83e\ude77",orange_heart:"\ud83e\udde1",yellow_heart:"\ud83d\udc9b",green_heart:"\ud83d\udc9a",blue_heart:"\ud83d\udc99",light_blue_heart:"\ud83e\ude75",purple_heart:"\ud83d\udc9c",brown_heart:"\ud83e\udd0e",black_heart:"\ud83d\udda4",grey_heart:"\ud83e\ude76",white_heart:"\ud83e\udd0d",kiss:"\ud83d\udc8b",anger:"\ud83d\udca2",boom:"\ud83d\udca5",collision:"\ud83d\udca5",dizzy:"\ud83d\udcab",sweat_drops:"\ud83d\udca6",dash:"\ud83d\udca8",hole:"\ud83d\udd73\ufe0f",speech_balloon:"\ud83d\udcac",eye_speech_bubble:"\ud83d\udc41\ufe0f\u200d\ud83d\udde8\ufe0f",left_speech_bubble:"\ud83d\udde8\ufe0f",right_anger_bubble:"\ud83d\uddef\ufe0f",thought_balloon:"\ud83d\udcad",zzz:"\ud83d\udca4",wave:"\ud83d\udc4b",raised_back_of_hand:"\ud83e\udd1a",raised_hand_with_fingers_splayed:"\ud83d\udd90\ufe0f",hand:"\u270b",raised_hand:"\u270b",vulcan_salute:"\ud83d\udd96",rightwards_hand:"\ud83e\udef1",leftwards_hand:"\ud83e\udef2",palm_down_hand:"\ud83e\udef3",palm_up_hand:"\ud83e\udef4",leftwards_pushing_hand:"\ud83e\udef7",rightwards_pushing_hand:"\ud83e\udef8",ok_hand:"\ud83d\udc4c",pinched_fingers:"\ud83e\udd0c",pinching_hand:"\ud83e\udd0f",v:"\u270c\ufe0f",crossed_fingers:"\ud83e\udd1e",hand_with_index_finger_and_thumb_crossed:"\ud83e\udef0",love_you_gesture:"\ud83e\udd1f",metal:"\ud83e\udd18",call_me_hand:"\ud83e\udd19",point_left:"\ud83d\udc48",point_right:"\ud83d\udc49",point_up_2:"\ud83d\udc46",middle_finger:"\ud83d\udd95",fu:"\ud83d\udd95",point_down:"\ud83d\udc47",point_up:"\u261d\ufe0f",index_pointing_at_the_viewer:"\ud83e\udef5","+1":"\ud83d\udc4d",thumbsup:"\ud83d\udc4d","-1":"\ud83d\udc4e",thumbsdown:"\ud83d\udc4e",fist_raised:"\u270a",fist:"\u270a",fist_oncoming:"\ud83d\udc4a",facepunch:"\ud83d\udc4a",punch:"\ud83d\udc4a",fist_left:"\ud83e\udd1b",fist_right:"\ud83e\udd1c",clap:"\ud83d\udc4f",raised_hands:"\ud83d\ude4c",heart_hands:"\ud83e\udef6",open_hands:"\ud83d\udc50",palms_up_together:"\ud83e\udd32",handshake:"\ud83e\udd1d",pray:"\ud83d\ude4f",writing_hand:"\u270d\ufe0f",nail_care:"\ud83d\udc85",selfie:"\ud83e\udd33",muscle:"\ud83d\udcaa",mechanical_arm:"\ud83e\uddbe",mechanical_leg:"\ud83e\uddbf",leg:"\ud83e\uddb5",foot:"\ud83e\uddb6",ear:"\ud83d\udc42",ear_with_hearing_aid:"\ud83e\uddbb",nose:"\ud83d\udc43",brain:"\ud83e\udde0",anatomical_heart:"\ud83e\udec0",lungs:"\ud83e\udec1",tooth:"\ud83e\uddb7",bone:"\ud83e\uddb4",eyes:"\ud83d\udc40",eye:"\ud83d\udc41\ufe0f",tongue:"\ud83d\udc45",lips:"\ud83d\udc44",biting_lip:"\ud83e\udee6",baby:"\ud83d\udc76",child:"\ud83e\uddd2",boy:"\ud83d\udc66",girl:"\ud83d\udc67",adult:"\ud83e\uddd1",blond_haired_person:"\ud83d\udc71",man:"\ud83d\udc68",bearded_person:"\ud83e\uddd4",man_beard:"\ud83e\uddd4\u200d\u2642\ufe0f",woman_beard:"\ud83e\uddd4\u200d\u2640\ufe0f",red_haired_man:"\ud83d\udc68\u200d\ud83e\uddb0",curly_haired_man:"\ud83d\udc68\u200d\ud83e\uddb1",white_haired_man:"\ud83d\udc68\u200d\ud83e\uddb3",bald_man:"\ud83d\udc68\u200d\ud83e\uddb2",woman:"\ud83d\udc69",red_haired_woman:"\ud83d\udc69\u200d\ud83e\uddb0",person_red_hair:"\ud83e\uddd1\u200d\ud83e\uddb0",curly_haired_woman:"\ud83d\udc69\u200d\ud83e\uddb1",person_curly_hair:"\ud83e\uddd1\u200d\ud83e\uddb1",white_haired_woman:"\ud83d\udc69\u200d\ud83e\uddb3",person_white_hair:"\ud83e\uddd1\u200d\ud83e\uddb3",bald_woman:"\ud83d\udc69\u200d\ud83e\uddb2",person_bald:"\ud83e\uddd1\u200d\ud83e\uddb2",blond_haired_woman:"\ud83d\udc71\u200d\u2640\ufe0f",blonde_woman:"\ud83d\udc71\u200d\u2640\ufe0f",blond_haired_man:"\ud83d\udc71\u200d\u2642\ufe0f",older_adult:"\ud83e\uddd3",older_man:"\ud83d\udc74",older_woman:"\ud83d\udc75",frowning_person:"\ud83d\ude4d",frowning_man:"\ud83d\ude4d\u200d\u2642\ufe0f",frowning_woman:"\ud83d\ude4d\u200d\u2640\ufe0f",pouting_face:"\ud83d\ude4e",pouting_man:"\ud83d\ude4e\u200d\u2642\ufe0f",pouting_woman:"\ud83d\ude4e\u200d\u2640\ufe0f",no_good:"\ud83d\ude45",no_good_man:"\ud83d\ude45\u200d\u2642\ufe0f",ng_man:"\ud83d\ude45\u200d\u2642\ufe0f",no_good_woman:"\ud83d\ude45\u200d\u2640\ufe0f",ng_woman:"\ud83d\ude45\u200d\u2640\ufe0f",ok_person:"\ud83d\ude46",ok_man:"\ud83d\ude46\u200d\u2642\ufe0f",ok_woman:"\ud83d\ude46\u200d\u2640\ufe0f",tipping_hand_person:"\ud83d\udc81",information_desk_person:"\ud83d\udc81",tipping_hand_man:"\ud83d\udc81\u200d\u2642\ufe0f",sassy_man:"\ud83d\udc81\u200d\u2642\ufe0f",tipping_hand_woman:"\ud83d\udc81\u200d\u2640\ufe0f",sassy_woman:"\ud83d\udc81\u200d\u2640\ufe0f",raising_hand:"\ud83d\ude4b",raising_hand_man:"\ud83d\ude4b\u200d\u2642\ufe0f",raising_hand_woman:"\ud83d\ude4b\u200d\u2640\ufe0f",deaf_person:"\ud83e\uddcf",deaf_man:"\ud83e\uddcf\u200d\u2642\ufe0f",deaf_woman:"\ud83e\uddcf\u200d\u2640\ufe0f",bow:"\ud83d\ude47",bowing_man:"\ud83d\ude47\u200d\u2642\ufe0f",bowing_woman:"\ud83d\ude47\u200d\u2640\ufe0f",facepalm:"\ud83e\udd26",man_facepalming:"\ud83e\udd26\u200d\u2642\ufe0f",woman_facepalming:"\ud83e\udd26\u200d\u2640\ufe0f",shrug:"\ud83e\udd37",man_shrugging:"\ud83e\udd37\u200d\u2642\ufe0f",woman_shrugging:"\ud83e\udd37\u200d\u2640\ufe0f",health_worker:"\ud83e\uddd1\u200d\u2695\ufe0f",man_health_worker:"\ud83d\udc68\u200d\u2695\ufe0f",woman_health_worker:"\ud83d\udc69\u200d\u2695\ufe0f",student:"\ud83e\uddd1\u200d\ud83c\udf93",man_student:"\ud83d\udc68\u200d\ud83c\udf93",woman_student:"\ud83d\udc69\u200d\ud83c\udf93",teacher:"\ud83e\uddd1\u200d\ud83c\udfeb",man_teacher:"\ud83d\udc68\u200d\ud83c\udfeb",woman_teacher:"\ud83d\udc69\u200d\ud83c\udfeb",judge:"\ud83e\uddd1\u200d\u2696\ufe0f",man_judge:"\ud83d\udc68\u200d\u2696\ufe0f",woman_judge:"\ud83d\udc69\u200d\u2696\ufe0f",farmer:"\ud83e\uddd1\u200d\ud83c\udf3e",man_farmer:"\ud83d\udc68\u200d\ud83c\udf3e",woman_farmer:"\ud83d\udc69\u200d\ud83c\udf3e",cook:"\ud83e\uddd1\u200d\ud83c\udf73",man_cook:"\ud83d\udc68\u200d\ud83c\udf73",woman_cook:"\ud83d\udc69\u200d\ud83c\udf73",mechanic:"\ud83e\uddd1\u200d\ud83d\udd27",man_mechanic:"\ud83d\udc68\u200d\ud83d\udd27",woman_mechanic:"\ud83d\udc69\u200d\ud83d\udd27",factory_worker:"\ud83e\uddd1\u200d\ud83c\udfed",man_factory_worker:"\ud83d\udc68\u200d\ud83c\udfed",woman_factory_worker:"\ud83d\udc69\u200d\ud83c\udfed",office_worker:"\ud83e\uddd1\u200d\ud83d\udcbc",man_office_worker:"\ud83d\udc68\u200d\ud83d\udcbc",woman_office_worker:"\ud83d\udc69\u200d\ud83d\udcbc",scientist:"\ud83e\uddd1\u200d\ud83d\udd2c",man_scientist:"\ud83d\udc68\u200d\ud83d\udd2c",woman_scientist:"\ud83d\udc69\u200d\ud83d\udd2c",technologist:"\ud83e\uddd1\u200d\ud83d\udcbb",man_technologist:"\ud83d\udc68\u200d\ud83d\udcbb",woman_technologist:"\ud83d\udc69\u200d\ud83d\udcbb",singer:"\ud83e\uddd1\u200d\ud83c\udfa4",man_singer:"\ud83d\udc68\u200d\ud83c\udfa4",woman_singer:"\ud83d\udc69\u200d\ud83c\udfa4",artist:"\ud83e\uddd1\u200d\ud83c\udfa8",man_artist:"\ud83d\udc68\u200d\ud83c\udfa8",woman_artist:"\ud83d\udc69\u200d\ud83c\udfa8",pilot:"\ud83e\uddd1\u200d\u2708\ufe0f",man_pilot:"\ud83d\udc68\u200d\u2708\ufe0f",woman_pilot:"\ud83d\udc69\u200d\u2708\ufe0f",astronaut:"\ud83e\uddd1\u200d\ud83d\ude80",man_astronaut:"\ud83d\udc68\u200d\ud83d\ude80",woman_astronaut:"\ud83d\udc69\u200d\ud83d\ude80",firefighter:"\ud83e\uddd1\u200d\ud83d\ude92",man_firefighter:"\ud83d\udc68\u200d\ud83d\ude92",woman_firefighter:"\ud83d\udc69\u200d\ud83d\ude92",police_officer:"\ud83d\udc6e",cop:"\ud83d\udc6e",policeman:"\ud83d\udc6e\u200d\u2642\ufe0f",policewoman:"\ud83d\udc6e\u200d\u2640\ufe0f",detective:"\ud83d\udd75\ufe0f",male_detective:"\ud83d\udd75\ufe0f\u200d\u2642\ufe0f",female_detective:"\ud83d\udd75\ufe0f\u200d\u2640\ufe0f",guard:"\ud83d\udc82",guardsman:"\ud83d\udc82\u200d\u2642\ufe0f",guardswoman:"\ud83d\udc82\u200d\u2640\ufe0f",ninja:"\ud83e\udd77",construction_worker:"\ud83d\udc77",construction_worker_man:"\ud83d\udc77\u200d\u2642\ufe0f",construction_worker_woman:"\ud83d\udc77\u200d\u2640\ufe0f",person_with_crown:"\ud83e\udec5",prince:"\ud83e\udd34",princess:"\ud83d\udc78",person_with_turban:"\ud83d\udc73",man_with_turban:"\ud83d\udc73\u200d\u2642\ufe0f",woman_with_turban:"\ud83d\udc73\u200d\u2640\ufe0f",man_with_gua_pi_mao:"\ud83d\udc72",woman_with_headscarf:"\ud83e\uddd5",person_in_tuxedo:"\ud83e\udd35",man_in_tuxedo:"\ud83e\udd35\u200d\u2642\ufe0f",woman_in_tuxedo:"\ud83e\udd35\u200d\u2640\ufe0f",person_with_veil:"\ud83d\udc70",man_with_veil:"\ud83d\udc70\u200d\u2642\ufe0f",woman_with_veil:"\ud83d\udc70\u200d\u2640\ufe0f",bride_with_veil:"\ud83d\udc70\u200d\u2640\ufe0f",pregnant_woman:"\ud83e\udd30",pregnant_man:"\ud83e\udec3",pregnant_person:"\ud83e\udec4",breast_feeding:"\ud83e\udd31",woman_feeding_baby:"\ud83d\udc69\u200d\ud83c\udf7c",man_feeding_baby:"\ud83d\udc68\u200d\ud83c\udf7c",person_feeding_baby:"\ud83e\uddd1\u200d\ud83c\udf7c",angel:"\ud83d\udc7c",santa:"\ud83c\udf85",mrs_claus:"\ud83e\udd36",mx_claus:"\ud83e\uddd1\u200d\ud83c\udf84",superhero:"\ud83e\uddb8",superhero_man:"\ud83e\uddb8\u200d\u2642\ufe0f",superhero_woman:"\ud83e\uddb8\u200d\u2640\ufe0f",supervillain:"\ud83e\uddb9",supervillain_man:"\ud83e\uddb9\u200d\u2642\ufe0f",supervillain_woman:"\ud83e\uddb9\u200d\u2640\ufe0f",mage:"\ud83e\uddd9",mage_man:"\ud83e\uddd9\u200d\u2642\ufe0f",mage_woman:"\ud83e\uddd9\u200d\u2640\ufe0f",fairy:"\ud83e\uddda",fairy_man:"\ud83e\uddda\u200d\u2642\ufe0f",fairy_woman:"\ud83e\uddda\u200d\u2640\ufe0f",vampire:"\ud83e\udddb",vampire_man:"\ud83e\udddb\u200d\u2642\ufe0f",vampire_woman:"\ud83e\udddb\u200d\u2640\ufe0f",merperson:"\ud83e\udddc",merman:"\ud83e\udddc\u200d\u2642\ufe0f",mermaid:"\ud83e\udddc\u200d\u2640\ufe0f",elf:"\ud83e\udddd",elf_man:"\ud83e\udddd\u200d\u2642\ufe0f",elf_woman:"\ud83e\udddd\u200d\u2640\ufe0f",genie:"\ud83e\uddde",genie_man:"\ud83e\uddde\u200d\u2642\ufe0f",genie_woman:"\ud83e\uddde\u200d\u2640\ufe0f",zombie:"\ud83e\udddf",zombie_man:"\ud83e\udddf\u200d\u2642\ufe0f",zombie_woman:"\ud83e\udddf\u200d\u2640\ufe0f",troll:"\ud83e\uddcc",massage:"\ud83d\udc86",massage_man:"\ud83d\udc86\u200d\u2642\ufe0f",massage_woman:"\ud83d\udc86\u200d\u2640\ufe0f",haircut:"\ud83d\udc87",haircut_man:"\ud83d\udc87\u200d\u2642\ufe0f",haircut_woman:"\ud83d\udc87\u200d\u2640\ufe0f",walking:"\ud83d\udeb6",walking_man:"\ud83d\udeb6\u200d\u2642\ufe0f",walking_woman:"\ud83d\udeb6\u200d\u2640\ufe0f",standing_person:"\ud83e\uddcd",standing_man:"\ud83e\uddcd\u200d\u2642\ufe0f",standing_woman:"\ud83e\uddcd\u200d\u2640\ufe0f",kneeling_person:"\ud83e\uddce",kneeling_man:"\ud83e\uddce\u200d\u2642\ufe0f",kneeling_woman:"\ud83e\uddce\u200d\u2640\ufe0f",person_with_probing_cane:"\ud83e\uddd1\u200d\ud83e\uddaf",man_with_probing_cane:"\ud83d\udc68\u200d\ud83e\uddaf",woman_with_probing_cane:"\ud83d\udc69\u200d\ud83e\uddaf",person_in_motorized_wheelchair:"\ud83e\uddd1\u200d\ud83e\uddbc",man_in_motorized_wheelchair:"\ud83d\udc68\u200d\ud83e\uddbc",woman_in_motorized_wheelchair:"\ud83d\udc69\u200d\ud83e\uddbc",person_in_manual_wheelchair:"\ud83e\uddd1\u200d\ud83e\uddbd",man_in_manual_wheelchair:"\ud83d\udc68\u200d\ud83e\uddbd",woman_in_manual_wheelchair:"\ud83d\udc69\u200d\ud83e\uddbd",runner:"\ud83c\udfc3",running:"\ud83c\udfc3",running_man:"\ud83c\udfc3\u200d\u2642\ufe0f",running_woman:"\ud83c\udfc3\u200d\u2640\ufe0f",woman_dancing:"\ud83d\udc83",dancer:"\ud83d\udc83",man_dancing:"\ud83d\udd7a",business_suit_levitating:"\ud83d\udd74\ufe0f",dancers:"\ud83d\udc6f",dancing_men:"\ud83d\udc6f\u200d\u2642\ufe0f",dancing_women:"\ud83d\udc6f\u200d\u2640\ufe0f",sauna_person:"\ud83e\uddd6",sauna_man:"\ud83e\uddd6\u200d\u2642\ufe0f",sauna_woman:"\ud83e\uddd6\u200d\u2640\ufe0f",climbing:"\ud83e\uddd7",climbing_man:"\ud83e\uddd7\u200d\u2642\ufe0f",climbing_woman:"\ud83e\uddd7\u200d\u2640\ufe0f",person_fencing:"\ud83e\udd3a",horse_racing:"\ud83c\udfc7",skier:"\u26f7\ufe0f",snowboarder:"\ud83c\udfc2",golfing:"\ud83c\udfcc\ufe0f",golfing_man:"\ud83c\udfcc\ufe0f\u200d\u2642\ufe0f",golfing_woman:"\ud83c\udfcc\ufe0f\u200d\u2640\ufe0f",surfer:"\ud83c\udfc4",surfing_man:"\ud83c\udfc4\u200d\u2642\ufe0f",surfing_woman:"\ud83c\udfc4\u200d\u2640\ufe0f",rowboat:"\ud83d\udea3",rowing_man:"\ud83d\udea3\u200d\u2642\ufe0f",rowing_woman:"\ud83d\udea3\u200d\u2640\ufe0f",swimmer:"\ud83c\udfca",swimming_man:"\ud83c\udfca\u200d\u2642\ufe0f",swimming_woman:"\ud83c\udfca\u200d\u2640\ufe0f",bouncing_ball_person:"\u26f9\ufe0f",bouncing_ball_man:"\u26f9\ufe0f\u200d\u2642\ufe0f",basketball_man:"\u26f9\ufe0f\u200d\u2642\ufe0f",bouncing_ball_woman:"\u26f9\ufe0f\u200d\u2640\ufe0f",basketball_woman:"\u26f9\ufe0f\u200d\u2640\ufe0f",weight_lifting:"\ud83c\udfcb\ufe0f",weight_lifting_man:"\ud83c\udfcb\ufe0f\u200d\u2642\ufe0f",weight_lifting_woman:"\ud83c\udfcb\ufe0f\u200d\u2640\ufe0f",bicyclist:"\ud83d\udeb4",biking_man:"\ud83d\udeb4\u200d\u2642\ufe0f",biking_woman:"\ud83d\udeb4\u200d\u2640\ufe0f",mountain_bicyclist:"\ud83d\udeb5",mountain_biking_man:"\ud83d\udeb5\u200d\u2642\ufe0f",mountain_biking_woman:"\ud83d\udeb5\u200d\u2640\ufe0f",cartwheeling:"\ud83e\udd38",man_cartwheeling:"\ud83e\udd38\u200d\u2642\ufe0f",woman_cartwheeling:"\ud83e\udd38\u200d\u2640\ufe0f",wrestling:"\ud83e\udd3c",men_wrestling:"\ud83e\udd3c\u200d\u2642\ufe0f",women_wrestling:"\ud83e\udd3c\u200d\u2640\ufe0f",water_polo:"\ud83e\udd3d",man_playing_water_polo:"\ud83e\udd3d\u200d\u2642\ufe0f",woman_playing_water_polo:"\ud83e\udd3d\u200d\u2640\ufe0f",handball_person:"\ud83e\udd3e",man_playing_handball:"\ud83e\udd3e\u200d\u2642\ufe0f",woman_playing_handball:"\ud83e\udd3e\u200d\u2640\ufe0f",juggling_person:"\ud83e\udd39",man_juggling:"\ud83e\udd39\u200d\u2642\ufe0f",woman_juggling:"\ud83e\udd39\u200d\u2640\ufe0f",lotus_position:"\ud83e\uddd8",lotus_position_man:"\ud83e\uddd8\u200d\u2642\ufe0f",lotus_position_woman:"\ud83e\uddd8\u200d\u2640\ufe0f",bath:"\ud83d\udec0",sleeping_bed:"\ud83d\udecc",people_holding_hands:"\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1",two_women_holding_hands:"\ud83d\udc6d",couple:"\ud83d\udc6b",two_men_holding_hands:"\ud83d\udc6c",couplekiss:"\ud83d\udc8f",couplekiss_man_woman:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68",couplekiss_man_man:"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68",couplekiss_woman_woman:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69",couple_with_heart:"\ud83d\udc91",couple_with_heart_woman_man:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc68",couple_with_heart_man_man:"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68",couple_with_heart_woman_woman:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc69",family:"\ud83d\udc6a",family_man_woman_boy:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66",family_man_woman_girl:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67",family_man_woman_girl_boy:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",family_man_woman_boy_boy:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",family_man_woman_girl_girl:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",family_man_man_boy:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66",family_man_man_girl:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67",family_man_man_girl_boy:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc66",family_man_man_boy_boy:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66",family_man_man_girl_girl:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc67",family_woman_woman_boy:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66",family_woman_woman_girl:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67",family_woman_woman_girl_boy:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",family_woman_woman_boy_boy:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",family_woman_woman_girl_girl:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",family_man_boy:"\ud83d\udc68\u200d\ud83d\udc66",family_man_boy_boy:"\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66",family_man_girl:"\ud83d\udc68\u200d\ud83d\udc67",family_man_girl_boy:"\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc66",family_man_girl_girl:"\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc67",family_woman_boy:"\ud83d\udc69\u200d\ud83d\udc66",family_woman_boy_boy:"\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",family_woman_girl:"\ud83d\udc69\u200d\ud83d\udc67",family_woman_girl_boy:"\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",family_woman_girl_girl:"\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",speaking_head:"\ud83d\udde3\ufe0f",bust_in_silhouette:"\ud83d\udc64",busts_in_silhouette:"\ud83d\udc65",people_hugging:"\ud83e\udec2",footprints:"\ud83d\udc63",monkey_face:"\ud83d\udc35",monkey:"\ud83d\udc12",gorilla:"\ud83e\udd8d",orangutan:"\ud83e\udda7",dog:"\ud83d\udc36",dog2:"\ud83d\udc15",guide_dog:"\ud83e\uddae",service_dog:"\ud83d\udc15\u200d\ud83e\uddba",poodle:"\ud83d\udc29",wolf:"\ud83d\udc3a",fox_face:"\ud83e\udd8a",raccoon:"\ud83e\udd9d",cat:"\ud83d\udc31",cat2:"\ud83d\udc08",black_cat:"\ud83d\udc08\u200d\u2b1b",lion:"\ud83e\udd81",tiger:"\ud83d\udc2f",tiger2:"\ud83d\udc05",leopard:"\ud83d\udc06",horse:"\ud83d\udc34",moose:"\ud83e\udece",donkey:"\ud83e\udecf",racehorse:"\ud83d\udc0e",unicorn:"\ud83e\udd84",zebra:"\ud83e\udd93",deer:"\ud83e\udd8c",bison:"\ud83e\uddac",cow:"\ud83d\udc2e",ox:"\ud83d\udc02",water_buffalo:"\ud83d\udc03",cow2:"\ud83d\udc04",pig:"\ud83d\udc37",pig2:"\ud83d\udc16",boar:"\ud83d\udc17",pig_nose:"\ud83d\udc3d",ram:"\ud83d\udc0f",sheep:"\ud83d\udc11",goat:"\ud83d\udc10",dromedary_camel:"\ud83d\udc2a",camel:"\ud83d\udc2b",llama:"\ud83e\udd99",giraffe:"\ud83e\udd92",elephant:"\ud83d\udc18",mammoth:"\ud83e\udda3",rhinoceros:"\ud83e\udd8f",hippopotamus:"\ud83e\udd9b",mouse:"\ud83d\udc2d",mouse2:"\ud83d\udc01",rat:"\ud83d\udc00",hamster:"\ud83d\udc39",rabbit:"\ud83d\udc30",rabbit2:"\ud83d\udc07",chipmunk:"\ud83d\udc3f\ufe0f",beaver:"\ud83e\uddab",hedgehog:"\ud83e\udd94",bat:"\ud83e\udd87",bear:"\ud83d\udc3b",polar_bear:"\ud83d\udc3b\u200d\u2744\ufe0f",koala:"\ud83d\udc28",panda_face:"\ud83d\udc3c",sloth:"\ud83e\udda5",otter:"\ud83e\udda6",skunk:"\ud83e\udda8",kangaroo:"\ud83e\udd98",badger:"\ud83e\udda1",feet:"\ud83d\udc3e",paw_prints:"\ud83d\udc3e",turkey:"\ud83e\udd83",chicken:"\ud83d\udc14",rooster:"\ud83d\udc13",hatching_chick:"\ud83d\udc23",baby_chick:"\ud83d\udc24",hatched_chick:"\ud83d\udc25",bird:"\ud83d\udc26",penguin:"\ud83d\udc27",dove:"\ud83d\udd4a\ufe0f",eagle:"\ud83e\udd85",duck:"\ud83e\udd86",swan:"\ud83e\udda2",owl:"\ud83e\udd89",dodo:"\ud83e\udda4",feather:"\ud83e\udeb6",flamingo:"\ud83e\udda9",peacock:"\ud83e\udd9a",parrot:"\ud83e\udd9c",wing:"\ud83e\udebd",black_bird:"\ud83d\udc26\u200d\u2b1b",goose:"\ud83e\udebf",frog:"\ud83d\udc38",crocodile:"\ud83d\udc0a",turtle:"\ud83d\udc22",lizard:"\ud83e\udd8e",snake:"\ud83d\udc0d",dragon_face:"\ud83d\udc32",dragon:"\ud83d\udc09",sauropod:"\ud83e\udd95","t-rex":"\ud83e\udd96",whale:"\ud83d\udc33",whale2:"\ud83d\udc0b",dolphin:"\ud83d\udc2c",flipper:"\ud83d\udc2c",seal:"\ud83e\uddad",fish:"\ud83d\udc1f",tropical_fish:"\ud83d\udc20",blowfish:"\ud83d\udc21",shark:"\ud83e\udd88",octopus:"\ud83d\udc19",shell:"\ud83d\udc1a",coral:"\ud83e\udeb8",jellyfish:"\ud83e\udebc",snail:"\ud83d\udc0c",butterfly:"\ud83e\udd8b",bug:"\ud83d\udc1b",ant:"\ud83d\udc1c",bee:"\ud83d\udc1d",honeybee:"\ud83d\udc1d",beetle:"\ud83e\udeb2",lady_beetle:"\ud83d\udc1e",cricket:"\ud83e\udd97",cockroach:"\ud83e\udeb3",spider:"\ud83d\udd77\ufe0f",spider_web:"\ud83d\udd78\ufe0f",scorpion:"\ud83e\udd82",mosquito:"\ud83e\udd9f",fly:"\ud83e\udeb0",worm:"\ud83e\udeb1",microbe:"\ud83e\udda0",bouquet:"\ud83d\udc90",cherry_blossom:"\ud83c\udf38",white_flower:"\ud83d\udcae",lotus:"\ud83e\udeb7",rosette:"\ud83c\udff5\ufe0f",rose:"\ud83c\udf39",wilted_flower:"\ud83e\udd40",hibiscus:"\ud83c\udf3a",sunflower:"\ud83c\udf3b",blossom:"\ud83c\udf3c",tulip:"\ud83c\udf37",hyacinth:"\ud83e\udebb",seedling:"\ud83c\udf31",potted_plant:"\ud83e\udeb4",evergreen_tree:"\ud83c\udf32",deciduous_tree:"\ud83c\udf33",palm_tree:"\ud83c\udf34",cactus:"\ud83c\udf35",ear_of_rice:"\ud83c\udf3e",herb:"\ud83c\udf3f",shamrock:"\u2618\ufe0f",four_leaf_clover:"\ud83c\udf40",maple_leaf:"\ud83c\udf41",fallen_leaf:"\ud83c\udf42",leaves:"\ud83c\udf43",empty_nest:"\ud83e\udeb9",nest_with_eggs:"\ud83e\udeba",mushroom:"\ud83c\udf44",grapes:"\ud83c\udf47",melon:"\ud83c\udf48",watermelon:"\ud83c\udf49",tangerine:"\ud83c\udf4a",orange:"\ud83c\udf4a",mandarin:"\ud83c\udf4a",lemon:"\ud83c\udf4b",banana:"\ud83c\udf4c",pineapple:"\ud83c\udf4d",mango:"\ud83e\udd6d",apple:"\ud83c\udf4e",green_apple:"\ud83c\udf4f",pear:"\ud83c\udf50",peach:"\ud83c\udf51",cherries:"\ud83c\udf52",strawberry:"\ud83c\udf53",blueberries:"\ud83e\uded0",kiwi_fruit:"\ud83e\udd5d",tomato:"\ud83c\udf45",olive:"\ud83e\uded2",coconut:"\ud83e\udd65",avocado:"\ud83e\udd51",eggplant:"\ud83c\udf46",potato:"\ud83e\udd54",carrot:"\ud83e\udd55",corn:"\ud83c\udf3d",hot_pepper:"\ud83c\udf36\ufe0f",bell_pepper:"\ud83e\uded1",cucumber:"\ud83e\udd52",leafy_green:"\ud83e\udd6c",broccoli:"\ud83e\udd66",garlic:"\ud83e\uddc4",onion:"\ud83e\uddc5",peanuts:"\ud83e\udd5c",beans:"\ud83e\uded8",chestnut:"\ud83c\udf30",ginger_root:"\ud83e\udeda",pea_pod:"\ud83e\udedb",bread:"\ud83c\udf5e",croissant:"\ud83e\udd50",baguette_bread:"\ud83e\udd56",flatbread:"\ud83e\uded3",pretzel:"\ud83e\udd68",bagel:"\ud83e\udd6f",pancakes:"\ud83e\udd5e",waffle:"\ud83e\uddc7",cheese:"\ud83e\uddc0",meat_on_bone:"\ud83c\udf56",poultry_leg:"\ud83c\udf57",cut_of_meat:"\ud83e\udd69",bacon:"\ud83e\udd53",hamburger:"\ud83c\udf54",fries:"\ud83c\udf5f",pizza:"\ud83c\udf55",hotdog:"\ud83c\udf2d",sandwich:"\ud83e\udd6a",taco:"\ud83c\udf2e",burrito:"\ud83c\udf2f",tamale:"\ud83e\uded4",stuffed_flatbread:"\ud83e\udd59",falafel:"\ud83e\uddc6",egg:"\ud83e\udd5a",fried_egg:"\ud83c\udf73",shallow_pan_of_food:"\ud83e\udd58",stew:"\ud83c\udf72",fondue:"\ud83e\uded5",bowl_with_spoon:"\ud83e\udd63",green_salad:"\ud83e\udd57",popcorn:"\ud83c\udf7f",butter:"\ud83e\uddc8",salt:"\ud83e\uddc2",canned_food:"\ud83e\udd6b",bento:"\ud83c\udf71",rice_cracker:"\ud83c\udf58",rice_ball:"\ud83c\udf59",rice:"\ud83c\udf5a",curry:"\ud83c\udf5b",ramen:"\ud83c\udf5c",spaghetti:"\ud83c\udf5d",sweet_potato:"\ud83c\udf60",oden:"\ud83c\udf62",sushi:"\ud83c\udf63",fried_shrimp:"\ud83c\udf64",fish_cake:"\ud83c\udf65",moon_cake:"\ud83e\udd6e",dango:"\ud83c\udf61",dumpling:"\ud83e\udd5f",fortune_cookie:"\ud83e\udd60",takeout_box:"\ud83e\udd61",crab:"\ud83e\udd80",lobster:"\ud83e\udd9e",shrimp:"\ud83e\udd90",squid:"\ud83e\udd91",oyster:"\ud83e\uddaa",icecream:"\ud83c\udf66",shaved_ice:"\ud83c\udf67",ice_cream:"\ud83c\udf68",doughnut:"\ud83c\udf69",cookie:"\ud83c\udf6a",birthday:"\ud83c\udf82",cake:"\ud83c\udf70",cupcake:"\ud83e\uddc1",pie:"\ud83e\udd67",chocolate_bar:"\ud83c\udf6b",candy:"\ud83c\udf6c",lollipop:"\ud83c\udf6d",custard:"\ud83c\udf6e",honey_pot:"\ud83c\udf6f",baby_bottle:"\ud83c\udf7c",milk_glass:"\ud83e\udd5b",coffee:"\u2615",teapot:"\ud83e\uded6",tea:"\ud83c\udf75",sake:"\ud83c\udf76",champagne:"\ud83c\udf7e",wine_glass:"\ud83c\udf77",cocktail:"\ud83c\udf78",tropical_drink:"\ud83c\udf79",beer:"\ud83c\udf7a",beers:"\ud83c\udf7b",clinking_glasses:"\ud83e\udd42",tumbler_glass:"\ud83e\udd43",pouring_liquid:"\ud83e\uded7",cup_with_straw:"\ud83e\udd64",bubble_tea:"\ud83e\uddcb",beverage_box:"\ud83e\uddc3",mate:"\ud83e\uddc9",ice_cube:"\ud83e\uddca",chopsticks:"\ud83e\udd62",plate_with_cutlery:"\ud83c\udf7d\ufe0f",fork_and_knife:"\ud83c\udf74",spoon:"\ud83e\udd44",hocho:"\ud83d\udd2a",knife:"\ud83d\udd2a",jar:"\ud83e\uded9",amphora:"\ud83c\udffa",earth_africa:"\ud83c\udf0d",earth_americas:"\ud83c\udf0e",earth_asia:"\ud83c\udf0f",globe_with_meridians:"\ud83c\udf10",world_map:"\ud83d\uddfa\ufe0f",japan:"\ud83d\uddfe",compass:"\ud83e\udded",mountain_snow:"\ud83c\udfd4\ufe0f",mountain:"\u26f0\ufe0f",volcano:"\ud83c\udf0b",mount_fuji:"\ud83d\uddfb",camping:"\ud83c\udfd5\ufe0f",beach_umbrella:"\ud83c\udfd6\ufe0f",desert:"\ud83c\udfdc\ufe0f",desert_island:"\ud83c\udfdd\ufe0f",national_park:"\ud83c\udfde\ufe0f",stadium:"\ud83c\udfdf\ufe0f",classical_building:"\ud83c\udfdb\ufe0f",building_construction:"\ud83c\udfd7\ufe0f",bricks:"\ud83e\uddf1",rock:"\ud83e\udea8",wood:"\ud83e\udeb5",hut:"\ud83d\uded6",houses:"\ud83c\udfd8\ufe0f",derelict_house:"\ud83c\udfda\ufe0f",house:"\ud83c\udfe0",house_with_garden:"\ud83c\udfe1",office:"\ud83c\udfe2",post_office:"\ud83c\udfe3",european_post_office:"\ud83c\udfe4",hospital:"\ud83c\udfe5",bank:"\ud83c\udfe6",hotel:"\ud83c\udfe8",love_hotel:"\ud83c\udfe9",convenience_store:"\ud83c\udfea",school:"\ud83c\udfeb",department_store:"\ud83c\udfec",factory:"\ud83c\udfed",japanese_castle:"\ud83c\udfef",european_castle:"\ud83c\udff0",wedding:"\ud83d\udc92",tokyo_tower:"\ud83d\uddfc",statue_of_liberty:"\ud83d\uddfd",church:"\u26ea",mosque:"\ud83d\udd4c",hindu_temple:"\ud83d\uded5",synagogue:"\ud83d\udd4d",shinto_shrine:"\u26e9\ufe0f",kaaba:"\ud83d\udd4b",fountain:"\u26f2",tent:"\u26fa",foggy:"\ud83c\udf01",night_with_stars:"\ud83c\udf03",cityscape:"\ud83c\udfd9\ufe0f",sunrise_over_mountains:"\ud83c\udf04",sunrise:"\ud83c\udf05",city_sunset:"\ud83c\udf06",city_sunrise:"\ud83c\udf07",bridge_at_night:"\ud83c\udf09",hotsprings:"\u2668\ufe0f",carousel_horse:"\ud83c\udfa0",playground_slide:"\ud83d\udedd",ferris_wheel:"\ud83c\udfa1",roller_coaster:"\ud83c\udfa2",barber:"\ud83d\udc88",circus_tent:"\ud83c\udfaa",steam_locomotive:"\ud83d\ude82",railway_car:"\ud83d\ude83",bullettrain_side:"\ud83d\ude84",bullettrain_front:"\ud83d\ude85",train2:"\ud83d\ude86",metro:"\ud83d\ude87",light_rail:"\ud83d\ude88",station:"\ud83d\ude89",tram:"\ud83d\ude8a",monorail:"\ud83d\ude9d",mountain_railway:"\ud83d\ude9e",train:"\ud83d\ude8b",bus:"\ud83d\ude8c",oncoming_bus:"\ud83d\ude8d",trolleybus:"\ud83d\ude8e",minibus:"\ud83d\ude90",ambulance:"\ud83d\ude91",fire_engine:"\ud83d\ude92",police_car:"\ud83d\ude93",oncoming_police_car:"\ud83d\ude94",taxi:"\ud83d\ude95",oncoming_taxi:"\ud83d\ude96",car:"\ud83d\ude97",red_car:"\ud83d\ude97",oncoming_automobile:"\ud83d\ude98",blue_car:"\ud83d\ude99",pickup_truck:"\ud83d\udefb",truck:"\ud83d\ude9a",articulated_lorry:"\ud83d\ude9b",tractor:"\ud83d\ude9c",racing_car:"\ud83c\udfce\ufe0f",motorcycle:"\ud83c\udfcd\ufe0f",motor_scooter:"\ud83d\udef5",manual_wheelchair:"\ud83e\uddbd",motorized_wheelchair:"\ud83e\uddbc",auto_rickshaw:"\ud83d\udefa",bike:"\ud83d\udeb2",kick_scooter:"\ud83d\udef4",skateboard:"\ud83d\udef9",roller_skate:"\ud83d\udefc",busstop:"\ud83d\ude8f",motorway:"\ud83d\udee3\ufe0f",railway_track:"\ud83d\udee4\ufe0f",oil_drum:"\ud83d\udee2\ufe0f",fuelpump:"\u26fd",wheel:"\ud83d\udede",rotating_light:"\ud83d\udea8",traffic_light:"\ud83d\udea5",vertical_traffic_light:"\ud83d\udea6",stop_sign:"\ud83d\uded1",construction:"\ud83d\udea7",anchor:"\u2693",ring_buoy:"\ud83d\udedf",boat:"\u26f5",sailboat:"\u26f5",canoe:"\ud83d\udef6",speedboat:"\ud83d\udea4",passenger_ship:"\ud83d\udef3\ufe0f",ferry:"\u26f4\ufe0f",motor_boat:"\ud83d\udee5\ufe0f",ship:"\ud83d\udea2",airplane:"\u2708\ufe0f",small_airplane:"\ud83d\udee9\ufe0f",flight_departure:"\ud83d\udeeb",flight_arrival:"\ud83d\udeec",parachute:"\ud83e\ude82",seat:"\ud83d\udcba",helicopter:"\ud83d\ude81",suspension_railway:"\ud83d\ude9f",mountain_cableway:"\ud83d\udea0",aerial_tramway:"\ud83d\udea1",artificial_satellite:"\ud83d\udef0\ufe0f",rocket:"\ud83d\ude80",flying_saucer:"\ud83d\udef8",bellhop_bell:"\ud83d\udece\ufe0f",luggage:"\ud83e\uddf3",hourglass:"\u231b",hourglass_flowing_sand:"\u23f3",watch:"\u231a",alarm_clock:"\u23f0",stopwatch:"\u23f1\ufe0f",timer_clock:"\u23f2\ufe0f",mantelpiece_clock:"\ud83d\udd70\ufe0f",clock12:"\ud83d\udd5b",clock1230:"\ud83d\udd67",clock1:"\ud83d\udd50",clock130:"\ud83d\udd5c",clock2:"\ud83d\udd51",clock230:"\ud83d\udd5d",clock3:"\ud83d\udd52",clock330:"\ud83d\udd5e",clock4:"\ud83d\udd53",clock430:"\ud83d\udd5f",clock5:"\ud83d\udd54",clock530:"\ud83d\udd60",clock6:"\ud83d\udd55",clock630:"\ud83d\udd61",clock7:"\ud83d\udd56",clock730:"\ud83d\udd62",clock8:"\ud83d\udd57",clock830:"\ud83d\udd63",clock9:"\ud83d\udd58",clock930:"\ud83d\udd64",clock10:"\ud83d\udd59",clock1030:"\ud83d\udd65",clock11:"\ud83d\udd5a",clock1130:"\ud83d\udd66",new_moon:"\ud83c\udf11",waxing_crescent_moon:"\ud83c\udf12",first_quarter_moon:"\ud83c\udf13",moon:"\ud83c\udf14",waxing_gibbous_moon:"\ud83c\udf14",full_moon:"\ud83c\udf15",waning_gibbous_moon:"\ud83c\udf16",last_quarter_moon:"\ud83c\udf17",waning_crescent_moon:"\ud83c\udf18",crescent_moon:"\ud83c\udf19",new_moon_with_face:"\ud83c\udf1a",first_quarter_moon_with_face:"\ud83c\udf1b",last_quarter_moon_with_face:"\ud83c\udf1c",thermometer:"\ud83c\udf21\ufe0f",sunny:"\u2600\ufe0f",full_moon_with_face:"\ud83c\udf1d",sun_with_face:"\ud83c\udf1e",ringed_planet:"\ud83e\ude90",star:"\u2b50",star2:"\ud83c\udf1f",stars:"\ud83c\udf20",milky_way:"\ud83c\udf0c",cloud:"\u2601\ufe0f",partly_sunny:"\u26c5",cloud_with_lightning_and_rain:"\u26c8\ufe0f",sun_behind_small_cloud:"\ud83c\udf24\ufe0f",sun_behind_large_cloud:"\ud83c\udf25\ufe0f",sun_behind_rain_cloud:"\ud83c\udf26\ufe0f",cloud_with_rain:"\ud83c\udf27\ufe0f",cloud_with_snow:"\ud83c\udf28\ufe0f",cloud_with_lightning:"\ud83c\udf29\ufe0f",tornado:"\ud83c\udf2a\ufe0f",fog:"\ud83c\udf2b\ufe0f",wind_face:"\ud83c\udf2c\ufe0f",cyclone:"\ud83c\udf00",rainbow:"\ud83c\udf08",closed_umbrella:"\ud83c\udf02",open_umbrella:"\u2602\ufe0f",umbrella:"\u2614",parasol_on_ground:"\u26f1\ufe0f",zap:"\u26a1",snowflake:"\u2744\ufe0f",snowman_with_snow:"\u2603\ufe0f",snowman:"\u26c4",comet:"\u2604\ufe0f",fire:"\ud83d\udd25",droplet:"\ud83d\udca7",ocean:"\ud83c\udf0a",jack_o_lantern:"\ud83c\udf83",christmas_tree:"\ud83c\udf84",fireworks:"\ud83c\udf86",sparkler:"\ud83c\udf87",firecracker:"\ud83e\udde8",sparkles:"\u2728",balloon:"\ud83c\udf88",tada:"\ud83c\udf89",confetti_ball:"\ud83c\udf8a",tanabata_tree:"\ud83c\udf8b",bamboo:"\ud83c\udf8d",dolls:"\ud83c\udf8e",flags:"\ud83c\udf8f",wind_chime:"\ud83c\udf90",rice_scene:"\ud83c\udf91",red_envelope:"\ud83e\udde7",ribbon:"\ud83c\udf80",gift:"\ud83c\udf81",reminder_ribbon:"\ud83c\udf97\ufe0f",tickets:"\ud83c\udf9f\ufe0f",ticket:"\ud83c\udfab",medal_military:"\ud83c\udf96\ufe0f",trophy:"\ud83c\udfc6",medal_sports:"\ud83c\udfc5","1st_place_medal":"\ud83e\udd47","2nd_place_medal":"\ud83e\udd48","3rd_place_medal":"\ud83e\udd49",soccer:"\u26bd",baseball:"\u26be",softball:"\ud83e\udd4e",basketball:"\ud83c\udfc0",volleyball:"\ud83c\udfd0",football:"\ud83c\udfc8",rugby_football:"\ud83c\udfc9",tennis:"\ud83c\udfbe",flying_disc:"\ud83e\udd4f",bowling:"\ud83c\udfb3",cricket_game:"\ud83c\udfcf",field_hockey:"\ud83c\udfd1",ice_hockey:"\ud83c\udfd2",lacrosse:"\ud83e\udd4d",ping_pong:"\ud83c\udfd3",badminton:"\ud83c\udff8",boxing_glove:"\ud83e\udd4a",martial_arts_uniform:"\ud83e\udd4b",goal_net:"\ud83e\udd45",golf:"\u26f3",ice_skate:"\u26f8\ufe0f",fishing_pole_and_fish:"\ud83c\udfa3",diving_mask:"\ud83e\udd3f",running_shirt_with_sash:"\ud83c\udfbd",ski:"\ud83c\udfbf",sled:"\ud83d\udef7",curling_stone:"\ud83e\udd4c",dart:"\ud83c\udfaf",yo_yo:"\ud83e\ude80",kite:"\ud83e\ude81",gun:"\ud83d\udd2b","8ball":"\ud83c\udfb1",crystal_ball:"\ud83d\udd2e",magic_wand:"\ud83e\ude84",video_game:"\ud83c\udfae",joystick:"\ud83d\udd79\ufe0f",slot_machine:"\ud83c\udfb0",game_die:"\ud83c\udfb2",jigsaw:"\ud83e\udde9",teddy_bear:"\ud83e\uddf8",pinata:"\ud83e\ude85",mirror_ball:"\ud83e\udea9",nesting_dolls:"\ud83e\ude86",spades:"\u2660\ufe0f",hearts:"\u2665\ufe0f",diamonds:"\u2666\ufe0f",clubs:"\u2663\ufe0f",chess_pawn:"\u265f\ufe0f",black_joker:"\ud83c\udccf",mahjong:"\ud83c\udc04",flower_playing_cards:"\ud83c\udfb4",performing_arts:"\ud83c\udfad",framed_picture:"\ud83d\uddbc\ufe0f",art:"\ud83c\udfa8",thread:"\ud83e\uddf5",sewing_needle:"\ud83e\udea1",yarn:"\ud83e\uddf6",knot:"\ud83e\udea2",eyeglasses:"\ud83d\udc53",dark_sunglasses:"\ud83d\udd76\ufe0f",goggles:"\ud83e\udd7d",lab_coat:"\ud83e\udd7c",safety_vest:"\ud83e\uddba",necktie:"\ud83d\udc54",shirt:"\ud83d\udc55",tshirt:"\ud83d\udc55",jeans:"\ud83d\udc56",scarf:"\ud83e\udde3",gloves:"\ud83e\udde4",coat:"\ud83e\udde5",socks:"\ud83e\udde6",dress:"\ud83d\udc57",kimono:"\ud83d\udc58",sari:"\ud83e\udd7b",one_piece_swimsuit:"\ud83e\ude71",swim_brief:"\ud83e\ude72",shorts:"\ud83e\ude73",bikini:"\ud83d\udc59",womans_clothes:"\ud83d\udc5a",folding_hand_fan:"\ud83e\udead",purse:"\ud83d\udc5b",handbag:"\ud83d\udc5c",pouch:"\ud83d\udc5d",shopping:"\ud83d\udecd\ufe0f",school_satchel:"\ud83c\udf92",thong_sandal:"\ud83e\ude74",mans_shoe:"\ud83d\udc5e",shoe:"\ud83d\udc5e",athletic_shoe:"\ud83d\udc5f",hiking_boot:"\ud83e\udd7e",flat_shoe:"\ud83e\udd7f",high_heel:"\ud83d\udc60",sandal:"\ud83d\udc61",ballet_shoes:"\ud83e\ude70",boot:"\ud83d\udc62",hair_pick:"\ud83e\udeae",crown:"\ud83d\udc51",womans_hat:"\ud83d\udc52",tophat:"\ud83c\udfa9",mortar_board:"\ud83c\udf93",billed_cap:"\ud83e\udde2",military_helmet:"\ud83e\ude96",rescue_worker_helmet:"\u26d1\ufe0f",prayer_beads:"\ud83d\udcff",lipstick:"\ud83d\udc84",ring:"\ud83d\udc8d",gem:"\ud83d\udc8e",mute:"\ud83d\udd07",speaker:"\ud83d\udd08",sound:"\ud83d\udd09",loud_sound:"\ud83d\udd0a",loudspeaker:"\ud83d\udce2",mega:"\ud83d\udce3",postal_horn:"\ud83d\udcef",bell:"\ud83d\udd14",no_bell:"\ud83d\udd15",musical_score:"\ud83c\udfbc",musical_note:"\ud83c\udfb5",notes:"\ud83c\udfb6",studio_microphone:"\ud83c\udf99\ufe0f",level_slider:"\ud83c\udf9a\ufe0f",control_knobs:"\ud83c\udf9b\ufe0f",microphone:"\ud83c\udfa4",headphones:"\ud83c\udfa7",radio:"\ud83d\udcfb",saxophone:"\ud83c\udfb7",accordion:"\ud83e\ude97",guitar:"\ud83c\udfb8",musical_keyboard:"\ud83c\udfb9",trumpet:"\ud83c\udfba",violin:"\ud83c\udfbb",banjo:"\ud83e\ude95",drum:"\ud83e\udd41",long_drum:"\ud83e\ude98",maracas:"\ud83e\ude87",flute:"\ud83e\ude88",iphone:"\ud83d\udcf1",calling:"\ud83d\udcf2",phone:"\u260e\ufe0f",telephone:"\u260e\ufe0f",telephone_receiver:"\ud83d\udcde",pager:"\ud83d\udcdf",fax:"\ud83d\udce0",battery:"\ud83d\udd0b",low_battery:"\ud83e\udeab",electric_plug:"\ud83d\udd0c",computer:"\ud83d\udcbb",desktop_computer:"\ud83d\udda5\ufe0f",printer:"\ud83d\udda8\ufe0f",keyboard:"\u2328\ufe0f",computer_mouse:"\ud83d\uddb1\ufe0f",trackball:"\ud83d\uddb2\ufe0f",minidisc:"\ud83d\udcbd",floppy_disk:"\ud83d\udcbe",cd:"\ud83d\udcbf",dvd:"\ud83d\udcc0",abacus:"\ud83e\uddee",movie_camera:"\ud83c\udfa5",film_strip:"\ud83c\udf9e\ufe0f",film_projector:"\ud83d\udcfd\ufe0f",clapper:"\ud83c\udfac",tv:"\ud83d\udcfa",camera:"\ud83d\udcf7",camera_flash:"\ud83d\udcf8",video_camera:"\ud83d\udcf9",vhs:"\ud83d\udcfc",mag:"\ud83d\udd0d",mag_right:"\ud83d\udd0e",candle:"\ud83d\udd6f\ufe0f",bulb:"\ud83d\udca1",flashlight:"\ud83d\udd26",izakaya_lantern:"\ud83c\udfee",lantern:"\ud83c\udfee",diya_lamp:"\ud83e\ude94",notebook_with_decorative_cover:"\ud83d\udcd4",closed_book:"\ud83d\udcd5",book:"\ud83d\udcd6",open_book:"\ud83d\udcd6",green_book:"\ud83d\udcd7",blue_book:"\ud83d\udcd8",orange_book:"\ud83d\udcd9",books:"\ud83d\udcda",notebook:"\ud83d\udcd3",ledger:"\ud83d\udcd2",page_with_curl:"\ud83d\udcc3",scroll:"\ud83d\udcdc",page_facing_up:"\ud83d\udcc4",newspaper:"\ud83d\udcf0",newspaper_roll:"\ud83d\uddde\ufe0f",bookmark_tabs:"\ud83d\udcd1",bookmark:"\ud83d\udd16",label:"\ud83c\udff7\ufe0f",moneybag:"\ud83d\udcb0",coin:"\ud83e\ude99",yen:"\ud83d\udcb4",dollar:"\ud83d\udcb5",euro:"\ud83d\udcb6",pound:"\ud83d\udcb7",money_with_wings:"\ud83d\udcb8",credit_card:"\ud83d\udcb3",receipt:"\ud83e\uddfe",chart:"\ud83d\udcb9",envelope:"\u2709\ufe0f",email:"\ud83d\udce7","e-mail":"\ud83d\udce7",incoming_envelope:"\ud83d\udce8",envelope_with_arrow:"\ud83d\udce9",outbox_tray:"\ud83d\udce4",inbox_tray:"\ud83d\udce5",package:"\ud83d\udce6",mailbox:"\ud83d\udceb",mailbox_closed:"\ud83d\udcea",mailbox_with_mail:"\ud83d\udcec",mailbox_with_no_mail:"\ud83d\udced",postbox:"\ud83d\udcee",ballot_box:"\ud83d\uddf3\ufe0f",pencil2:"\u270f\ufe0f",black_nib:"\u2712\ufe0f",fountain_pen:"\ud83d\udd8b\ufe0f",pen:"\ud83d\udd8a\ufe0f",paintbrush:"\ud83d\udd8c\ufe0f",crayon:"\ud83d\udd8d\ufe0f",memo:"\ud83d\udcdd",pencil:"\ud83d\udcdd",briefcase:"\ud83d\udcbc",file_folder:"\ud83d\udcc1",open_file_folder:"\ud83d\udcc2",card_index_dividers:"\ud83d\uddc2\ufe0f",date:"\ud83d\udcc5",calendar:"\ud83d\udcc6",spiral_notepad:"\ud83d\uddd2\ufe0f",spiral_calendar:"\ud83d\uddd3\ufe0f",card_index:"\ud83d\udcc7",chart_with_upwards_trend:"\ud83d\udcc8",chart_with_downwards_trend:"\ud83d\udcc9",bar_chart:"\ud83d\udcca",clipboard:"\ud83d\udccb",pushpin:"\ud83d\udccc",round_pushpin:"\ud83d\udccd",paperclip:"\ud83d\udcce",paperclips:"\ud83d\udd87\ufe0f",straight_ruler:"\ud83d\udccf",triangular_ruler:"\ud83d\udcd0",scissors:"\u2702\ufe0f",card_file_box:"\ud83d\uddc3\ufe0f",file_cabinet:"\ud83d\uddc4\ufe0f",wastebasket:"\ud83d\uddd1\ufe0f",lock:"\ud83d\udd12",unlock:"\ud83d\udd13",lock_with_ink_pen:"\ud83d\udd0f",closed_lock_with_key:"\ud83d\udd10",key:"\ud83d\udd11",old_key:"\ud83d\udddd\ufe0f",hammer:"\ud83d\udd28",axe:"\ud83e\ude93",pick:"\u26cf\ufe0f",hammer_and_pick:"\u2692\ufe0f",hammer_and_wrench:"\ud83d\udee0\ufe0f",dagger:"\ud83d\udde1\ufe0f",crossed_swords:"\u2694\ufe0f",bomb:"\ud83d\udca3",boomerang:"\ud83e\ude83",bow_and_arrow:"\ud83c\udff9",shield:"\ud83d\udee1\ufe0f",carpentry_saw:"\ud83e\ude9a",wrench:"\ud83d\udd27",screwdriver:"\ud83e\ude9b",nut_and_bolt:"\ud83d\udd29",gear:"\u2699\ufe0f",clamp:"\ud83d\udddc\ufe0f",balance_scale:"\u2696\ufe0f",probing_cane:"\ud83e\uddaf",link:"\ud83d\udd17",chains:"\u26d3\ufe0f",hook:"\ud83e\ude9d",toolbox:"\ud83e\uddf0",magnet:"\ud83e\uddf2",ladder:"\ud83e\ude9c",alembic:"\u2697\ufe0f",test_tube:"\ud83e\uddea",petri_dish:"\ud83e\uddeb",dna:"\ud83e\uddec",microscope:"\ud83d\udd2c",telescope:"\ud83d\udd2d",satellite:"\ud83d\udce1",syringe:"\ud83d\udc89",drop_of_blood:"\ud83e\ude78",pill:"\ud83d\udc8a",adhesive_bandage:"\ud83e\ude79",crutch:"\ud83e\ude7c",stethoscope:"\ud83e\ude7a",x_ray:"\ud83e\ude7b",door:"\ud83d\udeaa",elevator:"\ud83d\uded7",mirror:"\ud83e\ude9e",window:"\ud83e\ude9f",bed:"\ud83d\udecf\ufe0f",couch_and_lamp:"\ud83d\udecb\ufe0f",chair:"\ud83e\ude91",toilet:"\ud83d\udebd",plunger:"\ud83e\udea0",shower:"\ud83d\udebf",bathtub:"\ud83d\udec1",mouse_trap:"\ud83e\udea4",razor:"\ud83e\ude92",lotion_bottle:"\ud83e\uddf4",safety_pin:"\ud83e\uddf7",broom:"\ud83e\uddf9",basket:"\ud83e\uddfa",roll_of_paper:"\ud83e\uddfb",bucket:"\ud83e\udea3",soap:"\ud83e\uddfc",bubbles:"\ud83e\udee7",toothbrush:"\ud83e\udea5",sponge:"\ud83e\uddfd",fire_extinguisher:"\ud83e\uddef",shopping_cart:"\ud83d\uded2",smoking:"\ud83d\udeac",coffin:"\u26b0\ufe0f",headstone:"\ud83e\udea6",funeral_urn:"\u26b1\ufe0f",nazar_amulet:"\ud83e\uddff",hamsa:"\ud83e\udeac",moyai:"\ud83d\uddff",placard:"\ud83e\udea7",identification_card:"\ud83e\udeaa",atm:"\ud83c\udfe7",put_litter_in_its_place:"\ud83d\udeae",potable_water:"\ud83d\udeb0",wheelchair:"\u267f",mens:"\ud83d\udeb9",womens:"\ud83d\udeba",restroom:"\ud83d\udebb",baby_symbol:"\ud83d\udebc",wc:"\ud83d\udebe",passport_control:"\ud83d\udec2",customs:"\ud83d\udec3",baggage_claim:"\ud83d\udec4",left_luggage:"\ud83d\udec5",warning:"\u26a0\ufe0f",children_crossing:"\ud83d\udeb8",no_entry:"\u26d4",no_entry_sign:"\ud83d\udeab",no_bicycles:"\ud83d\udeb3",no_smoking:"\ud83d\udead",do_not_litter:"\ud83d\udeaf","non-potable_water":"\ud83d\udeb1",no_pedestrians:"\ud83d\udeb7",no_mobile_phones:"\ud83d\udcf5",underage:"\ud83d\udd1e",radioactive:"\u2622\ufe0f",biohazard:"\u2623\ufe0f",arrow_up:"\u2b06\ufe0f",arrow_upper_right:"\u2197\ufe0f",arrow_right:"\u27a1\ufe0f",arrow_lower_right:"\u2198\ufe0f",arrow_down:"\u2b07\ufe0f",arrow_lower_left:"\u2199\ufe0f",arrow_left:"\u2b05\ufe0f",arrow_upper_left:"\u2196\ufe0f",arrow_up_down:"\u2195\ufe0f",left_right_arrow:"\u2194\ufe0f",leftwards_arrow_with_hook:"\u21a9\ufe0f",arrow_right_hook:"\u21aa\ufe0f",arrow_heading_up:"\u2934\ufe0f",arrow_heading_down:"\u2935\ufe0f",arrows_clockwise:"\ud83d\udd03",arrows_counterclockwise:"\ud83d\udd04",back:"\ud83d\udd19",end:"\ud83d\udd1a",on:"\ud83d\udd1b",soon:"\ud83d\udd1c",top:"\ud83d\udd1d",place_of_worship:"\ud83d\uded0",atom_symbol:"\u269b\ufe0f",om:"\ud83d\udd49\ufe0f",star_of_david:"\u2721\ufe0f",wheel_of_dharma:"\u2638\ufe0f",yin_yang:"\u262f\ufe0f",latin_cross:"\u271d\ufe0f",orthodox_cross:"\u2626\ufe0f",star_and_crescent:"\u262a\ufe0f",peace_symbol:"\u262e\ufe0f",menorah:"\ud83d\udd4e",six_pointed_star:"\ud83d\udd2f",khanda:"\ud83e\udeaf",aries:"\u2648",taurus:"\u2649",gemini:"\u264a",cancer:"\u264b",leo:"\u264c",virgo:"\u264d",libra:"\u264e",scorpius:"\u264f",sagittarius:"\u2650",capricorn:"\u2651",aquarius:"\u2652",pisces:"\u2653",ophiuchus:"\u26ce",twisted_rightwards_arrows:"\ud83d\udd00",repeat:"\ud83d\udd01",repeat_one:"\ud83d\udd02",arrow_forward:"\u25b6\ufe0f",fast_forward:"\u23e9",next_track_button:"\u23ed\ufe0f",play_or_pause_button:"\u23ef\ufe0f",arrow_backward:"\u25c0\ufe0f",rewind:"\u23ea",previous_track_button:"\u23ee\ufe0f",arrow_up_small:"\ud83d\udd3c",arrow_double_up:"\u23eb",arrow_down_small:"\ud83d\udd3d",arrow_double_down:"\u23ec",pause_button:"\u23f8\ufe0f",stop_button:"\u23f9\ufe0f",record_button:"\u23fa\ufe0f",eject_button:"\u23cf\ufe0f",cinema:"\ud83c\udfa6",low_brightness:"\ud83d\udd05",high_brightness:"\ud83d\udd06",signal_strength:"\ud83d\udcf6",wireless:"\ud83d\udedc",vibration_mode:"\ud83d\udcf3",mobile_phone_off:"\ud83d\udcf4",female_sign:"\u2640\ufe0f",male_sign:"\u2642\ufe0f",transgender_symbol:"\u26a7\ufe0f",heavy_multiplication_x:"\u2716\ufe0f",heavy_plus_sign:"\u2795",heavy_minus_sign:"\u2796",heavy_division_sign:"\u2797",heavy_equals_sign:"\ud83d\udff0",infinity:"\u267e\ufe0f",bangbang:"\u203c\ufe0f",interrobang:"\u2049\ufe0f",question:"\u2753",grey_question:"\u2754",grey_exclamation:"\u2755",exclamation:"\u2757",heavy_exclamation_mark:"\u2757",wavy_dash:"\u3030\ufe0f",currency_exchange:"\ud83d\udcb1",heavy_dollar_sign:"\ud83d\udcb2",medical_symbol:"\u2695\ufe0f",recycle:"\u267b\ufe0f",fleur_de_lis:"\u269c\ufe0f",trident:"\ud83d\udd31",name_badge:"\ud83d\udcdb",beginner:"\ud83d\udd30",o:"\u2b55",white_check_mark:"\u2705",ballot_box_with_check:"\u2611\ufe0f",heavy_check_mark:"\u2714\ufe0f",x:"\u274c",negative_squared_cross_mark:"\u274e",curly_loop:"\u27b0",loop:"\u27bf",part_alternation_mark:"\u303d\ufe0f",eight_spoked_asterisk:"\u2733\ufe0f",eight_pointed_black_star:"\u2734\ufe0f",sparkle:"\u2747\ufe0f",copyright:"\xa9\ufe0f",registered:"\xae\ufe0f",tm:"\u2122\ufe0f",hash:"#\ufe0f\u20e3",asterisk:"*\ufe0f\u20e3",zero:"0\ufe0f\u20e3",one:"1\ufe0f\u20e3",two:"2\ufe0f\u20e3",three:"3\ufe0f\u20e3",four:"4\ufe0f\u20e3",five:"5\ufe0f\u20e3",six:"6\ufe0f\u20e3",seven:"7\ufe0f\u20e3",eight:"8\ufe0f\u20e3",nine:"9\ufe0f\u20e3",keycap_ten:"\ud83d\udd1f",capital_abcd:"\ud83d\udd20",abcd:"\ud83d\udd21",symbols:"\ud83d\udd23",abc:"\ud83d\udd24",a:"\ud83c\udd70\ufe0f",ab:"\ud83c\udd8e",b:"\ud83c\udd71\ufe0f",cl:"\ud83c\udd91",cool:"\ud83c\udd92",free:"\ud83c\udd93",information_source:"\u2139\ufe0f",id:"\ud83c\udd94",m:"\u24c2\ufe0f",new:"\ud83c\udd95",ng:"\ud83c\udd96",o2:"\ud83c\udd7e\ufe0f",ok:"\ud83c\udd97",parking:"\ud83c\udd7f\ufe0f",sos:"\ud83c\udd98",up:"\ud83c\udd99",vs:"\ud83c\udd9a",koko:"\ud83c\ude01",sa:"\ud83c\ude02\ufe0f",u6708:"\ud83c\ude37\ufe0f",u6709:"\ud83c\ude36",u6307:"\ud83c\ude2f",ideograph_advantage:"\ud83c\ude50",u5272:"\ud83c\ude39",u7121:"\ud83c\ude1a",u7981:"\ud83c\ude32",accept:"\ud83c\ude51",u7533:"\ud83c\ude38",u5408:"\ud83c\ude34",u7a7a:"\ud83c\ude33",congratulations:"\u3297\ufe0f",secret:"\u3299\ufe0f",u55b6:"\ud83c\ude3a",u6e80:"\ud83c\ude35",red_circle:"\ud83d\udd34",orange_circle:"\ud83d\udfe0",yellow_circle:"\ud83d\udfe1",green_circle:"\ud83d\udfe2",large_blue_circle:"\ud83d\udd35",purple_circle:"\ud83d\udfe3",brown_circle:"\ud83d\udfe4",black_circle:"\u26ab",white_circle:"\u26aa",red_square:"\ud83d\udfe5",orange_square:"\ud83d\udfe7",yellow_square:"\ud83d\udfe8",green_square:"\ud83d\udfe9",blue_square:"\ud83d\udfe6",purple_square:"\ud83d\udfea",brown_square:"\ud83d\udfeb",black_large_square:"\u2b1b",white_large_square:"\u2b1c",black_medium_square:"\u25fc\ufe0f",white_medium_square:"\u25fb\ufe0f",black_medium_small_square:"\u25fe",white_medium_small_square:"\u25fd",black_small_square:"\u25aa\ufe0f",white_small_square:"\u25ab\ufe0f",large_orange_diamond:"\ud83d\udd36",large_blue_diamond:"\ud83d\udd37",small_orange_diamond:"\ud83d\udd38",small_blue_diamond:"\ud83d\udd39",small_red_triangle:"\ud83d\udd3a",small_red_triangle_down:"\ud83d\udd3b",diamond_shape_with_a_dot_inside:"\ud83d\udca0",radio_button:"\ud83d\udd18",white_square_button:"\ud83d\udd33",black_square_button:"\ud83d\udd32",checkered_flag:"\ud83c\udfc1",triangular_flag_on_post:"\ud83d\udea9",crossed_flags:"\ud83c\udf8c",black_flag:"\ud83c\udff4",white_flag:"\ud83c\udff3\ufe0f",rainbow_flag:"\ud83c\udff3\ufe0f\u200d\ud83c\udf08",transgender_flag:"\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f",pirate_flag:"\ud83c\udff4\u200d\u2620\ufe0f",ascension_island:"\ud83c\udde6\ud83c\udde8",andorra:"\ud83c\udde6\ud83c\udde9",united_arab_emirates:"\ud83c\udde6\ud83c\uddea",afghanistan:"\ud83c\udde6\ud83c\uddeb",antigua_barbuda:"\ud83c\udde6\ud83c\uddec",anguilla:"\ud83c\udde6\ud83c\uddee",albania:"\ud83c\udde6\ud83c\uddf1",armenia:"\ud83c\udde6\ud83c\uddf2",angola:"\ud83c\udde6\ud83c\uddf4",antarctica:"\ud83c\udde6\ud83c\uddf6",argentina:"\ud83c\udde6\ud83c\uddf7",american_samoa:"\ud83c\udde6\ud83c\uddf8",austria:"\ud83c\udde6\ud83c\uddf9",australia:"\ud83c\udde6\ud83c\uddfa",aruba:"\ud83c\udde6\ud83c\uddfc",aland_islands:"\ud83c\udde6\ud83c\uddfd",azerbaijan:"\ud83c\udde6\ud83c\uddff",bosnia_herzegovina:"\ud83c\udde7\ud83c\udde6",barbados:"\ud83c\udde7\ud83c\udde7",bangladesh:"\ud83c\udde7\ud83c\udde9",belgium:"\ud83c\udde7\ud83c\uddea",burkina_faso:"\ud83c\udde7\ud83c\uddeb",bulgaria:"\ud83c\udde7\ud83c\uddec",bahrain:"\ud83c\udde7\ud83c\udded",burundi:"\ud83c\udde7\ud83c\uddee",benin:"\ud83c\udde7\ud83c\uddef",st_barthelemy:"\ud83c\udde7\ud83c\uddf1",bermuda:"\ud83c\udde7\ud83c\uddf2",brunei:"\ud83c\udde7\ud83c\uddf3",bolivia:"\ud83c\udde7\ud83c\uddf4",caribbean_netherlands:"\ud83c\udde7\ud83c\uddf6",brazil:"\ud83c\udde7\ud83c\uddf7",bahamas:"\ud83c\udde7\ud83c\uddf8",bhutan:"\ud83c\udde7\ud83c\uddf9",bouvet_island:"\ud83c\udde7\ud83c\uddfb",botswana:"\ud83c\udde7\ud83c\uddfc",belarus:"\u2b1c\ufe0f\ud83d\udfe5\u2b1c",belize:"\ud83c\udde7\ud83c\uddff",canada:"\ud83c\udde8\ud83c\udde6",cocos_islands:"\ud83c\udde8\ud83c\udde8",congo_kinshasa:"\ud83c\udde8\ud83c\udde9",central_african_republic:"\ud83c\udde8\ud83c\uddeb",congo_brazzaville:"\ud83c\udde8\ud83c\uddec",switzerland:"\ud83c\udde8\ud83c\udded",cote_divoire:"\ud83c\udde8\ud83c\uddee",cook_islands:"\ud83c\udde8\ud83c\uddf0",chile:"\ud83c\udde8\ud83c\uddf1",cameroon:"\ud83c\udde8\ud83c\uddf2",cn:"\ud83c\udde8\ud83c\uddf3",colombia:"\ud83c\udde8\ud83c\uddf4",clipperton_island:"\ud83c\udde8\ud83c\uddf5",costa_rica:"\ud83c\udde8\ud83c\uddf7",cuba:"\ud83c\udde8\ud83c\uddfa",cape_verde:"\ud83c\udde8\ud83c\uddfb",curacao:"\ud83c\udde8\ud83c\uddfc",christmas_island:"\ud83c\udde8\ud83c\uddfd",cyprus:"\ud83c\udde8\ud83c\uddfe",czech_republic:"\ud83c\udde8\ud83c\uddff",de:"\ud83c\udde9\ud83c\uddea",diego_garcia:"\ud83c\udde9\ud83c\uddec",djibouti:"\ud83c\udde9\ud83c\uddef",denmark:"\ud83c\udde9\ud83c\uddf0",dominica:"\ud83c\udde9\ud83c\uddf2",dominican_republic:"\ud83c\udde9\ud83c\uddf4",algeria:"\ud83c\udde9\ud83c\uddff",ceuta_melilla:"\ud83c\uddea\ud83c\udde6",ecuador:"\ud83c\uddea\ud83c\udde8",estonia:"\ud83c\uddea\ud83c\uddea",egypt:"\ud83c\uddea\ud83c\uddec",western_sahara:"\ud83c\uddea\ud83c\udded",eritrea:"\ud83c\uddea\ud83c\uddf7",es:"\ud83c\uddea\ud83c\uddf8",ethiopia:"\ud83c\uddea\ud83c\uddf9",eu:"\ud83c\uddea\ud83c\uddfa",european_union:"\ud83c\uddea\ud83c\uddfa",finland:"\ud83c\uddeb\ud83c\uddee",fiji:"\ud83c\uddeb\ud83c\uddef",falkland_islands:"\ud83c\uddeb\ud83c\uddf0",micronesia:"\ud83c\uddeb\ud83c\uddf2",faroe_islands:"\ud83c\uddeb\ud83c\uddf4",fr:"\ud83c\uddeb\ud83c\uddf7",gabon:"\ud83c\uddec\ud83c\udde6",gb:"\ud83c\uddec\ud83c\udde7",uk:"\ud83c\uddec\ud83c\udde7",grenada:"\ud83c\uddec\ud83c\udde9",georgia:"\ud83c\uddec\ud83c\uddea",french_guiana:"\ud83c\uddec\ud83c\uddeb",guernsey:"\ud83c\uddec\ud83c\uddec",ghana:"\ud83c\uddec\ud83c\udded",gibraltar:"\ud83c\uddec\ud83c\uddee",greenland:"\ud83c\uddec\ud83c\uddf1",gambia:"\ud83c\uddec\ud83c\uddf2",guinea:"\ud83c\uddec\ud83c\uddf3",guadeloupe:"\ud83c\uddec\ud83c\uddf5",equatorial_guinea:"\ud83c\uddec\ud83c\uddf6",greece:"\ud83c\uddec\ud83c\uddf7",south_georgia_south_sandwich_islands:"\ud83c\uddec\ud83c\uddf8",guatemala:"\ud83c\uddec\ud83c\uddf9",guam:"\ud83c\uddec\ud83c\uddfa",guinea_bissau:"\ud83c\uddec\ud83c\uddfc",guyana:"\ud83c\uddec\ud83c\uddfe",hong_kong:"\ud83c\udded\ud83c\uddf0",heard_mcdonald_islands:"\ud83c\udded\ud83c\uddf2",honduras:"\ud83c\udded\ud83c\uddf3",croatia:"\ud83c\udded\ud83c\uddf7",haiti:"\ud83c\udded\ud83c\uddf9",hungary:"\ud83c\udded\ud83c\uddfa",canary_islands:"\ud83c\uddee\ud83c\udde8",indonesia:"\ud83c\uddee\ud83c\udde9",ireland:"\ud83c\uddee\ud83c\uddea",israel:"\ud83c\uddee\ud83c\uddf1",isle_of_man:"\ud83c\uddee\ud83c\uddf2",india:"\ud83c\uddee\ud83c\uddf3",british_indian_ocean_territory:"\ud83c\uddee\ud83c\uddf4",iraq:"\ud83c\uddee\ud83c\uddf6",iran:"\ud83c\uddee\ud83c\uddf7",iceland:"\ud83c\uddee\ud83c\uddf8",it:"\ud83c\uddee\ud83c\uddf9",jersey:"\ud83c\uddef\ud83c\uddea",jamaica:"\ud83c\uddef\ud83c\uddf2",jordan:"\ud83c\uddef\ud83c\uddf4",jp:"\ud83c\uddef\ud83c\uddf5",kenya:"\ud83c\uddf0\ud83c\uddea",kyrgyzstan:"\ud83c\uddf0\ud83c\uddec",cambodia:"\ud83c\uddf0\ud83c\udded",kiribati:"\ud83c\uddf0\ud83c\uddee",comoros:"\ud83c\uddf0\ud83c\uddf2",st_kitts_nevis:"\ud83c\uddf0\ud83c\uddf3",north_korea:"\ud83c\uddf0\ud83c\uddf5",kr:"\ud83c\uddf0\ud83c\uddf7",kuwait:"\ud83c\uddf0\ud83c\uddfc",cayman_islands:"\ud83c\uddf0\ud83c\uddfe",kazakhstan:"\ud83c\uddf0\ud83c\uddff",laos:"\ud83c\uddf1\ud83c\udde6",lebanon:"\ud83c\uddf1\ud83c\udde7",st_lucia:"\ud83c\uddf1\ud83c\udde8",liechtenstein:"\ud83c\uddf1\ud83c\uddee",sri_lanka:"\ud83c\uddf1\ud83c\uddf0",liberia:"\ud83c\uddf1\ud83c\uddf7",lesotho:"\ud83c\uddf1\ud83c\uddf8",lithuania:"\ud83c\uddf1\ud83c\uddf9",luxembourg:"\ud83c\uddf1\ud83c\uddfa",latvia:"\ud83c\uddf1\ud83c\uddfb",libya:"\ud83c\uddf1\ud83c\uddfe",morocco:"\ud83c\uddf2\ud83c\udde6",monaco:"\ud83c\uddf2\ud83c\udde8",moldova:"\ud83c\uddf2\ud83c\udde9",montenegro:"\ud83c\uddf2\ud83c\uddea",st_martin:"\ud83c\uddf2\ud83c\uddeb",madagascar:"\ud83c\uddf2\ud83c\uddec",marshall_islands:"\ud83c\uddf2\ud83c\udded",macedonia:"\ud83c\uddf2\ud83c\uddf0",mali:"\ud83c\uddf2\ud83c\uddf1",myanmar:"\ud83c\uddf2\ud83c\uddf2",mongolia:"\ud83c\uddf2\ud83c\uddf3",macau:"\ud83c\uddf2\ud83c\uddf4",northern_mariana_islands:"\ud83c\uddf2\ud83c\uddf5",martinique:"\ud83c\uddf2\ud83c\uddf6",mauritania:"\ud83c\uddf2\ud83c\uddf7",montserrat:"\ud83c\uddf2\ud83c\uddf8",malta:"\ud83c\uddf2\ud83c\uddf9",mauritius:"\ud83c\uddf2\ud83c\uddfa",maldives:"\ud83c\uddf2\ud83c\uddfb",malawi:"\ud83c\uddf2\ud83c\uddfc",mexico:"\ud83c\uddf2\ud83c\uddfd",malaysia:"\ud83c\uddf2\ud83c\uddfe",mozambique:"\ud83c\uddf2\ud83c\uddff",namibia:"\ud83c\uddf3\ud83c\udde6",new_caledonia:"\ud83c\uddf3\ud83c\udde8",niger:"\ud83c\uddf3\ud83c\uddea",norfolk_island:"\ud83c\uddf3\ud83c\uddeb",nigeria:"\ud83c\uddf3\ud83c\uddec",nicaragua:"\ud83c\uddf3\ud83c\uddee",netherlands:"\ud83c\uddf3\ud83c\uddf1",norway:"\ud83c\uddf3\ud83c\uddf4",nepal:"\ud83c\uddf3\ud83c\uddf5",nauru:"\ud83c\uddf3\ud83c\uddf7",niue:"\ud83c\uddf3\ud83c\uddfa",new_zealand:"\ud83c\uddf3\ud83c\uddff",oman:"\ud83c\uddf4\ud83c\uddf2",panama:"\ud83c\uddf5\ud83c\udde6",peru:"\ud83c\uddf5\ud83c\uddea",french_polynesia:"\ud83c\uddf5\ud83c\uddeb",papua_new_guinea:"\ud83c\uddf5\ud83c\uddec",philippines:"\ud83c\uddf5\ud83c\udded",pakistan:"\ud83c\uddf5\ud83c\uddf0",poland:"\ud83c\uddf5\ud83c\uddf1",st_pierre_miquelon:"\ud83c\uddf5\ud83c\uddf2",pitcairn_islands:"\ud83c\uddf5\ud83c\uddf3",puerto_rico:"\ud83c\uddf5\ud83c\uddf7",palestinian_territories:"\ud83c\uddf5\ud83c\uddf8",portugal:"\ud83c\uddf5\ud83c\uddf9",palau:"\ud83c\uddf5\ud83c\uddfc",paraguay:"\ud83c\uddf5\ud83c\uddfe",qatar:"\ud83c\uddf6\ud83c\udde6",reunion:"\ud83c\uddf7\ud83c\uddea",romania:"\ud83c\uddf7\ud83c\uddf4",serbia:"\ud83c\uddf7\ud83c\uddf8",ru:"\ud83c\uddf7\ud83c\uddfa",rwanda:"\ud83c\uddf7\ud83c\uddfc",saudi_arabia:"\ud83c\uddf8\ud83c\udde6",solomon_islands:"\ud83c\uddf8\ud83c\udde7",seychelles:"\ud83c\uddf8\ud83c\udde8",sudan:"\ud83c\uddf8\ud83c\udde9",sweden:"\ud83c\uddf8\ud83c\uddea",singapore:"\ud83c\uddf8\ud83c\uddec",st_helena:"\ud83c\uddf8\ud83c\udded",slovenia:"\ud83c\uddf8\ud83c\uddee",svalbard_jan_mayen:"\ud83c\uddf8\ud83c\uddef",slovakia:"\ud83c\uddf8\ud83c\uddf0",sierra_leone:"\ud83c\uddf8\ud83c\uddf1",san_marino:"\ud83c\uddf8\ud83c\uddf2",senegal:"\ud83c\uddf8\ud83c\uddf3",somalia:"\ud83c\uddf8\ud83c\uddf4",suriname:"\ud83c\uddf8\ud83c\uddf7",south_sudan:"\ud83c\uddf8\ud83c\uddf8",sao_tome_principe:"\ud83c\uddf8\ud83c\uddf9",el_salvador:"\ud83c\uddf8\ud83c\uddfb",sint_maarten:"\ud83c\uddf8\ud83c\uddfd",syria:"\ud83c\uddf8\ud83c\uddfe",swaziland:"\ud83c\uddf8\ud83c\uddff",tristan_da_cunha:"\ud83c\uddf9\ud83c\udde6",turks_caicos_islands:"\ud83c\uddf9\ud83c\udde8",chad:"\ud83c\uddf9\ud83c\udde9",french_southern_territories:"\ud83c\uddf9\ud83c\uddeb",togo:"\ud83c\uddf9\ud83c\uddec",thailand:"\ud83c\uddf9\ud83c\udded",tajikistan:"\ud83c\uddf9\ud83c\uddef",tokelau:"\ud83c\uddf9\ud83c\uddf0",timor_leste:"\ud83c\uddf9\ud83c\uddf1",turkmenistan:"\ud83c\uddf9\ud83c\uddf2",tunisia:"\ud83c\uddf9\ud83c\uddf3",tonga:"\ud83c\uddf9\ud83c\uddf4",tr:"\ud83c\uddf9\ud83c\uddf7",trinidad_tobago:"\ud83c\uddf9\ud83c\uddf9",tuvalu:"\ud83c\uddf9\ud83c\uddfb",taiwan:"\ud83c\uddf9\ud83c\uddfc",tanzania:"\ud83c\uddf9\ud83c\uddff",ukraine:"\ud83c\uddfa\ud83c\udde6",uganda:"\ud83c\uddfa\ud83c\uddec",us_outlying_islands:"\ud83c\uddfa\ud83c\uddf2",united_nations:"\ud83c\uddfa\ud83c\uddf3",us:"\ud83c\uddfa\ud83c\uddf8",uruguay:"\ud83c\uddfa\ud83c\uddfe",uzbekistan:"\ud83c\uddfa\ud83c\uddff",vatican_city:"\ud83c\uddfb\ud83c\udde6",st_vincent_grenadines:"\ud83c\uddfb\ud83c\udde8",venezuela:"\ud83c\uddfb\ud83c\uddea",british_virgin_islands:"\ud83c\uddfb\ud83c\uddec",us_virgin_islands:"\ud83c\uddfb\ud83c\uddee",vietnam:"\ud83c\uddfb\ud83c\uddf3",vanuatu:"\ud83c\uddfb\ud83c\uddfa",wallis_futuna:"\ud83c\uddfc\ud83c\uddeb",samoa:"\ud83c\uddfc\ud83c\uddf8",kosovo:"\ud83c\uddfd\ud83c\uddf0",yemen:"\ud83c\uddfe\ud83c\uddea",mayotte:"\ud83c\uddfe\ud83c\uddf9",south_africa:"\ud83c\uddff\ud83c\udde6",zambia:"\ud83c\uddff\ud83c\uddf2",zimbabwe:"\ud83c\uddff\ud83c\uddfc",england:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f",scotland:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f",wales:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f"},renderer:e=>e.emoji}));const Ld=()=>{const[e,n]=(0,t.useState)(!1);return mt(pt.FK,{children:mt($e,{children:mt(Sr,{children:mt(pt.FK,{children:[mt($r,{onLoaded:n}),e&&mt(ke,{children:mt(be,{path:"/",element:mt(Dd,{}),children:mt(be,{path:"/",element:mt(su,{})})})})]})})})})},Rd=e=>{e&&n.e(685).then(n.bind(n,685)).then((t=>{let{onCLS:n,onINP:r,onFCP:o,onLCP:a,onTTFB:i}=t;n(e),r(e),o(e),a(e),i(e)}))},zd=document.getElementById("root");zd&&(0,t.render)(mt(Ld,{}),zd),Rd()})()})(); \ No newline at end of file +/*! For license information please see main.aaafe439.js.LICENSE.txt */ +(()=>{var e={61:(e,t,n)=>{"use strict";var r=n(375),o=n(629),a=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&a(e,".prototype.")>-1?o(n):n}},629:(e,t,n)=>{"use strict";var r=n(989),o=n(375),a=n(259),i=n(277),l=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,l),u=n(709),d=o("%Math.max%");e.exports=function(e){if("function"!==typeof e)throw new i("a function is required");var t=c(r,s,arguments);return a(t,1+d(0,e.length-(arguments.length-1)),!0)};var h=function(){return c(r,l,arguments)};u?u(e.exports,"apply",{value:h}):e.exports.apply=h},159:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",a="minute",i="hour",l="day",s="week",c="month",u="quarter",d="year",h="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},v={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()1)return e(i[0])}else{var l=t.name;b[l]=t,o=l}return!r&&o&&(y=o),o||!r&&y},S=function(e,t){if(k(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new A(n)},C=v;C.l=x,C.i=k,C.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var A=function(){function _(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=_.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(C.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(f);if(r){var o=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return C},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return S(e)=0&&(a[d]=parseInt(u,10))}var h=a[3],p=24===h?0:h,f=a[0]+"-"+a[1]+"-"+a[2]+" "+p+":"+a[4]+":"+a[5]+":000",m=+t;return(o.utc(f).valueOf()-(m-=m%1e3))/6e4},s=r.prototype;s.tz=function(e,t){void 0===e&&(e=a);var n,r=this.utcOffset(),i=this.toDate(),l=i.toLocaleString("en-US",{timeZone:e}),s=Math.round((i-new Date(l))/1e3/60),c=15*-Math.round(i.getTimezoneOffset()/15)-s;if(Number(c)){if(n=o(l,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var u=n.utcOffset();n=n.add(r-u,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},s.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=i(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return n&&n.value};var c=s.startOf;s.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var r=n&&t,i=n||t||a,s=l(+o(),i);if("string"!=typeof e)return o(e).tz(i);var c=function(e,t,n){var r=e-60*t*1e3,o=l(r,n);if(t===o)return[r,t];var a=l(r-=60*(o-t)*1e3,n);return o===a?[r,o]:[e-60*Math.min(o,a)*1e3,Math.max(o,a)]}(o.utc(e,r).valueOf(),s,i),u=c[0],d=c[1],h=o(u).utcOffset(d);return h.$x.$timezone=i,h},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){a=e}}}()},220:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,a){var i=o.prototype;a.utc=function(e){return new o({date:e,utc:!0,args:arguments})},i.utc=function(t){var n=a(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var l=i.parse;i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),l.call(this,e)};var s=i.init;i.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else s.call(this)};var c=i.utcOffset;i.utcOffset=function(r,o){var a=this.$utils().u;if(a(r))return this.$u?0:a(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],a=o[0],i=60*+o[1]+ +o[2];return 0===i?0:"+"===a?i:-i}(r),null===r))return this;var i=Math.abs(r)<=16?60*r:r,l=this;if(o)return l.$offset=i,l.$u=0===r,l;if(0!==r){var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(l=this.local().add(i+s,e)).$offset=i,l.$x.$localOffset=s}else l=this.utc();return l};var u=i.format;i.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(e){return"s"===e&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=i.diff;i.diff=function(e,t,n){if(e&&this.$u===e.$u)return h.call(this,e,t,n);var r=this.local(),o=a(e).local();return h.call(r,o,t,n)}}}()},411:(e,t,n)=>{"use strict";var r=n(709),o=n(430),a=n(277),i=n(553);e.exports=function(e,t,n){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new a("`obj` must be an object or a function`");if("string"!==typeof t&&"symbol"!==typeof t)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!i&&i(e,t);if(r)r(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===l&&d?d.enumerable:!l,value:n,writable:null===s&&d?d.writable:!s});else{if(!u&&(l||s||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},709:(e,t,n)=>{"use strict";var r=n(375)("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(o){r=!1}e.exports=r},123:e=>{"use strict";e.exports=EvalError},953:e=>{"use strict";e.exports=Error},780:e=>{"use strict";e.exports=RangeError},768:e=>{"use strict";e.exports=ReferenceError},430:e=>{"use strict";e.exports=SyntaxError},277:e=>{"use strict";e.exports=TypeError},619:e=>{"use strict";e.exports=URIError},307:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r{"use strict";var r=n(307);e.exports=Function.prototype.bind||r},375:(e,t,n)=>{"use strict";var r,o=n(953),a=n(123),i=n(780),l=n(768),s=n(430),c=n(277),u=n(619),d=Function,h=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(t){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(L){p=null}var f=function(){throw new c},m=p?function(){try{return f}catch(e){try{return p(arguments,"callee").get}catch(t){return f}}}():f,_=n(757)(),g=n(442)(),v=Object.getPrototypeOf||(g?function(e){return e.__proto__}:null),y={},b="undefined"!==typeof Uint8Array&&v?v(Uint8Array):r,w={__proto__:null,"%AggregateError%":"undefined"===typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":_&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"===typeof Atomics?r:Atomics,"%BigInt%":"undefined"===typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":a,"%Float32Array%":"undefined"===typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":y,"%Int8Array%":"undefined"===typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"===typeof JSON?JSON:r,"%Map%":"undefined"===typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&_&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?r:Promise,"%Proxy%":"undefined"===typeof Proxy?r:Proxy,"%RangeError%":i,"%ReferenceError%":l,"%Reflect%":"undefined"===typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&_&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&v?v(""[Symbol.iterator]()):r,"%Symbol%":_?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":b,"%TypeError%":c,"%Uint8Array%":"undefined"===typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"===typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(L){var k=v(v(L));w["%Error.prototype%"]=k}var x=function e(t){var n;if("%AsyncFunction%"===t)n=h("async function () {}");else if("%GeneratorFunction%"===t)n=h("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=h("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return w[t]=n,n},S={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(989),A=n(155),E=C.call(Function.call,Array.prototype.concat),M=C.call(Function.apply,Array.prototype.splice),N=C.call(Function.call,String.prototype.replace),T=C.call(Function.call,String.prototype.slice),$=C.call(Function.call,RegExp.prototype.exec),P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,O=function(e,t){var n,r=e;if(A(S,r)&&(r="%"+(n=S[r])[0]+"%"),A(w,r)){var o=w[r];if(o===y&&(o=x(r)),"undefined"===typeof o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===$(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=T(e,0,1),n=T(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return N(e,P,(function(e,t,n,o){r[r.length]=n?N(o,D,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=O("%"+r+"%",t),a=o.name,i=o.value,l=!1,u=o.alias;u&&(r=u[0],M(n,E([0,1],u)));for(var d=1,h=!0;d=n.length){var g=p(i,f);i=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:i[f]}else h=A(i,f),i=i[f];h&&!l&&(w[a]=i)}}return i}},553:(e,t,n)=>{"use strict";var r=n(375)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(o){r=null}e.exports=r},734:(e,t,n)=>{"use strict";var r=n(709),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},442:e=>{"use strict";var t={__proto__:null,foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof n)}},757:(e,t,n)=>{"use strict";var r="undefined"!==typeof Symbol&&Symbol,o=n(175);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&o())))}},175:e=>{"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},155:(e,t,n)=>{"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,a=n(989);e.exports=a.call(r,o)},267:(e,t,n)=>{var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,l=parseInt,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,f=function(){return u.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function _(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=a.test(e);return n||i.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,a,i,l,s,c=0,u=!1,d=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,a=o;return r=o=void 0,c=t,i=e.apply(a,n)}function y(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-c>=a}function b(){var e=f();if(y(e))return w(e);l=setTimeout(b,function(e){var n=t-(e-s);return d?p(n,a-(e-c)):n}(e))}function w(e){return l=void 0,g&&r?v(e):(r=o=void 0,i)}function k(){var e=f(),n=y(e);if(r=arguments,o=this,s=e,n){if(void 0===l)return function(e){return c=e,l=setTimeout(b,t),u?v(e):i}(s);if(d)return l=setTimeout(b,t),v(s)}return void 0===l&&(l=setTimeout(b,t)),i}return t=_(t)||0,m(n)&&(u=!!n.leading,a=(d="maxWait"in n)?h(_(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g),k.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=s=o=l=void 0},k.flush=function(){return void 0===l?i:w(f())},k}},424:(e,t,n)=>{var r="__lodash_hash_undefined__",o="[object Function]",a="[object GeneratorFunction]",i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,s=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,d=/^\[object .+?Constructor\]$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,p="object"==typeof self&&self&&self.Object===Object&&self,f=h||p||Function("return this")();var m=Array.prototype,_=Function.prototype,g=Object.prototype,v=f["__core-js_shared__"],y=function(){var e=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=_.toString,w=g.hasOwnProperty,k=g.toString,x=RegExp("^"+b.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=f.Symbol,C=m.splice,A=z(f,"Map"),E=z(Object,"create"),M=S?S.prototype:void 0,N=M?M.toString:void 0;function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},$.prototype.set=function(e,t){var n=this.__data__,r=D(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},P.prototype.clear=function(){this.__data__={hash:new T,map:new(A||$),string:new T}},P.prototype.delete=function(e){return R(this,e).delete(e)},P.prototype.get=function(e){return R(this,e).get(e)},P.prototype.has=function(e){return R(this,e).has(e)},P.prototype.set=function(e,t){return R(this,e).set(e,t),this};var I=F((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(B(e))return N?N.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return s.test(e)&&n.push(""),e.replace(c,(function(e,t,r,o){n.push(r?o.replace(u,"$1"):t||e)})),n}));function j(e){if("string"==typeof e||B(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function F(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i),i};return n.cache=new(F.Cache||P),n}F.Cache=P;var H=Array.isArray;function V(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function B(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==k.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:O(e,t);return void 0===r?n:r}},141:(e,t,n)=>{var r="function"===typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,a=r&&o&&"function"===typeof o.get?o.get:null,i=r&&Map.prototype.forEach,l="function"===typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&l?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=l&&s&&"function"===typeof s.get?s.get:null,u=l&&Set.prototype.forEach,d="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,m=Object.prototype.toString,_=Function.prototype.toString,g=String.prototype.match,v=String.prototype.slice,y=String.prototype.replace,b=String.prototype.toUpperCase,w=String.prototype.toLowerCase,k=RegExp.prototype.test,x=Array.prototype.concat,S=Array.prototype.join,C=Array.prototype.slice,A=Math.floor,E="function"===typeof BigInt?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,N="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"===typeof Symbol&&"object"===typeof Symbol.iterator,$="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T||"symbol")?Symbol.toStringTag:null,P=Object.prototype.propertyIsEnumerable,D=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function O(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||k.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var r=e<0?-A(-e):A(e);if(r!==e){var o=String(r),a=v.call(t,o.length+1);return y.call(o,n,"$&_")+"."+y.call(y.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return y.call(t,n,"$&_")}var L=n(634),R=L.custom,z=V(R)?R:null;function I(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function j(e){return y.call(String(e),/"/g,""")}function F(e){return"[object Array]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}function H(e){return"[object RegExp]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}function V(e){if(T)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!N)return!1;try{return N.call(e),!0}catch(t){}return!1}e.exports=function e(t,r,o,l){var s=r||{};if(U(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(U(s,"maxStringLength")&&("number"===typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!U(s,"customInspect")||s.customInspect;if("boolean"!==typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(U(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(U(s,"numericSeparator")&&"boolean"!==typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var b=s.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return q(t,s);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var k=String(t);return b?O(t,k):k}if("bigint"===typeof t){var A=String(t)+"n";return b?O(t,A):A}var M="undefined"===typeof s.depth?5:s.depth;if("undefined"===typeof o&&(o=0),o>=M&&M>0&&"object"===typeof t)return F(t)?"[Array]":"[Object]";var R=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=S.call(Array(e.indent+1)," ")}return{base:n,prev:S.call(Array(t+1),n)}}(s,o);if("undefined"===typeof l)l=[];else if(W(l,t)>=0)return"[Circular]";function B(t,n,r){if(n&&(l=C.call(l)).push(n),r){var a={depth:s.depth};return U(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,o+1,l)}return e(t,s,o+1,l)}if("function"===typeof t&&!H(t)){var K=function(e){if(e.name)return e.name;var t=g.call(_.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=X(t,B);return"[Function"+(K?": "+K:" (anonymous)")+"]"+(ee.length>0?" { "+S.call(ee,", ")+" }":"")}if(V(t)){var te=T?y.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):N.call(t);return"object"!==typeof t||T?te:Z(te)}if(function(e){if(!e||"object"!==typeof e)return!1;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"===typeof e.nodeName&&"function"===typeof e.getAttribute}(t)){for(var ne="<"+w.call(String(t.nodeName)),re=t.attributes||[],oe=0;oe"}if(F(t)){if(0===t.length)return"[]";var ae=X(t,B);return R&&!function(e){for(var t=0;t=0)return!1;return!0}(ae)?"["+J(ae,R)+"]":"[ "+S.call(ae,", ")+" ]"}if(function(e){return"[object Error]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t)){var ie=X(t,B);return"cause"in Error.prototype||!("cause"in t)||P.call(t,"cause")?0===ie.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(ie,", ")+" }":"{ ["+String(t)+"] "+S.call(x.call("[cause]: "+B(t.cause),ie),", ")+" }"}if("object"===typeof t&&m){if(z&&"function"===typeof t[z]&&L)return L(t,{depth:M-o});if("symbol"!==m&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!a||!e||"object"!==typeof e)return!1;try{a.call(e);try{c.call(e)}catch(ne){return!0}return e instanceof Map}catch(t){}return!1}(t)){var le=[];return i&&i.call(t,(function(e,n){le.push(B(n,t,!0)+" => "+B(e,t))})),Q("Map",a.call(t),le,R)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{a.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(B(e,t))})),Q("Set",c.call(t),se,R)}if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(ne){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return G("WeakMap");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(ne){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return G("WeakSet");if(function(e){if(!p||!e||"object"!==typeof e)return!1;try{return p.call(e),!0}catch(t){}return!1}(t))return G("WeakRef");if(function(e){return"[object Number]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t))return Z(B(Number(t)));if(function(e){if(!e||"object"!==typeof e||!E)return!1;try{return E.call(e),!0}catch(t){}return!1}(t))return Z(B(E.call(t)));if(function(e){return"[object Boolean]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t))return Z(f.call(t));if(function(e){return"[object String]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t))return Z(B(String(t)));if("undefined"!==typeof window&&t===window)return"{ [object Window] }";if("undefined"!==typeof globalThis&&t===globalThis||"undefined"!==typeof n.g&&t===n.g)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===Y(e)&&(!$||!("object"===typeof e&&$ in e))}(t)&&!H(t)){var ce=X(t,B),ue=D?D(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",he=!ue&&$&&Object(t)===t&&$ in t?v.call(Y(t),8,-1):de?"Object":"",pe=(ue||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(he||de?"["+S.call(x.call([],he||[],de||[]),": ")+"] ":"");return 0===ce.length?pe+"{}":R?pe+"{"+J(ce,R)+"}":pe+"{ "+S.call(ce,", ")+" }"}return String(t)};var B=Object.prototype.hasOwnProperty||function(e){return e in this};function U(e,t){return B.call(e,t)}function Y(e){return m.call(e)}function W(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return q(v.call(e,0,t.maxStringLength),t)+r}return I(y.call(y.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",t)}function K(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+b.call(t.toString(16))}function Z(e){return"Object("+e+")"}function G(e){return e+" { ? }"}function Q(e,t,n,r){return e+" ("+t+") {"+(r?J(n,r):S.call(n,", "))+"}"}function J(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+S.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=F(e),r=[];if(n){r.length=e.length;for(var o=0;o{"use strict";n.r(t),n.d(t,{Children:()=>U,Component:()=>l.uA,Fragment:()=>l.FK,PureComponent:()=>I,StrictMode:()=>$e,Suspense:()=>Z,SuspenseList:()=>J,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>be,cloneElement:()=>Ae,createContext:()=>l.q6,createElement:()=>l.n,createFactory:()=>ke,createPortal:()=>ne,createRef:()=>l._3,default:()=>je,findDOMNode:()=>Me,flushSync:()=>Te,forwardRef:()=>V,hydrate:()=>ue,isElement:()=>Re,isFragment:()=>Se,isMemo:()=>Ce,isValidElement:()=>xe,lazy:()=>Q,memo:()=>j,render:()=>ce,startTransition:()=>Pe,unmountComponentAtNode:()=>Ee,unstable_batchedUpdates:()=>Ne,useCallback:()=>C,useContext:()=>A,useDebugValue:()=>E,useDeferredValue:()=>De,useEffect:()=>b,useErrorBoundary:()=>M,useId:()=>N,useImperativeHandle:()=>x,useInsertionEffect:()=>Le,useLayoutEffect:()=>w,useMemo:()=>S,useReducer:()=>y,useRef:()=>k,useState:()=>v,useSyncExternalStore:()=>ze,useTransition:()=>Oe,version:()=>we});var r,o,a,i,l=n(746),s=0,c=[],u=l.fF,d=u.__b,h=u.__r,p=u.diffed,f=u.__c,m=u.unmount,_=u.__;function g(e,t){u.__h&&u.__h(o,e,s||t),s=0;var n=o.__H||(o.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function v(e){return s=1,y(R,e)}function y(e,t,n){var a=g(r++,2);if(a.t=e,!a.__c&&(a.__=[n?n(t):R(void 0,t),function(e){var t=a.__N?a.__N[0]:a.__[0],n=a.t(t,e);t!==n&&(a.__N=[n,a.__[1]],a.__c.setState({}))}],a.__c=o,!o.u)){var i=function(e,t,n){if(!a.__c.__H)return!0;var r=a.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!l||l.call(this,e,t,n);var o=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),!(!o&&a.__c.props===e)&&(!l||l.call(this,e,t,n))};o.u=!0;var l=o.shouldComponentUpdate,s=o.componentWillUpdate;o.componentWillUpdate=function(e,t,n){if(this.__e){var r=l;l=void 0,i(e,t,n),l=r}s&&s.call(this,e,t,n)},o.shouldComponentUpdate=i}return a.__N||a.__}function b(e,t){var n=g(r++,3);!u.__s&&L(n.__H,t)&&(n.__=e,n.i=t,o.__H.__h.push(n))}function w(e,t){var n=g(r++,4);!u.__s&&L(n.__H,t)&&(n.__=e,n.i=t,o.__h.push(n))}function k(e){return s=5,S((function(){return{current:e}}),[])}function x(e,t,n){s=6,w((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function S(e,t){var n=g(r++,7);return L(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function C(e,t){return s=8,S((function(){return e}),t)}function A(e){var t=o.context[e.__c],n=g(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(o)),t.props.value):e.__}function E(e,t){u.useDebugValue&&u.useDebugValue(t?t(e):e)}function M(e){var t=g(r++,10),n=v();return t.__=e,o.componentDidCatch||(o.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function N(){var e=g(r++,11);if(!e.__){for(var t=o.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function T(){for(var e;e=c.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(D),e.__H.__h.forEach(O),e.__H.__h=[]}catch(r){e.__H.__h=[],u.__e(r,e.__v)}}u.__b=function(e){o=null,d&&d(e)},u.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),_&&_(e,t)},u.__r=function(e){h&&h(e),r=0;var t=(o=e.__c).__H;t&&(a===o?(t.__h=[],o.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(D),t.__h.forEach(O),t.__h=[],r=0)),a=o},u.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==c.push(t)&&i===u.requestAnimationFrame||((i=u.requestAnimationFrame)||P)(T)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),a=o=null},u.__c=function(e,t){t.some((function(e){try{e.__h.forEach(D),e.__h=e.__h.filter((function(e){return!e.__||O(e)}))}catch(o){t.some((function(e){e.__h&&(e.__h=[])})),t=[],u.__e(o,e.__v)}})),f&&f(e,t)},u.unmount=function(e){m&&m(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{D(e)}catch(e){t=e}})),n.__H=void 0,t&&u.__e(t,n.__v))};var $="function"==typeof requestAnimationFrame;function P(e){var t,n=function(){clearTimeout(r),$&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);$&&(t=requestAnimationFrame(n))}function D(e){var t=o,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),o=t}function O(e){var t=o;e.__c=e.__(),o=t}function L(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function R(e,t){return"function"==typeof t?t(e):t}function z(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function I(e,t){this.props=e,this.context=t}function j(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:z(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,l.n)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(I.prototype=new l.uA).isPureReactComponent=!0,I.prototype.shouldComponentUpdate=function(e,t){return z(this.props,e)||z(this.state,t)};var F=l.fF.__b;l.fF.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),F&&F(e)};var H="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function V(e){function t(t){if(!("ref"in t))return e(t,null);var n=t.ref;delete t.ref;var r=e(t,n);return t.ref=n,r}return t.$$typeof=H,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var B=function(e,t){return null==e?null:(0,l.v2)((0,l.v2)(e).map(t))},U={map:B,forEach:B,count:function(e){return e?(0,l.v2)(e).length:0},only:function(e){var t=(0,l.v2)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:l.v2},Y=l.fF.__e;l.fF.__e=function(e,t,n,r){if(e.then)for(var o,a=t;a=a.__;)if((o=a.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);Y(e,t,n,r)};var W=l.fF.unmount;function q(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return q(e,t,n)}))),e}function K(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return K(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Z(){this.__u=0,this.t=null,this.__b=null}function G(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Q(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,l.n)(n,o)}return o.displayName="Lazy",o.__f=!0,o}function J(){this.u=null,this.o=null}l.fF.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),W&&W(e)},(Z.prototype=new l.uA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=G(r.__v),a=!1,i=function(){a||(a=!0,n.__R=null,o?o(l):l())};n.__R=i;var l=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=K(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},Z.prototype.componentWillUnmount=function(){this.t=[]},Z.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=q(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&(0,l.n)(l.FK,null,e.fallback);return o&&(o.__u&=-33),[(0,l.n)(l.FK,null,t.__a?null:e.children),o]};var X=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),(0,l.XX)((0,l.n)(ee,{context:t.context},e.__v),t.l)}function ne(e,t){var n=(0,l.n)(te,{__v:e,i:t});return n.containerInfo=t,n}(J.prototype=new l.uA).__a=function(e){var t=this,n=G(t.__v),r=t.o.get(e);return r[0]++,function(o){var a=function(){t.props.revealOrder?(r.push(o),X(t,e,r)):o()};n?n(a):a()}},J.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,l.v2)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},J.prototype.componentDidUpdate=J.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){X(e,n,t)}))};var re="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,oe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ae=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ie=/[A-Z0-9]/g,le="undefined"!=typeof document,se=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function ce(e,t,n){return null==t.__k&&(t.textContent=""),(0,l.XX)(e,t),"function"==typeof n&&n(),e?e.__c:null}function ue(e,t,n){return(0,l.Qv)(e,t),"function"==typeof n&&n(),e?e.__c:null}l.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(l.uA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var de=l.fF.event;function he(){}function pe(){return this.cancelBubble}function fe(){return this.defaultPrevented}l.fF.event=function(e){return de&&(e=de(e)),e.persist=he,e.isPropagationStopped=pe,e.isDefaultPrevented=fe,e.nativeEvent=e};var me,_e={enumerable:!1,configurable:!0,get:function(){return this.class}},ge=l.fF.vnode;l.fF.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1===n.indexOf("-");for(var a in t){var i=t[a];if(!("value"===a&&"defaultValue"in t&&null==i||le&&"children"===a&&"noscript"===n||"class"===a||"className"===a)){var s=a.toLowerCase();"defaultValue"===a&&"value"in t&&null==t.value?a="value":"download"===a&&!0===i?i="":"translate"===s&&"no"===i?i=!1:"o"===s[0]&&"n"===s[1]?"ondoubleclick"===s?a="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||se(t.type)?"onfocus"===s?a="onfocusin":"onblur"===s?a="onfocusout":ae.test(a)&&(a=s):s=a="oninput":o&&oe.test(a)?a=a.replace(ie,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===s&&r[a=s]&&(a="oninputCapture"),r[a]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",_e)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=re,ge&&ge(e)};var ve=l.fF.__r;l.fF.__r=function(e){ve&&ve(e),me=e.__c};var ye=l.fF.diffed;l.fF.diffed=function(e){ye&&ye(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),me=null};var be={ReactCurrentDispatcher:{current:{readContext:function(e){return me.__n[e.__c].props.value},useCallback:C,useContext:A,useDebugValue:E,useDeferredValue:De,useEffect:b,useId:N,useImperativeHandle:x,useInsertionEffect:Le,useLayoutEffect:w,useMemo:S,useReducer:y,useRef:k,useState:v,useSyncExternalStore:ze,useTransition:Oe}}},we="18.3.1";function ke(e){return l.n.bind(null,e)}function xe(e){return!!e&&e.$$typeof===re}function Se(e){return xe(e)&&e.type===l.FK}function Ce(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ae(e){return xe(e)?l.Ob.apply(null,arguments):e}function Ee(e){return!!e.__k&&((0,l.XX)(null,e),!0)}function Me(e){return e&&(e.base||1===e.nodeType&&e)||null}var Ne=function(e,t){return e(t)},Te=function(e,t){return e(t)},$e=l.FK;function Pe(e){e()}function De(e){return e}function Oe(){return[!1,Pe]}var Le=w,Re=xe;function ze(e,t){var n=t(),r=v({h:{__:n,v:t}}),o=r[0].h,a=r[1];return w((function(){o.__=n,o.v=t,Ie(o)&&a({h:o})}),[e,n,t]),b((function(){return Ie(o)&&a({h:o}),e((function(){Ie(o)&&a({h:o})}))}),[e]),n}function Ie(e){var t,n,r=e.v,o=e.__;try{var a=r();return!((t=o)===(n=a)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}var je={useState:v,useId:N,useReducer:y,useEffect:b,useLayoutEffect:w,useInsertionEffect:Le,useTransition:Oe,useDeferredValue:De,useSyncExternalStore:ze,startTransition:Pe,useRef:k,useImperativeHandle:x,useMemo:S,useCallback:C,useContext:A,useDebugValue:E,version:"18.3.1",Children:U,render:ce,hydrate:ue,unmountComponentAtNode:Ee,createPortal:ne,createElement:l.n,createContext:l.q6,createFactory:ke,cloneElement:Ae,createRef:l._3,Fragment:l.FK,isValidElement:xe,isElement:Re,isFragment:Se,isMemo:Ce,findDOMNode:Me,Component:l.uA,PureComponent:I,memo:j,forwardRef:V,flushSync:Te,unstable_batchedUpdates:Ne,StrictMode:$e,Suspense:Z,SuspenseList:J,lazy:Q,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:be}},746:(e,t,n)=>{"use strict";n.d(t,{FK:()=>x,Ob:()=>Y,Qv:()=>U,XX:()=>B,_3:()=>k,fF:()=>o,n:()=>b,q6:()=>W,uA:()=>S,v2:()=>P});var r,o,a,i,l,s,c,u,d,h,p,f={},m=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function v(e,t){for(var n in t)e[n]=t[n];return e}function y(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function b(e,t,n){var o,a,i,l={};for(i in t)"key"==i?o=t[i]:"ref"==i?a=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return w(e,l,o,a,null)}function w(e,t,n,r,i){var l={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++a:i,__i:-1,__u:0};return null==i&&null!=o.vnode&&o.vnode(l),l}function k(){return{current:null}}function x(e){return e.children}function S(e,t){this.props=e,this.context=t}function C(e,t){if(null==t)return e.__?C(e.__,e.__i+1):null;for(var n;tt&&i.sort(c));M.__r=0}function N(e,t,n,r,o,a,i,l,s,c,u){var d,h,p,_,g,v=r&&r.__k||m,y=t.length;for(n.__d=s,T(n,t,v),s=n.__d,d=0;d0?w(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,a=null,-1!==(l=o.__i=D(o,n,i,u))&&(u--,(a=n[l])&&(a.__u|=131072)),null==a||null===a.__v?(-1==l&&d--,"function"!=typeof o.type&&(o.__u|=65536)):l!==i&&(l==i-1?d--:l==i+1?d++:(l>i?d--:d++,o.__u|=65536))):o=e.__k[r]=null;if(u)for(r=0;r(null!=s&&0==(131072&s.__u)?1:0))for(;i>=0||l=0){if((s=t[i])&&0==(131072&s.__u)&&o==s.key&&a===s.type)return i;i--}if(l2&&(s.children=arguments.length>3?r.call(arguments,2):n),w(e.type,s,o||e.key,a||e.ref,null)}function W(e,t){var n={__c:t="__cC"+p++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,E(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=m.slice,o={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&null!=a.getDerivedStateFromError&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(t){e=t}throw e}},a=0,S.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=v({},this.state),"function"==typeof e&&(e=e(v({},n),this.props)),e&&v(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),E(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),E(this))},S.prototype.render=x,i=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},M.__r=0,u=0,d=R(!1),h=R(!0),p=0},640:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",o="RFC3986";e.exports={default:o,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:o}},215:(e,t,n)=>{"use strict";var r=n(518),o=n(968),a=n(640);e.exports={formats:a,parse:o,stringify:r}},968:(e,t,n)=>{"use strict";var r=n(570),o=Object.prototype.hasOwnProperty,a=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},l=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,l=n.depth>0&&/(\[[^[\]]*])/.exec(a),c=l?a.slice(0,l.index):a,u=[];if(c){if(!n.plainObjects&&o.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var d=0;n.depth>0&&null!==(l=i.exec(a))&&d=0;--a){var i,l=e[a];if("[]"===l&&n.parseArrays)i=n.allowEmptyArrays&&(""===o||n.strictNullHandling&&null===o)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var c="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,u=n.decodeDotInKeys?c.replace(/%2E/g,"."):c,d=parseInt(u,10);n.parseArrays||""!==u?!isNaN(d)&&l!==u&&String(d)===u&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(i=[])[d]=o:"__proto__"!==u&&(i[u]=o):i={0:o}}o=i}return o}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return i;if("undefined"!==typeof e.allowEmptyArrays&&"boolean"!==typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if("undefined"!==typeof e.decodeDotInKeys&&"boolean"!==typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&"undefined"!==typeof e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?i.charset:e.charset,n="undefined"===typeof e.duplicates?i.duplicates:e.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:"undefined"===typeof e.allowDots?!0===e.decodeDotInKeys||i.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"===typeof e.allowEmptyArrays?!!e.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:i.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:i.comma,decodeDotInKeys:"boolean"===typeof e.decodeDotInKeys?e.decodeDotInKeys:i.decodeDotInKeys,decoder:"function"===typeof e.decoder?e.decoder:i.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:i.depth,duplicates:n,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:i.plainObjects,strictDepth:"boolean"===typeof e.strictDepth?!!e.strictDepth:i.strictDepth,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var u="string"===typeof e?function(e,t){var n={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=c.split(t.delimiter,d),p=-1,f=t.charset;if(t.charsetSentinel)for(u=0;u-1&&(_=a(_)?[_]:_);var b=o.call(n,m);b&&"combine"===t.duplicates?n[m]=r.combine(n[m],_):b&&"last"!==t.duplicates||(n[m]=_)}return n}(e,n):e,d=n.plainObjects?Object.create(null):{},h=Object.keys(u),p=0;p{"use strict";var r=n(670),o=n(570),a=n(640),i=Object.prototype.hasOwnProperty,l={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,s(t)?t:[t])},d=Date.prototype.toISOString,h=a.default,p={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o.encode,encodeValuesOnly:!1,format:h,formatter:a.formatters[h],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},f={},m=function e(t,n,a,i,l,c,d,h,m,_,g,v,y,b,w,k,x,S){for(var C,A=t,E=S,M=0,N=!1;void 0!==(E=E.get(f))&&!N;){var T=E.get(t);if(M+=1,"undefined"!==typeof T){if(T===M)throw new RangeError("Cyclic object value");N=!0}"undefined"===typeof E.get(f)&&(M=0)}if("function"===typeof _?A=_(n,A):A instanceof Date?A=y(A):"comma"===a&&s(A)&&(A=o.maybeMap(A,(function(e){return e instanceof Date?y(e):e}))),null===A){if(c)return m&&!k?m(n,p.encoder,x,"key",b):n;A=""}if("string"===typeof(C=A)||"number"===typeof C||"boolean"===typeof C||"symbol"===typeof C||"bigint"===typeof C||o.isBuffer(A))return m?[w(k?n:m(n,p.encoder,x,"key",b))+"="+w(m(A,p.encoder,x,"value",b))]:[w(n)+"="+w(String(A))];var $,P=[];if("undefined"===typeof A)return P;if("comma"===a&&s(A))k&&m&&(A=o.maybeMap(A,m)),$=[{value:A.length>0?A.join(",")||null:void 0}];else if(s(_))$=_;else{var D=Object.keys(A);$=g?D.sort(g):D}var O=h?n.replace(/\./g,"%2E"):n,L=i&&s(A)&&1===A.length?O+"[]":O;if(l&&s(A)&&0===A.length)return L+"[]";for(var R=0;R<$.length;++R){var z=$[R],I="object"===typeof z&&"undefined"!==typeof z.value?z.value:A[z];if(!d||null!==I){var j=v&&h?z.replace(/\./g,"%2E"):z,F=s(A)?"function"===typeof a?a(L,j):L:L+(v?"."+j:"["+j+"]");S.set(t,M);var H=r();H.set(f,S),u(P,e(I,F,a,i,l,c,d,h,"comma"===a&&k&&s(A)?null:m,_,g,v,y,b,w,k,x,H))}}return P};e.exports=function(e,t){var n,o=e,c=function(e){if(!e)return p;if("undefined"!==typeof e.allowEmptyArrays&&"boolean"!==typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if("undefined"!==typeof e.encodeDotInKeys&&"boolean"!==typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&"undefined"!==typeof e.encoder&&"function"!==typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=a.default;if("undefined"!==typeof e.format){if(!i.call(a.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r,o=a.formatters[n],c=p.filter;if(("function"===typeof e.filter||s(e.filter))&&(c=e.filter),r=e.arrayFormat in l?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":p.arrayFormat,"commaRoundTrip"in e&&"boolean"!==typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u="undefined"===typeof e.allowDots?!0===e.encodeDotInKeys||p.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"===typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:u,allowEmptyArrays:"boolean"===typeof e.allowEmptyArrays?!!e.allowEmptyArrays:p.allowEmptyArrays,arrayFormat:r,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:"undefined"===typeof e.delimiter?p.delimiter:e.delimiter,encode:"boolean"===typeof e.encode?e.encode:p.encode,encodeDotInKeys:"boolean"===typeof e.encodeDotInKeys?e.encodeDotInKeys:p.encodeDotInKeys,encoder:"function"===typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"===typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:c,format:n,formatter:o,serializeDate:"function"===typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"===typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"===typeof e.sort?e.sort:null,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"===typeof c.filter?o=(0,c.filter)("",o):s(c.filter)&&(n=c.filter);var d=[];if("object"!==typeof o||null===o)return"";var h=l[c.arrayFormat],f="comma"===h&&c.commaRoundTrip;n||(n=Object.keys(o)),c.sort&&n.sort(c.sort);for(var _=r(),g=0;g0?b+y:""}},570:(e,t,n)=>{"use strict";var r=n(640),o=Object.prototype.hasOwnProperty,a=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),l=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(a(n)){for(var r=[],o=0;o=s?l.slice(u,u+s):l,h=[],p=0;p=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||a===r.RFC1738&&(40===f||41===f)?h[h.length]=d.charAt(p):f<128?h[h.length]=i[f]:f<2048?h[h.length]=i[192|f>>6]+i[128|63&f]:f<55296||f>=57344?h[h.length]=i[224|f>>12]+i[128|f>>6&63]+i[128|63&f]:(p+=1,f=65536+((1023&f)<<10|1023&d.charCodeAt(p)),h[h.length]=i[240|f>>18]+i[128|f>>12&63]+i[128|f>>6&63]+i[128|63&f])}c+=h.join("")}return c},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var n=[],r=0;r{e.exports=n(204)},204:(e,t,n)=>{"use strict";var r=function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(n(609)),o=n(609);function a(){return(a=Object.assign||function(e){for(var t=1;tr.length&&h(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var o=r.length,a=t.length;a>=r.length;a--){var i=t[a];if(!h(e,a)&&p(e,a,i)){o=a+1;break}}return o}function _(e,t){return m(e,t)===e.mask.length}function g(e,t){var n=e.maskChar,r=e.mask,o=e.prefix;if(!n){for((t=v(e,"",t,0)).lengtht.length&&(t+=o.slice(t.length,r)),l.every((function(n){for(;u=n,h(e,c=r)&&u!==o[c];){if(r>=t.length&&(t+=o[r]),l=n,a&&h(e,r)&&l===a)return!0;if(++r>=o.length)return!1}var l,c,u;return!p(e,r,n)&&n!==a||(ro.start?d=(u=function(e,t,n,r){var o=e.mask,a=e.maskChar,i=n.split(""),l=r;return i.every((function(t){for(;i=t,h(e,n=r)&&i!==o[n];)if(++r>=o.length)return!1;var n,i;return(p(e,r,t)||t===a)&&r++,r=a.length?f=a.length:f=i.length&&f{"use strict";var r=n(375),o=n(411),a=n(734)(),i=n(553),l=n(277),s=r("%Math.floor%");e.exports=function(e,t){if("function"!==typeof e)throw new l("`fn` is not a function");if("number"!==typeof t||t<0||t>4294967295||s(t)!==t)throw new l("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&i){var u=i(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(a?o(e,"length",t,!0,!0):o(e,"length",t)),e}},670:(e,t,n)=>{"use strict";var r=n(375),o=n(61),a=n(141),i=n(277),l=r("%WeakMap%",!0),s=r("%Map%",!0),c=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),d=o("WeakMap.prototype.has",!0),h=o("Map.prototype.get",!0),p=o("Map.prototype.set",!0),f=o("Map.prototype.has",!0),m=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new i("Side channel does not contain "+a(e))},get:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return c(e,r)}else if(s){if(t)return h(t,r)}else if(n)return function(e,t){var n=m(e,t);return n&&n.value}(n,r)},has:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return d(e,r)}else if(s){if(t)return f(t,r)}else if(n)return function(e,t){return!!m(e,t)}(n,r);return!1},set:function(r,o){l&&r&&("object"===typeof r||"function"===typeof r)?(e||(e=new l),u(e,r,o)):s?(t||(t=new s),p(t,r,o)):(n||(n={key:{},next:null}),function(e,t,n){var r=m(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,o))}};return r}},634:()=>{},738:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+e+".f772060c.chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="vmui:";n.l=(r,o,a,i)=>{if(e[r])e[r].push(o);else{var l,s;if(void 0!==a)for(var c=document.getElementsByTagName("script"),u=0;u{l.onerror=l.onload=null,clearTimeout(p);var o=e[r];if(delete e[r],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(n))),t)return t(n)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=h.bind(null,l.onerror),l.onload=h.bind(null,l.onload),s&&document.head.appendChild(l)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="./",(()=>{var e={792:0};n.f.j=(t,r)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var a=new Promise(((n,r)=>o=e[t]=[n,r]));r.push(o[2]=a);var i=n.p+n.u(t),l=new Error;n.l(i,(r=>{if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var a=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",l.name="ChunkLoadError",l.type=a,l.request=i,o[1](l)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,a,i=r[0],l=r[1],s=r[2],c=0;if(i.some((t=>0!==e[t]))){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(s)s(n)}for(t&&t(r);c{"use strict";var e,t=n(609),r=n(159),o=n.n(r),a=n(7),i=n.n(a),l=n(648),s=n.n(l),c=n(220),u=n.n(c);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function y(t,n,r,o){void 0===o&&(o={});let{window:a=document.defaultView,v5Compat:i=!1}=o,l=a.history,s=e.Pop,c=null,u=f();function f(){return(l.state||{idx:null}).idx}function v(){s=e.Pop;let t=f(),n=null==t?null:t-u;u=t,c&&c({action:s,location:b.location,delta:n})}function y(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,n="string"===typeof e?e:g(e);return n=n.replace(/ $/,"%20"),p(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==u&&(u=0,l.replaceState(d({},l.state,{idx:u}),""));let b={get action(){return s},get location(){return t(a,l)},listen(e){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(h,v),c=e,()=>{a.removeEventListener(h,v),c=null}},createHref:e=>n(a,e),createURL:y,encodeLocation(e){let t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(t,n){s=e.Push;let o=_(b.location,t,n);r&&r(o,t),u=f()+1;let d=m(o,u),h=b.createHref(o);try{l.pushState(d,"",h)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;a.location.assign(h)}i&&c&&c({action:s,location:b.location,delta:1})},replace:function(t,n){s=e.Replace;let o=_(b.location,t,n);r&&r(o,t),u=f();let a=m(o,u),d=b.createHref(o);l.replaceState(a,"",d),i&&c&&c({action:s,location:b.location,delta:0})},go:e=>l.go(e)};return b}var b;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(b||(b={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function w(e,t,n){return void 0===n&&(n="/"),k(e,t,n,!1)}function k(e,t,n,r){let o=R(("string"===typeof t?v(t):t).pathname||"/",n);if(null==o)return null;let a=x(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let i=null;for(let l=0;null==i&&l{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(p(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));let l=H([r,i.relativePath]),s=n.concat(i);e.children&&e.children.length>0&&(p(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),x(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:P(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of S(e.path))o(e,t,r);else o(e,t)})),t}function S(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return o?[a,""]:[a];let i=S(r.join("/")),l=[];return l.push(...i.map((e=>""===e?a:[a,e].join("/")))),o&&l.push(...i),l.map((t=>e.startsWith("/")&&""===t?"/":t))}const C=/^:[\w-]+$/,A=3,E=2,M=1,N=10,T=-2,$=e=>"*"===e;function P(e,t){let n=e.split("/"),r=n.length;return n.some($)&&(r+=T),t&&(r+=E),n.filter((e=>!$(e))).reduce(((e,t)=>e+(C.test(t)?A:""===t?M:N)),r)}function D(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},a="/",i=[];for(let l=0;l(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let a=new RegExp(o,t?void 0:"i");return[a,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=l[n]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const s=l[n];return e[r]=o&&!s?void 0:(s||"").replace(/%2F/g,"/"),e}),{}),pathname:a,pathnameBase:i,pattern:e}}function L(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return f(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function R(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function z(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function I(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function j(e,t){let n=I(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function F(e,t,n,r){let o;void 0===r&&(r=!1),"string"===typeof e?o=v(e):(o=d({},e),p(!o.pathname||!o.pathname.includes("?"),z("?","pathname","search",o)),p(!o.pathname||!o.pathname.includes("#"),z("#","pathname","hash",o)),p(!o.search||!o.search.includes("#"),z("#","search","hash",o)));let a,i=""===e||""===o.pathname,l=i?"/":o.pathname;if(null==l)a=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"===typeof e?v(e):e,a=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:a,search:B(r),hash:U(o)}}(o,a),c=l&&"/"!==l&&l.endsWith("/"),u=(i||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!c&&!u||(s.pathname+="/"),s}const H=e=>e.join("/").replace(/\/\/+/g,"/"),V=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",U=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function Y(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const W=["post","put","patch","delete"],q=(new Set(W),["get",...W]);new Set(q),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r.current=!0}));let o=t.useCallback((function(t,o){void 0===o&&(o={}),r.current&&("number"===typeof t?e.navigate(t):e.navigate(t,K({fromRouteId:n},o)))}),[e,n]);return o}():function(){te()||p(!1);let e=t.useContext(Z),{basename:n,future:r,navigator:o}=t.useContext(Q),{matches:a}=t.useContext(X),{pathname:i}=ne(),l=JSON.stringify(j(a,r.v7_relativeSplatPath)),s=t.useRef(!1);re((()=>{s.current=!0}));let c=t.useCallback((function(t,r){if(void 0===r&&(r={}),!s.current)return;if("number"===typeof t)return void o.go(t);let a=F(t,JSON.parse(l),i,"path"===r.relative);null==e&&"/"!==n&&(a.pathname="/"===a.pathname?n:H([n,a.pathname])),(r.replace?o.replace:o.push)(a,r.state,r)}),[n,o,l,i,e]);return c}()}const ae=t.createContext(null);function ie(e,n){let{relative:r}=void 0===n?{}:n,{future:o}=t.useContext(Q),{matches:a}=t.useContext(X),{pathname:i}=ne(),l=JSON.stringify(j(a,o.v7_relativeSplatPath));return t.useMemo((()=>F(e,JSON.parse(l),i,"path"===r)),[e,l,i,r])}function le(n,r,o,a){te()||p(!1);let{navigator:i}=t.useContext(Q),{matches:l}=t.useContext(X),s=l[l.length-1],c=s?s.params:{},u=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let d,h=ne();if(r){var f;let e="string"===typeof r?v(r):r;"/"===u||(null==(f=e.pathname)?void 0:f.startsWith(u))||p(!1),d=e}else d=h;let m=d.pathname||"/",_=m;if("/"!==u){let e=u.replace(/^\//,"").split("/");_="/"+m.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=w(n,{pathname:_});let y=he(g&&g.map((e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:H([u,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:H([u,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,o,a);return r&&y?t.createElement(J.Provider,{value:{location:K({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:e.Pop}},y):y}function se(){let e=function(){var e;let n=t.useContext(ee),r=_e(fe.UseRouteError),o=ge(fe.UseRouteError);if(void 0!==n)return n;return null==(e=r.errors)?void 0:e[o]}(),n=Y(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:o};return t.createElement(t.Fragment,null,t.createElement("h2",null,"Unexpected Application Error!"),t.createElement("h3",{style:{fontStyle:"italic"}},n),r?t.createElement("pre",{style:a},r):null,null)}const ce=t.createElement(se,null);class ue extends t.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?t.createElement(X.Provider,{value:this.props.routeContext},t.createElement(ee.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function de(e){let{routeContext:n,match:r,children:o}=e,a=t.useContext(Z);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),t.createElement(X.Provider,{value:n},o)}function he(e,n,r,o){var a;if(void 0===n&&(n=[]),void 0===r&&(r=null),void 0===o&&(o=null),null==e){var i;if(!r)return null;if(r.errors)e=r.matches;else{if(!(null!=(i=o)&&i.v7_partialHydration&&0===n.length&&!r.initialized&&r.matches.length>0))return null;e=r.matches}}let l=e,s=null==(a=r)?void 0:a.errors;if(null!=s){let e=l.findIndex((e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id])));e>=0||p(!1),l=l.slice(0,Math.min(l.length,e+1))}let c=!1,u=-1;if(r&&o&&o.v7_partialHydration)for(let t=0;t=0?l.slice(0,u+1):[l[0]];break}}}return l.reduceRight(((e,o,a)=>{let i,d=!1,h=null,p=null;var f;r&&(i=s&&o.route.id?s[o.route.id]:void 0,h=o.route.errorElement||ce,c&&(u<0&&0===a?(f="route-fallback",!1||ve[f]||(ve[f]=!0),d=!0,p=null):u===a&&(d=!0,p=o.route.hydrateFallbackElement||null)));let m=n.concat(l.slice(0,a+1)),_=()=>{let n;return n=i?h:d?p:o.route.Component?t.createElement(o.route.Component,null):o.route.element?o.route.element:e,t.createElement(de,{match:o,routeContext:{outlet:e,matches:m,isDataRoute:null!=r},children:n})};return r&&(o.route.ErrorBoundary||o.route.errorElement||0===a)?t.createElement(ue,{location:r.location,revalidation:r.revalidation,component:h,error:i,children:_(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):_()}),null)}var pe=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(pe||{}),fe=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(fe||{});function me(e){let n=t.useContext(Z);return n||p(!1),n}function _e(e){let n=t.useContext(G);return n||p(!1),n}function ge(e){let n=function(){let e=t.useContext(X);return e||p(!1),e}(),r=n.matches[n.matches.length-1];return r.route.id||p(!1),r.route.id}const ve={};t.startTransition;function ye(e){return function(e){let n=t.useContext(X).outlet;return n?t.createElement(ae.Provider,{value:e},n):n}(e.context)}function be(e){p(!1)}function we(n){let{basename:r="/",children:o=null,location:a,navigationType:i=e.Pop,navigator:l,static:s=!1,future:c}=n;te()&&p(!1);let u=r.replace(/^\/*/,"/"),d=t.useMemo((()=>({basename:u,navigator:l,static:s,future:K({v7_relativeSplatPath:!1},c)})),[u,c,l,s]);"string"===typeof a&&(a=v(a));let{pathname:h="/",search:f="",hash:m="",state:_=null,key:g="default"}=a,y=t.useMemo((()=>{let e=R(h,u);return null==e?null:{location:{pathname:e,search:f,hash:m,state:_,key:g},navigationType:i}}),[u,h,f,m,_,g,i]);return null==y?null:t.createElement(Q.Provider,{value:d},t.createElement(J.Provider,{children:o,value:y}))}function ke(e){let{children:t,location:n}=e;return le(xe(t),n)}new Promise((()=>{}));t.Component;function xe(e,n){void 0===n&&(n=[]);let r=[];return t.Children.forEach(e,((e,o)=>{if(!t.isValidElement(e))return;let a=[...n,o];if(e.type===t.Fragment)return void r.push.apply(r,xe(e.props.children,a));e.type!==be&&p(!1),e.props.index&&e.props.children&&p(!1);let i={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=xe(e.props.children,a)),r.push(i)})),r}function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function Ae(e){return void 0===e&&(e=""),new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Ee=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Me=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(Id){}const Ne=t.createContext({isTransitioning:!1});new Map;const Te=t.startTransition;t.flushSync,t.useId;function $e(e){let{basename:n,children:r,future:o,window:a}=e,i=t.useRef();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),y((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=v(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),_("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"===typeof t?t:g(t))}),(function(e,t){f("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:a,v5Compat:!0}));let l=i.current,[s,c]=t.useState({action:l.action,location:l.location}),{v7_startTransition:u}=o||{},d=t.useCallback((e=>{u&&Te?Te((()=>c(e))):c(e)}),[c,u]);return t.useLayoutEffect((()=>l.listen(d)),[l,d]),t.createElement(we,{basename:n,children:r,location:s.location,navigationType:s.action,navigator:l,future:o})}const Pe="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,De=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Oe=t.forwardRef((function(e,n){let r,{onClick:o,relative:a,reloadDocument:i,replace:l,state:s,target:c,to:u,preventScrollReset:d,unstable_viewTransition:h}=e,f=Ce(e,Ee),{basename:m}=t.useContext(Q),_=!1;if("string"===typeof u&&De.test(u)&&(r=u,Pe))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=R(t.pathname,m);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:_=!0}catch(Id){}let v=function(e,n){let{relative:r}=void 0===n?{}:n;te()||p(!1);let{basename:o,navigator:a}=t.useContext(Q),{hash:i,pathname:l,search:s}=ie(e,{relative:r}),c=l;return"/"!==o&&(c="/"===l?o:H([o,l])),a.createHref({pathname:c,search:s,hash:i})}(u,{relative:a}),y=function(e,n){let{target:r,replace:o,state:a,preventScrollReset:i,relative:l,unstable_viewTransition:s}=void 0===n?{}:n,c=oe(),u=ne(),d=ie(e,{relative:l});return t.useCallback((t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,r)){t.preventDefault();let n=void 0!==o?o:g(u)===g(d);c(e,{replace:n,state:a,preventScrollReset:i,relative:l,unstable_viewTransition:s})}}),[u,c,d,o,a,r,e,i,l,s])}(u,{replace:l,state:s,target:c,preventScrollReset:d,relative:a,unstable_viewTransition:h});return t.createElement("a",Se({},f,{href:r||v,onClick:_||i?o:function(e){o&&o(e),e.defaultPrevented||y(e)},ref:n,target:c}))}));const Le=t.forwardRef((function(e,n){let{"aria-current":r="page",caseSensitive:o=!1,className:a="",end:i=!1,style:l,to:s,unstable_viewTransition:c,children:u}=e,d=Ce(e,Me),h=ie(s,{relative:d.relative}),f=ne(),m=t.useContext(G),{navigator:_,basename:g}=t.useContext(Q),v=null!=m&&function(e,n){void 0===n&&(n={});let r=t.useContext(Ne);null==r&&p(!1);let{basename:o}=Ie(Re.useViewTransitionState),a=ie(e,{relative:n.relative});if(!r.isTransitioning)return!1;let i=R(r.currentLocation.pathname,o)||r.currentLocation.pathname,l=R(r.nextLocation.pathname,o)||r.nextLocation.pathname;return null!=O(a.pathname,l)||null!=O(a.pathname,i)}(h)&&!0===c,y=_.encodeLocation?_.encodeLocation(h).pathname:h.pathname,b=f.pathname,w=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;o||(b=b.toLowerCase(),w=w?w.toLowerCase():null,y=y.toLowerCase()),w&&g&&(w=R(w,g)||w);const k="/"!==y&&y.endsWith("/")?y.length-1:y.length;let x,S=b===y||!i&&b.startsWith(y)&&"/"===b.charAt(k),C=null!=w&&(w===y||!i&&w.startsWith(y)&&"/"===w.charAt(y.length)),A={isActive:S,isPending:C,isTransitioning:v},E=S?r:void 0;x="function"===typeof a?a(A):[a,S?"active":null,C?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let M="function"===typeof l?l(A):l;return t.createElement(Oe,Se({},d,{"aria-current":E,className:x,ref:n,style:M,to:s,unstable_viewTransition:c}),"function"===typeof u?u(A):u)}));var Re,ze;function Ie(e){let n=t.useContext(Z);return n||p(!1),n}function je(e){let n=t.useRef(Ae(e)),r=t.useRef(!1),o=ne(),a=t.useMemo((()=>function(e,t){let n=Ae(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(o.search,r.current?null:n.current)),[o.search]),i=oe(),l=t.useCallback(((e,t)=>{const n=Ae("function"===typeof e?e(a):e);r.current=!0,i("?"+n,t)}),[i,a]);return[a,l]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Re||(Re={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(ze||(ze={}));const Fe=()=>{var e;const t=(null===(e=document.getElementById("root"))||void 0===e?void 0:e.dataset.params)||"{}";try{return JSON.parse(t)}catch(Id){return console.error(Id),{}}},He=()=>!!Object.keys(Fe()).length,Ve=/(\/select\/)(\d+|\d.+)(\/)(.+)/,Be=e=>{var t;return(null===(t=e.match(Ve))||void 0===t?void 0:t[2])||""};let Ue=function(e){return e.logs="logs",e.anomaly="anomaly",e}({});const Ye=(e,t)=>{t?window.localStorage.setItem(e,JSON.stringify({value:t})):qe([e]),window.dispatchEvent(new Event("storage"))},We=e=>{const t=window.localStorage.getItem(e);if(null!==t)try{var n;return null===(n=JSON.parse(t))||void 0===n?void 0:n.value}catch(Id){return t}},qe=e=>e.forEach((e=>window.localStorage.removeItem(e))),{REACT_APP_TYPE:Ke}={REACT_APP_TYPE:"logs"};var Ze=n(215),Ge=n.n(Ze),Qe=n(424),Je=n.n(Qe);const Xe={table:100,chart:20,code:1e3},et=(e,t)=>{const n=window.location.hash.split("?")[1],r=Ge().parse(n,{ignoreQueryPrefix:!0});return Je()(r,e,t||"")};let tt=function(e){return e.yhat="yhat",e.yhatUpper="yhat_upper",e.yhatLower="yhat_lower",e.anomaly="vmui_anomalies_points",e.training="vmui_training_data",e.actual="actual",e.anomalyScore="anomaly_score",e}({}),nt=function(e){return e.table="table",e.chart="chart",e.code="code",e}({}),rt=function(e){return e.emptyServer="Please enter Server URL",e.validServer="Please provide a valid Server URL",e.validQuery="Please enter a valid Query and execute it",e.traceNotFound="Not found the tracing information",e.emptyTitle="Please enter title",e.positiveNumber="Please enter positive number",e.validStep="Please enter a valid step",e.unknownType="Unknown server response format: must have 'errorType'",e}({}),ot=function(e){return e.system="system",e.light="light",e.dark="dark",e}({}),at=function(e){return e.empty="empty",e.metricsql="metricsql",e.label="label",e.labelValue="labelValue",e}({});const it=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),lt=(e,t)=>{document.documentElement.style.setProperty(`--${e}`,t)},st=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,ct=e=>e.replace(/\/$/,""),ut=et("g0.tenantID",""),dt={serverUrl:ct((e=>{const{serverURL:t}=Fe(),n=We("SERVER_URL"),r=window.location.href.replace(/\/(select\/)?(vmui)\/.*/,""),o=`${window.location.origin}${window.location.pathname.replace(/^\/vmui/,"")}`,a=window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),i=t||n||a;switch(Ke){case Ue.logs:return r;case Ue.anomaly:return n||o;default:return e?((e,t)=>e.replace(Ve,`$1${t}/$4`))(i,e):i}})(ut)),tenantId:ut,theme:We("THEME")||ot.system,isDarkTheme:null,flags:{},appConfig:{}};function ht(e,t){switch(t.type){case"SET_SERVER":return{...e,serverUrl:ct(t.payload)};case"SET_TENANT_ID":return{...e,tenantId:t.payload};case"SET_THEME":return Ye("THEME",t.payload),{...e,theme:t.payload};case"SET_DARK_THEME":return{...e,isDarkTheme:(n=e.theme,n===ot.system&&st()||n===ot.dark)};case"SET_FLAGS":return{...e,flags:t.payload};case"SET_APP_CONFIG":return{...e,appConfig:t.payload};default:throw new Error}var n}var pt=n(746);var ft=0;Array.isArray;function mt(e,t,n,r,o,a){t||(t={});var i,l,s=t;"ref"in t&&(i=t.ref,delete t.ref);var c={type:e,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--ft,__i:-1,__u:0,__source:o,__self:a};if("function"==typeof e&&(i=e.defaultProps))for(l in i)void 0===s[l]&&(s[l]=i[l]);return pt.fF.vnode&&pt.fF.vnode(c),c}const _t=(0,t.createContext)({}),gt=()=>(0,t.useContext)(_t).state,vt=()=>(0,t.useContext)(_t).dispatch,yt=Object.entries(dt).reduce(((e,t)=>{let[n,r]=t;return{...e,[n]:et(n)||r}}),{}),bt="YYYY-MM-DD",wt="YYYY-MM-DD HH:mm:ss",kt="YYYY-MM-DD[T]HH:mm:ss",xt=window.innerWidth/4,St=window.innerWidth/40,Ct=1,At=1578e8,Et=Intl.supportedValuesOf,Mt=Et?Et("timeZone"):["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Katmandu","Asia/Khandyga","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis"],Nt=[{long:"years",short:"y",possible:"year"},{long:"weeks",short:"w",possible:"week"},{long:"days",short:"d",possible:"day"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}],Tt=Nt.map((e=>e.short)),$t=e=>{let t=(n=e,Math.round(1e3*n)/1e3);var n;const r=Math.round(e);e>=100&&(t=r-r%10),e<100&&e>=10&&(t=r-r%5),e<10&&e>=1&&(t=r),e<1&&e>.01&&(t=Math.round(40*e)/40);const a=(e=>zt(o().duration(e,"seconds").asMilliseconds()))(t||.001);return a.replace(/\s/g,"")},Pt=e=>{const t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Tt.includes(n[0]))return{[n[0]]:t[0]}},Dt=(e,t)=>$t(e/(t?St:xt)),Ot=(e,t)=>{const n=(t||o()().toDate()).valueOf()/1e3,r=(e=>{const t=Nt.map((e=>e.short)).join("|"),n=new RegExp(`\\d+(\\.\\d+)?[${t}]+`,"g"),r=(e.match(n)||[]).reduce(((e,t)=>{const n=Pt(t);return n?{...e,...n}:{...e}}),{});return o().duration(r).asSeconds()})(e);return{start:n-r,end:n,step:Dt(r),date:Lt(t||o()().toDate())}},Lt=e=>o().tz(e).utc().format(kt),Rt=e=>o().tz(e).format(kt),zt=e=>{const t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),o=Math.floor(e/1e3/3600%24),a=Math.floor(e/864e5),i=["d","h","m","s","ms"],l=[a,o,r,n,t].map(((e,t)=>e?`${e}${i[t]}`:""));return l.filter((e=>e)).join("")},It=e=>{const t=o()(1e3*e);return t.isValid()?t.toDate():new Date},jt="logs"===Ue.logs,Ft=[{title:"Last 5 minutes",duration:"5m",isDefault:jt},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!jt},{title:"Last 1 hour",duration:"1h"},{title:"Last 3 hours",duration:"3h"},{title:"Last 6 hours",duration:"6h"},{title:"Last 12 hours",duration:"12h"},{title:"Last 24 hours",duration:"24h"},{title:"Last 2 days",duration:"2d"},{title:"Last 7 days",duration:"7d"},{title:"Last 30 days",duration:"30d"},{title:"Last 90 days",duration:"90d"},{title:"Last 180 days",duration:"180d"},{title:"Last 1 year",duration:"1y"},{title:"Yesterday",duration:"1d",until:()=>o()().tz().subtract(1,"day").endOf("day").toDate()},{title:"Today",duration:"1d",until:()=>o()().tz().endOf("day").toDate()}].map((e=>({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:()=>o()().tz().toDate(),...e}))),Ht=e=>{var t;let{relativeTimeId:n,defaultDuration:r,defaultEndInput:o}=e;const a=null===(t=Ft.find((e=>e.isDefault)))||void 0===t?void 0:t.id,i=n||et("g0.relative_time",a),l=Ft.find((e=>e.id===i));return{relativeTimeId:l?i:"none",duration:l?l.duration:r,endInput:l?l.until():o}},Vt=e=>`UTC${o()().tz(e).format("Z")}`,Bt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=new RegExp(e,"i");return Mt.reduce(((n,r)=>{const o=(r.match(/^(.*?)\//)||[])[1]||"unknown",a=Vt(r),i=a.replace(/UTC|0/,""),l=r.replace(/[/_]/g," "),s={region:r,utc:a,search:`${r} ${a} ${l} ${i}`},c=!e||e&&t.test(s.search);return c&&n[o]?n[o].push(s):c&&(n[o]=[s]),n}),{})},Ut=e=>{o().tz.setDefault(e)},Yt=()=>{const e=o().tz.guess(),t=(e=>{try{return o()().tz(e),!0}catch(Id){return!1}})(e);return{isValid:t,title:t?`Browser Time (${e})`:"Browser timezone (UTC)",region:t?e:"UTC"}},Wt=We("TIMEZONE")||Yt().region;Ut(Wt);const qt={...(()=>{const e=et("g0.range_input"),{duration:t,endInput:n,relativeTimeId:r}=Ht({defaultDuration:e||"1h",defaultEndInput:(a=et("g0.end_input",o()().utc().format(kt)),o()(a).utcOffset(0,!0).toDate()),relativeTimeId:e?et("g0.relative_time","none"):void 0});var a;return{duration:t,period:Ot(t,n),relativeTime:r}})(),timezone:Wt};function Kt(e,t){switch(t.type){case"SET_TIME_STATE":return{...e,...t.payload};case"SET_DURATION":return{...e,duration:t.payload,period:Ot(t.payload,It(e.period.end)),relativeTime:"none"};case"SET_RELATIVE_TIME":return{...e,duration:t.payload.duration,period:Ot(t.payload.duration,t.payload.until),relativeTime:t.payload.id};case"SET_PERIOD":const n=(e=>{const t=e.to.valueOf()-e.from.valueOf();return zt(t)})(t.payload);return{...e,duration:n,period:Ot(n,t.payload.to),relativeTime:"none"};case"RUN_QUERY":const{duration:r,endInput:o}=Ht({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:It(e.period.end)});return{...e,period:Ot(r,o)};case"RUN_QUERY_TO_NOW":return{...e,period:Ot(e.duration)};case"SET_TIMEZONE":return Ut(t.payload),Ye("TIMEZONE",t.payload),e.defaultTimezone&&Ye("DISABLED_DEFAULT_TIMEZONE",t.payload!==e.defaultTimezone),{...e,timezone:t.payload};case"SET_DEFAULT_TIMEZONE":return{...e,defaultTimezone:t.payload};default:throw new Error}}const Zt=(0,t.createContext)({}),Gt=()=>(0,t.useContext)(Zt).state,Qt=()=>(0,t.useContext)(Zt).dispatch,Jt=e=>{const t=e.map((e=>e.values[e.index])),n=(e=>{const t=We(e);return t?JSON.parse(t):[]})("QUERY_HISTORY");n[0]||(n[0]=[]);const r=n[0];t.forEach((e=>{!r.includes(e)&&e&&r.unshift(e),r.length>250&&r.shift()})),Ye("QUERY_HISTORY",JSON.stringify(n))},Xt=50,en=1e3,tn=1e3;const nn=(()=>{var e;const t=(null===(e=(window.location.hash.split("?")[1]||"").match(/g\d+\.expr/g))||void 0===e?void 0:e.length)||1;return new Array(t>10?10:t).fill(1).map(((e,t)=>et(`g${t}.expr`,"")))})(),rn={query:nn,queryHistory:nn.map((e=>({index:0,values:[e]}))),autocomplete:We("AUTOCOMPLETE")||!1,autocompleteQuick:!1,autocompleteCache:new class{constructor(){this.maxSize=void 0,this.map=void 0,this.maxSize=tn,this.map=new Map}get(e){for(const[t,n]of this.map){const r=JSON.parse(t),o=r.start===e.start&&r.end===e.end,a=r.type===e.type,i=e.value&&r.value&&e.value.includes(r.value),l=r.match===e.match||i,s=n.length=this.maxSize){const e=this.map.keys().next().value;this.map.delete(e)}this.map.set(JSON.stringify(e),t)}},metricsQLFunctions:[]};function on(e,t){switch(t.type){case"SET_QUERY":return{...e,query:t.payload.map((e=>e))};case"SET_QUERY_HISTORY":return Jt(t.payload),{...e,queryHistory:t.payload};case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),{...e,queryHistory:e.queryHistory};case"TOGGLE_AUTOCOMPLETE":return Ye("AUTOCOMPLETE",!e.autocomplete),{...e,autocomplete:!e.autocomplete};case"SET_AUTOCOMPLETE_QUICK":return{...e,autocompleteQuick:t.payload};case"SET_AUTOCOMPLETE_CACHE":return e.autocompleteCache.put(t.payload.key,t.payload.value),{...e};case"SET_METRICSQL_FUNCTIONS":return{...e,metricsQLFunctions:t.payload};default:throw new Error}}const an=(0,t.createContext)({}),ln=()=>(0,t.useContext)(an).state,sn=()=>(0,t.useContext)(an).dispatch,cn=()=>mt("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:mt("path",{d:"M6.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29C15.73 4.1 12.46 3.01 7.43 3h-.06C2.33 3-.93 4.1.24 5.18c0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a454.94 454.94 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44a454.4 454.4 0 0 0 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM35 5l-5.84 14.46h-2.43L20.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H35Zm17.18 0v14.46H49.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L38.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H36.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15Z"})}),un=()=>mt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:[mt("path",{d:"M11.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29 1.17-1.09-2.1-2.17-7.13-2.18h-.06c-5.04 0-8.3 1.1-7.13 2.18 0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a455.13 455.13 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44 2.05-1.82 4.09-3.65 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM40 5l-5.84 14.46h-2.43L25.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H40Zm17.18 0v14.46H54.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L43.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H41.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15ZM1.73 36v-5.17l-.67-.07a.6.6 0 0 1-.21-.1.23.23 0 0 1-.08-.18v-.44h.96v-.59c0-.34.05-.65.14-.92a1.79 1.79 0 0 1 1.08-1.11 2.45 2.45 0 0 1 1.62-.02l-.03.53c0 .1-.06.15-.16.16H4c-.18 0-.35.03-.5.08a.95.95 0 0 0-.39.23c-.1.11-.19.25-.25.43-.05.18-.08.4-.08.65v.56h1.75v.78H2.8V36H1.73Zm6.17-6.17c.45 0 .85.07 1.2.22a2.57 2.57 0 0 1 1.5 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.86-.07-1.22-.21a2.57 2.57 0 0 1-1.5-1.62c-.12-.38-.19-.81-.19-1.3 0-.47.07-.9.2-1.28a2.57 2.57 0 0 1 1.5-1.62c.35-.15.76-.22 1.2-.22Zm0 5.42c.6 0 1.05-.2 1.35-.6.3-.4.44-.97.44-1.69s-.15-1.28-.44-1.69c-.3-.4-.75-.6-1.35-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.33.73-.08.28-.11.6-.11.96 0 .72.15 1.29.44 1.69.3.4.76.6 1.36.6Zm5.26-4.11c.2-.42.43-.74.71-.97.28-.24.62-.36 1.03-.36.13 0 .25.02.36.05.12.02.23.07.32.13l-.08.8c-.02.1-.08.15-.18.15l-.24-.04a1.7 1.7 0 0 0-.88.05c-.15.05-.29.14-.4.25-.12.1-.23.24-.32.4-.1.17-.18.35-.26.56V36h-1.07v-6.08h.61c.12 0 .2.02.24.07.05.04.08.12.1.23l.06.92Zm13.73-3.82L23.39 36h-1.46l-3.5-8.68h1.29a.54.54 0 0 1 .54.37l2.04 5.3a11.31 11.31 0 0 1 .37 1.21 11.65 11.65 0 0 1 .35-1.22l2.03-5.29c.03-.1.1-.18.19-.25.1-.08.21-.12.35-.12h1.3Zm2.2 2.52V36H27.6v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.08.36a1 1 0 0 1-.51.5.96.96 0 0 1-.73 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .37.08c.12.05.22.11.3.2a.94.94 0 0 1 .3.67Zm5.72 3.1a.68.68 0 0 1-.13.13c-.04.03-.1.05-.18.05a.42.42 0 0 1-.22-.07 3.95 3.95 0 0 0-.62-.31c-.14-.05-.3-.07-.51-.07-.26 0-.5.04-.69.14-.2.1-.36.23-.49.4-.13.18-.22.4-.29.64-.06.25-.1.53-.1.85 0 .33.04.62.1.88.08.25.18.47.32.64.13.18.29.3.48.4.18.09.4.13.63.13a1.6 1.6 0 0 0 .94-.27l.26-.2a.4.4 0 0 1 .25-.09.3.3 0 0 1 .27.14l.43.54a2.76 2.76 0 0 1-1.77.96c-.22.03-.43.05-.65.05a2.57 2.57 0 0 1-1.96-.83c-.25-.28-.45-.6-.6-1-.14-.4-.21-.85-.21-1.35 0-.45.06-.87.2-1.25a2.61 2.61 0 0 1 1.51-1.67c.37-.16.8-.24 1.28-.24.46 0 .86.07 1.2.22.35.15.66.36.94.64l-.4.54Zm3.43 4.95c-.54 0-.95-.15-1.24-.45-.28-.3-.42-.73-.42-1.26v-3.44h-.63a.29.29 0 0 1-.2-.07c-.06-.06-.09-.13-.09-.24v-.59l.99-.16.31-1.68a.33.33 0 0 1 .12-.18.34.34 0 0 1 .21-.07h.77v1.94h1.64v1.05h-1.64v3.34c0 .2.05.34.14.45.1.1.22.16.39.16a.73.73 0 0 0 .39-.1l.12-.07a.2.2 0 0 1 .11-.03c.05 0 .08.01.11.03l.09.1.44.72c-.21.18-.46.32-.74.4-.28.1-.57.15-.87.15Zm5.09-6.35c.46 0 .87.07 1.24.22a2.7 2.7 0 0 1 1.58 1.63c.14.39.22.83.22 1.31 0 .49-.08.93-.22 1.32-.14.4-.35.73-.62 1-.26.28-.58.49-.96.64-.37.15-.78.22-1.24.22a3.4 3.4 0 0 1-1.25-.22 2.71 2.71 0 0 1-1.59-1.64 3.8 3.8 0 0 1-.21-1.32c0-.48.07-.92.21-1.31a2.75 2.75 0 0 1 1.58-1.63c.38-.15.8-.22 1.26-.22Zm0 5.2c.51 0 .89-.17 1.13-.52.25-.34.38-.84.38-1.5a2.6 2.6 0 0 0-.38-1.53c-.24-.34-.62-.52-1.13-.52-.52 0-.9.18-1.16.53-.25.35-.37.85-.37 1.51s.12 1.17.37 1.51c.25.35.64.52 1.16.52Zm5.56-4.04c.2-.37.42-.65.69-.86.26-.21.57-.32.94-.32.28 0 .5.06.68.19l-.1 1.1a.3.3 0 0 1-.09.16.24.24 0 0 1-.15.04 1.8 1.8 0 0 1-.27-.03 2.01 2.01 0 0 0-.34-.03c-.16 0-.3.03-.44.08a1.1 1.1 0 0 0-.34.2c-.1.1-.2.2-.27.33-.08.13-.15.27-.22.44V36H47.7v-6.16h.87c.15 0 .26.03.31.09.06.05.1.15.13.29l.09.7Zm4.62-1.07V36h-1.49v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.07.36a1 1 0 0 1-.51.5.96.96 0 0 1-.74 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .38.08c.11.05.21.11.3.2a.94.94 0 0 1 .28.67Zm4.56 5.32a7.8 7.8 0 0 0-1.08.12c-.29.05-.52.12-.7.2a.92.92 0 0 0-.38.3.64.64 0 0 0-.11.36c0 .26.07.45.23.56.15.11.35.17.6.17.3 0 .57-.06.79-.17.22-.1.44-.28.65-.5v-1.04Zm-3.4-2.67c.71-.65 1.57-.97 2.56-.97.36 0 .68.06.97.18a1.99 1.99 0 0 1 1.16 1.24c.1.3.16.61.16.96V36h-.67a.7.7 0 0 1-.33-.06c-.07-.04-.13-.13-.18-.26l-.13-.44c-.16.14-.3.26-.46.37a2.8 2.8 0 0 1-.97.43 2.77 2.77 0 0 1-1.32-.05 1.62 1.62 0 0 1-.57-.31 1.41 1.41 0 0 1-.38-.53 1.85 1.85 0 0 1-.05-1.18c.05-.16.14-.3.25-.45.12-.14.28-.27.46-.4a3 3 0 0 1 .7-.32 9.19 9.19 0 0 1 2.2-.33v-.36c0-.41-.09-.71-.26-.91-.18-.2-.43-.3-.76-.3a1.84 1.84 0 0 0-1.02.28l-.33.18c-.1.06-.2.09-.32.09-.1 0-.2-.03-.27-.08a.72.72 0 0 1-.17-.2l-.26-.47Zm11.49 4.32V36h-4.88v-8.6h1.16v7.62h3.72Zm3.16-5.2c.44 0 .84.08 1.2.23a2.57 2.57 0 0 1 1.49 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.85-.07-1.21-.21a2.57 2.57 0 0 1-1.5-1.62c-.13-.38-.2-.81-.2-1.3 0-.47.07-.9.2-1.28.14-.39.33-.72.59-1 .25-.26.55-.47.9-.62.37-.15.77-.22 1.22-.22Zm0 5.43c.6 0 1.05-.2 1.34-.6.3-.4.45-.97.45-1.69s-.15-1.28-.45-1.69c-.3-.4-.74-.6-1.34-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.34.73-.07.28-.1.6-.1.96 0 .72.14 1.29.44 1.69.3.4.75.6 1.36.6Zm6.33-2.22c.22 0 .4-.03.57-.09.16-.06.3-.14.41-.25.12-.11.2-.24.26-.39.05-.15.08-.31.08-.5 0-.37-.11-.66-.34-.88-.23-.22-.55-.33-.98-.33-.43 0-.76.1-.99.33-.22.22-.34.51-.34.89 0 .18.03.34.09.5a1.1 1.1 0 0 0 .67.63c.16.06.35.09.57.09Zm1.93 3.3a.51.51 0 0 0-.13-.36.84.84 0 0 0-.34-.22 8.57 8.57 0 0 0-1.73-.2 7.5 7.5 0 0 1-.62-.05c-.23.1-.41.23-.56.4a.8.8 0 0 0-.1.92c.07.12.18.22.32.3.14.1.32.16.54.21a3.5 3.5 0 0 0 1.55 0c.23-.05.42-.12.57-.22.16-.1.29-.21.37-.34a.8.8 0 0 0 .13-.44Zm1.08-6.17v.4c0 .13-.08.21-.25.25l-.69.09c.14.26.2.56.2.88a1.86 1.86 0 0 1-1.36 1.82 3.07 3.07 0 0 1-1.72.04c-.12.08-.22.16-.29.25a.44.44 0 0 0-.1.27c0 .15.06.26.17.33.12.08.28.13.47.16a5 5 0 0 0 .66.06 16.56 16.56 0 0 1 1.5.13c.26.05.48.12.67.22.19.1.34.24.46.41.12.18.18.4.18.69 0 .26-.07.5-.2.75s-.31.46-.56.65c-.24.2-.54.34-.9.46a4.57 4.57 0 0 1-2.36.04c-.33-.09-.6-.2-.82-.36a1.56 1.56 0 0 1-.5-.51c-.1-.2-.16-.4-.16-.6 0-.3.1-.56.28-.77.19-.2.45-.37.77-.5a1.15 1.15 0 0 1-.43-.32.88.88 0 0 1-.15-.54c0-.09.01-.18.04-.27.04-.1.08-.2.15-.28a1.55 1.55 0 0 1 .58-.5c-.3-.16-.53-.39-.7-.66-.17-.28-.25-.6-.25-.97 0-.3.05-.57.16-.8.12-.25.28-.46.48-.63.2-.17.45-.3.73-.4a3 3 0 0 1 2.3.21h1.64Zm4.65.76a.24.24 0 0 1-.23.14.42.42 0 0 1-.2-.07 3.59 3.59 0 0 0-.67-.3 1.8 1.8 0 0 0-1.03 0c-.14.05-.27.11-.37.2a.87.87 0 0 0-.23.27.75.75 0 0 0-.08.35c0 .15.04.28.13.39.1.1.21.19.36.27.15.07.32.14.5.2a13.63 13.63 0 0 1 1.16.4c.2.08.36.18.5.3a1.33 1.33 0 0 1 .5 1.07 2 2 0 0 1-.15.78c-.1.24-.25.44-.45.62-.2.17-.43.3-.72.4a3.1 3.1 0 0 1-2.14-.05 2.97 2.97 0 0 1-.87-.53l.25-.41c.04-.05.07-.1.12-.12a.3.3 0 0 1 .17-.04.4.4 0 0 1 .22.08l.3.19a1.91 1.91 0 0 0 1.03.27c.2 0 .38-.03.54-.08.16-.06.29-.13.4-.22a.96.96 0 0 0 .3-.7c0-.17-.05-.31-.14-.42-.09-.11-.2-.2-.36-.28a2.6 2.6 0 0 0-.5-.2l-.59-.19c-.2-.06-.39-.14-.58-.22a2.14 2.14 0 0 1-.5-.3 1.45 1.45 0 0 1-.36-.46c-.1-.19-.14-.41-.14-.67a1.6 1.6 0 0 1 .57-1.23c.18-.16.4-.3.68-.39.26-.1.57-.14.91-.14a2.84 2.84 0 0 1 1.9.7l-.23.4Z"}),mt("defs",{children:mt("path",{d:"M0 0h85v38H0z"})})]}),dn=()=>mt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:mt("path",{d:"M11.118 10.476c.36.28.801.433 1.257.436h.052c.48-.007.961-.192 1.25-.444 1.509-1.279 5.88-5.287 5.88-5.287 1.168-1.087-2.093-2.174-7.13-2.181h-.06c-5.036.007-8.298 1.094-7.13 2.181 0 0 4.372 4.008 5.88 5.295zm2.559 2.166c-.359.283-.801.439-1.258.444h-.044a2.071 2.071 0 0 1-1.257-.444C10.082 11.755 6.384 8.42 5 7.148v1.93c0 .215.081.496.222.629l.07.064c1.045.955 4.546 4.154 5.825 5.245.358.283.8.438 1.257.444h.044c.489-.015.962-.2 1.258-.444 1.309-1.11 4.948-4.444 5.887-5.31.148-.132.222-.413.222-.628v-1.93a455.127 455.127 0 0 1-6.11 5.494zm-1.258 4.984a2.071 2.071 0 0 0 1.258-.436c2.053-1.815 4.09-3.65 6.11-5.502v1.938c0 .207-.075.488-.223.621-.94.873-4.578 4.2-5.887 5.31-.296.25-.77.436-1.258.443h-.044a2.071 2.071 0 0 1-1.257-.436c-1.204-1.027-4.376-3.928-5.616-5.062l-.28-.255c-.14-.133-.221-.414-.221-.621v-1.938c1.383 1.265 5.081 4.607 6.117 5.495.358.282.8.438 1.257.443h.044zM40 5l-5.84 14.46h-2.43L25.89 5h2.16c.233 0 .423.057.57.17.146.113.256.26.33.44l3.41 8.82c.113.287.22.603.32.95.106.34.206.697.3 1.07.08-.373.166-.73.26-1.07a8.84 8.84 0 0 1 .31-.95l3.39-8.82a.959.959 0 0 1 .31-.42.906.906 0 0 1 .58-.19H40zm17.176 0v14.46h-2.37v-9.34c0-.373.02-.777.06-1.21l-4.37 8.21c-.206.393-.523.59-.95.59h-.38c-.426 0-.743-.197-.95-.59l-4.42-8.24c.02.22.037.437.05.65.014.213.02.41.02.59v9.34h-2.37V5h2.03c.12 0 .224.003.31.01a.778.778 0 0 1 .23.05c.074.027.137.07.19.13.06.06.117.14.17.24l4.33 8.03c.114.213.217.433.31.66.1.227.197.46.29.7.094-.247.19-.483.29-.71.1-.233.207-.457.32-.67l4.27-8.01c.054-.1.11-.18.17-.24a.57.57 0 0 1 .19-.13.903.903 0 0 1 .24-.05c.087-.007.19-.01.31-.01h2.03zm8.887 13.73c.68 0 1.286-.117 1.82-.35.54-.24.996-.57 1.37-.99a4.28 4.28 0 0 0 .85-1.48c.2-.573.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.124 1.51-.37 2.19a5.248 5.248 0 0 1-1.07 1.77c-.46.5-1.024.893-1.69 1.18-.66.287-1.404.43-2.23.43-.827 0-1.574-.143-2.24-.43a5.012 5.012 0 0 1-1.69-1.18 5.33 5.33 0 0 1-1.06-1.77 6.373 6.373 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.096 1.277.29 1.85.2.567.483 1.06.85 1.48.373.42.826.75 1.36.99.54.24 1.15.36 1.83.36zm10.38.73h-1.03V5.31h1.03v14.15zM4.242 35v-5.166l-.672-.078a.595.595 0 0 1-.21-.09.23.23 0 0 1-.078-.186v-.438h.96v-.588c0-.348.048-.656.144-.924.1-.272.24-.5.42-.684a1.79 1.79 0 0 1 .66-.426c.256-.096.544-.144.864-.144.272 0 .522.04.75.12l-.024.534c-.008.096-.062.148-.162.156a4.947 4.947 0 0 1-.39.012c-.184 0-.352.024-.504.072a.949.949 0 0 0-.384.234c-.108.108-.192.25-.252.426a2.184 2.184 0 0 0-.084.654v.558h1.752v.774H5.316V35H4.242zM10.416 28.826a3.1 3.1 0 0 1 1.2.222c.356.148.66.358.912.63s.444.602.576.99c.136.384.204.814.204 1.29 0 .48-.068.912-.204 1.296a2.735 2.735 0 0 1-.576.984 2.572 2.572 0 0 1-.912.63 3.175 3.175 0 0 1-1.2.216c-.448 0-.852-.072-1.212-.216a2.572 2.572 0 0 1-.912-.63 2.805 2.805 0 0 1-.582-.984 3.972 3.972 0 0 1-.198-1.296c0-.476.066-.906.198-1.29.136-.388.33-.718.582-.99.252-.272.556-.482.912-.63.36-.148.764-.222 1.212-.222zm0 5.424c.6 0 1.048-.2 1.344-.6.296-.404.444-.966.444-1.686 0-.724-.148-1.288-.444-1.692-.296-.404-.744-.606-1.344-.606-.304 0-.57.052-.798.156a1.507 1.507 0 0 0-.564.45c-.148.196-.26.438-.336.726a3.941 3.941 0 0 0-.108.966c0 .72.148 1.282.444 1.686.3.4.754.6 1.362.6zM15.677 30.14c.192-.416.428-.74.708-.972.28-.236.622-.354 1.026-.354.128 0 .25.014.366.042.12.028.226.072.318.132l-.078.798c-.024.1-.084.15-.18.15-.056 0-.138-.012-.246-.036a1.694 1.694 0 0 0-.366-.036c-.192 0-.364.028-.516.084-.148.056-.282.14-.402.252a1.782 1.782 0 0 0-.318.408c-.092.16-.176.344-.252.552V35h-1.074v-6.078h.612c.116 0 .196.022.24.066.044.044.074.12.09.228l.072.924zM26.761 28.922 24.283 35h-.96l-2.478-6.078h.87a.33.33 0 0 1 .33.222l1.542 3.912c.048.148.09.292.126.432.036.14.07.28.102.42.032-.14.066-.28.102-.42.036-.14.08-.284.132-.432l1.56-3.912a.33.33 0 0 1 .12-.156.311.311 0 0 1 .198-.066h.834zM27.74 35v-6.078h.643c.152 0 .246.074.282.222l.078.624c.224-.276.476-.502.756-.678.28-.176.604-.264.972-.264.408 0 .738.114.99.342.256.228.44.536.552.924.088-.22.2-.41.336-.57a1.987 1.987 0 0 1 1.014-.624c.196-.048.394-.072.594-.072.32 0 .604.052.852.156.252.1.464.248.636.444.176.196.31.438.402.726.092.284.138.61.138.978V35H34.91v-3.87c0-.476-.104-.836-.312-1.08-.208-.248-.508-.372-.9-.372-.176 0-.344.032-.504.096-.156.06-.294.15-.414.27-.12.12-.216.272-.288.456-.068.18-.102.39-.102.63V35h-1.074v-3.87c0-.488-.098-.852-.294-1.092-.196-.24-.482-.36-.858-.36-.264 0-.508.072-.732.216a2.38 2.38 0 0 0-.618.576V35H27.74zM40.746 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM44.974 29.6c.124-.124.254-.238.39-.342a2.395 2.395 0 0 1 .936-.444c.176-.044.368-.066.576-.066.336 0 .634.058.894.174.26.112.476.272.648.48.176.204.308.45.396.738.092.284.138.598.138.942V35H47.47v-3.918c0-.376-.086-.666-.258-.87-.172-.208-.434-.312-.786-.312-.256 0-.496.058-.72.174a2.58 2.58 0 0 0-.636.474V35h-1.482v-6.156h.906c.192 0 .318.09.378.27l.102.486zM53.085 28.748c.456 0 .87.074 1.242.222a2.692 2.692 0 0 1 1.578 1.626c.144.392.216.83.216 1.314 0 .488-.072.928-.216 1.32-.144.392-.35.726-.618 1.002a2.653 2.653 0 0 1-.96.636 3.333 3.333 0 0 1-1.242.222c-.46 0-.878-.074-1.254-.222a2.712 2.712 0 0 1-.966-.636 2.922 2.922 0 0 1-.618-1.002 3.807 3.807 0 0 1-.216-1.32c0-.484.072-.922.216-1.314.148-.392.354-.724.618-.996.268-.272.59-.482.966-.63a3.397 3.397 0 0 1 1.254-.222zm0 5.202c.512 0 .89-.172 1.134-.516.248-.344.372-.848.372-1.512s-.124-1.17-.372-1.518c-.244-.348-.622-.522-1.134-.522-.52 0-.906.176-1.158.528-.248.348-.372.852-.372 1.512s.124 1.164.372 1.512c.252.344.638.516 1.158.516zM57.252 35v-6.156h.906c.192 0 .318.09.378.27l.096.456c.108-.12.22-.23.336-.33a2.017 2.017 0 0 1 1.32-.492c.388 0 .706.106.954.318.252.208.44.486.564.834a1.93 1.93 0 0 1 .834-.882c.172-.092.354-.16.546-.204.196-.044.392-.066.588-.066.34 0 .642.052.906.156.264.104.486.256.666.456.18.2.316.444.408.732.096.288.144.618.144.99V35h-1.482v-3.918c0-.392-.086-.686-.258-.882-.172-.2-.424-.3-.756-.3-.152 0-.294.026-.426.078a1.026 1.026 0 0 0-.342.228 1.019 1.019 0 0 0-.228.366 1.435 1.435 0 0 0-.084.51V35h-1.488v-3.918c0-.412-.084-.712-.252-.9-.164-.188-.406-.282-.726-.282-.216 0-.418.054-.606.162a1.979 1.979 0 0 0-.516.432V35h-1.482zM70.558 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM74.9 26.084V35h-1.482v-8.916H74.9zM81.969 28.844l-3.354 7.848a.538.538 0 0 1-.174.234c-.068.056-.174.084-.318.084h-1.104l1.152-2.472-2.49-5.694h1.302c.116 0 .206.028.27.084.068.056.118.12.15.192l1.308 3.192c.044.108.08.216.108.324.032.108.062.218.09.33a32.3 32.3 0 0 1 .108-.33c.036-.112.076-.222.12-.33l1.236-3.186a.437.437 0 0 1 .408-.276h1.188z"})}),hn=()=>mt("svg",{viewBox:"0 0 15 17",fill:"currentColor",children:mt("path",{d:"M6.11767 7.47586C6.47736 7.75563 6.91931 7.90898 7.37503 7.91213H7.42681C7.90756 7.90474 8.38832 7.71987 8.67677 7.46846C10.1856 6.18921 14.5568 2.18138 14.5568 2.18138C15.7254 1.09438 12.4637 0.00739 7.42681 0H7.36764C2.3308 0.00739 -0.930935 1.09438 0.237669 2.18138C0.237669 2.18138 4.60884 6.18921 6.11767 7.47586ZM8.67677 9.64243C8.31803 9.92483 7.87599 10.0808 7.41941 10.0861H7.37503C6.91845 10.0808 6.47641 9.92483 6.11767 9.64243C5.0822 8.75513 1.38409 5.42018 0.000989555 4.14832V6.07829C0.000989555 6.29273 0.0823481 6.57372 0.222877 6.70682L0.293316 6.7712L0.293344 6.77122C1.33784 7.72579 4.83903 10.9255 6.11767 12.0161C6.47641 12.2985 6.91845 12.4545 7.37503 12.4597H7.41941C7.90756 12.4449 8.38092 12.2601 8.67677 12.0161C9.9859 10.9069 13.6249 7.57198 14.5642 6.70682C14.7121 6.57372 14.7861 6.29273 14.7861 6.07829V4.14832C12.7662 5.99804 10.7297 7.82949 8.67677 9.64243ZM7.41941 14.6263C7.87513 14.6232 8.31708 14.4698 8.67677 14.19C10.7298 12.3746 12.7663 10.5407 14.7861 8.68853V10.6259C14.7861 10.8329 14.7121 11.1139 14.5642 11.247C13.6249 12.1196 9.9859 15.4471 8.67677 16.5563C8.38092 16.8077 7.90756 16.9926 7.41941 17H7.37503C6.91931 16.9968 6.47736 16.8435 6.11767 16.5637C4.91427 15.5373 1.74219 12.6364 0.502294 11.5025C0.393358 11.4029 0.299337 11.3169 0.222877 11.247C0.0823481 11.1139 0.000989555 10.8329 0.000989555 10.6259V8.68853C1.38409 9.95303 5.0822 13.2953 6.11767 14.1827C6.47641 14.4651 6.91845 14.6211 7.37503 14.6263H7.41941Z"})}),pn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"})}),fn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),mn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zm-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z"})}),_n=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})}),gn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),vn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),yn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),bn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"})}),wn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),kn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"m7 10 5 5 5-5z"})}),xn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[mt("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),mt("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),Sn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"})}),Cn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"})}),An=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"})}),En=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M8 5v14l11-7z"})}),Mn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"})}),Nn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10H3v9z"})}),Tn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"})}),$n=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M8.9999 14.7854L18.8928 4.8925C19.0803 4.70497 19.3347 4.59961 19.5999 4.59961C19.8651 4.59961 20.1195 4.70497 20.307 4.8925L21.707 6.2925C22.0975 6.68303 22.0975 7.31619 21.707 7.70672L9.70701 19.7067C9.31648 20.0972 8.68332 20.0972 8.2928 19.7067L2.6928 14.1067C2.50526 13.9192 2.3999 13.6648 2.3999 13.3996C2.3999 13.1344 2.50526 12.88 2.6928 12.6925L4.0928 11.2925C4.48332 10.902 5.11648 10.902 5.50701 11.2925L8.9999 14.7854Z"})}),Pn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})}),Dn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"})}),On=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),Ln=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})}),Rn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 5C19.89 4.65 18.67 4.5 17.5 4.5C15.55 4.5 13.45 4.9 12 6C10.55 4.9 8.45 4.5 6.5 4.5C5.33 4.5 4.11 4.65 3 5C2.25 5.25 1.6 5.55 1 6V20.6C1 20.85 1.25 21.1 1.5 21.1C1.6 21.1 1.65 21.1 1.75 21.05C3.15 20.3 4.85 20 6.5 20C8.2 20 10.65 20.65 12 21.5C13.35 20.65 15.8 20 17.5 20C19.15 20 20.85 20.3 22.25 21.05C22.35 21.1 22.4 21.1 22.5 21.1C22.75 21.1 23 20.85 23 20.6V6C22.4 5.55 21.75 5.25 21 5ZM21 18.5C19.9 18.15 18.7 18 17.5 18C15.8 18 13.35 18.65 12 19.5C10.65 18.65 8.2 18 6.5 18C5.3 18 4.1 18.15 3 18.5V7C4.1 6.65 5.3 6.5 6.5 6.5C8.2 6.5 10.65 7.15 12 8C13.35 7.15 15.8 6.5 17.5 6.5C18.7 6.5 19.9 6.65 21 7V18.5Z"}),mt("path",{d:"M17.5 10.5C18.38 10.5 19.23 10.59 20 10.76V9.24C19.21 9.09 18.36 9 17.5 9C15.8 9 14.26 9.29 13 9.83V11.49C14.13 10.85 15.7 10.5 17.5 10.5ZM13 12.49V14.15C14.13 13.51 15.7 13.16 17.5 13.16C18.38 13.16 19.23 13.25 20 13.42V11.9C19.21 11.75 18.36 11.66 17.5 11.66C15.8 11.66 14.26 11.96 13 12.49ZM17.5 14.33C15.8 14.33 14.26 14.62 13 15.16V16.82C14.13 16.18 15.7 15.83 17.5 15.83C18.38 15.83 19.23 15.92 20 16.09V14.57C19.21 14.41 18.36 14.33 17.5 14.33Z"}),mt("path",{d:"M6.5 10.5C5.62 10.5 4.77 10.59 4 10.76V9.24C4.79 9.09 5.64 9 6.5 9C8.2 9 9.74 9.29 11 9.83V11.49C9.87 10.85 8.3 10.5 6.5 10.5ZM11 12.49V14.15C9.87 13.51 8.3 13.16 6.5 13.16C5.62 13.16 4.77 13.25 4 13.42V11.9C4.79 11.75 5.64 11.66 6.5 11.66C8.2 11.66 9.74 11.96 11 12.49ZM6.5 14.33C8.2 14.33 9.74 14.62 11 15.16V16.82C9.87 16.18 8.3 15.83 6.5 15.83C5.62 15.83 4.77 15.92 4 16.09V14.57C4.79 14.41 5.64 14.33 6.5 14.33Z"})]}),zn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 6C9.79 6 8 7.79 8 10H10C10 8.9 10.9 8 12 8C13.1 8 14 8.9 14 10C14 10.8792 13.4202 11.3236 12.7704 11.8217C11.9421 12.4566 11 13.1787 11 15H13C13 13.9046 13.711 13.2833 14.4408 12.6455C15.21 11.9733 16 11.2829 16 10C16 7.79 14.21 6 12 6ZM13 16V18H11V16H13Z"})}),In=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2zm4 1H4V5h2v2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2z"})}),jn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),Fn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M7 20h4c0 1.1-.9 2-2 2s-2-.9-2-2zm-2-1h8v-2H5v2zm11.5-9.5c0 3.82-2.66 5.86-3.77 6.5H5.27c-1.11-.64-3.77-2.68-3.77-6.5C1.5 5.36 4.86 2 9 2s7.5 3.36 7.5 7.5zm4.87-2.13L20 8l1.37.63L22 10l.63-1.37L24 8l-1.37-.63L22 6l-.63 1.37zM19 6l.94-2.06L22 3l-2.06-.94L19 0l-.94 2.06L16 3l2.06.94L19 6z"})}),Hn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M3 14h4v-4H3v4zm0 5h4v-4H3v4zM3 9h4V5H3v4zm5 5h13v-4H8v4zm0 5h13v-4H8v4zM8 5v4h13V5H8z"})}),Vn=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-error"),children:mt("path",{d:"M13.5095 4L8.50952 1H7.50952L2.50952 4L2.01953 4.85999V10.86L2.50952 11.71L7.50952 14.71H8.50952L13.5095 11.71L13.9995 10.86V4.85999L13.5095 4ZM7.50952 13.5601L3.00952 10.86V5.69995L7.50952 8.15002V13.5601ZM3.26953 4.69995L8.00952 1.85999L12.7495 4.69995L8.00952 7.29004L3.26953 4.69995ZM13.0095 10.86L8.50952 13.5601V8.15002L13.0095 5.69995V10.86Z"})}),Bn=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-primary"),children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 5H4V4H1.5L1 4.5V12.5L1.5 13H4V12H2V5ZM14.5 4H12V5H14V12H12V13H14.5L15 12.5V4.5L14.5 4ZM11.76 6.56995L12 7V9.51001L11.7 9.95996L7.19995 11.96H6.73999L4.23999 10.46L4 10.03V7.53003L4.30005 7.06995L8.80005 5.06995H9.26001L11.76 6.56995ZM5 9.70996L6.5 10.61V9.28003L5 8.38V9.70996ZM5.57996 7.56006L7.03003 8.43005L10.42 6.93005L8.96997 6.06006L5.57996 7.56006ZM7.53003 10.73L11.03 9.17004V7.77002L7.53003 9.31995V10.73Z"})}),Un=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-warning"),children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 2H8L7 3V6H8V3H14V8H10V9H14L15 8V3L14 2ZM9 6H13V7H9.41L9 6.59V6ZM7 7H2L1 8V13L2 14H8L9 13V8L8 7H7ZM8 13H2V8H8V9V13ZM3 9H7V10H3V9ZM3 11H7V12H3V11ZM9 4H13V5H9V4Z"})}),Yn=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-primary"),children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 3L8 2H14L15 3V8L14 9H10V8H14V3H8V6H7V3ZM9 9V8L8 7H7H2L1 8V13L2 14H8L9 13V9ZM8 8V9V13H2V8H7H8ZM9.41421 7L9 6.58579V6H13V7H9.41421ZM9 4H13V5H9V4ZM7 10H3V11H7V10Z"})}),Wn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"})}),qn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z"})}),Kn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"})}),Zn=()=>mt("svg",{viewBox:"0 0 24 24",children:mt("path",{fill:"currentColor",d:"M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z",children:mt("animateTransform",{attributeName:"transform",dur:"0.75s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})})});var Gn=n(738),Qn=n.n(Gn);const Jn=e=>{let{to:t,isNavLink:n,children:r,...o}=e;return n?mt(Le,{to:t,...o,children:r}):mt("div",{...o,children:r})},Xn=e=>{let{activeItem:t,item:n,color:r=it("color-primary"),activeNavRef:o,onChange:a,isNavLink:i}=e;return mt(Jn,{className:Qn()({"vm-tabs-item":!0,"vm-tabs-item_active":t===n.value,[n.className||""]:n.className}),isNavLink:i,to:n.value,style:{color:r},onClick:(l=n.value,()=>{a&&a(l)}),ref:t===n.value?o:void 0,children:[n.icon&&mt("div",{className:Qn()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!n.label}),children:n.icon}),n.label]});var l};const er=function(e,n,r,o){const a=(0,t.useRef)(n);(0,t.useEffect)((()=>{a.current=n}),[n]),(0,t.useEffect)((()=>{var t;const n=null!==(t=null===r||void 0===r?void 0:r.current)&&void 0!==t?t:window;if(!n||!n.addEventListener)return;const i=e=>a.current(e);return n.addEventListener(e,i,o),()=>{n.removeEventListener(e,i,o)}}),[e,r,o])},tr=()=>{const[e,n]=(0,t.useState)({width:0,height:0}),r=()=>{n({width:window.innerWidth,height:window.innerHeight})};return er("resize",r),(0,t.useEffect)(r,[]),e},nr=e=>{let{activeItem:n,items:r,color:o=it("color-primary"),onChange:a,indicatorPlacement:i="bottom",isNavLink:l}=e;const s=tr(),c=(0,t.useRef)(null),[u,d]=(0,t.useState)({left:0,width:0,bottom:0});return(0,t.useEffect)((()=>{var e;if((null===(e=c.current)||void 0===e?void 0:e.base)instanceof HTMLElement){const{offsetLeft:e,offsetWidth:t,offsetHeight:n}=c.current.base;d({left:e,width:t,bottom:"top"===i?n-2:0})}}),[s,n,c,r]),mt("div",{className:"vm-tabs",children:[r.map((e=>mt(Xn,{activeItem:n,item:e,onChange:a,color:o,activeNavRef:c,isNavLink:l},e.value))),mt("div",{className:"vm-tabs__indicator",style:{...u,borderColor:o}})]})},rr=[{value:nt.chart,icon:mt(Mn,{}),label:"Graph",prometheusCode:0},{value:nt.code,icon:mt(Tn,{}),label:"JSON",prometheusCode:3},{value:nt.table,icon:mt(Nn,{}),label:"Table",prometheusCode:1}],or=We("SERIES_LIMITS"),ar={displayType:(()=>{const e=et("g0.tab",0),t=rr.find((t=>t.prometheusCode===+e||t.value===e));return(null===t||void 0===t?void 0:t.value)||nt.chart})(),nocache:!1,isTracingEnabled:!1,seriesLimits:or?JSON.parse(or):Xe,tableCompact:We("TABLE_COMPACT")||!1};function ir(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return{...e,displayType:t.payload};case"SET_SERIES_LIMITS":return Ye("SERIES_LIMITS",JSON.stringify(t.payload)),{...e,seriesLimits:t.payload};case"TOGGLE_QUERY_TRACING":return{...e,isTracingEnabled:!e.isTracingEnabled};case"TOGGLE_NO_CACHE":return{...e,nocache:!e.nocache};case"TOGGLE_TABLE_COMPACT":return Ye("TABLE_COMPACT",!e.tableCompact),{...e,tableCompact:!e.tableCompact};default:throw new Error}}const lr=(0,t.createContext)({}),sr={customStep:et("g0.step_input",""),yaxis:{limits:{enable:!1,range:{1:[0,0]}}},isHistogram:!1,spanGaps:!1};function cr(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,enable:!e.yaxis.limits.enable}}};case"SET_CUSTOM_STEP":return{...e,customStep:t.payload};case"SET_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,range:t.payload}}};case"SET_IS_HISTOGRAM":return{...e,isHistogram:t.payload};case"SET_SPAN_GAPS":return{...e,spanGaps:t.payload};default:throw new Error}}const ur=(0,t.createContext)({}),dr={dashboardsSettings:[],dashboardsLoading:!1,dashboardsError:""};function hr(e,t){switch(t.type){case"SET_DASHBOARDS_SETTINGS":return{...e,dashboardsSettings:t.payload};case"SET_DASHBOARDS_LOADING":return{...e,dashboardsLoading:t.payload};case"SET_DASHBOARDS_ERROR":return{...e,dashboardsError:t.payload};default:throw new Error}}const pr=(0,t.createContext)({}),fr={markdownParsing:"true"===We("LOGS_MARKDOWN")};function mr(e,t){if("SET_MARKDOWN_PARSING"===t.type)return Ye("LOGS_MARKDOWN",`${t.payload}`),{...e,markdownParsing:t.payload};throw new Error}const _r=(0,t.createContext)({}),gr=()=>(0,t.useContext)(_r).state,vr={windows:"Windows",mac:"Mac OS",linux:"Linux"},yr=()=>(Object.values(vr).find((e=>navigator.userAgent.indexOf(e)>=0))||"unknown")===vr.mac;function br(){const e=tr(),n=()=>{const e=["Android","webOS","iPhone","iPad","iPod","BlackBerry","Windows Phone"].map((e=>navigator.userAgent.match(new RegExp(e,"i")))).some((e=>e)),t=window.innerWidth<500;return e||t},[r,o]=(0,t.useState)(n());return(0,t.useEffect)((()=>{o(n())}),[e]),{isMobile:r}}const wr={success:mt(yn,{}),error:mt(vn,{}),warning:mt(gn,{}),info:mt(_n,{})},kr=e=>{let{variant:t,children:n}=e;const{isDarkTheme:r}=gt(),{isMobile:o}=br();return mt("div",{className:Qn()({"vm-alert":!0,[`vm-alert_${t}`]:t,"vm-alert_dark":r,"vm-alert_mobile":o}),children:[mt("div",{className:"vm-alert__icon",children:wr[t||"info"]}),mt("div",{className:"vm-alert__content",children:n})]})},xr=(0,t.createContext)({showInfoMessage:()=>{}}),Sr=function(){for(var e=arguments.length,t=new Array(e),n=0;nn=>{let{children:r}=n;return mt(e,{children:mt(t,{children:r})})}),(e=>{let{children:t}=e;return mt(pt.FK,{children:t})}))}(...[e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(ht,yt),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(_t.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(Kt,qt),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(Zt.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(on,rn),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(an.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(ir,ar),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(lr.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(cr,sr),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(ur.Provider,{value:a,children:n})},e=>{let{children:n}=e;const{isMobile:r}=br(),[o,a]=(0,t.useState)({}),[i,l]=(0,t.useState)(!1),[s,c]=(0,t.useState)(void 0);(0,t.useEffect)((()=>{if(!s)return;a({message:s.text,variant:s.type,key:Date.now()}),l(!0);const e=setTimeout(u,4e3);return()=>clearTimeout(e)}),[s]);const u=()=>{c(void 0),l(!1)};return mt(xr.Provider,{value:{showInfoMessage:c},children:[i&&mt("div",{className:Qn()({"vm-snackbar":!0,"vm-snackbar_mobile":r}),children:mt(kr,{variant:o.variant,children:mt("div",{className:"vm-snackbar-content",children:[mt("span",{children:o.message}),mt("div",{className:"vm-snackbar-content__close",onClick:u,children:mt(fn,{})})]})})}),n]})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(hr,dr),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(pr.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(mr,fr),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(_r.Provider,{value:a,children:n})}]),Cr=e=>{if(7!=e.length)return"0, 0, 0";return`${parseInt(e.slice(1,3),16)}, ${parseInt(e.slice(3,5),16)}, ${parseInt(e.slice(5,7),16)}`},Ar={[tt.yhatUpper]:"#7126a1",[tt.yhatLower]:"#7126a1",[tt.yhat]:"#da42a6",[tt.anomaly]:"#da4242",[tt.anomalyScore]:"#7126a1",[tt.actual]:"#203ea9",[tt.training]:`rgba(${Cr("#203ea9")}, 0.2)`},Er={"color-primary":"#589DF6","color-secondary":"#316eca","color-error":"#e5534b","color-warning":"#c69026","color-info":"#539bf5","color-success":"#57ab5a","color-background-body":"#22272e","color-background-block":"#2d333b","color-background-tooltip":"rgba(22, 22, 22, 0.8)","color-text":"#cdd9e5","color-text-secondary":"#768390","color-text-disabled":"#636e7b","box-shadow":"rgba(0, 0, 0, 0.16) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.2) 0px 2px 8px 0px","border-divider":"1px solid rgba(99, 110, 123, 0.5)","color-hover-black":"rgba(0, 0, 0, 0.12)","color-log-hits-bar-0":"rgba(255, 255, 255, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},Mr={"color-primary":"#3F51B5","color-secondary":"#E91E63","color-error":"#FD080E","color-warning":"#FF8308","color-info":"#03A9F4","color-success":"#4CAF50","color-background-body":"#FEFEFF","color-background-block":"#FFFFFF","color-background-tooltip":"rgba(80,80,80,0.9)","color-text":"#110f0f","color-text-secondary":"#706F6F","color-text-disabled":"#A09F9F","box-shadow":"rgba(0, 0, 0, 0.08) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.1) 0px 2px 8px 0px","border-divider":"1px solid rgba(0, 0, 0, 0.15)","color-hover-black":"rgba(0, 0, 0, 0.06)","color-log-hits-bar-0":"rgba(0, 0, 0, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},Nr=()=>{const[e,n]=(0,t.useState)(st()),r=e=>{n(e.matches)};return(0,t.useEffect)((()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");return e.addEventListener("change",r),()=>e.removeEventListener("change",r)}),[]),e},Tr=["primary","secondary","error","warning","info","success"],$r=e=>{let{onLoaded:n}=e;const r=He(),{palette:o={}}=Fe(),{theme:a}=gt(),i=Nr(),l=vt(),s=tr(),[c,u]=(0,t.useState)({[ot.dark]:Er,[ot.light]:Mr,[ot.system]:st()?Er:Mr}),d=()=>{const{innerWidth:e,innerHeight:t}=window,{clientWidth:n,clientHeight:r}=document.documentElement;lt("scrollbar-width",e-n+"px"),lt("scrollbar-height",t-r+"px"),lt("vh",.01*t+"px")},h=()=>{Tr.forEach(((e,t)=>{const r=(e=>{let t=e.replace("#","").trim();if(3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length)throw new Error("Invalid HEX color.");return(299*parseInt(t.slice(0,2),16)+587*parseInt(t.slice(2,4),16)+114*parseInt(t.slice(4,6),16))/1e3>=128?"#000000":"#FFFFFF"})(it(`color-${e}`));lt(`${e}-text`,r),t===Tr.length-1&&(l({type:"SET_DARK_THEME"}),n(!0))}))},p=()=>{const e=We("THEME")||ot.system,t=c[e];Object.entries(t).forEach((e=>{let[t,n]=e;lt(t,n)})),h(),r&&(Tr.forEach((e=>{const t=o[e];t&<(`color-${e}`,t)})),h())};return(0,t.useEffect)((()=>{d(),p()}),[c]),(0,t.useEffect)(d,[s]),(0,t.useEffect)((()=>{const e=st()?Er:Mr;c[ot.system]!==e?u((t=>({...t,[ot.system]:e}))):p()}),[a,i]),(0,t.useEffect)((()=>{r&&l({type:"SET_THEME",payload:ot.light})}),[]),null},Pr=()=>{const{showInfoMessage:e}=(0,t.useContext)(xr);return async(t,n)=>{var r;if(null===(r=navigator)||void 0===r||!r.clipboard)return e({text:"Clipboard not supported",type:"error"}),console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(t),n&&e({text:n,type:"success"}),!0}catch(o){return o instanceof Error&&e({text:`${o.name}: ${o.message}`,type:"error"}),console.warn("Copy failed",o),!1}}},Dr=e=>{let{variant:t="contained",color:n="primary",size:r="medium",ariaLabel:o,children:a,endIcon:i,startIcon:l,fullWidth:s=!1,className:c,disabled:u,onClick:d,onMouseDown:h}=e;return mt("button",{className:Qn()({"vm-button":!0,[`vm-button_${t}_${n}`]:!0,[`vm-button_${r}`]:r,"vm-button_icon":(l||i)&&!a,"vm-button_full-width":s,"vm-button_with-icon":l||i,"vm-button_disabled":u,[c||""]:c}),disabled:u,"aria-label":o,onClick:d,onMouseDown:h,children:mt(pt.FK,{children:[l&&mt("span",{className:"vm-button__start-icon",children:l}),a&&mt("span",{children:a}),i&&mt("span",{className:"vm-button__end-icon",children:i})]})})},Or=e=>{let{data:n}=e;const r=Pr(),o=(0,t.useMemo)((()=>`[\n${n.map((e=>1===Object.keys(e).length?JSON.stringify(e):JSON.stringify(e,null,2))).join(",\n").replace(/^/gm," ")}\n]`),[n]);return mt("div",{className:"vm-json-view",children:[mt("div",{className:"vm-json-view__copy",children:mt(Dr,{variant:"outlined",onClick:async()=>{await r(o,"Formatted JSON has been copied")},children:"Copy JSON"})}),mt("pre",{className:"vm-json-view__code",children:mt("code",{children:o})})]})},Lr=(e,n)=>{const[r]=je(),o=r.get(n)?r.get(n):e,[a,i]=(0,t.useState)(o);return(0,t.useEffect)((()=>{o!==a&&i(o)}),[o]),[a,i]},Rr=()=>{const e=oe(),[n,r]=je();return{setSearchParamsFromKeys:(0,t.useCallback)((t=>{const o=!!Array.from(n.values()).length;let a=!1;Object.entries(t).forEach((e=>{let[t,r]=e;n.get(t)!==`${r}`&&(n.set(t,`${r}`),a=!0)})),a&&(o?r(n):e(`?${n.toString()}`,{replace:!0}))}),[n,e])}},zr=e=>{let{checked:t=!1,disabled:n=!1,label:r,color:o="secondary",onChange:a}=e;return mt("div",{className:Qn()({"vm-checkbox":!0,"vm-checkbox_disabled":n,"vm-checkbox_active":t,[`vm-checkbox_${o}_active`]:t,[`vm-checkbox_${o}`]:o}),onClick:()=>{n||a(!t)},children:[mt("div",{className:"vm-checkbox-track",children:mt("div",{className:"vm-checkbox-track__thumb",children:mt($n,{})})}),r&&mt("span",{className:"vm-checkbox__label",children:r})]})},Ir=e=>{let{children:n,title:r,open:o,placement:a="bottom-center",offset:i={top:6,left:0}}=e;const{isMobile:l}=br(),[s,c]=(0,t.useState)(!1),[u,d]=(0,t.useState)({width:0,height:0}),h=(0,t.useRef)(null),p=(0,t.useRef)(null),f=()=>c(!1);(0,t.useEffect)((()=>{if(p.current&&s)return d({width:p.current.clientWidth,height:p.current.clientHeight}),window.addEventListener("scroll",f),()=>{window.removeEventListener("scroll",f)}}),[s,r]);const m=(0,t.useMemo)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(!t||!s)return{};const n=t.getBoundingClientRect(),r={top:0,left:0},o="bottom-right"===a||"top-right"===a,l="bottom-left"===a||"top-left"===a,c=null===a||void 0===a?void 0:a.includes("top"),d=(null===i||void 0===i?void 0:i.top)||0,p=(null===i||void 0===i?void 0:i.left)||0;r.left=n.left-(u.width-n.width)/2+p,r.top=n.height+n.top+d,o&&(r.left=n.right-u.width),l&&(r.left=n.left+p),c&&(r.top=n.top-u.height-d);const{innerWidth:f,innerHeight:m}=window,_=r.top+u.height+20>m,g=r.top-20<0,v=r.left+u.width+20>f,y=r.left-20<0;return _&&(r.top=n.top-u.height-d),g&&(r.top=n.height+n.top+d),v&&(r.left=n.right-u.width-p),y&&(r.left=n.left+p),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[h,a,s,u]),_=()=>{"boolean"!==typeof o&&c(!0)},g=()=>{c(!1)};return(0,t.useEffect)((()=>{"boolean"===typeof o&&c(o)}),[o]),(0,t.useEffect)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",_),t.addEventListener("mouseleave",g),()=>{t.removeEventListener("mouseenter",_),t.removeEventListener("mouseleave",g)}}),[h]),mt(pt.FK,{children:[mt(t.Fragment,{ref:h,children:n}),!l&&s&&t.default.createPortal(mt("div",{className:"vm-tooltip",ref:p,style:m,children:r}),document.body)]})},jr=e=>{let{value:t=!1,disabled:n=!1,label:r,color:o="secondary",fullWidth:a,onChange:i}=e;return mt("div",{className:Qn()({"vm-switch":!0,"vm-switch_full-width":a,"vm-switch_disabled":n,"vm-switch_active":t,[`vm-switch_${o}_active`]:t,[`vm-switch_${o}`]:o}),onClick:()=>{n||i(!t)},children:[mt("div",{className:"vm-switch-track",children:mt("div",{className:"vm-switch-track__thumb"})}),r&&mt("span",{className:"vm-switch__label",children:r})]})};const Fr=e=>{const[n,r]=(0,t.useState)(!!e),o=(0,t.useCallback)((()=>r(!0)),[]),a=(0,t.useCallback)((()=>r(!1)),[]),i=(0,t.useCallback)((()=>r((e=>!e))),[]);return{value:n,setValue:r,setTrue:o,setFalse:a,toggle:i}},Hr=e=>{let{error:n,warning:r,info:o}=e;const a=(0,t.useRef)(null),[i,l]=(0,t.useState)(!1),[s,c]=(0,t.useState)(!1),u=`${(0,t.useMemo)((()=>n?"ERROR: ":r?"WARNING: ":""),[n,r])}${n||r||o}`,d=()=>{const e=a.current;if(e){const{offsetWidth:t,scrollWidth:n,offsetHeight:r,scrollHeight:o}=e;l(t+1{c(!1),d()}),[a,u]),er("resize",d),n||r||o?mt("span",{className:Qn()({"vm-text-field__error":!0,"vm-text-field__warning":r&&!n,"vm-text-field__helper-text":!r&&!n,"vm-text-field__error_overflowed":i,"vm-text-field__error_full":s}),"data-show":!!u,ref:a,onClick:()=>{i&&(c(!0),l(!1))},children:u}):null},Vr=e=>{let{label:n,value:r,type:o="text",error:a="",warning:i="",helperText:l="",placeholder:s,endIcon:c,startIcon:u,disabled:d=!1,autofocus:h=!1,inputmode:p="text",caretPosition:f,onChange:m,onEnter:_,onKeyDown:g,onFocus:v,onBlur:y,onChangeCaret:b}=e;const{isDarkTheme:w}=gt(),{isMobile:k}=br(),x=(0,t.useRef)(null),S=(0,t.useRef)(null),C=(0,t.useMemo)((()=>"textarea"===o?S:x),[o]),[A,E]=(0,t.useState)([0,0]),M=Qn()({"vm-text-field__input":!0,"vm-text-field__input_error":a,"vm-text-field__input_warning":!a&&i,"vm-text-field__input_icon-start":u,"vm-text-field__input_disabled":d,"vm-text-field__input_textarea":"textarea"===o}),N=e=>{const{selectionStart:t,selectionEnd:n}=e;E([t||0,n||0])},T=e=>{N(e.currentTarget)},$=e=>{g&&g(e);const{key:t,ctrlKey:n,metaKey:r}=e,a="Enter"===t;("textarea"!==o?a:a&&(r||n))&&_&&(e.preventDefault(),_())},P=e=>{N(e.currentTarget)},D=e=>{d||(m&&m(e.currentTarget.value),N(e.currentTarget))},O=()=>{v&&v()},L=()=>{y&&y()},R=e=>{try{C.current&&C.current.setSelectionRange(e[0],e[1])}catch(Id){return Id}};return(0,t.useEffect)((()=>{var e;h&&!k&&(null===C||void 0===C||null===(e=C.current)||void 0===e?void 0:e.focus)&&C.current.focus()}),[C,h]),(0,t.useEffect)((()=>{b&&b(A)}),[A]),(0,t.useEffect)((()=>{R(A)}),[r]),(0,t.useEffect)((()=>{f&&R(f)}),[f]),mt("label",{className:Qn()({"vm-text-field":!0,"vm-text-field_textarea":"textarea"===o,"vm-text-field_dark":w}),"data-replicated-value":r,children:[u&&mt("div",{className:"vm-text-field__icon-start",children:u}),c&&mt("div",{className:"vm-text-field__icon-end",children:c}),"textarea"===o?mt("textarea",{className:M,disabled:d,ref:S,value:r,rows:1,inputMode:p,placeholder:s,autoCapitalize:"none",onInput:D,onKeyDown:$,onKeyUp:P,onFocus:O,onBlur:L,onMouseUp:T}):mt("input",{className:M,disabled:d,ref:x,value:r,type:o,placeholder:s,inputMode:p,autoCapitalize:"none",onInput:D,onKeyDown:$,onKeyUp:P,onFocus:O,onBlur:L,onMouseUp:T}),n&&mt("span",{className:"vm-text-field__label",children:n}),mt(Hr,{error:a,warning:i,info:l})]})},Br=e=>{let{title:n,children:r,onClose:o,className:a,isOpen:i=!0}=e;const{isMobile:l}=br(),s=oe(),c=ne(),u=(0,t.useCallback)((e=>{i&&"Escape"===e.key&&o()}),[i]),d=e=>{e.stopPropagation()},h=(0,t.useCallback)((()=>{i&&(s(c,{replace:!0}),o())}),[i,c,o]);return(0,t.useEffect)((()=>{if(i)return document.body.style.overflow="hidden",()=>{document.body.style.overflow="auto"}}),[i]),er("popstate",h),er("keyup",u),t.default.createPortal(mt("div",{className:Qn()({"vm-modal":!0,"vm-modal_mobile":l,[`${a}`]:a}),onMouseDown:o,children:mt("div",{className:"vm-modal-content",children:[mt("div",{className:"vm-modal-content-header",onMouseDown:d,children:[n&&mt("div",{className:"vm-modal-content-header__title",children:n}),mt("div",{className:"vm-modal-header__close",children:mt(Dr,{variant:"text",size:"small",onClick:o,ariaLabel:"close",children:mt(fn,{})})})]}),mt("div",{className:"vm-modal-content-body",onMouseDown:d,tabIndex:0,children:r})]})}),document.body)},Ur="Table settings",Yr=e=>{let{columns:n,selectedColumns:r=[],tableCompact:o,onChangeColumns:a,toggleTableCompact:i}=e;const l=(0,t.useRef)(null),{value:s,toggle:c,setFalse:u}=Fr(!1),{value:d,toggle:h}=Fr(Boolean(We("TABLE_COLUMNS"))),[p,f]=(0,t.useState)(""),[m,_]=(0,t.useState)(-1),g=(0,t.useMemo)((()=>r.filter((e=>!n.includes(e)))),[n,r]),v=(0,t.useMemo)((()=>{const e=g.concat(n);return p?e.filter((e=>e.includes(p))):e}),[n,g,p]),y=(0,t.useMemo)((()=>v.every((e=>r.includes(e)))),[r,v]),b=e=>{a(r.includes(e)?r.filter((t=>t!==e)):[...r,e])};return(0,t.useEffect)((()=>{((e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n])))(n,r)||d||a(n)}),[n]),(0,t.useEffect)((()=>{d?r.length&&Ye("TABLE_COLUMNS",r.join(",")):qe(["TABLE_COLUMNS"])}),[d,r]),(0,t.useEffect)((()=>{const e=We("TABLE_COLUMNS");e&&a(e.split(","))}),[]),mt("div",{className:"vm-table-settings",children:[mt(Ir,{title:Ur,children:mt("div",{ref:l,children:mt(Dr,{variant:"text",startIcon:mt(pn,{}),onClick:c,ariaLabel:Ur})})}),s&&mt(Br,{title:Ur,className:"vm-table-settings-modal",onClose:u,children:[mt("div",{className:"vm-table-settings-modal-section",children:[mt("div",{className:"vm-table-settings-modal-section__title",children:"Customize columns"}),mt("div",{className:"vm-table-settings-modal-columns",children:[mt("div",{className:"vm-table-settings-modal-columns__search",children:mt(Vr,{placeholder:"Search columns",startIcon:mt(Kn,{}),value:p,onChange:f,onBlur:()=>{_(-1)},onKeyDown:e=>{const t="ArrowUp"===e.key,n="ArrowDown"===e.key,r="Enter"===e.key;(n||t||r)&&e.preventDefault(),n?_((e=>e+1>v.length-1?e:e+1)):t?_((e=>e-1<0?e:e-1)):r&&b(v[m])},type:"search"})}),mt("div",{className:"vm-table-settings-modal-columns-list",children:[!!v.length&&mt("div",{className:"vm-table-settings-modal-columns-list__item vm-table-settings-modal-columns-list__item_all",children:mt(zr,{checked:y,onChange:()=>{a(y?r.filter((e=>!v.includes(e))):v)},label:y?"Uncheck all":"Check all",disabled:o})}),!v.length&&mt("div",{className:"vm-table-settings-modal-columns-no-found",children:mt("p",{className:"vm-table-settings-modal-columns-no-found__info",children:"No columns found."})}),v.map(((e,t)=>{return mt("div",{className:Qn()({"vm-table-settings-modal-columns-list__item":!0,"vm-table-settings-modal-columns-list__item_focus":t===m,"vm-table-settings-modal-columns-list__item_custom":g.includes(e)}),children:mt(zr,{checked:r.includes(e),onChange:(n=e,()=>{b(n)}),label:e,disabled:o})},e);var n}))]}),mt("div",{className:"vm-table-settings-modal-preserve",children:[mt(zr,{checked:d,onChange:h,label:"Preserve column settings",disabled:o,color:"primary"}),mt("p",{className:"vm-table-settings-modal-preserve__info",children:"This label indicates that when the checkbox is activated, the current column configurations will not be reset."})]})]})]}),mt("div",{className:"vm-table-settings-modal-section",children:[mt("div",{className:"vm-table-settings-modal-section__title",children:"Table view"}),mt("div",{className:"vm-table-settings-modal-columns-list__item",children:mt(jr,{label:"Compact view",value:o,onChange:i})})]})]})]})},Wr=["date","timestamp","time"];function qr(e,t,n){const r=e[n],a=t[n],i=Wr.includes(`${n}`)?o()(`${r}`).unix():r,l=Wr.includes(`${n}`)?o()(`${a}`).unix():a;return li?1:0}const Kr=e=>{let{rows:n,columns:r,defaultOrderBy:o,defaultOrderDir:a,copyToClipboard:i,paginationOffset:l}=e;const[s,c]=(0,t.useState)(o),[u,d]=(0,t.useState)(a||"desc"),[h,p]=(0,t.useState)(null),f=(0,t.useMemo)((()=>{const{startIndex:e,endIndex:t}=l;return function(e,t){const n=e.map(((e,t)=>[e,t]));return n.sort(((e,n)=>{const r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((e=>e[0]))}(n,function(e,t){return"desc"===e?(e,n)=>qr(e,n,t):(e,n)=>-qr(e,n,t)}(u,s)).slice(e,t)}),[n,s,u,l]),m=(e,t)=>async()=>{if(h!==t)try{await navigator.clipboard.writeText(String(e)),p(t)}catch(Id){console.error(Id)}};return(0,t.useEffect)((()=>{if(null===h)return;const e=setTimeout((()=>p(null)),2e3);return()=>clearTimeout(e)}),[h]),mt("table",{className:"vm-table",children:[mt("thead",{className:"vm-table-header",children:mt("tr",{className:"vm-table__row vm-table__row_header",children:[r.map((e=>{return mt("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:(t=e.key,()=>{d((e=>"asc"===e&&s===t?"desc":"asc")),c(t)}),children:mt("div",{className:"vm-table-cell__content",children:[mt("div",{children:String(e.title||e.key)}),mt("div",{className:Qn()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":s===e.key,"vm-table__sort-icon_desc":"desc"===u&&s===e.key}),children:mt(kn,{})})]})},String(e.key));var t})),i&&mt("th",{className:"vm-table-cell vm-table-cell_header"})]})}),mt("tbody",{className:"vm-table-body",children:f.map(((e,t)=>mt("tr",{className:"vm-table__row",children:[r.map((t=>mt("td",{className:Qn()({"vm-table-cell":!0,[`${t.className}`]:t.className}),children:e[t.key]||"-"},String(t.key)))),i&&mt("td",{className:"vm-table-cell vm-table-cell_right",children:e[i]&&mt("div",{className:"vm-table-cell__content",children:mt(Ir,{title:h===t?"Copied":"Copy row",children:mt(Dr,{variant:"text",color:h===t?"success":"gray",size:"small",startIcon:mt(h===t?$n:On,{}),onClick:m(e[i],t),ariaLabel:"copy row"})})})})]},t)))})]})},Zr=e=>{let{logs:n,displayColumns:r,tableCompact:o,columns:a}=e;const i=e=>{switch(e){case"_time":return"vm-table-cell_logs-time";case"_vmui_data":return"vm-table-cell_logs vm-table-cell_pre";default:return"vm-table-cell_logs"}},l=(0,t.useMemo)((()=>o?[{key:"_vmui_data",title:"Data",className:i("_vmui_data")}]:a.map((e=>({key:e,title:e,className:i(e)})))),[o,a]),s=(0,t.useMemo)((()=>o?l:null!==r&&void 0!==r&&r.length?l.filter((e=>r.includes(e.key))):[]),[l,r,o]);return mt(pt.FK,{children:mt(Kr,{rows:n,columns:s,defaultOrderBy:"_time",defaultOrderDir:"desc",copyToClipboard:"_vmui_data",paginationOffset:{startIndex:0,endIndex:1/0}})})},Gr=e=>{let{defaultExpanded:n=!1,onChange:r,title:o,children:a}=e;const[i,l]=(0,t.useState)(n);return(0,t.useEffect)((()=>{r&&r(i)}),[i]),mt(pt.FK,{children:[mt("header",{className:`vm-accordion-header ${i&&"vm-accordion-header_open"}`,onClick:()=>{l((e=>!e))},children:[o,mt("div",{className:`vm-accordion-header__arrow ${i&&"vm-accordion-header__arrow_open"}`,children:mt(wn,{})})]}),i&&mt("section",{className:"vm-accordion-section",children:a},"content")]})},Qr=e=>{let{log:n}=e;const{value:r,toggle:o}=Fr(!1),{markdownParsing:a}=gr(),i=["_msg","_vmui_time","_vmui_data","_vmui_markdown"],l=Object.entries(n).filter((e=>{let[t]=e;return!i.includes(t)})),s=l.length>0,c=(0,t.useMemo)((()=>{if(n._msg)return n._msg;if(!s)return;const e=l.reduce(((e,t)=>{let[n,r]=t;return e[n]=r,e}),{});return JSON.stringify(e)}),[n,l,s]),u=Pr(),[d,h]=(0,t.useState)(null);return(0,t.useEffect)((()=>{if(null===d)return;const e=setTimeout((()=>h(null)),2e3);return()=>clearTimeout(e)}),[d]),mt("div",{className:"vm-group-logs-row",children:[mt("div",{className:"vm-group-logs-row-content",onClick:o,children:[s&&mt("div",{className:Qn()({"vm-group-logs-row-content__arrow":!0,"vm-group-logs-row-content__arrow_open":r}),children:mt(wn,{})}),mt("div",{className:Qn()({"vm-group-logs-row-content__time":!0,"vm-group-logs-row-content__time_missing":!n._vmui_time}),children:n._vmui_time||"timestamp missing"}),mt("div",{className:Qn()({"vm-group-logs-row-content__msg":!0,"vm-group-logs-row-content__msg_empty-msg":!n._msg,"vm-group-logs-row-content__msg_missing":!c}),dangerouslySetInnerHTML:a&&n._vmui_markdown?{__html:n._vmui_markdown}:void 0,children:c||"-"})]},`${n._msg}${n._time}`),s&&r&&mt("div",{className:"vm-group-logs-row-fields",children:mt("table",{children:mt("tbody",{children:l.map(((e,t)=>{let[n,r]=e;return mt("tr",{className:"vm-group-logs-row-fields-item",children:[mt("td",{className:"vm-group-logs-row-fields-item-controls",children:mt("div",{className:"vm-group-logs-row-fields-item-controls__wrapper",children:mt(Ir,{title:d===t?"Copied":"Copy to clipboard",children:mt(Dr,{variant:"text",color:"gray",size:"small",startIcon:mt(On,{}),onClick:(o=`${n}: "${r}"`,a=t,async()=>{if(d!==a)try{await u(o),h(a)}catch(Id){console.error(Id)}}),ariaLabel:"copy to clipboard"})})})}),mt("td",{className:"vm-group-logs-row-fields-item__key",children:n}),mt("td",{className:"vm-group-logs-row-fields-item__value",children:r})]},n);var o,a}))})})})]})},Jr=(e,n,r)=>{const o=(0,t.useCallback)((t=>{const o=null===e||void 0===e?void 0:e.current,a=t.target,i=(null===r||void 0===r?void 0:r.current)&&r.current.contains(a);!o||o.contains((null===t||void 0===t?void 0:t.target)||null)||i||n(t)}),[e,n]);er("mousedown",o),er("touchstart",o)},Xr=e=>{let{children:n,buttonRef:r,placement:o="bottom-left",open:a=!1,onClose:i,offset:l={top:6,left:0},clickOutside:s=!0,fullWidth:c,title:u,disabledFullScreen:d,variant:h}=e;const{isMobile:p}=br(),f=oe(),m=ne(),[_,g]=(0,t.useState)({width:0,height:0}),[v,y]=(0,t.useState)(!1),b=(0,t.useRef)(null);(0,t.useEffect)((()=>(y(a),!a&&i&&i(),a&&p&&!d&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="auto"})),[a]),(0,t.useEffect)((()=>{var e,t;g({width:(null===b||void 0===b||null===(e=b.current)||void 0===e?void 0:e.clientWidth)||0,height:(null===b||void 0===b||null===(t=b.current)||void 0===t?void 0:t.clientHeight)||0}),y(!1)}),[b]);const w=(0,t.useMemo)((()=>{const e=r.current;if(!e||!v)return{};const t=e.getBoundingClientRect(),n={top:0,left:0,width:"auto"},a="bottom-right"===o||"top-right"===o,i=null===o||void 0===o?void 0:o.includes("top"),s=(null===l||void 0===l?void 0:l.top)||0,u=(null===l||void 0===l?void 0:l.left)||0;n.left=n.left=t.left+u,n.top=t.height+t.top+s,a&&(n.left=t.right-_.width),i&&(n.top=t.top-_.height-s);const{innerWidth:d,innerHeight:h}=window,p=n.top+_.height+20>h,f=n.top-20<0,m=n.left+_.width+20>d,g=n.left-20<0;return p&&(n.top=t.top-_.height-s),f&&(n.top=t.height+t.top+s),m&&(n.left=t.right-_.width-u),g&&(n.left=t.left+u),c&&(n.width=`${t.width}px`),n.top<0&&(n.top=20),n.left<0&&(n.left=20),n}),[r,o,v,n,c]),k=()=>{y(!1),i()};(0,t.useEffect)((()=>{if(!b.current||!v||p&&!d)return;const{right:e,width:t}=b.current.getBoundingClientRect();if(e>window.innerWidth){const e=window.innerWidth-20-t;b.current.style.left=e{v&&p&&!d&&(f(m,{replace:!0}),i())}),[v,p,d,m,i]);return er("scroll",k),er("popstate",x),Jr(b,(()=>{s&&k()}),r),mt(pt.FK,{children:(v||!_.width)&&t.default.createPortal(mt("div",{className:Qn()({"vm-popper":!0,[`vm-popper_${h}`]:h,"vm-popper_mobile":p&&!d,"vm-popper_open":(p||Object.keys(w).length)&&v}),ref:b,style:p&&!d?{}:w,children:[(u||p&&!d)&&mt("div",{className:"vm-popper-header",children:[mt("p",{className:"vm-popper-header__title",children:u}),mt(Dr,{variant:"text",color:"dark"===h?"white":"primary",size:"small",onClick:e=>{e.stopPropagation(),i()},ariaLabel:"close",children:mt(fn,{})})]}),n]}),document.body)})},eo=e=>(/^{.+}$/.test(e)?e.slice(1,-1).split(","):[e]).filter(Boolean),to=e=>{const t=o()(1e3*e.start),n=o()(1e3*e.end),r=n.diff(t,"milliseconds");return{start:t,end:n,step:Math.ceil(r/100)||1}},no="No Grouping",ro=e=>{let{logs:n,settingsRef:r}=e;const{isDarkTheme:o}=gt(),a=Pr(),[i,l]=je(),[s,c]=(0,t.useState)([]),[u,d]=Lr("_stream","groupBy"),[h,p]=(0,t.useState)(null),[f,m]=(0,t.useState)(""),_=(0,t.useRef)(null),{value:g,toggle:v,setFalse:y}=Fr(!1),b=(0,t.useMemo)((()=>s.every(Boolean)),[s]),w=(0,t.useMemo)((()=>{const e=["_msg","_time","_vmui_time","_vmui_data","_vmui_markdown"],t=Array.from(new Set(n.map((e=>Object.keys(e))).flat())),r=[no,...t.filter((t=>!e.includes(t)))];if(!f)return r;try{const e=new RegExp(f,"i");return r.filter((t=>e.test(t))).sort(((t,n)=>{var r,o;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(o=n.match(e))||void 0===o?void 0:o.index)||0)}))}catch(Id){return[]}}),[n,f]),k=(0,t.useMemo)((()=>function(e,t){const n=e.reduce(((e,n)=>{const r=t.map((e=>`${e}: ${n[e]||"-"}`)).join("|");return(e[r]=e[r]||[]).push(n),e}),{});return Object.entries(n).map((e=>{let[t,n]=e;return{keys:t.split("|"),values:n}}))}(n,[u]).map((e=>{var t;const n=(null===(t=e.values[0])||void 0===t?void 0:t[u])||"",r=eo(n);return{...e,pairs:r}}))),[n,u]),x=(0,t.useCallback)((()=>{c(new Array(k.length).fill(!b))}),[b]),S=e=>t=>{c((n=>{const r=[...n];return r[e]=t,r}))};return(0,t.useEffect)((()=>{if(null===h)return;const e=setTimeout((()=>p(null)),2e3);return()=>clearTimeout(e)}),[h]),(0,t.useEffect)((()=>{c(new Array(k.length).fill(!0))}),[k]),mt(pt.FK,{children:[mt("div",{className:"vm-group-logs",children:k.map(((e,t)=>mt("div",{className:"vm-group-logs-section",children:mt(Gr,{defaultExpanded:s[t],onChange:S(t),title:u!==no&&mt("div",{className:"vm-group-logs-section-keys",children:[mt("span",{className:"vm-group-logs-section-keys__title",children:["Group by ",mt("code",{children:u}),":"]}),e.pairs.map((t=>{return mt(Ir,{title:h===t?"Copied":"Copy to clipboard",placement:"top-center",children:mt("div",{className:Qn()({"vm-group-logs-section-keys__pair":!0,"vm-group-logs-section-keys__pair_dark":o}),onClick:(n=t,async e=>{e.stopPropagation();const t=/(.+)?=(".+")/.test(n)?`${n.replace(/=/,": ")}`:`${u}: "${n}"`;await a(t)&&p(n)}),children:t})},`${e.keys.join("")}_${t}`);var n})),mt("span",{className:"vm-group-logs-section-keys__count",children:[e.values.length," entries"]})]}),children:mt("div",{className:"vm-group-logs-section-rows",children:e.values.map((e=>mt(Qr,{log:e},`${e._msg}${e._time}`)))})},String(s[t]))},e.keys.join(""))))}),r.current&&t.default.createPortal(mt("div",{className:"vm-group-logs-header",children:[mt(Ir,{title:b?"Collapse All":"Expand All",children:mt(Dr,{variant:"text",startIcon:mt(b?qn:Wn,{}),onClick:x,ariaLabel:b?"Collapse All":"Expand All"})}),mt(Ir,{title:"Group by",children:mt("div",{ref:_,children:mt(Dr,{variant:"text",startIcon:mt(In,{}),onClick:v,ariaLabel:"Group by"})})}),mt(Xr,{open:g,placement:"bottom-right",onClose:y,buttonRef:_,children:mt("div",{className:"vm-list vm-group-logs-header-keys",children:[mt("div",{className:"vm-group-logs-header-keys__search",children:mt(Vr,{label:"Search key",value:f,onChange:m,type:"search"})}),w.map((e=>{return mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_active":e===u}),onClick:(t=e,()=>{d(t),i.set("groupBy",t),l(i),y()}),children:e},e);var t}))]})})]}),r.current)]})};function oo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let ao={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function io(e){ao=e}const lo=/[&<>"']/,so=new RegExp(lo.source,"g"),co=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,uo=new RegExp(co.source,"g"),ho={"&":"&","<":"<",">":">",'"':""","'":"'"},po=e=>ho[e];function fo(e,t){if(t){if(lo.test(e))return e.replace(so,po)}else if(co.test(e))return e.replace(uo,po);return e}const mo=/(^|[^\[])\^/g;function _o(e,t){let n="string"===typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let o="string"===typeof t?t:t.source;return o=o.replace(mo,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}function go(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const vo={exec:()=>null};function yo(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:bo(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=bo(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:bo(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=bo(t[0],"\n").split("\n"),n="",r="";const o=[];for(;e.length>0;){let t=!1;const a=[];let i;for(i=0;i/.test(e[i]))a.push(e[i]),t=!0;else{if(t)break;a.push(e[i])}e=e.slice(i);const l=a.join("\n"),s=l.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");n=n?`${n}\n${l}`:l,r=r?`${r}\n${s}`:s;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(s,o,!0),this.lexer.state.top=c,0===e.length)break;const u=o[o.length-1];if("code"===u?.type)break;if("blockquote"===u?.type){const t=u,a=t.raw+"\n"+e.join("\n"),i=this.blockquote(a);o[o.length-1]=i,n=n.substring(0,n.length-t.raw.length)+i.raw,r=r.substring(0,r.length-t.text.length)+i.text;break}if("list"!==u?.type);else{const t=u,a=t.raw+"\n"+e.join("\n"),i=this.list(a);o[o.length-1]=i,n=n.substring(0,n.length-u.raw.length)+i.raw,r=r.substring(0,r.length-t.raw.length)+i.raw,e=a.substring(o[o.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const a=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let i=!1;for(;e;){let n=!1,r="",l="";if(!(t=a.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let s=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],u=!s.trim(),d=0;if(this.options.pedantic?(d=2,l=s.trimStart()):u?d=t[1].length+1:(d=t[2].search(/[^ ]/),d=d>4?1:d,l=s.slice(d),d+=t[1].length),u&&/^[ \t]*$/.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,d-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:\`\`\`|~~~)`),a=new RegExp(`^ {0,${Math.min(3,d-1)}}#`),i=new RegExp(`^ {0,${Math.min(3,d-1)}}<[a-z].*>`,"i");for(;e;){const h=e.split("\n",1)[0];let p;if(c=h,this.options.pedantic?(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),p=c):p=c.replace(/\t/g," "),o.test(c))break;if(a.test(c))break;if(i.test(c))break;if(t.test(c))break;if(n.test(c))break;if(p.search(/[^ ]/)>=d||!c.trim())l+="\n"+p.slice(d);else{if(u)break;if(s.replace(/\t/g," ").search(/[^ ]/)>=4)break;if(o.test(s))break;if(a.test(s))break;if(n.test(s))break;l+="\n"+c}u||c.trim()||(u=!0),r+=h+"\n",e=e.substring(h.length+1),s=p.slice(d)}}o.loose||(i?o.loose=!0:/\n[ \t]*\n[ \t]*$/.test(r)&&(i=!0));let h,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(l),p&&(h="[ ] "!==p[0],l=l.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:r,task:!!p,checked:h,loose:!1,text:l,tokens:[]}),o.raw+=r}o.items[o.items.length-1].raw=o.items[o.items.length-1].raw.trimEnd(),o.items[o.items.length-1].text=o.items[o.items.length-1].text.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));o.loose=n}if(o.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=yo(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?a.align.push("right"):/^ *:-+: *$/.test(e)?a.align.push("center"):/^ *:-+ *$/.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]}))));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:fo(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^
    /i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=bo(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),wo(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return wo(n,e,n[0],this.lexer)}}emStrong(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let o,a,i=n,l=0;const s="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=s.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(a=[...o].length,r[3]||r[4]){i+=a;continue}if((r[5]||r[6])&&n%3&&!((n+a)%3)){l+=a;continue}if(i-=a,i>0)continue;a=Math.min(a,a+i+l);const t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){const e=s.slice(1,-1);return{type:"em",raw:s,text:e,tokens:this.lexer.inlineTokens(e)}}const c=s.slice(2,-2);return{type:"strong",raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=fo(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=fo(t[1]),n="mailto:"+e):(e=fo(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])e=fo(t[0]),r="mailto:"+e;else{let o;do{var n;o=t[0],t[0]=null!==(n=this.rules.inline._backpedal.exec(t[0])?.[0])&&void 0!==n?n:""}while(o!==t[0]);e=fo(t[0]),r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:fo(t[0]),{type:"text",raw:t[0],text:e}}}}const xo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,So=/(?:[*+-]|\d{1,9}[.)])/,Co=_o(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,So).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Ao=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Eo=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Mo=_o(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Eo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),No=_o(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,So).getRegex(),To="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",$o=/|$))/,Po=_o("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",$o).replace("tag",To).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Do=_o(Ao).replace("hr",xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",To).getRegex(),Oo={blockquote:_o(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Do).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Mo,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:xo,html:Po,lheading:Co,list:No,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Do,table:vo,text:/^[^\n]+/},Lo=_o("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",To).getRegex(),Ro={...Oo,table:Lo,paragraph:_o(Ao).replace("hr",xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Lo).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",To).getRegex()},zo={...Oo,html:_o("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",$o).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:vo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_o(Ao).replace("hr",xo).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Co).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Io=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,jo=/^( {2,}|\\)\n(?!\s*$)/,Fo="\\p{P}\\p{S}",Ho=_o(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Fo).getRegex(),Vo=_o(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Fo).getRegex(),Bo=_o("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Fo).getRegex(),Uo=_o("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Fo).getRegex(),Yo=_o(/\\([punct])/,"gu").replace(/punct/g,Fo).getRegex(),Wo=_o(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),qo=_o($o).replace("(?:--\x3e|$)","--\x3e").getRegex(),Ko=_o("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",qo).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Zo=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Go=_o(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Zo).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Qo=_o(/^!?\[(label)\]\[(ref)\]/).replace("label",Zo).replace("ref",Eo).getRegex(),Jo=_o(/^!?\[(ref)\](?:\[\])?/).replace("ref",Eo).getRegex(),Xo={_backpedal:vo,anyPunctuation:Yo,autolink:Wo,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:jo,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:vo,emStrongLDelim:Vo,emStrongRDelimAst:Bo,emStrongRDelimUnd:Uo,escape:Io,link:Go,nolink:Jo,punctuation:Ho,reflink:Qo,reflinkSearch:_o("reflink|nolink(?!\\()","g").replace("reflink",Qo).replace("nolink",Jo).getRegex(),tag:Ko,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(/\t/g," ").replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(t=n.call({lexer:this},e,o))&&(e=e.substring(t.raw.length),o.push(t),!0)))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&o.length>0?o[o.length-1].raw+="\n":o.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),n=o[o.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?o.push(t):(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),n=o[o.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(n.raw+="\n"+t.raw,n.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),o.push(t);else{if(r=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let o;this.options.extensions.startBlock.forEach((e=>{o=e.call({lexer:this},n),"number"===typeof o&&o>=0&&(t=Math.min(t,o))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(r)))n=o[o.length-1],a&&"paragraph"===n?.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):o.push(t),a=r.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),n=o[o.length-1],n&&"text"===n.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):o.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,o}inline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){let t,n,r,o,a,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(s));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(s));)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(i=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(t=n.call({lexer:this},e,l))&&(e=e.substring(t.raw.length),l.push(t),!0)))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,s,i))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.autolink(e))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e))){if(r=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let o;this.options.extensions.startInline.forEach((e=>{o=e.call({lexer:this},n),"number"===typeof o&&o>=0&&(t=Math.min(t,o))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(t=this.tokenizer.inlineText(r))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(i=t.raw.slice(-1)),a=!0,n=l[l.length-1],n&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(t.raw.length),l.push(t);return l}}class ia{options;parser;constructor(e){this.options=e||ao}space(e){return""}code(e){let{text:t,lang:n,escaped:r}=e;const o=(n||"").match(/^\S*/)?.[0],a=t.replace(/\n$/,"")+"\n";return o?'
    '+(r?a:fo(a,!0))+"
    \n":"
    "+(r?a:fo(a,!0))+"
    \n"}blockquote(e){let{tokens:t}=e;return`
    \n${this.parser.parse(t)}
    \n`}html(e){let{text:t}=e;return t}heading(e){let{tokens:t,depth:n}=e;return`${this.parser.parseInline(t)}\n`}hr(e){return"
    \n"}list(e){const t=e.ordered,n=e.start;let r="";for(let a=0;a\n"+r+"\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox(e){let{checked:t}=e;return"'}paragraph(e){let{tokens:t}=e;return`

    ${this.parser.parseInline(t)}

    \n`}table(e){let t="",n="";for(let o=0;o${r}`),"\n\n"+t+"\n"+r+"
    \n"}tablerow(e){let{text:t}=e;return`\n${t}\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}em(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}codespan(e){let{text:t}=e;return`${t}`}br(e){return"
    "}del(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}link(e){let{href:t,title:n,tokens:r}=e;const o=this.parser.parseInline(r),a=go(t);if(null===a)return o;t=a;let i='
    ",i}image(e){let{href:t,title:n,text:r}=e;const o=go(t);if(null===o)return r;t=o;let a=`${r}1&&void 0!==arguments[1])||arguments[1],n="";for(let r=0;rnew Set(["preprocess","postprocess","processAllTokens"]))();preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?aa.lex:aa.lexInline}provideParser(){return this.block?sa.parse:sa.parseInline}}const ua=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=(()=>sa)();Renderer=(()=>ia)();TextRenderer=(()=>la)();Lexer=(()=>aa)();Tokenizer=(()=>ko)();Hooks=(()=>ca)();constructor(){this.use(...arguments)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const o=e[r].flat(1/0);n=n.concat(this.walkTokens(o,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(){const e=this.defaults.extensions||{renderers:{},childTokens:{}};for(var t=arguments.length,n=new Array(t),r=0;r{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const n=e.renderers[t.name];e.renderers[t.name]=n?function(){for(var e=arguments.length,r=new Array(e),o=0;o{if(this.defaults.async)return Promise.resolve(o.call(e,t)).then((t=>a.call(e,t)));const n=o.call(e,t);return a.call(e,n)}:e[r]=function(){for(var t=arguments.length,n=new Array(t),r=0;r{const r={...n},o={...this.defaults,...r},a=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===r.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("undefined"===typeof t||null===t)return a(new Error("marked(): input parameter is undefined or null"));if("string"!==typeof t)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const i=o.hooks?o.hooks.provideLexer():e?aa.lex:aa.lexInline,l=o.hooks?o.hooks.provideParser():e?sa.parse:sa.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then((e=>i(e,o))).then((e=>o.hooks?o.hooks.processAllTokens(e):e)).then((e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then((()=>e)):e)).then((e=>l(e,o))).then((e=>o.hooks?o.hooks.postprocess(e):e)).catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let e=i(t,o);o.hooks&&(e=o.hooks.processAllTokens(e)),o.walkTokens&&this.walkTokens(e,o.walkTokens);let n=l(e,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(Id){return a(Id)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+fo(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function da(e,t){return ua.parse(e,t)}da.options=da.setOptions=function(e){return ua.setOptions(e),da.defaults=ua.defaults,io(da.defaults),da},da.getDefaults=oo,da.defaults=ao,da.use=function(){return ua.use(...arguments),da.defaults=ua.defaults,io(da.defaults),da},da.walkTokens=function(e,t){return ua.walkTokens(e,t)},da.parseInline=ua.parseInline,da.Parser=sa,da.parser=sa.parse,da.Renderer=ia,da.TextRenderer=la,da.Lexer=aa,da.lexer=aa.lex,da.Tokenizer=ko,da.Hooks=ca,da.parse=da;da.options,da.setOptions,da.use,da.walkTokens,da.parseInline,sa.parse,aa.lex;const ha=()=>mt("div",{className:"vm-line-loader",children:[mt("div",{className:"vm-line-loader__background"}),mt("div",{className:"vm-line-loader__line"})]});var pa=function(e){return e.group="group",e.table="table",e.json="json",e}(pa||{});const fa=[{label:"Group",value:pa.group,icon:mt(Hn,{})},{label:"Table",value:pa.table,icon:mt(Nn,{})},{label:"JSON",value:pa.json,icon:mt(Tn,{})}],ma=e=>{let{data:n,isLoading:r}=e;const{isMobile:a}=br(),{timezone:i}=Gt(),{setSearchParamsFromKeys:l}=Rr(),s=(0,t.useRef)(null),[c,u]=Lr(pa.group,"view"),[d,h]=(0,t.useState)([]),{value:p,toggle:f}=Fr(!1),m=(0,t.useMemo)((()=>n.map((e=>({...e,_vmui_time:e._time?o()(e._time).tz().format(`${wt}.SSS`):"",_vmui_data:JSON.stringify(e,null,2),_vmui_markdown:e._msg?da(e._msg.replace(/```/g,"\n```\n")):""})))),[n,i]),_=(0,t.useMemo)((()=>{if(null===m||void 0===m||!m.length)return[];const e=["_vmui_data","_vmui_time","_vmui_markdown"],t=new Set;for(const n of m)for(const e in n)t.add(e);return Array.from(t).filter((t=>!e.includes(t)))}),[m]);return mt("div",{className:Qn()({"vm-explore-logs-body":!0,"vm-block":!0,"vm-block_mobile":a}),children:[r&&mt(ha,{}),mt("div",{className:Qn()({"vm-explore-logs-body-header":!0,"vm-section-header":!0,"vm-explore-logs-body-header_mobile":a}),children:[mt("div",{className:"vm-section-header__tabs",children:[mt(nr,{activeItem:String(c),items:fa,onChange:e=>{u(e),l({view:e})}}),mt("div",{className:"vm-explore-logs-body-header__log-info",children:["Total logs returned: ",mt("b",{children:n.length})]})]}),c===pa.table&&mt("div",{className:"vm-explore-logs-body-header__settings",children:mt(Yr,{columns:_,selectedColumns:d,onChangeColumns:h,tableCompact:p,toggleTableCompact:f})}),c===pa.group&&mt("div",{className:"vm-explore-logs-body-header__settings",ref:s})]}),mt("div",{className:Qn()({"vm-explore-logs-body__table":!0,"vm-explore-logs-body__table_mobile":a}),children:[!n.length&&mt("div",{className:"vm-explore-logs-body__empty",children:"No logs found"}),!!n.length&&mt(pt.FK,{children:[c===pa.table&&mt(Zr,{logs:m,displayColumns:d,tableCompact:p,columns:_}),c===pa.group&&mt(ro,{logs:m,columns:_,settingsRef:s}),c===pa.json&&mt(Or,{data:n})]})]})]})},_a=(e,n,r)=>{const[a]=je(),[i,l]=(0,t.useState)([]),[s,c]=(0,t.useState)([]),[u,d]=(0,t.useState)(),h=(0,t.useRef)(new AbortController),p=(0,t.useMemo)((()=>(e=>`${e}/select/logsql/query`)(e)),[e]),f=e=>{try{return JSON.parse(e)}catch(Id){return null}},m=(0,t.useCallback)((async e=>{h.current.abort(),h.current=new AbortController;const{signal:t}=h.current,i=Date.now();c((e=>({...e,[i]:!0}))),d(void 0);try{const s=((e,t,n,r)=>({signal:r,method:"POST",headers:{Accept:"application/stream+json",AccountID:a.get("accountID")||"0",ProjectID:a.get("projectID")||"0"},body:new URLSearchParams({query:e.trim(),limit:`${n}`,start:o()(1e3*t.start).tz().toISOString(),end:o()(1e3*t.end).tz().toISOString()})}))(n,e,r,t),u=await fetch(p,s),h=await u.text();if(!u.ok||!u.body)return d(h),l([]),c((e=>({...e,[i]:!1}))),!1;const m=h.split("\n").filter((e=>e)).slice(0,r).map(f).filter((e=>e));return l(m),c((e=>({...e,[i]:!1}))),!0}catch(Id){return c((e=>({...e,[i]:!1}))),Id instanceof Error&&"AbortError"!==Id.name&&(d(String(Id)),console.error(Id),l([])),!1}}),[p,n,r,a]);return{logs:i,isLoading:Object.values(s).some((e=>e)),error:u,fetchLogs:m,abortController:h.current}};var ga=function(e){return e[e.mouse=0]="mouse",e[e.keyboard=1]="keyboard",e}(ga||{});const va=e=>{var n;let{value:r,options:o,anchor:a,disabled:i,minLength:l=2,fullWidth:s,selected:c,noOptionsText:u,label:d,disabledFullScreen:h,offset:p,maxDisplayResults:f,loading:m,onSelect:_,onOpenAutocomplete:g,onFoundOptions:v,onChangeWrapperRef:y}=e;const{isMobile:b}=br(),w=(0,t.useRef)(null),[k,x]=(0,t.useState)({index:-1}),[S,C]=(0,t.useState)(""),[A,E]=(0,t.useState)(0),{value:M,setValue:N,setFalse:T}=Fr(!1),$=(0,t.useMemo)((()=>{if(!M)return[];try{const e=new RegExp(String(r.trim()),"i"),t=o.filter((t=>e.test(t.value))).sort(((t,n)=>{var o,a;return t.value.toLowerCase()===r.trim().toLowerCase()?-1:n.value.toLowerCase()===r.trim().toLowerCase()?1:((null===(o=t.value.match(e))||void 0===o?void 0:o.index)||0)-((null===(a=n.value.match(e))||void 0===a?void 0:a.index)||0)}));return E(t.length),C(t.length>Number(null===f||void 0===f?void 0:f.limit)&&(null===f||void 0===f?void 0:f.message)||""),null!==f&&void 0!==f&&f.limit?t.slice(0,f.limit):t}catch(Id){return[]}}),[M,o,r]),P=(0,t.useMemo)((()=>{var e;return 1===$.length&&(null===(e=$[0])||void 0===e?void 0:e.value)===r}),[$]),D=(0,t.useMemo)((()=>u&&!$.length),[u,$]),O=()=>{x({index:-1})},L=(0,t.useCallback)((e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:o}=e,a=n||r||o,i=$.length&&!P;if("ArrowUp"===t&&!a&&i&&(e.preventDefault(),x((e=>{let{index:t}=e;return{index:t<=0?0:t-1,type:ga.keyboard}}))),"ArrowDown"===t&&!a&&i){e.preventDefault();const t=$.length-1;x((e=>{let{index:n}=e;return{index:n>=t?t:n+1,type:ga.keyboard}}))}if("Enter"===t){const e=$[k.index];e&&_(e.value),c||T()}"Escape"===t&&T()}),[k,$,P,T,_,c]);return(0,t.useEffect)((()=>{N(r.length>=l)}),[r,o]),er("keydown",L),(0,t.useEffect)((()=>{if(!w.current||k.type===ga.mouse)return;const e=w.current.childNodes[k.index];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}),[k,$]),(0,t.useEffect)((()=>{x({index:-1})}),[$]),(0,t.useEffect)((()=>{g&&g(M)}),[M]),(0,t.useEffect)((()=>{v&&v(P?[]:$)}),[$,P]),(0,t.useEffect)((()=>{y&&y(w)}),[w]),mt(Xr,{open:M,buttonRef:a,placement:"bottom-left",onClose:T,fullWidth:s,title:b?d:void 0,disabledFullScreen:h,offset:p,children:[mt("div",{className:Qn()({"vm-autocomplete":!0,"vm-autocomplete_mobile":b&&!h}),ref:w,children:[m&&mt("div",{className:"vm-autocomplete__loader",children:[mt(bn,{}),mt("span",{children:"Loading..."})]}),D&&mt("div",{className:"vm-autocomplete__no-options",children:u}),!P&&$.map(((e,t)=>{return mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_mobile":b,"vm-list-item_active":t===k.index,"vm-list-item_multiselect":c,"vm-list-item_multiselect_selected":null===c||void 0===c?void 0:c.includes(e.value),"vm-list-item_with-icon":e.icon}),id:`$autocomplete$${e.value}`,onClick:(r=e.value,()=>{i||(_(r),c||T())}),onMouseEnter:(n=t,()=>{x({index:n,type:ga.mouse})}),onMouseLeave:O,children:[(null===c||void 0===c?void 0:c.includes(e.value))&&mt($n,{}),mt(pt.FK,{children:e.icon}),mt("span",{children:e.value})]},`${t}${e.value}`);var n,r}))]}),S&&mt("div",{className:"vm-autocomplete-message",children:["Shown ",null===f||void 0===f?void 0:f.limit," results out of ",A,". ",S]}),(null===(n=$[k.index])||void 0===n?void 0:n.description)&&mt("div",{className:"vm-autocomplete-info",children:[mt("div",{className:"vm-autocomplete-info__type",children:$[k.index].type}),mt("div",{className:"vm-autocomplete-info__description",dangerouslySetInnerHTML:{__html:$[k.index].description||""}})]})]})};var ya=n(267),ba=n.n(ya);const wa=e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&"),ka=e=>JSON.stringify(e).slice(1,-1),xa=e=>{const t=e.match(/["`']/g);return!!t&&t.length%2!==0};var Sa=function(e){return e.metric="metric",e.label="label",e.labelValue="labelValue",e}(Sa||{});const Ca={[Sa.metric]:mt(Vn,{}),[Sa.label]:mt(Un,{}),[Sa.labelValue]:mt(Yn,{})},Aa=n.p+"static/media/MetricsQL.a00044c91d9781cf8557.md",Ea=e=>{let t="";return Array.from(e).map((e=>{var n;const r="h3"===e.tagName.toLowerCase();return t=r?null!==(n=e.textContent)&&void 0!==n?n:"":t,r?null:((e,t)=>{var n;const r=null!==(n=t.textContent)&&void 0!==n?n:"",o=(e=>{const t=[];let n=e.nextElementSibling;for(;n&&"p"===n.tagName.toLowerCase();)n&&t.push(n),n=n.nextElementSibling;return t})(t).map((e=>{var t;return null!==(t=e.outerHTML)&&void 0!==t?t:""})).join("\n");return{type:e,value:r,description:(a=o,a.replace(/({const{metricsQLFunctions:e}=ln(),n=sn();return(0,t.useEffect)((()=>{e.length||(async()=>{try{const e=await fetch(Aa),t=(e=>{const t=document.createElement("div");t.innerHTML=da(e);const n=t.querySelectorAll("h3, h4");return Ea(n)})(await e.text());n({type:"SET_METRICSQL_FUNCTIONS",payload:t})}catch(Id){console.error("Error fetching or processing the MetricsQL.md file:",Id)}})()}),[]),e},Na=e=>{let{value:n,anchorEl:r,caretPosition:a,hasHelperText:i,onSelect:l,onFoundOptions:s}=e;const[c,u]=(0,t.useState)({top:0,left:0}),d=Ma(),h=(0,t.useMemo)((()=>{if(a[0]!==a[1])return{beforeCursor:n,afterCursor:""};return{beforeCursor:n.substring(0,a[0]),afterCursor:n.substring(a[1])}}),[n,a]),p=(0,t.useMemo)((()=>{const e=h.beforeCursor.split(/\s(or|and|unless|default|ifnot|if|group_left|group_right)\s|}|\+|\|-|\*|\/|\^/i);return e[e.length-1]}),[h]),f=(0,t.useMemo)((()=>{const e=[...p.matchAll(/\w+\((?[^)]+)\)\s+(by|without|on|ignoring)\s*\(\w*/gi)];if(e.length>0&&e[0].groups&&e[0].groups.metricName)return e[0].groups.metricName;const t=[...p.matchAll(/^\s*\b(?[^{}(),\s]+)(?={|$)/g)];return t.length>0&&t[0].groups&&t[0].groups.metricName?t[0].groups.metricName:""}),[p]),m=(0,t.useMemo)((()=>{const e=p.match(/[a-z_:-][\w\-.:/]*\b(?=\s*(=|!=|=~|!~))/g);return e?e[e.length-1]:""}),[p]),_=(0,t.useMemo)((()=>{const e=h.beforeCursor.trim(),t=["}",")"].some((t=>e.endsWith(t))),n=!xa(e)&&["`","'",'"'].some((t=>e.endsWith(t)));if(!h.beforeCursor||t||n||(e=>{const t=e.split(/\s+/),n=t.length,r=t[n-1],o=t[n-2],a=!r&&xa(e),i=(!r||t.length>1)&&!/([{(),+\-*/^]|\b(?:or|and|unless|default|ifnot|if|group_left|group_right|by|without|on|ignoring)\b)/i.test(o);return a||i})(h.beforeCursor))return at.empty;const r=/(?:by|without|on|ignoring)\s*\(\s*[^)]*$|\{[^}]*$/i,o=`(${wa(f)})?{?.+${wa(m)}(=|!=|=~|!~)"?([^"]*)$`;switch(!0){case new RegExp(o,"g").test(h.beforeCursor):return at.labelValue;case r.test(h.beforeCursor):return at.label;default:return at.metricsql}}),[h,f,m]),g=(0,t.useMemo)((()=>{const e=h.beforeCursor.match(/([\w_.:]+(?![},]))$/);return e?e[0]:""}),[h.beforeCursor]),{metrics:v,labels:y,labelValues:b,loading:w}=(e=>{let{valueByContext:n,metric:r,label:a,context:i}=e;const{serverUrl:l}=gt(),{period:{start:s,end:c}}=Gt(),{autocompleteCache:u}=ln(),d=sn(),[h,p]=(0,t.useState)(!1),[f,m]=(0,t.useState)(n),_=ba()(m,500);(0,t.useEffect)((()=>(_(n),_.cancel)),[n,_]);const[g,v]=(0,t.useState)([]),[y,b]=(0,t.useState)([]),[w,k]=(0,t.useState)([]),x=(0,t.useRef)(new AbortController),S=(0,t.useCallback)((e=>{const t=o()(1e3*s).startOf("day").valueOf()/1e3,n=o()(1e3*c).endOf("day").valueOf()/1e3;return new URLSearchParams({...e||{},limit:`${en}`,start:`${t}`,end:`${n}`})}),[s,c]),C=(e,t)=>e.map((e=>({value:e,type:`${t}`,icon:Ca[t]}))),A=async e=>{let{value:t,urlSuffix:n,setter:r,type:o,params:a}=e;if(!t&&o===Sa.metric)return;x.current.abort(),x.current=new AbortController;const{signal:i}=x.current,s={type:o,value:t,start:(null===a||void 0===a?void 0:a.get("start"))||"",end:(null===a||void 0===a?void 0:a.get("end"))||"",match:(null===a||void 0===a?void 0:a.get("match[]"))||""};p(!0);try{const e=u.get(s);if(e)return r(C(e,o)),void p(!1);const t=await fetch(`${l}/api/v1/${n}?${a}`,{signal:i});if(t.ok){const{data:e}=await t.json();r(C(e,o)),d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:e}})}p(!1)}catch(Id){Id instanceof Error&&"AbortError"!==Id.name&&(d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:[]}}),p(!1),console.error(Id))}};return(0,t.useEffect)((()=>{const e=i!==at.metricsql&&i!==at.empty;if(!l||!r||e)return;v([]);const t=ka(wa(r));return A({value:f,urlSuffix:"label/__name__/values",setter:v,type:Sa.metric,params:S({"match[]":`{__name__=~".*${t}.*"}`})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,f,i,r]),(0,t.useEffect)((()=>{if(!l||i!==at.label)return;b([]);const e=ka(r);return A({value:f,urlSuffix:"labels",setter:b,type:Sa.label,params:S(r?{"match[]":`{__name__="${e}"}`}:void 0)}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,f,i,r]),(0,t.useEffect)((()=>{if(!l||!a||i!==at.labelValue)return;k([]);const e=ka(r),t=ka(wa(f)),n=[r?`__name__="${e}"`:"",`${a}=~".*${t}.*"`].filter(Boolean).join(",");return A({value:f,urlSuffix:`label/${a}/values`,setter:k,type:Sa.labelValue,params:S({"match[]":`{${n}}`})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,f,i,r,a]),{metrics:g,labels:y,labelValues:w,loading:h}})({valueByContext:g,metric:f,label:m,context:_}),k=(0,t.useMemo)((()=>{switch(_){case at.metricsql:return[...v,...d];case at.label:return y;case at.labelValue:return b;default:return[]}}),[_,v,y,b]),x=(0,t.useCallback)((e=>{const t=h.beforeCursor;let n=h.afterCursor;const r=t.lastIndexOf(g,a[0]),o=r+g.length,i=t.substring(0,r),s=t.substring(o);if(_===at.labelValue){const t='"';n=n.replace(/^[^\s"|},]*/,"");e=`${/(?:=|!=|=~|!~)$/.test(i)?t:""}${e}${'"'!==n.trim()[0]?t:""}`}_===at.label&&(n=n.replace(/^[^\s=!,{}()"|+\-/*^]*/,"")),_===at.metricsql&&(n=n.replace(/^[^\s[\]{}()"|+\-/*^]*/,""));l(`${i}${e}${s}${n}`,i.length+e.length)}),[h]);return(0,t.useEffect)((()=>{if(!r.current)return void u({top:0,left:0});const e=r.current.querySelector("textarea")||r.current,t=window.getComputedStyle(e),n=`${t.getPropertyValue("font-size")}`,o=`${t.getPropertyValue("font-family")}`,a=parseInt(`${t.getPropertyValue("line-height")}`),l=document.createElement("div");l.style.font=`${n} ${o}`,l.style.padding=t.getPropertyValue("padding"),l.style.lineHeight=`${a}px`,l.style.width=`${e.offsetWidth}px`,l.style.maxWidth=`${e.offsetWidth}px`,l.style.whiteSpace=t.getPropertyValue("white-space"),l.style.overflowWrap=t.getPropertyValue("overflow-wrap");const s=document.createElement("span");l.appendChild(document.createTextNode(h.beforeCursor)),l.appendChild(s),l.appendChild(document.createTextNode(h.afterCursor)),document.body.appendChild(l);const c=l.getBoundingClientRect(),d=s.getBoundingClientRect(),p=d.left-c.left,f=d.bottom-c.bottom-(i?a:0);u({top:f,left:p}),l.remove(),s.remove()}),[r,a,i]),mt(pt.FK,{children:mt(va,{loading:w,disabledFullScreen:!0,value:g,options:k,anchor:r,minLength:0,offset:c,onSelect:x,onFoundOptions:s,maxDisplayResults:{limit:Xt,message:"Please, specify the query more precisely."}})})},Ta="No match! \nThis query hasn't selected any time series from database.\nEither the requested metrics are missing in the database,\nor there is a typo in series selector.",$a="The shown results are marked as PARTIAL.\nThe result is marked as partial if one or more vmstorage nodes failed to respond to the query.",Pa=e=>{let{value:n,onChange:r,onEnter:o,onArrowUp:a,onArrowDown:i,autocomplete:l,error:s,stats:c,label:u,disabled:d=!1}=e;const{autocompleteQuick:h}=ln(),{isMobile:p}=br(),[f,m]=(0,t.useState)(!1),[_,g]=(0,t.useState)([0,0]),v=(0,t.useRef)(null),[y,b]=(0,t.useState)(l),w=(0,t.useRef)(ba()(b,500)).current,k=[{show:"0"===(null===c||void 0===c?void 0:c.seriesFetched)&&!c.resultLength,text:Ta},{show:null===c||void 0===c?void 0:c.isPartial,text:$a}].filter((e=>e.show)).map((e=>e.text)).join("");c&&(u=`${u} (${c.executionTimeMsec||0}ms)`);return(0,t.useEffect)((()=>{m(l)}),[h]),(0,t.useEffect)((()=>{b(!1),w(!0)}),[_]),mt("div",{className:"vm-query-editor",ref:v,children:[mt(Vr,{value:n,label:u,type:"textarea",autofocus:!p,error:s,warning:k,onKeyDown:e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:l}=e,s=(e.target.value||"").split("\n").length>1,c=n||r,u="ArrowDown"===t,d="Enter"===t;"ArrowUp"===t&&c&&(e.preventDefault(),a()),u&&c&&(e.preventDefault(),i()),d&&f&&e.preventDefault(),!d||l||s&&!c||f||(e.preventDefault(),o())},onChange:r,onChangeCaret:e=>{g((t=>t[0]===e[0]&&t[1]===e[1]?t:e))},disabled:d,inputmode:"search",caretPosition:_}),y&&l&&mt(Na,{value:n,anchorEl:v,caretPosition:_,hasHelperText:Boolean(k||s),onSelect:(e,t)=>{r(e),g([t,t])},onFoundOptions:e=>{m(!!e.length)}})]})},Da=e=>{let{query:n,limit:r,error:o,isLoading:a,onChange:i,onChangeLimit:l,onRun:s}=e;const{isMobile:c}=br(),[u,d]=(0,t.useState)(""),[h,p]=(0,t.useState)(r);return(0,t.useEffect)((()=>{p(r)}),[r]),mt("div",{className:Qn()({"vm-explore-logs-header":!0,"vm-block":!0,"vm-block_mobile":c}),children:[mt("div",{className:"vm-explore-logs-header-top",children:[mt(Pa,{value:n,autocomplete:!1,onArrowUp:()=>null,onArrowDown:()=>null,onEnter:s,onChange:i,label:"Log query",error:o}),mt(Vr,{label:"Limit entries",type:"number",value:h,error:u,onChange:e=>{const t=+e;p(t),isNaN(t)||t<0?d("Number must be bigger than zero"):(d(""),l(t))},onEnter:s})]}),mt("div",{className:"vm-explore-logs-header-bottom",children:[mt("div",{className:"vm-explore-logs-header-bottom-contols"}),mt("div",{className:"vm-explore-logs-header-bottom-helpful",children:[mt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/victorialogs/logsql/",rel:"help noreferrer",children:[mt(_n,{}),"Query language docs"]}),mt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/victorialogs/",rel:"help noreferrer",children:[mt(Rn,{}),"Documentation"]})]}),mt("div",{className:"vm-explore-logs-header-bottom-execute",children:mt(Dr,{startIcon:mt(a?Zn:En,{}),onClick:s,fullWidth:!0,children:[mt("span",{className:"vm-explore-logs-header-bottom-execute__text",children:a?"Cancel Query":"Execute Query"}),mt("span",{className:"vm-explore-logs-header-bottom-execute__text_hidden",children:"Execute Query"})]})})]})]})},Oa=()=>{const[e,n]=(0,t.useState)(null),[r,o]=(0,t.useState)({width:0,height:0}),a=(0,t.useCallback)((()=>{o({width:(null===e||void 0===e?void 0:e.offsetWidth)||0,height:(null===e||void 0===e?void 0:e.offsetHeight)||0})}),[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]);return er("resize",a),(0,t.useEffect)(a,[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]),[n,r]},La="u-off",Ra="u-label",za="width",Ia="height",ja="top",Fa="bottom",Ha="left",Va="right",Ba="#000",Ua=Ba+"0",Ya="mousemove",Wa="mousedown",qa="mouseup",Ka="mouseenter",Za="mouseleave",Ga="dblclick",Qa="change",Ja="dppxchange",Xa="--",ei="undefined"!=typeof window,ti=ei?document:null,ni=ei?window:null,ri=ei?navigator:null;let oi,ai;function ii(e,t){if(null!=t){let n=e.classList;!n.contains(t)&&n.add(t)}}function li(e,t){let n=e.classList;n.contains(t)&&n.remove(t)}function si(e,t,n){e.style[t]=n+"px"}function ci(e,t,n,r){let o=ti.createElement(e);return null!=t&&ii(o,t),null!=n&&n.insertBefore(o,r),o}function ui(e,t){return ci("div",e,t)}const di=new WeakMap;function hi(e,t,n,r,o){let a="translate("+t+"px,"+n+"px)";a!=di.get(e)&&(e.style.transform=a,di.set(e,a),t<0||n<0||t>r||n>o?ii(e,La):li(e,La))}const pi=new WeakMap;function fi(e,t,n){let r=t+n;r!=pi.get(e)&&(pi.set(e,r),e.style.background=t,e.style.borderColor=n)}const mi=new WeakMap;function _i(e,t,n,r){let o=t+""+n;o!=mi.get(e)&&(mi.set(e,o),e.style.height=n+"px",e.style.width=t+"px",e.style.marginLeft=r?-t/2+"px":0,e.style.marginTop=r?-n/2+"px":0)}const gi={passive:!0},vi={...gi,capture:!0};function yi(e,t,n,r){t.addEventListener(e,n,r?vi:gi)}function bi(e,t,n,r){t.removeEventListener(e,n,gi)}function wi(e,t,n,r){let o;n=n||0;let a=(r=r||t.length-1)<=2147483647;for(;r-n>1;)o=a?n+r>>1:Ri((n+r)/2),t[o]=t&&o<=n;o+=r)if(null!=e[o])return o;return-1}function xi(e,t,n,r){let o=Vi(e),a=Vi(t);e==t&&(-1==o?(e*=n,t/=n):(e/=n,t*=n));let i=10==n?Bi:Ui,l=1==a?Ii:Ri,s=(1==o?Ri:Ii)(i(Li(e))),c=l(i(Li(t))),u=Hi(n,s),d=Hi(n,c);return 10==n&&(s<0&&(u=il(u,-s)),c<0&&(d=il(d,-c))),r||2==n?(e=u*o,t=d*a):(e=al(e,u),t=ol(t,d)),[e,t]}function Si(e,t,n,r){let o=xi(e,t,n,r);return 0==e&&(o[0]=0),0==t&&(o[1]=0),o}ei&&function e(){let t=devicePixelRatio;oi!=t&&(oi=t,ai&&bi(Qa,ai,e),ai=matchMedia(`(min-resolution: ${oi-.001}dppx) and (max-resolution: ${oi+.001}dppx)`),yi(Qa,ai,e),ni.dispatchEvent(new CustomEvent(Ja)))}();const Ci={mode:3,pad:.1},Ai={pad:0,soft:null,mode:0},Ei={min:Ai,max:Ai};function Mi(e,t,n,r){return _l(n)?Ti(e,t,n):(Ai.pad=n,Ai.soft=r?0:null,Ai.mode=r?3:0,Ti(e,t,Ei))}function Ni(e,t){return null==e?t:e}function Ti(e,t,n){let r=n.min,o=n.max,a=Ni(r.pad,0),i=Ni(o.pad,0),l=Ni(r.hard,-Wi),s=Ni(o.hard,Wi),c=Ni(r.soft,Wi),u=Ni(o.soft,-Wi),d=Ni(r.mode,0),h=Ni(o.mode,0),p=t-e,f=Bi(p),m=Fi(Li(e),Li(t)),_=Bi(m),g=Li(_-f);(p<1e-24||g>10)&&(p=0,0!=e&&0!=t||(p=1e-24,2==d&&c!=Wi&&(a=0),2==h&&u!=-Wi&&(i=0)));let v=p||m||1e3,y=Bi(v),b=Hi(10,Ri(y)),w=il(al(e-v*(0==p?0==e?.1:1:a),b/10),24),k=e>=c&&(1==d||3==d&&w<=c||2==d&&w>=c)?c:Wi,x=Fi(l,w=k?k:ji(k,w)),S=il(ol(t+v*(0==p?0==t?.1:1:i),b/10),24),C=t<=u&&(1==h||3==h&&S>=u||2==h&&S<=u)?u:-Wi,A=ji(s,S>C&&t<=C?C:Fi(C,S));return x==A&&0==x&&(A=100),[x,A]}const $i=new Intl.NumberFormat(ei?ri.language:"en-US"),Pi=e=>$i.format(e),Di=Math,Oi=Di.PI,Li=Di.abs,Ri=Di.floor,zi=Di.round,Ii=Di.ceil,ji=Di.min,Fi=Di.max,Hi=Di.pow,Vi=Di.sign,Bi=Di.log10,Ui=Di.log2,Yi=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Di.asinh(e/t)},Wi=1/0;function qi(e){return 1+(0|Bi((e^e>>31)-(e>>31)))}function Ki(e,t,n){return ji(Fi(e,t),n)}function Zi(e){return"function"==typeof e?e:()=>e}const Gi=e=>e,Qi=(e,t)=>t,Ji=e=>null,Xi=e=>!0,el=(e,t)=>e==t,tl=/\.\d*?(?=9{6,}|0{6,})/gm,nl=e=>{if(fl(e)||ll.has(e))return e;const t=`${e}`,n=t.match(tl);if(null==n)return e;let r=n[0].length-1;if(-1!=t.indexOf("e-")){let[e,n]=t.split("e");return+`${nl(e)}e${n}`}return il(e,r)};function rl(e,t){return nl(il(nl(e/t))*t)}function ol(e,t){return nl(Ii(nl(e/t))*t)}function al(e,t){return nl(Ri(nl(e/t))*t)}function il(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(fl(e))return e;let n=10**t,r=e*n*(1+Number.EPSILON);return zi(r)/n}const ll=new Map;function sl(e){return((""+e).split(".")[1]||"").length}function cl(e,t,n,r){let o=[],a=r.map(sl);for(let i=t;i=0?0:t)+(i>=a[l]?0:a[l]),u=10==e?s:il(s,c);o.push(u),ll.set(u,c)}}return o}const ul={},dl=[],hl=[null,null],pl=Array.isArray,fl=Number.isInteger;function ml(e){return"string"==typeof e}function _l(e){let t=!1;if(null!=e){let n=e.constructor;t=null==n||n==Object}return t}function gl(e){return null!=e&&"object"==typeof e}const vl=Object.getPrototypeOf(Uint8Array),yl="__proto__";function bl(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_l;if(pl(e)){let r=e.find((e=>null!=e));if(pl(r)||n(r)){t=Array(e.length);for(let r=0;ra){for(r=i-1;r>=0&&null==e[r];)e[r--]=null;for(r=i+1;rPromise.resolve().then(e):queueMicrotask;const Sl=["January","February","March","April","May","June","July","August","September","October","November","December"],Cl=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Al(e){return e.slice(0,3)}const El=Cl.map(Al),Ml=Sl.map(Al),Nl={MMMM:Sl,MMM:Ml,WWWW:Cl,WWW:El};function Tl(e){return(e<10?"0":"")+e}const $l={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,t)=>t.MMMM[e.getMonth()],MMM:(e,t)=>t.MMM[e.getMonth()],MM:e=>Tl(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>Tl(e.getDate()),D:e=>e.getDate(),WWWW:(e,t)=>t.WWWW[e.getDay()],WWW:(e,t)=>t.WWW[e.getDay()],HH:e=>Tl(e.getHours()),H:e=>e.getHours(),h:e=>{let t=e.getHours();return 0==t?12:t>12?t-12:t},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>Tl(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>Tl(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>{return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Pl(e,t){t=t||Nl;let n,r=[],o=/\{([a-z]+)\}|[^{]+/gi;for(;n=o.exec(e);)r.push("{"==n[0][0]?$l[n[1]]:n[0]);return e=>{let n="";for(let o=0;oe%1==0,Ll=[1,2,2.5,5],Rl=cl(10,-32,0,Ll),zl=cl(10,0,32,Ll),Il=zl.filter(Ol),jl=Rl.concat(zl),Fl="{YYYY}",Hl="\n"+Fl,Vl="{M}/{D}",Bl="\n"+Vl,Ul=Bl+"/{YY}",Yl="{aa}",Wl="{h}:{mm}"+Yl,ql="\n"+Wl,Kl=":{ss}",Zl=null;function Gl(e){let t=1e3*e,n=60*t,r=60*n,o=24*r,a=30*o,i=365*o;return[(1==e?cl(10,0,3,Ll).filter(Ol):cl(10,-3,0,Ll)).concat([t,5*t,10*t,15*t,30*t,n,5*n,10*n,15*n,30*n,r,2*r,3*r,4*r,6*r,8*r,12*r,o,2*o,3*o,4*o,5*o,6*o,7*o,8*o,9*o,10*o,15*o,a,2*a,3*a,4*a,6*a,i,2*i,5*i,10*i,25*i,50*i,100*i]),[[i,Fl,Zl,Zl,Zl,Zl,Zl,Zl,1],[28*o,"{MMM}",Hl,Zl,Zl,Zl,Zl,Zl,1],[o,Vl,Hl,Zl,Zl,Zl,Zl,Zl,1],[r,"{h}"+Yl,Ul,Zl,Bl,Zl,Zl,Zl,1],[n,Wl,Ul,Zl,Bl,Zl,Zl,Zl,1],[t,Kl,Ul+" "+Wl,Zl,Bl+" "+Wl,Zl,ql,Zl,1],[e,Kl+".{fff}",Ul+" "+Wl,Zl,Bl+" "+Wl,Zl,ql,Zl,1]],function(t){return(l,s,c,u,d,h)=>{let p=[],f=d>=i,m=d>=a&&d=o?o:d,i=y+(Ri(c)-Ri(g))+ol(g-y,a);p.push(i);let f=t(i),m=f.getHours()+f.getMinutes()/n+f.getSeconds()/r,_=d/r,v=h/l.axes[s]._space;for(;i=il(i+d,1==e?0:3),!(i>u);)if(_>1){let e=Ri(il(m+_,6))%24,n=t(i).getHours()-e;n>1&&(n=-1),i-=n*r,m=(m+_)%24,il((i-p[p.length-1])/d,3)*v>=.7&&p.push(i)}else p.push(i)}return p}}]}const[Ql,Jl,Xl]=Gl(1),[es,ts,ns]=Gl(.001);function rs(e,t){return e.map((e=>e.map(((n,r)=>0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)))))}function os(e,t){return(n,r,o,a,i)=>{let l,s,c,u,d,h,p=t.find((e=>i>=e[0]))||t[t.length-1];return r.map((t=>{let n=e(t),r=n.getFullYear(),o=n.getMonth(),a=n.getDate(),i=n.getHours(),f=n.getMinutes(),m=n.getSeconds(),_=r!=l&&p[2]||o!=s&&p[3]||a!=c&&p[4]||i!=u&&p[5]||f!=d&&p[6]||m!=h&&p[7]||p[1];return l=r,s=o,c=a,u=i,d=f,h=m,_(n)}))}}function as(e,t,n){return new Date(e,t,n)}function is(e,t){return t(e)}cl(2,-53,53,[1]);function ls(e,t){return(n,r,o,a)=>null==a?Xa:t(e(r))}const ss={show:!0,live:!0,isolate:!1,mount:()=>{},markers:{show:!0,width:2,stroke:function(e,t){let n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null},fill:function(e,t){return e.series[t].fill(e,t)},dash:"solid"},idx:null,idxs:null,values:[]};const cs=[0,0];function us(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{0==e.button&&(!r||e.target==t)&&n(e)}}function ds(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{(!r||e.target==t)&&n(e)}}const hs={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return cs[0]=t,cs[1]=n,cs},points:{one:!1,show:function(e,t){let n=e.cursor.points,r=ui(),o=n.size(e,t);si(r,za,o),si(r,Ia,o);let a=o/-2;si(r,"marginLeft",a),si(r,"marginTop",a);let i=n.width(e,t,o);return i&&si(r,"borderWidth",i),r},size:function(e,t){return e.series[t].points.size},width:0,stroke:function(e,t){let n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){let n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:us,mouseup:us,click:us,dblclick:us,mousemove:ds,mouseleave:ds,mouseenter:ds},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,t,n,r,o)=>r-o,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},ps={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},fs=wl({},ps,{filter:Qi}),ms=wl({},fs,{size:10}),_s=wl({},ps,{show:!1}),gs='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',vs="bold "+gs,ys={show:!0,scale:"x",stroke:Ba,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:vs,side:2,grid:fs,ticks:ms,border:_s,font:gs,lineGap:1.5,rotate:0},bs={show:!0,scale:"x",auto:!1,sorted:1,min:Wi,max:-Wi,idxs:[]};function ws(e,t,n,r,o){return t.map((e=>null==e?"":Pi(e)))}function ks(e,t,n,r,o,a,i){let l=[],s=ll.get(o)||0;for(let c=n=i?n:il(ol(n,o),s);c<=r;c=il(c+o,s))l.push(Object.is(c,-0)?0:c);return l}function xs(e,t,n,r,o,a,i){const l=[],s=e.scales[e.axes[t].scale].log,c=Ri((10==s?Bi:Ui)(n));o=Hi(s,c),10==s&&(o=jl[wi(o,jl)]);let u=n,d=o*s;10==s&&(d=jl[wi(d,jl)]);do{l.push(u),u+=o,10!=s||ll.has(u)||(u=il(u,ll.get(o))),u>=d&&(d=(o=u)*s,10==s&&(d=jl[wi(d,jl)]))}while(u<=r);return l}function Ss(e,t,n,r,o,a,i){let l=e.scales[e.axes[t].scale].asinh,s=r>l?xs(e,t,Fi(l,n),r,o):[l],c=r>=0&&n<=0?[0]:[];return(n<-l?xs(e,t,Fi(l,-r),-n,o):[l]).reverse().map((e=>-e)).concat(c,s)}const Cs=/./,As=/[12357]/,Es=/[125]/,Ms=/1/,Ns=(e,t,n,r)=>e.map(((e,o)=>4==t&&0==e||o%r==0&&n.test(e.toExponential()[e<0?1:0])?e:null));function Ts(e,t,n,r,o){let a=e.axes[n],i=a.scale,l=e.scales[i],s=e.valToPos,c=a._space,u=s(10,i),d=s(9,i)-u>=c?Cs:s(7,i)-u>=c?As:s(5,i)-u>=c?Es:Ms;if(d==Ms){let e=Li(s(1,i)-u);if(eo,Rs={show:!0,auto:!0,sorted:0,gaps:Ls,alpha:1,facets:[wl({},Os,{scale:"x"}),wl({},Os,{scale:"y"})]},zs={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Ls,alpha:1,points:{show:function(e,t){let{scale:n,idxs:r}=e.series[0],o=e._data[0],a=e.valToPos(o[r[0]],n,!0),i=e.valToPos(o[r[1]],n,!0),l=Li(i-a)/(e.series[t].points.space*oi);return r[1]-r[0]<=l},filter:null},values:null,min:Wi,max:-Wi,idxs:[],path:null,clip:null};function Is(e,t,n,r,o){return n/10}const js={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Fs=wl({},js,{time:!1,ori:1}),Hs={};function Vs(e,t){let n=Hs[e];return n||(n={key:e,plots:[],sub(e){n.plots.push(e)},unsub(e){n.plots=n.plots.filter((t=>t!=e))},pub(e,t,r,o,a,i,l){for(let s=0;s{let m=e.pxRound;const _=l.dir*(0==l.ori?1:-1),g=0==l.ori?Xs:ec;let v,y;1==_?(v=n,y=r):(v=r,y=n);let b=m(c(t[v],l,p,d)),w=m(u(i[v],s,f,h)),k=m(c(t[y],l,p,d)),x=m(u(1==a?s.max:s.min,s,f,h)),S=new Path2D(o);return g(S,k,x),g(S,b,x),g(S,b,w),S}))}function qs(e,t,n,r,o,a){let i=null;if(e.length>0){i=new Path2D;const l=0==t?tc:nc;let s=n;for(let t=0;tn[0]){let e=n[0]-s;e>0&&l(i,s,r,e,r+a),s=n[1]}}let c=n+o-s,u=10;c>0&&l(i,s,r-u/2,c,r+a+u)}return i}function Ks(e,t,n,r,o,a,i){let l=[],s=e.length;for(let c=1==o?n:r;c>=n&&c<=r;c+=o){if(null===t[c]){let u=c,d=c;if(1==o)for(;++c<=r&&null===t[c];)d=c;else for(;--c>=n&&null===t[c];)d=c;let h=a(e[u]),p=d==u?h:a(e[d]),f=u-o;h=i<=0&&f>=0&&f=0&&m>=0&&m=h&&l.push([h,p])}}return l}function Zs(e){return 0==e?Gi:1==e?zi:t=>rl(t,e)}function Gs(e){let t=0==e?Qs:Js,n=0==e?(e,t,n,r,o,a)=>{e.arcTo(t,n,r,o,a)}:(e,t,n,r,o,a)=>{e.arcTo(n,t,o,r,a)},r=0==e?(e,t,n,r,o)=>{e.rect(t,n,r,o)}:(e,t,n,r,o)=>{e.rect(n,t,o,r)};return function(e,o,a,i,l){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;0==s&&0==c?r(e,o,a,i,l):(s=ji(s,i/2,l/2),c=ji(c,i/2,l/2),t(e,o+s,a),n(e,o+i,a,o+i,a+l,s),n(e,o+i,a+l,o,a+l,c),n(e,o,a+l,o,a,c),n(e,o,a,o+i,a,s),e.closePath())}}const Qs=(e,t,n)=>{e.moveTo(t,n)},Js=(e,t,n)=>{e.moveTo(n,t)},Xs=(e,t,n)=>{e.lineTo(t,n)},ec=(e,t,n)=>{e.lineTo(n,t)},tc=Gs(0),nc=Gs(1),rc=(e,t,n,r,o,a)=>{e.arc(t,n,r,o,a)},oc=(e,t,n,r,o,a)=>{e.arc(n,t,r,o,a)},ac=(e,t,n,r,o,a,i)=>{e.bezierCurveTo(t,n,r,o,a,i)},ic=(e,t,n,r,o,a,i)=>{e.bezierCurveTo(n,t,o,r,i,a)};function lc(e){return(e,t,n,r,o)=>Bs(e,t,((t,a,i,l,s,c,u,d,h,p,f)=>{let m,_,{pxRound:g,points:v}=t;0==l.ori?(m=Qs,_=rc):(m=Js,_=oc);const y=il(v.width*oi,3);let b=(v.size-v.width)/2*oi,w=il(2*b,3),k=new Path2D,x=new Path2D,{left:S,top:C,width:A,height:E}=e.bbox;tc(x,S-w,C-w,A+2*w,E+2*w);const M=e=>{if(null!=i[e]){let t=g(c(a[e],l,p,d)),n=g(u(i[e],s,f,h));m(k,t+b,n),_(k,t,n,b,0,2*Oi)}};if(o)o.forEach(M);else for(let e=n;e<=r;e++)M(e);return{stroke:y>0?k:null,fill:k,clip:x,flags:3}}))}function sc(e){return(t,n,r,o,a,i)=>{r!=o&&(a!=r&&i!=r&&e(t,n,r),a!=o&&i!=o&&e(t,n,o),e(t,n,i))}}const cc=sc(Xs),uc=sc(ec);function dc(e){const t=Ni(e?.alignGaps,0);return(e,n,r,o)=>Bs(e,n,((a,i,l,s,c,u,d,h,p,f,m)=>{let _,g,v=a.pxRound,y=e=>v(u(e,s,f,h)),b=e=>v(d(e,c,m,p));0==s.ori?(_=Xs,g=cc):(_=ec,g=uc);const w=s.dir*(0==s.ori?1:-1),k={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},x=k.stroke;let S,C,A,E=Wi,M=-Wi,N=y(i[1==w?r:o]),T=ki(l,r,o,1*w),$=ki(l,r,o,-1*w),P=y(i[T]),D=y(i[$]),O=!1;for(let e=1==w?r:o;e>=r&&e<=o;e+=w){let t=y(i[e]),n=l[e];t==N?null!=n?(C=b(n),E==Wi&&(_(x,t,C),S=C),E=ji(C,E),M=Fi(C,M)):null===n&&(O=!0):(E!=Wi&&(g(x,N,E,M,S,C),A=N),null!=n?(C=b(n),_(x,t,C),E=M=S=C):(E=Wi,M=-Wi,null===n&&(O=!0)),N=t)}E!=Wi&&E!=M&&A!=N&&g(x,N,E,M,S,C);let[L,R]=Us(e,n);if(null!=a.fill||0!=L){let t=k.fill=new Path2D(x),r=b(a.fillTo(e,n,a.min,a.max,L));_(t,D,r),_(t,P,r)}if(!a.spanGaps){let c=[];O&&c.push(...Ks(i,l,r,o,w,y,t)),k.gaps=c=a.gaps(e,n,r,o,c),k.clip=qs(c,s.ori,h,p,f,m)}return 0!=R&&(k.band=2==R?[Ws(e,n,r,o,x,-1),Ws(e,n,r,o,x,1)]:Ws(e,n,r,o,x,R)),k}))}function hc(e,t,n,r,o,a){let i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Wi;if(e.length>1){let l=null;for(let s=0,c=1/0;s0!==r[e]>0?n[e]=0:(n[e]=3*(s[e-1]+s[e])/((2*s[e]+s[e-1])/r[e-1]+(s[e]+2*s[e-1])/r[e]),isFinite(n[e])||(n[e]=0));n[i-1]=r[i-2];for(let c=0;c{Tc.pxRatio=oi})));const _c=dc(),gc=lc();function vc(e,t,n,r){return(r?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map(((e,r)=>yc(e,r,t,n)))}function yc(e,t,n,r){return wl({},0==t?n:r,e)}function bc(e,t,n){return null==t?hl:[t,n]}const wc=bc;function kc(e,t,n){return null==t?hl:Mi(t,n,.1,!0)}function xc(e,t,n,r){return null==t?hl:xi(t,n,e.scales[r].log,!1)}const Sc=xc;function Cc(e,t,n,r){return null==t?hl:Si(t,n,e.scales[r].log,!1)}const Ac=Cc;function Ec(e,t,n,r,o){let a=Fi(qi(e),qi(t)),i=t-e,l=wi(o/r*i,n);do{let e=n[l],t=r*e/i;if(t>=o&&a+(e<5?ll.get(e):0)<=17)return[e,t]}while(++l(t=zi((n=+r)*oi))+"px")),t,n]}function Nc(e){e.show&&[e.font,e.labelFont].forEach((e=>{let t=il(e[2]*oi,1);e[0]=e[0].replace(/[0-9.]+px/,t+"px"),e[1]=t}))}function Tc(e,t,n){const r={mode:Ni(e.mode,1)},o=r.mode;function a(e,t){return((3==t.distr?Bi(e>0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?Yi(e,t.asinh):100==t.distr?t.fwd(e):e)-t._min)/(t._max-t._min)}function i(e,t,n,r){let o=a(e,t);return r+n*(-1==t.dir?1-o:o)}function l(e,t,n,r){let o=a(e,t);return r+n*(-1==t.dir?o:1-o)}function s(e,t,n,r){return 0==t.ori?i(e,t,n,r):l(e,t,n,r)}r.valToPosH=i,r.valToPosV=l;let c=!1;r.status=0;const u=r.root=ui("uplot");if(null!=e.id&&(u.id=e.id),ii(u,e.class),e.title){ui("u-title",u).textContent=e.title}const d=ci("canvas"),h=r.ctx=d.getContext("2d"),p=ui("u-wrap",u);yi("click",p,(e=>{if(e.target===m){(Tt!=At||$t!=Et)&&Ft.click(r,e)}}),!0);const f=r.under=ui("u-under",p);p.appendChild(d);const m=r.over=ui("u-over",p),_=+Ni((e=bl(e)).pxAlign,1),g=Zs(_);(e.plugins||[]).forEach((t=>{t.opts&&(e=t.opts(r,e)||e)}));const v=e.ms||.001,y=r.series=1==o?vc(e.series||[],bs,zs,!1):(b=e.series||[null],w=Rs,b.map(((e,t)=>0==t?{}:wl({},w,e))));var b,w;const k=r.axes=vc(e.axes||[],ys,Ds,!0),x=r.scales={},S=r.bands=e.bands||[];S.forEach((e=>{e.fill=Zi(e.fill||null),e.dir=Ni(e.dir,-1)}));const C=2==o?y[1].facets[0].scale:y[0].scale,A={axes:function(){for(let e=0;ent[e])):v,b=2==p.distr?nt[v[1]]-nt[v[0]]:u,w=t.ticks,S=t.border,C=w.show?zi(w.size*oi):0,A=t._rotate*-Oi/180,E=g(t._pos*oi),M=E+(C+_)*c;o=0==i?M:0,n=1==i?M:0,lt(t.font[0],l,1==t.align?Ha:2==t.align?Va:A>0?Ha:A<0?Va:0==i?"center":3==a?Va:Ha,A||1==i?"middle":2==a?ja:Fa);let N=t.font[1]*t.lineGap,T=v.map((e=>g(s(e,p,f,m)))),$=t._values;for(let e=0;e<$.length;e++){let t=$[e];if(null!=t){0==i?n=T[e]:o=T[e],t=""+t;let r=-1==t.indexOf("\n")?[t]:t.split(/\n/gm);for(let e=0;e0&&(y.forEach(((e,n)=>{if(n>0&&e.show&&(ut(n,!1),ut(n,!0),null==e._paths)){tt!=e.alpha&&(h.globalAlpha=tt=e.alpha);let a=2==o?[0,t[n][0].length-1]:function(e){let t=Ki(Be-1,0,Ve-1),n=Ki(Ue+1,0,Ve-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n{if(t>0&&e.show){tt!=e.alpha&&(h.globalAlpha=tt=e.alpha),null!=e._paths&&dt(t,!1);{let n=null!=e._paths?e._paths.gaps:null,o=e.points.show(r,t,Be,Ue,n),a=e.points.filter(r,t,o,n);(o||a)&&(e.points._paths=e.points.paths(r,t,Be,Ue,a),dt(t,!0))}1!=tt&&(h.globalAlpha=tt=1),xn("drawSeries",t)}})))}},E=(e.drawOrder||["axes","series"]).map((e=>A[e]));function M(t){let n=x[t];if(null==n){let r=(e.scales||ul)[t]||ul;if(null!=r.from)M(r.from),x[t]=wl({},x[r.from],r,{key:t});else{n=x[t]=wl({},t==C?js:Fs,r),n.key=t;let e=n.time,a=n.range,i=pl(a);if((t!=C||2==o&&!e)&&(!i||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?Ci:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?Ci:{mode:1,hard:a[1],soft:a[1]}},i=!1),!i&&_l(a))){let e=a;a=(t,n,r)=>null==n?hl:Mi(n,r,e)}n.range=Zi(a||(e?wc:t==C?3==n.distr?Sc:4==n.distr?Ac:bc:3==n.distr?xc:4==n.distr?Cc:kc)),n.auto=Zi(!i&&n.auto),n.clamp=Zi(n.clamp||Is),n._min=n._max=null}}}M("x"),M("y"),1==o&&y.forEach((e=>{M(e.scale)})),k.forEach((e=>{M(e.scale)}));for(let Tn in e.scales)M(Tn);const N=x[C],T=N.distr;let $,P;0==N.ori?(ii(u,"u-hz"),$=i,P=l):(ii(u,"u-vt"),$=l,P=i);const D={};for(let Tn in x){let e=x[Tn];null==e.min&&null==e.max||(D[Tn]={min:e.min,max:e.max},e.min=e.max=null)}const O=e.tzDate||(e=>new Date(zi(e/v))),L=e.fmtDate||Pl,R=1==v?Xl(O):ns(O),z=os(O,rs(1==v?Jl:ts,L)),I=ls(O,is("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",L)),j=[],F=r.legend=wl({},ss,e.legend),H=F.show,V=F.markers;let B,U,Y;F.idxs=j,V.width=Zi(V.width),V.dash=Zi(V.dash),V.stroke=Zi(V.stroke),V.fill=Zi(V.fill);let W,q=[],K=[],Z=!1,G={};if(F.live){const e=y[1]?y[1].values:null;Z=null!=e,W=Z?e(r,1,0):{_:0};for(let t in W)G[t]=Xa}if(H)if(B=ci("table","u-legend",u),Y=ci("tbody",null,B),F.mount(r,B),Z){U=ci("thead",null,B,Y);let e=ci("tr",null,U);for(var Q in ci("th",null,e),W)ci("th",Ra,e).textContent=Q}else ii(B,"u-inline"),F.live&&ii(B,"u-live");const J={show:!0},X={show:!1};const ee=new Map;function te(e,t,n){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const a=ee.get(t)||{},i=Ae.bind[e](r,t,n,o);i&&(yi(e,t,a[e]=i),ee.set(t,a))}function ne(e,t,n){const r=ee.get(t)||{};for(let o in r)null!=e&&o!=e||(bi(o,t,r[o]),delete r[o]);null==e&&ee.delete(t)}let re=0,oe=0,ae=0,ie=0,le=0,se=0,ce=le,ue=se,de=ae,he=ie,pe=0,fe=0,me=0,_e=0;r.bbox={};let ge=!1,ve=!1,ye=!1,be=!1,we=!1,ke=!1;function xe(e,t,n){(n||e!=r.width||t!=r.height)&&Se(e,t),yt(!1),ye=!0,ve=!0,Rt()}function Se(e,t){r.width=re=ae=e,r.height=oe=ie=t,le=se=0,function(){let e=!1,t=!1,n=!1,r=!1;k.forEach(((o,a)=>{if(o.show&&o._show){let{side:a,_size:i}=o,l=a%2,s=i+(null!=o.label?o.labelSize:0);s>0&&(l?(ae-=s,3==a?(le+=s,r=!0):n=!0):(ie-=s,0==a?(se+=s,e=!0):t=!0))}})),Ie[0]=e,Ie[1]=n,Ie[2]=t,Ie[3]=r,ae-=He[1]+He[3],le+=He[3],ie-=He[2]+He[0],se+=He[0]}(),function(){let e=le+ae,t=se+ie,n=le,r=se;function o(o,a){switch(o){case 1:return e+=a,e-a;case 2:return t+=a,t-a;case 3:return n-=a,n+a;case 0:return r-=a,r+a}}k.forEach(((e,t)=>{if(e.show&&e._show){let t=e.side;e._pos=o(t,e._size),null!=e.label&&(e._lpos=o(t,e.labelSize))}}))}();let n=r.bbox;pe=n.left=rl(le*oi,.5),fe=n.top=rl(se*oi,.5),me=n.width=rl(ae*oi,.5),_e=n.height=rl(ie*oi,.5)}const Ce=3;r.setSize=function(e){let{width:t,height:n}=e;xe(t,n)};const Ae=r.cursor=wl({},hs,{drag:{y:2==o}},e.cursor);if(null==Ae.dataIdx){var Ee;let e=Ae.hover,n=e.skip=new Set(null!==(Ee=e.skip)&&void 0!==Ee?Ee:[]);n.add(void 0);let r=e.prox=Zi(e.prox),o=e.bias??=0;Ae.dataIdx=(e,a,i,l)=>{var s;if(0==a)return i;let c=i,u=null!==(s=r(e,a,i,l))&&void 0!==s?s:Wi,d=u>=0&&u0;)n.has(m[e])||(t=e);if(0==o||1==o)for(e=i;null==r&&e++u&&(c=null)}return c}}const Me=e=>{Ae.event=e};Ae.idxs=j,Ae._lock=!1;let Ne=Ae.points;Ne.show=Zi(Ne.show),Ne.size=Zi(Ne.size),Ne.stroke=Zi(Ne.stroke),Ne.width=Zi(Ne.width),Ne.fill=Zi(Ne.fill);const Te=r.focus=wl({},e.focus||{alpha:.3},Ae.focus),$e=Te.prox>=0,Pe=$e&&Ne.one;let De=[],Oe=[],Le=[];function Re(e,t){let n=Ne.show(r,t);if(n)return ii(n,"u-cursor-pt"),ii(n,e.class),hi(n,-10,-10,ae,ie),m.insertBefore(n,De[t]),n}function ze(e,t){if(1==o||t>0){let t=1==o&&x[e.scale].time,n=e.value;e.value=t?ml(n)?ls(O,is(n,L)):n||I:n||Ps,e.label=e.label||(t?"Time":"Value")}if(Pe||t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||_c||Ji,e.fillTo=Zi(e.fillTo||Ys),e.pxAlign=+Ni(e.pxAlign,_),e.pxRound=Zs(e.pxAlign),e.stroke=Zi(e.stroke||null),e.fill=Zi(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;let t=il((3+2*(Fi(1,e.width)||1))*1,3),n=e.points=wl({},{size:t,width:Fi(1,.2*t),stroke:e.stroke,space:2*t,paths:gc,_stroke:null,_fill:null},e.points);n.show=Zi(n.show),n.filter=Zi(n.filter),n.fill=Zi(n.fill),n.stroke=Zi(n.stroke),n.paths=Zi(n.paths),n.pxAlign=e.pxAlign}if(H){let n=function(e,t){if(0==t&&(Z||!F.live||2==o))return hl;let n=[],a=ci("tr","u-series",Y,Y.childNodes[t]);ii(a,e.class),e.show||ii(a,La);let i=ci("th",null,a);if(V.show){let e=ui("u-marker",i);if(t>0){let n=V.width(r,t);n&&(e.style.border=n+"px "+V.dash(r,t)+" "+V.stroke(r,t)),e.style.background=V.fill(r,t)}}let l=ui(Ra,i);for(var s in l.textContent=e.label,t>0&&(V.show||(l.style.color=e.width>0?V.stroke(r,t):V.fill(r,t)),te("click",i,(t=>{if(Ae._lock)return;Me(t);let n=y.indexOf(e);if((t.ctrlKey||t.metaKey)!=F.isolate){let e=y.some(((e,t)=>t>0&&t!=n&&e.show));y.forEach(((t,r)=>{r>0&&qt(r,e?r==n?J:X:J,!0,Cn.setSeries)}))}else qt(n,{show:!e.show},!0,Cn.setSeries)}),!1),$e&&te(Ka,i,(t=>{Ae._lock||(Me(t),qt(y.indexOf(e),Qt,!0,Cn.setSeries))}),!1)),W){let e=ci("td","u-value",a);e.textContent="--",n.push(e)}return[a,n]}(e,t);q.splice(t,0,n[0]),K.splice(t,0,n[1]),F.values.push(null)}if(Ae.show){j.splice(t,0,null);let n=null;Pe?0==t&&(n=Re(e,t)):t>0&&(n=Re(e,t)),De.splice(t,0,n),Oe.splice(t,0,0),Le.splice(t,0,0)}xn("addSeries",t)}r.addSeries=function(e,t){t=null==t?y.length:t,e=1==o?yc(e,t,bs,zs):yc(e,t,{},Rs),y.splice(t,0,e),ze(y[t],t)},r.delSeries=function(e){if(y.splice(e,1),H){F.values.splice(e,1),K.splice(e,1);let t=q.splice(e,1)[0];ne(null,t.firstChild),t.remove()}Ae.show&&(j.splice(e,1),De.splice(e,1)[0].remove(),Oe.splice(e,1),Le.splice(e,1)),xn("delSeries",e)};const Ie=[!1,!1,!1,!1];function je(e,t,n,r){let[o,a,i,l]=n,s=t%2,c=0;return 0==s&&(l||a)&&(c=0==t&&!o||2==t&&!i?zi(ys.size/3):0),1==s&&(o||i)&&(c=1==t&&!a||3==t&&!l?zi(Ds.size/2):0),c}const Fe=r.padding=(e.padding||[je,je,je,je]).map((e=>Zi(Ni(e,je)))),He=r._padding=Fe.map(((e,t)=>e(r,t,Ie,0)));let Ve,Be=null,Ue=null;const Ye=1==o?y[0].idxs:null;let We,qe,Ke,Ze,Ge,Qe,Je,Xe,et,tt,nt=null,rt=!1;function ot(e,n){if(t=null==e?[]:e,r.data=r._data=t,2==o){Ve=0;for(let e=1;e=0,ke=!0,Rt()}}function at(){let e,n;rt=!0,1==o&&(Ve>0?(Be=Ye[0]=0,Ue=Ye[1]=Ve-1,e=t[0][Be],n=t[0][Ue],2==T?(e=Be,n=Ue):e==n&&(3==T?[e,n]=xi(e,e,N.log,!1):4==T?[e,n]=Si(e,e,N.log,!1):N.time?n=e+zi(86400/v):[e,n]=Mi(e,n,.1,!0))):(Be=Ye[0]=e=null,Ue=Ye[1]=n=null)),Wt(C,e,n)}function it(e,t,n,r,o,a){e??=Ua,n??=dl,r??="butt",o??=Ua,a??="round",e!=We&&(h.strokeStyle=We=e),o!=qe&&(h.fillStyle=qe=o),t!=Ke&&(h.lineWidth=Ke=t),a!=Ge&&(h.lineJoin=Ge=a),r!=Qe&&(h.lineCap=Qe=r),n!=Ze&&h.setLineDash(Ze=n)}function lt(e,t,n,r){t!=qe&&(h.fillStyle=qe=t),e!=Je&&(h.font=Je=e),n!=Xe&&(h.textAlign=Xe=n),r!=et&&(h.textBaseline=et=r)}function st(e,t,n,o){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(o.length>0&&e.auto(r,rt)&&(null==t||null==t.min)){let t=Ni(Be,0),r=Ni(Ue,o.length-1),i=null==n.min?3==e.distr?function(e,t,n){let r=Wi,o=-Wi;for(let a=t;a<=n;a++){let t=e[a];null!=t&&t>0&&(to&&(o=t))}return[r,o]}(o,t,r):function(e,t,n,r){let o=Wi,a=-Wi;if(1==r)o=e[t],a=e[n];else if(-1==r)o=e[n],a=e[t];else for(let i=t;i<=n;i++){let t=e[i];null!=t&&(ta&&(a=t))}return[o,a]}(o,t,r,a):[n.min,n.max];e.min=ji(e.min,n.min=i[0]),e.max=Fi(e.max,n.max=i[1])}}r.setData=ot;const ct={min:null,max:null};function ut(e,t){let n=t?y[e].points:y[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function dt(e,n){let o=n?y[e].points:y[e],{stroke:a,fill:i,clip:l,flags:s,_stroke:c=o._stroke,_fill:u=o._fill,_width:d=o.width}=o._paths;d=il(d*oi,3);let p=null,f=d%2/2;n&&null==u&&(u=d>0?"#fff":c);let m=1==o.pxAlign&&f>0;if(m&&h.translate(f,f),!n){let e=pe-d/2,t=fe-d/2,n=me+d,r=_e+d;p=new Path2D,p.rect(e,t,n,r)}n?pt(c,d,o.dash,o.cap,u,a,i,s,l):function(e,n,o,a,i,l,s,c,u,d,h){let p=!1;0!=u&&S.forEach(((f,m)=>{if(f.series[0]==e){let e,_=y[f.series[1]],g=t[f.series[1]],v=(_._paths||ul).band;pl(v)&&(v=1==f.dir?v[0]:v[1]);let b=null;_.show&&v&&function(e,t,n){for(t=Ni(t,0),n=Ni(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,Be,Ue)?(b=f.fill(r,m)||l,e=_._paths.clip):v=null,pt(n,o,a,i,b,s,c,u,d,h,e,v),p=!0}})),p||pt(n,o,a,i,l,s,c,u,d,h)}(e,c,d,o.dash,o.cap,u,a,i,s,p,l),m&&h.translate(-f,-f)}const ht=3;function pt(e,t,n,r,o,a,i,l,s,c,u,d){it(e,t,n,r,o),(s||c||d)&&(h.save(),s&&h.clip(s),c&&h.clip(c)),d?(l&ht)==ht?(h.clip(d),u&&h.clip(u),mt(o,i),ft(e,a,t)):2&l?(mt(o,i),h.clip(d),ft(e,a,t)):1&l&&(h.save(),h.clip(d),u&&h.clip(u),mt(o,i),h.restore(),ft(e,a,t)):(mt(o,i),ft(e,a,t)),(s||c||d)&&h.restore()}function ft(e,t,n){n>0&&(t instanceof Map?t.forEach(((e,t)=>{h.strokeStyle=We=t,h.stroke(e)})):null!=t&&e&&h.stroke(t))}function mt(e,t){t instanceof Map?t.forEach(((e,t)=>{h.fillStyle=qe=t,h.fill(e)})):null!=t&&e&&h.fill(t)}function _t(e,t,n,r,o,a,i,l,s,c){let u=i%2/2;1==_&&h.translate(u,u),it(l,i,s,c,l),h.beginPath();let d,p,f,m,g=o+(0==r||3==r?-a:a);0==n?(p=o,m=g):(d=o,f=g);for(let _=0;_{if(!n.show)return;let a=x[n.scale];if(null==a.min)return void(n._show&&(t=!1,n._show=!1,yt(!1)));n._show||(t=!1,n._show=!0,yt(!1));let i=n.side,l=i%2,{min:s,max:c}=a,[u,d]=function(e,t,n,o){let a,i=k[e];if(o<=0)a=[0,0];else{let l=i._space=i.space(r,e,t,n,o);a=Ec(t,n,i._incrs=i.incrs(r,e,t,n,o,l),o,l)}return i._found=a}(o,s,c,0==l?ae:ie);if(0==d)return;let h=2==a.distr,p=n._splits=n.splits(r,o,s,c,u,d,h),f=2==a.distr?p.map((e=>nt[e])):p,m=2==a.distr?nt[p[1]]-nt[p[0]]:u,_=n._values=n.values(r,n.filter(r,f,o,d,m),o,d,m);n._rotate=2==i?n.rotate(r,_,o,d):0;let g=n._size;n._size=Ii(n.size(r,_,o,e)),null!=g&&n._size!=g&&(t=!1)})),t}function vt(e){let t=!0;return Fe.forEach(((n,o)=>{let a=n(r,o,Ie,e);a!=He[o]&&(t=!1),He[o]=a})),t}function yt(e){y.forEach(((t,n)=>{n>0&&(t._paths=null,e&&(1==o?(t.min=null,t.max=null):t.facets.forEach((e=>{e.min=null,e.max=null}))))}))}let bt,wt,kt,xt,St,Ct,At,Et,Mt,Nt,Tt,$t,Pt=!1,Dt=!1,Ot=[];function Lt(){Dt=!1;for(let e=0;e0){y.forEach(((n,a)=>{if(1==o){let o=n.scale,i=D[o];if(null==i)return;let l=e[o];if(0==a){let e=l.range(r,l.min,l.max,o);l.min=e[0],l.max=e[1],Be=wi(l.min,t[0]),Ue=wi(l.max,t[0]),Ue-Be>1&&(t[0][Be]l.max&&Ue--),n.min=nt[Be],n.max=nt[Ue]}else n.show&&n.auto&&st(l,i,n,t[a],n.sorted);n.idxs[0]=Be,n.idxs[1]=Ue}else if(a>0&&n.show&&n.auto){let[r,o]=n.facets,i=r.scale,l=o.scale,[s,c]=t[a],u=e[i],d=e[l];null!=u&&st(u,D[i],r,s,r.sorted),null!=d&&st(d,D[l],o,c,o.sorted),n.min=o.min,n.max=o.max}}));for(let t in e){let n=e[t],o=D[t];if(null==n.from&&(null==o||null==o.min)){let e=n.range(r,n.min==Wi?null:n.min,n.max==-Wi?null:n.max,t);n.min=e[0],n.max=e[1]}}}for(let t in e){let n=e[t];if(null!=n.from){let o=e[n.from];if(null==o.min)n.min=n.max=null;else{let e=n.range(r,o.min,o.max,t);n.min=e[0],n.max=e[1]}}}let n={},a=!1;for(let t in e){let r=e[t],o=x[t];if(o.min!=r.min||o.max!=r.max){o.min=r.min,o.max=r.max;let e=o.distr;o._min=3==e?Bi(o.min):4==e?Yi(o.min,o.asinh):100==e?o.fwd(o.min):o.min,o._max=3==e?Bi(o.max):4==e?Yi(o.max,o.asinh):100==e?o.fwd(o.max):o.max,n[t]=a=!0}}if(a){y.forEach(((e,t)=>{2==o?t>0&&n.y&&(e._paths=null):n[e.scale]&&(e._paths=null)}));for(let e in n)ye=!0,xn("setScale",e);Ae.show&&Ae.left>=0&&(be=ke=!0)}for(let t in D)D[t]=null}(),ge=!1),ye&&(!function(){let e=!1,t=0;for(;!e;){t++;let n=gt(t),o=vt(t);e=t==Ce||n&&o,e||(Se(r.width,r.height),ve=!0)}}(),ye=!1),ve){if(si(f,Ha,le),si(f,ja,se),si(f,za,ae),si(f,Ia,ie),si(m,Ha,le),si(m,ja,se),si(m,za,ae),si(m,Ia,ie),si(p,za,re),si(p,Ia,oe),d.width=zi(re*oi),d.height=zi(oe*oi),k.forEach((e=>{let{_el:t,_show:n,_size:r,_pos:o,side:a}=e;if(null!=t)if(n){let e=a%2==1;si(t,e?"left":"top",o-(3===a||0===a?r:0)),si(t,e?"width":"height",r),si(t,e?"top":"left",e?se:le),si(t,e?"height":"width",e?ie:ae),li(t,La)}else ii(t,La)})),We=qe=Ke=Ge=Qe=Je=Xe=et=Ze=null,tt=1,sn(!0),le!=ce||se!=ue||ae!=de||ie!=he){yt(!1);let e=ae/de,t=ie/he;if(Ae.show&&!be&&Ae.left>=0){Ae.left*=e,Ae.top*=t,kt&&hi(kt,zi(Ae.left),0,ae,ie),xt&&hi(xt,0,zi(Ae.top),ae,ie);for(let n=0;n=0&&Bt.width>0){Bt.left*=e,Bt.width*=e,Bt.top*=t,Bt.height*=t;for(let e in dn)si(Ut,e,Bt[e])}ce=le,ue=se,de=ae,he=ie}xn("setSize"),ve=!1}re>0&&oe>0&&(h.clearRect(0,0,d.width,d.height),xn("drawClear"),E.forEach((e=>e())),xn("draw")),Bt.show&&we&&(Yt(Bt),we=!1),Ae.show&&be&&(an(null,!0,!1),be=!1),F.show&&F.live&&ke&&(rn(),ke=!1),c||(c=!0,r.status=1,xn("ready")),rt=!1,Pt=!1}function It(e,n){let o=x[e];if(null==o.from){if(0==Ve){let t=o.range(r,n.min,n.max,e);n.min=t[0],n.max=t[1]}if(n.min>n.max){let e=n.min;n.min=n.max,n.max=e}if(Ve>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==C&&2==o.distr&&Ve>0&&(n.min=wi(n.min,t[0]),n.max=wi(n.max,t[0]),n.min==n.max&&n.max++),D[e]=n,ge=!0,Rt()}}r.batch=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Pt=!0,Dt=t,e(r),zt(),t&&Ot.length>0&&queueMicrotask(Lt)},r.redraw=(e,t)=>{ye=t||!1,!1!==e?Wt(C,N.min,N.max):Rt()},r.setScale=It;let jt=!1;const Ft=Ae.drag;let Ht=Ft.x,Vt=Ft.y;Ae.show&&(Ae.x&&(bt=ui("u-cursor-x",m)),Ae.y&&(wt=ui("u-cursor-y",m)),0==N.ori?(kt=bt,xt=wt):(kt=wt,xt=bt),Tt=Ae.left,$t=Ae.top);const Bt=r.select=wl({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Ut=Bt.show?ui("u-select",Bt.over?m:f):null;function Yt(e,t){if(Bt.show){for(let t in e)Bt[t]=e[t],t in dn&&si(Ut,t,e[t]);!1!==t&&xn("setSelect")}}function Wt(e,t,n){It(e,{min:t,max:n})}function qt(e,t,n,a){null!=t.focus&&function(e){if(e!=Gt){let t=null==e,n=1!=Te.alpha;y.forEach(((r,a)=>{if(1==o||a>0){let o=t||0==a||a==e;r._focus=t?null:o,n&&function(e,t){y[e].alpha=t,Ae.show&&De[e]&&(De[e].style.opacity=t);H&&q[e]&&(q[e].style.opacity=t)}(a,o?1:Te.alpha)}})),Gt=e,n&&Rt()}}(e),null!=t.show&&y.forEach(((n,r)=>{r>0&&(e==r||null==e)&&(n.show=t.show,function(e){let t=y[e],n=H?q[e]:null;t.show?n&&li(n,La):(n&&ii(n,La),hi(Pe?De[0]:De[e],-10,-10,ae,ie))}(r,t.show),2==o?(Wt(n.facets[0].scale,null,null),Wt(n.facets[1].scale,null,null)):Wt(n.scale,null,null),Rt())})),!1!==n&&xn("setSeries",e,t),a&&Mn("setSeries",r,e,t)}let Kt,Zt,Gt;r.setSelect=Yt,r.setSeries=qt,r.addBand=function(e,t){e.fill=Zi(e.fill||null),e.dir=Ni(e.dir,-1),t=null==t?S.length:t,S.splice(t,0,e)},r.setBand=function(e,t){wl(S[e],t)},r.delBand=function(e){null==e?S.length=0:S.splice(e,1)};const Qt={focus:!0};function Jt(e,t,n){let r=x[t];n&&(e=e/oi-(1==r.ori?se:le));let o=ae;1==r.ori&&(o=ie,e=o-e),-1==r.dir&&(e=o-e);let a=r._min,i=a+(r._max-a)*(e/o),l=r.distr;return 3==l?Hi(10,i):4==l?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Di.sinh(e)*t}(i,r.asinh):100==l?r.bwd(i):i}function Xt(e,t){si(Ut,Ha,Bt.left=e),si(Ut,za,Bt.width=t)}function en(e,t){si(Ut,ja,Bt.top=e),si(Ut,Ia,Bt.height=t)}H&&$e&&te(Za,B,(e=>{Ae._lock||(Me(e),null!=Gt&&qt(null,Qt,!0,Cn.setSeries))})),r.valToIdx=e=>wi(e,t[0]),r.posToIdx=function(e,n){return wi(Jt(e,C,n),t[0],Be,Ue)},r.posToVal=Jt,r.valToPos=(e,t,n)=>0==x[t].ori?i(e,x[t],n?me:ae,n?pe:0):l(e,x[t],n?_e:ie,n?fe:0),r.setCursor=(e,t,n)=>{Tt=e.left,$t=e.top,an(null,t,n)};let tn=0==N.ori?Xt:en,nn=1==N.ori?Xt:en;function rn(e,t){if(null!=e&&(e.idxs?e.idxs.forEach(((e,t)=>{j[t]=e})):void 0!==e.idx&&j.fill(e.idx),F.idx=j[0]),H&&F.live){for(let e=0;e0||1==o&&!Z)&&on(e,j[e]);!function(){if(H&&F.live)for(let e=2==o?1:0;eUe;Kt=Wi,Zt=null;let s=0==N.ori?ae:ie,c=1==N.ori?ae:ie;if(Tt<0||0==Ve||l){i=Ae.idx=null;for(let e=0;e0&&e.show){let t=null==w?-10:P(w,1==o?x[e.scale]:x[e.facets[1].scale],c,0);if($e&&null!=w){let n=1==N.ori?Tt:$t,o=Li(Te.dist(r,_,b,t,n));if(o=0?1:-1;a==(w>=0?1:-1)&&(1==a?1==t?w>=r:w<=r:1==t?w<=r:w>=r)&&(Kt=o,Zt=_)}else Kt=o,Zt=_}}if(ke||Pe){let e,n;0==N.ori?(e=k,n=t):(e=t,n=k);let o,a,i,s,c,g,v=!0,y=Ne.bbox;if(null!=y){v=!1;let e=y(r,_);i=e.left,s=e.top,o=e.width,a=e.height}else i=e,s=n,o=a=Ne.size(r,_);if(g=Ne.fill(r,_),c=Ne.stroke(r,_),Pe)_==Zt&&Kt<=Te.prox&&(l=i,u=s,d=o,h=a,p=v,f=g,m=c);else{let e=De[_];null!=e&&(Oe[_]=i,Le[_]=s,_i(e,o,a,v),fi(e,g,c),hi(e,Ii(i),Ii(s),ae,ie))}}}}if(Pe){let e=Te.prox;if(ke||(null==Gt?Kt<=e:Kt>e||Zt!=Gt)){let e=De[0];Oe[0]=l,Le[0]=u,_i(e,d,h,p),fi(e,f,m),hi(e,Ii(l),Ii(u),ae,ie)}}}if(Bt.show&&jt)if(null!=e){let[t,n]=Cn.scales,[r,o]=Cn.match,[a,i]=e.cursor.sync.scales,l=e.cursor.drag;if(Ht=l._x,Vt=l._y,Ht||Vt){let l,u,d,h,p,{left:f,top:m,width:_,height:g}=e.select,v=e.scales[a].ori,y=e.posToVal,b=null!=t&&r(t,a),w=null!=n&&o(n,i);b&&Ht?(0==v?(l=f,u=_):(l=m,u=g),d=x[t],h=$(y(l,a),d,s,0),p=$(y(l+u,a),d,s,0),tn(ji(h,p),Li(p-h))):tn(0,s),w&&Vt?(1==v?(l=f,u=_):(l=m,u=g),d=x[n],h=P(y(l,i),d,c,0),p=P(y(l+u,i),d,c,0),nn(ji(h,p),Li(p-h))):nn(0,c)}else hn()}else{let e=Li(Mt-St),t=Li(Nt-Ct);if(1==N.ori){let n=e;e=t,t=n}Ht=Ft.x&&e>=Ft.dist,Vt=Ft.y&&t>=Ft.dist;let n,r,o=Ft.uni;null!=o?Ht&&Vt&&(Ht=e>=o,Vt=t>=o,Ht||Vt||(t>e?Vt=!0:Ht=!0)):Ft.x&&Ft.y&&(Ht||Vt)&&(Ht=Vt=!0),Ht&&(0==N.ori?(n=At,r=Tt):(n=Et,r=$t),tn(ji(n,r),Li(r-n)),Vt||nn(0,c)),Vt&&(1==N.ori?(n=At,r=Tt):(n=Et,r=$t),nn(ji(n,r),Li(r-n)),Ht||tn(0,s)),Ht||Vt||(tn(0,0),nn(0,0))}if(Ft._x=Ht,Ft._y=Vt,null==e){if(a){if(null!=An){let[e,t]=Cn.scales;Cn.values[0]=null!=e?Jt(0==N.ori?Tt:$t,e):null,Cn.values[1]=null!=t?Jt(1==N.ori?Tt:$t,t):null}Mn(Ya,r,Tt,$t,ae,ie,i)}if($e){let e=a&&Cn.setSeries,t=Te.prox;null==Gt?Kt<=t&&qt(Zt,Qt,!0,e):Kt>t?qt(null,Qt,!0,e):Zt!=Gt&&qt(Zt,Qt,!0,e)}}ke&&(F.idx=i,rn()),!1!==n&&xn("setCursor")}r.setLegend=rn;let ln=null;function sn(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?ln=null:(ln=m.getBoundingClientRect(),xn("syncRect",ln))}function cn(e,t,n,r,o,a,i){Ae._lock||jt&&null!=e&&0==e.movementX&&0==e.movementY||(un(e,t,n,r,o,a,i,!1,null!=e),null!=e?an(null,!0,!0):an(t,!0,!1))}function un(e,t,n,o,a,i,l,c,u){if(null==ln&&sn(!1),Me(e),null!=e)n=e.clientX-ln.left,o=e.clientY-ln.top;else{if(n<0||o<0)return Tt=-10,void($t=-10);let[e,r]=Cn.scales,l=t.cursor.sync,[c,u]=l.values,[d,h]=l.scales,[p,f]=Cn.match,m=t.axes[0].side%2==1,_=0==N.ori?ae:ie,g=1==N.ori?ae:ie,v=m?i:a,y=m?a:i,b=m?o:n,w=m?n:o;if(n=null!=d?p(e,d)?s(c,x[e],_,0):-10:_*(b/v),o=null!=h?f(r,h)?s(u,x[r],g,0):-10:g*(w/y),1==N.ori){let e=n;n=o,o=e}}u&&((n<=1||n>=ae-1)&&(n=rl(n,ae)),(o<=1||o>=ie-1)&&(o=rl(o,ie))),c?(St=n,Ct=o,[At,Et]=Ae.move(r,n,o)):(Tt=n,$t=o)}Object.defineProperty(r,"rect",{get:()=>(null==ln&&sn(!1),ln)});const dn={width:0,height:0,left:0,top:0};function hn(){Yt(dn,!1)}let pn,fn,mn,_n;function gn(e,t,n,o,a,i,l){jt=!0,Ht=Vt=Ft._x=Ft._y=!1,un(e,t,n,o,a,i,0,!0,!1),null!=e&&(te(qa,ti,vn,!1),Mn(Wa,r,At,Et,ae,ie,null));let{left:s,top:c,width:u,height:d}=Bt;pn=s,fn=c,mn=u,_n=d,hn()}function vn(e,t,n,o,a,i,l){jt=Ft._x=Ft._y=!1,un(e,t,n,o,a,i,0,!1,!0);let{left:s,top:c,width:u,height:d}=Bt,h=u>0||d>0,p=pn!=s||fn!=c||mn!=u||_n!=d;if(h&&p&&Yt(Bt),Ft.setScale&&h&&p){let e=s,t=u,n=c,r=d;if(1==N.ori&&(e=c,t=d,n=s,r=u),Ht&&Wt(C,Jt(e,C),Jt(e+t,C)),Vt)for(let o in x){let e=x[o];o!=C&&null==e.from&&e.min!=Wi&&Wt(o,Jt(n+r,o),Jt(n,o))}hn()}else Ae.lock&&(Ae._lock=!Ae._lock,an(null,!0,!1));null!=e&&(ne(qa,ti),Mn(qa,r,Tt,$t,ae,ie,null))}function yn(e,t,n,o,a,i,l){Ae._lock||(Me(e),at(),hn(),null!=e&&Mn(Ga,r,Tt,$t,ae,ie,null))}function bn(){k.forEach(Nc),xe(r.width,r.height,!0)}yi(Ja,ni,bn);const wn={};wn.mousedown=gn,wn.mousemove=cn,wn.mouseup=vn,wn.dblclick=yn,wn.setSeries=(e,t,n,o)=>{-1!=(n=(0,Cn.match[2])(r,t,n))&&qt(n,o,!0,!1)},Ae.show&&(te(Wa,m,gn),te(Ya,m,cn),te(Ka,m,(e=>{Me(e),sn(!1)})),te(Za,m,(function(e,t,n,r,o,a,i){if(Ae._lock)return;Me(e);let l=jt;if(jt){let e,t,n=!0,r=!0,o=10;0==N.ori?(e=Ht,t=Vt):(e=Vt,t=Ht),e&&t&&(n=Tt<=o||Tt>=ae-o,r=$t<=o||$t>=ie-o),e&&n&&(Tt=Tt{e.call(null,r,t,n)}))}(e.plugins||[]).forEach((e=>{for(let t in e.hooks)kn[t]=(kn[t]||[]).concat(e.hooks[t])}));const Sn=(e,t,n)=>n,Cn=wl({key:null,setSeries:!1,filters:{pub:Xi,sub:Xi},scales:[C,y[1]?y[1].scale:null],match:[el,el,Sn],values:[null,null]},Ae.sync);2==Cn.match.length&&Cn.match.push(Sn),Ae.sync=Cn;const An=Cn.key,En=Vs(An);function Mn(e,t,n,r,o,a,i){Cn.filters.pub(e,t,n,r,o,a,i)&&En.pub(e,t,n,r,o,a,i)}function Nn(){xn("init",e,t),ot(t||e.data,!1),D[C]?It(C,D[C]):at(),we=Bt.show&&(Bt.width>0||Bt.height>0),be=ke=!0,xe(e.width,e.height)}return En.sub(r),r.pub=function(e,t,n,r,o,a,i){Cn.filters.sub(e,t,n,r,o,a,i)&&wn[e](null,t,n,r,o,a,i)},r.destroy=function(){En.unsub(r),fc.delete(r),ee.clear(),bi(Ja,ni,bn),u.remove(),B?.remove(),xn("destroy")},y.forEach(ze),k.forEach((function(e,t){if(e._show=e.show,e.show){let n=e.side%2,o=x[e.scale];null==o&&(e.scale=n?y[1].scale:C,o=x[e.scale]);let a=o.time;e.size=Zi(e.size),e.space=Zi(e.space),e.rotate=Zi(e.rotate),pl(e.incrs)&&e.incrs.forEach((e=>{!ll.has(e)&&ll.set(e,sl(e))})),e.incrs=Zi(e.incrs||(2==o.distr?Il:a?1==v?Ql:es:jl)),e.splits=Zi(e.splits||(a&&1==o.distr?R:3==o.distr?xs:4==o.distr?Ss:ks)),e.stroke=Zi(e.stroke),e.grid.stroke=Zi(e.grid.stroke),e.ticks.stroke=Zi(e.ticks.stroke),e.border.stroke=Zi(e.border.stroke);let i=e.values;e.values=pl(i)&&!pl(i[0])?Zi(i):a?pl(i)?os(O,rs(i,L)):ml(i)?function(e,t){let n=Pl(t);return(t,r,o,a,i)=>r.map((t=>n(e(t))))}(O,i):i||z:i||ws,e.filter=Zi(e.filter||(o.distr>=3&&10==o.log?Ts:3==o.distr&&2==o.log?$s:Qi)),e.font=Mc(e.font),e.labelFont=Mc(e.labelFont),e._size=e.size(r,null,t,0),e._space=e._rotate=e._incrs=e._found=e._splits=e._values=null,e._size>0&&(Ie[t]=!0,e._el=ui("u-axis",p))}})),n?n instanceof HTMLElement?(n.appendChild(u),Nn()):n(r,Nn):Nn(),r}Tc.assign=wl,Tc.fmtNum=Pi,Tc.rangeNum=Mi,Tc.rangeLog=xi,Tc.rangeAsinh=Si,Tc.orient=Bs,Tc.pxRatio=oi,Tc.join=function(e,t){if(function(e){let t=e[0][0],n=t.length;for(let r=1;r1&&void 0!==arguments[1]?arguments[1]:100;const n=e.length;if(n<=1)return!0;let r=0,o=n-1;for(;r<=o&&null==e[r];)r++;for(;o>=r&&null==e[o];)o--;if(o<=r)return!0;const a=Fi(1,Ri((o-r+1)/t));for(let i=e[r],l=r+a;l<=o;l+=a){const t=e[l];if(null!=t){if(t<=i)return!1;i=t}}return!0}(t[0])||(t=function(e){let t=e[0],n=t.length,r=Array(n);for(let a=0;at[e]-t[n]));let o=[];for(let a=0;ae-t))],o=r[0].length,a=new Map;for(let i=0;iBs(e,a,((s,c,u,d,h,p,f,m,_,g,v)=>{let y=s.pxRound,{left:b,width:w}=e.bbox,k=e=>y(p(e,d,g,m)),x=e=>y(f(e,h,v,_)),S=0==d.ori?Xs:ec;const C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},A=C.stroke,E=d.dir*(0==d.ori?1:-1);i=ki(u,i,l,1),l=ki(u,i,l,-1);let M=x(u[1==E?i:l]),N=k(c[1==E?i:l]),T=N,$=N;o&&-1==t&&($=b,S(A,$,M)),S(A,N,M);for(let e=1==E?i:l;e>=i&&e<=l;e+=E){let n=u[e];if(null==n)continue;let r=k(c[e]),o=x(n);1==t?S(A,r,M):S(A,T,o),S(A,r,o),M=o,T=r}let P=T;o&&1==t&&(P=b+w,S(A,P,M));let[D,O]=Us(e,a);if(null!=s.fill||0!=D){let t=C.fill=new Path2D(A),n=x(s.fillTo(e,a,s.min,s.max,D));S(t,P,n),S(t,$,n)}if(!s.spanGaps){let o=[];o.push(...Ks(c,u,i,l,E,k,r));let h=s.width*oi/2,p=n||1==t?h:-h,f=n||-1==t?-h:h;o.forEach((e=>{e[0]+=p,e[1]+=f})),C.gaps=o=s.gaps(e,a,i,l,o),C.clip=qs(o,d.ori,m,_,g,v)}return 0!=O&&(C.band=2==O?[Ws(e,a,i,l,A,-1),Ws(e,a,i,l,A,1)]:Ws(e,a,i,l,A,O)),C}))},e.bars=function(e){const t=Ni((e=e||ul).size,[.6,Wi,1]),n=e.align||0,r=e.gap||0;let o=e.radius;o=null==o?[0,0]:"number"==typeof o?[o,0]:o;const a=Zi(o),i=1-t[0],l=Ni(t[1],Wi),s=Ni(t[2],1),c=Ni(e.disp,ul),u=Ni(e.each,(e=>{})),{fill:d,stroke:h}=c;return(e,t,o,p)=>Bs(e,t,((f,m,_,g,v,y,b,w,k,x,S)=>{let C,A,E=f.pxRound,M=n,N=r*oi,T=l*oi,$=s*oi;0==g.ori?[C,A]=a(e,t):[A,C]=a(e,t);const P=g.dir*(0==g.ori?1:-1);let D,O,L,R=0==g.ori?tc:nc,z=0==g.ori?u:(e,t,n,r,o,a,i)=>{u(e,t,n,o,r,i,a)},I=Ni(e.bands,dl).find((e=>e.series[0]==t)),j=null!=I?I.dir:0,F=f.fillTo(e,t,f.min,f.max,j),H=E(b(F,v,S,k)),V=x,B=E(f.width*oi),U=!1,Y=null,W=null,q=null,K=null;null==d||0!=B&&null==h||(U=!0,Y=d.values(e,t,o,p),W=new Map,new Set(Y).forEach((e=>{null!=e&&W.set(e,new Path2D)})),B>0&&(q=h.values(e,t,o,p),K=new Map,new Set(q).forEach((e=>{null!=e&&K.set(e,new Path2D)}))));let{x0:Z,size:G}=c;if(null!=Z&&null!=G){M=1,m=Z.values(e,t,o,p),2==Z.unit&&(m=m.map((t=>e.posToVal(w+t*x,g.key,!0))));let n=G.values(e,t,o,p);O=2==G.unit?n[0]*x:y(n[0],g,x,w)-y(0,g,x,w),V=hc(m,_,y,g,x,w,V),L=V-O+N}else V=hc(m,_,y,g,x,w,V),L=V*i+N,O=V-L;L<1&&(L=0),B>=O/2&&(B=0),L<5&&(E=Gi);let Q=L>0;O=E(Ki(V-L-(Q?B:0),$,T)),D=(0==M?O/2:M==P?0:O)-M*P*((0==M?N/2:0)+(Q?B/2:0));const J={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},X=U?null:new Path2D;let ee=null;if(null!=I)ee=e.data[I.series[1]];else{let{y0:n,y1:r}=c;null!=n&&null!=r&&(_=r.values(e,t,o,p),ee=n.values(e,t,o,p))}let te=C*O,ne=A*O;for(let n=1==P?o:p;n>=o&&n<=p;n+=P){let r=_[n];if(null==r)continue;if(null!=ee){var re;let e=null!==(re=ee[n])&&void 0!==re?re:0;if(r-e==0)continue;H=b(e,v,S,k)}let o=y(2!=g.distr||null!=c?m[n]:n,g,x,w),a=b(Ni(r,F),v,S,k),i=E(o-D),l=E(Fi(a,H)),s=E(ji(a,H)),u=l-s;if(null!=r){let o=r<0?ne:te,a=r<0?te:ne;U?(B>0&&null!=q[n]&&R(K.get(q[n]),i,s+Ri(B/2),O,Fi(0,u-B),o,a),null!=Y[n]&&R(W.get(Y[n]),i,s+Ri(B/2),O,Fi(0,u-B),o,a)):R(X,i,s+Ri(B/2),O,Fi(0,u-B),o,a),z(e,t,n,i-B/2,s,O+B,u)}}if(B>0)J.stroke=U?K:X;else if(!U){var oe;J._fill=0==f.width?f._fill:null!==(oe=f._stroke)&&void 0!==oe?oe:f._fill,J.width=0}return J.fill=U?W:X,J}))},e.spline=function(e){return function(e,t){const n=Ni(t?.alignGaps,0);return(t,r,o,a)=>Bs(t,r,((i,l,s,c,u,d,h,p,f,m,_)=>{let g,v,y,b=i.pxRound,w=e=>b(d(e,c,m,p)),k=e=>b(h(e,u,_,f));0==c.ori?(g=Qs,y=Xs,v=ac):(g=Js,y=ec,v=ic);const x=c.dir*(0==c.ori?1:-1);o=ki(s,o,a,1),a=ki(s,o,a,-1);let S=w(l[1==x?o:a]),C=S,A=[],E=[];for(let e=1==x?o:a;e>=o&&e<=a;e+=x)if(null!=s[e]){let t=w(l[e]);A.push(C=t),E.push(k(s[e]))}const M={stroke:e(A,E,g,y,v,b),fill:null,clip:null,band:null,gaps:null,flags:1},N=M.stroke;let[T,$]=Us(t,r);if(null!=i.fill||0!=T){let e=M.fill=new Path2D(N),n=k(i.fillTo(t,r,i.min,i.max,T));y(e,C,n),y(e,S,n)}if(!i.spanGaps){let e=[];e.push(...Ks(l,s,o,a,x,w,n)),M.gaps=e=i.gaps(t,r,o,a,e),M.clip=qs(e,c.ori,p,f,m,_)}return 0!=$&&(M.band=2==$?[Ws(t,r,o,a,N,-1),Ws(t,r,o,a,N,1)]:Ws(t,r,o,a,N,$)),M}))}(pc,e)}}const $c=(e,t,n)=>{if(void 0===e||null===e)return"";n=n||0,t=t||0;const r=Math.abs(n-t);if(isNaN(r)||0==r)return Math.abs(e)>=1e3?e.toLocaleString("en-US"):e.toString();let o=3+Math.floor(1+Math.log10(Math.max(Math.abs(t),Math.abs(n)))-Math.log10(r));return(isNaN(o)||o>20)&&(o=20),e.toLocaleString("en-US",{minimumSignificantDigits:1,maximumSignificantDigits:o})},Pc=[[31536e3,"{YYYY}",null,null,null,null,null,null,1],[2419200,"{MMM}","\n{YYYY}",null,null,null,null,null,1],[86400,"{MM}-{DD}","\n{YYYY}",null,null,null,null,null,1],[3600,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[60,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[1,"{HH}:{mm}:{ss}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD} {HH}:{mm}",null,null,null,1],[.001,":{ss}.{fff}","\n{YYYY}-{MM}-{DD} {HH}:{mm}",null,"\n{MM}-{DD} {HH}:{mm}",null,"\n{HH}:{mm}",null,1]],Dc=(e,t)=>Array.from(new Set(e.map((e=>e.scale)))).map((e=>{const n="10px Arial",r=it("color-text"),o={scale:e,show:!0,size:Oc,stroke:r,font:n,values:(e,n)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=t[0],o=t[t.length-1];return n?t.map((e=>`${$c(e,r,o)} ${n}`)):t.map((e=>$c(e,r,o)))}(e,n,t)};return e?Number(e)%2||"y"===e?o:{...o,side:1}:{space:80,values:Pc,stroke:r,font:n}})),Oc=(e,t,n,r)=>{var o;const a=e.axes[n];if(r>1)return a._size||60;let i=6+((null===a||void 0===a||null===(o=a.ticks)||void 0===o?void 0:o.size)||0)+(a.gap||0);const l=(null!==t&&void 0!==t?t:[]).reduce(((e,t)=>(null===t||void 0===t?void 0:t.length)>e.length?t:e),"");return""!=l&&(i+=((e,t)=>{const n=document.createElement("span");n.innerText=e,n.style.cssText=`position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ${t}`,document.body.appendChild(n);const r=n.offsetWidth;return n.remove(),r})(l,"10px Arial")),Math.ceil(i)},Lc=(((e,t,n)=>{const r=[];for(let o=0;oMath.round(e))).join(", "))}r.map((e=>`rgb(${e})`))})([246,226,219],[127,39,4],16),e=>{for(let t=e.series.length-1;t>=0;t--)t&&e.delSeries(t)}),Rc=e=>{Lc(e),(e=>{Object.keys(e.hooks).forEach((t=>{e.hooks[t]=[]}))})(e),e.setData([])},zc=e=>t=>{const n=t.posToVal(t.select.left,"x"),r=t.posToVal(t.select.left+t.select.width,"x");e({min:n,max:r})};function Ic(e){return`rgba(${Cr(Ar[e])}, 0.05)`}let jc=function(e){return e.BAR="Bars",e.LINE="Lines",e.LINE_STEPPED="Stepped lines",e.POINTS="Points",e}({});const Fc=(e,t,n,r)=>{var o,a;const i=e.under.clientWidth/100-1,l=null===Tc||void 0===Tc||null===(o=Tc.paths)||void 0===o||null===(a=o.bars)||void 0===a?void 0:a.call(o,{size:[.96,i]});return l?l(e,t,n,r):null},Hc=(e,t,n,r)=>{var o,a;const i=null===Tc||void 0===Tc||null===(o=Tc.paths)||void 0===o||null===(a=o.stepped)||void 0===a?void 0:a.call(o,{align:1});return i?i(e,t,n,r):null},Vc=e=>{switch(e){case jc.BAR:return Fc;case jc.LINE_STEPPED:return Hc;default:return}},Bc=["color-log-hits-bar-1","color-log-hits-bar-2","color-log-hits-bar-3","color-log-hits-bar-4","color-log-hits-bar-5"],Uc={[jc.BAR]:1,[jc.LINE_STEPPED]:2,[jc.LINE]:1.2,[jc.POINTS]:0},Yc=e=>{let{data:n,logHits:r,xRange:a,bands:i,containerSize:l,onReadyChart:s,setPlotScale:c,graphOptions:u}=e;const{isDarkTheme:d}=gt(),[h,p]=(0,t.useState)(-1),f=e=>{var t;const n=null!==(t=e.cursor.idx)&&void 0!==t?t:-1;p(n)},m=(0,t.useMemo)((()=>{let e=0;return n.map(((t,n)=>{var o;if(0===n)return{};const a=Object.values((null===r||void 0===r||null===(o=r[n-1])||void 0===o?void 0:o.fields)||{}).map((e=>e||'""')).join(", "),i=it(a?Bc[e]:"color-log-hits-bar-0");return a&&e++,{label:a||"other",width:Uc[u.graphStyle],spanGaps:!0,stroke:i,fill:u.fill?i+"80":"",paths:Vc(u.graphStyle)}}))}),[d,n,u]),_=(0,t.useMemo)((()=>({series:m,bands:i,width:l.width||window.innerWidth/2,height:l.height||200,cursor:{points:{width:(e,t,n)=>n/4,size:(e,t)=>{var n,r,o;return 1.5*((null===(n=e.series)||void 0===n||null===(r=n[t])||void 0===r||null===(o=r.points)||void 0===o?void 0:o.size)||1)},stroke:(e,t)=>{var n;return`${(null===m||void 0===m||null===(n=m[t])||void 0===n?void 0:n.stroke)||"#ffffff"}`},fill:()=>"#ffffff"}},scales:{x:{time:!0,range:()=>[a.min,a.max]}},hooks:{drawSeries:[],ready:[s],setCursor:[f],setSelect:[zc(c)],destroy:[Rc]},legend:{show:!1},axes:Dc([{},{scale:"y"}]),tzDate:e=>o()(Rt(It(e))).local().toDate()})),[d,m,i]);return{options:_,series:m,focusDataIdx:h}},Wc=e=>o()(1e3*e).tz().format(wt),qc=e=>{let{data:n,focusDataIdx:r,uPlotInst:o}=e;const a=(0,t.useRef)(null),i=(0,t.useMemo)((()=>{var e,t;const a=(null===o||void 0===o?void 0:o.series)||[],[i,...l]=n.map((e=>e[r]||0)),s=i+(n[0][1]-n[0][0]),c=l.map(((e,t)=>{var n;const r=a[t+1],o=null===r||void 0===r||null===(n=r.stroke)||void 0===n?void 0:n.call(r);return{label:(null===r||void 0===r?void 0:r.label)||"other",stroke:o,value:e,show:null===r||void 0===r?void 0:r.show}})).filter((e=>e.value>0&&e.show)).sort(((e,t)=>t.value-e.value));return{point:{top:c[0]&&(null===o||void 0===o||null===(e=o.valToPos)||void 0===e?void 0:e.call(o,c[0].value,"y"))||0,left:(null===o||void 0===o||null===(t=o.valToPos)||void 0===t?void 0:t.call(o,i,"x"))||0},values:c,total:c.reduce(((e,t)=>e+t.value),0),timestamp:`${Wc(i)} - ${Wc(s)}`}}),[r,o,n]),l=(0,t.useMemo)((()=>{if(!o||!i.total||!a.current)return;const{top:e,left:t}=i.point,n=parseFloat(o.over.style.left),r=parseFloat(o.over.style.top),{width:l,height:s}=o.over.getBoundingClientRect(),{width:c,height:u}=a.current.getBoundingClientRect(),d={top:e+r+50-(e+u>=s?u+100:0),left:t+n+50-(t+c>=l?c+100:0)};return d.left<0&&(d.left=20),d.top<0&&(d.top=20),d}),[i,o,a.current]);return mt("div",{className:Qn()({"vm-chart-tooltip":!0,"vm-chart-tooltip_hits":!0,"vm-bar-hits-tooltip":!0,"vm-bar-hits-tooltip_visible":-1!==r&&i.values.length}),ref:a,style:l,children:[mt("div",{children:i.values.map(((e,t)=>mt("div",{className:"vm-chart-tooltip-data",children:[mt("span",{className:"vm-chart-tooltip-data__marker",style:{background:e.stroke}}),mt("p",{children:[e.label,": ",mt("b",{children:e.value})]})]},t)))}),i.values.length>1&&mt("div",{className:"vm-chart-tooltip-data",children:mt("p",{children:["Total records: ",mt("b",{children:i.total})]})}),mt("div",{className:"vm-chart-tooltip-header",children:mt("div",{className:"vm-chart-tooltip-header__title",children:i.timestamp})})]})},Kc=e=>{let{period:n,setPeriod:r}=e;const[a,i]=(0,t.useState)({min:n.start,max:n.end});return(0,t.useEffect)((()=>{i({min:n.start,max:n.end})}),[n]),{xRange:a,setPlotScale:e=>{let{min:t,max:n}=e;const a=1e3*(n-t);aAt||r({from:o()(1e3*t).toDate(),to:o()(1e3*n).toDate()})}}},Zc=e=>(e=>e instanceof MouseEvent)(e)?e.clientX:e.touches[0].clientX,Gc=e=>{let{dragSpeed:n=.85,setPanning:r,setPlotScale:o}=e;const a=(0,t.useRef)({leftStart:0,xUnitsPerPx:0,scXMin:0,scXMax:0}),i=e=>{e.preventDefault();const t=Zc(e),{leftStart:r,xUnitsPerPx:i,scXMin:l,scXMax:s}=a.current,c=i*((t-r)*n);o({min:l-c,max:s-c})},l=()=>{r(!1),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",l),document.removeEventListener("touchmove",i),document.removeEventListener("touchend",l)};return e=>{let{e:t,u:n}=e;t.preventDefault(),r(!0),a.current={leftStart:Zc(t),xUnitsPerPx:n.posToVal(1,"x")-n.posToVal(0,"x"),scXMin:n.scales.x.min||0,scXMax:n.scales.x.max||0},document.addEventListener("mousemove",i),document.addEventListener("mouseup",l),document.addEventListener("touchmove",i),document.addEventListener("touchend",l)}},Qc=e=>{const[n,r]=(0,t.useState)(!1),o=Gc({dragSpeed:.9,setPanning:r,setPlotScale:e});return{onReadyChart:t=>{const n=e=>{const n=e instanceof MouseEvent&&(e=>{const{ctrlKey:t,metaKey:n,button:r}=e;return 0===r&&(t||n)})(e),r=window.TouchEvent&&e instanceof TouchEvent&&e.touches.length>1;(n||r)&&o({u:t,e:e})};t.over.addEventListener("mousedown",n),t.over.addEventListener("touchstart",n),t.over.addEventListener("wheel",(n=>{if(!n.ctrlKey&&!n.metaKey)return;n.preventDefault();const{width:r}=t.over.getBoundingClientRect(),o=t.cursor.left&&t.cursor.left>0?t.cursor.left:0,a=t.posToVal(o,"x"),i=(t.scales.x.max||0)-(t.scales.x.min||0),l=n.deltaY<0?.9*i:i/.9,s=a-o/r*l,c=s+l;t.batch((()=>e({min:s,max:c})))}))},isPanning:n}},Jc=e=>{const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)},Xc=e=>{let{uPlotInst:n,xRange:r,setPlotScale:o}=e;const[a,i]=(0,t.useState)(0),l=(0,t.useCallback)((e=>{const{target:t,ctrlKey:a,metaKey:i,key:l}=e,s=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;if(!n||s)return;const c="+"===l||"="===l;if(("-"===l||c)&&!(a||i)){e.preventDefault();const t=(r.max-r.min)/10*(c?1:-1);o({min:r.min+t,max:r.max-t})}}),[n,r]),s=(0,t.useCallback)((e=>{if(!n||2!==e.touches.length)return;e.preventDefault();const t=Jc(e.touches),i=a-t,l=n.scales.x.max||r.max,s=n.scales.x.min||r.min,c=(l-s)/50*(i>0?-1:1);n.batch((()=>o({min:s+c,max:l-c})))}),[n,a,r]);return er("keydown",l),er("touchmove",s),er("touchstart",(e=>{2===e.touches.length&&(e.preventDefault(),i(Jc(e.touches)))})),null},eu=e=>{let{onChange:n}=e;const[r,o]=je(),a=(0,t.useRef)(null),{value:i,toggle:l,setFalse:s}=Fr(!1),[c,u]=Lr(jc.LINE_STEPPED,"graph"),[d,h]=Lr(!1,"stacked"),[p,f]=Lr(!1,"fill"),[m,_]=Lr(!1,"hide_chart"),g=(0,t.useMemo)((()=>({graphStyle:c,stacked:d,fill:p,hideChart:m})),[c,d,p,m]);return(0,t.useEffect)((()=>{n(g)}),[g]),mt("div",{className:"vm-bar-hits-options",children:[mt(Ir,{title:m?"Show chart and resume hits updates":"Hide chart and pause hits updates",children:mt(Dr,{variant:"text",color:"primary",startIcon:mt(m?Dn:Pn,{}),onClick:()=>{_((e=>{const t=!e;return t?r.set("hide_chart","true"):r.delete("hide_chart"),o(r),t}))},ariaLabel:"settings"})}),mt("div",{ref:a,children:mt(Ir,{title:"Graph settings",children:mt(Dr,{variant:"text",color:"primary",startIcon:mt(pn,{}),onClick:l,ariaLabel:"settings"})})}),mt(Xr,{open:i,placement:"bottom-right",onClose:s,buttonRef:a,title:"Graph settings",children:mt("div",{className:"vm-bar-hits-options-settings",children:[mt("div",{className:"vm-bar-hits-options-settings-item vm-bar-hits-options-settings-item_list",children:[mt("p",{className:"vm-bar-hits-options-settings-item__title",children:"Graph style:"}),Object.values(jc).map((e=>{return mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_active":c===e}),onClick:(t=e,()=>{u(t),r.set("graph",t),o(r)}),children:e},e);var t}))]}),mt("div",{className:"vm-bar-hits-options-settings-item",children:mt(jr,{label:"Stacked",value:d,onChange:e=>{h(e),e?r.set("stacked","true"):r.delete("stacked"),o(r)}})}),mt("div",{className:"vm-bar-hits-options-settings-item",children:mt(jr,{label:"Fill",value:p,onChange:e=>{f(e),e?r.set("fill","true"):r.delete("fill"),o(r)}})})]})})]})};const tu=function(e,t){const n=[];let r=[];const o=e[0].length,a=Array(o);for(let i=0;ia[t]+=+(null!==e&&void 0!==e?e:0))));for(let i=1;in>i&&!t(n))),i]});return r=r.filter((e=>e.series[1]>-1)),{data:[e[0]].concat(n),bands:r}},nu=e=>{let{uPlotInst:n,onApplyFilter:r}=e;const[o,a]=(0,t.useState)([]),[i,l]=(0,t.useState)([]),s=(0,t.useCallback)((()=>{const e=n.series.filter((e=>"x"!==e.scale));a(e),l(e.map((e=>eo(e.label||""))))}),[n]),c=e=>t=>{(t.metaKey||t.ctrlKey)&&(r(`{${e}}`||""),s(),n.redraw())};return(0,t.useEffect)(s,[n]),mt("div",{className:"vm-bar-hits-legend",children:o.map(((e,t)=>{var r,o;return mt(Ir,{title:mt("ul",{className:"vm-bar-hits-legend-info",children:[mt("li",{children:["Click to ",e.show?"hide":"show"," the _stream."]}),mt("li",{children:[yr()?"Cmd":"Ctrl"," + Click to filter by the _stream."]})]}),children:mt("div",{className:Qn()({"vm-bar-hits-legend-item":!0,"vm-bar-hits-legend-item_hide":!e.show}),onClick:(o=e,e=>{e.metaKey||e.ctrlKey||(o.show=!o.show,s(),n.redraw())}),children:[mt("div",{className:"vm-bar-hits-legend-item__marker",style:{backgroundColor:`${null===e||void 0===e||null===(r=e.stroke)||void 0===r?void 0:r.call(e)}`}}),mt("div",{className:"vm-bar-hits-legend-item-pairs",children:i[t].map((e=>mt("span",{className:"vm-bar-hits-legend-item-pairs__value",onClick:c(e),children:e},e)))})]})},e.label)}))})},ru=e=>{let{logHits:n,data:r,period:o,setPeriod:a,onApplyFilter:i}=e;const[l,s]=Oa(),c=(0,t.useRef)(null),[u,d]=(0,t.useState)(),[h,p]=(0,t.useState)({graphStyle:jc.LINE_STEPPED,stacked:!1,fill:!1,hideChart:!1}),{xRange:f,setPlotScale:m}=Kc({period:o,setPeriod:a}),{onReadyChart:_,isPanning:g}=Qc(m);Xc({uPlotInst:u,xRange:f,setPlotScale:m});const v=(0,t.useMemo)((()=>r.every((e=>0===e.length))),[r]),{data:y,bands:b}=(0,t.useMemo)((()=>h.stacked?tu(r,(()=>!1)):{data:r,bands:[]}),[h,r]),{options:w,series:k,focusDataIdx:x}=Yc({data:y,logHits:n,bands:b,xRange:f,containerSize:s,onReadyChart:_,setPlotScale:m,graphOptions:h});return(0,t.useEffect)((()=>{u&&(Lc(u),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(((t,r)=>{t.label&&(t.spanGaps=n),r&&e.addSeries(t)}))}(u,k,!0),((e,t)=>{if(e.delBand(),t.length<2)return;const n=t.map(((e,t)=>({...e,index:t}))),r=n.filter((e=>e.forecast===tt.yhatUpper)),o=n.filter((e=>e.forecast===tt.yhatLower)),a=r.map((e=>{const t=o.find((t=>t.forecastGroup===e.forecastGroup));return t?{series:[e.index,t.index],fill:Ic(tt.yhatUpper)}:null})).filter((e=>null!==e));a.length&&a.forEach((t=>{e.addBand(t)}))})(u,k),u.redraw())}),[k]),(0,t.useEffect)((()=>{if(!c.current)return;const e=new Tc(w,y,c.current);return d(e),()=>e.destroy()}),[c.current,w]),(0,t.useEffect)((()=>{u&&(u.scales.x.range=()=>[f.min,f.max],u.redraw())}),[f]),(0,t.useEffect)((()=>{u&&(u.setSize(s),u.redraw())}),[s]),(0,t.useEffect)((()=>{u&&(u.setData(y),u.redraw())}),[y]),mt("div",{className:Qn()({"vm-bar-hits-chart__wrapper":!0,"vm-bar-hits-chart__wrapper_hidden":h.hideChart}),children:[!h.hideChart&&mt("div",{className:Qn()({"vm-bar-hits-chart":!0,"vm-bar-hits-chart_panning":g}),ref:l,children:[mt("div",{className:"vm-line-chart__u-plot",ref:c}),mt(qc,{uPlotInst:u,data:r,focusDataIdx:x})]}),mt(eu,{onChange:p}),u&&!v&&!h.hideChart&&mt(nu,{uPlotInst:u,onApplyFilter:i})]})},ou=e=>{let{logHits:n,period:r,error:a,isLoading:i,onApplyFilter:l}=e;const{isMobile:s}=br(),c=Qt(),[u]=je(),d=(0,t.useMemo)((()=>u.get("hide_chart")),[u]),h=(0,t.useCallback)((e=>{const t=[],{start:n,end:o,step:a}=to(r),i=Math.ceil(n.diff(e,"milliseconds")/a);let l=e.add(i*a,"milliseconds");l.isBefore(n)&&(l=n.clone());const s=Math.floor(o.diff(l,"milliseconds")/a);for(let r=0;r<=s;r++)t.push(l.add(r*a,"milliseconds").unix());return t}),[r]),p=(0,t.useMemo)((()=>{if(!n.length)return[[],[]];const e=h(o()(n[0].timestamps[0])),t=((e,t)=>e.map((e=>{const n=new Map;return e.timestamps.forEach(((t,r)=>{const a=o()(t).unix();n.set(a,e.values[r]||null)})),t.map((e=>n.get(e)||null))})))(n,e);return[e,...t]}),[n]),f=(0,t.useMemo)((()=>{const e=p.every((e=>0===e.length)),t=0===p[0].length,n=0===p[1].length;return d?"Chart hidden. Hits updates paused.":e?"No logs volume available\nNo volume information available for the current queries and time range.":t?"No timestamp information available for the current queries and time range.":n?"No value information available for the current queries and time range.":""}),[p,d]);return mt("section",{className:Qn()({"vm-explore-logs-chart":!0,"vm-block":!0,"vm-block_mobile":s}),children:[i&&mt(ha,{}),!a&&f&&mt("div",{className:"vm-explore-logs-chart__empty",children:mt(kr,{variant:"info",children:f})}),a&&f&&mt("div",{className:"vm-explore-logs-chart__empty",children:mt(kr,{variant:"error",children:a})}),p&&mt(ru,{logHits:n,data:p,period:r,setPeriod:e=>{let{from:t,to:n}=e;c({type:"SET_PERIOD",payload:{from:t,to:n}})},onApplyFilter:l})]})},au=(e,n)=>{const[r]=je(),[o,a]=(0,t.useState)([]),[i,l]=(0,t.useState)([]),[s,c]=(0,t.useState)(),u=(0,t.useRef)(new AbortController),d=(0,t.useMemo)((()=>(e=>`${e}/select/logsql/hits`)(e)),[e]),h=(e,t)=>(e.total=(e.total||0)+(t.total||0),t.timestamps.forEach(((n,r)=>{const o=e.timestamps.findIndex((e=>e===n));-1===o?(e.timestamps.push(n),e.values.push(t.values[r])):e.values[o]+=t.values[r]})),e),p=(0,t.useCallback)((async e=>{u.current.abort(),u.current=new AbortController;const{signal:t}=u.current,o=Date.now();l((e=>({...e,[o]:!0}))),c(void 0);try{const i=((e,t,n)=>{const{start:o,end:a,step:i}=to(t);return{signal:n,method:"POST",headers:{AccountID:r.get("accountID")||"0",ProjectID:r.get("projectID")||"0"},body:new URLSearchParams({query:e.trim(),step:`${i}ms`,start:o.toISOString(),end:a.toISOString(),field:"_stream"})}})(n,e,t),s=await fetch(d,i);if(!s.ok||!s.body){const e=await s.text();return c(e),a([]),void l((e=>({...e,[o]:!1})))}const u=await s.json(),p=null===u||void 0===u?void 0:u.hits;if(!p){c("Error: No 'hits' field in response")}a(p?(e=>{const t=e.sort(((e,t)=>(t.total||0)-(e.total||0))),n=[],r=t.slice(5).reduce(h,{fields:{},timestamps:[],values:[],total:0});r.total&&n.push(r);const o=t.slice(0,5);return o.length&&n.push(...o),n})(p):[])}catch(Id){Id instanceof Error&&"AbortError"!==Id.name&&(c(String(Id)),console.error(Id),a([]))}l((e=>({...e,[o]:!1})))}),[d,n,r]);return{logHits:o,isLoading:Object.values(i).some((e=>e)),error:s,fetchLogHits:p,abortController:u.current}},iu=Number(We("LOGS_LIMIT")),lu=isNaN(iu)?50:iu,su=()=>{const{serverUrl:e}=gt(),{duration:n,relativeTime:r,period:o}=Gt(),{setSearchParamsFromKeys:a}=Rr(),[i]=je(),l=(0,t.useMemo)((()=>i.get("hide_chart")),[i]),[s,c]=Lr(lu,"limit"),[u,d]=Lr("*","query"),[h,p]=(0,t.useState)(!1),[f,m]=(0,t.useState)(o),[_,g]=(0,t.useState)(""),{logs:v,isLoading:y,error:b,fetchLogs:w,abortController:k}=_a(e,u,s),{fetchLogHits:x,...S}=au(e,u),C=(0,t.useCallback)((()=>{const e=Ft.find((e=>e.id===r));if(!e)return o;const{duration:t,until:n}=e;return Ot(t,n())}),[o,r]),A=()=>{if(!u)return void g(rt.validQuery);g("");const e=C();m(e),w(e).then((t=>{t&&!l&&x(e)})).catch((e=>e)),a({query:u,"g0.range_input":n,"g0.end_input":e.date,"g0.relative_time":r||"none"})};return(0,t.useEffect)((()=>{u&&A()}),[o]),(0,t.useEffect)((()=>{h&&(A(),p(!1))}),[u,h]),(0,t.useEffect)((()=>{!l&&x(f)}),[l]),mt("div",{className:"vm-explore-logs",children:[mt(Da,{query:u,error:_,limit:s,onChange:d,onChangeLimit:e=>{c(e),a({limit:e}),Ye("LOGS_LIMIT",`${e}`)},onRun:()=>{y||S.isLoading?(k.abort&&k.abort(),S.abortController.abort&&S.abortController.abort()):A()},isLoading:y||S.isLoading}),b&&mt(kr,{variant:"error",children:b}),!b&&mt(ou,{...S,query:u,period:f,onApplyFilter:e=>{d((t=>`_stream: ${"other"===e?"{}":e} AND (${t})`)),p(!0)}}),mt(ma,{data:v,isLoading:y})]})},cu={home:"/",metrics:"/metrics",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries",trace:"/trace",withTemplate:"/expand-with-exprs",relabel:"/relabeling",logs:"/logs",activeQueries:"/active-queries",queryAnalyzer:"/query-analyzer",icons:"/icons",anomaly:"/anomaly",query:"/query",downsamplingDebug:"/downsampling-filters-debug",retentionDebug:"/retention-filters-debug"},{REACT_APP_TYPE:uu}={REACT_APP_TYPE:"logs"},du=uu===Ue.logs,hu={header:{tenant:!0,stepControl:!du,timeSelector:!du,executionControls:!du}},pu={[cu.home]:{title:"Query",...hu},[cu.metrics]:{title:"Explore Prometheus metrics",header:{tenant:!0,stepControl:!0,timeSelector:!0}},[cu.cardinality]:{title:"Explore cardinality",header:{tenant:!0,cardinalityDatePicker:!0}},[cu.topQueries]:{title:"Top queries",header:{tenant:!0}},[cu.trace]:{title:"Trace analyzer",header:{}},[cu.queryAnalyzer]:{title:"Query analyzer",header:{}},[cu.dashboards]:{title:"Dashboards",...hu},[cu.withTemplate]:{title:"WITH templates",header:{}},[cu.relabel]:{title:"Metric relabel debug",header:{}},[cu.logs]:{title:"Logs Explorer",header:{}},[cu.activeQueries]:{title:"Active Queries",header:{}},[cu.icons]:{title:"Icons",header:{}},[cu.anomaly]:{title:"Anomaly exploration",...hu},[cu.query]:{title:"Query",...hu},[cu.downsamplingDebug]:{title:"Downsampling filters debug",header:{}},[cu.retentionDebug]:{title:"Retention filters debug",header:{}}},fu=cu;let mu=function(e){return e[e.internalLink=0]="internalLink",e[e.externalLink=1]="externalLink",e}({});const _u=(e,t)=>({label:"Alerts",value:!!Be(e)?`${e}/vmalert`:e.replace(/\/prometheus$/,"/vmalert"),type:mu.externalLink,hide:!t}),gu=e=>[{value:fu.trace},{value:fu.queryAnalyzer},{value:fu.withTemplate},{value:fu.relabel},{value:fu.downsamplingDebug,hide:!e},{value:fu.retentionDebug,hide:!e}],vu=e=>{let{activeMenu:t,label:n,value:r,type:o,color:a}=e;return o===mu.externalLink?mt("a",{className:Qn()({"vm-header-nav-item":!0,"vm-header-nav-item_active":t===r}),style:{color:a},href:r,target:"_blank",rel:"noreferrer",children:n}):mt(Le,{className:Qn()({"vm-header-nav-item":!0,"vm-header-nav-item_active":t===r}),style:{color:a},to:r,children:n})},yu=e=>{let{activeMenu:n,label:r,color:o,background:a,submenu:i,direction:l}=e;const{pathname:s}=ne(),[c,u]=(0,t.useState)(null),d=(0,t.useRef)(null),{value:h,setFalse:p,setTrue:f}=Fr(!1),m=()=>{c&&clearTimeout(c);const e=setTimeout(p,300);u(e)};return(0,t.useEffect)((()=>{p()}),[s]),"column"===l?mt(pt.FK,{children:i.map((e=>mt(vu,{activeMenu:n,value:e.value||"",label:e.label||"",type:e.type||mu.internalLink},e.value)))}):mt("div",{className:Qn()({"vm-header-nav-item":!0,"vm-header-nav-item_sub":!0,"vm-header-nav-item_open":h,"vm-header-nav-item_active":i.find((e=>e.value===n))}),style:{color:o},onMouseEnter:()=>{f(),c&&clearTimeout(c)},onMouseLeave:m,ref:d,children:[r,mt(kn,{}),mt(Xr,{open:h,placement:"bottom-left",offset:{top:12,left:0},onClose:p,buttonRef:d,children:mt("div",{className:"vm-header-nav-item-submenu",style:{background:a},onMouseLeave:m,onMouseEnter:()=>{c&&clearTimeout(c)},children:i.map((e=>mt(vu,{activeMenu:n,value:e.value||"",label:e.label||"",color:o,type:e.type||mu.internalLink},e.value)))})})]})},bu=e=>e.filter((e=>!e.hide)).map((e=>{const t={...e};var n;t.value&&!t.label&&(t.label=(null===(n=pu[t.value])||void 0===n?void 0:n.title)||(e=>{try{return e.replace(/^\/+/,"").replace(/-/g," ").trim().replace(/^\w/,(e=>e.toUpperCase()))}catch(Id){return e}})(t.value));return t.submenu&&t.submenu.length>0&&(t.submenu=bu(t.submenu)),t})),wu=()=>{var e;const n=He(),{dashboardsSettings:r}=(0,t.useContext)(pr).state,{serverUrl:o,flags:a,appConfig:i}=gt(),l="enterprise"===(null===(e=i.license)||void 0===e?void 0:e.type),s=Boolean(a["vmalert.proxyURL"]),c=Boolean(!n&&r.length),u=(0,t.useMemo)((()=>({serverUrl:o,isEnterpriseLicense:l,showAlertLink:s,showPredefinedDashboards:c})),[o,l,s,c]),d=(0,t.useMemo)((()=>{switch("logs"){case Ue.logs:return[{label:pu[fu.logs].title,value:fu.home}];case Ue.anomaly:return[{label:pu[fu.anomaly].title,value:fu.home}];default:return(e=>{let{serverUrl:t,isEnterpriseLicense:n,showPredefinedDashboards:r,showAlertLink:o}=e;return[{value:fu.home},{label:"Explore",submenu:[{value:fu.metrics},{value:fu.cardinality},{value:fu.topQueries},{value:fu.activeQueries}]},{label:"Tools",submenu:gu(n)},{value:fu.dashboards,hide:!r},_u(t,o)]})(u)}}),[u]);return bu(d)},ku=e=>{let{color:n,background:r,direction:o}=e;const{pathname:a}=ne(),[i,l]=(0,t.useState)(a),s=wu();return(0,t.useEffect)((()=>{l(a)}),[a]),mt("nav",{className:Qn()({"vm-header-nav":!0,[`vm-header-nav_${o}`]:o}),children:s.map((e=>e.submenu?mt(yu,{activeMenu:i,label:e.label||"",submenu:e.submenu,color:n,background:r,direction:o},e.label):mt(vu,{activeMenu:i,value:e.value||"",label:e.label||"",color:n,type:e.type||mu.internalLink},e.value)))})},xu=mt("code",{children:yr()?"Cmd":"Ctrl"}),Su=[{title:"Zoom in",description:mt(pt.FK,{children:["To zoom in, hold down the ",xu," + ",mt("code",{children:"scroll up"}),", or press the ",mt("code",{children:"+"}),". Also, you can zoom in on a range on the graph by holding down your mouse button and selecting the range."]})},{title:"Zoom out",description:mt(pt.FK,{children:["To zoom out, hold down the ",xu," + ",mt("code",{children:"scroll down"}),", or press the ",mt("code",{children:"-"}),"."]})},{title:"Move horizontal axis",description:mt(pt.FK,{children:["To move the graph, hold down the ",xu," + ",mt("code",{children:"drag"})," the graph to the right or left."]})},{title:"Fixing a tooltip",description:mt(pt.FK,{children:["To fix the tooltip, ",mt("code",{children:"click"})," mouse when it's open. Then, you can drag the fixed tooltip by ",mt("code",{children:"clicking"})," and ",mt("code",{children:"dragging"})," on the ",mt(Ln,{})," icon."]})},{title:"Set a custom range for the vertical axis",description:mt(pt.FK,{children:["To set a custom range for the vertical axis, click on the ",mt(pn,{})," icon located in the upper right corner of the graph, activate the toggle, and set the values."]})}],Cu=[{title:"Show/hide a legend item",description:mt(pt.FK,{children:[mt("code",{children:"click"})," on a legend item to isolate it on the graph.",xu," + ",mt("code",{children:"click"})," on a legend item to remove it from the graph. To revert to the previous state, click again."]})},{title:"Copy label key-value pairs",description:mt(pt.FK,{children:[mt("code",{children:"click"})," on a label key-value pair to save it to the clipboard."]})},{title:"Collapse/Expand the legend group",description:mt(pt.FK,{children:[mt("code",{children:"click"})," on the group name (e.g. ",mt("b",{children:'Query 1: {__name__!=""}'}),") to collapse or expand the legend."]})}],Au=Su.concat(Cu),Eu=()=>{const{value:e,setFalse:t,setTrue:n}=Fr(!1);return mt(pt.FK,{children:[mt(Ir,{title:"Show tips on working with the graph",children:mt(Dr,{variant:"text",color:"gray",startIcon:mt(Fn,{}),onClick:n,ariaLabel:"open the tips"})}),e&&mt(Br,{title:"Tips on working with the graph and the legend",onClose:t,children:mt("div",{className:"fc-graph-tips",children:Au.map((e=>{let{title:t,description:n}=e;return mt("div",{className:"fc-graph-tips-item",children:[mt("h4",{className:"fc-graph-tips-item__action",children:t}),mt("p",{className:"fc-graph-tips-item__description",children:n})]},t)}))})})]})},Mu=mt("code",{children:yr()?"Cmd":"Ctrl"}),Nu=mt(pt.FK,{children:[mt("code",{children:yr()?"Option":"Ctrl"})," + ",mt("code",{children:"Space"})]}),Tu=[{title:"Query",list:[{keys:mt("code",{children:"Enter"}),description:"Run"},{keys:mt(pt.FK,{children:[mt("code",{children:"Shift"})," + ",mt("code",{children:"Enter"})]}),description:"Multi-line queries"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"Arrow Up"})]}),description:"Previous command from the Query history"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"Arrow Down"})]}),description:"Next command from the Query history"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"click"})," by ",mt(Pn,{})]}),description:"Toggle multiple queries"},{keys:Nu,description:"Show quick autocomplete tips"}]},{title:"Graph",readMore:mt(Eu,{}),list:[{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"scroll Up"})," or ",mt("code",{children:"+"})]}),description:"Zoom in"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"scroll Down"})," or ",mt("code",{children:"-"})]}),description:"Zoom out"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"drag"})]}),description:"Move the graph left/right"},{keys:mt(pt.FK,{children:mt("code",{children:"click"})}),description:"Select the series in the legend"},{keys:mt(pt.FK,{children:[Mu," + ",mt("code",{children:"click"})]}),description:"Toggle multiple series in the legend"}]}],$u="Shortcut keys",Pu=yr(),Du=Pu?"Cmd + /":"F1",Ou=e=>{let{showTitle:n}=e;const r=He(),{value:o,setTrue:a,setFalse:i}=Fr(!1),l=(0,t.useCallback)((e=>{const t=Pu&&"/"===e.key&&e.metaKey,n=!Pu&&"F1"===e.key&&!e.metaKey;(t||n)&&a()}),[a]);return er("keydown",l),mt(pt.FK,{children:[mt(Ir,{open:!0!==n&&void 0,title:`${$u} (${Du})`,placement:"bottom-center",children:mt(Dr,{className:r?"":"vm-header-button",variant:"contained",color:"primary",startIcon:mt(An,{}),onClick:a,ariaLabel:$u,children:n&&$u})}),o&&mt(Br,{title:"Shortcut keys",onClose:i,children:mt("div",{className:"vm-shortcuts",children:Tu.map((e=>mt("div",{className:"vm-shortcuts-section",children:[e.readMore&&mt("div",{className:"vm-shortcuts-section__read-more",children:e.readMore}),mt("h3",{className:"vm-shortcuts-section__title",children:e.title}),mt("div",{className:"vm-shortcuts-section-list",children:e.list.map(((t,n)=>mt("div",{className:"vm-shortcuts-section-list-item",children:[mt("div",{className:"vm-shortcuts-section-list-item__key",children:t.keys}),mt("p",{className:"vm-shortcuts-section-list-item__description",children:t.description})]},`${e.title}_${n}`)))})]},e.title)))})})]})},Lu=e=>{let{open:t}=e;return mt("button",{className:Qn()({"vm-menu-burger":!0,"vm-menu-burger_opened":t}),"aria-label":"menu",children:mt("span",{})})},{REACT_APP_TYPE:Ru}={REACT_APP_TYPE:"logs"},zu=Ru===Ue.logs,Iu=e=>{let{background:n,color:r}=e;const{pathname:o}=ne(),{isMobile:a}=br(),i=(0,t.useRef)(null),{value:l,toggle:s,setFalse:c}=Fr(!1);return(0,t.useEffect)(c,[o]),Jr(i,c),mt("div",{className:"vm-header-sidebar",ref:i,children:[mt("div",{className:Qn()({"vm-header-sidebar-button":!0,"vm-header-sidebar-button_open":l}),onClick:s,children:mt(Lu,{open:l})}),mt("div",{className:Qn()({"vm-header-sidebar-menu":!0,"vm-header-sidebar-menu_open":l}),children:[mt("div",{children:mt(ku,{color:r,background:n,direction:"column"})}),mt("div",{className:"vm-header-sidebar-menu-settings",children:!a&&!zu&&mt(Ou,{showTitle:!0})})]})]})},ju=e=>{let{controlsComponent:n,isMobile:r,...o}=e;const a=He(),{pathname:i}=ne(),{accountIds:l}=(()=>{const{useTenantID:e}=Fe(),n=He(),{serverUrl:r}=gt(),[o,a]=(0,t.useState)(!1),[i,l]=(0,t.useState)(),[s,c]=(0,t.useState)([]),u=(0,t.useMemo)((()=>`${r.replace(/^(.+)(\/select.+)/,"$1")}/admin/tenants`),[r]),d=(0,t.useMemo)((()=>!!Be(r)),[r]),h=n?!e:!d;return(0,t.useEffect)((()=>{h||(async()=>{a(!0);try{const e=await fetch(u),t=await e.json(),n=t.data||[];c(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?l(void 0):l(`${t.errorType}\r\n${null===t||void 0===t?void 0:t.error}`)}catch(Id){Id instanceof Error&&l(`${Id.name}: ${Id.message}`)}a(!1)})().catch(console.error)}),[u]),{accountIds:s,isLoading:o,error:i}})(),{value:s,toggle:c,setFalse:u}=Fr(!1),d=mt(n,{...o,isMobile:r,accountIds:l,headerSetup:(0,t.useMemo)((()=>(pu[i]||{}).header||{}),[i])});return r?mt(pt.FK,{children:[mt("div",{children:mt(Dr,{className:Qn()({"vm-header-button":!a}),startIcon:mt(jn,{}),onClick:c,ariaLabel:"controls"})}),mt(Br,{title:"Controls",onClose:u,isOpen:s,className:Qn()({"vm-header-controls-modal":!0,"vm-header-controls-modal_open":s}),children:d})]}):d},{REACT_APP_TYPE:Fu}={REACT_APP_TYPE:"logs"},Hu=Fu===Ue.logs||Fu===Ue.anomaly,Vu=()=>{switch(Fu){case Ue.logs:return mt(un,{});case Ue.anomaly:return mt(dn,{});default:return mt(cn,{})}},Bu=e=>{let{controlsComponent:n}=e;const{isMobile:r}=br(),o=tr(),a=(0,t.useMemo)((()=>window.innerWidth<1e3),[o]),{isDarkTheme:i}=gt(),l=He(),s=(0,t.useMemo)((()=>it(i?"color-background-block":"color-primary")),[i]),{background:c,color:u}=(0,t.useMemo)((()=>{const{headerStyles:{background:e=(l?"#FFF":s),color:t=(l?s:"#FFF")}={}}=Fe();return{background:e,color:t}}),[s]),d=oe(),h=()=>{d({pathname:fu.home}),window.location.reload()};return mt("header",{className:Qn()({"vm-header":!0,"vm-header_app":l,"vm-header_dark":i,"vm-header_sidebar":a,"vm-header_mobile":r}),style:{background:c,color:u},children:[a?mt(Iu,{background:c,color:u}):mt(pt.FK,{children:[!l&&mt("div",{className:Qn()({"vm-header-logo":!0,"vm-header-logo_logs":Hu}),onClick:h,style:{color:u},children:mt(Vu,{})}),mt(ku,{color:u,background:c})]}),a&&mt("div",{className:Qn()({"vm-header-logo":!0,"vm-header-logo_mobile":!0,"vm-header-logo_logs":Hu}),onClick:h,style:{color:u},children:mt(Vu,{})}),mt(ju,{controlsComponent:n,displaySidebar:a,isMobile:r})]})},Uu={href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new/choose",Icon:()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z"})}),title:"Create an issue"},Yu=[{href:"https://docs.victoriametrics.com/MetricsQL.html",Icon:Tn,title:"MetricsQL"},{href:"https://docs.victoriametrics.com/#vmui",Icon:Rn,title:"Documentation"},Uu],Wu=[{href:"https://docs.victoriametrics.com/victorialogs/logsql/",Icon:Tn,title:"LogsQL"},{href:"https://docs.victoriametrics.com/victorialogs/",Icon:Rn,title:"Documentation"},Uu],qu=(0,t.memo)((e=>{let{links:t=Yu}=e;const n=`2019-${(new Date).getFullYear()}`;return mt("footer",{className:"vm-footer",children:[mt("a",{className:"vm-link vm-footer__website",target:"_blank",href:"https://victoriametrics.com/",rel:"me noreferrer",children:[mt(hn,{}),"victoriametrics.com"]}),t.map((e=>{let{href:t,Icon:n,title:r}=e;return mt("a",{className:"vm-link vm-footer__link",target:"_blank",href:t,rel:"help noreferrer",children:[mt(n,{}),r]},`${t}-${r}`)})),mt("div",{className:"vm-footer__copyright",children:["\xa9 ",n," VictoriaMetrics"]})]})})),Ku=qu,Zu="Enable to save the modified server URL to local storage, preventing reset upon page refresh.",Gu="Disable to stop saving the server URL to local storage, reverting to the default URL on page refresh.",Qu=(0,t.forwardRef)(((e,n)=>{let{onClose:r}=e;const{serverUrl:o}=gt(),a=vt(),{value:i,toggle:l}=Fr(!!We("SERVER_URL")),[s,c]=(0,t.useState)(o),[u,d]=(0,t.useState)(""),h=(0,t.useCallback)((()=>{const e=Be(s);""!==e&&a({type:"SET_TENANT_ID",payload:e}),a({type:"SET_SERVER",payload:s}),r()}),[s]);return(0,t.useEffect)((()=>{o||d(rt.emptyServer),(e=>{let t;try{t=new URL(e)}catch(n){return!1}return"http:"===t.protocol||"https:"===t.protocol})(o)||d(rt.validServer)}),[o]),(0,t.useEffect)((()=>{i?Ye("SERVER_URL",s):qe(["SERVER_URL"])}),[i]),(0,t.useEffect)((()=>{i&&Ye("SERVER_URL",s)}),[s]),(0,t.useEffect)((()=>{o!==s&&c(o)}),[o]),(0,t.useImperativeHandle)(n,(()=>({handleApply:h})),[h]),mt("div",{children:[mt("div",{className:"vm-server-configurator__title",children:"Server URL"}),mt("div",{className:"vm-server-configurator-url",children:[mt(Vr,{autofocus:!0,value:s,error:u,onChange:e=>{c(e||""),d("")},onEnter:h,inputmode:"url"}),mt(Ir,{title:i?Gu:Zu,children:mt(Dr,{className:"vm-server-configurator-url__button",variant:"text",color:i?"primary":"gray",onClick:l,startIcon:mt(In,{})})})]})]})})),Ju=[{label:"Graph",type:nt.chart},{label:"JSON",type:nt.code},{label:"Table",type:nt.table}],Xu=(0,t.forwardRef)(((e,n)=>{let{onClose:r}=e;const{isMobile:o}=br(),{seriesLimits:a}=(0,t.useContext)(lr).state,i=(0,t.useContext)(lr).dispatch,[l,s]=(0,t.useState)(a),[c,u]=(0,t.useState)({table:"",chart:"",code:""}),d=(0,t.useCallback)((()=>{i({type:"SET_SERIES_LIMITS",payload:l}),r()}),[l]);return(0,t.useImperativeHandle)(n,(()=>({handleApply:d})),[d]),mt("div",{className:"vm-limits-configurator",children:[mt("div",{className:"vm-server-configurator__title",children:["Series limits by tabs",mt(Ir,{title:"Set to 0 to disable the limit",children:mt(Dr,{variant:"text",color:"primary",size:"small",startIcon:mt(_n,{})})}),mt("div",{className:"vm-limits-configurator-title__reset",children:mt(Dr,{variant:"text",color:"primary",size:"small",startIcon:mt(mn,{}),onClick:()=>{s(Xe)},children:"Reset limits"})})]}),mt("div",{className:Qn()({"vm-limits-configurator__inputs":!0,"vm-limits-configurator__inputs_mobile":o}),children:Ju.map((e=>{return mt("div",{children:mt(Vr,{label:e.label,value:l[e.type],error:c[e.type],onChange:(t=e.type,e=>{const n=e||"";u((e=>({...e,[t]:+n<0?rt.positiveNumber:""}))),s({...l,[t]:n||1/0})}),onEnter:d,type:"number"})},e.type);var t}))})]})})),ed=Xu,td=()=>mt(Ir,{title:"Browser timezone is not recognized, supported, or could not be determined.",children:mt(gn,{})}),nd=Yt(),rd=(0,t.forwardRef)(((e,n)=>{const{isMobile:r}=br(),o=Bt(),{timezone:a,defaultTimezone:i}=Gt(),l=Qt(),[s,c]=(0,t.useState)(a),[u,d]=(0,t.useState)(""),h=(0,t.useRef)(null),{value:p,toggle:f,setFalse:m}=Fr(!1),_=(0,t.useMemo)((()=>[{title:`Default time (${i})`,region:i,utc:i?Vt(i):"UTC"},{title:nd.title,region:nd.region,utc:Vt(nd.region),isInvalid:!nd.isValid},{title:"UTC (Coordinated Universal Time)",region:"UTC",utc:"UTC"}].filter((e=>e.region))),[i]),g=(0,t.useMemo)((()=>{if(!u)return o;try{return Bt(u)}catch(Id){return{}}}),[u,o]),v=(0,t.useMemo)((()=>Object.keys(g)),[g]),y=(0,t.useMemo)((()=>({region:s,utc:Vt(s)})),[s]),b=e=>()=>{(e=>{c(e.region),d(""),m()})(e)};return(0,t.useEffect)((()=>{c(a)}),[a]),(0,t.useImperativeHandle)(n,(()=>({handleApply:()=>{l({type:"SET_TIMEZONE",payload:s})}})),[s]),mt("div",{className:"vm-timezones",children:[mt("div",{className:"vm-server-configurator__title",children:"Time zone"}),mt("div",{className:"vm-timezones-item vm-timezones-item_selected",onClick:f,ref:h,children:[mt("div",{className:"vm-timezones-item__title",children:y.region}),mt("div",{className:"vm-timezones-item__utc",children:y.utc}),mt("div",{className:Qn()({"vm-timezones-item__icon":!0,"vm-timezones-item__icon_open":p}),children:mt(kn,{})})]}),mt(Xr,{open:p,buttonRef:h,placement:"bottom-left",onClose:m,fullWidth:!0,title:r?"Time zone":void 0,children:mt("div",{className:Qn()({"vm-timezones-list":!0,"vm-timezones-list_mobile":r}),children:[mt("div",{className:"vm-timezones-list-header",children:[mt("div",{className:"vm-timezones-list-header__search",children:mt(Vr,{autofocus:!0,label:"Search",value:u,onChange:e=>{d(e)}})}),_.map(((e,t)=>e&&mt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[mt("div",{className:"vm-timezones-item__title",children:[e.title,e.isInvalid&&mt(td,{})]}),mt("div",{className:"vm-timezones-item__utc",children:e.utc})]},`${t}_${e.region}`)))]}),v.map((e=>mt("div",{className:"vm-timezones-list-group",children:mt(Gr,{defaultExpanded:!0,title:mt("div",{className:"vm-timezones-list-group__title",children:e}),children:mt("div",{className:"vm-timezones-list-group-options",children:g[e]&&g[e].map((e=>mt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[mt("div",{className:"vm-timezones-item__title",children:e.region}),mt("div",{className:"vm-timezones-item__utc",children:e.utc})]},e.search)))})})},e)))]})})]})})),od=rd,ad=e=>{let{options:n,value:r,label:o,onChange:a}=e;const i=(0,t.useRef)(null),[l,s]=(0,t.useState)({width:"0px",left:"0px",borderRadius:"0px"}),c=e=>()=>{a(e)};return(0,t.useEffect)((()=>{if(!i.current)return void s({width:"0px",left:"0px",borderRadius:"0px"});const e=n.findIndex((e=>e.value===r)),{width:t}=i.current.getBoundingClientRect();let o=t,a=e*o,l="0";0===e&&(l="16px 0 0 16px"),e===n.length-1&&(l="10px",a-=1,l="0 16px 16px 0"),0!==e&&e!==n.length-1&&(o+=1,a-=1),s({width:`${o}px`,left:`${a}px`,borderRadius:l})}),[i,r,n]),mt("div",{className:"vm-toggles",children:[o&&mt("label",{className:"vm-toggles__label",children:o}),mt("div",{className:"vm-toggles-group",style:{gridTemplateColumns:`repeat(${n.length}, 1fr)`},children:[l.borderRadius&&mt("div",{className:"vm-toggles-group__highlight",style:l}),n.map(((e,t)=>mt("div",{className:Qn()({"vm-toggles-group-item":!0,"vm-toggles-group-item_first":0===t,"vm-toggles-group-item_active":e.value===r,"vm-toggles-group-item_icon":e.icon&&e.title}),onClick:c(e.value),ref:e.value===r?i:null,children:[e.icon,e.title]},e.value)))]})]})},id=Object.values(ot).map((e=>({title:e,value:e}))),ld=()=>{const{isMobile:e}=br(),t=vt(),{theme:n}=gt();return mt("div",{className:Qn()({"vm-theme-control":!0,"vm-theme-control_mobile":e}),children:[mt("div",{className:"vm-server-configurator__title",children:"Theme preferences"}),mt("div",{className:"vm-theme-control__toggle",children:mt(ad,{options:id,value:n,onChange:e=>{t({type:"SET_THEME",payload:e})}})},`${e}`)]})},sd=()=>{const{isMobile:e}=br(),{markdownParsing:n}=gr(),r=(0,t.useContext)(_r).dispatch;return mt("div",{children:[mt("div",{className:"vm-server-configurator__title",children:"Markdown Parsing for Logs"}),mt(jr,{label:n?"Disable markdown parsing":"Enable markdown parsing",value:n,onChange:e=>{r({type:"SET_MARKDOWN_PARSING",payload:e})},fullWidth:e}),mt("div",{className:"vm-server-configurator__info",children:"Toggle this switch to enable or disable the Markdown formatting for log entries. Enabling this will parse log texts to Markdown."})]})},cd="Settings",{REACT_APP_TYPE:ud}={REACT_APP_TYPE:"logs"},dd=ud===Ue.logs,hd=()=>{const{isMobile:e}=br(),n=He(),r=(0,t.useRef)(null),o=(0,t.useRef)(null),a=(0,t.useRef)(null),{value:i,setTrue:l,setFalse:s}=Fr(!1),c=[{show:!n&&!dd,component:mt(Qu,{ref:r,onClose:s})},{show:!dd,component:mt(ed,{ref:o,onClose:s})},{show:dd,component:mt(sd,{})},{show:!0,component:mt(od,{ref:a})},{show:!n,component:mt(ld,{})}].filter((e=>e.show));return mt(pt.FK,{children:[e?mt("div",{className:"vm-mobile-option",onClick:l,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(pn,{})}),mt("div",{className:"vm-mobile-option-text",children:mt("span",{className:"vm-mobile-option-text__label",children:cd})}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Ir,{title:cd,children:mt(Dr,{className:Qn()({"vm-header-button":!n}),variant:"contained",color:"primary",startIcon:mt(pn,{}),onClick:l,ariaLabel:"settings"})}),i&&mt(Br,{title:cd,onClose:s,children:mt("div",{className:Qn()({"vm-server-configurator":!0,"vm-server-configurator_mobile":e}),children:[c.map(((e,t)=>mt("div",{className:"vm-server-configurator__input",children:e.component},t))),mt("div",{className:"vm-server-configurator-footer",children:[mt(Dr,{color:"error",variant:"outlined",onClick:s,children:"Cancel"}),mt(Dr,{color:"primary",variant:"contained",onClick:()=>{r.current&&r.current.handleApply(),o.current&&o.current.handleApply(),a.current&&a.current.handleApply(),s()},children:"Apply"})]})]})})]})},pd=e=>{let{relativeTime:t,setDuration:n}=e;const{isMobile:r}=br();return mt("div",{className:Qn()({"vm-time-duration":!0,"vm-time-duration_mobile":r}),children:Ft.map((e=>{let{id:o,duration:a,until:i,title:l}=e;return mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_mobile":r,"vm-list-item_active":o===t}),onClick:(s={duration:a,until:i(),id:o},()=>{n(s)}),children:l||a},o);var s}))})},fd=e=>{let{viewDate:t,showArrowNav:n,onChangeViewDate:r,toggleDisplayYears:o}=e;return mt("div",{className:"vm-calendar-header",children:[mt("div",{className:"vm-calendar-header-left",onClick:o,children:[mt("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),mt("div",{className:"vm-calendar-header-left__select-year",children:mt(kn,{})})]}),n&&mt("div",{className:"vm-calendar-header-right",children:[mt("div",{className:"vm-calendar-header-right__prev",onClick:()=>{r(t.subtract(1,"month"))},children:mt(wn,{})}),mt("div",{className:"vm-calendar-header-right__next",onClick:()=>{r(t.add(1,"month"))},children:mt(wn,{})})]})]})},md=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],_d=e=>{let{viewDate:n,selectDate:r,onChangeSelectDate:a}=e;const i="YYYY-MM-DD",l=o().tz(),s=o()(n.format(i)),c=(0,t.useMemo)((()=>{const e=new Array(42).fill(null),t=s.startOf("month"),n=s.endOf("month").diff(t,"day")+1,r=new Array(n).fill(t).map(((e,t)=>e.add(t,"day"))),o=t.day();return e.splice(o,n,...r),e}),[s]),u=e=>()=>{e&&a(e)};return mt("div",{className:"vm-calendar-body",children:[md.map((e=>mt(Ir,{title:e,children:mt("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]})},e))),c.map(((e,t)=>mt("div",{className:Qn()({"vm-calendar-body-cell":!0,"vm-calendar-body-cell_day":!0,"vm-calendar-body-cell_day_empty":!e,"vm-calendar-body-cell_day_active":(e&&e.format(i))===r.format(i),"vm-calendar-body-cell_day_today":(e&&e.format(i))===l.format(i)}),onClick:u(e),children:e&&e.format("D")},e?e.format(i):t)))]})},gd=e=>{let{viewDate:n,onChangeViewDate:r}=e;const a=o()().format("YYYY"),i=(0,t.useMemo)((()=>n.format("YYYY")),[n]),l=(0,t.useMemo)((()=>{const e=o()().subtract(9,"year");return new Array(18).fill(e).map(((e,t)=>e.add(t,"year")))}),[n]);(0,t.useEffect)((()=>{const e=document.getElementById(`vm-calendar-year-${i}`);e&&e.scrollIntoView({block:"center"})}),[]);return mt("div",{className:"vm-calendar-years",children:l.map((e=>{return mt("div",{className:Qn()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===i,"vm-calendar-years__year_today":e.format("YYYY")===a}),id:`vm-calendar-year-${e.format("YYYY")}`,onClick:(t=e,()=>{r(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})},vd=e=>{let{viewDate:n,selectDate:r,onChangeViewDate:a}=e;const i=o()().format("MM"),l=(0,t.useMemo)((()=>r.format("MM")),[r]),s=(0,t.useMemo)((()=>new Array(12).fill("").map(((e,t)=>o()(n).month(t)))),[n]);(0,t.useEffect)((()=>{const e=document.getElementById(`vm-calendar-year-${l}`);e&&e.scrollIntoView({block:"center"})}),[]);return mt("div",{className:"vm-calendar-years",children:s.map((e=>{return mt("div",{className:Qn()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("MM")===l,"vm-calendar-years__year_today":e.format("MM")===i}),id:`vm-calendar-year-${e.format("MM")}`,onClick:(t=e,()=>{a(t)}),children:e.format("MMMM")},e.format("MM"));var t}))})};var yd=function(e){return e[e.days=0]="days",e[e.months=1]="months",e[e.years=2]="years",e}(yd||{});const bd=e=>{let{date:n,format:r=wt,onChange:a}=e;const[i,l]=(0,t.useState)(yd.days),[s,c]=(0,t.useState)(o().tz(n)),[u,d]=(0,t.useState)(o().tz(n)),h=o().tz(),p=h.format(bt)===s.format(bt),{isMobile:f}=br(),m=e=>{c(e),l((e=>e===yd.years?yd.months:yd.days))};return(0,t.useEffect)((()=>{u.format()!==o().tz(n).format()&&a(u.format(r))}),[u]),(0,t.useEffect)((()=>{const e=o().tz(n);c(e),d(e)}),[n]),mt("div",{className:Qn()({"vm-calendar":!0,"vm-calendar_mobile":f}),children:[mt(fd,{viewDate:s,onChangeViewDate:m,toggleDisplayYears:()=>{l((e=>e===yd.years?yd.days:yd.years))},showArrowNav:i===yd.days}),i===yd.days&&mt(_d,{viewDate:s,selectDate:u,onChangeSelectDate:e=>{d(e)}}),i===yd.years&&mt(gd,{viewDate:s,onChangeViewDate:m}),i===yd.months&&mt(vd,{selectDate:u,viewDate:s,onChangeViewDate:m}),!p&&i===yd.days&&mt("div",{className:"vm-calendar-footer",children:mt(Dr,{variant:"text",size:"small",onClick:()=>{c(h)},children:"show today"})})]})},wd=(0,t.forwardRef)(((e,n)=>{let{date:r,targetRef:a,format:i=wt,onChange:l,label:s}=e;const c=(0,t.useMemo)((()=>o()(r).isValid()?o().tz(r):o()().tz()),[r]),{isMobile:u}=br(),{value:d,toggle:h,setFalse:p}=Fr(!1);return er("click",h,a),er("keyup",(e=>{"Escape"!==e.key&&"Enter"!==e.key||p()})),mt(pt.FK,{children:mt(Xr,{open:d,buttonRef:a,placement:"bottom-right",onClose:p,title:u?s:void 0,children:mt("div",{ref:n,children:mt(bd,{date:c,format:i,onChange:e=>{l(e),p()}})})})})}));var kd=n(494),xd=n.n(kd);const Sd=e=>o()(e).isValid()?o().tz(e).format(wt):e,Cd=e=>{let{value:n="",label:r,pickerLabel:a,pickerRef:i,onChange:l,onEnter:s}=e;const c=(0,t.useRef)(null),[u,d]=(0,t.useState)(null),[h,p]=(0,t.useState)(Sd(n)),[f,m]=(0,t.useState)(!1),[_,g]=(0,t.useState)(!1),v=o()(h).isValid()?"":"Invalid date format";return(0,t.useEffect)((()=>{const e=Sd(n);e!==h&&p(e),_&&(s(),g(!1))}),[n]),(0,t.useEffect)((()=>{f&&u&&(u.focus(),u.setSelectionRange(11,11),m(!1))}),[f]),mt("div",{className:Qn()({"vm-date-time-input":!0,"vm-date-time-input_error":v}),children:[mt("label",{children:r}),mt(xd(),{tabIndex:1,inputRef:d,mask:"9999-99-99 99:99:99",placeholder:"YYYY-MM-DD HH:mm:ss",value:h,autoCapitalize:"none",inputMode:"numeric",maskChar:null,onChange:e=>{p(e.currentTarget.value)},onBlur:()=>{l(h)},onKeyUp:e=>{"Enter"===e.key&&(l(h),g(!0))}}),v&&mt("span",{className:"vm-date-time-input__error-text",children:v}),mt("div",{className:"vm-date-time-input__icon",ref:c,children:mt(Dr,{variant:"text",color:"gray",size:"small",startIcon:mt(Sn,{}),ariaLabel:"calendar"})}),mt(wd,{label:a,ref:i,date:h,onChange:e=>{p(e),m(!0)},targetRef:c})]})};const Ad=function(e){const n=(0,t.useRef)();return(0,t.useEffect)((()=>{n.current=e}),[e]),n.current},Ed=()=>{const{isMobile:e}=br(),{isDarkTheme:n}=gt(),r=(0,t.useRef)(null),a=tr(),i=(0,t.useMemo)((()=>a.width>1120),[a]),[l,s]=(0,t.useState)(),[c,u]=(0,t.useState)(),{period:{end:d,start:h},relativeTime:p,timezone:f,duration:m}=Gt(),_=Qt(),g=He(),v=Ad(f),{value:y,toggle:b,setFalse:w}=Fr(!1),k=(0,t.useMemo)((()=>({region:f,utc:Vt(f)})),[f]);(0,t.useEffect)((()=>{s(Rt(It(d)))}),[f,d]),(0,t.useEffect)((()=>{u(Rt(It(h)))}),[f,h]);const x=e=>{let{duration:t,until:n,id:r}=e;_({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),w()},S=(0,t.useMemo)((()=>({start:o().tz(It(h)).format(wt),end:o().tz(It(d)).format(wt)})),[h,d,f]),C=(0,t.useMemo)((()=>p&&"none"!==p?p.replace(/_/g," "):`${S.start} - ${S.end}`),[p,S]),A=(0,t.useRef)(null),E=(0,t.useRef)(null),M=(0,t.useRef)(null),N=()=>{c&&l&&_({type:"SET_PERIOD",payload:{from:o().tz(c).toDate(),to:o().tz(l).toDate()}}),w()};return(0,t.useEffect)((()=>{const e=Ht({relativeTimeId:p,defaultDuration:m,defaultEndInput:It(d)});v&&f!==v&&x({id:e.relativeTimeId,duration:e.duration,until:e.endInput})}),[f,v]),Jr(r,(t=>{var n,r;if(e)return;const o=t.target,a=(null===A||void 0===A?void 0:A.current)&&(null===A||void 0===A||null===(n=A.current)||void 0===n?void 0:n.contains(o)),i=(null===E||void 0===E?void 0:E.current)&&(null===E||void 0===E||null===(r=E.current)||void 0===r?void 0:r.contains(o));a||i||w()})),mt(pt.FK,{children:[mt("div",{ref:M,children:e?mt("div",{className:"vm-mobile-option",onClick:b,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(xn,{})}),mt("div",{className:"vm-mobile-option-text",children:[mt("span",{className:"vm-mobile-option-text__label",children:"Time range"}),mt("span",{className:"vm-mobile-option-text__value",children:C})]}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Ir,{title:i?"Time range controls":C,children:mt(Dr,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:mt(xn,{}),onClick:b,ariaLabel:"time range controls",children:i&&mt("span",{children:C})})})}),mt(Xr,{open:y,buttonRef:M,placement:"bottom-right",onClose:w,clickOutside:!1,title:e?"Time range controls":"",children:mt("div",{className:Qn()({"vm-time-selector":!0,"vm-time-selector_mobile":e}),ref:r,children:[mt("div",{className:"vm-time-selector-left",children:[mt("div",{className:Qn()({"vm-time-selector-left-inputs":!0,"vm-time-selector-left-inputs_dark":n}),children:[mt(Cd,{value:c,label:"From:",pickerLabel:"Date From",pickerRef:A,onChange:u,onEnter:N}),mt(Cd,{value:l,label:"To:",pickerLabel:"Date To",pickerRef:E,onChange:s,onEnter:N})]}),mt("div",{className:"vm-time-selector-left-timezone",children:[mt("div",{className:"vm-time-selector-left-timezone__title",children:k.region}),mt("div",{className:"vm-time-selector-left-timezone__utc",children:k.utc})]}),mt(Dr,{variant:"text",startIcon:mt(Cn,{}),onClick:()=>_({type:"RUN_QUERY_TO_NOW"}),children:"switch to now"}),mt("div",{className:"vm-time-selector-left__controls",children:[mt(Dr,{color:"error",variant:"outlined",onClick:()=>{s(Rt(It(d))),u(Rt(It(h))),w()},children:"Cancel"}),mt(Dr,{color:"primary",onClick:N,children:"Apply"})]})]}),mt(pd,{relativeTime:p||"",setDuration:x})]})})]})},Md=()=>{const e=He(),{isMobile:n}=br(),r=Qt(),[o,a]=je(),[i,l]=Lr("0","accountID"),[s,c]=Lr("0","projectID"),u=`${i}:${s}`,d=(0,t.useRef)(null),{value:h,toggle:p,setFalse:f}=Fr(!1);return(0,t.useEffect)((()=>{h||(l(o.get("accountID")||"0"),c(o.get("projectID")||"0"))}),[h]),mt("div",{className:"vm-tenant-input",children:[mt(Ir,{title:"Define Tenant ID if you need request to another storage",children:mt("div",{ref:d,children:n?mt("div",{className:"vm-mobile-option",onClick:p,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(In,{})}),mt("div",{className:"vm-mobile-option-text",children:[mt("span",{className:"vm-mobile-option-text__label",children:"Tenant ID"}),mt("span",{className:"vm-mobile-option-text__value",children:u})]}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Dr,{className:e?"":"vm-header-button",variant:"contained",color:"primary",fullWidth:!0,startIcon:mt(In,{}),endIcon:mt("div",{className:Qn()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":h}),children:mt(wn,{})}),onClick:p,children:u})})}),mt(Xr,{open:h,placement:"bottom-right",onClose:f,buttonRef:d,title:n?"Define Tenant ID":void 0,children:mt("div",{className:Qn()({"vm-list vm-tenant-input-list":!0,"vm-list vm-tenant-input-list_mobile":n,"vm-tenant-input-list_inline":!0}),children:[mt(Vr,{autofocus:!0,label:"accountID",value:i,onChange:l,type:"number"}),mt(Vr,{autofocus:!0,label:"projectID",value:s,onChange:c,type:"number"}),mt("div",{className:"vm-tenant-input-list__buttons",children:[mt(Ir,{title:"Multitenancy in VictoriaLogs documentation",children:mt("a",{href:"https://docs.victoriametrics.com/victorialogs/#multitenancy",target:"_blank",rel:"help noreferrer",children:mt(Dr,{variant:"text",color:"gray",startIcon:mt(zn,{})})})}),mt(Dr,{variant:"contained",color:"primary",onClick:()=>{o.set("accountID",i),o.set("projectID",s),a(o),f(),r({type:"RUN_QUERY"})},children:"Apply"})]})]})})]})},Nd=[{seconds:0,title:"Off"},{seconds:1,title:"1s"},{seconds:2,title:"2s"},{seconds:5,title:"5s"},{seconds:10,title:"10s"},{seconds:30,title:"30s"},{seconds:60,title:"1m"},{seconds:300,title:"5m"},{seconds:900,title:"15m"},{seconds:1800,title:"30m"},{seconds:3600,title:"1h"},{seconds:7200,title:"2h"}],Td=()=>{const{isMobile:e}=br(),n=Qt(),r=He(),[o,a]=(0,t.useState)(!1),[i,l]=(0,t.useState)(Nd[0]),{value:s,toggle:c,setFalse:u}=Fr(!1),d=(0,t.useRef)(null);(0,t.useEffect)((()=>{const e=i.seconds;let t;return o?t=setInterval((()=>{n({type:"RUN_QUERY"})}),1e3*e):l(Nd[0]),()=>{t&&clearInterval(t)}}),[i,o]);const h=e=>()=>{(e=>{(o&&!e.seconds||!o&&e.seconds)&&a((e=>!e)),l(e),u()})(e)};return mt(pt.FK,{children:[mt("div",{className:"vm-execution-controls",children:mt("div",{className:Qn()({"vm-execution-controls-buttons":!0,"vm-execution-controls-buttons_mobile":e,"vm-header-button":!r}),children:[!e&&mt(Ir,{title:"Refresh dashboard",children:mt(Dr,{variant:"contained",color:"primary",onClick:()=>{n({type:"RUN_QUERY"})},startIcon:mt(bn,{}),ariaLabel:"refresh dashboard"})}),e?mt("div",{className:"vm-mobile-option",onClick:c,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(mn,{})}),mt("div",{className:"vm-mobile-option-text",children:[mt("span",{className:"vm-mobile-option-text__label",children:"Auto-refresh"}),mt("span",{className:"vm-mobile-option-text__value",children:i.title})]}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Ir,{title:"Auto-refresh control",children:mt("div",{ref:d,children:mt(Dr,{variant:"contained",color:"primary",fullWidth:!0,endIcon:mt("div",{className:Qn()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":s}),children:mt(wn,{})}),onClick:c,children:i.title})})})]})}),mt(Xr,{open:s,placement:"bottom-right",onClose:u,buttonRef:d,title:e?"Auto-refresh duration":void 0,children:mt("div",{className:Qn()({"vm-execution-controls-list":!0,"vm-execution-controls-list_mobile":e}),children:Nd.map((t=>mt("div",{className:Qn()({"vm-list-item":!0,"vm-list-item_mobile":e,"vm-list-item_active":t.seconds===i.seconds}),onClick:h(t),children:t.title},t.seconds)))})})]})},$d=e=>{let{isMobile:t}=e;return mt("div",{className:Qn()({"vm-header-controls":!0,"vm-header-controls_mobile":t}),children:[mt(Md,{}),mt(Ed,{}),mt(Td,{}),mt(hd,{})]})},Pd=(Boolean(We("DISABLED_DEFAULT_TIMEZONE")),()=>{const{serverUrl:e}=gt(),[n,r]=(Qt(),(0,t.useState)(!1)),[o,a]=(0,t.useState)(""),i=async()=>{};return(0,t.useEffect)((()=>{i()}),[e]),{isLoading:n,error:o}}),Dd=()=>{const e=He(),{isMobile:n}=br(),{pathname:r}=ne();Pd();return(0,t.useEffect)((()=>{var e;const t="vmui for VictoriaLogs",n=null===(e=pu[fu.logs])||void 0===e?void 0:e.title;document.title=n?`${n} - ${t}`:t}),[r]),mt("section",{className:"vm-container",children:[mt(Bu,{controlsComponent:$d}),mt("div",{className:Qn()({"vm-container-body":!0,"vm-container-body_mobile":n,"vm-container-body_app":e}),children:mt(ye,{})}),!e&&mt(Ku,{links:Wu})]})},Od={unicode:!1,renderer:void 0};da.use(function(e){if(!(e={...Od,...e}).emojis)throw new Error("Must provide emojis to markedEmoji");const t=Object.keys(e.emojis).map((e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))).join("|"),n=new RegExp(`:(${t}):`),r=new RegExp(`^${n.source}`);return{extensions:[{name:"emoji",level:"inline",start:e=>e.match(n)?.index,tokenizer(t,n){const o=r.exec(t);if(!o)return;const a=o[1];let i=e.emojis[a],l=e.renderer?void 0:e.unicode;if("string"!==typeof i&&!e.renderer)if("string"===typeof i.char)i=i.char,l=!0;else{if("string"!==typeof i.url)return;i=i.url,l=!1}return{type:"emoji",raw:o[0],name:a,emoji:i,unicode:l}},renderer:t=>e.renderer?e.renderer(t):t.unicode?t.emoji:`${t.name}`}]}}({emojis:{100:"\ud83d\udcaf",1234:"\ud83d\udd22",grinning:"\ud83d\ude00",smiley:"\ud83d\ude03",smile:"\ud83d\ude04",grin:"\ud83d\ude01",laughing:"\ud83d\ude06",satisfied:"\ud83d\ude06",sweat_smile:"\ud83d\ude05",rofl:"\ud83e\udd23",joy:"\ud83d\ude02",slightly_smiling_face:"\ud83d\ude42",upside_down_face:"\ud83d\ude43",melting_face:"\ud83e\udee0",wink:"\ud83d\ude09",blush:"\ud83d\ude0a",innocent:"\ud83d\ude07",smiling_face_with_three_hearts:"\ud83e\udd70",heart_eyes:"\ud83d\ude0d",star_struck:"\ud83e\udd29",kissing_heart:"\ud83d\ude18",kissing:"\ud83d\ude17",relaxed:"\u263a\ufe0f",kissing_closed_eyes:"\ud83d\ude1a",kissing_smiling_eyes:"\ud83d\ude19",smiling_face_with_tear:"\ud83e\udd72",yum:"\ud83d\ude0b",stuck_out_tongue:"\ud83d\ude1b",stuck_out_tongue_winking_eye:"\ud83d\ude1c",zany_face:"\ud83e\udd2a",stuck_out_tongue_closed_eyes:"\ud83d\ude1d",money_mouth_face:"\ud83e\udd11",hugs:"\ud83e\udd17",hand_over_mouth:"\ud83e\udd2d",face_with_open_eyes_and_hand_over_mouth:"\ud83e\udee2",face_with_peeking_eye:"\ud83e\udee3",shushing_face:"\ud83e\udd2b",thinking:"\ud83e\udd14",saluting_face:"\ud83e\udee1",zipper_mouth_face:"\ud83e\udd10",raised_eyebrow:"\ud83e\udd28",neutral_face:"\ud83d\ude10",expressionless:"\ud83d\ude11",no_mouth:"\ud83d\ude36",dotted_line_face:"\ud83e\udee5",face_in_clouds:"\ud83d\ude36\u200d\ud83c\udf2b\ufe0f",smirk:"\ud83d\ude0f",unamused:"\ud83d\ude12",roll_eyes:"\ud83d\ude44",grimacing:"\ud83d\ude2c",face_exhaling:"\ud83d\ude2e\u200d\ud83d\udca8",lying_face:"\ud83e\udd25",shaking_face:"\ud83e\udee8",relieved:"\ud83d\ude0c",pensive:"\ud83d\ude14",sleepy:"\ud83d\ude2a",drooling_face:"\ud83e\udd24",sleeping:"\ud83d\ude34",mask:"\ud83d\ude37",face_with_thermometer:"\ud83e\udd12",face_with_head_bandage:"\ud83e\udd15",nauseated_face:"\ud83e\udd22",vomiting_face:"\ud83e\udd2e",sneezing_face:"\ud83e\udd27",hot_face:"\ud83e\udd75",cold_face:"\ud83e\udd76",woozy_face:"\ud83e\udd74",dizzy_face:"\ud83d\ude35",face_with_spiral_eyes:"\ud83d\ude35\u200d\ud83d\udcab",exploding_head:"\ud83e\udd2f",cowboy_hat_face:"\ud83e\udd20",partying_face:"\ud83e\udd73",disguised_face:"\ud83e\udd78",sunglasses:"\ud83d\ude0e",nerd_face:"\ud83e\udd13",monocle_face:"\ud83e\uddd0",confused:"\ud83d\ude15",face_with_diagonal_mouth:"\ud83e\udee4",worried:"\ud83d\ude1f",slightly_frowning_face:"\ud83d\ude41",frowning_face:"\u2639\ufe0f",open_mouth:"\ud83d\ude2e",hushed:"\ud83d\ude2f",astonished:"\ud83d\ude32",flushed:"\ud83d\ude33",pleading_face:"\ud83e\udd7a",face_holding_back_tears:"\ud83e\udd79",frowning:"\ud83d\ude26",anguished:"\ud83d\ude27",fearful:"\ud83d\ude28",cold_sweat:"\ud83d\ude30",disappointed_relieved:"\ud83d\ude25",cry:"\ud83d\ude22",sob:"\ud83d\ude2d",scream:"\ud83d\ude31",confounded:"\ud83d\ude16",persevere:"\ud83d\ude23",disappointed:"\ud83d\ude1e",sweat:"\ud83d\ude13",weary:"\ud83d\ude29",tired_face:"\ud83d\ude2b",yawning_face:"\ud83e\udd71",triumph:"\ud83d\ude24",rage:"\ud83d\ude21",pout:"\ud83d\ude21",angry:"\ud83d\ude20",cursing_face:"\ud83e\udd2c",smiling_imp:"\ud83d\ude08",imp:"\ud83d\udc7f",skull:"\ud83d\udc80",skull_and_crossbones:"\u2620\ufe0f",hankey:"\ud83d\udca9",poop:"\ud83d\udca9",shit:"\ud83d\udca9",clown_face:"\ud83e\udd21",japanese_ogre:"\ud83d\udc79",japanese_goblin:"\ud83d\udc7a",ghost:"\ud83d\udc7b",alien:"\ud83d\udc7d",space_invader:"\ud83d\udc7e",robot:"\ud83e\udd16",smiley_cat:"\ud83d\ude3a",smile_cat:"\ud83d\ude38",joy_cat:"\ud83d\ude39",heart_eyes_cat:"\ud83d\ude3b",smirk_cat:"\ud83d\ude3c",kissing_cat:"\ud83d\ude3d",scream_cat:"\ud83d\ude40",crying_cat_face:"\ud83d\ude3f",pouting_cat:"\ud83d\ude3e",see_no_evil:"\ud83d\ude48",hear_no_evil:"\ud83d\ude49",speak_no_evil:"\ud83d\ude4a",love_letter:"\ud83d\udc8c",cupid:"\ud83d\udc98",gift_heart:"\ud83d\udc9d",sparkling_heart:"\ud83d\udc96",heartpulse:"\ud83d\udc97",heartbeat:"\ud83d\udc93",revolving_hearts:"\ud83d\udc9e",two_hearts:"\ud83d\udc95",heart_decoration:"\ud83d\udc9f",heavy_heart_exclamation:"\u2763\ufe0f",broken_heart:"\ud83d\udc94",heart_on_fire:"\u2764\ufe0f\u200d\ud83d\udd25",mending_heart:"\u2764\ufe0f\u200d\ud83e\ude79",heart:"\u2764\ufe0f",pink_heart:"\ud83e\ude77",orange_heart:"\ud83e\udde1",yellow_heart:"\ud83d\udc9b",green_heart:"\ud83d\udc9a",blue_heart:"\ud83d\udc99",light_blue_heart:"\ud83e\ude75",purple_heart:"\ud83d\udc9c",brown_heart:"\ud83e\udd0e",black_heart:"\ud83d\udda4",grey_heart:"\ud83e\ude76",white_heart:"\ud83e\udd0d",kiss:"\ud83d\udc8b",anger:"\ud83d\udca2",boom:"\ud83d\udca5",collision:"\ud83d\udca5",dizzy:"\ud83d\udcab",sweat_drops:"\ud83d\udca6",dash:"\ud83d\udca8",hole:"\ud83d\udd73\ufe0f",speech_balloon:"\ud83d\udcac",eye_speech_bubble:"\ud83d\udc41\ufe0f\u200d\ud83d\udde8\ufe0f",left_speech_bubble:"\ud83d\udde8\ufe0f",right_anger_bubble:"\ud83d\uddef\ufe0f",thought_balloon:"\ud83d\udcad",zzz:"\ud83d\udca4",wave:"\ud83d\udc4b",raised_back_of_hand:"\ud83e\udd1a",raised_hand_with_fingers_splayed:"\ud83d\udd90\ufe0f",hand:"\u270b",raised_hand:"\u270b",vulcan_salute:"\ud83d\udd96",rightwards_hand:"\ud83e\udef1",leftwards_hand:"\ud83e\udef2",palm_down_hand:"\ud83e\udef3",palm_up_hand:"\ud83e\udef4",leftwards_pushing_hand:"\ud83e\udef7",rightwards_pushing_hand:"\ud83e\udef8",ok_hand:"\ud83d\udc4c",pinched_fingers:"\ud83e\udd0c",pinching_hand:"\ud83e\udd0f",v:"\u270c\ufe0f",crossed_fingers:"\ud83e\udd1e",hand_with_index_finger_and_thumb_crossed:"\ud83e\udef0",love_you_gesture:"\ud83e\udd1f",metal:"\ud83e\udd18",call_me_hand:"\ud83e\udd19",point_left:"\ud83d\udc48",point_right:"\ud83d\udc49",point_up_2:"\ud83d\udc46",middle_finger:"\ud83d\udd95",fu:"\ud83d\udd95",point_down:"\ud83d\udc47",point_up:"\u261d\ufe0f",index_pointing_at_the_viewer:"\ud83e\udef5","+1":"\ud83d\udc4d",thumbsup:"\ud83d\udc4d","-1":"\ud83d\udc4e",thumbsdown:"\ud83d\udc4e",fist_raised:"\u270a",fist:"\u270a",fist_oncoming:"\ud83d\udc4a",facepunch:"\ud83d\udc4a",punch:"\ud83d\udc4a",fist_left:"\ud83e\udd1b",fist_right:"\ud83e\udd1c",clap:"\ud83d\udc4f",raised_hands:"\ud83d\ude4c",heart_hands:"\ud83e\udef6",open_hands:"\ud83d\udc50",palms_up_together:"\ud83e\udd32",handshake:"\ud83e\udd1d",pray:"\ud83d\ude4f",writing_hand:"\u270d\ufe0f",nail_care:"\ud83d\udc85",selfie:"\ud83e\udd33",muscle:"\ud83d\udcaa",mechanical_arm:"\ud83e\uddbe",mechanical_leg:"\ud83e\uddbf",leg:"\ud83e\uddb5",foot:"\ud83e\uddb6",ear:"\ud83d\udc42",ear_with_hearing_aid:"\ud83e\uddbb",nose:"\ud83d\udc43",brain:"\ud83e\udde0",anatomical_heart:"\ud83e\udec0",lungs:"\ud83e\udec1",tooth:"\ud83e\uddb7",bone:"\ud83e\uddb4",eyes:"\ud83d\udc40",eye:"\ud83d\udc41\ufe0f",tongue:"\ud83d\udc45",lips:"\ud83d\udc44",biting_lip:"\ud83e\udee6",baby:"\ud83d\udc76",child:"\ud83e\uddd2",boy:"\ud83d\udc66",girl:"\ud83d\udc67",adult:"\ud83e\uddd1",blond_haired_person:"\ud83d\udc71",man:"\ud83d\udc68",bearded_person:"\ud83e\uddd4",man_beard:"\ud83e\uddd4\u200d\u2642\ufe0f",woman_beard:"\ud83e\uddd4\u200d\u2640\ufe0f",red_haired_man:"\ud83d\udc68\u200d\ud83e\uddb0",curly_haired_man:"\ud83d\udc68\u200d\ud83e\uddb1",white_haired_man:"\ud83d\udc68\u200d\ud83e\uddb3",bald_man:"\ud83d\udc68\u200d\ud83e\uddb2",woman:"\ud83d\udc69",red_haired_woman:"\ud83d\udc69\u200d\ud83e\uddb0",person_red_hair:"\ud83e\uddd1\u200d\ud83e\uddb0",curly_haired_woman:"\ud83d\udc69\u200d\ud83e\uddb1",person_curly_hair:"\ud83e\uddd1\u200d\ud83e\uddb1",white_haired_woman:"\ud83d\udc69\u200d\ud83e\uddb3",person_white_hair:"\ud83e\uddd1\u200d\ud83e\uddb3",bald_woman:"\ud83d\udc69\u200d\ud83e\uddb2",person_bald:"\ud83e\uddd1\u200d\ud83e\uddb2",blond_haired_woman:"\ud83d\udc71\u200d\u2640\ufe0f",blonde_woman:"\ud83d\udc71\u200d\u2640\ufe0f",blond_haired_man:"\ud83d\udc71\u200d\u2642\ufe0f",older_adult:"\ud83e\uddd3",older_man:"\ud83d\udc74",older_woman:"\ud83d\udc75",frowning_person:"\ud83d\ude4d",frowning_man:"\ud83d\ude4d\u200d\u2642\ufe0f",frowning_woman:"\ud83d\ude4d\u200d\u2640\ufe0f",pouting_face:"\ud83d\ude4e",pouting_man:"\ud83d\ude4e\u200d\u2642\ufe0f",pouting_woman:"\ud83d\ude4e\u200d\u2640\ufe0f",no_good:"\ud83d\ude45",no_good_man:"\ud83d\ude45\u200d\u2642\ufe0f",ng_man:"\ud83d\ude45\u200d\u2642\ufe0f",no_good_woman:"\ud83d\ude45\u200d\u2640\ufe0f",ng_woman:"\ud83d\ude45\u200d\u2640\ufe0f",ok_person:"\ud83d\ude46",ok_man:"\ud83d\ude46\u200d\u2642\ufe0f",ok_woman:"\ud83d\ude46\u200d\u2640\ufe0f",tipping_hand_person:"\ud83d\udc81",information_desk_person:"\ud83d\udc81",tipping_hand_man:"\ud83d\udc81\u200d\u2642\ufe0f",sassy_man:"\ud83d\udc81\u200d\u2642\ufe0f",tipping_hand_woman:"\ud83d\udc81\u200d\u2640\ufe0f",sassy_woman:"\ud83d\udc81\u200d\u2640\ufe0f",raising_hand:"\ud83d\ude4b",raising_hand_man:"\ud83d\ude4b\u200d\u2642\ufe0f",raising_hand_woman:"\ud83d\ude4b\u200d\u2640\ufe0f",deaf_person:"\ud83e\uddcf",deaf_man:"\ud83e\uddcf\u200d\u2642\ufe0f",deaf_woman:"\ud83e\uddcf\u200d\u2640\ufe0f",bow:"\ud83d\ude47",bowing_man:"\ud83d\ude47\u200d\u2642\ufe0f",bowing_woman:"\ud83d\ude47\u200d\u2640\ufe0f",facepalm:"\ud83e\udd26",man_facepalming:"\ud83e\udd26\u200d\u2642\ufe0f",woman_facepalming:"\ud83e\udd26\u200d\u2640\ufe0f",shrug:"\ud83e\udd37",man_shrugging:"\ud83e\udd37\u200d\u2642\ufe0f",woman_shrugging:"\ud83e\udd37\u200d\u2640\ufe0f",health_worker:"\ud83e\uddd1\u200d\u2695\ufe0f",man_health_worker:"\ud83d\udc68\u200d\u2695\ufe0f",woman_health_worker:"\ud83d\udc69\u200d\u2695\ufe0f",student:"\ud83e\uddd1\u200d\ud83c\udf93",man_student:"\ud83d\udc68\u200d\ud83c\udf93",woman_student:"\ud83d\udc69\u200d\ud83c\udf93",teacher:"\ud83e\uddd1\u200d\ud83c\udfeb",man_teacher:"\ud83d\udc68\u200d\ud83c\udfeb",woman_teacher:"\ud83d\udc69\u200d\ud83c\udfeb",judge:"\ud83e\uddd1\u200d\u2696\ufe0f",man_judge:"\ud83d\udc68\u200d\u2696\ufe0f",woman_judge:"\ud83d\udc69\u200d\u2696\ufe0f",farmer:"\ud83e\uddd1\u200d\ud83c\udf3e",man_farmer:"\ud83d\udc68\u200d\ud83c\udf3e",woman_farmer:"\ud83d\udc69\u200d\ud83c\udf3e",cook:"\ud83e\uddd1\u200d\ud83c\udf73",man_cook:"\ud83d\udc68\u200d\ud83c\udf73",woman_cook:"\ud83d\udc69\u200d\ud83c\udf73",mechanic:"\ud83e\uddd1\u200d\ud83d\udd27",man_mechanic:"\ud83d\udc68\u200d\ud83d\udd27",woman_mechanic:"\ud83d\udc69\u200d\ud83d\udd27",factory_worker:"\ud83e\uddd1\u200d\ud83c\udfed",man_factory_worker:"\ud83d\udc68\u200d\ud83c\udfed",woman_factory_worker:"\ud83d\udc69\u200d\ud83c\udfed",office_worker:"\ud83e\uddd1\u200d\ud83d\udcbc",man_office_worker:"\ud83d\udc68\u200d\ud83d\udcbc",woman_office_worker:"\ud83d\udc69\u200d\ud83d\udcbc",scientist:"\ud83e\uddd1\u200d\ud83d\udd2c",man_scientist:"\ud83d\udc68\u200d\ud83d\udd2c",woman_scientist:"\ud83d\udc69\u200d\ud83d\udd2c",technologist:"\ud83e\uddd1\u200d\ud83d\udcbb",man_technologist:"\ud83d\udc68\u200d\ud83d\udcbb",woman_technologist:"\ud83d\udc69\u200d\ud83d\udcbb",singer:"\ud83e\uddd1\u200d\ud83c\udfa4",man_singer:"\ud83d\udc68\u200d\ud83c\udfa4",woman_singer:"\ud83d\udc69\u200d\ud83c\udfa4",artist:"\ud83e\uddd1\u200d\ud83c\udfa8",man_artist:"\ud83d\udc68\u200d\ud83c\udfa8",woman_artist:"\ud83d\udc69\u200d\ud83c\udfa8",pilot:"\ud83e\uddd1\u200d\u2708\ufe0f",man_pilot:"\ud83d\udc68\u200d\u2708\ufe0f",woman_pilot:"\ud83d\udc69\u200d\u2708\ufe0f",astronaut:"\ud83e\uddd1\u200d\ud83d\ude80",man_astronaut:"\ud83d\udc68\u200d\ud83d\ude80",woman_astronaut:"\ud83d\udc69\u200d\ud83d\ude80",firefighter:"\ud83e\uddd1\u200d\ud83d\ude92",man_firefighter:"\ud83d\udc68\u200d\ud83d\ude92",woman_firefighter:"\ud83d\udc69\u200d\ud83d\ude92",police_officer:"\ud83d\udc6e",cop:"\ud83d\udc6e",policeman:"\ud83d\udc6e\u200d\u2642\ufe0f",policewoman:"\ud83d\udc6e\u200d\u2640\ufe0f",detective:"\ud83d\udd75\ufe0f",male_detective:"\ud83d\udd75\ufe0f\u200d\u2642\ufe0f",female_detective:"\ud83d\udd75\ufe0f\u200d\u2640\ufe0f",guard:"\ud83d\udc82",guardsman:"\ud83d\udc82\u200d\u2642\ufe0f",guardswoman:"\ud83d\udc82\u200d\u2640\ufe0f",ninja:"\ud83e\udd77",construction_worker:"\ud83d\udc77",construction_worker_man:"\ud83d\udc77\u200d\u2642\ufe0f",construction_worker_woman:"\ud83d\udc77\u200d\u2640\ufe0f",person_with_crown:"\ud83e\udec5",prince:"\ud83e\udd34",princess:"\ud83d\udc78",person_with_turban:"\ud83d\udc73",man_with_turban:"\ud83d\udc73\u200d\u2642\ufe0f",woman_with_turban:"\ud83d\udc73\u200d\u2640\ufe0f",man_with_gua_pi_mao:"\ud83d\udc72",woman_with_headscarf:"\ud83e\uddd5",person_in_tuxedo:"\ud83e\udd35",man_in_tuxedo:"\ud83e\udd35\u200d\u2642\ufe0f",woman_in_tuxedo:"\ud83e\udd35\u200d\u2640\ufe0f",person_with_veil:"\ud83d\udc70",man_with_veil:"\ud83d\udc70\u200d\u2642\ufe0f",woman_with_veil:"\ud83d\udc70\u200d\u2640\ufe0f",bride_with_veil:"\ud83d\udc70\u200d\u2640\ufe0f",pregnant_woman:"\ud83e\udd30",pregnant_man:"\ud83e\udec3",pregnant_person:"\ud83e\udec4",breast_feeding:"\ud83e\udd31",woman_feeding_baby:"\ud83d\udc69\u200d\ud83c\udf7c",man_feeding_baby:"\ud83d\udc68\u200d\ud83c\udf7c",person_feeding_baby:"\ud83e\uddd1\u200d\ud83c\udf7c",angel:"\ud83d\udc7c",santa:"\ud83c\udf85",mrs_claus:"\ud83e\udd36",mx_claus:"\ud83e\uddd1\u200d\ud83c\udf84",superhero:"\ud83e\uddb8",superhero_man:"\ud83e\uddb8\u200d\u2642\ufe0f",superhero_woman:"\ud83e\uddb8\u200d\u2640\ufe0f",supervillain:"\ud83e\uddb9",supervillain_man:"\ud83e\uddb9\u200d\u2642\ufe0f",supervillain_woman:"\ud83e\uddb9\u200d\u2640\ufe0f",mage:"\ud83e\uddd9",mage_man:"\ud83e\uddd9\u200d\u2642\ufe0f",mage_woman:"\ud83e\uddd9\u200d\u2640\ufe0f",fairy:"\ud83e\uddda",fairy_man:"\ud83e\uddda\u200d\u2642\ufe0f",fairy_woman:"\ud83e\uddda\u200d\u2640\ufe0f",vampire:"\ud83e\udddb",vampire_man:"\ud83e\udddb\u200d\u2642\ufe0f",vampire_woman:"\ud83e\udddb\u200d\u2640\ufe0f",merperson:"\ud83e\udddc",merman:"\ud83e\udddc\u200d\u2642\ufe0f",mermaid:"\ud83e\udddc\u200d\u2640\ufe0f",elf:"\ud83e\udddd",elf_man:"\ud83e\udddd\u200d\u2642\ufe0f",elf_woman:"\ud83e\udddd\u200d\u2640\ufe0f",genie:"\ud83e\uddde",genie_man:"\ud83e\uddde\u200d\u2642\ufe0f",genie_woman:"\ud83e\uddde\u200d\u2640\ufe0f",zombie:"\ud83e\udddf",zombie_man:"\ud83e\udddf\u200d\u2642\ufe0f",zombie_woman:"\ud83e\udddf\u200d\u2640\ufe0f",troll:"\ud83e\uddcc",massage:"\ud83d\udc86",massage_man:"\ud83d\udc86\u200d\u2642\ufe0f",massage_woman:"\ud83d\udc86\u200d\u2640\ufe0f",haircut:"\ud83d\udc87",haircut_man:"\ud83d\udc87\u200d\u2642\ufe0f",haircut_woman:"\ud83d\udc87\u200d\u2640\ufe0f",walking:"\ud83d\udeb6",walking_man:"\ud83d\udeb6\u200d\u2642\ufe0f",walking_woman:"\ud83d\udeb6\u200d\u2640\ufe0f",standing_person:"\ud83e\uddcd",standing_man:"\ud83e\uddcd\u200d\u2642\ufe0f",standing_woman:"\ud83e\uddcd\u200d\u2640\ufe0f",kneeling_person:"\ud83e\uddce",kneeling_man:"\ud83e\uddce\u200d\u2642\ufe0f",kneeling_woman:"\ud83e\uddce\u200d\u2640\ufe0f",person_with_probing_cane:"\ud83e\uddd1\u200d\ud83e\uddaf",man_with_probing_cane:"\ud83d\udc68\u200d\ud83e\uddaf",woman_with_probing_cane:"\ud83d\udc69\u200d\ud83e\uddaf",person_in_motorized_wheelchair:"\ud83e\uddd1\u200d\ud83e\uddbc",man_in_motorized_wheelchair:"\ud83d\udc68\u200d\ud83e\uddbc",woman_in_motorized_wheelchair:"\ud83d\udc69\u200d\ud83e\uddbc",person_in_manual_wheelchair:"\ud83e\uddd1\u200d\ud83e\uddbd",man_in_manual_wheelchair:"\ud83d\udc68\u200d\ud83e\uddbd",woman_in_manual_wheelchair:"\ud83d\udc69\u200d\ud83e\uddbd",runner:"\ud83c\udfc3",running:"\ud83c\udfc3",running_man:"\ud83c\udfc3\u200d\u2642\ufe0f",running_woman:"\ud83c\udfc3\u200d\u2640\ufe0f",woman_dancing:"\ud83d\udc83",dancer:"\ud83d\udc83",man_dancing:"\ud83d\udd7a",business_suit_levitating:"\ud83d\udd74\ufe0f",dancers:"\ud83d\udc6f",dancing_men:"\ud83d\udc6f\u200d\u2642\ufe0f",dancing_women:"\ud83d\udc6f\u200d\u2640\ufe0f",sauna_person:"\ud83e\uddd6",sauna_man:"\ud83e\uddd6\u200d\u2642\ufe0f",sauna_woman:"\ud83e\uddd6\u200d\u2640\ufe0f",climbing:"\ud83e\uddd7",climbing_man:"\ud83e\uddd7\u200d\u2642\ufe0f",climbing_woman:"\ud83e\uddd7\u200d\u2640\ufe0f",person_fencing:"\ud83e\udd3a",horse_racing:"\ud83c\udfc7",skier:"\u26f7\ufe0f",snowboarder:"\ud83c\udfc2",golfing:"\ud83c\udfcc\ufe0f",golfing_man:"\ud83c\udfcc\ufe0f\u200d\u2642\ufe0f",golfing_woman:"\ud83c\udfcc\ufe0f\u200d\u2640\ufe0f",surfer:"\ud83c\udfc4",surfing_man:"\ud83c\udfc4\u200d\u2642\ufe0f",surfing_woman:"\ud83c\udfc4\u200d\u2640\ufe0f",rowboat:"\ud83d\udea3",rowing_man:"\ud83d\udea3\u200d\u2642\ufe0f",rowing_woman:"\ud83d\udea3\u200d\u2640\ufe0f",swimmer:"\ud83c\udfca",swimming_man:"\ud83c\udfca\u200d\u2642\ufe0f",swimming_woman:"\ud83c\udfca\u200d\u2640\ufe0f",bouncing_ball_person:"\u26f9\ufe0f",bouncing_ball_man:"\u26f9\ufe0f\u200d\u2642\ufe0f",basketball_man:"\u26f9\ufe0f\u200d\u2642\ufe0f",bouncing_ball_woman:"\u26f9\ufe0f\u200d\u2640\ufe0f",basketball_woman:"\u26f9\ufe0f\u200d\u2640\ufe0f",weight_lifting:"\ud83c\udfcb\ufe0f",weight_lifting_man:"\ud83c\udfcb\ufe0f\u200d\u2642\ufe0f",weight_lifting_woman:"\ud83c\udfcb\ufe0f\u200d\u2640\ufe0f",bicyclist:"\ud83d\udeb4",biking_man:"\ud83d\udeb4\u200d\u2642\ufe0f",biking_woman:"\ud83d\udeb4\u200d\u2640\ufe0f",mountain_bicyclist:"\ud83d\udeb5",mountain_biking_man:"\ud83d\udeb5\u200d\u2642\ufe0f",mountain_biking_woman:"\ud83d\udeb5\u200d\u2640\ufe0f",cartwheeling:"\ud83e\udd38",man_cartwheeling:"\ud83e\udd38\u200d\u2642\ufe0f",woman_cartwheeling:"\ud83e\udd38\u200d\u2640\ufe0f",wrestling:"\ud83e\udd3c",men_wrestling:"\ud83e\udd3c\u200d\u2642\ufe0f",women_wrestling:"\ud83e\udd3c\u200d\u2640\ufe0f",water_polo:"\ud83e\udd3d",man_playing_water_polo:"\ud83e\udd3d\u200d\u2642\ufe0f",woman_playing_water_polo:"\ud83e\udd3d\u200d\u2640\ufe0f",handball_person:"\ud83e\udd3e",man_playing_handball:"\ud83e\udd3e\u200d\u2642\ufe0f",woman_playing_handball:"\ud83e\udd3e\u200d\u2640\ufe0f",juggling_person:"\ud83e\udd39",man_juggling:"\ud83e\udd39\u200d\u2642\ufe0f",woman_juggling:"\ud83e\udd39\u200d\u2640\ufe0f",lotus_position:"\ud83e\uddd8",lotus_position_man:"\ud83e\uddd8\u200d\u2642\ufe0f",lotus_position_woman:"\ud83e\uddd8\u200d\u2640\ufe0f",bath:"\ud83d\udec0",sleeping_bed:"\ud83d\udecc",people_holding_hands:"\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1",two_women_holding_hands:"\ud83d\udc6d",couple:"\ud83d\udc6b",two_men_holding_hands:"\ud83d\udc6c",couplekiss:"\ud83d\udc8f",couplekiss_man_woman:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68",couplekiss_man_man:"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68",couplekiss_woman_woman:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69",couple_with_heart:"\ud83d\udc91",couple_with_heart_woman_man:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc68",couple_with_heart_man_man:"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68",couple_with_heart_woman_woman:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc69",family:"\ud83d\udc6a",family_man_woman_boy:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66",family_man_woman_girl:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67",family_man_woman_girl_boy:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",family_man_woman_boy_boy:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",family_man_woman_girl_girl:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",family_man_man_boy:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66",family_man_man_girl:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67",family_man_man_girl_boy:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc66",family_man_man_boy_boy:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66",family_man_man_girl_girl:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc67",family_woman_woman_boy:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66",family_woman_woman_girl:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67",family_woman_woman_girl_boy:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",family_woman_woman_boy_boy:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",family_woman_woman_girl_girl:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",family_man_boy:"\ud83d\udc68\u200d\ud83d\udc66",family_man_boy_boy:"\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66",family_man_girl:"\ud83d\udc68\u200d\ud83d\udc67",family_man_girl_boy:"\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc66",family_man_girl_girl:"\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc67",family_woman_boy:"\ud83d\udc69\u200d\ud83d\udc66",family_woman_boy_boy:"\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",family_woman_girl:"\ud83d\udc69\u200d\ud83d\udc67",family_woman_girl_boy:"\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",family_woman_girl_girl:"\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",speaking_head:"\ud83d\udde3\ufe0f",bust_in_silhouette:"\ud83d\udc64",busts_in_silhouette:"\ud83d\udc65",people_hugging:"\ud83e\udec2",footprints:"\ud83d\udc63",monkey_face:"\ud83d\udc35",monkey:"\ud83d\udc12",gorilla:"\ud83e\udd8d",orangutan:"\ud83e\udda7",dog:"\ud83d\udc36",dog2:"\ud83d\udc15",guide_dog:"\ud83e\uddae",service_dog:"\ud83d\udc15\u200d\ud83e\uddba",poodle:"\ud83d\udc29",wolf:"\ud83d\udc3a",fox_face:"\ud83e\udd8a",raccoon:"\ud83e\udd9d",cat:"\ud83d\udc31",cat2:"\ud83d\udc08",black_cat:"\ud83d\udc08\u200d\u2b1b",lion:"\ud83e\udd81",tiger:"\ud83d\udc2f",tiger2:"\ud83d\udc05",leopard:"\ud83d\udc06",horse:"\ud83d\udc34",moose:"\ud83e\udece",donkey:"\ud83e\udecf",racehorse:"\ud83d\udc0e",unicorn:"\ud83e\udd84",zebra:"\ud83e\udd93",deer:"\ud83e\udd8c",bison:"\ud83e\uddac",cow:"\ud83d\udc2e",ox:"\ud83d\udc02",water_buffalo:"\ud83d\udc03",cow2:"\ud83d\udc04",pig:"\ud83d\udc37",pig2:"\ud83d\udc16",boar:"\ud83d\udc17",pig_nose:"\ud83d\udc3d",ram:"\ud83d\udc0f",sheep:"\ud83d\udc11",goat:"\ud83d\udc10",dromedary_camel:"\ud83d\udc2a",camel:"\ud83d\udc2b",llama:"\ud83e\udd99",giraffe:"\ud83e\udd92",elephant:"\ud83d\udc18",mammoth:"\ud83e\udda3",rhinoceros:"\ud83e\udd8f",hippopotamus:"\ud83e\udd9b",mouse:"\ud83d\udc2d",mouse2:"\ud83d\udc01",rat:"\ud83d\udc00",hamster:"\ud83d\udc39",rabbit:"\ud83d\udc30",rabbit2:"\ud83d\udc07",chipmunk:"\ud83d\udc3f\ufe0f",beaver:"\ud83e\uddab",hedgehog:"\ud83e\udd94",bat:"\ud83e\udd87",bear:"\ud83d\udc3b",polar_bear:"\ud83d\udc3b\u200d\u2744\ufe0f",koala:"\ud83d\udc28",panda_face:"\ud83d\udc3c",sloth:"\ud83e\udda5",otter:"\ud83e\udda6",skunk:"\ud83e\udda8",kangaroo:"\ud83e\udd98",badger:"\ud83e\udda1",feet:"\ud83d\udc3e",paw_prints:"\ud83d\udc3e",turkey:"\ud83e\udd83",chicken:"\ud83d\udc14",rooster:"\ud83d\udc13",hatching_chick:"\ud83d\udc23",baby_chick:"\ud83d\udc24",hatched_chick:"\ud83d\udc25",bird:"\ud83d\udc26",penguin:"\ud83d\udc27",dove:"\ud83d\udd4a\ufe0f",eagle:"\ud83e\udd85",duck:"\ud83e\udd86",swan:"\ud83e\udda2",owl:"\ud83e\udd89",dodo:"\ud83e\udda4",feather:"\ud83e\udeb6",flamingo:"\ud83e\udda9",peacock:"\ud83e\udd9a",parrot:"\ud83e\udd9c",wing:"\ud83e\udebd",black_bird:"\ud83d\udc26\u200d\u2b1b",goose:"\ud83e\udebf",frog:"\ud83d\udc38",crocodile:"\ud83d\udc0a",turtle:"\ud83d\udc22",lizard:"\ud83e\udd8e",snake:"\ud83d\udc0d",dragon_face:"\ud83d\udc32",dragon:"\ud83d\udc09",sauropod:"\ud83e\udd95","t-rex":"\ud83e\udd96",whale:"\ud83d\udc33",whale2:"\ud83d\udc0b",dolphin:"\ud83d\udc2c",flipper:"\ud83d\udc2c",seal:"\ud83e\uddad",fish:"\ud83d\udc1f",tropical_fish:"\ud83d\udc20",blowfish:"\ud83d\udc21",shark:"\ud83e\udd88",octopus:"\ud83d\udc19",shell:"\ud83d\udc1a",coral:"\ud83e\udeb8",jellyfish:"\ud83e\udebc",snail:"\ud83d\udc0c",butterfly:"\ud83e\udd8b",bug:"\ud83d\udc1b",ant:"\ud83d\udc1c",bee:"\ud83d\udc1d",honeybee:"\ud83d\udc1d",beetle:"\ud83e\udeb2",lady_beetle:"\ud83d\udc1e",cricket:"\ud83e\udd97",cockroach:"\ud83e\udeb3",spider:"\ud83d\udd77\ufe0f",spider_web:"\ud83d\udd78\ufe0f",scorpion:"\ud83e\udd82",mosquito:"\ud83e\udd9f",fly:"\ud83e\udeb0",worm:"\ud83e\udeb1",microbe:"\ud83e\udda0",bouquet:"\ud83d\udc90",cherry_blossom:"\ud83c\udf38",white_flower:"\ud83d\udcae",lotus:"\ud83e\udeb7",rosette:"\ud83c\udff5\ufe0f",rose:"\ud83c\udf39",wilted_flower:"\ud83e\udd40",hibiscus:"\ud83c\udf3a",sunflower:"\ud83c\udf3b",blossom:"\ud83c\udf3c",tulip:"\ud83c\udf37",hyacinth:"\ud83e\udebb",seedling:"\ud83c\udf31",potted_plant:"\ud83e\udeb4",evergreen_tree:"\ud83c\udf32",deciduous_tree:"\ud83c\udf33",palm_tree:"\ud83c\udf34",cactus:"\ud83c\udf35",ear_of_rice:"\ud83c\udf3e",herb:"\ud83c\udf3f",shamrock:"\u2618\ufe0f",four_leaf_clover:"\ud83c\udf40",maple_leaf:"\ud83c\udf41",fallen_leaf:"\ud83c\udf42",leaves:"\ud83c\udf43",empty_nest:"\ud83e\udeb9",nest_with_eggs:"\ud83e\udeba",mushroom:"\ud83c\udf44",grapes:"\ud83c\udf47",melon:"\ud83c\udf48",watermelon:"\ud83c\udf49",tangerine:"\ud83c\udf4a",orange:"\ud83c\udf4a",mandarin:"\ud83c\udf4a",lemon:"\ud83c\udf4b",banana:"\ud83c\udf4c",pineapple:"\ud83c\udf4d",mango:"\ud83e\udd6d",apple:"\ud83c\udf4e",green_apple:"\ud83c\udf4f",pear:"\ud83c\udf50",peach:"\ud83c\udf51",cherries:"\ud83c\udf52",strawberry:"\ud83c\udf53",blueberries:"\ud83e\uded0",kiwi_fruit:"\ud83e\udd5d",tomato:"\ud83c\udf45",olive:"\ud83e\uded2",coconut:"\ud83e\udd65",avocado:"\ud83e\udd51",eggplant:"\ud83c\udf46",potato:"\ud83e\udd54",carrot:"\ud83e\udd55",corn:"\ud83c\udf3d",hot_pepper:"\ud83c\udf36\ufe0f",bell_pepper:"\ud83e\uded1",cucumber:"\ud83e\udd52",leafy_green:"\ud83e\udd6c",broccoli:"\ud83e\udd66",garlic:"\ud83e\uddc4",onion:"\ud83e\uddc5",peanuts:"\ud83e\udd5c",beans:"\ud83e\uded8",chestnut:"\ud83c\udf30",ginger_root:"\ud83e\udeda",pea_pod:"\ud83e\udedb",bread:"\ud83c\udf5e",croissant:"\ud83e\udd50",baguette_bread:"\ud83e\udd56",flatbread:"\ud83e\uded3",pretzel:"\ud83e\udd68",bagel:"\ud83e\udd6f",pancakes:"\ud83e\udd5e",waffle:"\ud83e\uddc7",cheese:"\ud83e\uddc0",meat_on_bone:"\ud83c\udf56",poultry_leg:"\ud83c\udf57",cut_of_meat:"\ud83e\udd69",bacon:"\ud83e\udd53",hamburger:"\ud83c\udf54",fries:"\ud83c\udf5f",pizza:"\ud83c\udf55",hotdog:"\ud83c\udf2d",sandwich:"\ud83e\udd6a",taco:"\ud83c\udf2e",burrito:"\ud83c\udf2f",tamale:"\ud83e\uded4",stuffed_flatbread:"\ud83e\udd59",falafel:"\ud83e\uddc6",egg:"\ud83e\udd5a",fried_egg:"\ud83c\udf73",shallow_pan_of_food:"\ud83e\udd58",stew:"\ud83c\udf72",fondue:"\ud83e\uded5",bowl_with_spoon:"\ud83e\udd63",green_salad:"\ud83e\udd57",popcorn:"\ud83c\udf7f",butter:"\ud83e\uddc8",salt:"\ud83e\uddc2",canned_food:"\ud83e\udd6b",bento:"\ud83c\udf71",rice_cracker:"\ud83c\udf58",rice_ball:"\ud83c\udf59",rice:"\ud83c\udf5a",curry:"\ud83c\udf5b",ramen:"\ud83c\udf5c",spaghetti:"\ud83c\udf5d",sweet_potato:"\ud83c\udf60",oden:"\ud83c\udf62",sushi:"\ud83c\udf63",fried_shrimp:"\ud83c\udf64",fish_cake:"\ud83c\udf65",moon_cake:"\ud83e\udd6e",dango:"\ud83c\udf61",dumpling:"\ud83e\udd5f",fortune_cookie:"\ud83e\udd60",takeout_box:"\ud83e\udd61",crab:"\ud83e\udd80",lobster:"\ud83e\udd9e",shrimp:"\ud83e\udd90",squid:"\ud83e\udd91",oyster:"\ud83e\uddaa",icecream:"\ud83c\udf66",shaved_ice:"\ud83c\udf67",ice_cream:"\ud83c\udf68",doughnut:"\ud83c\udf69",cookie:"\ud83c\udf6a",birthday:"\ud83c\udf82",cake:"\ud83c\udf70",cupcake:"\ud83e\uddc1",pie:"\ud83e\udd67",chocolate_bar:"\ud83c\udf6b",candy:"\ud83c\udf6c",lollipop:"\ud83c\udf6d",custard:"\ud83c\udf6e",honey_pot:"\ud83c\udf6f",baby_bottle:"\ud83c\udf7c",milk_glass:"\ud83e\udd5b",coffee:"\u2615",teapot:"\ud83e\uded6",tea:"\ud83c\udf75",sake:"\ud83c\udf76",champagne:"\ud83c\udf7e",wine_glass:"\ud83c\udf77",cocktail:"\ud83c\udf78",tropical_drink:"\ud83c\udf79",beer:"\ud83c\udf7a",beers:"\ud83c\udf7b",clinking_glasses:"\ud83e\udd42",tumbler_glass:"\ud83e\udd43",pouring_liquid:"\ud83e\uded7",cup_with_straw:"\ud83e\udd64",bubble_tea:"\ud83e\uddcb",beverage_box:"\ud83e\uddc3",mate:"\ud83e\uddc9",ice_cube:"\ud83e\uddca",chopsticks:"\ud83e\udd62",plate_with_cutlery:"\ud83c\udf7d\ufe0f",fork_and_knife:"\ud83c\udf74",spoon:"\ud83e\udd44",hocho:"\ud83d\udd2a",knife:"\ud83d\udd2a",jar:"\ud83e\uded9",amphora:"\ud83c\udffa",earth_africa:"\ud83c\udf0d",earth_americas:"\ud83c\udf0e",earth_asia:"\ud83c\udf0f",globe_with_meridians:"\ud83c\udf10",world_map:"\ud83d\uddfa\ufe0f",japan:"\ud83d\uddfe",compass:"\ud83e\udded",mountain_snow:"\ud83c\udfd4\ufe0f",mountain:"\u26f0\ufe0f",volcano:"\ud83c\udf0b",mount_fuji:"\ud83d\uddfb",camping:"\ud83c\udfd5\ufe0f",beach_umbrella:"\ud83c\udfd6\ufe0f",desert:"\ud83c\udfdc\ufe0f",desert_island:"\ud83c\udfdd\ufe0f",national_park:"\ud83c\udfde\ufe0f",stadium:"\ud83c\udfdf\ufe0f",classical_building:"\ud83c\udfdb\ufe0f",building_construction:"\ud83c\udfd7\ufe0f",bricks:"\ud83e\uddf1",rock:"\ud83e\udea8",wood:"\ud83e\udeb5",hut:"\ud83d\uded6",houses:"\ud83c\udfd8\ufe0f",derelict_house:"\ud83c\udfda\ufe0f",house:"\ud83c\udfe0",house_with_garden:"\ud83c\udfe1",office:"\ud83c\udfe2",post_office:"\ud83c\udfe3",european_post_office:"\ud83c\udfe4",hospital:"\ud83c\udfe5",bank:"\ud83c\udfe6",hotel:"\ud83c\udfe8",love_hotel:"\ud83c\udfe9",convenience_store:"\ud83c\udfea",school:"\ud83c\udfeb",department_store:"\ud83c\udfec",factory:"\ud83c\udfed",japanese_castle:"\ud83c\udfef",european_castle:"\ud83c\udff0",wedding:"\ud83d\udc92",tokyo_tower:"\ud83d\uddfc",statue_of_liberty:"\ud83d\uddfd",church:"\u26ea",mosque:"\ud83d\udd4c",hindu_temple:"\ud83d\uded5",synagogue:"\ud83d\udd4d",shinto_shrine:"\u26e9\ufe0f",kaaba:"\ud83d\udd4b",fountain:"\u26f2",tent:"\u26fa",foggy:"\ud83c\udf01",night_with_stars:"\ud83c\udf03",cityscape:"\ud83c\udfd9\ufe0f",sunrise_over_mountains:"\ud83c\udf04",sunrise:"\ud83c\udf05",city_sunset:"\ud83c\udf06",city_sunrise:"\ud83c\udf07",bridge_at_night:"\ud83c\udf09",hotsprings:"\u2668\ufe0f",carousel_horse:"\ud83c\udfa0",playground_slide:"\ud83d\udedd",ferris_wheel:"\ud83c\udfa1",roller_coaster:"\ud83c\udfa2",barber:"\ud83d\udc88",circus_tent:"\ud83c\udfaa",steam_locomotive:"\ud83d\ude82",railway_car:"\ud83d\ude83",bullettrain_side:"\ud83d\ude84",bullettrain_front:"\ud83d\ude85",train2:"\ud83d\ude86",metro:"\ud83d\ude87",light_rail:"\ud83d\ude88",station:"\ud83d\ude89",tram:"\ud83d\ude8a",monorail:"\ud83d\ude9d",mountain_railway:"\ud83d\ude9e",train:"\ud83d\ude8b",bus:"\ud83d\ude8c",oncoming_bus:"\ud83d\ude8d",trolleybus:"\ud83d\ude8e",minibus:"\ud83d\ude90",ambulance:"\ud83d\ude91",fire_engine:"\ud83d\ude92",police_car:"\ud83d\ude93",oncoming_police_car:"\ud83d\ude94",taxi:"\ud83d\ude95",oncoming_taxi:"\ud83d\ude96",car:"\ud83d\ude97",red_car:"\ud83d\ude97",oncoming_automobile:"\ud83d\ude98",blue_car:"\ud83d\ude99",pickup_truck:"\ud83d\udefb",truck:"\ud83d\ude9a",articulated_lorry:"\ud83d\ude9b",tractor:"\ud83d\ude9c",racing_car:"\ud83c\udfce\ufe0f",motorcycle:"\ud83c\udfcd\ufe0f",motor_scooter:"\ud83d\udef5",manual_wheelchair:"\ud83e\uddbd",motorized_wheelchair:"\ud83e\uddbc",auto_rickshaw:"\ud83d\udefa",bike:"\ud83d\udeb2",kick_scooter:"\ud83d\udef4",skateboard:"\ud83d\udef9",roller_skate:"\ud83d\udefc",busstop:"\ud83d\ude8f",motorway:"\ud83d\udee3\ufe0f",railway_track:"\ud83d\udee4\ufe0f",oil_drum:"\ud83d\udee2\ufe0f",fuelpump:"\u26fd",wheel:"\ud83d\udede",rotating_light:"\ud83d\udea8",traffic_light:"\ud83d\udea5",vertical_traffic_light:"\ud83d\udea6",stop_sign:"\ud83d\uded1",construction:"\ud83d\udea7",anchor:"\u2693",ring_buoy:"\ud83d\udedf",boat:"\u26f5",sailboat:"\u26f5",canoe:"\ud83d\udef6",speedboat:"\ud83d\udea4",passenger_ship:"\ud83d\udef3\ufe0f",ferry:"\u26f4\ufe0f",motor_boat:"\ud83d\udee5\ufe0f",ship:"\ud83d\udea2",airplane:"\u2708\ufe0f",small_airplane:"\ud83d\udee9\ufe0f",flight_departure:"\ud83d\udeeb",flight_arrival:"\ud83d\udeec",parachute:"\ud83e\ude82",seat:"\ud83d\udcba",helicopter:"\ud83d\ude81",suspension_railway:"\ud83d\ude9f",mountain_cableway:"\ud83d\udea0",aerial_tramway:"\ud83d\udea1",artificial_satellite:"\ud83d\udef0\ufe0f",rocket:"\ud83d\ude80",flying_saucer:"\ud83d\udef8",bellhop_bell:"\ud83d\udece\ufe0f",luggage:"\ud83e\uddf3",hourglass:"\u231b",hourglass_flowing_sand:"\u23f3",watch:"\u231a",alarm_clock:"\u23f0",stopwatch:"\u23f1\ufe0f",timer_clock:"\u23f2\ufe0f",mantelpiece_clock:"\ud83d\udd70\ufe0f",clock12:"\ud83d\udd5b",clock1230:"\ud83d\udd67",clock1:"\ud83d\udd50",clock130:"\ud83d\udd5c",clock2:"\ud83d\udd51",clock230:"\ud83d\udd5d",clock3:"\ud83d\udd52",clock330:"\ud83d\udd5e",clock4:"\ud83d\udd53",clock430:"\ud83d\udd5f",clock5:"\ud83d\udd54",clock530:"\ud83d\udd60",clock6:"\ud83d\udd55",clock630:"\ud83d\udd61",clock7:"\ud83d\udd56",clock730:"\ud83d\udd62",clock8:"\ud83d\udd57",clock830:"\ud83d\udd63",clock9:"\ud83d\udd58",clock930:"\ud83d\udd64",clock10:"\ud83d\udd59",clock1030:"\ud83d\udd65",clock11:"\ud83d\udd5a",clock1130:"\ud83d\udd66",new_moon:"\ud83c\udf11",waxing_crescent_moon:"\ud83c\udf12",first_quarter_moon:"\ud83c\udf13",moon:"\ud83c\udf14",waxing_gibbous_moon:"\ud83c\udf14",full_moon:"\ud83c\udf15",waning_gibbous_moon:"\ud83c\udf16",last_quarter_moon:"\ud83c\udf17",waning_crescent_moon:"\ud83c\udf18",crescent_moon:"\ud83c\udf19",new_moon_with_face:"\ud83c\udf1a",first_quarter_moon_with_face:"\ud83c\udf1b",last_quarter_moon_with_face:"\ud83c\udf1c",thermometer:"\ud83c\udf21\ufe0f",sunny:"\u2600\ufe0f",full_moon_with_face:"\ud83c\udf1d",sun_with_face:"\ud83c\udf1e",ringed_planet:"\ud83e\ude90",star:"\u2b50",star2:"\ud83c\udf1f",stars:"\ud83c\udf20",milky_way:"\ud83c\udf0c",cloud:"\u2601\ufe0f",partly_sunny:"\u26c5",cloud_with_lightning_and_rain:"\u26c8\ufe0f",sun_behind_small_cloud:"\ud83c\udf24\ufe0f",sun_behind_large_cloud:"\ud83c\udf25\ufe0f",sun_behind_rain_cloud:"\ud83c\udf26\ufe0f",cloud_with_rain:"\ud83c\udf27\ufe0f",cloud_with_snow:"\ud83c\udf28\ufe0f",cloud_with_lightning:"\ud83c\udf29\ufe0f",tornado:"\ud83c\udf2a\ufe0f",fog:"\ud83c\udf2b\ufe0f",wind_face:"\ud83c\udf2c\ufe0f",cyclone:"\ud83c\udf00",rainbow:"\ud83c\udf08",closed_umbrella:"\ud83c\udf02",open_umbrella:"\u2602\ufe0f",umbrella:"\u2614",parasol_on_ground:"\u26f1\ufe0f",zap:"\u26a1",snowflake:"\u2744\ufe0f",snowman_with_snow:"\u2603\ufe0f",snowman:"\u26c4",comet:"\u2604\ufe0f",fire:"\ud83d\udd25",droplet:"\ud83d\udca7",ocean:"\ud83c\udf0a",jack_o_lantern:"\ud83c\udf83",christmas_tree:"\ud83c\udf84",fireworks:"\ud83c\udf86",sparkler:"\ud83c\udf87",firecracker:"\ud83e\udde8",sparkles:"\u2728",balloon:"\ud83c\udf88",tada:"\ud83c\udf89",confetti_ball:"\ud83c\udf8a",tanabata_tree:"\ud83c\udf8b",bamboo:"\ud83c\udf8d",dolls:"\ud83c\udf8e",flags:"\ud83c\udf8f",wind_chime:"\ud83c\udf90",rice_scene:"\ud83c\udf91",red_envelope:"\ud83e\udde7",ribbon:"\ud83c\udf80",gift:"\ud83c\udf81",reminder_ribbon:"\ud83c\udf97\ufe0f",tickets:"\ud83c\udf9f\ufe0f",ticket:"\ud83c\udfab",medal_military:"\ud83c\udf96\ufe0f",trophy:"\ud83c\udfc6",medal_sports:"\ud83c\udfc5","1st_place_medal":"\ud83e\udd47","2nd_place_medal":"\ud83e\udd48","3rd_place_medal":"\ud83e\udd49",soccer:"\u26bd",baseball:"\u26be",softball:"\ud83e\udd4e",basketball:"\ud83c\udfc0",volleyball:"\ud83c\udfd0",football:"\ud83c\udfc8",rugby_football:"\ud83c\udfc9",tennis:"\ud83c\udfbe",flying_disc:"\ud83e\udd4f",bowling:"\ud83c\udfb3",cricket_game:"\ud83c\udfcf",field_hockey:"\ud83c\udfd1",ice_hockey:"\ud83c\udfd2",lacrosse:"\ud83e\udd4d",ping_pong:"\ud83c\udfd3",badminton:"\ud83c\udff8",boxing_glove:"\ud83e\udd4a",martial_arts_uniform:"\ud83e\udd4b",goal_net:"\ud83e\udd45",golf:"\u26f3",ice_skate:"\u26f8\ufe0f",fishing_pole_and_fish:"\ud83c\udfa3",diving_mask:"\ud83e\udd3f",running_shirt_with_sash:"\ud83c\udfbd",ski:"\ud83c\udfbf",sled:"\ud83d\udef7",curling_stone:"\ud83e\udd4c",dart:"\ud83c\udfaf",yo_yo:"\ud83e\ude80",kite:"\ud83e\ude81",gun:"\ud83d\udd2b","8ball":"\ud83c\udfb1",crystal_ball:"\ud83d\udd2e",magic_wand:"\ud83e\ude84",video_game:"\ud83c\udfae",joystick:"\ud83d\udd79\ufe0f",slot_machine:"\ud83c\udfb0",game_die:"\ud83c\udfb2",jigsaw:"\ud83e\udde9",teddy_bear:"\ud83e\uddf8",pinata:"\ud83e\ude85",mirror_ball:"\ud83e\udea9",nesting_dolls:"\ud83e\ude86",spades:"\u2660\ufe0f",hearts:"\u2665\ufe0f",diamonds:"\u2666\ufe0f",clubs:"\u2663\ufe0f",chess_pawn:"\u265f\ufe0f",black_joker:"\ud83c\udccf",mahjong:"\ud83c\udc04",flower_playing_cards:"\ud83c\udfb4",performing_arts:"\ud83c\udfad",framed_picture:"\ud83d\uddbc\ufe0f",art:"\ud83c\udfa8",thread:"\ud83e\uddf5",sewing_needle:"\ud83e\udea1",yarn:"\ud83e\uddf6",knot:"\ud83e\udea2",eyeglasses:"\ud83d\udc53",dark_sunglasses:"\ud83d\udd76\ufe0f",goggles:"\ud83e\udd7d",lab_coat:"\ud83e\udd7c",safety_vest:"\ud83e\uddba",necktie:"\ud83d\udc54",shirt:"\ud83d\udc55",tshirt:"\ud83d\udc55",jeans:"\ud83d\udc56",scarf:"\ud83e\udde3",gloves:"\ud83e\udde4",coat:"\ud83e\udde5",socks:"\ud83e\udde6",dress:"\ud83d\udc57",kimono:"\ud83d\udc58",sari:"\ud83e\udd7b",one_piece_swimsuit:"\ud83e\ude71",swim_brief:"\ud83e\ude72",shorts:"\ud83e\ude73",bikini:"\ud83d\udc59",womans_clothes:"\ud83d\udc5a",folding_hand_fan:"\ud83e\udead",purse:"\ud83d\udc5b",handbag:"\ud83d\udc5c",pouch:"\ud83d\udc5d",shopping:"\ud83d\udecd\ufe0f",school_satchel:"\ud83c\udf92",thong_sandal:"\ud83e\ude74",mans_shoe:"\ud83d\udc5e",shoe:"\ud83d\udc5e",athletic_shoe:"\ud83d\udc5f",hiking_boot:"\ud83e\udd7e",flat_shoe:"\ud83e\udd7f",high_heel:"\ud83d\udc60",sandal:"\ud83d\udc61",ballet_shoes:"\ud83e\ude70",boot:"\ud83d\udc62",hair_pick:"\ud83e\udeae",crown:"\ud83d\udc51",womans_hat:"\ud83d\udc52",tophat:"\ud83c\udfa9",mortar_board:"\ud83c\udf93",billed_cap:"\ud83e\udde2",military_helmet:"\ud83e\ude96",rescue_worker_helmet:"\u26d1\ufe0f",prayer_beads:"\ud83d\udcff",lipstick:"\ud83d\udc84",ring:"\ud83d\udc8d",gem:"\ud83d\udc8e",mute:"\ud83d\udd07",speaker:"\ud83d\udd08",sound:"\ud83d\udd09",loud_sound:"\ud83d\udd0a",loudspeaker:"\ud83d\udce2",mega:"\ud83d\udce3",postal_horn:"\ud83d\udcef",bell:"\ud83d\udd14",no_bell:"\ud83d\udd15",musical_score:"\ud83c\udfbc",musical_note:"\ud83c\udfb5",notes:"\ud83c\udfb6",studio_microphone:"\ud83c\udf99\ufe0f",level_slider:"\ud83c\udf9a\ufe0f",control_knobs:"\ud83c\udf9b\ufe0f",microphone:"\ud83c\udfa4",headphones:"\ud83c\udfa7",radio:"\ud83d\udcfb",saxophone:"\ud83c\udfb7",accordion:"\ud83e\ude97",guitar:"\ud83c\udfb8",musical_keyboard:"\ud83c\udfb9",trumpet:"\ud83c\udfba",violin:"\ud83c\udfbb",banjo:"\ud83e\ude95",drum:"\ud83e\udd41",long_drum:"\ud83e\ude98",maracas:"\ud83e\ude87",flute:"\ud83e\ude88",iphone:"\ud83d\udcf1",calling:"\ud83d\udcf2",phone:"\u260e\ufe0f",telephone:"\u260e\ufe0f",telephone_receiver:"\ud83d\udcde",pager:"\ud83d\udcdf",fax:"\ud83d\udce0",battery:"\ud83d\udd0b",low_battery:"\ud83e\udeab",electric_plug:"\ud83d\udd0c",computer:"\ud83d\udcbb",desktop_computer:"\ud83d\udda5\ufe0f",printer:"\ud83d\udda8\ufe0f",keyboard:"\u2328\ufe0f",computer_mouse:"\ud83d\uddb1\ufe0f",trackball:"\ud83d\uddb2\ufe0f",minidisc:"\ud83d\udcbd",floppy_disk:"\ud83d\udcbe",cd:"\ud83d\udcbf",dvd:"\ud83d\udcc0",abacus:"\ud83e\uddee",movie_camera:"\ud83c\udfa5",film_strip:"\ud83c\udf9e\ufe0f",film_projector:"\ud83d\udcfd\ufe0f",clapper:"\ud83c\udfac",tv:"\ud83d\udcfa",camera:"\ud83d\udcf7",camera_flash:"\ud83d\udcf8",video_camera:"\ud83d\udcf9",vhs:"\ud83d\udcfc",mag:"\ud83d\udd0d",mag_right:"\ud83d\udd0e",candle:"\ud83d\udd6f\ufe0f",bulb:"\ud83d\udca1",flashlight:"\ud83d\udd26",izakaya_lantern:"\ud83c\udfee",lantern:"\ud83c\udfee",diya_lamp:"\ud83e\ude94",notebook_with_decorative_cover:"\ud83d\udcd4",closed_book:"\ud83d\udcd5",book:"\ud83d\udcd6",open_book:"\ud83d\udcd6",green_book:"\ud83d\udcd7",blue_book:"\ud83d\udcd8",orange_book:"\ud83d\udcd9",books:"\ud83d\udcda",notebook:"\ud83d\udcd3",ledger:"\ud83d\udcd2",page_with_curl:"\ud83d\udcc3",scroll:"\ud83d\udcdc",page_facing_up:"\ud83d\udcc4",newspaper:"\ud83d\udcf0",newspaper_roll:"\ud83d\uddde\ufe0f",bookmark_tabs:"\ud83d\udcd1",bookmark:"\ud83d\udd16",label:"\ud83c\udff7\ufe0f",moneybag:"\ud83d\udcb0",coin:"\ud83e\ude99",yen:"\ud83d\udcb4",dollar:"\ud83d\udcb5",euro:"\ud83d\udcb6",pound:"\ud83d\udcb7",money_with_wings:"\ud83d\udcb8",credit_card:"\ud83d\udcb3",receipt:"\ud83e\uddfe",chart:"\ud83d\udcb9",envelope:"\u2709\ufe0f",email:"\ud83d\udce7","e-mail":"\ud83d\udce7",incoming_envelope:"\ud83d\udce8",envelope_with_arrow:"\ud83d\udce9",outbox_tray:"\ud83d\udce4",inbox_tray:"\ud83d\udce5",package:"\ud83d\udce6",mailbox:"\ud83d\udceb",mailbox_closed:"\ud83d\udcea",mailbox_with_mail:"\ud83d\udcec",mailbox_with_no_mail:"\ud83d\udced",postbox:"\ud83d\udcee",ballot_box:"\ud83d\uddf3\ufe0f",pencil2:"\u270f\ufe0f",black_nib:"\u2712\ufe0f",fountain_pen:"\ud83d\udd8b\ufe0f",pen:"\ud83d\udd8a\ufe0f",paintbrush:"\ud83d\udd8c\ufe0f",crayon:"\ud83d\udd8d\ufe0f",memo:"\ud83d\udcdd",pencil:"\ud83d\udcdd",briefcase:"\ud83d\udcbc",file_folder:"\ud83d\udcc1",open_file_folder:"\ud83d\udcc2",card_index_dividers:"\ud83d\uddc2\ufe0f",date:"\ud83d\udcc5",calendar:"\ud83d\udcc6",spiral_notepad:"\ud83d\uddd2\ufe0f",spiral_calendar:"\ud83d\uddd3\ufe0f",card_index:"\ud83d\udcc7",chart_with_upwards_trend:"\ud83d\udcc8",chart_with_downwards_trend:"\ud83d\udcc9",bar_chart:"\ud83d\udcca",clipboard:"\ud83d\udccb",pushpin:"\ud83d\udccc",round_pushpin:"\ud83d\udccd",paperclip:"\ud83d\udcce",paperclips:"\ud83d\udd87\ufe0f",straight_ruler:"\ud83d\udccf",triangular_ruler:"\ud83d\udcd0",scissors:"\u2702\ufe0f",card_file_box:"\ud83d\uddc3\ufe0f",file_cabinet:"\ud83d\uddc4\ufe0f",wastebasket:"\ud83d\uddd1\ufe0f",lock:"\ud83d\udd12",unlock:"\ud83d\udd13",lock_with_ink_pen:"\ud83d\udd0f",closed_lock_with_key:"\ud83d\udd10",key:"\ud83d\udd11",old_key:"\ud83d\udddd\ufe0f",hammer:"\ud83d\udd28",axe:"\ud83e\ude93",pick:"\u26cf\ufe0f",hammer_and_pick:"\u2692\ufe0f",hammer_and_wrench:"\ud83d\udee0\ufe0f",dagger:"\ud83d\udde1\ufe0f",crossed_swords:"\u2694\ufe0f",bomb:"\ud83d\udca3",boomerang:"\ud83e\ude83",bow_and_arrow:"\ud83c\udff9",shield:"\ud83d\udee1\ufe0f",carpentry_saw:"\ud83e\ude9a",wrench:"\ud83d\udd27",screwdriver:"\ud83e\ude9b",nut_and_bolt:"\ud83d\udd29",gear:"\u2699\ufe0f",clamp:"\ud83d\udddc\ufe0f",balance_scale:"\u2696\ufe0f",probing_cane:"\ud83e\uddaf",link:"\ud83d\udd17",chains:"\u26d3\ufe0f",hook:"\ud83e\ude9d",toolbox:"\ud83e\uddf0",magnet:"\ud83e\uddf2",ladder:"\ud83e\ude9c",alembic:"\u2697\ufe0f",test_tube:"\ud83e\uddea",petri_dish:"\ud83e\uddeb",dna:"\ud83e\uddec",microscope:"\ud83d\udd2c",telescope:"\ud83d\udd2d",satellite:"\ud83d\udce1",syringe:"\ud83d\udc89",drop_of_blood:"\ud83e\ude78",pill:"\ud83d\udc8a",adhesive_bandage:"\ud83e\ude79",crutch:"\ud83e\ude7c",stethoscope:"\ud83e\ude7a",x_ray:"\ud83e\ude7b",door:"\ud83d\udeaa",elevator:"\ud83d\uded7",mirror:"\ud83e\ude9e",window:"\ud83e\ude9f",bed:"\ud83d\udecf\ufe0f",couch_and_lamp:"\ud83d\udecb\ufe0f",chair:"\ud83e\ude91",toilet:"\ud83d\udebd",plunger:"\ud83e\udea0",shower:"\ud83d\udebf",bathtub:"\ud83d\udec1",mouse_trap:"\ud83e\udea4",razor:"\ud83e\ude92",lotion_bottle:"\ud83e\uddf4",safety_pin:"\ud83e\uddf7",broom:"\ud83e\uddf9",basket:"\ud83e\uddfa",roll_of_paper:"\ud83e\uddfb",bucket:"\ud83e\udea3",soap:"\ud83e\uddfc",bubbles:"\ud83e\udee7",toothbrush:"\ud83e\udea5",sponge:"\ud83e\uddfd",fire_extinguisher:"\ud83e\uddef",shopping_cart:"\ud83d\uded2",smoking:"\ud83d\udeac",coffin:"\u26b0\ufe0f",headstone:"\ud83e\udea6",funeral_urn:"\u26b1\ufe0f",nazar_amulet:"\ud83e\uddff",hamsa:"\ud83e\udeac",moyai:"\ud83d\uddff",placard:"\ud83e\udea7",identification_card:"\ud83e\udeaa",atm:"\ud83c\udfe7",put_litter_in_its_place:"\ud83d\udeae",potable_water:"\ud83d\udeb0",wheelchair:"\u267f",mens:"\ud83d\udeb9",womens:"\ud83d\udeba",restroom:"\ud83d\udebb",baby_symbol:"\ud83d\udebc",wc:"\ud83d\udebe",passport_control:"\ud83d\udec2",customs:"\ud83d\udec3",baggage_claim:"\ud83d\udec4",left_luggage:"\ud83d\udec5",warning:"\u26a0\ufe0f",children_crossing:"\ud83d\udeb8",no_entry:"\u26d4",no_entry_sign:"\ud83d\udeab",no_bicycles:"\ud83d\udeb3",no_smoking:"\ud83d\udead",do_not_litter:"\ud83d\udeaf","non-potable_water":"\ud83d\udeb1",no_pedestrians:"\ud83d\udeb7",no_mobile_phones:"\ud83d\udcf5",underage:"\ud83d\udd1e",radioactive:"\u2622\ufe0f",biohazard:"\u2623\ufe0f",arrow_up:"\u2b06\ufe0f",arrow_upper_right:"\u2197\ufe0f",arrow_right:"\u27a1\ufe0f",arrow_lower_right:"\u2198\ufe0f",arrow_down:"\u2b07\ufe0f",arrow_lower_left:"\u2199\ufe0f",arrow_left:"\u2b05\ufe0f",arrow_upper_left:"\u2196\ufe0f",arrow_up_down:"\u2195\ufe0f",left_right_arrow:"\u2194\ufe0f",leftwards_arrow_with_hook:"\u21a9\ufe0f",arrow_right_hook:"\u21aa\ufe0f",arrow_heading_up:"\u2934\ufe0f",arrow_heading_down:"\u2935\ufe0f",arrows_clockwise:"\ud83d\udd03",arrows_counterclockwise:"\ud83d\udd04",back:"\ud83d\udd19",end:"\ud83d\udd1a",on:"\ud83d\udd1b",soon:"\ud83d\udd1c",top:"\ud83d\udd1d",place_of_worship:"\ud83d\uded0",atom_symbol:"\u269b\ufe0f",om:"\ud83d\udd49\ufe0f",star_of_david:"\u2721\ufe0f",wheel_of_dharma:"\u2638\ufe0f",yin_yang:"\u262f\ufe0f",latin_cross:"\u271d\ufe0f",orthodox_cross:"\u2626\ufe0f",star_and_crescent:"\u262a\ufe0f",peace_symbol:"\u262e\ufe0f",menorah:"\ud83d\udd4e",six_pointed_star:"\ud83d\udd2f",khanda:"\ud83e\udeaf",aries:"\u2648",taurus:"\u2649",gemini:"\u264a",cancer:"\u264b",leo:"\u264c",virgo:"\u264d",libra:"\u264e",scorpius:"\u264f",sagittarius:"\u2650",capricorn:"\u2651",aquarius:"\u2652",pisces:"\u2653",ophiuchus:"\u26ce",twisted_rightwards_arrows:"\ud83d\udd00",repeat:"\ud83d\udd01",repeat_one:"\ud83d\udd02",arrow_forward:"\u25b6\ufe0f",fast_forward:"\u23e9",next_track_button:"\u23ed\ufe0f",play_or_pause_button:"\u23ef\ufe0f",arrow_backward:"\u25c0\ufe0f",rewind:"\u23ea",previous_track_button:"\u23ee\ufe0f",arrow_up_small:"\ud83d\udd3c",arrow_double_up:"\u23eb",arrow_down_small:"\ud83d\udd3d",arrow_double_down:"\u23ec",pause_button:"\u23f8\ufe0f",stop_button:"\u23f9\ufe0f",record_button:"\u23fa\ufe0f",eject_button:"\u23cf\ufe0f",cinema:"\ud83c\udfa6",low_brightness:"\ud83d\udd05",high_brightness:"\ud83d\udd06",signal_strength:"\ud83d\udcf6",wireless:"\ud83d\udedc",vibration_mode:"\ud83d\udcf3",mobile_phone_off:"\ud83d\udcf4",female_sign:"\u2640\ufe0f",male_sign:"\u2642\ufe0f",transgender_symbol:"\u26a7\ufe0f",heavy_multiplication_x:"\u2716\ufe0f",heavy_plus_sign:"\u2795",heavy_minus_sign:"\u2796",heavy_division_sign:"\u2797",heavy_equals_sign:"\ud83d\udff0",infinity:"\u267e\ufe0f",bangbang:"\u203c\ufe0f",interrobang:"\u2049\ufe0f",question:"\u2753",grey_question:"\u2754",grey_exclamation:"\u2755",exclamation:"\u2757",heavy_exclamation_mark:"\u2757",wavy_dash:"\u3030\ufe0f",currency_exchange:"\ud83d\udcb1",heavy_dollar_sign:"\ud83d\udcb2",medical_symbol:"\u2695\ufe0f",recycle:"\u267b\ufe0f",fleur_de_lis:"\u269c\ufe0f",trident:"\ud83d\udd31",name_badge:"\ud83d\udcdb",beginner:"\ud83d\udd30",o:"\u2b55",white_check_mark:"\u2705",ballot_box_with_check:"\u2611\ufe0f",heavy_check_mark:"\u2714\ufe0f",x:"\u274c",negative_squared_cross_mark:"\u274e",curly_loop:"\u27b0",loop:"\u27bf",part_alternation_mark:"\u303d\ufe0f",eight_spoked_asterisk:"\u2733\ufe0f",eight_pointed_black_star:"\u2734\ufe0f",sparkle:"\u2747\ufe0f",copyright:"\xa9\ufe0f",registered:"\xae\ufe0f",tm:"\u2122\ufe0f",hash:"#\ufe0f\u20e3",asterisk:"*\ufe0f\u20e3",zero:"0\ufe0f\u20e3",one:"1\ufe0f\u20e3",two:"2\ufe0f\u20e3",three:"3\ufe0f\u20e3",four:"4\ufe0f\u20e3",five:"5\ufe0f\u20e3",six:"6\ufe0f\u20e3",seven:"7\ufe0f\u20e3",eight:"8\ufe0f\u20e3",nine:"9\ufe0f\u20e3",keycap_ten:"\ud83d\udd1f",capital_abcd:"\ud83d\udd20",abcd:"\ud83d\udd21",symbols:"\ud83d\udd23",abc:"\ud83d\udd24",a:"\ud83c\udd70\ufe0f",ab:"\ud83c\udd8e",b:"\ud83c\udd71\ufe0f",cl:"\ud83c\udd91",cool:"\ud83c\udd92",free:"\ud83c\udd93",information_source:"\u2139\ufe0f",id:"\ud83c\udd94",m:"\u24c2\ufe0f",new:"\ud83c\udd95",ng:"\ud83c\udd96",o2:"\ud83c\udd7e\ufe0f",ok:"\ud83c\udd97",parking:"\ud83c\udd7f\ufe0f",sos:"\ud83c\udd98",up:"\ud83c\udd99",vs:"\ud83c\udd9a",koko:"\ud83c\ude01",sa:"\ud83c\ude02\ufe0f",u6708:"\ud83c\ude37\ufe0f",u6709:"\ud83c\ude36",u6307:"\ud83c\ude2f",ideograph_advantage:"\ud83c\ude50",u5272:"\ud83c\ude39",u7121:"\ud83c\ude1a",u7981:"\ud83c\ude32",accept:"\ud83c\ude51",u7533:"\ud83c\ude38",u5408:"\ud83c\ude34",u7a7a:"\ud83c\ude33",congratulations:"\u3297\ufe0f",secret:"\u3299\ufe0f",u55b6:"\ud83c\ude3a",u6e80:"\ud83c\ude35",red_circle:"\ud83d\udd34",orange_circle:"\ud83d\udfe0",yellow_circle:"\ud83d\udfe1",green_circle:"\ud83d\udfe2",large_blue_circle:"\ud83d\udd35",purple_circle:"\ud83d\udfe3",brown_circle:"\ud83d\udfe4",black_circle:"\u26ab",white_circle:"\u26aa",red_square:"\ud83d\udfe5",orange_square:"\ud83d\udfe7",yellow_square:"\ud83d\udfe8",green_square:"\ud83d\udfe9",blue_square:"\ud83d\udfe6",purple_square:"\ud83d\udfea",brown_square:"\ud83d\udfeb",black_large_square:"\u2b1b",white_large_square:"\u2b1c",black_medium_square:"\u25fc\ufe0f",white_medium_square:"\u25fb\ufe0f",black_medium_small_square:"\u25fe",white_medium_small_square:"\u25fd",black_small_square:"\u25aa\ufe0f",white_small_square:"\u25ab\ufe0f",large_orange_diamond:"\ud83d\udd36",large_blue_diamond:"\ud83d\udd37",small_orange_diamond:"\ud83d\udd38",small_blue_diamond:"\ud83d\udd39",small_red_triangle:"\ud83d\udd3a",small_red_triangle_down:"\ud83d\udd3b",diamond_shape_with_a_dot_inside:"\ud83d\udca0",radio_button:"\ud83d\udd18",white_square_button:"\ud83d\udd33",black_square_button:"\ud83d\udd32",checkered_flag:"\ud83c\udfc1",triangular_flag_on_post:"\ud83d\udea9",crossed_flags:"\ud83c\udf8c",black_flag:"\ud83c\udff4",white_flag:"\ud83c\udff3\ufe0f",rainbow_flag:"\ud83c\udff3\ufe0f\u200d\ud83c\udf08",transgender_flag:"\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f",pirate_flag:"\ud83c\udff4\u200d\u2620\ufe0f",ascension_island:"\ud83c\udde6\ud83c\udde8",andorra:"\ud83c\udde6\ud83c\udde9",united_arab_emirates:"\ud83c\udde6\ud83c\uddea",afghanistan:"\ud83c\udde6\ud83c\uddeb",antigua_barbuda:"\ud83c\udde6\ud83c\uddec",anguilla:"\ud83c\udde6\ud83c\uddee",albania:"\ud83c\udde6\ud83c\uddf1",armenia:"\ud83c\udde6\ud83c\uddf2",angola:"\ud83c\udde6\ud83c\uddf4",antarctica:"\ud83c\udde6\ud83c\uddf6",argentina:"\ud83c\udde6\ud83c\uddf7",american_samoa:"\ud83c\udde6\ud83c\uddf8",austria:"\ud83c\udde6\ud83c\uddf9",australia:"\ud83c\udde6\ud83c\uddfa",aruba:"\ud83c\udde6\ud83c\uddfc",aland_islands:"\ud83c\udde6\ud83c\uddfd",azerbaijan:"\ud83c\udde6\ud83c\uddff",bosnia_herzegovina:"\ud83c\udde7\ud83c\udde6",barbados:"\ud83c\udde7\ud83c\udde7",bangladesh:"\ud83c\udde7\ud83c\udde9",belgium:"\ud83c\udde7\ud83c\uddea",burkina_faso:"\ud83c\udde7\ud83c\uddeb",bulgaria:"\ud83c\udde7\ud83c\uddec",bahrain:"\ud83c\udde7\ud83c\udded",burundi:"\ud83c\udde7\ud83c\uddee",benin:"\ud83c\udde7\ud83c\uddef",st_barthelemy:"\ud83c\udde7\ud83c\uddf1",bermuda:"\ud83c\udde7\ud83c\uddf2",brunei:"\ud83c\udde7\ud83c\uddf3",bolivia:"\ud83c\udde7\ud83c\uddf4",caribbean_netherlands:"\ud83c\udde7\ud83c\uddf6",brazil:"\ud83c\udde7\ud83c\uddf7",bahamas:"\ud83c\udde7\ud83c\uddf8",bhutan:"\ud83c\udde7\ud83c\uddf9",bouvet_island:"\ud83c\udde7\ud83c\uddfb",botswana:"\ud83c\udde7\ud83c\uddfc",belarus:"\u2b1c\ufe0f\ud83d\udfe5\u2b1c",belize:"\ud83c\udde7\ud83c\uddff",canada:"\ud83c\udde8\ud83c\udde6",cocos_islands:"\ud83c\udde8\ud83c\udde8",congo_kinshasa:"\ud83c\udde8\ud83c\udde9",central_african_republic:"\ud83c\udde8\ud83c\uddeb",congo_brazzaville:"\ud83c\udde8\ud83c\uddec",switzerland:"\ud83c\udde8\ud83c\udded",cote_divoire:"\ud83c\udde8\ud83c\uddee",cook_islands:"\ud83c\udde8\ud83c\uddf0",chile:"\ud83c\udde8\ud83c\uddf1",cameroon:"\ud83c\udde8\ud83c\uddf2",cn:"\ud83c\udde8\ud83c\uddf3",colombia:"\ud83c\udde8\ud83c\uddf4",clipperton_island:"\ud83c\udde8\ud83c\uddf5",costa_rica:"\ud83c\udde8\ud83c\uddf7",cuba:"\ud83c\udde8\ud83c\uddfa",cape_verde:"\ud83c\udde8\ud83c\uddfb",curacao:"\ud83c\udde8\ud83c\uddfc",christmas_island:"\ud83c\udde8\ud83c\uddfd",cyprus:"\ud83c\udde8\ud83c\uddfe",czech_republic:"\ud83c\udde8\ud83c\uddff",de:"\ud83c\udde9\ud83c\uddea",diego_garcia:"\ud83c\udde9\ud83c\uddec",djibouti:"\ud83c\udde9\ud83c\uddef",denmark:"\ud83c\udde9\ud83c\uddf0",dominica:"\ud83c\udde9\ud83c\uddf2",dominican_republic:"\ud83c\udde9\ud83c\uddf4",algeria:"\ud83c\udde9\ud83c\uddff",ceuta_melilla:"\ud83c\uddea\ud83c\udde6",ecuador:"\ud83c\uddea\ud83c\udde8",estonia:"\ud83c\uddea\ud83c\uddea",egypt:"\ud83c\uddea\ud83c\uddec",western_sahara:"\ud83c\uddea\ud83c\udded",eritrea:"\ud83c\uddea\ud83c\uddf7",es:"\ud83c\uddea\ud83c\uddf8",ethiopia:"\ud83c\uddea\ud83c\uddf9",eu:"\ud83c\uddea\ud83c\uddfa",european_union:"\ud83c\uddea\ud83c\uddfa",finland:"\ud83c\uddeb\ud83c\uddee",fiji:"\ud83c\uddeb\ud83c\uddef",falkland_islands:"\ud83c\uddeb\ud83c\uddf0",micronesia:"\ud83c\uddeb\ud83c\uddf2",faroe_islands:"\ud83c\uddeb\ud83c\uddf4",fr:"\ud83c\uddeb\ud83c\uddf7",gabon:"\ud83c\uddec\ud83c\udde6",gb:"\ud83c\uddec\ud83c\udde7",uk:"\ud83c\uddec\ud83c\udde7",grenada:"\ud83c\uddec\ud83c\udde9",georgia:"\ud83c\uddec\ud83c\uddea",french_guiana:"\ud83c\uddec\ud83c\uddeb",guernsey:"\ud83c\uddec\ud83c\uddec",ghana:"\ud83c\uddec\ud83c\udded",gibraltar:"\ud83c\uddec\ud83c\uddee",greenland:"\ud83c\uddec\ud83c\uddf1",gambia:"\ud83c\uddec\ud83c\uddf2",guinea:"\ud83c\uddec\ud83c\uddf3",guadeloupe:"\ud83c\uddec\ud83c\uddf5",equatorial_guinea:"\ud83c\uddec\ud83c\uddf6",greece:"\ud83c\uddec\ud83c\uddf7",south_georgia_south_sandwich_islands:"\ud83c\uddec\ud83c\uddf8",guatemala:"\ud83c\uddec\ud83c\uddf9",guam:"\ud83c\uddec\ud83c\uddfa",guinea_bissau:"\ud83c\uddec\ud83c\uddfc",guyana:"\ud83c\uddec\ud83c\uddfe",hong_kong:"\ud83c\udded\ud83c\uddf0",heard_mcdonald_islands:"\ud83c\udded\ud83c\uddf2",honduras:"\ud83c\udded\ud83c\uddf3",croatia:"\ud83c\udded\ud83c\uddf7",haiti:"\ud83c\udded\ud83c\uddf9",hungary:"\ud83c\udded\ud83c\uddfa",canary_islands:"\ud83c\uddee\ud83c\udde8",indonesia:"\ud83c\uddee\ud83c\udde9",ireland:"\ud83c\uddee\ud83c\uddea",israel:"\ud83c\uddee\ud83c\uddf1",isle_of_man:"\ud83c\uddee\ud83c\uddf2",india:"\ud83c\uddee\ud83c\uddf3",british_indian_ocean_territory:"\ud83c\uddee\ud83c\uddf4",iraq:"\ud83c\uddee\ud83c\uddf6",iran:"\ud83c\uddee\ud83c\uddf7",iceland:"\ud83c\uddee\ud83c\uddf8",it:"\ud83c\uddee\ud83c\uddf9",jersey:"\ud83c\uddef\ud83c\uddea",jamaica:"\ud83c\uddef\ud83c\uddf2",jordan:"\ud83c\uddef\ud83c\uddf4",jp:"\ud83c\uddef\ud83c\uddf5",kenya:"\ud83c\uddf0\ud83c\uddea",kyrgyzstan:"\ud83c\uddf0\ud83c\uddec",cambodia:"\ud83c\uddf0\ud83c\udded",kiribati:"\ud83c\uddf0\ud83c\uddee",comoros:"\ud83c\uddf0\ud83c\uddf2",st_kitts_nevis:"\ud83c\uddf0\ud83c\uddf3",north_korea:"\ud83c\uddf0\ud83c\uddf5",kr:"\ud83c\uddf0\ud83c\uddf7",kuwait:"\ud83c\uddf0\ud83c\uddfc",cayman_islands:"\ud83c\uddf0\ud83c\uddfe",kazakhstan:"\ud83c\uddf0\ud83c\uddff",laos:"\ud83c\uddf1\ud83c\udde6",lebanon:"\ud83c\uddf1\ud83c\udde7",st_lucia:"\ud83c\uddf1\ud83c\udde8",liechtenstein:"\ud83c\uddf1\ud83c\uddee",sri_lanka:"\ud83c\uddf1\ud83c\uddf0",liberia:"\ud83c\uddf1\ud83c\uddf7",lesotho:"\ud83c\uddf1\ud83c\uddf8",lithuania:"\ud83c\uddf1\ud83c\uddf9",luxembourg:"\ud83c\uddf1\ud83c\uddfa",latvia:"\ud83c\uddf1\ud83c\uddfb",libya:"\ud83c\uddf1\ud83c\uddfe",morocco:"\ud83c\uddf2\ud83c\udde6",monaco:"\ud83c\uddf2\ud83c\udde8",moldova:"\ud83c\uddf2\ud83c\udde9",montenegro:"\ud83c\uddf2\ud83c\uddea",st_martin:"\ud83c\uddf2\ud83c\uddeb",madagascar:"\ud83c\uddf2\ud83c\uddec",marshall_islands:"\ud83c\uddf2\ud83c\udded",macedonia:"\ud83c\uddf2\ud83c\uddf0",mali:"\ud83c\uddf2\ud83c\uddf1",myanmar:"\ud83c\uddf2\ud83c\uddf2",mongolia:"\ud83c\uddf2\ud83c\uddf3",macau:"\ud83c\uddf2\ud83c\uddf4",northern_mariana_islands:"\ud83c\uddf2\ud83c\uddf5",martinique:"\ud83c\uddf2\ud83c\uddf6",mauritania:"\ud83c\uddf2\ud83c\uddf7",montserrat:"\ud83c\uddf2\ud83c\uddf8",malta:"\ud83c\uddf2\ud83c\uddf9",mauritius:"\ud83c\uddf2\ud83c\uddfa",maldives:"\ud83c\uddf2\ud83c\uddfb",malawi:"\ud83c\uddf2\ud83c\uddfc",mexico:"\ud83c\uddf2\ud83c\uddfd",malaysia:"\ud83c\uddf2\ud83c\uddfe",mozambique:"\ud83c\uddf2\ud83c\uddff",namibia:"\ud83c\uddf3\ud83c\udde6",new_caledonia:"\ud83c\uddf3\ud83c\udde8",niger:"\ud83c\uddf3\ud83c\uddea",norfolk_island:"\ud83c\uddf3\ud83c\uddeb",nigeria:"\ud83c\uddf3\ud83c\uddec",nicaragua:"\ud83c\uddf3\ud83c\uddee",netherlands:"\ud83c\uddf3\ud83c\uddf1",norway:"\ud83c\uddf3\ud83c\uddf4",nepal:"\ud83c\uddf3\ud83c\uddf5",nauru:"\ud83c\uddf3\ud83c\uddf7",niue:"\ud83c\uddf3\ud83c\uddfa",new_zealand:"\ud83c\uddf3\ud83c\uddff",oman:"\ud83c\uddf4\ud83c\uddf2",panama:"\ud83c\uddf5\ud83c\udde6",peru:"\ud83c\uddf5\ud83c\uddea",french_polynesia:"\ud83c\uddf5\ud83c\uddeb",papua_new_guinea:"\ud83c\uddf5\ud83c\uddec",philippines:"\ud83c\uddf5\ud83c\udded",pakistan:"\ud83c\uddf5\ud83c\uddf0",poland:"\ud83c\uddf5\ud83c\uddf1",st_pierre_miquelon:"\ud83c\uddf5\ud83c\uddf2",pitcairn_islands:"\ud83c\uddf5\ud83c\uddf3",puerto_rico:"\ud83c\uddf5\ud83c\uddf7",palestinian_territories:"\ud83c\uddf5\ud83c\uddf8",portugal:"\ud83c\uddf5\ud83c\uddf9",palau:"\ud83c\uddf5\ud83c\uddfc",paraguay:"\ud83c\uddf5\ud83c\uddfe",qatar:"\ud83c\uddf6\ud83c\udde6",reunion:"\ud83c\uddf7\ud83c\uddea",romania:"\ud83c\uddf7\ud83c\uddf4",serbia:"\ud83c\uddf7\ud83c\uddf8",ru:"\ud83c\uddf7\ud83c\uddfa",rwanda:"\ud83c\uddf7\ud83c\uddfc",saudi_arabia:"\ud83c\uddf8\ud83c\udde6",solomon_islands:"\ud83c\uddf8\ud83c\udde7",seychelles:"\ud83c\uddf8\ud83c\udde8",sudan:"\ud83c\uddf8\ud83c\udde9",sweden:"\ud83c\uddf8\ud83c\uddea",singapore:"\ud83c\uddf8\ud83c\uddec",st_helena:"\ud83c\uddf8\ud83c\udded",slovenia:"\ud83c\uddf8\ud83c\uddee",svalbard_jan_mayen:"\ud83c\uddf8\ud83c\uddef",slovakia:"\ud83c\uddf8\ud83c\uddf0",sierra_leone:"\ud83c\uddf8\ud83c\uddf1",san_marino:"\ud83c\uddf8\ud83c\uddf2",senegal:"\ud83c\uddf8\ud83c\uddf3",somalia:"\ud83c\uddf8\ud83c\uddf4",suriname:"\ud83c\uddf8\ud83c\uddf7",south_sudan:"\ud83c\uddf8\ud83c\uddf8",sao_tome_principe:"\ud83c\uddf8\ud83c\uddf9",el_salvador:"\ud83c\uddf8\ud83c\uddfb",sint_maarten:"\ud83c\uddf8\ud83c\uddfd",syria:"\ud83c\uddf8\ud83c\uddfe",swaziland:"\ud83c\uddf8\ud83c\uddff",tristan_da_cunha:"\ud83c\uddf9\ud83c\udde6",turks_caicos_islands:"\ud83c\uddf9\ud83c\udde8",chad:"\ud83c\uddf9\ud83c\udde9",french_southern_territories:"\ud83c\uddf9\ud83c\uddeb",togo:"\ud83c\uddf9\ud83c\uddec",thailand:"\ud83c\uddf9\ud83c\udded",tajikistan:"\ud83c\uddf9\ud83c\uddef",tokelau:"\ud83c\uddf9\ud83c\uddf0",timor_leste:"\ud83c\uddf9\ud83c\uddf1",turkmenistan:"\ud83c\uddf9\ud83c\uddf2",tunisia:"\ud83c\uddf9\ud83c\uddf3",tonga:"\ud83c\uddf9\ud83c\uddf4",tr:"\ud83c\uddf9\ud83c\uddf7",trinidad_tobago:"\ud83c\uddf9\ud83c\uddf9",tuvalu:"\ud83c\uddf9\ud83c\uddfb",taiwan:"\ud83c\uddf9\ud83c\uddfc",tanzania:"\ud83c\uddf9\ud83c\uddff",ukraine:"\ud83c\uddfa\ud83c\udde6",uganda:"\ud83c\uddfa\ud83c\uddec",us_outlying_islands:"\ud83c\uddfa\ud83c\uddf2",united_nations:"\ud83c\uddfa\ud83c\uddf3",us:"\ud83c\uddfa\ud83c\uddf8",uruguay:"\ud83c\uddfa\ud83c\uddfe",uzbekistan:"\ud83c\uddfa\ud83c\uddff",vatican_city:"\ud83c\uddfb\ud83c\udde6",st_vincent_grenadines:"\ud83c\uddfb\ud83c\udde8",venezuela:"\ud83c\uddfb\ud83c\uddea",british_virgin_islands:"\ud83c\uddfb\ud83c\uddec",us_virgin_islands:"\ud83c\uddfb\ud83c\uddee",vietnam:"\ud83c\uddfb\ud83c\uddf3",vanuatu:"\ud83c\uddfb\ud83c\uddfa",wallis_futuna:"\ud83c\uddfc\ud83c\uddeb",samoa:"\ud83c\uddfc\ud83c\uddf8",kosovo:"\ud83c\uddfd\ud83c\uddf0",yemen:"\ud83c\uddfe\ud83c\uddea",mayotte:"\ud83c\uddfe\ud83c\uddf9",south_africa:"\ud83c\uddff\ud83c\udde6",zambia:"\ud83c\uddff\ud83c\uddf2",zimbabwe:"\ud83c\uddff\ud83c\uddfc",england:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f",scotland:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f",wales:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f"},renderer:e=>e.emoji}));const Ld=()=>{const[e,n]=(0,t.useState)(!1);return mt(pt.FK,{children:mt($e,{children:mt(Sr,{children:mt(pt.FK,{children:[mt($r,{onLoaded:n}),e&&mt(ke,{children:mt(be,{path:"/",element:mt(Dd,{}),children:mt(be,{path:"/",element:mt(su,{})})})})]})})})})},Rd=e=>{e&&n.e(685).then(n.bind(n,685)).then((t=>{let{onCLS:n,onINP:r,onFCP:o,onLCP:a,onTTFB:i}=t;n(e),r(e),o(e),a(e),i(e)}))},zd=document.getElementById("root");zd&&(0,t.render)(mt(Ld,{}),zd),Rd()})()})(); \ No newline at end of file diff --git a/app/vlselect/vmui/static/js/main.64aea685.js.LICENSE.txt b/app/vlselect/vmui/static/js/main.aaafe439.js.LICENSE.txt similarity index 100% rename from app/vlselect/vmui/static/js/main.64aea685.js.LICENSE.txt rename to app/vlselect/vmui/static/js/main.aaafe439.js.LICENSE.txt diff --git a/app/vmselect/vmui/asset-manifest.json b/app/vmselect/vmui/asset-manifest.json index b1d52c0d0..a5692f74b 100644 --- a/app/vmselect/vmui/asset-manifest.json +++ b/app/vmselect/vmui/asset-manifest.json @@ -1,13 +1,13 @@ { "files": { "main.css": "./static/css/main.d781989c.css", - "main.js": "./static/js/main.68e2aae8.js", + "main.js": "./static/js/main.7ec4e6eb.js", "static/js/685.f772060c.chunk.js": "./static/js/685.f772060c.chunk.js", "static/media/MetricsQL.md": "./static/media/MetricsQL.a00044c91d9781cf8557.md", "index.html": "./index.html" }, "entrypoints": [ "static/css/main.d781989c.css", - "static/js/main.68e2aae8.js" + "static/js/main.7ec4e6eb.js" ] } \ No newline at end of file diff --git a/app/vmselect/vmui/config.json b/app/vmselect/vmui/config.json new file mode 100644 index 000000000..4bb6a1501 --- /dev/null +++ b/app/vmselect/vmui/config.json @@ -0,0 +1,5 @@ +{ + "license": { + "type": "opensource" + } +} diff --git a/app/vmselect/vmui/index.html b/app/vmselect/vmui/index.html index 0dd3f5db0..6fdd68e56 100644 --- a/app/vmselect/vmui/index.html +++ b/app/vmselect/vmui/index.html @@ -1 +1 @@ -vmui
    \ No newline at end of file +vmui
    \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.68e2aae8.js b/app/vmselect/vmui/static/js/main.68e2aae8.js deleted file mode 100644 index a2674a17e..000000000 --- a/app/vmselect/vmui/static/js/main.68e2aae8.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.68e2aae8.js.LICENSE.txt */ -(()=>{var e={61:(e,t,n)=>{"use strict";var r=n(375),a=n(629),i=a(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&i(e,".prototype.")>-1?a(n):n}},629:(e,t,n)=>{"use strict";var r=n(989),a=n(375),i=n(259),o=n(277),l=a("%Function.prototype.apply%"),s=a("%Function.prototype.call%"),c=a("%Reflect.apply%",!0)||r.call(s,l),u=n(709),d=a("%Math.max%");e.exports=function(e){if("function"!==typeof e)throw new o("a function is required");var t=c(r,s,arguments);return i(t,1+d(0,e.length-(arguments.length-1)),!0)};var h=function(){return c(r,l,arguments)};u?u(e.exports,"apply",{value:h}):e.exports.apply=h},159:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",a="second",i="minute",o="hour",l="day",s="week",c="month",u="quarter",d="year",h="date",m="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),a=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(a,2,"0")},m:function e(t,n){if(t.date()1)return e(o[0])}else{var l=t.name;b[l]=t,a=l}return!r&&a&&(_=a),a||!r&&_},S=function(e,t){if(k(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new E(n)},C=y;C.l=x,C.i=k,C.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function v(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=v.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(C.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(p);if(r){var a=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return C},g.isValid=function(){return!(this.$d.toString()===m)},g.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return S(e)=0&&(i[d]=parseInt(u,10))}var h=i[3],m=24===h?0:h,p=i[0]+"-"+i[1]+"-"+i[2]+" "+m+":"+i[4]+":"+i[5]+":000",f=+t;return(a.utc(p).valueOf()-(f-=f%1e3))/6e4},s=r.prototype;s.tz=function(e,t){void 0===e&&(e=i);var n,r=this.utcOffset(),o=this.toDate(),l=o.toLocaleString("en-US",{timeZone:e}),s=Math.round((o-new Date(l))/1e3/60),c=15*-Math.round(o.getTimezoneOffset()/15)-s;if(Number(c)){if(n=a(l,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var u=n.utcOffset();n=n.add(r-u,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},s.offsetName=function(e){var t=this.$x.$timezone||a.tz.guess(),n=o(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return n&&n.value};var c=s.startOf;s.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(n,e,t).tz(this.$x.$timezone,!0)},a.tz=function(e,t,n){var r=n&&t,o=n||t||i,s=l(+a(),o);if("string"!=typeof e)return a(e).tz(o);var c=function(e,t,n){var r=e-60*t*1e3,a=l(r,n);if(t===a)return[r,t];var i=l(r-=60*(a-t)*1e3,n);return a===i?[r,a]:[e-60*Math.min(a,i)*1e3,Math.max(a,i)]}(a.utc(e,r).valueOf(),s,o),u=c[0],d=c[1],h=a(u).utcOffset(d);return h.$x.$timezone=o,h},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(e){i=e}}}()},220:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,a,i){var o=a.prototype;i.utc=function(e){return new a({date:e,utc:!0,args:arguments})},o.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},o.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var l=o.parse;o.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),l.call(this,e)};var s=o.init;o.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else s.call(this)};var c=o.utcOffset;o.utcOffset=function(r,a){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var a=(""+r[0]).match(n)||["-",0,0],i=a[0],o=60*+a[1]+ +a[2];return 0===o?0:"+"===i?o:-o}(r),null===r))return this;var o=Math.abs(r)<=16?60*r:r,l=this;if(a)return l.$offset=o,l.$u=0===r,l;if(0!==r){var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(l=this.local().add(o+s,e)).$offset=o,l.$x.$localOffset=s}else l=this.utc();return l};var u=o.format;o.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},o.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var d=o.toDate;o.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=o.diff;o.diff=function(e,t,n){if(e&&this.$u===e.$u)return h.call(this,e,t,n);var r=this.local(),a=i(e).local();return h.call(r,a,t,n)}}}()},411:(e,t,n)=>{"use strict";var r=n(709),a=n(430),i=n(277),o=n(553);e.exports=function(e,t,n){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new i("`obj` must be an object or a function`");if("string"!==typeof t&&"symbol"!==typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!o&&o(e,t);if(r)r(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===l&&d?d.enumerable:!l,value:n,writable:null===s&&d?d.writable:!s});else{if(!u&&(l||s||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},709:(e,t,n)=>{"use strict";var r=n(375)("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(a){r=!1}e.exports=r},123:e=>{"use strict";e.exports=EvalError},953:e=>{"use strict";e.exports=Error},780:e=>{"use strict";e.exports=RangeError},768:e=>{"use strict";e.exports=ReferenceError},430:e=>{"use strict";e.exports=SyntaxError},277:e=>{"use strict";e.exports=TypeError},619:e=>{"use strict";e.exports=URIError},307:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r{"use strict";var r=n(307);e.exports=Function.prototype.bind||r},375:(e,t,n)=>{"use strict";var r,a=n(953),i=n(123),o=n(780),l=n(768),s=n(430),c=n(277),u=n(619),d=Function,h=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(t){}},m=Object.getOwnPropertyDescriptor;if(m)try{m({},"")}catch(O){m=null}var p=function(){throw new c},f=m?function(){try{return p}catch(e){try{return m(arguments,"callee").get}catch(t){return p}}}():p,v=n(757)(),g=n(442)(),y=Object.getPrototypeOf||(g?function(e){return e.__proto__}:null),_={},b="undefined"!==typeof Uint8Array&&y?y(Uint8Array):r,w={__proto__:null,"%AggregateError%":"undefined"===typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":v&&y?y([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":_,"%AsyncGenerator%":_,"%AsyncGeneratorFunction%":_,"%AsyncIteratorPrototype%":_,"%Atomics%":"undefined"===typeof Atomics?r:Atomics,"%BigInt%":"undefined"===typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":a,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"===typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":_,"%Int8Array%":"undefined"===typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":v&&y?y(y([][Symbol.iterator]())):r,"%JSON%":"object"===typeof JSON?JSON:r,"%Map%":"undefined"===typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&v&&y?y((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?r:Promise,"%Proxy%":"undefined"===typeof Proxy?r:Proxy,"%RangeError%":o,"%ReferenceError%":l,"%Reflect%":"undefined"===typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&v&&y?y((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":v&&y?y(""[Symbol.iterator]()):r,"%Symbol%":v?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":f,"%TypedArray%":b,"%TypeError%":c,"%Uint8Array%":"undefined"===typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"===typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?r:WeakSet};if(y)try{null.error}catch(O){var k=y(y(O));w["%Error.prototype%"]=k}var x=function e(t){var n;if("%AsyncFunction%"===t)n=h("async function () {}");else if("%GeneratorFunction%"===t)n=h("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=h("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var a=e("%AsyncGenerator%");a&&y&&(n=y(a.prototype))}return w[t]=n,n},S={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(989),E=n(155),N=C.call(Function.call,Array.prototype.concat),A=C.call(Function.apply,Array.prototype.splice),M=C.call(Function.call,String.prototype.replace),T=C.call(Function.call,String.prototype.slice),$=C.call(Function.call,RegExp.prototype.exec),L=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,P=/\\(\\)?/g,I=function(e,t){var n,r=e;if(E(S,r)&&(r="%"+(n=S[r])[0]+"%"),E(w,r)){var a=w[r];if(a===_&&(a=x(r)),"undefined"===typeof a&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:a}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===$(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=T(e,0,1),n=T(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return M(e,L,(function(e,t,n,a){r[r.length]=n?M(a,P,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",a=I("%"+r+"%",t),i=a.name,o=a.value,l=!1,u=a.alias;u&&(r=u[0],A(n,N([0,1],u)));for(var d=1,h=!0;d=n.length){var g=m(o,p);o=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:o[p]}else h=E(o,p),o=o[p];h&&!l&&(w[i]=o)}}return o}},553:(e,t,n)=>{"use strict";var r=n(375)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(a){r=null}e.exports=r},734:(e,t,n)=>{"use strict";var r=n(709),a=function(){return!!r};a.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=a},442:e=>{"use strict";var t={__proto__:null,foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof n)}},757:(e,t,n)=>{"use strict";var r="undefined"!==typeof Symbol&&Symbol,a=n(175);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&a())))}},175:e=>{"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}},155:(e,t,n)=>{"use strict";var r=Function.prototype.call,a=Object.prototype.hasOwnProperty,i=n(989);e.exports=i.call(r,a)},267:(e,t,n)=>{var r=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),d=Object.prototype.toString,h=Math.max,m=Math.min,p=function(){return u.Date.now()};function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(f(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=f(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=i.test(e);return n||o.test(e)?l(e.slice(2),n?2:8):a.test(e)?NaN:+e}e.exports=function(e,t,n){var r,a,i,o,l,s,c=0,u=!1,d=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,i=a;return r=a=void 0,c=t,o=e.apply(i,n)}function _(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-c>=i}function b(){var e=p();if(_(e))return w(e);l=setTimeout(b,function(e){var n=t-(e-s);return d?m(n,i-(e-c)):n}(e))}function w(e){return l=void 0,g&&r?y(e):(r=a=void 0,o)}function k(){var e=p(),n=_(e);if(r=arguments,a=this,s=e,n){if(void 0===l)return function(e){return c=e,l=setTimeout(b,t),u?y(e):o}(s);if(d)return l=setTimeout(b,t),y(s)}return void 0===l&&(l=setTimeout(b,t)),o}return t=v(t)||0,f(n)&&(u=!!n.leading,i=(d="maxWait"in n)?h(v(n.maxWait)||0,t):i,g="trailing"in n?!!n.trailing:g),k.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=s=a=l=void 0},k.flush=function(){return void 0===l?o:w(p())},k}},424:(e,t,n)=>{var r="__lodash_hash_undefined__",a="[object Function]",i="[object GeneratorFunction]",o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,s=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,d=/^\[object .+?Constructor\]$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,m="object"==typeof self&&self&&self.Object===Object&&self,p=h||m||Function("return this")();var f=Array.prototype,v=Function.prototype,g=Object.prototype,y=p["__core-js_shared__"],_=function(){var e=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=v.toString,w=g.hasOwnProperty,k=g.toString,x=RegExp("^"+b.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=p.Symbol,C=f.splice,E=D(p,"Map"),N=D(Object,"create"),A=S?S.prototype:void 0,M=A?A.toString:void 0;function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},$.prototype.set=function(e,t){var n=this.__data__,r=P(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new T,map:new(E||$),string:new T}},L.prototype.delete=function(e){return R(this,e).delete(e)},L.prototype.get=function(e){return R(this,e).get(e)},L.prototype.has=function(e){return R(this,e).has(e)},L.prototype.set=function(e,t){return R(this,e).set(e,t),this};var z=j((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(U(e))return M?M.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return s.test(e)&&n.push(""),e.replace(c,(function(e,t,r,a){n.push(r?a.replace(u,"$1"):t||e)})),n}));function F(e){if("string"==typeof e||U(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function j(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=e.apply(this,r);return n.cache=i.set(a,o),o};return n.cache=new(j.Cache||L),n}j.Cache=L;var H=Array.isArray;function V(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function U(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==k.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:I(e,t);return void 0===r?n:r}},141:(e,t,n)=>{var r="function"===typeof Map&&Map.prototype,a=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&a&&"function"===typeof a.get?a.get:null,o=r&&Map.prototype.forEach,l="function"===typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&l?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=l&&s&&"function"===typeof s.get?s.get:null,u=l&&Set.prototype.forEach,d="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,m="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,f=Object.prototype.toString,v=Function.prototype.toString,g=String.prototype.match,y=String.prototype.slice,_=String.prototype.replace,b=String.prototype.toUpperCase,w=String.prototype.toLowerCase,k=RegExp.prototype.test,x=Array.prototype.concat,S=Array.prototype.join,C=Array.prototype.slice,E=Math.floor,N="function"===typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,M="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"===typeof Symbol&&"object"===typeof Symbol.iterator,$="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T||"symbol")?Symbol.toStringTag:null,L=Object.prototype.propertyIsEnumerable,P=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function I(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||k.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var r=e<0?-E(-e):E(e);if(r!==e){var a=String(r),i=y.call(t,a.length+1);return _.call(a,n,"$&_")+"."+_.call(_.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(t,n,"$&_")}var O=n(634),R=O.custom,D=V(R)?R:null;function z(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function F(e){return _.call(String(e),/"/g,""")}function j(e){return"[object Array]"===q(e)&&(!$||!("object"===typeof e&&$ in e))}function H(e){return"[object RegExp]"===q(e)&&(!$||!("object"===typeof e&&$ in e))}function V(e){if(T)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!M)return!1;try{return M.call(e),!0}catch(t){}return!1}e.exports=function e(t,r,a,l){var s=r||{};if(B(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(B(s,"maxStringLength")&&("number"===typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var f=!B(s,"customInspect")||s.customInspect;if("boolean"!==typeof f&&"symbol"!==f)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(B(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(B(s,"numericSeparator")&&"boolean"!==typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var b=s.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return W(t,s);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var k=String(t);return b?I(t,k):k}if("bigint"===typeof t){var E=String(t)+"n";return b?I(t,E):E}var A="undefined"===typeof s.depth?5:s.depth;if("undefined"===typeof a&&(a=0),a>=A&&A>0&&"object"===typeof t)return j(t)?"[Array]":"[Object]";var R=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=S.call(Array(e.indent+1)," ")}return{base:n,prev:S.call(Array(t+1),n)}}(s,a);if("undefined"===typeof l)l=[];else if(Y(l,t)>=0)return"[Circular]";function U(t,n,r){if(n&&(l=C.call(l)).push(n),r){var i={depth:s.depth};return B(s,"quoteStyle")&&(i.quoteStyle=s.quoteStyle),e(t,i,a+1,l)}return e(t,s,a+1,l)}if("function"===typeof t&&!H(t)){var K=function(e){if(e.name)return e.name;var t=g.call(v.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=X(t,U);return"[Function"+(K?": "+K:" (anonymous)")+"]"+(ee.length>0?" { "+S.call(ee,", ")+" }":"")}if(V(t)){var te=T?_.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):M.call(t);return"object"!==typeof t||T?te:Q(te)}if(function(e){if(!e||"object"!==typeof e)return!1;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"===typeof e.nodeName&&"function"===typeof e.getAttribute}(t)){for(var ne="<"+w.call(String(t.nodeName)),re=t.attributes||[],ae=0;ae"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,U);return R&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+J(ie,R)+"]":"[ "+S.call(ie,", ")+" ]"}if(function(e){return"[object Error]"===q(e)&&(!$||!("object"===typeof e&&$ in e))}(t)){var oe=X(t,U);return"cause"in Error.prototype||!("cause"in t)||L.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(oe,", ")+" }":"{ ["+String(t)+"] "+S.call(x.call("[cause]: "+U(t.cause),oe),", ")+" }"}if("object"===typeof t&&f){if(D&&"function"===typeof t[D]&&O)return O(t,{depth:A-a});if("symbol"!==f&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!==typeof e)return!1;try{i.call(e);try{c.call(e)}catch(ne){return!0}return e instanceof Map}catch(t){}return!1}(t)){var le=[];return o&&o.call(t,(function(e,n){le.push(U(n,t,!0)+" => "+U(e,t))})),G("Map",i.call(t),le,R)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{i.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(U(e,t))})),G("Set",c.call(t),se,R)}if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(ne){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return Z("WeakMap");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(ne){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return Z("WeakSet");if(function(e){if(!m||!e||"object"!==typeof e)return!1;try{return m.call(e),!0}catch(t){}return!1}(t))return Z("WeakRef");if(function(e){return"[object Number]"===q(e)&&(!$||!("object"===typeof e&&$ in e))}(t))return Q(U(Number(t)));if(function(e){if(!e||"object"!==typeof e||!N)return!1;try{return N.call(e),!0}catch(t){}return!1}(t))return Q(U(N.call(t)));if(function(e){return"[object Boolean]"===q(e)&&(!$||!("object"===typeof e&&$ in e))}(t))return Q(p.call(t));if(function(e){return"[object String]"===q(e)&&(!$||!("object"===typeof e&&$ in e))}(t))return Q(U(String(t)));if("undefined"!==typeof window&&t===window)return"{ [object Window] }";if("undefined"!==typeof globalThis&&t===globalThis||"undefined"!==typeof n.g&&t===n.g)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===q(e)&&(!$||!("object"===typeof e&&$ in e))}(t)&&!H(t)){var ce=X(t,U),ue=P?P(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",he=!ue&&$&&Object(t)===t&&$ in t?y.call(q(t),8,-1):de?"Object":"",me=(ue||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(he||de?"["+S.call(x.call([],he||[],de||[]),": ")+"] ":"");return 0===ce.length?me+"{}":R?me+"{"+J(ce,R)+"}":me+"{ "+S.call(ce,", ")+" }"}return String(t)};var U=Object.prototype.hasOwnProperty||function(e){return e in this};function B(e,t){return U.call(e,t)}function q(e){return f.call(e)}function Y(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return W(y.call(e,0,t.maxStringLength),t)+r}return z(_.call(_.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",t)}function K(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+b.call(t.toString(16))}function Q(e){return"Object("+e+")"}function Z(e){return e+" { ? }"}function G(e,t,n,r){return e+" ("+t+") {"+(r?J(n,r):S.call(n,", "))+"}"}function J(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+S.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var a=0;a{"use strict";n.r(t),n.d(t,{Children:()=>B,Component:()=>l.uA,Fragment:()=>l.FK,PureComponent:()=>z,StrictMode:()=>$e,Suspense:()=>Q,SuspenseList:()=>J,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>be,cloneElement:()=>Ee,createContext:()=>l.q6,createElement:()=>l.n,createFactory:()=>ke,createPortal:()=>ne,createRef:()=>l._3,default:()=>Fe,findDOMNode:()=>Ae,flushSync:()=>Te,forwardRef:()=>V,hydrate:()=>ue,isElement:()=>Re,isFragment:()=>Se,isMemo:()=>Ce,isValidElement:()=>xe,lazy:()=>G,memo:()=>F,render:()=>ce,startTransition:()=>Le,unmountComponentAtNode:()=>Ne,unstable_batchedUpdates:()=>Me,useCallback:()=>C,useContext:()=>E,useDebugValue:()=>N,useDeferredValue:()=>Pe,useEffect:()=>b,useErrorBoundary:()=>A,useId:()=>M,useImperativeHandle:()=>x,useInsertionEffect:()=>Oe,useLayoutEffect:()=>w,useMemo:()=>S,useReducer:()=>_,useRef:()=>k,useState:()=>y,useSyncExternalStore:()=>De,useTransition:()=>Ie,version:()=>we});var r,a,i,o,l=n(746),s=0,c=[],u=l.fF,d=u.__b,h=u.__r,m=u.diffed,p=u.__c,f=u.unmount,v=u.__;function g(e,t){u.__h&&u.__h(a,e,s||t),s=0;var n=a.__H||(a.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function y(e){return s=1,_(R,e)}function _(e,t,n){var i=g(r++,2);if(i.t=e,!i.__c&&(i.__=[n?n(t):R(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=a,!a.u)){var o=function(e,t,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!l||l.call(this,e,t,n);var a=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&i.__c.props===e)&&(!l||l.call(this,e,t,n))};a.u=!0;var l=a.shouldComponentUpdate,s=a.componentWillUpdate;a.componentWillUpdate=function(e,t,n){if(this.__e){var r=l;l=void 0,o(e,t,n),l=r}s&&s.call(this,e,t,n)},a.shouldComponentUpdate=o}return i.__N||i.__}function b(e,t){var n=g(r++,3);!u.__s&&O(n.__H,t)&&(n.__=e,n.i=t,a.__H.__h.push(n))}function w(e,t){var n=g(r++,4);!u.__s&&O(n.__H,t)&&(n.__=e,n.i=t,a.__h.push(n))}function k(e){return s=5,S((function(){return{current:e}}),[])}function x(e,t,n){s=6,w((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function S(e,t){var n=g(r++,7);return O(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function C(e,t){return s=8,S((function(){return e}),t)}function E(e){var t=a.context[e.__c],n=g(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(a)),t.props.value):e.__}function N(e,t){u.useDebugValue&&u.useDebugValue(t?t(e):e)}function A(e){var t=g(r++,10),n=y();return t.__=e,a.componentDidCatch||(a.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function M(){var e=g(r++,11);if(!e.__){for(var t=a.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function T(){for(var e;e=c.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(P),e.__H.__h.forEach(I),e.__H.__h=[]}catch(r){e.__H.__h=[],u.__e(r,e.__v)}}u.__b=function(e){a=null,d&&d(e)},u.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),v&&v(e,t)},u.__r=function(e){h&&h(e),r=0;var t=(a=e.__c).__H;t&&(i===a?(t.__h=[],a.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(P),t.__h.forEach(I),t.__h=[],r=0)),i=a},u.diffed=function(e){m&&m(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==c.push(t)&&o===u.requestAnimationFrame||((o=u.requestAnimationFrame)||L)(T)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),i=a=null},u.__c=function(e,t){t.some((function(e){try{e.__h.forEach(P),e.__h=e.__h.filter((function(e){return!e.__||I(e)}))}catch(a){t.some((function(e){e.__h&&(e.__h=[])})),t=[],u.__e(a,e.__v)}})),p&&p(e,t)},u.unmount=function(e){f&&f(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{P(e)}catch(e){t=e}})),n.__H=void 0,t&&u.__e(t,n.__v))};var $="function"==typeof requestAnimationFrame;function L(e){var t,n=function(){clearTimeout(r),$&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);$&&(t=requestAnimationFrame(n))}function P(e){var t=a,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),a=t}function I(e){var t=a;e.__c=e.__(),a=t}function O(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function R(e,t){return"function"==typeof t?t(e):t}function D(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function z(e,t){this.props=e,this.context=t}function F(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:D(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,l.n)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(z.prototype=new l.uA).isPureReactComponent=!0,z.prototype.shouldComponentUpdate=function(e,t){return D(this.props,e)||D(this.state,t)};var j=l.fF.__b;l.fF.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),j&&j(e)};var H="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function V(e){function t(t){if(!("ref"in t))return e(t,null);var n=t.ref;delete t.ref;var r=e(t,n);return t.ref=n,r}return t.$$typeof=H,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var U=function(e,t){return null==e?null:(0,l.v2)((0,l.v2)(e).map(t))},B={map:U,forEach:U,count:function(e){return e?(0,l.v2)(e).length:0},only:function(e){var t=(0,l.v2)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:l.v2},q=l.fF.__e;l.fF.__e=function(e,t,n,r){if(e.then)for(var a,i=t;i=i.__;)if((a=i.__c)&&a.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),a.__c(e,t);q(e,t,n,r)};var Y=l.fF.unmount;function W(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return W(e,t,n)}))),e}function K(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return K(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Q(){this.__u=0,this.t=null,this.__b=null}function Z(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function G(e){var t,n,r;function a(a){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,l.n)(n,a)}return a.displayName="Lazy",a.__f=!0,a}function J(){this.u=null,this.o=null}l.fF.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Y&&Y(e)},(Q.prototype=new l.uA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var a=Z(r.__v),i=!1,o=function(){i||(i=!0,n.__R=null,a?a(l):l())};n.__R=o;var l=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=K(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},Q.prototype.componentWillUnmount=function(){this.t=[]},Q.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=W(this.__b,n,r.__O=r.__P)}this.__b=null}var a=t.__a&&(0,l.n)(l.FK,null,e.fallback);return a&&(a.__u&=-33),[(0,l.n)(l.FK,null,t.__a?null:e.children),a]};var X=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),(0,l.XX)((0,l.n)(ee,{context:t.context},e.__v),t.l)}function ne(e,t){var n=(0,l.n)(te,{__v:e,i:t});return n.containerInfo=t,n}(J.prototype=new l.uA).__a=function(e){var t=this,n=Z(t.__v),r=t.o.get(e);return r[0]++,function(a){var i=function(){t.props.revealOrder?(r.push(a),X(t,e,r)):a()};n?n(i):i()}},J.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,l.v2)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},J.prototype.componentDidUpdate=J.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){X(e,n,t)}))};var re="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ae=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ie=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,oe=/[A-Z0-9]/g,le="undefined"!=typeof document,se=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function ce(e,t,n){return null==t.__k&&(t.textContent=""),(0,l.XX)(e,t),"function"==typeof n&&n(),e?e.__c:null}function ue(e,t,n){return(0,l.Qv)(e,t),"function"==typeof n&&n(),e?e.__c:null}l.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(l.uA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var de=l.fF.event;function he(){}function me(){return this.cancelBubble}function pe(){return this.defaultPrevented}l.fF.event=function(e){return de&&(e=de(e)),e.persist=he,e.isPropagationStopped=me,e.isDefaultPrevented=pe,e.nativeEvent=e};var fe,ve={enumerable:!1,configurable:!0,get:function(){return this.class}},ge=l.fF.vnode;l.fF.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},a=-1===n.indexOf("-");for(var i in t){var o=t[i];if(!("value"===i&&"defaultValue"in t&&null==o||le&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var s=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===o?o="":"translate"===s&&"no"===o?o=!1:"o"===s[0]&&"n"===s[1]?"ondoubleclick"===s?i="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||se(t.type)?"onfocus"===s?i="onfocusin":"onblur"===s?i="onfocusout":ie.test(i)&&(i=s):s=i="oninput":a&&ae.test(i)?i=i.replace(oe,"-$&").toLowerCase():null===o&&(o=void 0),"oninput"===s&&r[i=s]&&(i="oninputCapture"),r[i]=o}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",ve)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=re,ge&&ge(e)};var ye=l.fF.__r;l.fF.__r=function(e){ye&&ye(e),fe=e.__c};var _e=l.fF.diffed;l.fF.diffed=function(e){_e&&_e(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),fe=null};var be={ReactCurrentDispatcher:{current:{readContext:function(e){return fe.__n[e.__c].props.value},useCallback:C,useContext:E,useDebugValue:N,useDeferredValue:Pe,useEffect:b,useId:M,useImperativeHandle:x,useInsertionEffect:Oe,useLayoutEffect:w,useMemo:S,useReducer:_,useRef:k,useState:y,useSyncExternalStore:De,useTransition:Ie}}},we="18.3.1";function ke(e){return l.n.bind(null,e)}function xe(e){return!!e&&e.$$typeof===re}function Se(e){return xe(e)&&e.type===l.FK}function Ce(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ee(e){return xe(e)?l.Ob.apply(null,arguments):e}function Ne(e){return!!e.__k&&((0,l.XX)(null,e),!0)}function Ae(e){return e&&(e.base||1===e.nodeType&&e)||null}var Me=function(e,t){return e(t)},Te=function(e,t){return e(t)},$e=l.FK;function Le(e){e()}function Pe(e){return e}function Ie(){return[!1,Le]}var Oe=w,Re=xe;function De(e,t){var n=t(),r=y({h:{__:n,v:t}}),a=r[0].h,i=r[1];return w((function(){a.__=n,a.v=t,ze(a)&&i({h:a})}),[e,n,t]),b((function(){return ze(a)&&i({h:a}),e((function(){ze(a)&&i({h:a})}))}),[e]),n}function ze(e){var t,n,r=e.v,a=e.__;try{var i=r();return!((t=a)===(n=i)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}var Fe={useState:y,useId:M,useReducer:_,useEffect:b,useLayoutEffect:w,useInsertionEffect:Oe,useTransition:Ie,useDeferredValue:Pe,useSyncExternalStore:De,startTransition:Le,useRef:k,useImperativeHandle:x,useMemo:S,useCallback:C,useContext:E,useDebugValue:N,version:"18.3.1",Children:B,render:ce,hydrate:ue,unmountComponentAtNode:Ne,createPortal:ne,createElement:l.n,createContext:l.q6,createFactory:ke,cloneElement:Ee,createRef:l._3,Fragment:l.FK,isValidElement:xe,isElement:Re,isFragment:Se,isMemo:Ce,findDOMNode:Ae,Component:l.uA,PureComponent:z,memo:F,forwardRef:V,flushSync:Te,unstable_batchedUpdates:Me,StrictMode:$e,Suspense:Q,SuspenseList:J,lazy:G,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:be}},746:(e,t,n)=>{"use strict";n.d(t,{FK:()=>x,Ob:()=>q,Qv:()=>B,XX:()=>U,_3:()=>k,fF:()=>a,n:()=>b,q6:()=>Y,uA:()=>S,v2:()=>L});var r,a,i,o,l,s,c,u,d,h,m,p={},f=[],v=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function y(e,t){for(var n in t)e[n]=t[n];return e}function _(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function b(e,t,n){var a,i,o,l={};for(o in t)"key"==o?a=t[o]:"ref"==o?i=t[o]:l[o]=t[o];if(arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===l[o]&&(l[o]=e.defaultProps[o]);return w(e,l,a,i,null)}function w(e,t,n,r,o){var l={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==o?++i:o,__i:-1,__u:0};return null==o&&null!=a.vnode&&a.vnode(l),l}function k(){return{current:null}}function x(e){return e.children}function S(e,t){this.props=e,this.context=t}function C(e,t){if(null==t)return e.__?C(e.__,e.__i+1):null;for(var n;tt&&o.sort(c));A.__r=0}function M(e,t,n,r,a,i,o,l,s,c,u){var d,h,m,v,g,y=r&&r.__k||f,_=t.length;for(n.__d=s,T(n,t,y),s=n.__d,d=0;d<_;d++)null!=(m=n.__k[d])&&(h=-1===m.__i?p:y[m.__i]||p,m.__i=d,D(e,m,h,a,i,o,l,s,c,u),v=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&j(h.ref,null,m),u.push(m.ref,m.__c||v,m)),null==g&&null!=v&&(g=v),65536&m.__u||h.__k===m.__k?s=$(m,s,e):"function"==typeof m.type&&void 0!==m.__d?s=m.__d:v&&(s=v.nextSibling),m.__d=void 0,m.__u&=-196609);n.__d=s,n.__e=g}function T(e,t,n){var r,a,i,o,l,s=t.length,c=n.length,u=c,d=0;for(e.__k=[],r=0;r0?w(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,i=null,-1!==(l=a.__i=P(a,n,o,u))&&(u--,(i=n[l])&&(i.__u|=131072)),null==i||null===i.__v?(-1==l&&d--,"function"!=typeof a.type&&(a.__u|=65536)):l!==o&&(l==o-1?d--:l==o+1?d++:(l>o?d--:d++,a.__u|=65536))):a=e.__k[r]=null;if(u)for(r=0;r(null!=s&&0==(131072&s.__u)?1:0))for(;o>=0||l=0){if((s=t[o])&&0==(131072&s.__u)&&a==s.key&&i===s.type)return o;o--}if(l2&&(s.children=arguments.length>3?r.call(arguments,2):n),w(e.type,s,a||e.key,i||e.ref,null)}function Y(e,t){var n={__c:t="__cC"+m++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,N(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=f.slice,a={__e:function(e,t,n,r){for(var a,i,o;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&null!=i.getDerivedStateFromError&&(a.setState(i.getDerivedStateFromError(e)),o=a.__d),null!=a.componentDidCatch&&(a.componentDidCatch(e,r||{}),o=a.__d),o)return a.__E=a}catch(t){e=t}throw e}},i=0,S.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=y({},this.state),"function"==typeof e&&(e=e(y({},n),this.props)),e&&y(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),N(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),N(this))},S.prototype.render=x,o=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},A.__r=0,u=0,d=R(!1),h=R(!0),m=0},640:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:a}},215:(e,t,n)=>{"use strict";var r=n(518),a=n(968),i=n(640);e.exports={formats:i,parse:a,stringify:r}},968:(e,t,n)=>{"use strict";var r=n(570),a=Object.prototype.hasOwnProperty,i=Array.isArray,o={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},l=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,l=n.depth>0&&/(\[[^[\]]*])/.exec(i),c=l?i.slice(0,l.index):i,u=[];if(c){if(!n.plainObjects&&a.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var d=0;n.depth>0&&null!==(l=o.exec(i))&&d=0;--i){var o,l=e[i];if("[]"===l&&n.parseArrays)o=n.allowEmptyArrays&&(""===a||n.strictNullHandling&&null===a)?[]:[].concat(a);else{o=n.plainObjects?Object.create(null):{};var c="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,u=n.decodeDotInKeys?c.replace(/%2E/g,"."):c,d=parseInt(u,10);n.parseArrays||""!==u?!isNaN(d)&&l!==u&&String(d)===u&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(o=[])[d]=a:"__proto__"!==u&&(o[u]=a):o={0:a}}a=o}return a}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return o;if("undefined"!==typeof e.allowEmptyArrays&&"boolean"!==typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if("undefined"!==typeof e.decodeDotInKeys&&"boolean"!==typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&"undefined"!==typeof e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?o.charset:e.charset,n="undefined"===typeof e.duplicates?o.duplicates:e.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:"undefined"===typeof e.allowDots?!0===e.decodeDotInKeys||o.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"===typeof e.allowEmptyArrays?!!e.allowEmptyArrays:o.allowEmptyArrays,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:o.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:o.comma,decodeDotInKeys:"boolean"===typeof e.decodeDotInKeys?e.decodeDotInKeys:o.decodeDotInKeys,decoder:"function"===typeof e.decoder?e.decoder:o.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:o.depth,duplicates:n,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:o.plainObjects,strictDepth:"boolean"===typeof e.strictDepth?!!e.strictDepth:o.strictDepth,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var u="string"===typeof e?function(e,t){var n={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=c.split(t.delimiter,d),m=-1,p=t.charset;if(t.charsetSentinel)for(u=0;u-1&&(v=i(v)?[v]:v);var b=a.call(n,f);b&&"combine"===t.duplicates?n[f]=r.combine(n[f],v):b&&"last"!==t.duplicates||(n[f]=v)}return n}(e,n):e,d=n.plainObjects?Object.create(null):{},h=Object.keys(u),m=0;m{"use strict";var r=n(670),a=n(570),i=n(640),o=Object.prototype.hasOwnProperty,l={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,s(t)?t:[t])},d=Date.prototype.toISOString,h=i.default,m={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:a.encode,encodeValuesOnly:!1,format:h,formatter:i.formatters[h],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},p={},f=function e(t,n,i,o,l,c,d,h,f,v,g,y,_,b,w,k,x,S){for(var C,E=t,N=S,A=0,M=!1;void 0!==(N=N.get(p))&&!M;){var T=N.get(t);if(A+=1,"undefined"!==typeof T){if(T===A)throw new RangeError("Cyclic object value");M=!0}"undefined"===typeof N.get(p)&&(A=0)}if("function"===typeof v?E=v(n,E):E instanceof Date?E=_(E):"comma"===i&&s(E)&&(E=a.maybeMap(E,(function(e){return e instanceof Date?_(e):e}))),null===E){if(c)return f&&!k?f(n,m.encoder,x,"key",b):n;E=""}if("string"===typeof(C=E)||"number"===typeof C||"boolean"===typeof C||"symbol"===typeof C||"bigint"===typeof C||a.isBuffer(E))return f?[w(k?n:f(n,m.encoder,x,"key",b))+"="+w(f(E,m.encoder,x,"value",b))]:[w(n)+"="+w(String(E))];var $,L=[];if("undefined"===typeof E)return L;if("comma"===i&&s(E))k&&f&&(E=a.maybeMap(E,f)),$=[{value:E.length>0?E.join(",")||null:void 0}];else if(s(v))$=v;else{var P=Object.keys(E);$=g?P.sort(g):P}var I=h?n.replace(/\./g,"%2E"):n,O=o&&s(E)&&1===E.length?I+"[]":I;if(l&&s(E)&&0===E.length)return O+"[]";for(var R=0;R<$.length;++R){var D=$[R],z="object"===typeof D&&"undefined"!==typeof D.value?D.value:E[D];if(!d||null!==z){var F=y&&h?D.replace(/\./g,"%2E"):D,j=s(E)?"function"===typeof i?i(O,F):O:O+(y?"."+F:"["+F+"]");S.set(t,A);var H=r();H.set(p,S),u(L,e(z,j,i,o,l,c,d,h,"comma"===i&&k&&s(E)?null:f,v,g,y,_,b,w,k,x,H))}}return L};e.exports=function(e,t){var n,a=e,c=function(e){if(!e)return m;if("undefined"!==typeof e.allowEmptyArrays&&"boolean"!==typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if("undefined"!==typeof e.encodeDotInKeys&&"boolean"!==typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&"undefined"!==typeof e.encoder&&"function"!==typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||m.charset;if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=i.default;if("undefined"!==typeof e.format){if(!o.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r,a=i.formatters[n],c=m.filter;if(("function"===typeof e.filter||s(e.filter))&&(c=e.filter),r=e.arrayFormat in l?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":m.arrayFormat,"commaRoundTrip"in e&&"boolean"!==typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u="undefined"===typeof e.allowDots?!0===e.encodeDotInKeys||m.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"===typeof e.addQueryPrefix?e.addQueryPrefix:m.addQueryPrefix,allowDots:u,allowEmptyArrays:"boolean"===typeof e.allowEmptyArrays?!!e.allowEmptyArrays:m.allowEmptyArrays,arrayFormat:r,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:m.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:"undefined"===typeof e.delimiter?m.delimiter:e.delimiter,encode:"boolean"===typeof e.encode?e.encode:m.encode,encodeDotInKeys:"boolean"===typeof e.encodeDotInKeys?e.encodeDotInKeys:m.encodeDotInKeys,encoder:"function"===typeof e.encoder?e.encoder:m.encoder,encodeValuesOnly:"boolean"===typeof e.encodeValuesOnly?e.encodeValuesOnly:m.encodeValuesOnly,filter:c,format:n,formatter:a,serializeDate:"function"===typeof e.serializeDate?e.serializeDate:m.serializeDate,skipNulls:"boolean"===typeof e.skipNulls?e.skipNulls:m.skipNulls,sort:"function"===typeof e.sort?e.sort:null,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:m.strictNullHandling}}(t);"function"===typeof c.filter?a=(0,c.filter)("",a):s(c.filter)&&(n=c.filter);var d=[];if("object"!==typeof a||null===a)return"";var h=l[c.arrayFormat],p="comma"===h&&c.commaRoundTrip;n||(n=Object.keys(a)),c.sort&&n.sort(c.sort);for(var v=r(),g=0;g0?b+_:""}},570:(e,t,n)=>{"use strict";var r=n(640),a=Object.prototype.hasOwnProperty,i=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),l=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],a=0;a=s?l.slice(u,u+s):l,h=[],m=0;m=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||i===r.RFC1738&&(40===p||41===p)?h[h.length]=d.charAt(m):p<128?h[h.length]=o[p]:p<2048?h[h.length]=o[192|p>>6]+o[128|63&p]:p<55296||p>=57344?h[h.length]=o[224|p>>12]+o[128|p>>6&63]+o[128|63&p]:(m+=1,p=65536+((1023&p)<<10|1023&d.charCodeAt(m)),h[h.length]=o[240|p>>18]+o[128|p>>12&63]+o[128|p>>6&63]+o[128|63&p])}c+=h.join("")}return c},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;r{e.exports=n(204)},204:(e,t,n)=>{"use strict";var r=function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(n(609)),a=n(609);function i(){return(i=Object.assign||function(e){for(var t=1;tr.length&&h(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var a=r.length,i=t.length;i>=r.length;i--){var o=t[i];if(!h(e,i)&&m(e,i,o)){a=i+1;break}}return a}function v(e,t){return f(e,t)===e.mask.length}function g(e,t){var n=e.maskChar,r=e.mask,a=e.prefix;if(!n){for((t=y(e,"",t,0)).lengtht.length&&(t+=a.slice(t.length,r)),l.every((function(n){for(;u=n,h(e,c=r)&&u!==a[c];){if(r>=t.length&&(t+=a[r]),l=n,i&&h(e,r)&&l===i)return!0;if(++r>=a.length)return!1}var l,c,u;return!m(e,r,n)&&n!==i||(ra.start?d=(u=function(e,t,n,r){var a=e.mask,i=e.maskChar,o=n.split(""),l=r;return o.every((function(t){for(;o=t,h(e,n=r)&&o!==a[n];)if(++r>=a.length)return!1;var n,o;return(m(e,r,t)||t===i)&&r++,r=i.length?p=i.length:p=o.length&&p{"use strict";var r=n(375),a=n(411),i=n(734)(),o=n(553),l=n(277),s=r("%Math.floor%");e.exports=function(e,t){if("function"!==typeof e)throw new l("`fn` is not a function");if("number"!==typeof t||t<0||t>4294967295||s(t)!==t)throw new l("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&o){var u=o(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(i?a(e,"length",t,!0,!0):a(e,"length",t)),e}},670:(e,t,n)=>{"use strict";var r=n(375),a=n(61),i=n(141),o=n(277),l=r("%WeakMap%",!0),s=r("%Map%",!0),c=a("WeakMap.prototype.get",!0),u=a("WeakMap.prototype.set",!0),d=a("WeakMap.prototype.has",!0),h=a("Map.prototype.get",!0),m=a("Map.prototype.set",!0),p=a("Map.prototype.has",!0),f=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new o("Side channel does not contain "+i(e))},get:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return c(e,r)}else if(s){if(t)return h(t,r)}else if(n)return function(e,t){var n=f(e,t);return n&&n.value}(n,r)},has:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return d(e,r)}else if(s){if(t)return p(t,r)}else if(n)return function(e,t){return!!f(e,t)}(n,r);return!1},set:function(r,a){l&&r&&("object"===typeof r||"function"===typeof r)?(e||(e=new l),u(e,r,a)):s?(t||(t=new s),m(t,r,a)):(n||(n={key:{},next:null}),function(e,t,n){var r=f(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,a))}};return r}},634:()=>{},738:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+e+".f772060c.chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="vmui:";n.l=(r,a,i,o)=>{if(e[r])e[r].push(a);else{var l,s;if(void 0!==i)for(var c=document.getElementsByTagName("script"),u=0;u{l.onerror=l.onload=null,clearTimeout(m);var a=e[r];if(delete e[r],l.parentNode&&l.parentNode.removeChild(l),a&&a.forEach((e=>e(n))),t)return t(n)},m=setTimeout(h.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=h.bind(null,l.onerror),l.onload=h.bind(null,l.onload),s&&document.head.appendChild(l)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="./",(()=>{var e={792:0};n.f.j=(t,r)=>{var a=n.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else{var i=new Promise(((n,r)=>a=e[t]=[n,r]));r.push(a[2]=i);var o=n.p+n.u(t),l=new Error;n.l(o,(r=>{if(n.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var i=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",l.name="ChunkLoadError",l.type=i,l.request=o,a[1](l)}}),"chunk-"+t,t)}};var t=(t,r)=>{var a,i,o=r[0],l=r[1],s=r[2],c=0;if(o.some((t=>0!==e[t]))){for(a in l)n.o(l,a)&&(n.m[a]=l[a]);if(s)s(n)}for(t&&t(r);c{"use strict";var e={};n.r(e),n.d(e,{AlarmIcon:()=>Un,ArrowDownIcon:()=>Fn,ArrowDropDownIcon:()=>jn,CalendarIcon:()=>Vn,ChartIcon:()=>Wn,ClockIcon:()=>Hn,CloseIcon:()=>Ln,CodeIcon:()=>Qn,CollapseIcon:()=>kr,CopyIcon:()=>rr,DeleteIcon:()=>Zn,DoneIcon:()=>Xn,DownloadIcon:()=>br,DragIcon:()=>ar,ErrorIcon:()=>Rn,ExpandIcon:()=>wr,FunctionIcon:()=>gr,InfoIcon:()=>In,IssueIcon:()=>lr,KeyboardIcon:()=>Bn,LabelIcon:()=>yr,ListIcon:()=>mr,LogoAnomalyIcon:()=>Mn,LogoIcon:()=>Nn,LogoLogsIcon:()=>An,LogoShortIcon:()=>Tn,MetricIcon:()=>vr,MinusIcon:()=>Jn,MoreIcon:()=>ur,PlayCircleOutlineIcon:()=>Yn,PlayIcon:()=>qn,PlusIcon:()=>Gn,Prettify:()=>nr,QuestionIcon:()=>sr,RefreshIcon:()=>zn,RestartIcon:()=>Pn,SearchIcon:()=>xr,SettingsIcon:()=>$n,SpinnerIcon:()=>Sr,StarBorderIcon:()=>pr,StarIcon:()=>fr,StorageIcon:()=>cr,SuccessIcon:()=>Dn,TableIcon:()=>Kn,TimelineIcon:()=>ir,TipIcon:()=>hr,TuneIcon:()=>dr,ValueIcon:()=>_r,VisibilityIcon:()=>er,VisibilityOffIcon:()=>tr,WarningIcon:()=>On,WikiIcon:()=>or});var t,r=n(609),a=n(159),i=n.n(a),o=n(7),l=n.n(o),s=n(648),c=n.n(s),u=n(220),d=n.n(u);function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function b(e,n,r,a){void 0===a&&(a={});let{window:i=document.defaultView,v5Compat:o=!1}=a,l=i.history,s=t.Pop,c=null,u=d();function d(){return(l.state||{idx:null}).idx}function f(){s=t.Pop;let e=d(),n=null==e?null:e-u;u=e,c&&c({action:s,location:b.location,delta:n})}function _(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"===typeof e?e:y(e);return n=n.replace(/ $/,"%20"),p(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==u&&(u=0,l.replaceState(h({},l.state,{idx:u}),""));let b={get action(){return s},get location(){return e(i,l)},listen(e){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(m,f),c=e,()=>{i.removeEventListener(m,f),c=null}},createHref:e=>n(i,e),createURL:_,encodeLocation(e){let t=_(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,n){s=t.Push;let a=g(b.location,e,n);r&&r(a,e),u=d()+1;let h=v(a,u),m=b.createHref(a);try{l.pushState(h,"",m)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;i.location.assign(m)}o&&c&&c({action:s,location:b.location,delta:1})},replace:function(e,n){s=t.Replace;let a=g(b.location,e,n);r&&r(a,e),u=d();let i=v(a,u),h=b.createHref(a);l.replaceState(i,"",h),o&&c&&c({action:s,location:b.location,delta:0})},go:e=>l.go(e)};return b}var w;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(w||(w={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function k(e,t,n){return void 0===n&&(n="/"),x(e,t,n,!1)}function x(e,t,n,r){let a=D(("string"===typeof t?_(t):t).pathname||"/",n);if(null==a)return null;let i=S(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let o=null;for(let l=0;null==o&&l{let o={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};o.relativePath.startsWith("/")&&(p(o.relativePath.startsWith(r),'Absolute route path "'+o.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(r.length));let l=V([r,o.relativePath]),s=n.concat(o);e.children&&e.children.length>0&&(p(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),S(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:P(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of C(e.path))a(e,t,r);else a(e,t)})),t}function C(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return a?[i,""]:[i];let o=C(r.join("/")),l=[];return l.push(...o.map((e=>""===e?i:[i,e].join("/")))),a&&l.push(...o),l.map((t=>e.startsWith("/")&&""===t?"/":t))}const E=/^:[\w-]+$/,N=3,A=2,M=1,T=10,$=-2,L=e=>"*"===e;function P(e,t){let n=e.split("/"),r=n.length;return n.some(L)&&(r+=$),t&&(r+=A),n.filter((e=>!L(e))).reduce(((e,t)=>e+(E.test(t)?N:""===t?M:T)),r)}function I(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,a={},i="/",o=[];for(let l=0;l(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))");let i=new RegExp(a,t?void 0:"i");return[i,r]}(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],o=i.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:a}=t;if("*"===r){let e=l[n]||"";o=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const s=l[n];return e[r]=a&&!s?void 0:(s||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:o,pattern:e}}function R(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return f(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function D(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function z(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function F(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function j(e,t){let n=F(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function H(e,t,n,r){let a;void 0===r&&(r=!1),"string"===typeof e?a=_(e):(a=h({},e),p(!a.pathname||!a.pathname.includes("?"),z("?","pathname","search",a)),p(!a.pathname||!a.pathname.includes("#"),z("#","pathname","hash",a)),p(!a.search||!a.search.includes("#"),z("#","search","hash",a)));let i,o=""===e||""===a.pathname,l=o?"/":a.pathname;if(null==l)i=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}i=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:a=""}="string"===typeof e?_(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:B(r),hash:q(a)}}(a,i),c=l&&"/"!==l&&l.endsWith("/"),u=(o||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!c&&!u||(s.pathname+="/"),s}const V=e=>e.join("/").replace(/\/\/+/g,"/"),U=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",q=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function Y(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const W=["post","put","patch","delete"],K=(new Set(W),["get",...W]);new Set(K),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.current=!0}));let a=r.useCallback((function(r,a){void 0===a&&(a={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,Q({fromRouteId:t},a)))}),[e,t]);return a}():function(){ne()||p(!1);let e=r.useContext(Z),{basename:t,future:n,navigator:a}=r.useContext(J),{matches:i}=r.useContext(ee),{pathname:o}=re(),l=JSON.stringify(j(i,n.v7_relativeSplatPath)),s=r.useRef(!1);ae((()=>{s.current=!0}));let c=r.useCallback((function(n,r){if(void 0===r&&(r={}),!s.current)return;if("number"===typeof n)return void a.go(n);let i=H(n,JSON.parse(l),o,"path"===r.relative);null==e&&"/"!==t&&(i.pathname="/"===i.pathname?t:V([t,i.pathname])),(r.replace?a.replace:a.push)(i,r.state,r)}),[t,a,l,o,e]);return c}()}const oe=r.createContext(null);function le(e,t){let{relative:n}=void 0===t?{}:t,{future:a}=r.useContext(J),{matches:i}=r.useContext(ee),{pathname:o}=re(),l=JSON.stringify(j(i,a.v7_relativeSplatPath));return r.useMemo((()=>H(e,JSON.parse(l),o,"path"===n)),[e,l,o,n])}function se(e,n,a,i){ne()||p(!1);let{navigator:o}=r.useContext(J),{matches:l}=r.useContext(ee),s=l[l.length-1],c=s?s.params:{},u=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let d,h=re();if(n){var m;let e="string"===typeof n?_(n):n;"/"===u||(null==(m=e.pathname)?void 0:m.startsWith(u))||p(!1),d=e}else d=h;let f=d.pathname||"/",v=f;if("/"!==u){let e=u.replace(/^\//,"").split("/");v="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=k(e,{pathname:v});let y=me(g&&g.map((e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:V([u,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:V([u,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,a,i);return n&&y?r.createElement(X.Provider,{value:{location:Q({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:t.Pop}},y):y}function ce(){let e=function(){var e;let t=r.useContext(te),n=ge(fe.UseRouteError),a=ye(fe.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[a]}(),t=Y(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:a};return r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:i},n):null,null)}const ue=r.createElement(ce,null);class de extends r.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?r.createElement(ee.Provider,{value:this.props.routeContext},r.createElement(te.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function he(e){let{routeContext:t,match:n,children:a}=e,i=r.useContext(Z);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(ee.Provider,{value:t},a)}function me(e,t,n,a){var i;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===a&&(a=null),null==e){var o;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(o=a)&&o.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let l=e,s=null==(i=n)?void 0:i.errors;if(null!=s){let e=l.findIndex((e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id])));e>=0||p(!1),l=l.slice(0,Math.min(l.length,e+1))}let c=!1,u=-1;if(n&&a&&a.v7_partialHydration)for(let r=0;r=0?l.slice(0,u+1):[l[0]];break}}}return l.reduceRight(((e,a,i)=>{let o,d=!1,h=null,m=null;var p;n&&(o=s&&a.route.id?s[a.route.id]:void 0,h=a.route.errorElement||ue,c&&(u<0&&0===i?(p="route-fallback",!1||_e[p]||(_e[p]=!0),d=!0,m=null):u===i&&(d=!0,m=a.route.hydrateFallbackElement||null)));let f=t.concat(l.slice(0,i+1)),v=()=>{let t;return t=o?h:d?m:a.route.Component?r.createElement(a.route.Component,null):a.route.element?a.route.element:e,r.createElement(he,{match:a,routeContext:{outlet:e,matches:f,isDataRoute:null!=n},children:t})};return n&&(a.route.ErrorBoundary||a.route.errorElement||0===i)?r.createElement(de,{location:n.location,revalidation:n.revalidation,component:h,error:o,children:v(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):v()}),null)}var pe=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(pe||{}),fe=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(fe||{});function ve(e){let t=r.useContext(Z);return t||p(!1),t}function ge(e){let t=r.useContext(G);return t||p(!1),t}function ye(e){let t=function(){let e=r.useContext(ee);return e||p(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||p(!1),n.route.id}const _e={};r.startTransition;function be(e){return function(e){let t=r.useContext(ee).outlet;return t?r.createElement(oe.Provider,{value:e},t):t}(e.context)}function we(e){p(!1)}function ke(e){let{basename:n="/",children:a=null,location:i,navigationType:o=t.Pop,navigator:l,static:s=!1,future:c}=e;ne()&&p(!1);let u=n.replace(/^\/*/,"/"),d=r.useMemo((()=>({basename:u,navigator:l,static:s,future:Q({v7_relativeSplatPath:!1},c)})),[u,c,l,s]);"string"===typeof i&&(i=_(i));let{pathname:h="/",search:m="",hash:f="",state:v=null,key:g="default"}=i,y=r.useMemo((()=>{let e=D(h,u);return null==e?null:{location:{pathname:e,search:m,hash:f,state:v,key:g},navigationType:o}}),[u,h,m,f,v,g,o]);return null==y?null:r.createElement(J.Provider,{value:d},r.createElement(X.Provider,{children:a,value:y}))}function xe(e){let{children:t,location:n}=e;return se(Se(t),n)}new Promise((()=>{}));r.Component;function Se(e,t){void 0===t&&(t=[]);let n=[];return r.Children.forEach(e,((e,a)=>{if(!r.isValidElement(e))return;let i=[...t,a];if(e.type===r.Fragment)return void n.push.apply(n,Se(e.props.children,i));e.type!==we&&p(!1),e.props.index&&e.props.children&&p(!1);let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=Se(e.props.children,i)),n.push(o)})),n}function Ce(){return Ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}function Ne(e){return void 0===e&&(e=""),new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Ae=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Me=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(zp){}const Te=r.createContext({isTransitioning:!1});new Map;const $e=r.startTransition;r.flushSync,r.useId;function Le(e){let{basename:t,children:n,future:a,window:i}=e,o=r.useRef();null==o.current&&(o.current=function(e){return void 0===e&&(e={}),b((function(e,t){let{pathname:n="/",search:r="",hash:a=""}=_(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),g("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"===typeof t?t:y(t))}),(function(e,t){f("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:i,v5Compat:!0}));let l=o.current,[s,c]=r.useState({action:l.action,location:l.location}),{v7_startTransition:u}=a||{},d=r.useCallback((e=>{u&&$e?$e((()=>c(e))):c(e)}),[c,u]);return r.useLayoutEffect((()=>l.listen(d)),[l,d]),r.createElement(ke,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:l,future:a})}const Pe="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,Ie=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Oe=r.forwardRef((function(e,t){let n,{onClick:a,relative:i,reloadDocument:o,replace:l,state:s,target:c,to:u,preventScrollReset:d,unstable_viewTransition:h}=e,m=Ee(e,Ae),{basename:f}=r.useContext(J),v=!1;if("string"===typeof u&&Ie.test(u)&&(n=u,Pe))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=D(t.pathname,f);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:v=!0}catch(zp){}let g=function(e,t){let{relative:n}=void 0===t?{}:t;ne()||p(!1);let{basename:a,navigator:i}=r.useContext(J),{hash:o,pathname:l,search:s}=le(e,{relative:n}),c=l;return"/"!==a&&(c="/"===l?a:V([a,l])),i.createHref({pathname:c,search:s,hash:o})}(u,{relative:i}),_=function(e,t){let{target:n,replace:a,state:i,preventScrollReset:o,relative:l,unstable_viewTransition:s}=void 0===t?{}:t,c=ie(),u=re(),d=le(e,{relative:l});return r.useCallback((t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,n)){t.preventDefault();let n=void 0!==a?a:y(u)===y(d);c(e,{replace:n,state:i,preventScrollReset:o,relative:l,unstable_viewTransition:s})}}),[u,c,d,a,i,n,e,o,l,s])}(u,{replace:l,state:s,target:c,preventScrollReset:d,relative:i,unstable_viewTransition:h});return r.createElement("a",Ce({},m,{href:n||g,onClick:v||o?a:function(e){a&&a(e),e.defaultPrevented||_(e)},ref:t,target:c}))}));const Re=r.forwardRef((function(e,t){let{"aria-current":n="page",caseSensitive:a=!1,className:i="",end:o=!1,style:l,to:s,unstable_viewTransition:c,children:u}=e,d=Ee(e,Me),h=le(s,{relative:d.relative}),m=re(),f=r.useContext(G),{navigator:v,basename:g}=r.useContext(J),y=null!=f&&function(e,t){void 0===t&&(t={});let n=r.useContext(Te);null==n&&p(!1);let{basename:a}=Fe(De.useViewTransitionState),i=le(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=D(n.currentLocation.pathname,a)||n.currentLocation.pathname,l=D(n.nextLocation.pathname,a)||n.nextLocation.pathname;return null!=O(i.pathname,l)||null!=O(i.pathname,o)}(h)&&!0===c,_=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,b=m.pathname,w=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;a||(b=b.toLowerCase(),w=w?w.toLowerCase():null,_=_.toLowerCase()),w&&g&&(w=D(w,g)||w);const k="/"!==_&&_.endsWith("/")?_.length-1:_.length;let x,S=b===_||!o&&b.startsWith(_)&&"/"===b.charAt(k),C=null!=w&&(w===_||!o&&w.startsWith(_)&&"/"===w.charAt(_.length)),E={isActive:S,isPending:C,isTransitioning:y},N=S?n:void 0;x="function"===typeof i?i(E):[i,S?"active":null,C?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let A="function"===typeof l?l(E):l;return r.createElement(Oe,Ce({},d,{"aria-current":N,className:x,ref:t,style:A,to:s,unstable_viewTransition:c}),"function"===typeof u?u(E):u)}));var De,ze;function Fe(e){let t=r.useContext(Z);return t||p(!1),t}function je(e){let t=r.useRef(Ne(e)),n=r.useRef(!1),a=re(),i=r.useMemo((()=>function(e,t){let n=Ne(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(a.search,n.current?null:t.current)),[a.search]),o=ie(),l=r.useCallback(((e,t)=>{const r=Ne("function"===typeof e?e(i):e);n.current=!0,o("?"+r,t)}),[o,i]);return[i,l]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(De||(De={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(ze||(ze={}));let He=function(e){return e.logs="logs",e.anomaly="anomaly",e}({});const Ve={home:"/",metrics:"/metrics",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries",trace:"/trace",withTemplate:"/expand-with-exprs",relabel:"/relabeling",logs:"/logs",activeQueries:"/active-queries",queryAnalyzer:"/query-analyzer",icons:"/icons",anomaly:"/anomaly",query:"/query",downsamplingDebug:"/downsampling-filters-debug",retentionDebug:"/retention-filters-debug"},{REACT_APP_TYPE:Ue}={},Be=Ue===He.logs,qe={header:{tenant:!0,stepControl:!Be,timeSelector:!Be,executionControls:!Be}},Ye={[Ve.home]:{title:"Query",...qe},[Ve.metrics]:{title:"Explore Prometheus metrics",header:{tenant:!0,stepControl:!0,timeSelector:!0}},[Ve.cardinality]:{title:"Explore cardinality",header:{tenant:!0,cardinalityDatePicker:!0}},[Ve.topQueries]:{title:"Top queries",header:{tenant:!0}},[Ve.trace]:{title:"Trace analyzer",header:{}},[Ve.queryAnalyzer]:{title:"Query analyzer",header:{}},[Ve.dashboards]:{title:"Dashboards",...qe},[Ve.withTemplate]:{title:"WITH templates",header:{}},[Ve.relabel]:{title:"Metric relabel debug",header:{}},[Ve.logs]:{title:"Logs Explorer",header:{}},[Ve.activeQueries]:{title:"Active Queries",header:{}},[Ve.icons]:{title:"Icons",header:{}},[Ve.anomaly]:{title:"Anomaly exploration",...qe},[Ve.query]:{title:"Query",...qe},[Ve.downsamplingDebug]:{title:"Downsampling filters debug",header:{}},[Ve.retentionDebug]:{title:"Retention filters debug",header:{}}},We=Ve,Ke=()=>{var e;const t=(null===(e=document.getElementById("root"))||void 0===e?void 0:e.dataset.params)||"{}";try{return JSON.parse(t)}catch(zp){return console.error(zp),{}}},Qe=()=>!!Object.keys(Ke()).length,Ze=/(\/select\/)(\d+|\d.+)(\/)(.+)/,Ge=(e,t)=>e.replace(Ze,`$1${t}/$4`),Je=e=>{var t;return(null===(t=e.match(Ze))||void 0===t?void 0:t[2])||""},Xe=(e,t)=>{t?window.localStorage.setItem(e,JSON.stringify({value:t})):tt([e]),window.dispatchEvent(new Event("storage"))},et=e=>{const t=window.localStorage.getItem(e);if(null!==t)try{var n;return null===(n=JSON.parse(t))||void 0===n?void 0:n.value}catch(zp){return t}},tt=e=>e.forEach((e=>window.localStorage.removeItem(e))),{REACT_APP_TYPE:nt}={};var rt=n(215),at=n.n(rt),it=n(424),ot=n.n(it);const lt={table:100,chart:20,code:1e3},st=[{id:"small",isDefault:!0,height:()=>.2*window.innerHeight},{id:"medium",height:()=>.4*window.innerHeight},{id:"large",height:()=>.8*window.innerHeight}],ct=["min","median","max"],ut=(e,t)=>{const n=window.location.hash.split("?")[1],r=at().parse(n,{ignoreQueryPrefix:!0});return ot()(r,e,t||"")},dt=()=>{var e;const t=(null===(e=(window.location.hash.split("?")[1]||"").match(/g\d+\.expr/g))||void 0===e?void 0:e.length)||1;return new Array(t>10?10:t).fill(1).map(((e,t)=>ut(`g${t}.expr`,"")))};let ht=function(e){return e.yhat="yhat",e.yhatUpper="yhat_upper",e.yhatLower="yhat_lower",e.anomaly="vmui_anomalies_points",e.training="vmui_training_data",e.actual="actual",e.anomalyScore="anomaly_score",e}({}),mt=function(e){return e.table="table",e.chart="chart",e.code="code",e}({}),pt=function(e){return e.emptyServer="Please enter Server URL",e.validServer="Please provide a valid Server URL",e.validQuery="Please enter a valid Query and execute it",e.traceNotFound="Not found the tracing information",e.emptyTitle="Please enter title",e.positiveNumber="Please enter positive number",e.validStep="Please enter a valid step",e.unknownType="Unknown server response format: must have 'errorType'",e}({}),ft=function(e){return e.system="system",e.light="light",e.dark="dark",e}({}),vt=function(e){return e.empty="empty",e.metricsql="metricsql",e.label="label",e.labelValue="labelValue",e}({});const gt=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),yt=(e,t)=>{document.documentElement.style.setProperty(`--${e}`,t)},_t=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,bt=e=>{let t;try{t=new URL(e)}catch(n){return!1}return"http:"===t.protocol||"https:"===t.protocol},wt=e=>e.replace(/\/$/,""),kt=ut("g0.tenantID",""),xt={serverUrl:wt((e=>{const{serverURL:t}=Ke(),n=et("SERVER_URL"),r=window.location.href.replace(/\/(select\/)?(vmui)\/.*/,""),a=`${window.location.origin}${window.location.pathname.replace(/^\/vmui/,"")}`,i=window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),o=t||n||i;switch(nt){case He.logs:return r;case He.anomaly:return n||a;default:return e?Ge(o,e):o}})(kt)),tenantId:kt,theme:et("THEME")||ft.system,isDarkTheme:null,flags:{},appConfig:{}};function St(e,t){switch(t.type){case"SET_SERVER":return{...e,serverUrl:wt(t.payload)};case"SET_TENANT_ID":return{...e,tenantId:t.payload};case"SET_THEME":return Xe("THEME",t.payload),{...e,theme:t.payload};case"SET_DARK_THEME":return{...e,isDarkTheme:(n=e.theme,n===ft.system&&_t()||n===ft.dark)};case"SET_FLAGS":return{...e,flags:t.payload};case"SET_APP_CONFIG":return{...e,appConfig:t.payload};default:throw new Error}var n}var Ct=n(746);var Et=0;Array.isArray;function Nt(e,t,n,r,a,i){t||(t={});var o,l,s=t;"ref"in t&&(o=t.ref,delete t.ref);var c={type:e,props:s,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Et,__i:-1,__u:0,__source:a,__self:i};if("function"==typeof e&&(o=e.defaultProps))for(l in o)void 0===s[l]&&(s[l]=o[l]);return Ct.fF.vnode&&Ct.fF.vnode(c),c}const At=(0,r.createContext)({}),Mt=()=>(0,r.useContext)(At).state,Tt=()=>(0,r.useContext)(At).dispatch,$t=Object.entries(xt).reduce(((e,t)=>{let[n,r]=t;return{...e,[n]:ut(n)||r}}),{}),Lt="YYYY-MM-DD",Pt="YYYY-MM-DD HH:mm:ss",It="YYYY-MM-DD HH:mm:ss:SSS (Z)",Ot="YYYY-MM-DD[T]HH:mm:ss",Rt="YYYY-MM-DD_HHmmss",Dt=window.innerWidth/4,zt=window.innerWidth/40,Ft=1,jt=1578e8,Ht=Intl.supportedValuesOf,Vt=Ht?Ht("timeZone"):["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Katmandu","Asia/Khandyga","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis"],Ut=[{long:"years",short:"y",possible:"year"},{long:"weeks",short:"w",possible:"week"},{long:"days",short:"d",possible:"day"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}],Bt=Ut.map((e=>e.short)),qt=e=>Math.round(1e3*e)/1e3,Yt=e=>en(i().duration(e,"seconds").asMilliseconds()),Wt=e=>{let t=qt(e);const n=Math.round(e);e>=100&&(t=n-n%10),e<100&&e>=10&&(t=n-n%5),e<10&&e>=1&&(t=n),e<1&&e>.01&&(t=Math.round(40*e)/40);return Yt(t||.001).replace(/\s/g,"")},Kt=e=>{const t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Bt.includes(n[0]))return{[n[0]]:t[0]}},Qt=e=>{const t=Ut.map((e=>e.short)).join("|"),n=new RegExp(`\\d+(\\.\\d+)?[${t}]+`,"g"),r=(e.match(n)||[]).reduce(((e,t)=>{const n=Kt(t);return n?{...e,...n}:{...e}}),{});return i().duration(r).asSeconds()},Zt=(e,t)=>Wt(e/(t?zt:Dt)),Gt=(e,t)=>{const n=(t||i()().toDate()).valueOf()/1e3,r=Qt(e);return{start:n-r,end:n,step:Zt(r),date:Jt(t||i()().toDate())}},Jt=e=>i().tz(e).utc().format(Ot),Xt=e=>i().tz(e).format(Ot),en=e=>{const t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),a=Math.floor(e/1e3/3600%24),i=Math.floor(e/864e5),o=["d","h","m","s","ms"],l=[i,a,r,n,t].map(((e,t)=>e?`${e}${o[t]}`:""));return l.filter((e=>e)).join("")},tn=e=>{const t=i()(1e3*e);return t.isValid()?t.toDate():new Date},nn={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1}.REACT_APP_TYPE===He.logs,rn=[{title:"Last 5 minutes",duration:"5m",isDefault:nn},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!nn},{title:"Last 1 hour",duration:"1h"},{title:"Last 3 hours",duration:"3h"},{title:"Last 6 hours",duration:"6h"},{title:"Last 12 hours",duration:"12h"},{title:"Last 24 hours",duration:"24h"},{title:"Last 2 days",duration:"2d"},{title:"Last 7 days",duration:"7d"},{title:"Last 30 days",duration:"30d"},{title:"Last 90 days",duration:"90d"},{title:"Last 180 days",duration:"180d"},{title:"Last 1 year",duration:"1y"},{title:"Yesterday",duration:"1d",until:()=>i()().tz().subtract(1,"day").endOf("day").toDate()},{title:"Today",duration:"1d",until:()=>i()().tz().endOf("day").toDate()}].map((e=>({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:()=>i()().tz().toDate(),...e}))),an=e=>{var t;let{relativeTimeId:n,defaultDuration:r,defaultEndInput:a}=e;const i=null===(t=rn.find((e=>e.isDefault)))||void 0===t?void 0:t.id,o=n||ut("g0.relative_time",i),l=rn.find((e=>e.id===o));return{relativeTimeId:l?o:"none",duration:l?l.duration:r,endInput:l?l.until():a}},on=e=>`UTC${i()().tz(e).format("Z")}`,ln=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=new RegExp(e,"i");return Vt.reduce(((n,r)=>{const a=(r.match(/^(.*?)\//)||[])[1]||"unknown",i=on(r),o=i.replace(/UTC|0/,""),l=r.replace(/[/_]/g," "),s={region:r,utc:i,search:`${r} ${i} ${l} ${o}`},c=!e||e&&t.test(s.search);return c&&n[a]?n[a].push(s):c&&(n[a]=[s]),n}),{})},sn=e=>{i().tz.setDefault(e)},cn=()=>{const e=i().tz.guess(),t=(e=>{try{return i()().tz(e),!0}catch(zp){return!1}})(e);return{isValid:t,title:t?`Browser Time (${e})`:"Browser timezone (UTC)",region:t?e:"UTC"}},un=et("TIMEZONE")||cn().region;sn(un);const dn=()=>{const e=ut("g0.range_input"),{duration:t,endInput:n,relativeTimeId:r}=an({defaultDuration:e||"1h",defaultEndInput:(a=ut("g0.end_input",i()().utc().format(Ot)),i()(a).utcOffset(0,!0).toDate()),relativeTimeId:e?ut("g0.relative_time","none"):void 0});var a;return{duration:t,period:Gt(t,n),relativeTime:r}},hn={...dn(),timezone:un};function mn(e,t){switch(t.type){case"SET_TIME_STATE":return{...e,...t.payload};case"SET_DURATION":return{...e,duration:t.payload,period:Gt(t.payload,tn(e.period.end)),relativeTime:"none"};case"SET_RELATIVE_TIME":return{...e,duration:t.payload.duration,period:Gt(t.payload.duration,t.payload.until),relativeTime:t.payload.id};case"SET_PERIOD":const n=(e=>{const t=e.to.valueOf()-e.from.valueOf();return en(t)})(t.payload);return{...e,duration:n,period:Gt(n,t.payload.to),relativeTime:"none"};case"RUN_QUERY":const{duration:r,endInput:a}=an({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:tn(e.period.end)});return{...e,period:Gt(r,a)};case"RUN_QUERY_TO_NOW":return{...e,period:Gt(e.duration)};case"SET_TIMEZONE":return sn(t.payload),Xe("TIMEZONE",t.payload),e.defaultTimezone&&Xe("DISABLED_DEFAULT_TIMEZONE",t.payload!==e.defaultTimezone),{...e,timezone:t.payload};case"SET_DEFAULT_TIMEZONE":return{...e,defaultTimezone:t.payload};default:throw new Error}}const pn=(0,r.createContext)({}),fn=()=>(0,r.useContext)(pn).state,vn=()=>(0,r.useContext)(pn).dispatch,gn=e=>{const t=et(e);return t?JSON.parse(t):[]},yn=50,_n=1e3,bn=1e3;const wn=dt(),kn={query:wn,queryHistory:wn.map((e=>({index:0,values:[e]}))),autocomplete:et("AUTOCOMPLETE")||!1,autocompleteQuick:!1,autocompleteCache:new class{constructor(){this.maxSize=void 0,this.map=void 0,this.maxSize=bn,this.map=new Map}get(e){for(const[t,n]of this.map){const r=JSON.parse(t),a=r.start===e.start&&r.end===e.end,i=r.type===e.type,o=e.value&&r.value&&e.value.includes(r.value),l=r.match===e.match||o,s=n.length<_n;if(l&&a&&i&&s)return n}return this.map.get(JSON.stringify(e))}put(e,t){if(this.map.size>=this.maxSize){const e=this.map.keys().next().value;this.map.delete(e)}this.map.set(JSON.stringify(e),t)}},metricsQLFunctions:[]};function xn(e,t){switch(t.type){case"SET_QUERY":return{...e,query:t.payload.map((e=>e))};case"SET_QUERY_HISTORY":return(e=>{const t=e.map((e=>e.values[e.index])),n=gn("QUERY_HISTORY");n[0]||(n[0]=[]);const r=n[0];t.forEach((e=>{!r.includes(e)&&e&&r.unshift(e),r.length>250&&r.shift()})),Xe("QUERY_HISTORY",JSON.stringify(n))})(t.payload),{...e,queryHistory:t.payload};case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),{...e,queryHistory:e.queryHistory};case"TOGGLE_AUTOCOMPLETE":return Xe("AUTOCOMPLETE",!e.autocomplete),{...e,autocomplete:!e.autocomplete};case"SET_AUTOCOMPLETE_QUICK":return{...e,autocompleteQuick:t.payload};case"SET_AUTOCOMPLETE_CACHE":return e.autocompleteCache.put(t.payload.key,t.payload.value),{...e};case"SET_METRICSQL_FUNCTIONS":return{...e,metricsQLFunctions:t.payload};default:throw new Error}}const Sn=(0,r.createContext)({}),Cn=()=>(0,r.useContext)(Sn).state,En=()=>(0,r.useContext)(Sn).dispatch,Nn=()=>Nt("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:Nt("path",{d:"M6.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29C15.73 4.1 12.46 3.01 7.43 3h-.06C2.33 3-.93 4.1.24 5.18c0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a454.94 454.94 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44a454.4 454.4 0 0 0 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM35 5l-5.84 14.46h-2.43L20.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H35Zm17.18 0v14.46H49.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L38.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H36.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15Z"})}),An=()=>Nt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:[Nt("path",{d:"M11.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29 1.17-1.09-2.1-2.17-7.13-2.18h-.06c-5.04 0-8.3 1.1-7.13 2.18 0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a455.13 455.13 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44 2.05-1.82 4.09-3.65 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM40 5l-5.84 14.46h-2.43L25.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H40Zm17.18 0v14.46H54.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L43.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H41.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15ZM1.73 36v-5.17l-.67-.07a.6.6 0 0 1-.21-.1.23.23 0 0 1-.08-.18v-.44h.96v-.59c0-.34.05-.65.14-.92a1.79 1.79 0 0 1 1.08-1.11 2.45 2.45 0 0 1 1.62-.02l-.03.53c0 .1-.06.15-.16.16H4c-.18 0-.35.03-.5.08a.95.95 0 0 0-.39.23c-.1.11-.19.25-.25.43-.05.18-.08.4-.08.65v.56h1.75v.78H2.8V36H1.73Zm6.17-6.17c.45 0 .85.07 1.2.22a2.57 2.57 0 0 1 1.5 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.86-.07-1.22-.21a2.57 2.57 0 0 1-1.5-1.62c-.12-.38-.19-.81-.19-1.3 0-.47.07-.9.2-1.28a2.57 2.57 0 0 1 1.5-1.62c.35-.15.76-.22 1.2-.22Zm0 5.42c.6 0 1.05-.2 1.35-.6.3-.4.44-.97.44-1.69s-.15-1.28-.44-1.69c-.3-.4-.75-.6-1.35-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.33.73-.08.28-.11.6-.11.96 0 .72.15 1.29.44 1.69.3.4.76.6 1.36.6Zm5.26-4.11c.2-.42.43-.74.71-.97.28-.24.62-.36 1.03-.36.13 0 .25.02.36.05.12.02.23.07.32.13l-.08.8c-.02.1-.08.15-.18.15l-.24-.04a1.7 1.7 0 0 0-.88.05c-.15.05-.29.14-.4.25-.12.1-.23.24-.32.4-.1.17-.18.35-.26.56V36h-1.07v-6.08h.61c.12 0 .2.02.24.07.05.04.08.12.1.23l.06.92Zm13.73-3.82L23.39 36h-1.46l-3.5-8.68h1.29a.54.54 0 0 1 .54.37l2.04 5.3a11.31 11.31 0 0 1 .37 1.21 11.65 11.65 0 0 1 .35-1.22l2.03-5.29c.03-.1.1-.18.19-.25.1-.08.21-.12.35-.12h1.3Zm2.2 2.52V36H27.6v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.08.36a1 1 0 0 1-.51.5.96.96 0 0 1-.73 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .37.08c.12.05.22.11.3.2a.94.94 0 0 1 .3.67Zm5.72 3.1a.68.68 0 0 1-.13.13c-.04.03-.1.05-.18.05a.42.42 0 0 1-.22-.07 3.95 3.95 0 0 0-.62-.31c-.14-.05-.3-.07-.51-.07-.26 0-.5.04-.69.14-.2.1-.36.23-.49.4-.13.18-.22.4-.29.64-.06.25-.1.53-.1.85 0 .33.04.62.1.88.08.25.18.47.32.64.13.18.29.3.48.4.18.09.4.13.63.13a1.6 1.6 0 0 0 .94-.27l.26-.2a.4.4 0 0 1 .25-.09.3.3 0 0 1 .27.14l.43.54a2.76 2.76 0 0 1-1.77.96c-.22.03-.43.05-.65.05a2.57 2.57 0 0 1-1.96-.83c-.25-.28-.45-.6-.6-1-.14-.4-.21-.85-.21-1.35 0-.45.06-.87.2-1.25a2.61 2.61 0 0 1 1.51-1.67c.37-.16.8-.24 1.28-.24.46 0 .86.07 1.2.22.35.15.66.36.94.64l-.4.54Zm3.43 4.95c-.54 0-.95-.15-1.24-.45-.28-.3-.42-.73-.42-1.26v-3.44h-.63a.29.29 0 0 1-.2-.07c-.06-.06-.09-.13-.09-.24v-.59l.99-.16.31-1.68a.33.33 0 0 1 .12-.18.34.34 0 0 1 .21-.07h.77v1.94h1.64v1.05h-1.64v3.34c0 .2.05.34.14.45.1.1.22.16.39.16a.73.73 0 0 0 .39-.1l.12-.07a.2.2 0 0 1 .11-.03c.05 0 .08.01.11.03l.09.1.44.72c-.21.18-.46.32-.74.4-.28.1-.57.15-.87.15Zm5.09-6.35c.46 0 .87.07 1.24.22a2.7 2.7 0 0 1 1.58 1.63c.14.39.22.83.22 1.31 0 .49-.08.93-.22 1.32-.14.4-.35.73-.62 1-.26.28-.58.49-.96.64-.37.15-.78.22-1.24.22a3.4 3.4 0 0 1-1.25-.22 2.71 2.71 0 0 1-1.59-1.64 3.8 3.8 0 0 1-.21-1.32c0-.48.07-.92.21-1.31a2.75 2.75 0 0 1 1.58-1.63c.38-.15.8-.22 1.26-.22Zm0 5.2c.51 0 .89-.17 1.13-.52.25-.34.38-.84.38-1.5a2.6 2.6 0 0 0-.38-1.53c-.24-.34-.62-.52-1.13-.52-.52 0-.9.18-1.16.53-.25.35-.37.85-.37 1.51s.12 1.17.37 1.51c.25.35.64.52 1.16.52Zm5.56-4.04c.2-.37.42-.65.69-.86.26-.21.57-.32.94-.32.28 0 .5.06.68.19l-.1 1.1a.3.3 0 0 1-.09.16.24.24 0 0 1-.15.04 1.8 1.8 0 0 1-.27-.03 2.01 2.01 0 0 0-.34-.03c-.16 0-.3.03-.44.08a1.1 1.1 0 0 0-.34.2c-.1.1-.2.2-.27.33-.08.13-.15.27-.22.44V36H47.7v-6.16h.87c.15 0 .26.03.31.09.06.05.1.15.13.29l.09.7Zm4.62-1.07V36h-1.49v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.07.36a1 1 0 0 1-.51.5.96.96 0 0 1-.74 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .38.08c.11.05.21.11.3.2a.94.94 0 0 1 .28.67Zm4.56 5.32a7.8 7.8 0 0 0-1.08.12c-.29.05-.52.12-.7.2a.92.92 0 0 0-.38.3.64.64 0 0 0-.11.36c0 .26.07.45.23.56.15.11.35.17.6.17.3 0 .57-.06.79-.17.22-.1.44-.28.65-.5v-1.04Zm-3.4-2.67c.71-.65 1.57-.97 2.56-.97.36 0 .68.06.97.18a1.99 1.99 0 0 1 1.16 1.24c.1.3.16.61.16.96V36h-.67a.7.7 0 0 1-.33-.06c-.07-.04-.13-.13-.18-.26l-.13-.44c-.16.14-.3.26-.46.37a2.8 2.8 0 0 1-.97.43 2.77 2.77 0 0 1-1.32-.05 1.62 1.62 0 0 1-.57-.31 1.41 1.41 0 0 1-.38-.53 1.85 1.85 0 0 1-.05-1.18c.05-.16.14-.3.25-.45.12-.14.28-.27.46-.4a3 3 0 0 1 .7-.32 9.19 9.19 0 0 1 2.2-.33v-.36c0-.41-.09-.71-.26-.91-.18-.2-.43-.3-.76-.3a1.84 1.84 0 0 0-1.02.28l-.33.18c-.1.06-.2.09-.32.09-.1 0-.2-.03-.27-.08a.72.72 0 0 1-.17-.2l-.26-.47Zm11.49 4.32V36h-4.88v-8.6h1.16v7.62h3.72Zm3.16-5.2c.44 0 .84.08 1.2.23a2.57 2.57 0 0 1 1.49 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.85-.07-1.21-.21a2.57 2.57 0 0 1-1.5-1.62c-.13-.38-.2-.81-.2-1.3 0-.47.07-.9.2-1.28.14-.39.33-.72.59-1 .25-.26.55-.47.9-.62.37-.15.77-.22 1.22-.22Zm0 5.43c.6 0 1.05-.2 1.34-.6.3-.4.45-.97.45-1.69s-.15-1.28-.45-1.69c-.3-.4-.74-.6-1.34-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.34.73-.07.28-.1.6-.1.96 0 .72.14 1.29.44 1.69.3.4.75.6 1.36.6Zm6.33-2.22c.22 0 .4-.03.57-.09.16-.06.3-.14.41-.25.12-.11.2-.24.26-.39.05-.15.08-.31.08-.5 0-.37-.11-.66-.34-.88-.23-.22-.55-.33-.98-.33-.43 0-.76.1-.99.33-.22.22-.34.51-.34.89 0 .18.03.34.09.5a1.1 1.1 0 0 0 .67.63c.16.06.35.09.57.09Zm1.93 3.3a.51.51 0 0 0-.13-.36.84.84 0 0 0-.34-.22 8.57 8.57 0 0 0-1.73-.2 7.5 7.5 0 0 1-.62-.05c-.23.1-.41.23-.56.4a.8.8 0 0 0-.1.92c.07.12.18.22.32.3.14.1.32.16.54.21a3.5 3.5 0 0 0 1.55 0c.23-.05.42-.12.57-.22.16-.1.29-.21.37-.34a.8.8 0 0 0 .13-.44Zm1.08-6.17v.4c0 .13-.08.21-.25.25l-.69.09c.14.26.2.56.2.88a1.86 1.86 0 0 1-1.36 1.82 3.07 3.07 0 0 1-1.72.04c-.12.08-.22.16-.29.25a.44.44 0 0 0-.1.27c0 .15.06.26.17.33.12.08.28.13.47.16a5 5 0 0 0 .66.06 16.56 16.56 0 0 1 1.5.13c.26.05.48.12.67.22.19.1.34.24.46.41.12.18.18.4.18.69 0 .26-.07.5-.2.75s-.31.46-.56.65c-.24.2-.54.34-.9.46a4.57 4.57 0 0 1-2.36.04c-.33-.09-.6-.2-.82-.36a1.56 1.56 0 0 1-.5-.51c-.1-.2-.16-.4-.16-.6 0-.3.1-.56.28-.77.19-.2.45-.37.77-.5a1.15 1.15 0 0 1-.43-.32.88.88 0 0 1-.15-.54c0-.09.01-.18.04-.27.04-.1.08-.2.15-.28a1.55 1.55 0 0 1 .58-.5c-.3-.16-.53-.39-.7-.66-.17-.28-.25-.6-.25-.97 0-.3.05-.57.16-.8.12-.25.28-.46.48-.63.2-.17.45-.3.73-.4a3 3 0 0 1 2.3.21h1.64Zm4.65.76a.24.24 0 0 1-.23.14.42.42 0 0 1-.2-.07 3.59 3.59 0 0 0-.67-.3 1.8 1.8 0 0 0-1.03 0c-.14.05-.27.11-.37.2a.87.87 0 0 0-.23.27.75.75 0 0 0-.08.35c0 .15.04.28.13.39.1.1.21.19.36.27.15.07.32.14.5.2a13.63 13.63 0 0 1 1.16.4c.2.08.36.18.5.3a1.33 1.33 0 0 1 .5 1.07 2 2 0 0 1-.15.78c-.1.24-.25.44-.45.62-.2.17-.43.3-.72.4a3.1 3.1 0 0 1-2.14-.05 2.97 2.97 0 0 1-.87-.53l.25-.41c.04-.05.07-.1.12-.12a.3.3 0 0 1 .17-.04.4.4 0 0 1 .22.08l.3.19a1.91 1.91 0 0 0 1.03.27c.2 0 .38-.03.54-.08.16-.06.29-.13.4-.22a.96.96 0 0 0 .3-.7c0-.17-.05-.31-.14-.42-.09-.11-.2-.2-.36-.28a2.6 2.6 0 0 0-.5-.2l-.59-.19c-.2-.06-.39-.14-.58-.22a2.14 2.14 0 0 1-.5-.3 1.45 1.45 0 0 1-.36-.46c-.1-.19-.14-.41-.14-.67a1.6 1.6 0 0 1 .57-1.23c.18-.16.4-.3.68-.39.26-.1.57-.14.91-.14a2.84 2.84 0 0 1 1.9.7l-.23.4Z"}),Nt("defs",{children:Nt("path",{d:"M0 0h85v38H0z"})})]}),Mn=()=>Nt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:Nt("path",{d:"M11.118 10.476c.36.28.801.433 1.257.436h.052c.48-.007.961-.192 1.25-.444 1.509-1.279 5.88-5.287 5.88-5.287 1.168-1.087-2.093-2.174-7.13-2.181h-.06c-5.036.007-8.298 1.094-7.13 2.181 0 0 4.372 4.008 5.88 5.295zm2.559 2.166c-.359.283-.801.439-1.258.444h-.044a2.071 2.071 0 0 1-1.257-.444C10.082 11.755 6.384 8.42 5 7.148v1.93c0 .215.081.496.222.629l.07.064c1.045.955 4.546 4.154 5.825 5.245.358.283.8.438 1.257.444h.044c.489-.015.962-.2 1.258-.444 1.309-1.11 4.948-4.444 5.887-5.31.148-.132.222-.413.222-.628v-1.93a455.127 455.127 0 0 1-6.11 5.494zm-1.258 4.984a2.071 2.071 0 0 0 1.258-.436c2.053-1.815 4.09-3.65 6.11-5.502v1.938c0 .207-.075.488-.223.621-.94.873-4.578 4.2-5.887 5.31-.296.25-.77.436-1.258.443h-.044a2.071 2.071 0 0 1-1.257-.436c-1.204-1.027-4.376-3.928-5.616-5.062l-.28-.255c-.14-.133-.221-.414-.221-.621v-1.938c1.383 1.265 5.081 4.607 6.117 5.495.358.282.8.438 1.257.443h.044zM40 5l-5.84 14.46h-2.43L25.89 5h2.16c.233 0 .423.057.57.17.146.113.256.26.33.44l3.41 8.82c.113.287.22.603.32.95.106.34.206.697.3 1.07.08-.373.166-.73.26-1.07a8.84 8.84 0 0 1 .31-.95l3.39-8.82a.959.959 0 0 1 .31-.42.906.906 0 0 1 .58-.19H40zm17.176 0v14.46h-2.37v-9.34c0-.373.02-.777.06-1.21l-4.37 8.21c-.206.393-.523.59-.95.59h-.38c-.426 0-.743-.197-.95-.59l-4.42-8.24c.02.22.037.437.05.65.014.213.02.41.02.59v9.34h-2.37V5h2.03c.12 0 .224.003.31.01a.778.778 0 0 1 .23.05c.074.027.137.07.19.13.06.06.117.14.17.24l4.33 8.03c.114.213.217.433.31.66.1.227.197.46.29.7.094-.247.19-.483.29-.71.1-.233.207-.457.32-.67l4.27-8.01c.054-.1.11-.18.17-.24a.57.57 0 0 1 .19-.13.903.903 0 0 1 .24-.05c.087-.007.19-.01.31-.01h2.03zm8.887 13.73c.68 0 1.286-.117 1.82-.35.54-.24.996-.57 1.37-.99a4.28 4.28 0 0 0 .85-1.48c.2-.573.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.124 1.51-.37 2.19a5.248 5.248 0 0 1-1.07 1.77c-.46.5-1.024.893-1.69 1.18-.66.287-1.404.43-2.23.43-.827 0-1.574-.143-2.24-.43a5.012 5.012 0 0 1-1.69-1.18 5.33 5.33 0 0 1-1.06-1.77 6.373 6.373 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.096 1.277.29 1.85.2.567.483 1.06.85 1.48.373.42.826.75 1.36.99.54.24 1.15.36 1.83.36zm10.38.73h-1.03V5.31h1.03v14.15zM4.242 35v-5.166l-.672-.078a.595.595 0 0 1-.21-.09.23.23 0 0 1-.078-.186v-.438h.96v-.588c0-.348.048-.656.144-.924.1-.272.24-.5.42-.684a1.79 1.79 0 0 1 .66-.426c.256-.096.544-.144.864-.144.272 0 .522.04.75.12l-.024.534c-.008.096-.062.148-.162.156a4.947 4.947 0 0 1-.39.012c-.184 0-.352.024-.504.072a.949.949 0 0 0-.384.234c-.108.108-.192.25-.252.426a2.184 2.184 0 0 0-.084.654v.558h1.752v.774H5.316V35H4.242zM10.416 28.826a3.1 3.1 0 0 1 1.2.222c.356.148.66.358.912.63s.444.602.576.99c.136.384.204.814.204 1.29 0 .48-.068.912-.204 1.296a2.735 2.735 0 0 1-.576.984 2.572 2.572 0 0 1-.912.63 3.175 3.175 0 0 1-1.2.216c-.448 0-.852-.072-1.212-.216a2.572 2.572 0 0 1-.912-.63 2.805 2.805 0 0 1-.582-.984 3.972 3.972 0 0 1-.198-1.296c0-.476.066-.906.198-1.29.136-.388.33-.718.582-.99.252-.272.556-.482.912-.63.36-.148.764-.222 1.212-.222zm0 5.424c.6 0 1.048-.2 1.344-.6.296-.404.444-.966.444-1.686 0-.724-.148-1.288-.444-1.692-.296-.404-.744-.606-1.344-.606-.304 0-.57.052-.798.156a1.507 1.507 0 0 0-.564.45c-.148.196-.26.438-.336.726a3.941 3.941 0 0 0-.108.966c0 .72.148 1.282.444 1.686.3.4.754.6 1.362.6zM15.677 30.14c.192-.416.428-.74.708-.972.28-.236.622-.354 1.026-.354.128 0 .25.014.366.042.12.028.226.072.318.132l-.078.798c-.024.1-.084.15-.18.15-.056 0-.138-.012-.246-.036a1.694 1.694 0 0 0-.366-.036c-.192 0-.364.028-.516.084-.148.056-.282.14-.402.252a1.782 1.782 0 0 0-.318.408c-.092.16-.176.344-.252.552V35h-1.074v-6.078h.612c.116 0 .196.022.24.066.044.044.074.12.09.228l.072.924zM26.761 28.922 24.283 35h-.96l-2.478-6.078h.87a.33.33 0 0 1 .33.222l1.542 3.912c.048.148.09.292.126.432.036.14.07.28.102.42.032-.14.066-.28.102-.42.036-.14.08-.284.132-.432l1.56-3.912a.33.33 0 0 1 .12-.156.311.311 0 0 1 .198-.066h.834zM27.74 35v-6.078h.643c.152 0 .246.074.282.222l.078.624c.224-.276.476-.502.756-.678.28-.176.604-.264.972-.264.408 0 .738.114.99.342.256.228.44.536.552.924.088-.22.2-.41.336-.57a1.987 1.987 0 0 1 1.014-.624c.196-.048.394-.072.594-.072.32 0 .604.052.852.156.252.1.464.248.636.444.176.196.31.438.402.726.092.284.138.61.138.978V35H34.91v-3.87c0-.476-.104-.836-.312-1.08-.208-.248-.508-.372-.9-.372-.176 0-.344.032-.504.096-.156.06-.294.15-.414.27-.12.12-.216.272-.288.456-.068.18-.102.39-.102.63V35h-1.074v-3.87c0-.488-.098-.852-.294-1.092-.196-.24-.482-.36-.858-.36-.264 0-.508.072-.732.216a2.38 2.38 0 0 0-.618.576V35H27.74zM40.746 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM44.974 29.6c.124-.124.254-.238.39-.342a2.395 2.395 0 0 1 .936-.444c.176-.044.368-.066.576-.066.336 0 .634.058.894.174.26.112.476.272.648.48.176.204.308.45.396.738.092.284.138.598.138.942V35H47.47v-3.918c0-.376-.086-.666-.258-.87-.172-.208-.434-.312-.786-.312-.256 0-.496.058-.72.174a2.58 2.58 0 0 0-.636.474V35h-1.482v-6.156h.906c.192 0 .318.09.378.27l.102.486zM53.085 28.748c.456 0 .87.074 1.242.222a2.692 2.692 0 0 1 1.578 1.626c.144.392.216.83.216 1.314 0 .488-.072.928-.216 1.32-.144.392-.35.726-.618 1.002a2.653 2.653 0 0 1-.96.636 3.333 3.333 0 0 1-1.242.222c-.46 0-.878-.074-1.254-.222a2.712 2.712 0 0 1-.966-.636 2.922 2.922 0 0 1-.618-1.002 3.807 3.807 0 0 1-.216-1.32c0-.484.072-.922.216-1.314.148-.392.354-.724.618-.996.268-.272.59-.482.966-.63a3.397 3.397 0 0 1 1.254-.222zm0 5.202c.512 0 .89-.172 1.134-.516.248-.344.372-.848.372-1.512s-.124-1.17-.372-1.518c-.244-.348-.622-.522-1.134-.522-.52 0-.906.176-1.158.528-.248.348-.372.852-.372 1.512s.124 1.164.372 1.512c.252.344.638.516 1.158.516zM57.252 35v-6.156h.906c.192 0 .318.09.378.27l.096.456c.108-.12.22-.23.336-.33a2.017 2.017 0 0 1 1.32-.492c.388 0 .706.106.954.318.252.208.44.486.564.834a1.93 1.93 0 0 1 .834-.882c.172-.092.354-.16.546-.204.196-.044.392-.066.588-.066.34 0 .642.052.906.156.264.104.486.256.666.456.18.2.316.444.408.732.096.288.144.618.144.99V35h-1.482v-3.918c0-.392-.086-.686-.258-.882-.172-.2-.424-.3-.756-.3-.152 0-.294.026-.426.078a1.026 1.026 0 0 0-.342.228 1.019 1.019 0 0 0-.228.366 1.435 1.435 0 0 0-.084.51V35h-1.488v-3.918c0-.412-.084-.712-.252-.9-.164-.188-.406-.282-.726-.282-.216 0-.418.054-.606.162a1.979 1.979 0 0 0-.516.432V35h-1.482zM70.558 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM74.9 26.084V35h-1.482v-8.916H74.9zM81.969 28.844l-3.354 7.848a.538.538 0 0 1-.174.234c-.068.056-.174.084-.318.084h-1.104l1.152-2.472-2.49-5.694h1.302c.116 0 .206.028.27.084.068.056.118.12.15.192l1.308 3.192c.044.108.08.216.108.324.032.108.062.218.09.33a32.3 32.3 0 0 1 .108-.33c.036-.112.076-.222.12-.33l1.236-3.186a.437.437 0 0 1 .408-.276h1.188z"})}),Tn=()=>Nt("svg",{viewBox:"0 0 15 17",fill:"currentColor",children:Nt("path",{d:"M6.11767 7.47586C6.47736 7.75563 6.91931 7.90898 7.37503 7.91213H7.42681C7.90756 7.90474 8.38832 7.71987 8.67677 7.46846C10.1856 6.18921 14.5568 2.18138 14.5568 2.18138C15.7254 1.09438 12.4637 0.00739 7.42681 0H7.36764C2.3308 0.00739 -0.930935 1.09438 0.237669 2.18138C0.237669 2.18138 4.60884 6.18921 6.11767 7.47586ZM8.67677 9.64243C8.31803 9.92483 7.87599 10.0808 7.41941 10.0861H7.37503C6.91845 10.0808 6.47641 9.92483 6.11767 9.64243C5.0822 8.75513 1.38409 5.42018 0.000989555 4.14832V6.07829C0.000989555 6.29273 0.0823481 6.57372 0.222877 6.70682L0.293316 6.7712L0.293344 6.77122C1.33784 7.72579 4.83903 10.9255 6.11767 12.0161C6.47641 12.2985 6.91845 12.4545 7.37503 12.4597H7.41941C7.90756 12.4449 8.38092 12.2601 8.67677 12.0161C9.9859 10.9069 13.6249 7.57198 14.5642 6.70682C14.7121 6.57372 14.7861 6.29273 14.7861 6.07829V4.14832C12.7662 5.99804 10.7297 7.82949 8.67677 9.64243ZM7.41941 14.6263C7.87513 14.6232 8.31708 14.4698 8.67677 14.19C10.7298 12.3746 12.7663 10.5407 14.7861 8.68853V10.6259C14.7861 10.8329 14.7121 11.1139 14.5642 11.247C13.6249 12.1196 9.9859 15.4471 8.67677 16.5563C8.38092 16.8077 7.90756 16.9926 7.41941 17H7.37503C6.91931 16.9968 6.47736 16.8435 6.11767 16.5637C4.91427 15.5373 1.74219 12.6364 0.502294 11.5025C0.393358 11.4029 0.299337 11.3169 0.222877 11.247C0.0823481 11.1139 0.000989555 10.8329 0.000989555 10.6259V8.68853C1.38409 9.95303 5.0822 13.2953 6.11767 14.1827C6.47641 14.4651 6.91845 14.6211 7.37503 14.6263H7.41941Z"})}),$n=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"})}),Ln=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),Pn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zm-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z"})}),In=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})}),On=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),Rn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),Dn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),zn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"})}),Fn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),jn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m7 10 5 5 5-5z"})}),Hn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[Nt("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),Nt("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),Vn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"})}),Un=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"})}),Bn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"})}),qn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M8 5v14l11-7z"})}),Yn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m10 16.5 6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"})}),Wn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"})}),Kn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10H3v9z"})}),Qn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"})}),Zn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})}),Gn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})}),Jn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 13H5v-2h14v2z"})}),Xn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M8.9999 14.7854L18.8928 4.8925C19.0803 4.70497 19.3347 4.59961 19.5999 4.59961C19.8651 4.59961 20.1195 4.70497 20.307 4.8925L21.707 6.2925C22.0975 6.68303 22.0975 7.31619 21.707 7.70672L9.70701 19.7067C9.31648 20.0972 8.68332 20.0972 8.2928 19.7067L2.6928 14.1067C2.50526 13.9192 2.3999 13.6648 2.3999 13.3996C2.3999 13.1344 2.50526 12.88 2.6928 12.6925L4.0928 11.2925C4.48332 10.902 5.11648 10.902 5.50701 11.2925L8.9999 14.7854Z"})}),er=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})}),tr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"})}),nr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 9l1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25L19 15z"})}),rr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),ar=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})}),ir=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2z"})}),or=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 5C19.89 4.65 18.67 4.5 17.5 4.5C15.55 4.5 13.45 4.9 12 6C10.55 4.9 8.45 4.5 6.5 4.5C5.33 4.5 4.11 4.65 3 5C2.25 5.25 1.6 5.55 1 6V20.6C1 20.85 1.25 21.1 1.5 21.1C1.6 21.1 1.65 21.1 1.75 21.05C3.15 20.3 4.85 20 6.5 20C8.2 20 10.65 20.65 12 21.5C13.35 20.65 15.8 20 17.5 20C19.15 20 20.85 20.3 22.25 21.05C22.35 21.1 22.4 21.1 22.5 21.1C22.75 21.1 23 20.85 23 20.6V6C22.4 5.55 21.75 5.25 21 5ZM21 18.5C19.9 18.15 18.7 18 17.5 18C15.8 18 13.35 18.65 12 19.5C10.65 18.65 8.2 18 6.5 18C5.3 18 4.1 18.15 3 18.5V7C4.1 6.65 5.3 6.5 6.5 6.5C8.2 6.5 10.65 7.15 12 8C13.35 7.15 15.8 6.5 17.5 6.5C18.7 6.5 19.9 6.65 21 7V18.5Z"}),Nt("path",{d:"M17.5 10.5C18.38 10.5 19.23 10.59 20 10.76V9.24C19.21 9.09 18.36 9 17.5 9C15.8 9 14.26 9.29 13 9.83V11.49C14.13 10.85 15.7 10.5 17.5 10.5ZM13 12.49V14.15C14.13 13.51 15.7 13.16 17.5 13.16C18.38 13.16 19.23 13.25 20 13.42V11.9C19.21 11.75 18.36 11.66 17.5 11.66C15.8 11.66 14.26 11.96 13 12.49ZM17.5 14.33C15.8 14.33 14.26 14.62 13 15.16V16.82C14.13 16.18 15.7 15.83 17.5 15.83C18.38 15.83 19.23 15.92 20 16.09V14.57C19.21 14.41 18.36 14.33 17.5 14.33Z"}),Nt("path",{d:"M6.5 10.5C5.62 10.5 4.77 10.59 4 10.76V9.24C4.79 9.09 5.64 9 6.5 9C8.2 9 9.74 9.29 11 9.83V11.49C9.87 10.85 8.3 10.5 6.5 10.5ZM11 12.49V14.15C9.87 13.51 8.3 13.16 6.5 13.16C5.62 13.16 4.77 13.25 4 13.42V11.9C4.79 11.75 5.64 11.66 6.5 11.66C8.2 11.66 9.74 11.96 11 12.49ZM6.5 14.33C8.2 14.33 9.74 14.62 11 15.16V16.82C9.87 16.18 8.3 15.83 6.5 15.83C5.62 15.83 4.77 15.92 4 16.09V14.57C4.79 14.41 5.64 14.33 6.5 14.33Z"})]}),lr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z"})}),sr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 6C9.79 6 8 7.79 8 10H10C10 8.9 10.9 8 12 8C13.1 8 14 8.9 14 10C14 10.8792 13.4202 11.3236 12.7704 11.8217C11.9421 12.4566 11 13.1787 11 15H13C13 13.9046 13.711 13.2833 14.4408 12.6455C15.21 11.9733 16 11.2829 16 10C16 7.79 14.21 6 12 6ZM13 16V18H11V16H13Z"})}),cr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2zm4 1H4V5h2v2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2z"})}),ur=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),dr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"})}),hr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M7 20h4c0 1.1-.9 2-2 2s-2-.9-2-2zm-2-1h8v-2H5v2zm11.5-9.5c0 3.82-2.66 5.86-3.77 6.5H5.27c-1.11-.64-3.77-2.68-3.77-6.5C1.5 5.36 4.86 2 9 2s7.5 3.36 7.5 7.5zm4.87-2.13L20 8l1.37.63L22 10l.63-1.37L24 8l-1.37-.63L22 6l-.63 1.37zM19 6l.94-2.06L22 3l-2.06-.94L19 0l-.94 2.06L16 3l2.06.94L19 6z"})}),mr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M3 14h4v-4H3v4zm0 5h4v-4H3v4zM3 9h4V5H3v4zm5 5h13v-4H8v4zm0 5h13v-4H8v4zM8 5v4h13V5H8z"})}),pr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"})}),fr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})}),vr=()=>Nt("svg",{viewBox:"0 0 16 16",fill:gt("color-error"),children:Nt("path",{d:"M13.5095 4L8.50952 1H7.50952L2.50952 4L2.01953 4.85999V10.86L2.50952 11.71L7.50952 14.71H8.50952L13.5095 11.71L13.9995 10.86V4.85999L13.5095 4ZM7.50952 13.5601L3.00952 10.86V5.69995L7.50952 8.15002V13.5601ZM3.26953 4.69995L8.00952 1.85999L12.7495 4.69995L8.00952 7.29004L3.26953 4.69995ZM13.0095 10.86L8.50952 13.5601V8.15002L13.0095 5.69995V10.86Z"})}),gr=()=>Nt("svg",{viewBox:"0 0 16 16",fill:gt("color-primary"),children:Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 5H4V4H1.5L1 4.5V12.5L1.5 13H4V12H2V5ZM14.5 4H12V5H14V12H12V13H14.5L15 12.5V4.5L14.5 4ZM11.76 6.56995L12 7V9.51001L11.7 9.95996L7.19995 11.96H6.73999L4.23999 10.46L4 10.03V7.53003L4.30005 7.06995L8.80005 5.06995H9.26001L11.76 6.56995ZM5 9.70996L6.5 10.61V9.28003L5 8.38V9.70996ZM5.57996 7.56006L7.03003 8.43005L10.42 6.93005L8.96997 6.06006L5.57996 7.56006ZM7.53003 10.73L11.03 9.17004V7.77002L7.53003 9.31995V10.73Z"})}),yr=()=>Nt("svg",{viewBox:"0 0 16 16",fill:gt("color-warning"),children:Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 2H8L7 3V6H8V3H14V8H10V9H14L15 8V3L14 2ZM9 6H13V7H9.41L9 6.59V6ZM7 7H2L1 8V13L2 14H8L9 13V8L8 7H7ZM8 13H2V8H8V9V13ZM3 9H7V10H3V9ZM3 11H7V12H3V11ZM9 4H13V5H9V4Z"})}),_r=()=>Nt("svg",{viewBox:"0 0 16 16",fill:gt("color-primary"),children:Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 3L8 2H14L15 3V8L14 9H10V8H14V3H8V6H7V3ZM9 9V8L8 7H7H2L1 8V13L2 14H8L9 13V9ZM8 8V9V13H2V8H7H8ZM9.41421 7L9 6.58579V6H13V7H9.41421ZM9 4H13V5H9V4ZM7 10H3V11H7V10Z"})}),br=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})}),wr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"})}),kr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z"})}),xr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"})}),Sr=()=>Nt("svg",{viewBox:"0 0 24 24",children:Nt("path",{fill:"currentColor",d:"M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z",children:Nt("animateTransform",{attributeName:"transform",dur:"0.75s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})})});var Cr=n(738),Er=n.n(Cr);const Nr=e=>{let{to:t,isNavLink:n,children:r,...a}=e;return n?Nt(Re,{to:t,...a,children:r}):Nt("div",{...a,children:r})},Ar=e=>{let{activeItem:t,item:n,color:r=gt("color-primary"),activeNavRef:a,onChange:i,isNavLink:o}=e;return Nt(Nr,{className:Er()({"vm-tabs-item":!0,"vm-tabs-item_active":t===n.value,[n.className||""]:n.className}),isNavLink:o,to:n.value,style:{color:r},onClick:(l=n.value,()=>{i&&i(l)}),ref:t===n.value?a:void 0,children:[n.icon&&Nt("div",{className:Er()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!n.label}),children:n.icon}),n.label]});var l};const Mr=function(e,t,n,a){const i=(0,r.useRef)(t);(0,r.useEffect)((()=>{i.current=t}),[t]),(0,r.useEffect)((()=>{var t;const r=null!==(t=null===n||void 0===n?void 0:n.current)&&void 0!==t?t:window;if(!r||!r.addEventListener)return;const o=e=>i.current(e);return r.addEventListener(e,o,a),()=>{r.removeEventListener(e,o,a)}}),[e,n,a])},Tr=()=>{const[e,t]=(0,r.useState)({width:0,height:0}),n=()=>{t({width:window.innerWidth,height:window.innerHeight})};return Mr("resize",n),(0,r.useEffect)(n,[]),e},$r=e=>{let{activeItem:t,items:n,color:a=gt("color-primary"),onChange:i,indicatorPlacement:o="bottom",isNavLink:l}=e;const s=Tr(),c=(0,r.useRef)(null),[u,d]=(0,r.useState)({left:0,width:0,bottom:0});return(0,r.useEffect)((()=>{var e;if((null===(e=c.current)||void 0===e?void 0:e.base)instanceof HTMLElement){const{offsetLeft:e,offsetWidth:t,offsetHeight:n}=c.current.base;d({left:e,width:t,bottom:"top"===o?n-2:0})}}),[s,t,c,n]),Nt("div",{className:"vm-tabs",children:[n.map((e=>Nt(Ar,{activeItem:t,item:e,onChange:i,color:a,activeNavRef:c,isNavLink:l},e.value))),Nt("div",{className:"vm-tabs__indicator",style:{...u,borderColor:a}})]})},Lr=[{value:mt.chart,icon:Nt(Wn,{}),label:"Graph",prometheusCode:0},{value:mt.code,icon:Nt(Qn,{}),label:"JSON",prometheusCode:3},{value:mt.table,icon:Nt(Kn,{}),label:"Table",prometheusCode:1}],Pr=()=>{const{displayType:e}=Fr(),t=jr();return Nt($r,{activeItem:e,items:Lr,onChange:n=>{var r;t({type:"SET_DISPLAY_TYPE",payload:null!==(r=n)&&void 0!==r?r:e})}})},Ir=()=>{const e=ut("g0.tab",0),t=Lr.find((t=>t.prometheusCode===+e||t.value===e));return(null===t||void 0===t?void 0:t.value)||mt.chart},Or=et("SERIES_LIMITS"),Rr={displayType:Ir(),nocache:!1,isTracingEnabled:!1,seriesLimits:Or?JSON.parse(Or):lt,tableCompact:et("TABLE_COMPACT")||!1};function Dr(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return{...e,displayType:t.payload};case"SET_SERIES_LIMITS":return Xe("SERIES_LIMITS",JSON.stringify(t.payload)),{...e,seriesLimits:t.payload};case"TOGGLE_QUERY_TRACING":return{...e,isTracingEnabled:!e.isTracingEnabled};case"TOGGLE_NO_CACHE":return{...e,nocache:!e.nocache};case"TOGGLE_TABLE_COMPACT":return Xe("TABLE_COMPACT",!e.tableCompact),{...e,tableCompact:!e.tableCompact};default:throw new Error}}const zr=(0,r.createContext)({}),Fr=()=>(0,r.useContext)(zr).state,jr=()=>(0,r.useContext)(zr).dispatch,Hr={customStep:ut("g0.step_input",""),yaxis:{limits:{enable:!1,range:{1:[0,0]}}},isHistogram:!1,spanGaps:!1};function Vr(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,enable:!e.yaxis.limits.enable}}};case"SET_CUSTOM_STEP":return{...e,customStep:t.payload};case"SET_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,range:t.payload}}};case"SET_IS_HISTOGRAM":return{...e,isHistogram:t.payload};case"SET_SPAN_GAPS":return{...e,spanGaps:t.payload};default:throw new Error}}const Ur=(0,r.createContext)({}),Br=()=>(0,r.useContext)(Ur).state,qr=()=>(0,r.useContext)(Ur).dispatch,Yr={dashboardsSettings:[],dashboardsLoading:!1,dashboardsError:""};function Wr(e,t){switch(t.type){case"SET_DASHBOARDS_SETTINGS":return{...e,dashboardsSettings:t.payload};case"SET_DASHBOARDS_LOADING":return{...e,dashboardsLoading:t.payload};case"SET_DASHBOARDS_ERROR":return{...e,dashboardsError:t.payload};default:throw new Error}}const Kr=(0,r.createContext)({}),Qr=()=>(0,r.useContext)(Kr).state,Zr={markdownParsing:"true"===et("LOGS_MARKDOWN")};function Gr(e,t){if("SET_MARKDOWN_PARSING"===t.type)return Xe("LOGS_MARKDOWN",`${t.payload}`),{...e,markdownParsing:t.payload};throw new Error}const Jr=(0,r.createContext)({}),Xr={windows:"Windows",mac:"Mac OS",linux:"Linux"},ea=()=>(Object.values(Xr).find((e=>navigator.userAgent.indexOf(e)>=0))||"unknown")===Xr.mac;function ta(){const e=Tr(),t=()=>{const e=["Android","webOS","iPhone","iPad","iPod","BlackBerry","Windows Phone"].map((e=>navigator.userAgent.match(new RegExp(e,"i")))).some((e=>e)),t=window.innerWidth<500;return e||t},[n,a]=(0,r.useState)(t());return(0,r.useEffect)((()=>{a(t())}),[e]),{isMobile:n}}const na={success:Nt(Dn,{}),error:Nt(Rn,{}),warning:Nt(On,{}),info:Nt(In,{})},ra=e=>{let{variant:t,children:n}=e;const{isDarkTheme:r}=Mt(),{isMobile:a}=ta();return Nt("div",{className:Er()({"vm-alert":!0,[`vm-alert_${t}`]:t,"vm-alert_dark":r,"vm-alert_mobile":a}),children:[Nt("div",{className:"vm-alert__icon",children:na[t||"info"]}),Nt("div",{className:"vm-alert__content",children:n})]})},aa=(0,r.createContext)({showInfoMessage:()=>{}}),ia=function(){for(var e=arguments.length,t=new Array(e),n=0;nn=>{let{children:r}=n;return Nt(e,{children:Nt(t,{children:r})})}),(e=>{let{children:t}=e;return Nt(Ct.FK,{children:t})}))}(...[e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(St,$t),i=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(At.Provider,{value:i,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(mn,hn),i=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(pn.Provider,{value:i,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(xn,kn),i=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(Sn.Provider,{value:i,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(Dr,Rr),i=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(zr.Provider,{value:i,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(Vr,Hr),i=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(Ur.Provider,{value:i,children:t})},e=>{let{children:t}=e;const{isMobile:n}=ta(),[a,i]=(0,r.useState)({}),[o,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)(void 0);(0,r.useEffect)((()=>{if(!s)return;i({message:s.text,variant:s.type,key:Date.now()}),l(!0);const e=setTimeout(u,4e3);return()=>clearTimeout(e)}),[s]);const u=()=>{c(void 0),l(!1)};return Nt(aa.Provider,{value:{showInfoMessage:c},children:[o&&Nt("div",{className:Er()({"vm-snackbar":!0,"vm-snackbar_mobile":n}),children:Nt(ra,{variant:a.variant,children:Nt("div",{className:"vm-snackbar-content",children:[Nt("span",{children:a.message}),Nt("div",{className:"vm-snackbar-content__close",onClick:u,children:Nt(Ln,{})})]})})}),t]})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(Wr,Yr),i=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(Kr.Provider,{value:i,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(Gr,Zr),i=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(Jr.Provider,{value:i,children:t})}]);let oa=function(e){return e[e.internalLink=0]="internalLink",e[e.externalLink=1]="externalLink",e}({});const la=(e,t)=>({label:"Alerts",value:`${e}/vmalert`,type:oa.externalLink,hide:!t}),sa=e=>[{value:We.trace},{value:We.queryAnalyzer},{value:We.withTemplate},{value:We.relabel},{value:We.downsamplingDebug,hide:!e},{value:We.retentionDebug,hide:!e}],ca=e=>{let{activeMenu:t,label:n,value:r,type:a,color:i}=e;return a===oa.externalLink?Nt("a",{className:Er()({"vm-header-nav-item":!0,"vm-header-nav-item_active":t===r}),style:{color:i},href:r,target:"_blank",rel:"noreferrer",children:n}):Nt(Re,{className:Er()({"vm-header-nav-item":!0,"vm-header-nav-item_active":t===r}),style:{color:i},to:r,children:n})},ua=(e,t,n)=>{const a=(0,r.useCallback)((r=>{const a=null===e||void 0===e?void 0:e.current,i=r.target,o=(null===n||void 0===n?void 0:n.current)&&n.current.contains(i);!a||a.contains((null===r||void 0===r?void 0:r.target)||null)||o||t(r)}),[e,t]);Mr("mousedown",a),Mr("touchstart",a)},da=e=>{let{variant:t="contained",color:n="primary",size:r="medium",ariaLabel:a,children:i,endIcon:o,startIcon:l,fullWidth:s=!1,className:c,disabled:u,onClick:d,onMouseDown:h}=e;return Nt("button",{className:Er()({"vm-button":!0,[`vm-button_${t}_${n}`]:!0,[`vm-button_${r}`]:r,"vm-button_icon":(l||o)&&!i,"vm-button_full-width":s,"vm-button_with-icon":l||o,"vm-button_disabled":u,[c||""]:c}),disabled:u,"aria-label":a,onClick:d,onMouseDown:h,children:Nt(Ct.FK,{children:[l&&Nt("span",{className:"vm-button__start-icon",children:l}),i&&Nt("span",{children:i}),o&&Nt("span",{className:"vm-button__end-icon",children:o})]})})},ha=e=>{let{children:t,buttonRef:n,placement:a="bottom-left",open:i=!1,onClose:o,offset:l={top:6,left:0},clickOutside:s=!0,fullWidth:c,title:u,disabledFullScreen:d,variant:h}=e;const{isMobile:m}=ta(),p=ie(),f=re(),[v,g]=(0,r.useState)({width:0,height:0}),[y,_]=(0,r.useState)(!1),b=(0,r.useRef)(null);(0,r.useEffect)((()=>(_(i),!i&&o&&o(),i&&m&&!d&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="auto"})),[i]),(0,r.useEffect)((()=>{var e,t;g({width:(null===b||void 0===b||null===(e=b.current)||void 0===e?void 0:e.clientWidth)||0,height:(null===b||void 0===b||null===(t=b.current)||void 0===t?void 0:t.clientHeight)||0}),_(!1)}),[b]);const w=(0,r.useMemo)((()=>{const e=n.current;if(!e||!y)return{};const t=e.getBoundingClientRect(),r={top:0,left:0,width:"auto"},i="bottom-right"===a||"top-right"===a,o=null===a||void 0===a?void 0:a.includes("top"),s=(null===l||void 0===l?void 0:l.top)||0,u=(null===l||void 0===l?void 0:l.left)||0;r.left=r.left=t.left+u,r.top=t.height+t.top+s,i&&(r.left=t.right-v.width),o&&(r.top=t.top-v.height-s);const{innerWidth:d,innerHeight:h}=window,m=r.top+v.height+20>h,p=r.top-20<0,f=r.left+v.width+20>d,g=r.left-20<0;return m&&(r.top=t.top-v.height-s),p&&(r.top=t.height+t.top+s),f&&(r.left=t.right-v.width-u),g&&(r.left=t.left+u),c&&(r.width=`${t.width}px`),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[n,a,y,t,c]),k=()=>{_(!1),o()};(0,r.useEffect)((()=>{if(!b.current||!y||m&&!d)return;const{right:e,width:t}=b.current.getBoundingClientRect();if(e>window.innerWidth){const e=window.innerWidth-20-t;b.current.style.left=e{y&&m&&!d&&(p(f,{replace:!0}),o())}),[y,m,d,f,o]);return Mr("scroll",k),Mr("popstate",x),ua(b,(()=>{s&&k()}),n),Nt(Ct.FK,{children:(y||!v.width)&&r.default.createPortal(Nt("div",{className:Er()({"vm-popper":!0,[`vm-popper_${h}`]:h,"vm-popper_mobile":m&&!d,"vm-popper_open":(m||Object.keys(w).length)&&y}),ref:b,style:m&&!d?{}:w,children:[(u||m&&!d)&&Nt("div",{className:"vm-popper-header",children:[Nt("p",{className:"vm-popper-header__title",children:u}),Nt(da,{variant:"text",color:"dark"===h?"white":"primary",size:"small",onClick:e=>{e.stopPropagation(),o()},ariaLabel:"close",children:Nt(Ln,{})})]}),t]}),document.body)})},ma=e=>{const[t,n]=(0,r.useState)(!!e),a=(0,r.useCallback)((()=>n(!0)),[]),i=(0,r.useCallback)((()=>n(!1)),[]),o=(0,r.useCallback)((()=>n((e=>!e))),[]);return{value:t,setValue:n,setTrue:a,setFalse:i,toggle:o}},pa=e=>{let{activeMenu:t,label:n,color:a,background:i,submenu:o,direction:l}=e;const{pathname:s}=re(),[c,u]=(0,r.useState)(null),d=(0,r.useRef)(null),{value:h,setFalse:m,setTrue:p}=ma(!1),f=()=>{c&&clearTimeout(c);const e=setTimeout(m,300);u(e)};return(0,r.useEffect)((()=>{m()}),[s]),"column"===l?Nt(Ct.FK,{children:o.map((e=>Nt(ca,{activeMenu:t,value:e.value||"",label:e.label||"",type:e.type||oa.internalLink},e.value)))}):Nt("div",{className:Er()({"vm-header-nav-item":!0,"vm-header-nav-item_sub":!0,"vm-header-nav-item_open":h,"vm-header-nav-item_active":o.find((e=>e.value===t))}),style:{color:a},onMouseEnter:()=>{p(),c&&clearTimeout(c)},onMouseLeave:f,ref:d,children:[n,Nt(jn,{}),Nt(ha,{open:h,placement:"bottom-left",offset:{top:12,left:0},onClose:m,buttonRef:d,children:Nt("div",{className:"vm-header-nav-item-submenu",style:{background:i},onMouseLeave:f,onMouseEnter:()=>{c&&clearTimeout(c)},children:o.map((e=>Nt(ca,{activeMenu:t,value:e.value||"",label:e.label||"",color:a,type:e.type||oa.internalLink},e.value)))})})]})},fa=e=>e.filter((e=>!e.hide)).map((e=>{const t={...e};var n;t.value&&!t.label&&(t.label=(null===(n=Ye[t.value])||void 0===n?void 0:n.title)||(e=>{try{return e.replace(/^\/+/,"").replace(/-/g," ").trim().replace(/^\w/,(e=>e.toUpperCase()))}catch(zp){return e}})(t.value));return t.submenu&&t.submenu.length>0&&(t.submenu=fa(t.submenu)),t})),va={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1}.REACT_APP_TYPE,ga=()=>{var e;const t=Qe(),{dashboardsSettings:n}=Qr(),{serverUrl:a,flags:i,appConfig:o}=Mt(),l="enterprise"===(null===(e=o.license)||void 0===e?void 0:e.type),s=Boolean(i["vmalert.proxyURL"]),c=Boolean(!t&&n.length),u=(0,r.useMemo)((()=>({serverUrl:a,isEnterpriseLicense:l,showAlertLink:s,showPredefinedDashboards:c})),[a,l,s,c]),d=(0,r.useMemo)((()=>{switch(va){case He.logs:return[{label:Ye[We.logs].title,value:We.home}];case He.anomaly:return[{label:Ye[We.anomaly].title,value:We.home}];default:return(e=>{let{serverUrl:t,isEnterpriseLicense:n,showPredefinedDashboards:r,showAlertLink:a}=e;return[{value:We.home},{label:"Explore",submenu:[{value:We.metrics},{value:We.cardinality},{value:We.topQueries},{value:We.activeQueries}]},{label:"Tools",submenu:sa(n)},{value:We.dashboards,hide:!r},la(t,a)]})(u)}}),[u]);return fa(d)},ya=e=>{let{color:t,background:n,direction:a}=e;const{pathname:i}=re(),[o,l]=(0,r.useState)(i),s=ga();return(0,r.useEffect)((()=>{l(i)}),[i]),Nt("nav",{className:Er()({"vm-header-nav":!0,[`vm-header-nav_${a}`]:a}),children:s.map((e=>e.submenu?Nt(pa,{activeMenu:o,label:e.label||"",submenu:e.submenu,color:t,background:n,direction:a},e.label):Nt(ca,{activeMenu:o,value:e.value||"",label:e.label||"",color:t,type:e.type||oa.internalLink},e.value)))})},_a=e=>{let{title:t,children:n,onClose:a,className:i,isOpen:o=!0}=e;const{isMobile:l}=ta(),s=ie(),c=re(),u=(0,r.useCallback)((e=>{o&&"Escape"===e.key&&a()}),[o]),d=e=>{e.stopPropagation()},h=(0,r.useCallback)((()=>{o&&(s(c,{replace:!0}),a())}),[o,c,a]);return(0,r.useEffect)((()=>{if(o)return document.body.style.overflow="hidden",()=>{document.body.style.overflow="auto"}}),[o]),Mr("popstate",h),Mr("keyup",u),r.default.createPortal(Nt("div",{className:Er()({"vm-modal":!0,"vm-modal_mobile":l,[`${i}`]:i}),onMouseDown:a,children:Nt("div",{className:"vm-modal-content",children:[Nt("div",{className:"vm-modal-content-header",onMouseDown:d,children:[t&&Nt("div",{className:"vm-modal-content-header__title",children:t}),Nt("div",{className:"vm-modal-header__close",children:Nt(da,{variant:"text",size:"small",onClick:a,ariaLabel:"close",children:Nt(Ln,{})})})]}),Nt("div",{className:"vm-modal-content-body",onMouseDown:d,tabIndex:0,children:n})]})}),document.body)},ba=e=>{let{children:t,title:n,open:a,placement:i="bottom-center",offset:o={top:6,left:0}}=e;const{isMobile:l}=ta(),[s,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)({width:0,height:0}),h=(0,r.useRef)(null),m=(0,r.useRef)(null),p=()=>c(!1);(0,r.useEffect)((()=>{if(m.current&&s)return d({width:m.current.clientWidth,height:m.current.clientHeight}),window.addEventListener("scroll",p),()=>{window.removeEventListener("scroll",p)}}),[s,n]);const f=(0,r.useMemo)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(!t||!s)return{};const n=t.getBoundingClientRect(),r={top:0,left:0},a="bottom-right"===i||"top-right"===i,l="bottom-left"===i||"top-left"===i,c=null===i||void 0===i?void 0:i.includes("top"),d=(null===o||void 0===o?void 0:o.top)||0,m=(null===o||void 0===o?void 0:o.left)||0;r.left=n.left-(u.width-n.width)/2+m,r.top=n.height+n.top+d,a&&(r.left=n.right-u.width),l&&(r.left=n.left+m),c&&(r.top=n.top-u.height-d);const{innerWidth:p,innerHeight:f}=window,v=r.top+u.height+20>f,g=r.top-20<0,y=r.left+u.width+20>p,_=r.left-20<0;return v&&(r.top=n.top-u.height-d),g&&(r.top=n.height+n.top+d),y&&(r.left=n.right-u.width-m),_&&(r.left=n.left+m),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[h,i,s,u]),v=()=>{"boolean"!==typeof a&&c(!0)},g=()=>{c(!1)};return(0,r.useEffect)((()=>{"boolean"===typeof a&&c(a)}),[a]),(0,r.useEffect)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",v),t.addEventListener("mouseleave",g),()=>{t.removeEventListener("mouseenter",v),t.removeEventListener("mouseleave",g)}}),[h]),Nt(Ct.FK,{children:[Nt(r.Fragment,{ref:h,children:t}),!l&&s&&r.default.createPortal(Nt("div",{className:"vm-tooltip",ref:m,style:f,children:n}),document.body)]})},wa=Nt("code",{children:ea()?"Cmd":"Ctrl"}),ka=[{title:"Zoom in",description:Nt(Ct.FK,{children:["To zoom in, hold down the ",wa," + ",Nt("code",{children:"scroll up"}),", or press the ",Nt("code",{children:"+"}),". Also, you can zoom in on a range on the graph by holding down your mouse button and selecting the range."]})},{title:"Zoom out",description:Nt(Ct.FK,{children:["To zoom out, hold down the ",wa," + ",Nt("code",{children:"scroll down"}),", or press the ",Nt("code",{children:"-"}),"."]})},{title:"Move horizontal axis",description:Nt(Ct.FK,{children:["To move the graph, hold down the ",wa," + ",Nt("code",{children:"drag"})," the graph to the right or left."]})},{title:"Fixing a tooltip",description:Nt(Ct.FK,{children:["To fix the tooltip, ",Nt("code",{children:"click"})," mouse when it's open. Then, you can drag the fixed tooltip by ",Nt("code",{children:"clicking"})," and ",Nt("code",{children:"dragging"})," on the ",Nt(ar,{})," icon."]})},{title:"Set a custom range for the vertical axis",description:Nt(Ct.FK,{children:["To set a custom range for the vertical axis, click on the ",Nt($n,{})," icon located in the upper right corner of the graph, activate the toggle, and set the values."]})}],xa=[{title:"Show/hide a legend item",description:Nt(Ct.FK,{children:[Nt("code",{children:"click"})," on a legend item to isolate it on the graph.",wa," + ",Nt("code",{children:"click"})," on a legend item to remove it from the graph. To revert to the previous state, click again."]})},{title:"Copy label key-value pairs",description:Nt(Ct.FK,{children:[Nt("code",{children:"click"})," on a label key-value pair to save it to the clipboard."]})},{title:"Collapse/Expand the legend group",description:Nt(Ct.FK,{children:[Nt("code",{children:"click"})," on the group name (e.g. ",Nt("b",{children:'Query 1: {__name__!=""}'}),") to collapse or expand the legend."]})}],Sa=ka.concat(xa),Ca=()=>{const{value:e,setFalse:t,setTrue:n}=ma(!1);return Nt(Ct.FK,{children:[Nt(ba,{title:"Show tips on working with the graph",children:Nt(da,{variant:"text",color:"gray",startIcon:Nt(hr,{}),onClick:n,ariaLabel:"open the tips"})}),e&&Nt(_a,{title:"Tips on working with the graph and the legend",onClose:t,children:Nt("div",{className:"fc-graph-tips",children:Sa.map((e=>{let{title:t,description:n}=e;return Nt("div",{className:"fc-graph-tips-item",children:[Nt("h4",{className:"fc-graph-tips-item__action",children:t}),Nt("p",{className:"fc-graph-tips-item__description",children:n})]},t)}))})})]})},Ea=Nt("code",{children:ea()?"Cmd":"Ctrl"}),Na=Nt(Ct.FK,{children:[Nt("code",{children:ea()?"Option":"Ctrl"})," + ",Nt("code",{children:"Space"})]}),Aa=[{title:"Query",list:[{keys:Nt("code",{children:"Enter"}),description:"Run"},{keys:Nt(Ct.FK,{children:[Nt("code",{children:"Shift"})," + ",Nt("code",{children:"Enter"})]}),description:"Multi-line queries"},{keys:Nt(Ct.FK,{children:[Ea," + ",Nt("code",{children:"Arrow Up"})]}),description:"Previous command from the Query history"},{keys:Nt(Ct.FK,{children:[Ea," + ",Nt("code",{children:"Arrow Down"})]}),description:"Next command from the Query history"},{keys:Nt(Ct.FK,{children:[Ea," + ",Nt("code",{children:"click"})," by ",Nt(er,{})]}),description:"Toggle multiple queries"},{keys:Na,description:"Show quick autocomplete tips"}]},{title:"Graph",readMore:Nt(Ca,{}),list:[{keys:Nt(Ct.FK,{children:[Ea," + ",Nt("code",{children:"scroll Up"})," or ",Nt("code",{children:"+"})]}),description:"Zoom in"},{keys:Nt(Ct.FK,{children:[Ea," + ",Nt("code",{children:"scroll Down"})," or ",Nt("code",{children:"-"})]}),description:"Zoom out"},{keys:Nt(Ct.FK,{children:[Ea," + ",Nt("code",{children:"drag"})]}),description:"Move the graph left/right"},{keys:Nt(Ct.FK,{children:Nt("code",{children:"click"})}),description:"Select the series in the legend"},{keys:Nt(Ct.FK,{children:[Ea," + ",Nt("code",{children:"click"})]}),description:"Toggle multiple series in the legend"}]}],Ma="Shortcut keys",Ta=ea(),$a=Ta?"Cmd + /":"F1",La=e=>{let{showTitle:t}=e;const n=Qe(),{value:a,setTrue:i,setFalse:o}=ma(!1),l=(0,r.useCallback)((e=>{const t=Ta&&"/"===e.key&&e.metaKey,n=!Ta&&"F1"===e.key&&!e.metaKey;(t||n)&&i()}),[i]);return Mr("keydown",l),Nt(Ct.FK,{children:[Nt(ba,{open:!0!==t&&void 0,title:`${Ma} (${$a})`,placement:"bottom-center",children:Nt(da,{className:n?"":"vm-header-button",variant:"contained",color:"primary",startIcon:Nt(Bn,{}),onClick:i,ariaLabel:Ma,children:t&&Ma})}),a&&Nt(_a,{title:"Shortcut keys",onClose:o,children:Nt("div",{className:"vm-shortcuts",children:Aa.map((e=>Nt("div",{className:"vm-shortcuts-section",children:[e.readMore&&Nt("div",{className:"vm-shortcuts-section__read-more",children:e.readMore}),Nt("h3",{className:"vm-shortcuts-section__title",children:e.title}),Nt("div",{className:"vm-shortcuts-section-list",children:e.list.map(((t,n)=>Nt("div",{className:"vm-shortcuts-section-list-item",children:[Nt("div",{className:"vm-shortcuts-section-list-item__key",children:t.keys}),Nt("p",{className:"vm-shortcuts-section-list-item__description",children:t.description})]},`${e.title}_${n}`)))})]},e.title)))})})]})},Pa=e=>{let{open:t}=e;return Nt("button",{className:Er()({"vm-menu-burger":!0,"vm-menu-burger_opened":t}),"aria-label":"menu",children:Nt("span",{})})},{REACT_APP_TYPE:Ia}={},Oa=Ia===He.logs,Ra=e=>{let{background:t,color:n}=e;const{pathname:a}=re(),{isMobile:i}=ta(),o=(0,r.useRef)(null),{value:l,toggle:s,setFalse:c}=ma(!1);return(0,r.useEffect)(c,[a]),ua(o,c),Nt("div",{className:"vm-header-sidebar",ref:o,children:[Nt("div",{className:Er()({"vm-header-sidebar-button":!0,"vm-header-sidebar-button_open":l}),onClick:s,children:Nt(Pa,{open:l})}),Nt("div",{className:Er()({"vm-header-sidebar-menu":!0,"vm-header-sidebar-menu_open":l}),children:[Nt("div",{children:Nt(ya,{color:n,background:t,direction:"column"})}),Nt("div",{className:"vm-header-sidebar-menu-settings",children:!i&&!Oa&&Nt(La,{showTitle:!0})})]})]})},Da=e=>{let{controlsComponent:t,isMobile:n,...a}=e;const i=Qe(),{pathname:o}=re(),{accountIds:l}=(()=>{const{useTenantID:e}=Ke(),t=Qe(),{serverUrl:n}=Mt(),[a,i]=(0,r.useState)(!1),[o,l]=(0,r.useState)(),[s,c]=(0,r.useState)([]),u=(0,r.useMemo)((()=>`${n.replace(/^(.+)(\/select.+)/,"$1")}/admin/tenants`),[n]),d=(0,r.useMemo)((()=>!!Je(n)),[n]),h=t?!e:!d;return(0,r.useEffect)((()=>{h||(async()=>{i(!0);try{const e=await fetch(u),t=await e.json(),n=t.data||[];c(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?l(void 0):l(`${t.errorType}\r\n${null===t||void 0===t?void 0:t.error}`)}catch(zp){zp instanceof Error&&l(`${zp.name}: ${zp.message}`)}i(!1)})().catch(console.error)}),[u]),{accountIds:s,isLoading:a,error:o}})(),{value:s,toggle:c,setFalse:u}=ma(!1),d=Nt(t,{...a,isMobile:n,accountIds:l,headerSetup:(0,r.useMemo)((()=>(Ye[o]||{}).header||{}),[o])});return n?Nt(Ct.FK,{children:[Nt("div",{children:Nt(da,{className:Er()({"vm-header-button":!i}),startIcon:Nt(ur,{}),onClick:c,ariaLabel:"controls"})}),Nt(_a,{title:"Controls",onClose:u,isOpen:s,className:Er()({"vm-header-controls-modal":!0,"vm-header-controls-modal_open":s}),children:d})]}):d},{REACT_APP_TYPE:za}={},Fa=za===He.logs||za===He.anomaly,ja=()=>{switch(za){case He.logs:return Nt(An,{});case He.anomaly:return Nt(Mn,{});default:return Nt(Nn,{})}},Ha=e=>{let{controlsComponent:t}=e;const{isMobile:n}=ta(),a=Tr(),i=(0,r.useMemo)((()=>window.innerWidth<1e3),[a]),{isDarkTheme:o}=Mt(),l=Qe(),s=(0,r.useMemo)((()=>gt(o?"color-background-block":"color-primary")),[o]),{background:c,color:u}=(0,r.useMemo)((()=>{const{headerStyles:{background:e=(l?"#FFF":s),color:t=(l?s:"#FFF")}={}}=Ke();return{background:e,color:t}}),[s]),d=ie(),h=()=>{d({pathname:We.home}),window.location.reload()};return Nt("header",{className:Er()({"vm-header":!0,"vm-header_app":l,"vm-header_dark":o,"vm-header_sidebar":i,"vm-header_mobile":n}),style:{background:c,color:u},children:[i?Nt(Ra,{background:c,color:u}):Nt(Ct.FK,{children:[!l&&Nt("div",{className:Er()({"vm-header-logo":!0,"vm-header-logo_logs":Fa}),onClick:h,style:{color:u},children:Nt(ja,{})}),Nt(ya,{color:u,background:c})]}),i&&Nt("div",{className:Er()({"vm-header-logo":!0,"vm-header-logo_mobile":!0,"vm-header-logo_logs":Fa}),onClick:h,style:{color:u},children:Nt(ja,{})}),Nt(Da,{controlsComponent:t,displaySidebar:i,isMobile:n})]})},Va={href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new/choose",Icon:lr,title:"Create an issue"},Ua=[{href:"https://docs.victoriametrics.com/MetricsQL.html",Icon:Qn,title:"MetricsQL"},{href:"https://docs.victoriametrics.com/#vmui",Icon:or,title:"Documentation"},Va],Ba=(0,r.memo)((e=>{let{links:t=Ua}=e;const n=`2019-${(new Date).getFullYear()}`;return Nt("footer",{className:"vm-footer",children:[Nt("a",{className:"vm-link vm-footer__website",target:"_blank",href:"https://victoriametrics.com/",rel:"me noreferrer",children:[Nt(Tn,{}),"victoriametrics.com"]}),t.map((e=>{let{href:t,Icon:n,title:r}=e;return Nt("a",{className:"vm-link vm-footer__link",target:"_blank",href:t,rel:"help noreferrer",children:[Nt(n,{}),r]},`${t}-${r}`)})),Nt("div",{className:"vm-footer__copyright",children:["\xa9 ",n," VictoriaMetrics"]})]})})),qa=Ba,Ya=()=>{const e=Qe(),{serverUrl:t}=Mt(),n=(0,r.useContext)(Kr).dispatch,[a,i]=(0,r.useState)(!1),[o,l]=(0,r.useState)(""),[s,c]=(0,r.useState)([]),u=async()=>{try{const e=window.__VMUI_PREDEFINED_DASHBOARDS__;if(null===e||void 0===e||!e.length)return[];const t=await Promise.all(e.map((async e=>(async e=>{const t=await fetch(`./dashboards/${e}`);return await t.json()})(e))));c((e=>[...t,...e]))}catch(zp){zp instanceof Error&&l(`${zp.name}: ${zp.message}`)}};return(0,r.useEffect)((()=>{e||(c([]),(async()=>{if(t&&!{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1}.REACT_APP_TYPE){l(""),i(!0);try{const e=await fetch(`${t}/vmui/custom-dashboards`),n=await e.json();if(e.ok){const{dashboardsSettings:e}=n;e&&e.length>0?c((t=>[...t,...e])):await u(),i(!1)}else await u(),l(n.error),i(!1)}catch(zp){i(!1),zp instanceof Error&&l(`${zp.name}: ${zp.message}`),await u()}}})())}),[t]),(0,r.useEffect)((()=>{n({type:"SET_DASHBOARDS_SETTINGS",payload:s})}),[s]),(0,r.useEffect)((()=>{n({type:"SET_DASHBOARDS_LOADING",payload:a})}),[a]),(0,r.useEffect)((()=>{n({type:"SET_DASHBOARDS_ERROR",payload:o})}),[o]),{dashboardsSettings:s,isLoading:a,error:o}},Wa=e=>{let{error:t,warning:n,info:a}=e;const i=(0,r.useRef)(null),[o,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)(!1),u=`${(0,r.useMemo)((()=>t?"ERROR: ":n?"WARNING: ":""),[t,n])}${t||n||a}`,d=()=>{const e=i.current;if(e){const{offsetWidth:t,scrollWidth:n,offsetHeight:r,scrollHeight:a}=e;l(t+1{c(!1),d()}),[i,u]),Mr("resize",d),t||n||a?Nt("span",{className:Er()({"vm-text-field__error":!0,"vm-text-field__warning":n&&!t,"vm-text-field__helper-text":!n&&!t,"vm-text-field__error_overflowed":o,"vm-text-field__error_full":s}),"data-show":!!u,ref:i,onClick:()=>{o&&(c(!0),l(!1))},children:u}):null},Ka=e=>{let{label:t,value:n,type:a="text",error:i="",warning:o="",helperText:l="",placeholder:s,endIcon:c,startIcon:u,disabled:d=!1,autofocus:h=!1,inputmode:m="text",caretPosition:p,onChange:f,onEnter:v,onKeyDown:g,onFocus:y,onBlur:_,onChangeCaret:b}=e;const{isDarkTheme:w}=Mt(),{isMobile:k}=ta(),x=(0,r.useRef)(null),S=(0,r.useRef)(null),C=(0,r.useMemo)((()=>"textarea"===a?S:x),[a]),[E,N]=(0,r.useState)([0,0]),A=Er()({"vm-text-field__input":!0,"vm-text-field__input_error":i,"vm-text-field__input_warning":!i&&o,"vm-text-field__input_icon-start":u,"vm-text-field__input_disabled":d,"vm-text-field__input_textarea":"textarea"===a}),M=e=>{const{selectionStart:t,selectionEnd:n}=e;N([t||0,n||0])},T=e=>{M(e.currentTarget)},$=e=>{g&&g(e);const{key:t,ctrlKey:n,metaKey:r}=e,i="Enter"===t;("textarea"!==a?i:i&&(r||n))&&v&&(e.preventDefault(),v())},L=e=>{M(e.currentTarget)},P=e=>{d||(f&&f(e.currentTarget.value),M(e.currentTarget))},I=()=>{y&&y()},O=()=>{_&&_()},R=e=>{try{C.current&&C.current.setSelectionRange(e[0],e[1])}catch(zp){return zp}};return(0,r.useEffect)((()=>{var e;h&&!k&&(null===C||void 0===C||null===(e=C.current)||void 0===e?void 0:e.focus)&&C.current.focus()}),[C,h]),(0,r.useEffect)((()=>{b&&b(E)}),[E]),(0,r.useEffect)((()=>{R(E)}),[n]),(0,r.useEffect)((()=>{p&&R(p)}),[p]),Nt("label",{className:Er()({"vm-text-field":!0,"vm-text-field_textarea":"textarea"===a,"vm-text-field_dark":w}),"data-replicated-value":n,children:[u&&Nt("div",{className:"vm-text-field__icon-start",children:u}),c&&Nt("div",{className:"vm-text-field__icon-end",children:c}),"textarea"===a?Nt("textarea",{className:A,disabled:d,ref:S,value:n,rows:1,inputMode:m,placeholder:s,autoCapitalize:"none",onInput:P,onKeyDown:$,onKeyUp:L,onFocus:I,onBlur:O,onMouseUp:T}):Nt("input",{className:A,disabled:d,ref:x,value:n,type:a,placeholder:s,inputMode:m,autoCapitalize:"none",onInput:P,onKeyDown:$,onKeyUp:L,onFocus:I,onBlur:O,onMouseUp:T}),t&&Nt("span",{className:"vm-text-field__label",children:t}),Nt(Wa,{error:i,warning:o,info:l})]})},Qa=e=>{let{accountIds:t}=e;const n=Qe(),{isMobile:a}=ta(),{tenantId:i,serverUrl:o}=Mt(),l=Tt(),s=vn(),[c,u]=(0,r.useState)(""),d=(0,r.useRef)(null),{value:h,toggle:m,setFalse:p}=ma(!1),f=(0,r.useMemo)((()=>{if(!c)return t;try{const e=new RegExp(c,"i");return t.filter((t=>e.test(t))).sort(((t,n)=>{var r,a;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(a=n.match(e))||void 0===a?void 0:a.index)||0)}))}catch(zp){return[]}}),[c,t]),v=(0,r.useMemo)((()=>t.length>1),[t]),g=e=>()=>{const t=e;if(l({type:"SET_TENANT_ID",payload:t}),o){const e=Ge(o,t);if(e===o)return;l({type:"SET_SERVER",payload:e}),s({type:"RUN_QUERY"})}p()};return(0,r.useEffect)((()=>{const e=Je(o);i&&i!==e?g(i)():g(e)()}),[o]),v?Nt("div",{className:"vm-tenant-input",children:[Nt(ba,{title:"Define Tenant ID if you need request to another storage",children:Nt("div",{ref:d,children:a?Nt("div",{className:"vm-mobile-option",onClick:m,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(cr,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Tenant ID"}),Nt("span",{className:"vm-mobile-option-text__value",children:i})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(Fn,{})})]}):Nt(da,{className:n?"":"vm-header-button",variant:"contained",color:"primary",fullWidth:!0,startIcon:Nt(cr,{}),endIcon:Nt("div",{className:Er()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":h}),children:Nt(Fn,{})}),onClick:m,children:i})})}),Nt(ha,{open:h,placement:"bottom-right",onClose:p,buttonRef:d,title:a?"Define Tenant ID":void 0,children:Nt("div",{className:Er()({"vm-list vm-tenant-input-list":!0,"vm-list vm-tenant-input-list_mobile":a}),children:[Nt("div",{className:"vm-tenant-input-list__search",children:Nt(Ka,{autofocus:!0,label:"Search",value:c,onChange:u,type:"search"})}),f.map((e=>Nt("div",{className:Er()({"vm-list-item":!0,"vm-list-item_mobile":a,"vm-list-item_active":e===i}),onClick:g(e),children:e},e)))]})})]}):null};const Za=function(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current},Ga=()=>{const e=Qe(),{isMobile:t}=ta(),{customStep:n,isHistogram:a}=Br(),{period:{step:i,end:o,start:l}}=fn(),s=qr(),c=Za(o-l),u=(0,r.useMemo)((()=>Zt(o-l,a)),[i,a]),[d,h]=(0,r.useState)(n||u),[m,p]=(0,r.useState)(""),{value:f,toggle:v,setFalse:g}=ma(!1),y=(0,r.useRef)(null),_=e=>{const t=e||d||u||"1s",n=(t.match(/[a-zA-Z]+/g)||[]).length?t:`${t}s`;s({type:"SET_CUSTOM_STEP",payload:n}),h(n),p("")},b=()=>{_(),g()},w=e=>{const t=e.match(/[-+]?([0-9]*\.[0-9]+|[0-9]+)/g)||[],n=e.match(/[a-zA-Z]+/g)||[],r=t.length&&t.every((e=>parseFloat(e)>0)),a=n.every((e=>Ut.find((t=>t.short===e)))),i=r&&a;h(e),p(i?"":pt.validStep)};return(0,r.useEffect)((()=>{n&&_(n)}),[n]),(0,r.useEffect)((()=>{!n&&u&&_(u)}),[u]),(0,r.useEffect)((()=>{o-l!==c&&c&&u&&_(u)}),[o,l,c,u]),(0,r.useEffect)((()=>{i!==n&&i!==u||_(u)}),[a]),Nt("div",{className:"vm-step-control",ref:y,children:[t?Nt("div",{className:"vm-mobile-option",onClick:v,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(ir,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Step"}),Nt("span",{className:"vm-mobile-option-text__value",children:d})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(Fn,{})})]}):Nt(ba,{title:"Query resolution step width",children:Nt(da,{className:e?"":"vm-header-button",variant:"contained",color:"primary",startIcon:Nt(ir,{}),onClick:v,children:Nt("p",{children:["STEP",Nt("p",{className:"vm-step-control__value",children:d})]})})}),Nt(ha,{open:f,placement:"bottom-right",onClose:b,buttonRef:y,title:t?"Query resolution step width":void 0,children:Nt("div",{className:Er()({"vm-step-control-popper":!0,"vm-step-control-popper_mobile":t}),children:[Nt(Ka,{autofocus:!0,label:"Step value",value:d,error:m,onChange:w,onEnter:()=>{_(),b()},onFocus:()=>{document.activeElement instanceof HTMLInputElement&&document.activeElement.select()},onBlur:_,endIcon:Nt(ba,{title:`Set default step value: ${u}`,children:Nt(da,{size:"small",variant:"text",color:"primary",startIcon:Nt(Pn,{}),onClick:()=>{const e=u||"1s";w(e),_(e)},ariaLabel:"reset step"})})}),Nt("div",{className:"vm-step-control-popper-info",children:[Nt("code",{children:"step"})," - the ",Nt("a",{className:"vm-link vm-link_colored",href:"https://prometheus.io/docs/prometheus/latest/querying/basics/#time-durations",target:"_blank",rel:"noreferrer",children:"interval"}),"between datapoints, which must be returned from the range query. The ",Nt("code",{children:"query"})," is executed at",Nt("code",{children:"start"}),", ",Nt("code",{children:"start+step"}),", ",Nt("code",{children:"start+2*step"}),", \u2026, ",Nt("code",{children:"end"})," timestamps.",Nt("a",{className:"vm-link vm-link_colored",href:"https://docs.victoriametrics.com/keyConcepts.html#range-query",target:"_blank",rel:"help noreferrer",children:"Read more about Range query"})]})]})})]})},Ja=e=>{let{relativeTime:t,setDuration:n}=e;const{isMobile:r}=ta();return Nt("div",{className:Er()({"vm-time-duration":!0,"vm-time-duration_mobile":r}),children:rn.map((e=>{let{id:a,duration:i,until:o,title:l}=e;return Nt("div",{className:Er()({"vm-list-item":!0,"vm-list-item_mobile":r,"vm-list-item_active":a===t}),onClick:(s={duration:i,until:o(),id:a},()=>{n(s)}),children:l||i},a);var s}))})},Xa=e=>{let{viewDate:t,showArrowNav:n,onChangeViewDate:r,toggleDisplayYears:a}=e;return Nt("div",{className:"vm-calendar-header",children:[Nt("div",{className:"vm-calendar-header-left",onClick:a,children:[Nt("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),Nt("div",{className:"vm-calendar-header-left__select-year",children:Nt(jn,{})})]}),n&&Nt("div",{className:"vm-calendar-header-right",children:[Nt("div",{className:"vm-calendar-header-right__prev",onClick:()=>{r(t.subtract(1,"month"))},children:Nt(Fn,{})}),Nt("div",{className:"vm-calendar-header-right__next",onClick:()=>{r(t.add(1,"month"))},children:Nt(Fn,{})})]})]})},ei=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ti=e=>{let{viewDate:t,selectDate:n,onChangeSelectDate:a}=e;const o="YYYY-MM-DD",l=i().tz(),s=i()(t.format(o)),c=(0,r.useMemo)((()=>{const e=new Array(42).fill(null),t=s.startOf("month"),n=s.endOf("month").diff(t,"day")+1,r=new Array(n).fill(t).map(((e,t)=>e.add(t,"day"))),a=t.day();return e.splice(a,n,...r),e}),[s]),u=e=>()=>{e&&a(e)};return Nt("div",{className:"vm-calendar-body",children:[ei.map((e=>Nt(ba,{title:e,children:Nt("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]})},e))),c.map(((e,t)=>Nt("div",{className:Er()({"vm-calendar-body-cell":!0,"vm-calendar-body-cell_day":!0,"vm-calendar-body-cell_day_empty":!e,"vm-calendar-body-cell_day_active":(e&&e.format(o))===n.format(o),"vm-calendar-body-cell_day_today":(e&&e.format(o))===l.format(o)}),onClick:u(e),children:e&&e.format("D")},e?e.format(o):t)))]})},ni=e=>{let{viewDate:t,onChangeViewDate:n}=e;const a=i()().format("YYYY"),o=(0,r.useMemo)((()=>t.format("YYYY")),[t]),l=(0,r.useMemo)((()=>{const e=i()().subtract(9,"year");return new Array(18).fill(e).map(((e,t)=>e.add(t,"year")))}),[t]);(0,r.useEffect)((()=>{const e=document.getElementById(`vm-calendar-year-${o}`);e&&e.scrollIntoView({block:"center"})}),[]);return Nt("div",{className:"vm-calendar-years",children:l.map((e=>{return Nt("div",{className:Er()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===o,"vm-calendar-years__year_today":e.format("YYYY")===a}),id:`vm-calendar-year-${e.format("YYYY")}`,onClick:(t=e,()=>{n(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})},ri=e=>{let{viewDate:t,selectDate:n,onChangeViewDate:a}=e;const o=i()().format("MM"),l=(0,r.useMemo)((()=>n.format("MM")),[n]),s=(0,r.useMemo)((()=>new Array(12).fill("").map(((e,n)=>i()(t).month(n)))),[t]);(0,r.useEffect)((()=>{const e=document.getElementById(`vm-calendar-year-${l}`);e&&e.scrollIntoView({block:"center"})}),[]);return Nt("div",{className:"vm-calendar-years",children:s.map((e=>{return Nt("div",{className:Er()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("MM")===l,"vm-calendar-years__year_today":e.format("MM")===o}),id:`vm-calendar-year-${e.format("MM")}`,onClick:(t=e,()=>{a(t)}),children:e.format("MMMM")},e.format("MM"));var t}))})};var ai=function(e){return e[e.days=0]="days",e[e.months=1]="months",e[e.years=2]="years",e}(ai||{});const ii=e=>{let{date:t,format:n=Pt,onChange:a}=e;const[o,l]=(0,r.useState)(ai.days),[s,c]=(0,r.useState)(i().tz(t)),[u,d]=(0,r.useState)(i().tz(t)),h=i().tz(),m=h.format(Lt)===s.format(Lt),{isMobile:p}=ta(),f=e=>{c(e),l((e=>e===ai.years?ai.months:ai.days))};return(0,r.useEffect)((()=>{u.format()!==i().tz(t).format()&&a(u.format(n))}),[u]),(0,r.useEffect)((()=>{const e=i().tz(t);c(e),d(e)}),[t]),Nt("div",{className:Er()({"vm-calendar":!0,"vm-calendar_mobile":p}),children:[Nt(Xa,{viewDate:s,onChangeViewDate:f,toggleDisplayYears:()=>{l((e=>e===ai.years?ai.days:ai.years))},showArrowNav:o===ai.days}),o===ai.days&&Nt(ti,{viewDate:s,selectDate:u,onChangeSelectDate:e=>{d(e)}}),o===ai.years&&Nt(ni,{viewDate:s,onChangeViewDate:f}),o===ai.months&&Nt(ri,{selectDate:u,viewDate:s,onChangeViewDate:f}),!m&&o===ai.days&&Nt("div",{className:"vm-calendar-footer",children:Nt(da,{variant:"text",size:"small",onClick:()=>{c(h)},children:"show today"})})]})},oi=(0,r.forwardRef)(((e,t)=>{let{date:n,targetRef:a,format:o=Pt,onChange:l,label:s}=e;const c=(0,r.useMemo)((()=>i()(n).isValid()?i().tz(n):i()().tz()),[n]),{isMobile:u}=ta(),{value:d,toggle:h,setFalse:m}=ma(!1);return Mr("click",h,a),Mr("keyup",(e=>{"Escape"!==e.key&&"Enter"!==e.key||m()})),Nt(Ct.FK,{children:Nt(ha,{open:d,buttonRef:a,placement:"bottom-right",onClose:m,title:u?s:void 0,children:Nt("div",{ref:t,children:Nt(ii,{date:c,format:o,onChange:e=>{l(e),m()}})})})})}));var li=n(494),si=n.n(li);const ci=e=>i()(e).isValid()?i().tz(e).format(Pt):e,ui=e=>{let{value:t="",label:n,pickerLabel:a,pickerRef:o,onChange:l,onEnter:s}=e;const c=(0,r.useRef)(null),[u,d]=(0,r.useState)(null),[h,m]=(0,r.useState)(ci(t)),[p,f]=(0,r.useState)(!1),[v,g]=(0,r.useState)(!1),y=i()(h).isValid()?"":"Invalid date format";return(0,r.useEffect)((()=>{const e=ci(t);e!==h&&m(e),v&&(s(),g(!1))}),[t]),(0,r.useEffect)((()=>{p&&u&&(u.focus(),u.setSelectionRange(11,11),f(!1))}),[p]),Nt("div",{className:Er()({"vm-date-time-input":!0,"vm-date-time-input_error":y}),children:[Nt("label",{children:n}),Nt(si(),{tabIndex:1,inputRef:d,mask:"9999-99-99 99:99:99",placeholder:"YYYY-MM-DD HH:mm:ss",value:h,autoCapitalize:"none",inputMode:"numeric",maskChar:null,onChange:e=>{m(e.currentTarget.value)},onBlur:()=>{l(h)},onKeyUp:e=>{"Enter"===e.key&&(l(h),g(!0))}}),y&&Nt("span",{className:"vm-date-time-input__error-text",children:y}),Nt("div",{className:"vm-date-time-input__icon",ref:c,children:Nt(da,{variant:"text",color:"gray",size:"small",startIcon:Nt(Vn,{}),ariaLabel:"calendar"})}),Nt(oi,{label:a,ref:o,date:h,onChange:e=>{m(e),f(!0)},targetRef:c})]})},di=()=>{const{isMobile:e}=ta(),{isDarkTheme:t}=Mt(),n=(0,r.useRef)(null),a=Tr(),o=(0,r.useMemo)((()=>a.width>1120),[a]),[l,s]=(0,r.useState)(),[c,u]=(0,r.useState)(),{period:{end:d,start:h},relativeTime:m,timezone:p,duration:f}=fn(),v=vn(),g=Qe(),y=Za(p),{value:_,toggle:b,setFalse:w}=ma(!1),k=(0,r.useMemo)((()=>({region:p,utc:on(p)})),[p]);(0,r.useEffect)((()=>{s(Xt(tn(d)))}),[p,d]),(0,r.useEffect)((()=>{u(Xt(tn(h)))}),[p,h]);const x=e=>{let{duration:t,until:n,id:r}=e;v({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),w()},S=(0,r.useMemo)((()=>({start:i().tz(tn(h)).format(Pt),end:i().tz(tn(d)).format(Pt)})),[h,d,p]),C=(0,r.useMemo)((()=>m&&"none"!==m?m.replace(/_/g," "):`${S.start} - ${S.end}`),[m,S]),E=(0,r.useRef)(null),N=(0,r.useRef)(null),A=(0,r.useRef)(null),M=()=>{c&&l&&v({type:"SET_PERIOD",payload:{from:i().tz(c).toDate(),to:i().tz(l).toDate()}}),w()};return(0,r.useEffect)((()=>{const e=an({relativeTimeId:m,defaultDuration:f,defaultEndInput:tn(d)});y&&p!==y&&x({id:e.relativeTimeId,duration:e.duration,until:e.endInput})}),[p,y]),ua(n,(t=>{var n,r;if(e)return;const a=t.target,i=(null===E||void 0===E?void 0:E.current)&&(null===E||void 0===E||null===(n=E.current)||void 0===n?void 0:n.contains(a)),o=(null===N||void 0===N?void 0:N.current)&&(null===N||void 0===N||null===(r=N.current)||void 0===r?void 0:r.contains(a));i||o||w()})),Nt(Ct.FK,{children:[Nt("div",{ref:A,children:e?Nt("div",{className:"vm-mobile-option",onClick:b,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(Hn,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Time range"}),Nt("span",{className:"vm-mobile-option-text__value",children:C})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(Fn,{})})]}):Nt(ba,{title:o?"Time range controls":C,children:Nt(da,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:Nt(Hn,{}),onClick:b,ariaLabel:"time range controls",children:o&&Nt("span",{children:C})})})}),Nt(ha,{open:_,buttonRef:A,placement:"bottom-right",onClose:w,clickOutside:!1,title:e?"Time range controls":"",children:Nt("div",{className:Er()({"vm-time-selector":!0,"vm-time-selector_mobile":e}),ref:n,children:[Nt("div",{className:"vm-time-selector-left",children:[Nt("div",{className:Er()({"vm-time-selector-left-inputs":!0,"vm-time-selector-left-inputs_dark":t}),children:[Nt(ui,{value:c,label:"From:",pickerLabel:"Date From",pickerRef:E,onChange:u,onEnter:M}),Nt(ui,{value:l,label:"To:",pickerLabel:"Date To",pickerRef:N,onChange:s,onEnter:M})]}),Nt("div",{className:"vm-time-selector-left-timezone",children:[Nt("div",{className:"vm-time-selector-left-timezone__title",children:k.region}),Nt("div",{className:"vm-time-selector-left-timezone__utc",children:k.utc})]}),Nt(da,{variant:"text",startIcon:Nt(Un,{}),onClick:()=>v({type:"RUN_QUERY_TO_NOW"}),children:"switch to now"}),Nt("div",{className:"vm-time-selector-left__controls",children:[Nt(da,{color:"error",variant:"outlined",onClick:()=>{s(Xt(tn(d))),u(Xt(tn(h))),w()},children:"Cancel"}),Nt(da,{color:"primary",onClick:M,children:"Apply"})]})]}),Nt(Ja,{relativeTime:m||"",setDuration:x})]})})]})},hi=()=>{const e=ie(),[t,n]=je();return{setSearchParamsFromKeys:(0,r.useCallback)((r=>{const a=!!Array.from(t.values()).length;let i=!1;Object.entries(r).forEach((e=>{let[n,r]=e;t.get(n)!==`${r}`&&(t.set(n,`${r}`),i=!0)})),i&&(a?n(t):e(`?${t.toString()}`,{replace:!0}))}),[t,e])}},mi=()=>{const{isMobile:e}=ta(),t=Qe(),n=(0,r.useRef)(null),[a]=je(),{setSearchParamsFromKeys:o}=hi(),l=a.get("date")||i()().tz().format(Lt),s=(0,r.useMemo)((()=>i().tz(l).format(Lt)),[l]),c=e=>{o({date:e})};return(0,r.useEffect)((()=>{c(l)}),[]),Nt("div",{children:[Nt("div",{ref:n,children:e?Nt("div",{className:"vm-mobile-option",children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(Vn,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Date control"}),Nt("span",{className:"vm-mobile-option-text__value",children:s})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(Fn,{})})]}):Nt(ba,{title:"Date control",children:Nt(da,{className:t?"":"vm-header-button",variant:"contained",color:"primary",startIcon:Nt(Vn,{}),children:s})})}),Nt(oi,{label:"Date control",date:l||"",format:Lt,onChange:c,targetRef:n})]})},pi=[{seconds:0,title:"Off"},{seconds:1,title:"1s"},{seconds:2,title:"2s"},{seconds:5,title:"5s"},{seconds:10,title:"10s"},{seconds:30,title:"30s"},{seconds:60,title:"1m"},{seconds:300,title:"5m"},{seconds:900,title:"15m"},{seconds:1800,title:"30m"},{seconds:3600,title:"1h"},{seconds:7200,title:"2h"}],fi=()=>{const{isMobile:e}=ta(),t=vn(),n=Qe(),[a,i]=(0,r.useState)(!1),[o,l]=(0,r.useState)(pi[0]),{value:s,toggle:c,setFalse:u}=ma(!1),d=(0,r.useRef)(null);(0,r.useEffect)((()=>{const e=o.seconds;let n;return a?n=setInterval((()=>{t({type:"RUN_QUERY"})}),1e3*e):l(pi[0]),()=>{n&&clearInterval(n)}}),[o,a]);const h=e=>()=>{(e=>{(a&&!e.seconds||!a&&e.seconds)&&i((e=>!e)),l(e),u()})(e)};return Nt(Ct.FK,{children:[Nt("div",{className:"vm-execution-controls",children:Nt("div",{className:Er()({"vm-execution-controls-buttons":!0,"vm-execution-controls-buttons_mobile":e,"vm-header-button":!n}),children:[!e&&Nt(ba,{title:"Refresh dashboard",children:Nt(da,{variant:"contained",color:"primary",onClick:()=>{t({type:"RUN_QUERY"})},startIcon:Nt(zn,{}),ariaLabel:"refresh dashboard"})}),e?Nt("div",{className:"vm-mobile-option",onClick:c,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(Pn,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Auto-refresh"}),Nt("span",{className:"vm-mobile-option-text__value",children:o.title})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(Fn,{})})]}):Nt(ba,{title:"Auto-refresh control",children:Nt("div",{ref:d,children:Nt(da,{variant:"contained",color:"primary",fullWidth:!0,endIcon:Nt("div",{className:Er()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":s}),children:Nt(Fn,{})}),onClick:c,children:o.title})})})]})}),Nt(ha,{open:s,placement:"bottom-right",onClose:u,buttonRef:d,title:e?"Auto-refresh duration":void 0,children:Nt("div",{className:Er()({"vm-execution-controls-list":!0,"vm-execution-controls-list_mobile":e}),children:pi.map((t=>Nt("div",{className:Er()({"vm-list-item":!0,"vm-list-item_mobile":e,"vm-list-item_active":t.seconds===o.seconds}),onClick:h(t),children:t.title},t.seconds)))})})]})},vi="Enable to save the modified server URL to local storage, preventing reset upon page refresh.",gi="Disable to stop saving the server URL to local storage, reverting to the default URL on page refresh.",yi=(0,r.forwardRef)(((e,t)=>{let{onClose:n}=e;const{serverUrl:a}=Mt(),i=Tt(),{value:o,toggle:l}=ma(!!et("SERVER_URL")),[s,c]=(0,r.useState)(a),[u,d]=(0,r.useState)(""),h=(0,r.useCallback)((()=>{const e=Je(s);""!==e&&i({type:"SET_TENANT_ID",payload:e}),i({type:"SET_SERVER",payload:s}),n()}),[s]);return(0,r.useEffect)((()=>{a||d(pt.emptyServer),bt(a)||d(pt.validServer)}),[a]),(0,r.useEffect)((()=>{o?Xe("SERVER_URL",s):tt(["SERVER_URL"])}),[o]),(0,r.useEffect)((()=>{o&&Xe("SERVER_URL",s)}),[s]),(0,r.useEffect)((()=>{a!==s&&c(a)}),[a]),(0,r.useImperativeHandle)(t,(()=>({handleApply:h})),[h]),Nt("div",{children:[Nt("div",{className:"vm-server-configurator__title",children:"Server URL"}),Nt("div",{className:"vm-server-configurator-url",children:[Nt(Ka,{autofocus:!0,value:s,error:u,onChange:e=>{c(e||""),d("")},onEnter:h,inputmode:"url"}),Nt(ba,{title:o?gi:vi,children:Nt(da,{className:"vm-server-configurator-url__button",variant:"text",color:o?"primary":"gray",onClick:l,startIcon:Nt(cr,{})})})]})]})})),_i=[{label:"Graph",type:mt.chart},{label:"JSON",type:mt.code},{label:"Table",type:mt.table}],bi=(0,r.forwardRef)(((e,t)=>{let{onClose:n}=e;const{isMobile:a}=ta(),{seriesLimits:i}=Fr(),o=jr(),[l,s]=(0,r.useState)(i),[c,u]=(0,r.useState)({table:"",chart:"",code:""}),d=(0,r.useCallback)((()=>{o({type:"SET_SERIES_LIMITS",payload:l}),n()}),[l]);return(0,r.useImperativeHandle)(t,(()=>({handleApply:d})),[d]),Nt("div",{className:"vm-limits-configurator",children:[Nt("div",{className:"vm-server-configurator__title",children:["Series limits by tabs",Nt(ba,{title:"Set to 0 to disable the limit",children:Nt(da,{variant:"text",color:"primary",size:"small",startIcon:Nt(In,{})})}),Nt("div",{className:"vm-limits-configurator-title__reset",children:Nt(da,{variant:"text",color:"primary",size:"small",startIcon:Nt(Pn,{}),onClick:()=>{s(lt)},children:"Reset limits"})})]}),Nt("div",{className:Er()({"vm-limits-configurator__inputs":!0,"vm-limits-configurator__inputs_mobile":a}),children:_i.map((e=>{return Nt("div",{children:Nt(Ka,{label:e.label,value:l[e.type],error:c[e.type],onChange:(t=e.type,e=>{const n=e||"";u((e=>({...e,[t]:+n<0?pt.positiveNumber:""}))),s({...l,[t]:n||1/0})}),onEnter:d,type:"number"})},e.type);var t}))})]})})),wi=bi,ki=e=>{let{defaultExpanded:t=!1,onChange:n,title:a,children:i}=e;const[o,l]=(0,r.useState)(t);return(0,r.useEffect)((()=>{n&&n(o)}),[o]),Nt(Ct.FK,{children:[Nt("header",{className:`vm-accordion-header ${o&&"vm-accordion-header_open"}`,onClick:()=>{l((e=>!e))},children:[a,Nt("div",{className:`vm-accordion-header__arrow ${o&&"vm-accordion-header__arrow_open"}`,children:Nt(Fn,{})})]}),o&&Nt("section",{className:"vm-accordion-section",children:i},"content")]})},xi=()=>Nt(ba,{title:"Browser timezone is not recognized, supported, or could not be determined.",children:Nt(On,{})}),Si=cn(),Ci=(0,r.forwardRef)(((e,t)=>{const{isMobile:n}=ta(),a=ln(),{timezone:i,defaultTimezone:o}=fn(),l=vn(),[s,c]=(0,r.useState)(i),[u,d]=(0,r.useState)(""),h=(0,r.useRef)(null),{value:m,toggle:p,setFalse:f}=ma(!1),v=(0,r.useMemo)((()=>[{title:`Default time (${o})`,region:o,utc:o?on(o):"UTC"},{title:Si.title,region:Si.region,utc:on(Si.region),isInvalid:!Si.isValid},{title:"UTC (Coordinated Universal Time)",region:"UTC",utc:"UTC"}].filter((e=>e.region))),[o]),g=(0,r.useMemo)((()=>{if(!u)return a;try{return ln(u)}catch(zp){return{}}}),[u,a]),y=(0,r.useMemo)((()=>Object.keys(g)),[g]),_=(0,r.useMemo)((()=>({region:s,utc:on(s)})),[s]),b=e=>()=>{(e=>{c(e.region),d(""),f()})(e)};return(0,r.useEffect)((()=>{c(i)}),[i]),(0,r.useImperativeHandle)(t,(()=>({handleApply:()=>{l({type:"SET_TIMEZONE",payload:s})}})),[s]),Nt("div",{className:"vm-timezones",children:[Nt("div",{className:"vm-server-configurator__title",children:"Time zone"}),Nt("div",{className:"vm-timezones-item vm-timezones-item_selected",onClick:p,ref:h,children:[Nt("div",{className:"vm-timezones-item__title",children:_.region}),Nt("div",{className:"vm-timezones-item__utc",children:_.utc}),Nt("div",{className:Er()({"vm-timezones-item__icon":!0,"vm-timezones-item__icon_open":m}),children:Nt(jn,{})})]}),Nt(ha,{open:m,buttonRef:h,placement:"bottom-left",onClose:f,fullWidth:!0,title:n?"Time zone":void 0,children:Nt("div",{className:Er()({"vm-timezones-list":!0,"vm-timezones-list_mobile":n}),children:[Nt("div",{className:"vm-timezones-list-header",children:[Nt("div",{className:"vm-timezones-list-header__search",children:Nt(Ka,{autofocus:!0,label:"Search",value:u,onChange:e=>{d(e)}})}),v.map(((e,t)=>e&&Nt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[Nt("div",{className:"vm-timezones-item__title",children:[e.title,e.isInvalid&&Nt(xi,{})]}),Nt("div",{className:"vm-timezones-item__utc",children:e.utc})]},`${t}_${e.region}`)))]}),y.map((e=>Nt("div",{className:"vm-timezones-list-group",children:Nt(ki,{defaultExpanded:!0,title:Nt("div",{className:"vm-timezones-list-group__title",children:e}),children:Nt("div",{className:"vm-timezones-list-group-options",children:g[e]&&g[e].map((e=>Nt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[Nt("div",{className:"vm-timezones-item__title",children:e.region}),Nt("div",{className:"vm-timezones-item__utc",children:e.utc})]},e.search)))})})},e)))]})})]})})),Ei=Ci,Ni=e=>{let{options:t,value:n,label:a,onChange:i}=e;const o=(0,r.useRef)(null),[l,s]=(0,r.useState)({width:"0px",left:"0px",borderRadius:"0px"}),c=e=>()=>{i(e)};return(0,r.useEffect)((()=>{if(!o.current)return void s({width:"0px",left:"0px",borderRadius:"0px"});const e=t.findIndex((e=>e.value===n)),{width:r}=o.current.getBoundingClientRect();let a=r,i=e*a,l="0";0===e&&(l="16px 0 0 16px"),e===t.length-1&&(l="10px",i-=1,l="0 16px 16px 0"),0!==e&&e!==t.length-1&&(a+=1,i-=1),s({width:`${a}px`,left:`${i}px`,borderRadius:l})}),[o,n,t]),Nt("div",{className:"vm-toggles",children:[a&&Nt("label",{className:"vm-toggles__label",children:a}),Nt("div",{className:"vm-toggles-group",style:{gridTemplateColumns:`repeat(${t.length}, 1fr)`},children:[l.borderRadius&&Nt("div",{className:"vm-toggles-group__highlight",style:l}),t.map(((e,t)=>Nt("div",{className:Er()({"vm-toggles-group-item":!0,"vm-toggles-group-item_first":0===t,"vm-toggles-group-item_active":e.value===n,"vm-toggles-group-item_icon":e.icon&&e.title}),onClick:c(e.value),ref:e.value===n?o:null,children:[e.icon,e.title]},e.value)))]})]})},Ai=Object.values(ft).map((e=>({title:e,value:e}))),Mi=()=>{const{isMobile:e}=ta(),t=Tt(),{theme:n}=Mt();return Nt("div",{className:Er()({"vm-theme-control":!0,"vm-theme-control_mobile":e}),children:[Nt("div",{className:"vm-server-configurator__title",children:"Theme preferences"}),Nt("div",{className:"vm-theme-control__toggle",children:Nt(Ni,{options:Ai,value:n,onChange:e=>{t({type:"SET_THEME",payload:e})}})},`${e}`)]})},Ti=e=>{let{value:t=!1,disabled:n=!1,label:r,color:a="secondary",fullWidth:i,onChange:o}=e;return Nt("div",{className:Er()({"vm-switch":!0,"vm-switch_full-width":i,"vm-switch_disabled":n,"vm-switch_active":t,[`vm-switch_${a}_active`]:t,[`vm-switch_${a}`]:a}),onClick:()=>{n||o(!t)},children:[Nt("div",{className:"vm-switch-track",children:Nt("div",{className:"vm-switch-track__thumb"})}),r&&Nt("span",{className:"vm-switch__label",children:r})]})},$i=()=>{const{isMobile:e}=ta(),{markdownParsing:t}=(0,r.useContext)(Jr).state,n=(0,r.useContext)(Jr).dispatch;return Nt("div",{children:[Nt("div",{className:"vm-server-configurator__title",children:"Markdown Parsing for Logs"}),Nt(Ti,{label:t?"Disable markdown parsing":"Enable markdown parsing",value:t,onChange:e=>{n({type:"SET_MARKDOWN_PARSING",payload:e})},fullWidth:e}),Nt("div",{className:"vm-server-configurator__info",children:"Toggle this switch to enable or disable the Markdown formatting for log entries. Enabling this will parse log texts to Markdown."})]})},Li="Settings",{REACT_APP_TYPE:Pi}={},Ii=Pi===He.logs,Oi=()=>{const{isMobile:e}=ta(),t=Qe(),n=(0,r.useRef)(null),a=(0,r.useRef)(null),i=(0,r.useRef)(null),{value:o,setTrue:l,setFalse:s}=ma(!1),c=[{show:!t&&!Ii,component:Nt(yi,{ref:n,onClose:s})},{show:!Ii,component:Nt(wi,{ref:a,onClose:s})},{show:Ii,component:Nt($i,{})},{show:!0,component:Nt(Ei,{ref:i})},{show:!t,component:Nt(Mi,{})}].filter((e=>e.show));return Nt(Ct.FK,{children:[e?Nt("div",{className:"vm-mobile-option",onClick:l,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt($n,{})}),Nt("div",{className:"vm-mobile-option-text",children:Nt("span",{className:"vm-mobile-option-text__label",children:Li})}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(Fn,{})})]}):Nt(ba,{title:Li,children:Nt(da,{className:Er()({"vm-header-button":!t}),variant:"contained",color:"primary",startIcon:Nt($n,{}),onClick:l,ariaLabel:"settings"})}),o&&Nt(_a,{title:Li,onClose:s,children:Nt("div",{className:Er()({"vm-server-configurator":!0,"vm-server-configurator_mobile":e}),children:[c.map(((e,t)=>Nt("div",{className:"vm-server-configurator__input",children:e.component},t))),Nt("div",{className:"vm-server-configurator-footer",children:[Nt(da,{color:"error",variant:"outlined",onClick:s,children:"Cancel"}),Nt(da,{color:"primary",variant:"contained",onClick:()=>{n.current&&n.current.handleApply(),a.current&&a.current.handleApply(),i.current&&i.current.handleApply(),s()},children:"Apply"})]})]})})]})},Ri=e=>{let{displaySidebar:t,isMobile:n,headerSetup:r,accountIds:a}=e;return Nt("div",{className:Er()({"vm-header-controls":!0,"vm-header-controls_mobile":n}),children:[(null===r||void 0===r?void 0:r.tenant)&&Nt(Qa,{accountIds:a||[]}),(null===r||void 0===r?void 0:r.stepControl)&&Nt(Ga,{}),(null===r||void 0===r?void 0:r.timeSelector)&&Nt(di,{}),(null===r||void 0===r?void 0:r.cardinalityDatePicker)&&Nt(mi,{}),(null===r||void 0===r?void 0:r.executionControls)&&Nt(fi,{}),Nt(Oi,{}),!t&&Nt(La,{})]})},Di=Boolean(et("DISABLED_DEFAULT_TIMEZONE")),zi=()=>{const{serverUrl:e}=Mt(),t=vn(),[n,a]=(0,r.useState)(!1),[o,l]=(0,r.useState)(""),s=async()=>{if(e&&!{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1}.REACT_APP_TYPE){l(""),a(!0);try{const n=await fetch(`${e}/vmui/timezone`),r=await n.json();n.ok?((e=>{const n="local"===e.toLowerCase()?cn().region:e;try{if(i()().tz(n).isValid(),t({type:"SET_DEFAULT_TIMEZONE",payload:n}),Di)return;t({type:"SET_TIMEZONE",payload:n})}catch(zp){zp instanceof Error&&l(`${zp.name}: ${zp.message}`)}})(r.timezone),a(!1)):(l(r.error),a(!1))}catch(zp){a(!1),zp instanceof Error&&l(`${zp.name}: ${zp.message}`)}}};return(0,r.useEffect)((()=>{s()}),[e]),{isLoading:n,error:o}},Fi=()=>{const{serverUrl:e}=Mt(),t=Tt(),[n,a]=(0,r.useState)(!1),[i,o]=(0,r.useState)("");return(0,r.useEffect)((()=>{(async()=>{if(e&&!{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1}.REACT_APP_TYPE){o(""),a(!0);try{const n=(e=>e.replace(Ze,""))(e),r=await fetch(`${n}/flags`),a=(await r.text()).split("\n").filter((e=>""!==e.trim())).reduce(((e,t)=>{const[n,r]=t.split("=");return e[n.trim().replace(/^-/,"").trim()]=r?r.trim().replace(/^"(.*)"$/,"$1"):null,e}),{});t({type:"SET_FLAGS",payload:a})}catch(zp){a(!1),zp instanceof Error&&o(`${zp.name}: ${zp.message}`)}}})()}),[e]),{isLoading:n,error:i}},ji=()=>{const e=Tt(),[t,n]=(0,r.useState)(!1),[a,i]=(0,r.useState)("");return(0,r.useEffect)((()=>{(async()=>{if(!{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1}.REACT_APP_TYPE){i(""),n(!0);try{const t=await fetch("./config.json"),n=await t.json();e({type:"SET_APP_CONFIG",payload:n||{}})}catch(zp){n(!1),zp instanceof Error&&i(`${zp.name}: ${zp.message}`)}}})()}),[]),{isLoading:t,error:a}},Hi=()=>{const e=Qe(),{isMobile:t}=ta(),{pathname:n}=re(),[a,i]=je();Ya(),zi(),ji(),Fi();return(0,r.useEffect)((()=>{var e;const t="vmui",r=null===(e=Ye[n])||void 0===e?void 0:e.title;document.title=r?`${r} - ${t}`:t}),[n]),(0,r.useEffect)((()=>{const{search:e,href:t}=window.location;if(e){const t=at().parse(e,{ignoreQueryPrefix:!0});Object.entries(t).forEach((e=>{let[t,n]=e;return a.set(t,n)})),i(a),window.location.search=""}const n=t.replace(/\/\?#\//,"/#/");n!==t&&window.location.replace(n)}),[]),Nt("section",{className:"vm-container",children:[Nt(Ha,{controlsComponent:Ri}),Nt("div",{className:Er()({"vm-container-body":!0,"vm-container-body_mobile":t,"vm-container-body_app":e}),children:Nt(be,{})}),!e&&Nt(qa,{})]})};var Vi=function(e){return e[e.mouse=0]="mouse",e[e.keyboard=1]="keyboard",e}(Vi||{});const Ui=e=>{var t;let{value:n,options:a,anchor:i,disabled:o,minLength:l=2,fullWidth:s,selected:c,noOptionsText:u,label:d,disabledFullScreen:h,offset:m,maxDisplayResults:p,loading:f,onSelect:v,onOpenAutocomplete:g,onFoundOptions:y,onChangeWrapperRef:_}=e;const{isMobile:b}=ta(),w=(0,r.useRef)(null),[k,x]=(0,r.useState)({index:-1}),[S,C]=(0,r.useState)(""),[E,N]=(0,r.useState)(0),{value:A,setValue:M,setFalse:T}=ma(!1),$=(0,r.useMemo)((()=>{if(!A)return[];try{const e=new RegExp(String(n.trim()),"i"),t=a.filter((t=>e.test(t.value))).sort(((t,r)=>{var a,i;return t.value.toLowerCase()===n.trim().toLowerCase()?-1:r.value.toLowerCase()===n.trim().toLowerCase()?1:((null===(a=t.value.match(e))||void 0===a?void 0:a.index)||0)-((null===(i=r.value.match(e))||void 0===i?void 0:i.index)||0)}));return N(t.length),C(t.length>Number(null===p||void 0===p?void 0:p.limit)&&(null===p||void 0===p?void 0:p.message)||""),null!==p&&void 0!==p&&p.limit?t.slice(0,p.limit):t}catch(zp){return[]}}),[A,a,n]),L=(0,r.useMemo)((()=>{var e;return 1===$.length&&(null===(e=$[0])||void 0===e?void 0:e.value)===n}),[$]),P=(0,r.useMemo)((()=>u&&!$.length),[u,$]),I=()=>{x({index:-1})},O=(0,r.useCallback)((e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:a}=e,i=n||r||a,o=$.length&&!L;if("ArrowUp"===t&&!i&&o&&(e.preventDefault(),x((e=>{let{index:t}=e;return{index:t<=0?0:t-1,type:Vi.keyboard}}))),"ArrowDown"===t&&!i&&o){e.preventDefault();const t=$.length-1;x((e=>{let{index:n}=e;return{index:n>=t?t:n+1,type:Vi.keyboard}}))}if("Enter"===t){const e=$[k.index];e&&v(e.value),c||T()}"Escape"===t&&T()}),[k,$,L,T,v,c]);return(0,r.useEffect)((()=>{M(n.length>=l)}),[n,a]),Mr("keydown",O),(0,r.useEffect)((()=>{if(!w.current||k.type===Vi.mouse)return;const e=w.current.childNodes[k.index];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}),[k,$]),(0,r.useEffect)((()=>{x({index:-1})}),[$]),(0,r.useEffect)((()=>{g&&g(A)}),[A]),(0,r.useEffect)((()=>{y&&y(L?[]:$)}),[$,L]),(0,r.useEffect)((()=>{_&&_(w)}),[w]),Nt(ha,{open:A,buttonRef:i,placement:"bottom-left",onClose:T,fullWidth:s,title:b?d:void 0,disabledFullScreen:h,offset:m,children:[Nt("div",{className:Er()({"vm-autocomplete":!0,"vm-autocomplete_mobile":b&&!h}),ref:w,children:[f&&Nt("div",{className:"vm-autocomplete__loader",children:[Nt(zn,{}),Nt("span",{children:"Loading..."})]}),P&&Nt("div",{className:"vm-autocomplete__no-options",children:u}),!L&&$.map(((e,t)=>{return Nt("div",{className:Er()({"vm-list-item":!0,"vm-list-item_mobile":b,"vm-list-item_active":t===k.index,"vm-list-item_multiselect":c,"vm-list-item_multiselect_selected":null===c||void 0===c?void 0:c.includes(e.value),"vm-list-item_with-icon":e.icon}),id:`$autocomplete$${e.value}`,onClick:(r=e.value,()=>{o||(v(r),c||T())}),onMouseEnter:(n=t,()=>{x({index:n,type:Vi.mouse})}),onMouseLeave:I,children:[(null===c||void 0===c?void 0:c.includes(e.value))&&Nt(Xn,{}),Nt(Ct.FK,{children:e.icon}),Nt("span",{children:e.value})]},`${t}${e.value}`);var n,r}))]}),S&&Nt("div",{className:"vm-autocomplete-message",children:["Shown ",null===p||void 0===p?void 0:p.limit," results out of ",E,". ",S]}),(null===(t=$[k.index])||void 0===t?void 0:t.description)&&Nt("div",{className:"vm-autocomplete-info",children:[Nt("div",{className:"vm-autocomplete-info__type",children:$[k.index].type}),Nt("div",{className:"vm-autocomplete-info__description",dangerouslySetInnerHTML:{__html:$[k.index].description||""}})]})]})};var Bi=n(267),qi=n.n(Bi);const Yi=e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&"),Wi=e=>JSON.stringify(e).slice(1,-1),Ki=e=>{const t=e.match(/["`']/g);return!!t&&t.length%2!==0};var Qi=function(e){return e.metric="metric",e.label="label",e.labelValue="labelValue",e}(Qi||{});const Zi={[Qi.metric]:Nt(vr,{}),[Qi.label]:Nt(yr,{}),[Qi.labelValue]:Nt(_r,{})};function Gi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Ji={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Xi(e){Ji=e}const eo=/[&<>"']/,to=new RegExp(eo.source,"g"),no=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ro=new RegExp(no.source,"g"),ao={"&":"&","<":"<",">":">",'"':""","'":"'"},io=e=>ao[e];function oo(e,t){if(t){if(eo.test(e))return e.replace(to,io)}else if(no.test(e))return e.replace(ro,io);return e}const lo=/(^|[^\[])\^/g;function so(e,t){let n="string"===typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let a="string"===typeof t?t:t.source;return a=a.replace(lo,"$1"),n=n.replace(e,a),r},getRegex:()=>new RegExp(n,t)};return r}function co(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const uo={exec:()=>null};function ho(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,a=t;for(;--a>=0&&"\\"===n[a];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:mo(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=mo(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:mo(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=mo(t[0],"\n").split("\n"),n="",r="";const a=[];for(;e.length>0;){let t=!1;const i=[];let o;for(o=0;o/.test(e[o]))i.push(e[o]),t=!0;else{if(t)break;i.push(e[o])}e=e.slice(o);const l=i.join("\n"),s=l.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");n=n?`${n}\n${l}`:l,r=r?`${r}\n${s}`:s;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(s,a,!0),this.lexer.state.top=c,0===e.length)break;const u=a[a.length-1];if("code"===u?.type)break;if("blockquote"===u?.type){const t=u,i=t.raw+"\n"+e.join("\n"),o=this.blockquote(i);a[a.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}if("list"!==u?.type);else{const t=u,i=t.raw+"\n"+e.join("\n"),o=this.list(i);a[a.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=i.substring(a[a.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:a,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,a={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const i=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let o=!1;for(;e;){let n=!1,r="",l="";if(!(t=i.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let s=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],u=!s.trim(),d=0;if(this.options.pedantic?(d=2,l=s.trimStart()):u?d=t[1].length+1:(d=t[2].search(/[^ ]/),d=d>4?1:d,l=s.slice(d),d+=t[1].length),u&&/^[ \t]*$/.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,d-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),a=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:\`\`\`|~~~)`),i=new RegExp(`^ {0,${Math.min(3,d-1)}}#`),o=new RegExp(`^ {0,${Math.min(3,d-1)}}<[a-z].*>`,"i");for(;e;){const h=e.split("\n",1)[0];let m;if(c=h,this.options.pedantic?(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),m=c):m=c.replace(/\t/g," "),a.test(c))break;if(i.test(c))break;if(o.test(c))break;if(t.test(c))break;if(n.test(c))break;if(m.search(/[^ ]/)>=d||!c.trim())l+="\n"+m.slice(d);else{if(u)break;if(s.replace(/\t/g," ").search(/[^ ]/)>=4)break;if(a.test(s))break;if(i.test(s))break;if(n.test(s))break;l+="\n"+c}u||c.trim()||(u=!0),r+=h+"\n",e=e.substring(h.length+1),s=m.slice(d)}}a.loose||(o?a.loose=!0:/\n[ \t]*\n[ \t]*$/.test(r)&&(o=!0));let h,m=null;this.options.gfm&&(m=/^\[[ xX]\] /.exec(l),m&&(h="[ ] "!==m[0],l=l.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:r,task:!!m,checked:h,loose:!1,text:l,tokens:[]}),a.raw+=r}a.items[a.items.length-1].raw=a.items[a.items.length-1].raw.trimEnd(),a.items[a.items.length-1].text=a.items[a.items.length-1].text.trimEnd(),a.raw=a.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));a.loose=n}if(a.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=ho(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),a=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?i.align.push("right"):/^ *:-+: *$/.test(e)?i.align.push("center"):/^ *:-+ *$/.test(e)?i.align.push("left"):i.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]}))));return i}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:oo(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^
    /i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=mo(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),po(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return po(n,e,n[0],this.lexer)}}emStrong(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let a,i,o=n,l=0;const s="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=s.exec(t));){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(i=[...a].length,r[3]||r[4]){o+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){l+=i;continue}if(o-=i,o>0)continue;i=Math.min(i,i+o+l);const t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+i);if(Math.min(n,i)%2){const e=s.slice(1,-1);return{type:"em",raw:s,text:e,tokens:this.lexer.inlineTokens(e)}}const c=s.slice(2,-2);return{type:"strong",raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=oo(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=oo(t[1]),n="mailto:"+e):(e=oo(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])e=oo(t[0]),r="mailto:"+e;else{let a;do{var n;a=t[0],t[0]=null!==(n=this.rules.inline._backpedal.exec(t[0])?.[0])&&void 0!==n?n:""}while(a!==t[0]);e=oo(t[0]),r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:oo(t[0]),{type:"text",raw:t[0],text:e}}}}const vo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,go=/(?:[*+-]|\d{1,9}[.)])/,yo=so(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,go).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),_o=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,bo=/(?!\s*\])(?:\\.|[^\[\]\\])+/,wo=so(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",bo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ko=so(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,go).getRegex(),xo="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",So=/|$))/,Co=so("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",So).replace("tag",xo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Eo=so(_o).replace("hr",vo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",xo).getRegex(),No={blockquote:so(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Eo).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:wo,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:vo,html:Co,lheading:yo,list:ko,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Eo,table:uo,text:/^[^\n]+/},Ao=so("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",vo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",xo).getRegex(),Mo={...No,table:Ao,paragraph:so(_o).replace("hr",vo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ao).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",xo).getRegex()},To={...No,html:so("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",So).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:uo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:so(_o).replace("hr",vo).replace("heading"," *#{1,6} *[^\n]").replace("lheading",yo).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},$o=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Lo=/^( {2,}|\\)\n(?!\s*$)/,Po="\\p{P}\\p{S}",Io=so(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Po).getRegex(),Oo=so(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Po).getRegex(),Ro=so("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Po).getRegex(),Do=so("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Po).getRegex(),zo=so(/\\([punct])/,"gu").replace(/punct/g,Po).getRegex(),Fo=so(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),jo=so(So).replace("(?:--\x3e|$)","--\x3e").getRegex(),Ho=so("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",jo).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Vo=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Uo=so(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Vo).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Bo=so(/^!?\[(label)\]\[(ref)\]/).replace("label",Vo).replace("ref",bo).getRegex(),qo=so(/^!?\[(ref)\](?:\[\])?/).replace("ref",bo).getRegex(),Yo={_backpedal:uo,anyPunctuation:zo,autolink:Fo,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:Lo,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:uo,emStrongLDelim:Oo,emStrongRDelimAst:Ro,emStrongRDelimUnd:Do,escape:$o,link:Uo,nolink:qo,punctuation:Io,reflink:Bo,reflinkSearch:so("reflink|nolink(?!\\()","g").replace("reflink",Bo).replace("nolink",qo).getRegex(),tag:Ho,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(/\t/g," ").replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(t=n.call({lexer:this},e,a))&&(e=e.substring(t.raw.length),a.push(t),!0)))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&a.length>0?a[a.length-1].raw+="\n":a.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),n=a[a.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?a.push(t):(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),n=a[a.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(n.raw+="\n"+t.raw,n.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),a.push(t);else{if(r=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let a;this.options.extensions.startBlock.forEach((e=>{a=e.call({lexer:this},n),"number"===typeof a&&a>=0&&(t=Math.min(t,a))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(r)))n=a[a.length-1],i&&"paragraph"===n?.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):a.push(t),i=r.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),n=a[a.length-1],n&&"text"===n.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):a.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,a}inline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){let t,n,r,a,i,o,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(s));)e.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.anyPunctuation.exec(s));)s=s.slice(0,a.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(i||(o=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(t=n.call({lexer:this},e,l))&&(e=e.substring(t.raw.length),l.push(t),!0)))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,s,o))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.autolink(e))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e))){if(r=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let a;this.options.extensions.startInline.forEach((e=>{a=e.call({lexer:this},n),"number"===typeof a&&a>=0&&(t=Math.min(t,a))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(t=this.tokenizer.inlineText(r))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(o=t.raw.slice(-1)),i=!0,n=l[l.length-1],n&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(t.raw.length),l.push(t);return l}}class Xo{options;parser;constructor(e){this.options=e||Ji}space(e){return""}code(e){let{text:t,lang:n,escaped:r}=e;const a=(n||"").match(/^\S*/)?.[0],i=t.replace(/\n$/,"")+"\n";return a?'
    '+(r?i:oo(i,!0))+"
    \n":"
    "+(r?i:oo(i,!0))+"
    \n"}blockquote(e){let{tokens:t}=e;return`
    \n${this.parser.parse(t)}
    \n`}html(e){let{text:t}=e;return t}heading(e){let{tokens:t,depth:n}=e;return`${this.parser.parseInline(t)}\n`}hr(e){return"
    \n"}list(e){const t=e.ordered,n=e.start;let r="";for(let i=0;i\n"+r+"\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox(e){let{checked:t}=e;return"'}paragraph(e){let{tokens:t}=e;return`

    ${this.parser.parseInline(t)}

    \n`}table(e){let t="",n="";for(let a=0;a${r}`),"\n\n"+t+"\n"+r+"
    \n"}tablerow(e){let{text:t}=e;return`\n${t}\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}em(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}codespan(e){let{text:t}=e;return`${t}`}br(e){return"
    "}del(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}link(e){let{href:t,title:n,tokens:r}=e;const a=this.parser.parseInline(r),i=co(t);if(null===i)return a;t=i;let o='
    ",o}image(e){let{href:t,title:n,text:r}=e;const a=co(t);if(null===a)return r;t=a;let i=`${r}1&&void 0!==arguments[1])||arguments[1],n="";for(let r=0;rnew Set(["preprocess","postprocess","processAllTokens"]))();preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Jo.lex:Jo.lexInline}provideParser(){return this.block?tl.parse:tl.parseInline}}const rl=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=(()=>tl)();Renderer=(()=>Xo)();TextRenderer=(()=>el)();Lexer=(()=>Jo)();Tokenizer=(()=>fo)();Hooks=(()=>nl)();constructor(){this.use(...arguments)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const a=e[r].flat(1/0);n=n.concat(this.walkTokens(a,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(){const e=this.defaults.extensions||{renderers:{},childTokens:{}};for(var t=arguments.length,n=new Array(t),r=0;r{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const n=e.renderers[t.name];e.renderers[t.name]=n?function(){for(var e=arguments.length,r=new Array(e),a=0;a{if(this.defaults.async)return Promise.resolve(a.call(e,t)).then((t=>i.call(e,t)));const n=a.call(e,t);return i.call(e,n)}:e[r]=function(){for(var t=arguments.length,n=new Array(t),r=0;r{const r={...n},a={...this.defaults,...r},i=this.onError(!!a.silent,!!a.async);if(!0===this.defaults.async&&!1===r.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("undefined"===typeof t||null===t)return i(new Error("marked(): input parameter is undefined or null"));if("string"!==typeof t)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);const o=a.hooks?a.hooks.provideLexer():e?Jo.lex:Jo.lexInline,l=a.hooks?a.hooks.provideParser():e?tl.parse:tl.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(t):t).then((e=>o(e,a))).then((e=>a.hooks?a.hooks.processAllTokens(e):e)).then((e=>a.walkTokens?Promise.all(this.walkTokens(e,a.walkTokens)).then((()=>e)):e)).then((e=>l(e,a))).then((e=>a.hooks?a.hooks.postprocess(e):e)).catch(i);try{a.hooks&&(t=a.hooks.preprocess(t));let e=o(t,a);a.hooks&&(e=a.hooks.processAllTokens(e)),a.walkTokens&&this.walkTokens(e,a.walkTokens);let n=l(e,a);return a.hooks&&(n=a.hooks.postprocess(n)),n}catch(zp){return i(zp)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+oo(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function al(e,t){return rl.parse(e,t)}al.options=al.setOptions=function(e){return rl.setOptions(e),al.defaults=rl.defaults,Xi(al.defaults),al},al.getDefaults=Gi,al.defaults=Ji,al.use=function(){return rl.use(...arguments),al.defaults=rl.defaults,Xi(al.defaults),al},al.walkTokens=function(e,t){return rl.walkTokens(e,t)},al.parseInline=rl.parseInline,al.Parser=tl,al.parser=tl.parse,al.Renderer=Xo,al.TextRenderer=el,al.Lexer=Jo,al.lexer=Jo.lex,al.Tokenizer=fo,al.Hooks=nl,al.parse=al;al.options,al.setOptions,al.use,al.walkTokens,al.parseInline,tl.parse,Jo.lex;const il=n.p+"static/media/MetricsQL.a00044c91d9781cf8557.md",ol=e=>{let t="";return Array.from(e).map((e=>{var n;const r="h3"===e.tagName.toLowerCase();return t=r?null!==(n=e.textContent)&&void 0!==n?n:"":t,r?null:((e,t)=>{var n;const r=null!==(n=t.textContent)&&void 0!==n?n:"",a=(e=>{const t=[];let n=e.nextElementSibling;for(;n&&"p"===n.tagName.toLowerCase();)n&&t.push(n),n=n.nextElementSibling;return t})(t).map((e=>{var t;return null!==(t=e.outerHTML)&&void 0!==t?t:""})).join("\n");return{type:e,value:r,description:(i=a,i.replace(/({const{metricsQLFunctions:e}=Cn(),t=En();return(0,r.useEffect)((()=>{e.length||(async()=>{try{const e=await fetch(il),n=(e=>{const t=document.createElement("div");t.innerHTML=al(e);const n=t.querySelectorAll("h3, h4");return ol(n)})(await e.text());t({type:"SET_METRICSQL_FUNCTIONS",payload:n})}catch(zp){console.error("Error fetching or processing the MetricsQL.md file:",zp)}})()}),[]),e},sl=e=>{let{value:t,anchorEl:n,caretPosition:a,hasHelperText:o,onSelect:l,onFoundOptions:s}=e;const[c,u]=(0,r.useState)({top:0,left:0}),d=ll(),h=(0,r.useMemo)((()=>{if(a[0]!==a[1])return{beforeCursor:t,afterCursor:""};return{beforeCursor:t.substring(0,a[0]),afterCursor:t.substring(a[1])}}),[t,a]),m=(0,r.useMemo)((()=>{const e=h.beforeCursor.split(/\s(or|and|unless|default|ifnot|if|group_left|group_right)\s|}|\+|\|-|\*|\/|\^/i);return e[e.length-1]}),[h]),p=(0,r.useMemo)((()=>{const e=[...m.matchAll(/\w+\((?[^)]+)\)\s+(by|without|on|ignoring)\s*\(\w*/gi)];if(e.length>0&&e[0].groups&&e[0].groups.metricName)return e[0].groups.metricName;const t=[...m.matchAll(/^\s*\b(?[^{}(),\s]+)(?={|$)/g)];return t.length>0&&t[0].groups&&t[0].groups.metricName?t[0].groups.metricName:""}),[m]),f=(0,r.useMemo)((()=>{const e=m.match(/[a-z_:-][\w\-.:/]*\b(?=\s*(=|!=|=~|!~))/g);return e?e[e.length-1]:""}),[m]),v=(0,r.useMemo)((()=>{const e=h.beforeCursor.trim(),t=["}",")"].some((t=>e.endsWith(t))),n=!Ki(e)&&["`","'",'"'].some((t=>e.endsWith(t)));if(!h.beforeCursor||t||n||(e=>{const t=e.split(/\s+/),n=t.length,r=t[n-1],a=t[n-2],i=!r&&Ki(e),o=(!r||t.length>1)&&!/([{(),+\-*/^]|\b(?:or|and|unless|default|ifnot|if|group_left|group_right|by|without|on|ignoring)\b)/i.test(a);return i||o})(h.beforeCursor))return vt.empty;const r=/(?:by|without|on|ignoring)\s*\(\s*[^)]*$|\{[^}]*$/i,a=`(${Yi(p)})?{?.+${Yi(f)}(=|!=|=~|!~)"?([^"]*)$`;switch(!0){case new RegExp(a,"g").test(h.beforeCursor):return vt.labelValue;case r.test(h.beforeCursor):return vt.label;default:return vt.metricsql}}),[h,p,f]),g=(0,r.useMemo)((()=>{const e=h.beforeCursor.match(/([\w_.:]+(?![},]))$/);return e?e[0]:""}),[h.beforeCursor]),{metrics:y,labels:_,labelValues:b,loading:w}=(e=>{let{valueByContext:t,metric:n,label:a,context:o}=e;const{serverUrl:l}=Mt(),{period:{start:s,end:c}}=fn(),{autocompleteCache:u}=Cn(),d=En(),[h,m]=(0,r.useState)(!1),[p,f]=(0,r.useState)(t),v=qi()(f,500);(0,r.useEffect)((()=>(v(t),v.cancel)),[t,v]);const[g,y]=(0,r.useState)([]),[_,b]=(0,r.useState)([]),[w,k]=(0,r.useState)([]),x=(0,r.useRef)(new AbortController),S=(0,r.useCallback)((e=>{const t=i()(1e3*s).startOf("day").valueOf()/1e3,n=i()(1e3*c).endOf("day").valueOf()/1e3;return new URLSearchParams({...e||{},limit:`${_n}`,start:`${t}`,end:`${n}`})}),[s,c]),C=(e,t)=>e.map((e=>({value:e,type:`${t}`,icon:Zi[t]}))),E=async e=>{let{value:t,urlSuffix:n,setter:r,type:a,params:i}=e;if(!t&&a===Qi.metric)return;x.current.abort(),x.current=new AbortController;const{signal:o}=x.current,s={type:a,value:t,start:(null===i||void 0===i?void 0:i.get("start"))||"",end:(null===i||void 0===i?void 0:i.get("end"))||"",match:(null===i||void 0===i?void 0:i.get("match[]"))||""};m(!0);try{const e=u.get(s);if(e)return r(C(e,a)),void m(!1);const t=await fetch(`${l}/api/v1/${n}?${i}`,{signal:o});if(t.ok){const{data:e}=await t.json();r(C(e,a)),d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:e}})}m(!1)}catch(zp){zp instanceof Error&&"AbortError"!==zp.name&&(d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:[]}}),m(!1),console.error(zp))}};return(0,r.useEffect)((()=>{const e=o!==vt.metricsql&&o!==vt.empty;if(!l||!n||e)return;y([]);const t=Wi(Yi(n));return E({value:p,urlSuffix:"label/__name__/values",setter:y,type:Qi.metric,params:S({"match[]":`{__name__=~".*${t}.*"}`})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,p,o,n]),(0,r.useEffect)((()=>{if(!l||o!==vt.label)return;b([]);const e=Wi(n);return E({value:p,urlSuffix:"labels",setter:b,type:Qi.label,params:S(n?{"match[]":`{__name__="${e}"}`}:void 0)}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,p,o,n]),(0,r.useEffect)((()=>{if(!l||!a||o!==vt.labelValue)return;k([]);const e=Wi(n),t=Wi(Yi(p)),r=[n?`__name__="${e}"`:"",`${a}=~".*${t}.*"`].filter(Boolean).join(",");return E({value:p,urlSuffix:`label/${a}/values`,setter:k,type:Qi.labelValue,params:S({"match[]":`{${r}}`})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,p,o,n,a]),{metrics:g,labels:_,labelValues:w,loading:h}})({valueByContext:g,metric:p,label:f,context:v}),k=(0,r.useMemo)((()=>{switch(v){case vt.metricsql:return[...y,...d];case vt.label:return _;case vt.labelValue:return b;default:return[]}}),[v,y,_,b]),x=(0,r.useCallback)((e=>{const t=h.beforeCursor;let n=h.afterCursor;const r=t.lastIndexOf(g,a[0]),i=r+g.length,o=t.substring(0,r),s=t.substring(i);if(v===vt.labelValue){const t='"';n=n.replace(/^[^\s"|},]*/,"");e=`${/(?:=|!=|=~|!~)$/.test(o)?t:""}${e}${'"'!==n.trim()[0]?t:""}`}v===vt.label&&(n=n.replace(/^[^\s=!,{}()"|+\-/*^]*/,"")),v===vt.metricsql&&(n=n.replace(/^[^\s[\]{}()"|+\-/*^]*/,""));l(`${o}${e}${s}${n}`,o.length+e.length)}),[h]);return(0,r.useEffect)((()=>{if(!n.current)return void u({top:0,left:0});const e=n.current.querySelector("textarea")||n.current,t=window.getComputedStyle(e),r=`${t.getPropertyValue("font-size")}`,a=`${t.getPropertyValue("font-family")}`,i=parseInt(`${t.getPropertyValue("line-height")}`),l=document.createElement("div");l.style.font=`${r} ${a}`,l.style.padding=t.getPropertyValue("padding"),l.style.lineHeight=`${i}px`,l.style.width=`${e.offsetWidth}px`,l.style.maxWidth=`${e.offsetWidth}px`,l.style.whiteSpace=t.getPropertyValue("white-space"),l.style.overflowWrap=t.getPropertyValue("overflow-wrap");const s=document.createElement("span");l.appendChild(document.createTextNode(h.beforeCursor)),l.appendChild(s),l.appendChild(document.createTextNode(h.afterCursor)),document.body.appendChild(l);const c=l.getBoundingClientRect(),d=s.getBoundingClientRect(),m=d.left-c.left,p=d.bottom-c.bottom-(o?i:0);u({top:p,left:m}),l.remove(),s.remove()}),[n,a,o]),Nt(Ct.FK,{children:Nt(Ui,{loading:w,disabledFullScreen:!0,value:g,options:k,anchor:n,minLength:0,offset:c,onSelect:x,onFoundOptions:s,maxDisplayResults:{limit:yn,message:"Please, specify the query more precisely."}})})},cl="No match! \nThis query hasn't selected any time series from database.\nEither the requested metrics are missing in the database,\nor there is a typo in series selector.",ul="The shown results are marked as PARTIAL.\nThe result is marked as partial if one or more vmstorage nodes failed to respond to the query.",dl=e=>{let{value:t,onChange:n,onEnter:a,onArrowUp:i,onArrowDown:o,autocomplete:l,error:s,stats:c,label:u,disabled:d=!1}=e;const{autocompleteQuick:h}=Cn(),{isMobile:m}=ta(),[p,f]=(0,r.useState)(!1),[v,g]=(0,r.useState)([0,0]),y=(0,r.useRef)(null),[_,b]=(0,r.useState)(l),w=(0,r.useRef)(qi()(b,500)).current,k=[{show:"0"===(null===c||void 0===c?void 0:c.seriesFetched)&&!c.resultLength,text:cl},{show:null===c||void 0===c?void 0:c.isPartial,text:ul}].filter((e=>e.show)).map((e=>e.text)).join("");c&&(u=`${u} (${c.executionTimeMsec||0}ms)`);return(0,r.useEffect)((()=>{f(l)}),[h]),(0,r.useEffect)((()=>{b(!1),w(!0)}),[v]),Nt("div",{className:"vm-query-editor",ref:y,children:[Nt(Ka,{value:t,label:u,type:"textarea",autofocus:!m,error:s,warning:k,onKeyDown:e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:l}=e,s=(e.target.value||"").split("\n").length>1,c=n||r,u="ArrowDown"===t,d="Enter"===t;"ArrowUp"===t&&c&&(e.preventDefault(),i()),u&&c&&(e.preventDefault(),o()),d&&p&&e.preventDefault(),!d||l||s&&!c||p||(e.preventDefault(),a())},onChange:n,onChangeCaret:e=>{g((t=>t[0]===e[0]&&t[1]===e[1]?t:e))},disabled:d,inputmode:"search",caretPosition:v}),_&&l&&Nt(sl,{value:t,anchorEl:y,caretPosition:v,hasHelperText:Boolean(k||s),onSelect:(e,t)=>{n(e),g([t,t])},onFoundOptions:e=>{f(!!e.length)}})]})},hl=e=>{let{isMobile:t,hideButtons:n}=e;const{autocomplete:r}=Cn(),a=En(),{nocache:i,isTracingEnabled:o}=Fr(),l=jr();return Mr("keydown",(e=>{const{code:t,ctrlKey:n,altKey:r}=e;"Space"===t&&(n||r)&&(e.preventDefault(),a({type:"SET_AUTOCOMPLETE_QUICK",payload:!0}))})),Nt("div",{className:Er()({"vm-additional-settings":!0,"vm-additional-settings_mobile":t}),children:[!(null!==n&&void 0!==n&&n.autocomplete)&&Nt(ba,{title:Nt(Ct.FK,{children:["Quick tip: ",Na]}),children:Nt(Ti,{label:"Autocomplete",value:r,onChange:()=>{a({type:"TOGGLE_AUTOCOMPLETE"})},fullWidth:t})}),Nt(Ti,{label:"Disable cache",value:i,onChange:()=>{l({type:"TOGGLE_NO_CACHE"})},fullWidth:t}),!(null!==n&&void 0!==n&&n.traceQuery)&&Nt(Ti,{label:"Trace query",value:o,onChange:()=>{l({type:"TOGGLE_QUERY_TRACING"})},fullWidth:t})]})},ml=e=>{const{isMobile:t}=ta(),n=(0,r.useRef)(null),{value:a,toggle:i,setFalse:o}=ma(!1);return t?Nt(Ct.FK,{children:[Nt("div",{ref:n,children:Nt(da,{variant:"outlined",startIcon:Nt(dr,{}),onClick:i,ariaLabel:"additional the query settings"})}),Nt(ha,{open:a,buttonRef:n,placement:"bottom-left",onClose:o,title:"Query settings",children:Nt(hl,{isMobile:t,...e})})]}):Nt(hl,{...e})},pl=(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n]));const fl=()=>{const{showInfoMessage:e}=(0,r.useContext)(aa);return async(t,n)=>{var r;if(null===(r=navigator)||void 0===r||!r.clipboard)return e({text:"Clipboard not supported",type:"error"}),console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(t),n&&e({text:n,type:"success"}),!0}catch(a){return a instanceof Error&&e({text:`${a.name}: ${a.message}`,type:"error"}),console.warn("Copy failed",a),!1}}},vl=e=>{let{query:t,favorites:n,onRun:a,onToggleFavorite:i}=e;const o=fl(),l=(0,r.useMemo)((()=>n.includes(t)),[t,n]);return Nt("div",{className:"vm-query-history-item",children:[Nt("span",{className:"vm-query-history-item__value",children:t}),Nt("div",{className:"vm-query-history-item__buttons",children:[Nt(ba,{title:"Execute query",children:Nt(da,{size:"small",variant:"text",onClick:()=>{a(t)},startIcon:Nt(Yn,{})})}),Nt(ba,{title:"Copy query",children:Nt(da,{size:"small",variant:"text",onClick:async()=>{await o(t,"Query has been copied")},startIcon:Nt(rr,{})})}),Nt(ba,{title:l?"Remove Favorite":"Add to Favorites",children:Nt(da,{size:"small",variant:"text",color:l?"warning":"primary",onClick:()=>{i(t,l)},startIcon:Nt(l?fr:pr,{})})})]})]})},gl="saved",yl="favorite",_l=[{label:"Session history",value:"session"},{label:"Saved history",value:gl},{label:"Favorite queries",value:yl}],bl=e=>{let{handleSelectQuery:t}=e;const{queryHistory:n}=Cn(),{isMobile:a}=ta(),{value:i,setTrue:o,setFalse:l}=ma(!1),[s,c]=(0,r.useState)(_l[0].value),[u,d]=(0,r.useState)(gn("QUERY_HISTORY")),[h,m]=(0,r.useState)(gn("QUERY_FAVORITES")),p=(0,r.useMemo)((()=>n.map((e=>e.values.filter((e=>e)).reverse()))),[n]),f=(0,r.useMemo)((()=>{switch(s){case yl:return h;case gl:return u;default:return p}}),[s,h,u,p]),v=null===f||void 0===f?void 0:f.every((e=>!e.length)),g=(0,r.useMemo)((()=>s===yl?"Favorites queries are empty.\nTo see your favorites, mark a query as a favorite.":"Query history is empty.\nTo see the history, please make a query."),[s]),y=e=>n=>{t(n,e),l()},_=(e,t)=>{m((n=>{const r=n[0]||[];return t?[r.filter((t=>t!==e))]:t||r.includes(e)?n:[[...r,e]]}))};return(0,r.useEffect)((()=>{const e=h[0]||[],t=gn("QUERY_FAVORITES")[0]||[];pl(e,t)||Xe("QUERY_FAVORITES",JSON.stringify(h))}),[h]),Mr("storage",(()=>{d(gn("QUERY_HISTORY")),m(gn("QUERY_FAVORITES"))})),Nt(Ct.FK,{children:[Nt(ba,{title:"Show history",children:Nt(da,{color:"primary",variant:"text",onClick:o,startIcon:Nt(Hn,{}),ariaLabel:"Show history"})}),i&&Nt(_a,{title:"Query history",onClose:l,children:Nt("div",{className:Er()({"vm-query-history":!0,"vm-query-history_mobile":a}),children:[Nt("div",{className:Er()({"vm-query-history__tabs":!0,"vm-section-header__tabs":!0,"vm-query-history__tabs_mobile":a}),children:Nt($r,{activeItem:s,items:_l,onChange:c})}),Nt("div",{className:"vm-query-history-list",children:[v&&Nt("div",{className:"vm-query-history-list__no-data",children:g}),f.map(((e,t)=>Nt("div",{children:[f.length>1&&Nt("div",{className:Er()({"vm-query-history-list__group-title":!0,"vm-query-history-list__group-title_first":0===t}),children:["Query ",t+1]}),e.map(((e,n)=>Nt(vl,{query:e,favorites:h.flat(),onRun:y(t),onToggleFavorite:_},n)))]},t))),s===gl&&!v&&Nt("div",{className:"vm-query-history-footer",children:Nt(da,{color:"error",variant:"outlined",size:"small",startIcon:Nt(Zn,{}),onClick:()=>{Xe("QUERY_HISTORY","")},children:"clear history"})})]})]})})]})},wl=e=>{let{containerStyles:t,message:n}=e;const{isDarkTheme:r}=Mt();return Nt("div",{className:Er()({"vm-spinner":!0,"vm-spinner_dark":r}),style:t,children:[Nt("div",{className:"half-circle-spinner",children:[Nt("div",{className:"circle circle-1"}),Nt("div",{className:"circle circle-2"})]}),n&&Nt("div",{className:"vm-spinner__message",children:n})]})},kl=()=>{const{serverUrl:e}=Mt(),{isMobile:t}=ta(),{value:n,setTrue:a,setFalse:i}=ma(!1),{query:o}=Cn(),{period:l}=fn(),[s,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(""),[h,m]=(0,r.useState)(""),[p,f]=(0,r.useState)("");return Nt(Ct.FK,{children:[Nt(da,{color:"secondary",variant:"outlined",onClick:()=>(a(),f(""),URL.revokeObjectURL(h),d(""),m(""),(async()=>{c(!0);try{const t=encodeURIComponent(o[0]||""),n=encodeURIComponent(l.step||Zt(l.end-l.start,!1)),r=`${e}/api/vmanomaly/config.yaml?query=${t}&step=${n}`,a=await fetch(r),i=a.headers.get("Content-Type");if(a.ok)if("application/yaml"==i){const e=await a.blob(),t=await e.text();d(t),m(URL.createObjectURL(e))}else f("Response Content-Type is not YAML, does `Server URL` point to VMAnomaly server?");else{const e=await a.text();f(` ${a.status} ${a.statusText}: ${e}`)}}catch(p){console.error(p),f(String(p))}c(!1)})()),children:"Open Config"}),n&&Nt(_a,{title:"Download config",onClose:i,children:Nt("div",{className:Er()({"vm-anomaly-config":!0,"vm-anomaly-config_mobile":t}),children:[s&&Nt(wl,{containerStyles:{position:"relative"},message:"Loading config..."}),!s&&p&&Nt("div",{className:"vm-anomaly-config-error",children:[Nt("div",{className:"vm-anomaly-config-error__icon",children:Nt(Rn,{})}),Nt("h3",{className:"vm-anomaly-config-error__title",children:"Cannot download config"}),Nt("p",{className:"vm-anomaly-config-error__text",children:p})]}),!s&&u&&Nt(Ka,{value:u,label:"config.yaml",type:"textarea",disabled:!0}),Nt("div",{className:"vm-anomaly-config-footer",children:h&&Nt("a",{href:h,download:"config.yaml",children:Nt(da,{variant:"contained",startIcon:Nt(br,{}),children:"download"})})})]})})]})},xl=e=>{let{queryErrors:t,setQueryErrors:n,setHideError:a,stats:i,isLoading:o,onHideQuery:l,onRunQuery:s,abortFetch:c,hideButtons:u}=e;const{isMobile:d}=ta(),{query:h,queryHistory:m,autocomplete:p,autocompleteQuick:f}=Cn(),v=En(),g=vn(),[y,_]=(0,r.useState)(h||[]),[b,w]=(0,r.useState)([]),[k,x]=(0,r.useState)(!1),S=Za(y),C=(()=>{const{serverUrl:e}=Mt();return async t=>{try{const n=encodeURIComponent(t),r=`${e}/prettify-query?query=${n}`,a=await fetch(r);if(200!=a.status)return{query:t,error:"Error requesting /prettify-query, status: "+a.status};const i=await a.json();return"success"!=i.status?{query:t,error:String(i.msg)}:{query:String(i.query),error:""}}catch(zp){return console.error(zp),zp instanceof Error&&"AbortError"!==zp.name?{query:t,error:`${zp.name}: ${zp.message}`}:{query:t,error:String(zp)}}}})(),E=()=>{o?c&&c():(v({type:"SET_QUERY_HISTORY",payload:y.map(((e,t)=>{const n=m[t]||{values:[]},r=e===n.values[n.values.length-1],a=!r&&e?[...n.values,e]:n.values;return a.length>25&&a.shift(),{index:n.values.length-Number(r),values:a}}))}),v({type:"SET_QUERY",payload:y}),g({type:"RUN_QUERY"}),s())},N=(e,t)=>{_((n=>n.map(((n,r)=>r===t?e:n))))},A=(e,t)=>()=>{((e,t)=>{const{index:n,values:r}=m[t],a=n+e;a<0||a>=r.length||(N(r[a]||"",t),v({type:"SET_QUERY_HISTORY_BY_INDEX",payload:{value:{values:r,index:a},queryNumber:t}}))})(e,t)},M=e=>t=>{N(t,e),v({type:"SET_AUTOCOMPLETE_QUICK",payload:!1})},T=e=>()=>{var t;t=e,_((e=>e.filter(((e,n)=>n!==t)))),w((t=>t.includes(e)?t.filter((t=>t!==e)):t.map((t=>t>e?t-1:t))))},$=e=>t=>{((e,t)=>{const{ctrlKey:n,metaKey:r}=e;if(n||r){const e=y.map(((e,t)=>t)).filter((e=>e!==t));w((t=>pl(e,t)?[]:e))}else w((e=>e.includes(t)?e.filter((e=>e!==t)):[...e,t]))})(t,e)};return(0,r.useEffect)((()=>{S&&y.length{l&&l(b)}),[b]),(0,r.useEffect)((()=>{k&&(E(),x(!1))}),[y,k]),(0,r.useEffect)((()=>{_(h||[])}),[h]),Nt("div",{className:Er()({"vm-query-configurator":!0,"vm-block":!0,"vm-block_mobile":d}),children:[Nt("div",{className:"vm-query-configurator-list",children:y.map(((e,r)=>Nt("div",{className:Er()({"vm-query-configurator-list-row":!0,"vm-query-configurator-list-row_disabled":b.includes(r),"vm-query-configurator-list-row_mobile":d}),children:[Nt(dl,{value:y[r],autocomplete:!(null!==u&&void 0!==u&&u.autocomplete)&&(p||f),error:t[r],stats:i[r],onArrowUp:A(-1,r),onArrowDown:A(1,r),onEnter:E,onChange:M(r),label:`Query ${y.length>1?r+1:""}`,disabled:b.includes(r)}),l&&Nt(ba,{title:b.includes(r)?"Enable query":"Disable query",children:Nt("div",{className:"vm-query-configurator-list-row__button",children:Nt(da,{variant:"text",color:"gray",startIcon:b.includes(r)?Nt(tr,{}):Nt(er,{}),onClick:$(r),ariaLabel:"visibility query"})})}),!(null!==u&&void 0!==u&&u.prettify)&&Nt(ba,{title:"Prettify query",children:Nt("div",{className:"vm-query-configurator-list-row__button",children:Nt(da,{variant:"text",color:"gray",startIcon:Nt(nr,{}),onClick:async()=>await(async e=>{const t=await C(y[e]);a(!1),N(t.query,e),n((n=>(n[e]=t.error,[...n])))})(r),className:"prettify",ariaLabel:"prettify the query"})})}),y.length>1&&Nt(ba,{title:"Remove Query",children:Nt("div",{className:"vm-query-configurator-list-row__button",children:Nt(da,{variant:"text",color:"error",startIcon:Nt(Zn,{}),onClick:T(r),ariaLabel:"remove query"})})})]},r)))}),Nt("div",{className:"vm-query-configurator-settings",children:[Nt(ml,{hideButtons:u}),Nt("div",{className:"vm-query-configurator-settings__buttons",children:[Nt(bl,{handleSelectQuery:(e,t)=>{N(e,t),x(!0)}}),(null===u||void 0===u?void 0:u.anomalyConfig)&&Nt(kl,{}),!(null!==u&&void 0!==u&&u.addQuery)&&y.length<10&&Nt(da,{variant:"outlined",onClick:()=>{_((e=>[...e,""]))},startIcon:Nt(Gn,{}),children:"Add Query"}),Nt(da,{variant:"contained",onClick:E,startIcon:Nt(o?Sr:qn,{}),children:`${o?"Cancel":"Execute"} ${d?"":"Query"}`})]})]})]})};let Sl=0;class Cl{constructor(e,t){this.tracing=void 0,this.query=void 0,this.tracingChildren=void 0,this.originalTracing=void 0,this.id=void 0,this.tracing=e,this.originalTracing=JSON.parse(JSON.stringify(e)),this.query=t,this.id=Sl++;const n=e.children||[];this.tracingChildren=n.map((e=>new Cl(e,t)))}get queryValue(){return this.query}get idValue(){return this.id}get children(){return this.tracingChildren}get message(){return this.tracing.message}get duration(){return this.tracing.duration_msec}get JSON(){return JSON.stringify(this.tracing,null,2)}get originalJSON(){return JSON.stringify(this.originalTracing,null,2)}setTracing(e){this.tracing=e;const t=e.children||[];this.tracingChildren=t.map((e=>new Cl(e,this.query)))}setQuery(e){this.query=e}resetTracing(){this.tracing=this.originalTracing}}const El=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const{__name__:r,...a}=e.metric,i=t||`${n?`[Query ${e.group}] `:""}${r||""}`;return 0==Object.keys(a).length?i||"value":`${i}{${Object.entries(a).map((e=>`${e[0]}=${JSON.stringify(e[1])}`)).join(", ")}}`},Nl=e=>{switch(e){case"NaN":return NaN;case"Inf":case"+Inf":return 1/0;case"-Inf":return-1/0;default:return parseFloat(e)}},Al=e=>{if(e.length<2)return!1;const t=["le","vmrange"],n=Object.keys(e[0].metric).filter((e=>!t.includes(e))),r=e.every((r=>{const a=Object.keys(r.metric).filter((e=>!t.includes(e)));return n.length===a.length&&a.every((t=>r.metric[t]===e[0].metric[t]))}));return r&&e.every((e=>t.some((t=>t in e.metric))))},Ml=He.anomaly==={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1}.REACT_APP_TYPE,Tl=e=>{let{predefinedQuery:t,visible:n,display:a,customStep:i,hideQuery:o,showAllSeries:l}=e;const{query:s}=Cn(),{period:c}=fn(),{displayType:u,nocache:d,isTracingEnabled:h,seriesLimits:m}=Fr(),{serverUrl:p}=Mt(),{isHistogram:f}=Br(),[v,g]=(0,r.useState)(!1),[y,_]=(0,r.useState)(),[b,w]=(0,r.useState)(),[k,x]=(0,r.useState)(),[S,C]=(0,r.useState)(),[E,N]=(0,r.useState)([]),[A,M]=(0,r.useState)([]),[T,$]=(0,r.useState)(),[L,P]=(0,r.useState)([]),[I,O]=(0,r.useState)(!1),R=(0,r.useMemo)((()=>{const{end:e,start:t}=c;return Zt(e-t,f)}),[c,f]),D=(0,r.useCallback)(qi()((async e=>{let{fetchUrl:t,fetchQueue:n,displayType:r,query:a,stateSeriesLimits:i,showAllSeries:o,hideQuery:l}=e;const s=new AbortController;P([...n,s]);try{const e=r===mt.chart,n=o?1/0:+i[r]||1/0;let c=n;const u=[],d=[];let h=1,m=0,p=!1;for await(const r of t){if(null===l||void 0===l?void 0:l.includes(h-1)){N((e=>[...e,""])),M((e=>[...e,{}])),h++;continue}const t=new URL(r),i=await fetch(`${t.origin}${t.pathname}`,{signal:s.signal,method:"POST",body:t.searchParams}),o=await i.json();if(i.ok){if(M((e=>[...e,{...null===o||void 0===o?void 0:o.stats,isPartial:null===o||void 0===o?void 0:o.isPartial,resultLength:o.data.result.length}])),N((e=>[...e,""])),o.trace){const e=new Cl(o.trace,a[h-1]);d.push(e)}p=!Ml&&e&&Al(o.data.result),c=p?1/0:n;const t=c-u.length;o.data.result.slice(0,t).forEach((e=>{e.group=h,u.push(e)})),m+=o.data.result.length}else{u.push({metric:{},values:[],group:h});const e=o.errorType||pt.unknownType,t=[e,(null===o||void 0===o?void 0:o.error)||(null===o||void 0===o?void 0:o.message)||"see console for more details"].join(",\r\n");N((e=>[...e,`${t}`])),console.error(`Fetch query error: ${e}`,o)}h++}const f=`Showing ${u.length} series out of ${m} series due to performance reasons. Please narrow down the query, so it returns less series`;$(m>c?f:""),e?_(u):w(u),x(d),O((e=>m?p:e))}catch(zp){const t=zp;if("AbortError"===t.name)return void g(!1);const n="Please check your serverURL settings and confirm server availability.";let r=`Error executing query: ${t.message}. ${n}`;"Unexpected end of JSON input"===t.message&&(r+="\nAdditionally, this error can occur if the server response is too large to process. Apply more specific filters to reduce the data volume."),C(r)}g(!1)}),300),[]),z=(0,r.useMemo)((()=>{C(""),N([]),M([]);const e=null!==t&&void 0!==t?t:s,n=(a||u)===mt.chart;if(c)if(p)if(e.every((e=>!e.trim())))N(e.map((()=>pt.validQuery)));else{if(bt(p)){const t={...c};return t.step=i,e.map((e=>n?((e,t,n,r,a)=>`${e}/api/v1/query_range?query=${encodeURIComponent(t)}&start=${n.start}&end=${n.end}&step=${n.step}${r?"&nocache=1":""}${a?"&trace=1":""}`)(p,e,t,d,h):((e,t,n,r,a)=>`${e}/api/v1/query?query=${encodeURIComponent(t)}&time=${n.end}&step=${n.step}${r?"&nocache=1":""}${a?"&trace=1":""}`)(p,e,t,d,h)))}C(pt.validServer)}else C(pt.emptyServer)}),[p,c,u,i,o]),F=(0,r.useCallback)((()=>{L.map((e=>e.abort())),P([]),_([]),w([])}),[L]),[j,H]=(0,r.useState)([]);return(0,r.useEffect)((()=>{const e=z===j&&!!t;if(!n||null===z||void 0===z||!z.length||e)return;g(!0);D({fetchUrl:z,fetchQueue:L,displayType:a||u,query:null!==t&&void 0!==t?t:s,stateSeriesLimits:m,showAllSeries:l,hideQuery:o}),H(z)}),[z,n,m,l]),(0,r.useEffect)((()=>{const e=L.slice(0,-1);e.length&&(e.map((e=>e.abort())),P(L.filter((e=>!e.signal.aborted))))}),[L]),(0,r.useEffect)((()=>{R===i&&_([])}),[I]),{fetchUrl:z,isLoading:v,graphData:y,liveData:b,error:S,queryErrors:E,setQueryErrors:N,queryStats:A,warning:T,traces:k,isHistogram:I,abortFetch:F}},$l=()=>Nt("div",{className:"vm-line-loader",children:[Nt("div",{className:"vm-line-loader__background"}),Nt("div",{className:"vm-line-loader__line"})]}),Ll=()=>{const{tenantId:e}=Mt(),{displayType:t}=Fr(),{query:n}=Cn(),{duration:a,relativeTime:i,period:{date:o,step:l}}=fn(),{customStep:s}=Br(),[c,u]=je(),d=Tt(),h=vn(),m=qr(),p=En(),f=jr(),[v,g]=(0,r.useState)(!1),y=(0,r.useCallback)((()=>{if(v)return void g(!1);const r=new URLSearchParams(c);n.forEach(((n,u)=>{var d;const h=`g${u}`;c.get(`${h}.expr`)!==n&&n&&r.set(`${h}.expr`,n),c.get(`${h}.range_input`)!==a&&r.set(`${h}.range_input`,a),c.get(`${h}.end_input`)!==o&&r.set(`${h}.end_input`,o),c.get(`${h}.relative_time`)!==i&&r.set(`${h}.relative_time`,i||"none");const m=c.get(`${h}.step_input`)||l;m&&m!==s&&r.set(`${h}.step_input`,s);const p=`${(null===(d=Lr.find((e=>e.value===t)))||void 0===d?void 0:d.prometheusCode)||0}`;c.get(`${h}.tab`)!==p&&r.set(`${h}.tab`,`${p}`),c.get(`${h}.tenantID`)!==e&&e&&r.set(`${h}.tenantID`,e)})),!((e,t)=>{if(Array.from(e.entries()).length!==Array.from(t.entries()).length)return!1;for(const[n,r]of e)if(t.get(n)!==r)return!1;return!0})(r,c)&&r.size&&u(r)}),[e,t,n,a,i,o,l,s]);(0,r.useEffect)((()=>{const e=setTimeout(y,200);return()=>clearTimeout(e)}),[y]),(0,r.useEffect)((()=>{if(!v)return;const r=dn(),u=r.duration!==a,g=r.relativeTime!==i,y="none"===r.relativeTime&&r.period.date!==o;(u||g||y)&&h({type:"SET_TIME_STATE",payload:r});const _=Ir();_!==t&&f({type:"SET_DISPLAY_TYPE",payload:_});const b=c.get("g0.tenantID")||"";b!==e&&d({type:"SET_TENANT_ID",payload:b});const w=dt();pl(w,n)||(p({type:"SET_QUERY",payload:w}),h({type:"RUN_QUERY"}));const k=setTimeout((()=>{const e=c.get("g0.step_input")||l;e&&e!==s&&m({type:"SET_CUSTOM_STEP",payload:e})}),50);return()=>clearTimeout(k)}),[c,v]),Mr("popstate",(()=>{g(!0)}))},Pl=e=>{let{text:t,href:n,children:r,colored:a=!0,underlined:i=!1,withIcon:o=!1}=e;return Nt("a",{href:n,className:Er()({"vm-link":!0,"vm-link_colored":a,"vm-link_underlined":i,"vm-link_with-icon":o}),target:"_blank",rel:"noreferrer",children:t||r})},Il=Nt(Pl,{text:"last_over_time",href:"https://docs.victoriametrics.com/MetricsQL.html#last_over_time",underlined:!0}),Ol=Nt(Pl,{text:"instant query",href:"https://docs.victoriametrics.com/keyConcepts.html#instant-query",underlined:!0}),Rl=()=>Nt("div",{children:[Nt("p",{children:["This tab shows ",Ol," results for the last 5 minutes ending at the selected time range."]}),Nt("p",{children:["Please wrap the query into ",Il," if you need results over arbitrary lookbehind interval."]})]}),Dl=e=>{let{value:t}=e;return Nt("div",{className:"vm-line-progress",children:[Nt("div",{className:"vm-line-progress-track",children:Nt("div",{className:"vm-line-progress-track__thumb",style:{width:`${t}%`}})}),Nt("span",{children:[t.toFixed(2),"%"]})]})},zl=e=>{let{isRoot:t,trace:n,totalMsec:a,isExpandedAll:i}=e;const{isDarkTheme:o}=Mt(),{isMobile:l}=ta(),[s,c]=(0,r.useState)({}),u=(0,r.useRef)(null),[d,h]=(0,r.useState)(!1),[m,p]=(0,r.useState)(!1),f=Yt(n.duration/1e3)||`${n.duration}ms`;(0,r.useEffect)((()=>{if(!u.current)return;const e=u.current,t=u.current.children[0],{height:n}=t.getBoundingClientRect();h(n>e.clientHeight)}),[n]);const v=n.children&&!!n.children.length,g=n.duration/a*100,y=e=>{var t;const n=[e.idValue];return null===e||void 0===e||null===(t=e.children)||void 0===t||t.forEach((e=>{n.push(...y(e))})),n};return(0,r.useEffect)((()=>{if(!i)return void c([]);const e=y(n),t={};e.forEach((e=>{t[e]=!0})),c(t)}),[i]),Nt("div",{className:Er()({"vm-nested-nav":!0,"vm-nested-nav_root":t,"vm-nested-nav_dark":o,"vm-nested-nav_mobile":l}),children:[Nt("div",{className:Er()({"vm-nested-nav-header":!0,"vm-nested-nav-header_open":s[n.idValue]}),onClick:(_=n.idValue,()=>{v&&c((e=>({...e,[_]:!e[_]})))}),children:[v&&Nt("div",{className:Er()({"vm-nested-nav-header__icon":!0,"vm-nested-nav-header__icon_open":s[n.idValue]}),children:Nt(Fn,{})}),Nt("div",{className:"vm-nested-nav-header__progress",children:Nt(Dl,{value:g})}),Nt("div",{className:Er()({"vm-nested-nav-header__message":!0,"vm-nested-nav-header__message_show-full":m}),ref:u,children:[Nt("span",{className:"vm-nested-nav-header__message_duration",children:f}),":\xa0",Nt("span",{children:n.message})]}),Nt("div",{className:"vm-nested-nav-header-bottom",children:(d||m)&&Nt(da,{variant:"text",size:"small",onClick:e=>{e.stopPropagation(),p((e=>!e))},children:m?"Hide":"Show full query"})})]}),s[n.idValue]&&Nt("div",{className:"vm-nested-nav__childrens",children:v&&n.children.map((e=>Nt(zl,{trace:e,totalMsec:a,isExpandedAll:i},e.duration)))})]});var _},Fl=zl,jl=e=>{let{editable:t=!1,defaultTile:n="JSON",displayTitle:a=!0,defaultJson:i="",resetValue:o="",onClose:l,onUpload:s}=e;const c=fl(),{isMobile:u}=ta(),[d,h]=(0,r.useState)(i),[m,p]=(0,r.useState)(n),[f,v]=(0,r.useState)(""),[g,y]=(0,r.useState)(""),_=(0,r.useMemo)((()=>{try{const e=JSON.parse(d),t=e.trace||e;return t.duration_msec?(new Cl(t,""),""):pt.traceNotFound}catch(zp){return zp instanceof Error?zp.message:"Unknown error"}}),[d]),b=()=>{y(_);m.trim()||v(pt.emptyTitle),_||f||(s(d,m),l())};return Nt("div",{className:Er()({"vm-json-form":!0,"vm-json-form_one-field":!a,"vm-json-form_one-field_mobile":!a&&u,"vm-json-form_mobile":u}),children:[a&&Nt(Ka,{value:m,label:"Title",error:f,onEnter:b,onChange:e=>{p(e)}}),Nt(Ka,{value:d,label:"JSON",type:"textarea",error:g,autofocus:!0,onChange:e=>{y(""),h(e)},onEnter:b,disabled:!t}),Nt("div",{className:"vm-json-form-footer",children:[Nt("div",{className:"vm-json-form-footer__controls",children:[Nt(da,{variant:"outlined",startIcon:Nt(rr,{}),onClick:async()=>{await c(d,"Formatted JSON has been copied")},children:"Copy JSON"}),o&&Nt(da,{variant:"text",startIcon:Nt(Pn,{}),onClick:()=>{h(o)},children:"Reset JSON"})]}),Nt("div",{className:"vm-json-form-footer__controls vm-json-form-footer__controls_right",children:[Nt(da,{variant:"outlined",color:"error",onClick:l,children:"Cancel"}),Nt(da,{variant:"contained",onClick:b,children:"apply"})]})]})]})},Hl=e=>{let{traces:t,jsonEditor:n=!1,onDeleteClick:a}=e;const{isMobile:i}=ta(),[o,l]=(0,r.useState)(null),[s,c]=(0,r.useState)([]),u=()=>{l(null)};if(!t.length)return Nt(ra,{variant:"info",children:"Please re-run the query to see results of the tracing"});const d=e=>()=>{a(e)},h=e=>()=>{l(e)},m=e=>()=>{const t=new Blob([e.originalJSON],{type:"application/json"}),n=URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download=`vmui_trace_${e.queryValue}.json`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)};return Nt(Ct.FK,{children:[Nt("div",{className:"vm-tracings-view",children:t.map((e=>{return Nt("div",{className:"vm-tracings-view-trace vm-block vm-block_empty-padding",children:[Nt("div",{className:"vm-tracings-view-trace-header",children:[Nt("h3",{className:"vm-tracings-view-trace-header-title",children:["Trace for ",Nt("b",{className:"vm-tracings-view-trace-header-title__query",children:e.queryValue})]}),Nt(ba,{title:s.includes(e.idValue)?"Collapse All":"Expand All",children:Nt(da,{variant:"text",startIcon:s.includes(e.idValue)?Nt(kr,{}):Nt(wr,{}),onClick:(t=e,()=>{c((e=>e.includes(t.idValue)?e.filter((e=>e!==t.idValue)):[...e,t.idValue]))}),ariaLabel:s.includes(e.idValue)?"Collapse All":"Expand All"})}),Nt(ba,{title:"Save Trace to JSON",children:Nt(da,{variant:"text",startIcon:Nt(br,{}),onClick:m(e),ariaLabel:"Save trace to JSON"})}),Nt(ba,{title:"Open JSON",children:Nt(da,{variant:"text",startIcon:Nt(Qn,{}),onClick:h(e),ariaLabel:"open JSON"})}),Nt(ba,{title:"Remove trace",children:Nt(da,{variant:"text",color:"error",startIcon:Nt(Zn,{}),onClick:d(e),ariaLabel:"remove trace"})})]}),Nt("nav",{className:Er()({"vm-tracings-view-trace__nav":!0,"vm-tracings-view-trace__nav_mobile":i}),children:Nt(Fl,{isRoot:!0,trace:e,totalMsec:e.duration,isExpandedAll:s.includes(e.idValue)})})]},e.idValue);var t}))}),o&&Nt(_a,{title:o.queryValue,onClose:u,children:Nt(jl,{editable:n,displayTitle:n,defaultTile:o.queryValue,defaultJson:o.JSON,resetValue:o.originalJSON,onClose:u,onUpload:(e,t)=>{if(n&&o)try{o.setTracing(JSON.parse(e)),o.setQuery(t),l(null)}catch(zp){console.error(zp)}}})})]})},Vl=e=>{let{traces:t,displayType:n}=e;const{isTracingEnabled:a}=Fr(),[i,o]=(0,r.useState)([]);return(0,r.useEffect)((()=>{t&&o([...i,...t])}),[t]),(0,r.useEffect)((()=>{o([])}),[n]),Nt(Ct.FK,{children:a&&Nt("div",{className:"vm-custom-panel__trace",children:Nt(Hl,{traces:i,onDeleteClick:e=>{const t=i.filter((t=>t.idValue!==e.idValue));o([...t])}})})})},Ul=e=>{let{warning:t,query:n,onChange:a}=e;const{isMobile:i}=ta(),{value:o,setTrue:l,setFalse:s}=ma(!1);return(0,r.useEffect)(s,[n]),(0,r.useEffect)((()=>{a(o)}),[o]),Nt(ra,{variant:"warning",children:Nt("div",{className:Er()({"vm-custom-panel__warning":!0,"vm-custom-panel__warning_mobile":i}),children:[Nt("p",{children:t}),Nt(da,{color:"warning",variant:"outlined",onClick:l,children:"Show all"})]})})},Bl="u-off",ql="u-label",Yl="width",Wl="height",Kl="top",Ql="bottom",Zl="left",Gl="right",Jl="#000",Xl=Jl+"0",es="mousemove",ts="mousedown",ns="mouseup",rs="mouseenter",as="mouseleave",is="dblclick",os="change",ls="dppxchange",ss="--",cs="undefined"!=typeof window,us=cs?document:null,ds=cs?window:null,hs=cs?navigator:null;let ms,ps;function fs(e,t){if(null!=t){let n=e.classList;!n.contains(t)&&n.add(t)}}function vs(e,t){let n=e.classList;n.contains(t)&&n.remove(t)}function gs(e,t,n){e.style[t]=n+"px"}function ys(e,t,n,r){let a=us.createElement(e);return null!=t&&fs(a,t),null!=n&&n.insertBefore(a,r),a}function _s(e,t){return ys("div",e,t)}const bs=new WeakMap;function ws(e,t,n,r,a){let i="translate("+t+"px,"+n+"px)";i!=bs.get(e)&&(e.style.transform=i,bs.set(e,i),t<0||n<0||t>r||n>a?fs(e,Bl):vs(e,Bl))}const ks=new WeakMap;function xs(e,t,n){let r=t+n;r!=ks.get(e)&&(ks.set(e,r),e.style.background=t,e.style.borderColor=n)}const Ss=new WeakMap;function Cs(e,t,n,r){let a=t+""+n;a!=Ss.get(e)&&(Ss.set(e,a),e.style.height=n+"px",e.style.width=t+"px",e.style.marginLeft=r?-t/2+"px":0,e.style.marginTop=r?-n/2+"px":0)}const Es={passive:!0},Ns={...Es,capture:!0};function As(e,t,n,r){t.addEventListener(e,n,r?Ns:Es)}function Ms(e,t,n,r){t.removeEventListener(e,n,Es)}function Ts(e,t,n,r){let a;n=n||0;let i=(r=r||t.length-1)<=2147483647;for(;r-n>1;)a=i?n+r>>1:qs((n+r)/2),t[a]=t&&a<=n;a+=r)if(null!=e[a])return a;return-1}function Ls(e,t,n,r){let a=Gs(e),i=Gs(t);e==t&&(-1==a?(e*=n,t/=n):(e/=n,t*=n));let o=10==n?Js:Xs,l=1==i?Ws:qs,s=(1==a?qs:Ws)(o(Bs(e))),c=l(o(Bs(t))),u=Zs(n,s),d=Zs(n,c);return 10==n&&(s<0&&(u=fc(u,-s)),c<0&&(d=fc(d,-c))),r||2==n?(e=u*a,t=d*i):(e=pc(e,u),t=mc(t,d)),[e,t]}function Ps(e,t,n,r){let a=Ls(e,t,n,r);return 0==e&&(a[0]=0),0==t&&(a[1]=0),a}cs&&function e(){let t=devicePixelRatio;ms!=t&&(ms=t,ps&&Ms(os,ps,e),ps=matchMedia(`(min-resolution: ${ms-.001}dppx) and (max-resolution: ${ms+.001}dppx)`),As(os,ps,e),ds.dispatchEvent(new CustomEvent(ls)))}();const Is={mode:3,pad:.1},Os={pad:0,soft:null,mode:0},Rs={min:Os,max:Os};function Ds(e,t,n,r){return Cc(n)?Fs(e,t,n):(Os.pad=n,Os.soft=r?0:null,Os.mode=r?3:0,Fs(e,t,Rs))}function zs(e,t){return null==e?t:e}function Fs(e,t,n){let r=n.min,a=n.max,i=zs(r.pad,0),o=zs(a.pad,0),l=zs(r.hard,-tc),s=zs(a.hard,tc),c=zs(r.soft,tc),u=zs(a.soft,-tc),d=zs(r.mode,0),h=zs(a.mode,0),m=t-e,p=Js(m),f=Qs(Bs(e),Bs(t)),v=Js(f),g=Bs(v-p);(m<1e-24||g>10)&&(m=0,0!=e&&0!=t||(m=1e-24,2==d&&c!=tc&&(i=0),2==h&&u!=-tc&&(o=0)));let y=m||f||1e3,_=Js(y),b=Zs(10,qs(_)),w=fc(pc(e-y*(0==m?0==e?.1:1:i),b/10),24),k=e>=c&&(1==d||3==d&&w<=c||2==d&&w>=c)?c:tc,x=Qs(l,w=k?k:Ks(k,w)),S=fc(mc(t+y*(0==m?0==t?.1:1:o),b/10),24),C=t<=u&&(1==h||3==h&&S>=u||2==h&&S<=u)?u:-tc,E=Ks(s,S>C&&t<=C?C:Qs(C,S));return x==E&&0==x&&(E=100),[x,E]}const js=new Intl.NumberFormat(cs?hs.language:"en-US"),Hs=e=>js.format(e),Vs=Math,Us=Vs.PI,Bs=Vs.abs,qs=Vs.floor,Ys=Vs.round,Ws=Vs.ceil,Ks=Vs.min,Qs=Vs.max,Zs=Vs.pow,Gs=Vs.sign,Js=Vs.log10,Xs=Vs.log2,ec=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Vs.asinh(e/t)},tc=1/0;function nc(e){return 1+(0|Js((e^e>>31)-(e>>31)))}function rc(e,t,n){return Ks(Qs(e,t),n)}function ac(e){return"function"==typeof e?e:()=>e}const ic=e=>e,oc=(e,t)=>t,lc=e=>null,sc=e=>!0,cc=(e,t)=>e==t,uc=/\.\d*?(?=9{6,}|0{6,})/gm,dc=e=>{if(xc(e)||vc.has(e))return e;const t=`${e}`,n=t.match(uc);if(null==n)return e;let r=n[0].length-1;if(-1!=t.indexOf("e-")){let[e,n]=t.split("e");return+`${dc(e)}e${n}`}return fc(e,r)};function hc(e,t){return dc(fc(dc(e/t))*t)}function mc(e,t){return dc(Ws(dc(e/t))*t)}function pc(e,t){return dc(qs(dc(e/t))*t)}function fc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(xc(e))return e;let n=10**t,r=e*n*(1+Number.EPSILON);return Ys(r)/n}const vc=new Map;function gc(e){return((""+e).split(".")[1]||"").length}function yc(e,t,n,r){let a=[],i=r.map(gc);for(let o=t;o=0?0:t)+(o>=i[l]?0:i[l]),u=10==e?s:fc(s,c);a.push(u),vc.set(u,c)}}return a}const _c={},bc=[],wc=[null,null],kc=Array.isArray,xc=Number.isInteger;function Sc(e){return"string"==typeof e}function Cc(e){let t=!1;if(null!=e){let n=e.constructor;t=null==n||n==Object}return t}function Ec(e){return null!=e&&"object"==typeof e}const Nc=Object.getPrototypeOf(Uint8Array),Ac="__proto__";function Mc(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Cc;if(kc(e)){let r=e.find((e=>null!=e));if(kc(r)||n(r)){t=Array(e.length);for(let r=0;ri){for(r=o-1;r>=0&&null==e[r];)e[r--]=null;for(r=o+1;rPromise.resolve().then(e):queueMicrotask;const Pc=["January","February","March","April","May","June","July","August","September","October","November","December"],Ic=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Oc(e){return e.slice(0,3)}const Rc=Ic.map(Oc),Dc=Pc.map(Oc),zc={MMMM:Pc,MMM:Dc,WWWW:Ic,WWW:Rc};function Fc(e){return(e<10?"0":"")+e}const jc={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,t)=>t.MMMM[e.getMonth()],MMM:(e,t)=>t.MMM[e.getMonth()],MM:e=>Fc(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>Fc(e.getDate()),D:e=>e.getDate(),WWWW:(e,t)=>t.WWWW[e.getDay()],WWW:(e,t)=>t.WWW[e.getDay()],HH:e=>Fc(e.getHours()),H:e=>e.getHours(),h:e=>{let t=e.getHours();return 0==t?12:t>12?t-12:t},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>Fc(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>Fc(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>{return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Hc(e,t){t=t||zc;let n,r=[],a=/\{([a-z]+)\}|[^{]+/gi;for(;n=a.exec(e);)r.push("{"==n[0][0]?jc[n[1]]:n[0]);return e=>{let n="";for(let a=0;ae%1==0,Bc=[1,2,2.5,5],qc=yc(10,-32,0,Bc),Yc=yc(10,0,32,Bc),Wc=Yc.filter(Uc),Kc=qc.concat(Yc),Qc="{YYYY}",Zc="\n"+Qc,Gc="{M}/{D}",Jc="\n"+Gc,Xc=Jc+"/{YY}",eu="{aa}",tu="{h}:{mm}"+eu,nu="\n"+tu,ru=":{ss}",au=null;function iu(e){let t=1e3*e,n=60*t,r=60*n,a=24*r,i=30*a,o=365*a;return[(1==e?yc(10,0,3,Bc).filter(Uc):yc(10,-3,0,Bc)).concat([t,5*t,10*t,15*t,30*t,n,5*n,10*n,15*n,30*n,r,2*r,3*r,4*r,6*r,8*r,12*r,a,2*a,3*a,4*a,5*a,6*a,7*a,8*a,9*a,10*a,15*a,i,2*i,3*i,4*i,6*i,o,2*o,5*o,10*o,25*o,50*o,100*o]),[[o,Qc,au,au,au,au,au,au,1],[28*a,"{MMM}",Zc,au,au,au,au,au,1],[a,Gc,Zc,au,au,au,au,au,1],[r,"{h}"+eu,Xc,au,Jc,au,au,au,1],[n,tu,Xc,au,Jc,au,au,au,1],[t,ru,Xc+" "+tu,au,Jc+" "+tu,au,nu,au,1],[e,ru+".{fff}",Xc+" "+tu,au,Jc+" "+tu,au,nu,au,1]],function(t){return(l,s,c,u,d,h)=>{let m=[],p=d>=o,f=d>=i&&d=a?a:d,o=_+(qs(c)-qs(g))+mc(g-_,i);m.push(o);let p=t(o),f=p.getHours()+p.getMinutes()/n+p.getSeconds()/r,v=d/r,y=h/l.axes[s]._space;for(;o=fc(o+d,1==e?0:3),!(o>u);)if(v>1){let e=qs(fc(f+v,6))%24,n=t(o).getHours()-e;n>1&&(n=-1),o-=n*r,f=(f+v)%24,fc((o-m[m.length-1])/d,3)*y>=.7&&m.push(o)}else m.push(o)}return m}}]}const[ou,lu,su]=iu(1),[cu,uu,du]=iu(.001);function hu(e,t){return e.map((e=>e.map(((n,r)=>0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)))))}function mu(e,t){return(n,r,a,i,o)=>{let l,s,c,u,d,h,m=t.find((e=>o>=e[0]))||t[t.length-1];return r.map((t=>{let n=e(t),r=n.getFullYear(),a=n.getMonth(),i=n.getDate(),o=n.getHours(),p=n.getMinutes(),f=n.getSeconds(),v=r!=l&&m[2]||a!=s&&m[3]||i!=c&&m[4]||o!=u&&m[5]||p!=d&&m[6]||f!=h&&m[7]||m[1];return l=r,s=a,c=i,u=o,d=p,h=f,v(n)}))}}function pu(e,t,n){return new Date(e,t,n)}function fu(e,t){return t(e)}yc(2,-53,53,[1]);function vu(e,t){return(n,r,a,i)=>null==i?ss:t(e(r))}const gu={show:!0,live:!0,isolate:!1,mount:()=>{},markers:{show:!0,width:2,stroke:function(e,t){let n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null},fill:function(e,t){return e.series[t].fill(e,t)},dash:"solid"},idx:null,idxs:null,values:[]};const yu=[0,0];function _u(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{0==e.button&&(!r||e.target==t)&&n(e)}}function bu(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{(!r||e.target==t)&&n(e)}}const wu={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return yu[0]=t,yu[1]=n,yu},points:{one:!1,show:function(e,t){let n=e.cursor.points,r=_s(),a=n.size(e,t);gs(r,Yl,a),gs(r,Wl,a);let i=a/-2;gs(r,"marginLeft",i),gs(r,"marginTop",i);let o=n.width(e,t,a);return o&&gs(r,"borderWidth",o),r},size:function(e,t){return e.series[t].points.size},width:0,stroke:function(e,t){let n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){let n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:_u,mouseup:_u,click:_u,dblclick:_u,mousemove:bu,mouseleave:bu,mouseenter:bu},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,t,n,r,a)=>r-a,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},ku={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},xu=Tc({},ku,{filter:oc}),Su=Tc({},xu,{size:10}),Cu=Tc({},ku,{show:!1}),Eu='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Nu="bold "+Eu,Au={show:!0,scale:"x",stroke:Jl,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Nu,side:2,grid:xu,ticks:Su,border:Cu,font:Eu,lineGap:1.5,rotate:0},Mu={show:!0,scale:"x",auto:!1,sorted:1,min:tc,max:-tc,idxs:[]};function Tu(e,t,n,r,a){return t.map((e=>null==e?"":Hs(e)))}function $u(e,t,n,r,a,i,o){let l=[],s=vc.get(a)||0;for(let c=n=o?n:fc(mc(n,a),s);c<=r;c=fc(c+a,s))l.push(Object.is(c,-0)?0:c);return l}function Lu(e,t,n,r,a,i,o){const l=[],s=e.scales[e.axes[t].scale].log,c=qs((10==s?Js:Xs)(n));a=Zs(s,c),10==s&&(a=Kc[Ts(a,Kc)]);let u=n,d=a*s;10==s&&(d=Kc[Ts(d,Kc)]);do{l.push(u),u+=a,10!=s||vc.has(u)||(u=fc(u,vc.get(a))),u>=d&&(d=(a=u)*s,10==s&&(d=Kc[Ts(d,Kc)]))}while(u<=r);return l}function Pu(e,t,n,r,a,i,o){let l=e.scales[e.axes[t].scale].asinh,s=r>l?Lu(e,t,Qs(l,n),r,a):[l],c=r>=0&&n<=0?[0]:[];return(n<-l?Lu(e,t,Qs(l,-r),-n,a):[l]).reverse().map((e=>-e)).concat(c,s)}const Iu=/./,Ou=/[12357]/,Ru=/[125]/,Du=/1/,zu=(e,t,n,r)=>e.map(((e,a)=>4==t&&0==e||a%r==0&&n.test(e.toExponential()[e<0?1:0])?e:null));function Fu(e,t,n,r,a){let i=e.axes[n],o=i.scale,l=e.scales[o],s=e.valToPos,c=i._space,u=s(10,o),d=s(9,o)-u>=c?Iu:s(7,o)-u>=c?Ou:s(5,o)-u>=c?Ru:Du;if(d==Du){let e=Bs(s(1,o)-u);if(ea,qu={show:!0,auto:!0,sorted:0,gaps:Bu,alpha:1,facets:[Tc({},Uu,{scale:"x"}),Tc({},Uu,{scale:"y"})]},Yu={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Bu,alpha:1,points:{show:function(e,t){let{scale:n,idxs:r}=e.series[0],a=e._data[0],i=e.valToPos(a[r[0]],n,!0),o=e.valToPos(a[r[1]],n,!0),l=Bs(o-i)/(e.series[t].points.space*ms);return r[1]-r[0]<=l},filter:null},values:null,min:tc,max:-tc,idxs:[],path:null,clip:null};function Wu(e,t,n,r,a){return n/10}const Ku={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Qu=Tc({},Ku,{time:!1,ori:1}),Zu={};function Gu(e,t){let n=Zu[e];return n||(n={key:e,plots:[],sub(e){n.plots.push(e)},unsub(e){n.plots=n.plots.filter((t=>t!=e))},pub(e,t,r,a,i,o,l){for(let s=0;s{let f=e.pxRound;const v=l.dir*(0==l.ori?1:-1),g=0==l.ori?sd:cd;let y,_;1==v?(y=n,_=r):(y=r,_=n);let b=f(c(t[y],l,m,d)),w=f(u(o[y],s,p,h)),k=f(c(t[_],l,m,d)),x=f(u(1==i?s.max:s.min,s,p,h)),S=new Path2D(a);return g(S,k,x),g(S,b,x),g(S,b,w),S}))}function nd(e,t,n,r,a,i){let o=null;if(e.length>0){o=new Path2D;const l=0==t?ud:dd;let s=n;for(let t=0;tn[0]){let e=n[0]-s;e>0&&l(o,s,r,e,r+i),s=n[1]}}let c=n+a-s,u=10;c>0&&l(o,s,r-u/2,c,r+i+u)}return o}function rd(e,t,n,r,a,i,o){let l=[],s=e.length;for(let c=1==a?n:r;c>=n&&c<=r;c+=a){if(null===t[c]){let u=c,d=c;if(1==a)for(;++c<=r&&null===t[c];)d=c;else for(;--c>=n&&null===t[c];)d=c;let h=i(e[u]),m=d==u?h:i(e[d]),p=u-a;h=o<=0&&p>=0&&p=0&&f>=0&&f=h&&l.push([h,m])}}return l}function ad(e){return 0==e?ic:1==e?Ys:t=>hc(t,e)}function id(e){let t=0==e?od:ld,n=0==e?(e,t,n,r,a,i)=>{e.arcTo(t,n,r,a,i)}:(e,t,n,r,a,i)=>{e.arcTo(n,t,a,r,i)},r=0==e?(e,t,n,r,a)=>{e.rect(t,n,r,a)}:(e,t,n,r,a)=>{e.rect(n,t,a,r)};return function(e,a,i,o,l){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;0==s&&0==c?r(e,a,i,o,l):(s=Ks(s,o/2,l/2),c=Ks(c,o/2,l/2),t(e,a+s,i),n(e,a+o,i,a+o,i+l,s),n(e,a+o,i+l,a,i+l,c),n(e,a,i+l,a,i,c),n(e,a,i,a+o,i,s),e.closePath())}}const od=(e,t,n)=>{e.moveTo(t,n)},ld=(e,t,n)=>{e.moveTo(n,t)},sd=(e,t,n)=>{e.lineTo(t,n)},cd=(e,t,n)=>{e.lineTo(n,t)},ud=id(0),dd=id(1),hd=(e,t,n,r,a,i)=>{e.arc(t,n,r,a,i)},md=(e,t,n,r,a,i)=>{e.arc(n,t,r,a,i)},pd=(e,t,n,r,a,i,o)=>{e.bezierCurveTo(t,n,r,a,i,o)},fd=(e,t,n,r,a,i,o)=>{e.bezierCurveTo(n,t,a,r,o,i)};function vd(e){return(e,t,n,r,a)=>Ju(e,t,((t,i,o,l,s,c,u,d,h,m,p)=>{let f,v,{pxRound:g,points:y}=t;0==l.ori?(f=od,v=hd):(f=ld,v=md);const _=fc(y.width*ms,3);let b=(y.size-y.width)/2*ms,w=fc(2*b,3),k=new Path2D,x=new Path2D,{left:S,top:C,width:E,height:N}=e.bbox;ud(x,S-w,C-w,E+2*w,N+2*w);const A=e=>{if(null!=o[e]){let t=g(c(i[e],l,m,d)),n=g(u(o[e],s,p,h));f(k,t+b,n),v(k,t,n,b,0,2*Us)}};if(a)a.forEach(A);else for(let e=n;e<=r;e++)A(e);return{stroke:_>0?k:null,fill:k,clip:x,flags:3}}))}function gd(e){return(t,n,r,a,i,o)=>{r!=a&&(i!=r&&o!=r&&e(t,n,r),i!=a&&o!=a&&e(t,n,a),e(t,n,o))}}const yd=gd(sd),_d=gd(cd);function bd(e){const t=zs(e?.alignGaps,0);return(e,n,r,a)=>Ju(e,n,((i,o,l,s,c,u,d,h,m,p,f)=>{let v,g,y=i.pxRound,_=e=>y(u(e,s,p,h)),b=e=>y(d(e,c,f,m));0==s.ori?(v=sd,g=yd):(v=cd,g=_d);const w=s.dir*(0==s.ori?1:-1),k={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},x=k.stroke;let S,C,E,N=tc,A=-tc,M=_(o[1==w?r:a]),T=$s(l,r,a,1*w),$=$s(l,r,a,-1*w),L=_(o[T]),P=_(o[$]),I=!1;for(let e=1==w?r:a;e>=r&&e<=a;e+=w){let t=_(o[e]),n=l[e];t==M?null!=n?(C=b(n),N==tc&&(v(x,t,C),S=C),N=Ks(C,N),A=Qs(C,A)):null===n&&(I=!0):(N!=tc&&(g(x,M,N,A,S,C),E=M),null!=n?(C=b(n),v(x,t,C),N=A=S=C):(N=tc,A=-tc,null===n&&(I=!0)),M=t)}N!=tc&&N!=A&&E!=M&&g(x,M,N,A,S,C);let[O,R]=Xu(e,n);if(null!=i.fill||0!=O){let t=k.fill=new Path2D(x),r=b(i.fillTo(e,n,i.min,i.max,O));v(t,P,r),v(t,L,r)}if(!i.spanGaps){let c=[];I&&c.push(...rd(o,l,r,a,w,_,t)),k.gaps=c=i.gaps(e,n,r,a,c),k.clip=nd(c,s.ori,h,m,p,f)}return 0!=R&&(k.band=2==R?[td(e,n,r,a,x,-1),td(e,n,r,a,x,1)]:td(e,n,r,a,x,R)),k}))}function wd(e,t,n,r,a,i){let o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:tc;if(e.length>1){let l=null;for(let s=0,c=1/0;s0!==r[e]>0?n[e]=0:(n[e]=3*(s[e-1]+s[e])/((2*s[e]+s[e-1])/r[e-1]+(s[e]+2*s[e-1])/r[e]),isFinite(n[e])||(n[e]=0));n[o-1]=r[o-2];for(let c=0;c{Fd.pxRatio=ms})));const Cd=bd(),Ed=vd();function Nd(e,t,n,r){return(r?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map(((e,r)=>Ad(e,r,t,n)))}function Ad(e,t,n,r){return Tc({},0==t?n:r,e)}function Md(e,t,n){return null==t?wc:[t,n]}const Td=Md;function $d(e,t,n){return null==t?wc:Ds(t,n,.1,!0)}function Ld(e,t,n,r){return null==t?wc:Ls(t,n,e.scales[r].log,!1)}const Pd=Ld;function Id(e,t,n,r){return null==t?wc:Ps(t,n,e.scales[r].log,!1)}const Od=Id;function Rd(e,t,n,r,a){let i=Qs(nc(e),nc(t)),o=t-e,l=Ts(a/r*o,n);do{let e=n[l],t=r*e/o;if(t>=a&&i+(e<5?vc.get(e):0)<=17)return[e,t]}while(++l(t=Ys((n=+r)*ms))+"px")),t,n]}function zd(e){e.show&&[e.font,e.labelFont].forEach((e=>{let t=fc(e[2]*ms,1);e[0]=e[0].replace(/[0-9.]+px/,t+"px"),e[1]=t}))}function Fd(e,t,n){const r={mode:zs(e.mode,1)},a=r.mode;function i(e,t){return((3==t.distr?Js(e>0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?ec(e,t.asinh):100==t.distr?t.fwd(e):e)-t._min)/(t._max-t._min)}function o(e,t,n,r){let a=i(e,t);return r+n*(-1==t.dir?1-a:a)}function l(e,t,n,r){let a=i(e,t);return r+n*(-1==t.dir?a:1-a)}function s(e,t,n,r){return 0==t.ori?o(e,t,n,r):l(e,t,n,r)}r.valToPosH=o,r.valToPosV=l;let c=!1;r.status=0;const u=r.root=_s("uplot");if(null!=e.id&&(u.id=e.id),fs(u,e.class),e.title){_s("u-title",u).textContent=e.title}const d=ys("canvas"),h=r.ctx=d.getContext("2d"),m=_s("u-wrap",u);As("click",m,(e=>{if(e.target===f){(Tt!=Et||$t!=Nt)&&jt.click(r,e)}}),!0);const p=r.under=_s("u-under",m);m.appendChild(d);const f=r.over=_s("u-over",m),v=+zs((e=Mc(e)).pxAlign,1),g=ad(v);(e.plugins||[]).forEach((t=>{t.opts&&(e=t.opts(r,e)||e)}));const y=e.ms||.001,_=r.series=1==a?Nd(e.series||[],Mu,Yu,!1):(b=e.series||[null],w=qu,b.map(((e,t)=>0==t?{}:Tc({},w,e))));var b,w;const k=r.axes=Nd(e.axes||[],Au,Vu,!0),x=r.scales={},S=r.bands=e.bands||[];S.forEach((e=>{e.fill=ac(e.fill||null),e.dir=zs(e.dir,-1)}));const C=2==a?_[1].facets[0].scale:_[0].scale,E={axes:function(){for(let e=0;ent[e])):y,b=2==m.distr?nt[y[1]]-nt[y[0]]:u,w=t.ticks,S=t.border,C=w.show?Ys(w.size*ms):0,E=t._rotate*-Us/180,N=g(t._pos*ms),A=N+(C+v)*c;a=0==o?A:0,n=1==o?A:0,lt(t.font[0],l,1==t.align?Zl:2==t.align?Gl:E>0?Zl:E<0?Gl:0==o?"center":3==i?Gl:Zl,E||1==o?"middle":2==i?Kl:Ql);let M=t.font[1]*t.lineGap,T=y.map((e=>g(s(e,m,p,f)))),$=t._values;for(let e=0;e<$.length;e++){let t=$[e];if(null!=t){0==o?n=T[e]:a=T[e],t=""+t;let r=-1==t.indexOf("\n")?[t]:t.split(/\n/gm);for(let e=0;e0&&(_.forEach(((e,n)=>{if(n>0&&e.show&&(ut(n,!1),ut(n,!0),null==e._paths)){tt!=e.alpha&&(h.globalAlpha=tt=e.alpha);let i=2==a?[0,t[n][0].length-1]:function(e){let t=rc(Ue-1,0,Ve-1),n=rc(Be+1,0,Ve-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n{if(t>0&&e.show){tt!=e.alpha&&(h.globalAlpha=tt=e.alpha),null!=e._paths&&dt(t,!1);{let n=null!=e._paths?e._paths.gaps:null,a=e.points.show(r,t,Ue,Be,n),i=e.points.filter(r,t,a,n);(a||i)&&(e.points._paths=e.points.paths(r,t,Ue,Be,i),dt(t,!0))}1!=tt&&(h.globalAlpha=tt=1),xn("drawSeries",t)}})))}},N=(e.drawOrder||["axes","series"]).map((e=>E[e]));function A(t){let n=x[t];if(null==n){let r=(e.scales||_c)[t]||_c;if(null!=r.from)A(r.from),x[t]=Tc({},x[r.from],r,{key:t});else{n=x[t]=Tc({},t==C?Ku:Qu,r),n.key=t;let e=n.time,i=n.range,o=kc(i);if((t!=C||2==a&&!e)&&(!o||null!=i[0]&&null!=i[1]||(i={min:null==i[0]?Is:{mode:1,hard:i[0],soft:i[0]},max:null==i[1]?Is:{mode:1,hard:i[1],soft:i[1]}},o=!1),!o&&Cc(i))){let e=i;i=(t,n,r)=>null==n?wc:Ds(n,r,e)}n.range=ac(i||(e?Td:t==C?3==n.distr?Pd:4==n.distr?Od:Md:3==n.distr?Ld:4==n.distr?Id:$d)),n.auto=ac(!o&&n.auto),n.clamp=ac(n.clamp||Wu),n._min=n._max=null}}}A("x"),A("y"),1==a&&_.forEach((e=>{A(e.scale)})),k.forEach((e=>{A(e.scale)}));for(let Tn in e.scales)A(Tn);const M=x[C],T=M.distr;let $,L;0==M.ori?(fs(u,"u-hz"),$=o,L=l):(fs(u,"u-vt"),$=l,L=o);const P={};for(let Tn in x){let e=x[Tn];null==e.min&&null==e.max||(P[Tn]={min:e.min,max:e.max},e.min=e.max=null)}const I=e.tzDate||(e=>new Date(Ys(e/y))),O=e.fmtDate||Hc,R=1==y?su(I):du(I),D=mu(I,hu(1==y?lu:uu,O)),z=vu(I,fu("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",O)),F=[],j=r.legend=Tc({},gu,e.legend),H=j.show,V=j.markers;let U,B,q;j.idxs=F,V.width=ac(V.width),V.dash=ac(V.dash),V.stroke=ac(V.stroke),V.fill=ac(V.fill);let Y,W=[],K=[],Q=!1,Z={};if(j.live){const e=_[1]?_[1].values:null;Q=null!=e,Y=Q?e(r,1,0):{_:0};for(let t in Y)Z[t]=ss}if(H)if(U=ys("table","u-legend",u),q=ys("tbody",null,U),j.mount(r,U),Q){B=ys("thead",null,U,q);let e=ys("tr",null,B);for(var G in ys("th",null,e),Y)ys("th",ql,e).textContent=G}else fs(U,"u-inline"),j.live&&fs(U,"u-live");const J={show:!0},X={show:!1};const ee=new Map;function te(e,t,n){let a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const i=ee.get(t)||{},o=Ee.bind[e](r,t,n,a);o&&(As(e,t,i[e]=o),ee.set(t,i))}function ne(e,t,n){const r=ee.get(t)||{};for(let a in r)null!=e&&a!=e||(Ms(a,t,r[a]),delete r[a]);null==e&&ee.delete(t)}let re=0,ae=0,ie=0,oe=0,le=0,se=0,ce=le,ue=se,de=ie,he=oe,me=0,pe=0,fe=0,ve=0;r.bbox={};let ge=!1,ye=!1,_e=!1,be=!1,we=!1,ke=!1;function xe(e,t,n){(n||e!=r.width||t!=r.height)&&Se(e,t),_t(!1),_e=!0,ye=!0,Rt()}function Se(e,t){r.width=re=ie=e,r.height=ae=oe=t,le=se=0,function(){let e=!1,t=!1,n=!1,r=!1;k.forEach(((a,i)=>{if(a.show&&a._show){let{side:i,_size:o}=a,l=i%2,s=o+(null!=a.label?a.labelSize:0);s>0&&(l?(ie-=s,3==i?(le+=s,r=!0):n=!0):(oe-=s,0==i?(se+=s,e=!0):t=!0))}})),ze[0]=e,ze[1]=n,ze[2]=t,ze[3]=r,ie-=He[1]+He[3],le+=He[3],oe-=He[2]+He[0],se+=He[0]}(),function(){let e=le+ie,t=se+oe,n=le,r=se;function a(a,i){switch(a){case 1:return e+=i,e-i;case 2:return t+=i,t-i;case 3:return n-=i,n+i;case 0:return r-=i,r+i}}k.forEach(((e,t)=>{if(e.show&&e._show){let t=e.side;e._pos=a(t,e._size),null!=e.label&&(e._lpos=a(t,e.labelSize))}}))}();let n=r.bbox;me=n.left=hc(le*ms,.5),pe=n.top=hc(se*ms,.5),fe=n.width=hc(ie*ms,.5),ve=n.height=hc(oe*ms,.5)}const Ce=3;r.setSize=function(e){let{width:t,height:n}=e;xe(t,n)};const Ee=r.cursor=Tc({},wu,{drag:{y:2==a}},e.cursor);if(null==Ee.dataIdx){var Ne;let e=Ee.hover,n=e.skip=new Set(null!==(Ne=e.skip)&&void 0!==Ne?Ne:[]);n.add(void 0);let r=e.prox=ac(e.prox),a=e.bias??=0;Ee.dataIdx=(e,i,o,l)=>{var s;if(0==i)return o;let c=o,u=null!==(s=r(e,i,o,l))&&void 0!==s?s:tc,d=u>=0&&u0;)n.has(f[e])||(t=e);if(0==a||1==a)for(e=o;null==r&&e++u&&(c=null)}return c}}const Ae=e=>{Ee.event=e};Ee.idxs=F,Ee._lock=!1;let Me=Ee.points;Me.show=ac(Me.show),Me.size=ac(Me.size),Me.stroke=ac(Me.stroke),Me.width=ac(Me.width),Me.fill=ac(Me.fill);const Te=r.focus=Tc({},e.focus||{alpha:.3},Ee.focus),$e=Te.prox>=0,Le=$e&&Me.one;let Pe=[],Ie=[],Oe=[];function Re(e,t){let n=Me.show(r,t);if(n)return fs(n,"u-cursor-pt"),fs(n,e.class),ws(n,-10,-10,ie,oe),f.insertBefore(n,Pe[t]),n}function De(e,t){if(1==a||t>0){let t=1==a&&x[e.scale].time,n=e.value;e.value=t?Sc(n)?vu(I,fu(n,O)):n||z:n||Hu,e.label=e.label||(t?"Time":"Value")}if(Le||t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||Cd||lc,e.fillTo=ac(e.fillTo||ed),e.pxAlign=+zs(e.pxAlign,v),e.pxRound=ad(e.pxAlign),e.stroke=ac(e.stroke||null),e.fill=ac(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;let t=fc((3+2*(Qs(1,e.width)||1))*1,3),n=e.points=Tc({},{size:t,width:Qs(1,.2*t),stroke:e.stroke,space:2*t,paths:Ed,_stroke:null,_fill:null},e.points);n.show=ac(n.show),n.filter=ac(n.filter),n.fill=ac(n.fill),n.stroke=ac(n.stroke),n.paths=ac(n.paths),n.pxAlign=e.pxAlign}if(H){let n=function(e,t){if(0==t&&(Q||!j.live||2==a))return wc;let n=[],i=ys("tr","u-series",q,q.childNodes[t]);fs(i,e.class),e.show||fs(i,Bl);let o=ys("th",null,i);if(V.show){let e=_s("u-marker",o);if(t>0){let n=V.width(r,t);n&&(e.style.border=n+"px "+V.dash(r,t)+" "+V.stroke(r,t)),e.style.background=V.fill(r,t)}}let l=_s(ql,o);for(var s in l.textContent=e.label,t>0&&(V.show||(l.style.color=e.width>0?V.stroke(r,t):V.fill(r,t)),te("click",o,(t=>{if(Ee._lock)return;Ae(t);let n=_.indexOf(e);if((t.ctrlKey||t.metaKey)!=j.isolate){let e=_.some(((e,t)=>t>0&&t!=n&&e.show));_.forEach(((t,r)=>{r>0&&Wt(r,e?r==n?J:X:J,!0,Cn.setSeries)}))}else Wt(n,{show:!e.show},!0,Cn.setSeries)}),!1),$e&&te(rs,o,(t=>{Ee._lock||(Ae(t),Wt(_.indexOf(e),Gt,!0,Cn.setSeries))}),!1)),Y){let e=ys("td","u-value",i);e.textContent="--",n.push(e)}return[i,n]}(e,t);W.splice(t,0,n[0]),K.splice(t,0,n[1]),j.values.push(null)}if(Ee.show){F.splice(t,0,null);let n=null;Le?0==t&&(n=Re(e,t)):t>0&&(n=Re(e,t)),Pe.splice(t,0,n),Ie.splice(t,0,0),Oe.splice(t,0,0)}xn("addSeries",t)}r.addSeries=function(e,t){t=null==t?_.length:t,e=1==a?Ad(e,t,Mu,Yu):Ad(e,t,{},qu),_.splice(t,0,e),De(_[t],t)},r.delSeries=function(e){if(_.splice(e,1),H){j.values.splice(e,1),K.splice(e,1);let t=W.splice(e,1)[0];ne(null,t.firstChild),t.remove()}Ee.show&&(F.splice(e,1),Pe.splice(e,1)[0].remove(),Ie.splice(e,1),Oe.splice(e,1)),xn("delSeries",e)};const ze=[!1,!1,!1,!1];function Fe(e,t,n,r){let[a,i,o,l]=n,s=t%2,c=0;return 0==s&&(l||i)&&(c=0==t&&!a||2==t&&!o?Ys(Au.size/3):0),1==s&&(a||o)&&(c=1==t&&!i||3==t&&!l?Ys(Vu.size/2):0),c}const je=r.padding=(e.padding||[Fe,Fe,Fe,Fe]).map((e=>ac(zs(e,Fe)))),He=r._padding=je.map(((e,t)=>e(r,t,ze,0)));let Ve,Ue=null,Be=null;const qe=1==a?_[0].idxs:null;let Ye,We,Ke,Qe,Ze,Ge,Je,Xe,et,tt,nt=null,rt=!1;function at(e,n){if(t=null==e?[]:e,r.data=r._data=t,2==a){Ve=0;for(let e=1;e<_.length;e++)Ve+=t[e][0].length}else{0==t.length&&(r.data=r._data=t=[[]]),nt=t[0],Ve=nt.length;let e=t;if(2==T){e=t.slice();let n=e[0]=Array(Ve);for(let e=0;e=0,ke=!0,Rt()}}function it(){let e,n;rt=!0,1==a&&(Ve>0?(Ue=qe[0]=0,Be=qe[1]=Ve-1,e=t[0][Ue],n=t[0][Be],2==T?(e=Ue,n=Be):e==n&&(3==T?[e,n]=Ls(e,e,M.log,!1):4==T?[e,n]=Ps(e,e,M.log,!1):M.time?n=e+Ys(86400/y):[e,n]=Ds(e,n,.1,!0))):(Ue=qe[0]=e=null,Be=qe[1]=n=null)),Yt(C,e,n)}function ot(e,t,n,r,a,i){e??=Xl,n??=bc,r??="butt",a??=Xl,i??="round",e!=Ye&&(h.strokeStyle=Ye=e),a!=We&&(h.fillStyle=We=a),t!=Ke&&(h.lineWidth=Ke=t),i!=Ze&&(h.lineJoin=Ze=i),r!=Ge&&(h.lineCap=Ge=r),n!=Qe&&h.setLineDash(Qe=n)}function lt(e,t,n,r){t!=We&&(h.fillStyle=We=t),e!=Je&&(h.font=Je=e),n!=Xe&&(h.textAlign=Xe=n),r!=et&&(h.textBaseline=et=r)}function st(e,t,n,a){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(a.length>0&&e.auto(r,rt)&&(null==t||null==t.min)){let t=zs(Ue,0),r=zs(Be,a.length-1),o=null==n.min?3==e.distr?function(e,t,n){let r=tc,a=-tc;for(let i=t;i<=n;i++){let t=e[i];null!=t&&t>0&&(ta&&(a=t))}return[r,a]}(a,t,r):function(e,t,n,r){let a=tc,i=-tc;if(1==r)a=e[t],i=e[n];else if(-1==r)a=e[n],i=e[t];else for(let o=t;o<=n;o++){let t=e[o];null!=t&&(ti&&(i=t))}return[a,i]}(a,t,r,i):[n.min,n.max];e.min=Ks(e.min,n.min=o[0]),e.max=Qs(e.max,n.max=o[1])}}r.setData=at;const ct={min:null,max:null};function ut(e,t){let n=t?_[e].points:_[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function dt(e,n){let a=n?_[e].points:_[e],{stroke:i,fill:o,clip:l,flags:s,_stroke:c=a._stroke,_fill:u=a._fill,_width:d=a.width}=a._paths;d=fc(d*ms,3);let m=null,p=d%2/2;n&&null==u&&(u=d>0?"#fff":c);let f=1==a.pxAlign&&p>0;if(f&&h.translate(p,p),!n){let e=me-d/2,t=pe-d/2,n=fe+d,r=ve+d;m=new Path2D,m.rect(e,t,n,r)}n?mt(c,d,a.dash,a.cap,u,i,o,s,l):function(e,n,a,i,o,l,s,c,u,d,h){let m=!1;0!=u&&S.forEach(((p,f)=>{if(p.series[0]==e){let e,v=_[p.series[1]],g=t[p.series[1]],y=(v._paths||_c).band;kc(y)&&(y=1==p.dir?y[0]:y[1]);let b=null;v.show&&y&&function(e,t,n){for(t=zs(t,0),n=zs(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,Ue,Be)?(b=p.fill(r,f)||l,e=v._paths.clip):y=null,mt(n,a,i,o,b,s,c,u,d,h,e,y),m=!0}})),m||mt(n,a,i,o,l,s,c,u,d,h)}(e,c,d,a.dash,a.cap,u,i,o,s,m,l),f&&h.translate(-p,-p)}const ht=3;function mt(e,t,n,r,a,i,o,l,s,c,u,d){ot(e,t,n,r,a),(s||c||d)&&(h.save(),s&&h.clip(s),c&&h.clip(c)),d?(l&ht)==ht?(h.clip(d),u&&h.clip(u),ft(a,o),pt(e,i,t)):2&l?(ft(a,o),h.clip(d),pt(e,i,t)):1&l&&(h.save(),h.clip(d),u&&h.clip(u),ft(a,o),h.restore(),pt(e,i,t)):(ft(a,o),pt(e,i,t)),(s||c||d)&&h.restore()}function pt(e,t,n){n>0&&(t instanceof Map?t.forEach(((e,t)=>{h.strokeStyle=Ye=t,h.stroke(e)})):null!=t&&e&&h.stroke(t))}function ft(e,t){t instanceof Map?t.forEach(((e,t)=>{h.fillStyle=We=t,h.fill(e)})):null!=t&&e&&h.fill(t)}function vt(e,t,n,r,a,i,o,l,s,c){let u=o%2/2;1==v&&h.translate(u,u),ot(l,o,s,c,l),h.beginPath();let d,m,p,f,g=a+(0==r||3==r?-i:i);0==n?(m=a,f=g):(d=a,p=g);for(let v=0;v{if(!n.show)return;let i=x[n.scale];if(null==i.min)return void(n._show&&(t=!1,n._show=!1,_t(!1)));n._show||(t=!1,n._show=!0,_t(!1));let o=n.side,l=o%2,{min:s,max:c}=i,[u,d]=function(e,t,n,a){let i,o=k[e];if(a<=0)i=[0,0];else{let l=o._space=o.space(r,e,t,n,a);i=Rd(t,n,o._incrs=o.incrs(r,e,t,n,a,l),a,l)}return o._found=i}(a,s,c,0==l?ie:oe);if(0==d)return;let h=2==i.distr,m=n._splits=n.splits(r,a,s,c,u,d,h),p=2==i.distr?m.map((e=>nt[e])):m,f=2==i.distr?nt[m[1]]-nt[m[0]]:u,v=n._values=n.values(r,n.filter(r,p,a,d,f),a,d,f);n._rotate=2==o?n.rotate(r,v,a,d):0;let g=n._size;n._size=Ws(n.size(r,v,a,e)),null!=g&&n._size!=g&&(t=!1)})),t}function yt(e){let t=!0;return je.forEach(((n,a)=>{let i=n(r,a,ze,e);i!=He[a]&&(t=!1),He[a]=i})),t}function _t(e){_.forEach(((t,n)=>{n>0&&(t._paths=null,e&&(1==a?(t.min=null,t.max=null):t.facets.forEach((e=>{e.min=null,e.max=null}))))}))}let bt,wt,kt,xt,St,Ct,Et,Nt,At,Mt,Tt,$t,Lt=!1,Pt=!1,It=[];function Ot(){Pt=!1;for(let e=0;e0){_.forEach(((n,i)=>{if(1==a){let a=n.scale,o=P[a];if(null==o)return;let l=e[a];if(0==i){let e=l.range(r,l.min,l.max,a);l.min=e[0],l.max=e[1],Ue=Ts(l.min,t[0]),Be=Ts(l.max,t[0]),Be-Ue>1&&(t[0][Ue]l.max&&Be--),n.min=nt[Ue],n.max=nt[Be]}else n.show&&n.auto&&st(l,o,n,t[i],n.sorted);n.idxs[0]=Ue,n.idxs[1]=Be}else if(i>0&&n.show&&n.auto){let[r,a]=n.facets,o=r.scale,l=a.scale,[s,c]=t[i],u=e[o],d=e[l];null!=u&&st(u,P[o],r,s,r.sorted),null!=d&&st(d,P[l],a,c,a.sorted),n.min=a.min,n.max=a.max}}));for(let t in e){let n=e[t],a=P[t];if(null==n.from&&(null==a||null==a.min)){let e=n.range(r,n.min==tc?null:n.min,n.max==-tc?null:n.max,t);n.min=e[0],n.max=e[1]}}}for(let t in e){let n=e[t];if(null!=n.from){let a=e[n.from];if(null==a.min)n.min=n.max=null;else{let e=n.range(r,a.min,a.max,t);n.min=e[0],n.max=e[1]}}}let n={},i=!1;for(let t in e){let r=e[t],a=x[t];if(a.min!=r.min||a.max!=r.max){a.min=r.min,a.max=r.max;let e=a.distr;a._min=3==e?Js(a.min):4==e?ec(a.min,a.asinh):100==e?a.fwd(a.min):a.min,a._max=3==e?Js(a.max):4==e?ec(a.max,a.asinh):100==e?a.fwd(a.max):a.max,n[t]=i=!0}}if(i){_.forEach(((e,t)=>{2==a?t>0&&n.y&&(e._paths=null):n[e.scale]&&(e._paths=null)}));for(let e in n)_e=!0,xn("setScale",e);Ee.show&&Ee.left>=0&&(be=ke=!0)}for(let t in P)P[t]=null}(),ge=!1),_e&&(!function(){let e=!1,t=0;for(;!e;){t++;let n=gt(t),a=yt(t);e=t==Ce||n&&a,e||(Se(r.width,r.height),ye=!0)}}(),_e=!1),ye){if(gs(p,Zl,le),gs(p,Kl,se),gs(p,Yl,ie),gs(p,Wl,oe),gs(f,Zl,le),gs(f,Kl,se),gs(f,Yl,ie),gs(f,Wl,oe),gs(m,Yl,re),gs(m,Wl,ae),d.width=Ys(re*ms),d.height=Ys(ae*ms),k.forEach((e=>{let{_el:t,_show:n,_size:r,_pos:a,side:i}=e;if(null!=t)if(n){let e=i%2==1;gs(t,e?"left":"top",a-(3===i||0===i?r:0)),gs(t,e?"width":"height",r),gs(t,e?"top":"left",e?se:le),gs(t,e?"height":"width",e?oe:ie),vs(t,Bl)}else fs(t,Bl)})),Ye=We=Ke=Ze=Ge=Je=Xe=et=Qe=null,tt=1,sn(!0),le!=ce||se!=ue||ie!=de||oe!=he){_t(!1);let e=ie/de,t=oe/he;if(Ee.show&&!be&&Ee.left>=0){Ee.left*=e,Ee.top*=t,kt&&ws(kt,Ys(Ee.left),0,ie,oe),xt&&ws(xt,0,Ys(Ee.top),ie,oe);for(let n=0;n=0&&Ut.width>0){Ut.left*=e,Ut.width*=e,Ut.top*=t,Ut.height*=t;for(let e in dn)gs(Bt,e,Ut[e])}ce=le,ue=se,de=ie,he=oe}xn("setSize"),ye=!1}re>0&&ae>0&&(h.clearRect(0,0,d.width,d.height),xn("drawClear"),N.forEach((e=>e())),xn("draw")),Ut.show&&we&&(qt(Ut),we=!1),Ee.show&&be&&(on(null,!0,!1),be=!1),j.show&&j.live&&ke&&(rn(),ke=!1),c||(c=!0,r.status=1,xn("ready")),rt=!1,Lt=!1}function zt(e,n){let a=x[e];if(null==a.from){if(0==Ve){let t=a.range(r,n.min,n.max,e);n.min=t[0],n.max=t[1]}if(n.min>n.max){let e=n.min;n.min=n.max,n.max=e}if(Ve>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==C&&2==a.distr&&Ve>0&&(n.min=Ts(n.min,t[0]),n.max=Ts(n.max,t[0]),n.min==n.max&&n.max++),P[e]=n,ge=!0,Rt()}}r.batch=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Lt=!0,Pt=t,e(r),Dt(),t&&It.length>0&&queueMicrotask(Ot)},r.redraw=(e,t)=>{_e=t||!1,!1!==e?Yt(C,M.min,M.max):Rt()},r.setScale=zt;let Ft=!1;const jt=Ee.drag;let Ht=jt.x,Vt=jt.y;Ee.show&&(Ee.x&&(bt=_s("u-cursor-x",f)),Ee.y&&(wt=_s("u-cursor-y",f)),0==M.ori?(kt=bt,xt=wt):(kt=wt,xt=bt),Tt=Ee.left,$t=Ee.top);const Ut=r.select=Tc({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Bt=Ut.show?_s("u-select",Ut.over?f:p):null;function qt(e,t){if(Ut.show){for(let t in e)Ut[t]=e[t],t in dn&&gs(Bt,t,e[t]);!1!==t&&xn("setSelect")}}function Yt(e,t,n){zt(e,{min:t,max:n})}function Wt(e,t,n,i){null!=t.focus&&function(e){if(e!=Zt){let t=null==e,n=1!=Te.alpha;_.forEach(((r,i)=>{if(1==a||i>0){let a=t||0==i||i==e;r._focus=t?null:a,n&&function(e,t){_[e].alpha=t,Ee.show&&Pe[e]&&(Pe[e].style.opacity=t);H&&W[e]&&(W[e].style.opacity=t)}(i,a?1:Te.alpha)}})),Zt=e,n&&Rt()}}(e),null!=t.show&&_.forEach(((n,r)=>{r>0&&(e==r||null==e)&&(n.show=t.show,function(e){let t=_[e],n=H?W[e]:null;t.show?n&&vs(n,Bl):(n&&fs(n,Bl),ws(Le?Pe[0]:Pe[e],-10,-10,ie,oe))}(r,t.show),2==a?(Yt(n.facets[0].scale,null,null),Yt(n.facets[1].scale,null,null)):Yt(n.scale,null,null),Rt())})),!1!==n&&xn("setSeries",e,t),i&&An("setSeries",r,e,t)}let Kt,Qt,Zt;r.setSelect=qt,r.setSeries=Wt,r.addBand=function(e,t){e.fill=ac(e.fill||null),e.dir=zs(e.dir,-1),t=null==t?S.length:t,S.splice(t,0,e)},r.setBand=function(e,t){Tc(S[e],t)},r.delBand=function(e){null==e?S.length=0:S.splice(e,1)};const Gt={focus:!0};function Jt(e,t,n){let r=x[t];n&&(e=e/ms-(1==r.ori?se:le));let a=ie;1==r.ori&&(a=oe,e=a-e),-1==r.dir&&(e=a-e);let i=r._min,o=i+(r._max-i)*(e/a),l=r.distr;return 3==l?Zs(10,o):4==l?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Vs.sinh(e)*t}(o,r.asinh):100==l?r.bwd(o):o}function Xt(e,t){gs(Bt,Zl,Ut.left=e),gs(Bt,Yl,Ut.width=t)}function en(e,t){gs(Bt,Kl,Ut.top=e),gs(Bt,Wl,Ut.height=t)}H&&$e&&te(as,U,(e=>{Ee._lock||(Ae(e),null!=Zt&&Wt(null,Gt,!0,Cn.setSeries))})),r.valToIdx=e=>Ts(e,t[0]),r.posToIdx=function(e,n){return Ts(Jt(e,C,n),t[0],Ue,Be)},r.posToVal=Jt,r.valToPos=(e,t,n)=>0==x[t].ori?o(e,x[t],n?fe:ie,n?me:0):l(e,x[t],n?ve:oe,n?pe:0),r.setCursor=(e,t,n)=>{Tt=e.left,$t=e.top,on(null,t,n)};let tn=0==M.ori?Xt:en,nn=1==M.ori?Xt:en;function rn(e,t){if(null!=e&&(e.idxs?e.idxs.forEach(((e,t)=>{F[t]=e})):void 0!==e.idx&&F.fill(e.idx),j.idx=F[0]),H&&j.live){for(let e=0;e<_.length;e++)(e>0||1==a&&!Q)&&an(e,F[e]);!function(){if(H&&j.live)for(let e=2==a?1:0;e<_.length;e++){if(0==e&&Q)continue;let t=j.values[e],n=0;for(let r in t)K[e][n++].firstChild.nodeValue=t[r]}}()}ke=!1,!1!==t&&xn("setLegend")}function an(e,n){var a;let i,o=_[e],l=0==e&&2==T?nt:t[e];Q?i=null!==(a=o.values(r,e,n))&&void 0!==a?a:Z:(i=o.value(r,null==n?null:l[n],e,n),i=null==i?Z:{_:i}),j.values[e]=i}function on(e,n,i){let o;At=Tt,Mt=$t,[Tt,$t]=Ee.move(r,Tt,$t),Ee.left=Tt,Ee.top=$t,Ee.show&&(kt&&ws(kt,Ys(Tt),0,ie,oe),xt&&ws(xt,0,Ys($t),ie,oe));let l=Ue>Be;Kt=tc,Qt=null;let s=0==M.ori?ie:oe,c=1==M.ori?ie:oe;if(Tt<0||0==Ve||l){o=Ee.idx=null;for(let e=0;e<_.length;e++){let t=Pe[e];null!=t&&ws(t,-10,-10,ie,oe)}$e&&Wt(null,Gt,!0,null==e&&Cn.setSeries),j.live&&(F.fill(o),ke=!0)}else{let e,n,i;1==a&&(e=0==M.ori?Tt:$t,n=Jt(e,C),o=Ee.idx=Ts(n,t[0],Ue,Be),i=$(t[0][o],M,s,0));let l=-10,u=-10,d=0,h=0,m=!0,p="",f="";for(let v=2==a?1:0;v<_.length;v++){let e=_[v],g=F[v],y=null==g?null:1==a?t[v][g]:t[v][1][g],b=Ee.dataIdx(r,v,o,n),w=null==b?null:1==a?t[v][b]:t[v][1][b];ke=ke||w!=y||b!=g,F[v]=b;let k=b==o?i:$(1==a?t[0][b]:t[v][0][b],M,s,0);if(v>0&&e.show){let t=null==w?-10:L(w,1==a?x[e.scale]:x[e.facets[1].scale],c,0);if($e&&null!=w){let n=1==M.ori?Tt:$t,a=Bs(Te.dist(r,v,b,t,n));if(a=0?1:-1;i==(w>=0?1:-1)&&(1==i?1==t?w>=r:w<=r:1==t?w<=r:w>=r)&&(Kt=a,Qt=v)}else Kt=a,Qt=v}}if(ke||Le){let e,n;0==M.ori?(e=k,n=t):(e=t,n=k);let a,i,o,s,c,g,y=!0,_=Me.bbox;if(null!=_){y=!1;let e=_(r,v);o=e.left,s=e.top,a=e.width,i=e.height}else o=e,s=n,a=i=Me.size(r,v);if(g=Me.fill(r,v),c=Me.stroke(r,v),Le)v==Qt&&Kt<=Te.prox&&(l=o,u=s,d=a,h=i,m=y,p=g,f=c);else{let e=Pe[v];null!=e&&(Ie[v]=o,Oe[v]=s,Cs(e,a,i,y),xs(e,g,c),ws(e,Ws(o),Ws(s),ie,oe))}}}}if(Le){let e=Te.prox;if(ke||(null==Zt?Kt<=e:Kt>e||Qt!=Zt)){let e=Pe[0];Ie[0]=l,Oe[0]=u,Cs(e,d,h,m),xs(e,p,f),ws(e,Ws(l),Ws(u),ie,oe)}}}if(Ut.show&&Ft)if(null!=e){let[t,n]=Cn.scales,[r,a]=Cn.match,[i,o]=e.cursor.sync.scales,l=e.cursor.drag;if(Ht=l._x,Vt=l._y,Ht||Vt){let l,u,d,h,m,{left:p,top:f,width:v,height:g}=e.select,y=e.scales[i].ori,_=e.posToVal,b=null!=t&&r(t,i),w=null!=n&&a(n,o);b&&Ht?(0==y?(l=p,u=v):(l=f,u=g),d=x[t],h=$(_(l,i),d,s,0),m=$(_(l+u,i),d,s,0),tn(Ks(h,m),Bs(m-h))):tn(0,s),w&&Vt?(1==y?(l=p,u=v):(l=f,u=g),d=x[n],h=L(_(l,o),d,c,0),m=L(_(l+u,o),d,c,0),nn(Ks(h,m),Bs(m-h))):nn(0,c)}else hn()}else{let e=Bs(At-St),t=Bs(Mt-Ct);if(1==M.ori){let n=e;e=t,t=n}Ht=jt.x&&e>=jt.dist,Vt=jt.y&&t>=jt.dist;let n,r,a=jt.uni;null!=a?Ht&&Vt&&(Ht=e>=a,Vt=t>=a,Ht||Vt||(t>e?Vt=!0:Ht=!0)):jt.x&&jt.y&&(Ht||Vt)&&(Ht=Vt=!0),Ht&&(0==M.ori?(n=Et,r=Tt):(n=Nt,r=$t),tn(Ks(n,r),Bs(r-n)),Vt||nn(0,c)),Vt&&(1==M.ori?(n=Et,r=Tt):(n=Nt,r=$t),nn(Ks(n,r),Bs(r-n)),Ht||tn(0,s)),Ht||Vt||(tn(0,0),nn(0,0))}if(jt._x=Ht,jt._y=Vt,null==e){if(i){if(null!=En){let[e,t]=Cn.scales;Cn.values[0]=null!=e?Jt(0==M.ori?Tt:$t,e):null,Cn.values[1]=null!=t?Jt(1==M.ori?Tt:$t,t):null}An(es,r,Tt,$t,ie,oe,o)}if($e){let e=i&&Cn.setSeries,t=Te.prox;null==Zt?Kt<=t&&Wt(Qt,Gt,!0,e):Kt>t?Wt(null,Gt,!0,e):Qt!=Zt&&Wt(Qt,Gt,!0,e)}}ke&&(j.idx=o,rn()),!1!==n&&xn("setCursor")}r.setLegend=rn;let ln=null;function sn(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?ln=null:(ln=f.getBoundingClientRect(),xn("syncRect",ln))}function cn(e,t,n,r,a,i,o){Ee._lock||Ft&&null!=e&&0==e.movementX&&0==e.movementY||(un(e,t,n,r,a,i,o,!1,null!=e),null!=e?on(null,!0,!0):on(t,!0,!1))}function un(e,t,n,a,i,o,l,c,u){if(null==ln&&sn(!1),Ae(e),null!=e)n=e.clientX-ln.left,a=e.clientY-ln.top;else{if(n<0||a<0)return Tt=-10,void($t=-10);let[e,r]=Cn.scales,l=t.cursor.sync,[c,u]=l.values,[d,h]=l.scales,[m,p]=Cn.match,f=t.axes[0].side%2==1,v=0==M.ori?ie:oe,g=1==M.ori?ie:oe,y=f?o:i,_=f?i:o,b=f?a:n,w=f?n:a;if(n=null!=d?m(e,d)?s(c,x[e],v,0):-10:v*(b/y),a=null!=h?p(r,h)?s(u,x[r],g,0):-10:g*(w/_),1==M.ori){let e=n;n=a,a=e}}u&&((n<=1||n>=ie-1)&&(n=hc(n,ie)),(a<=1||a>=oe-1)&&(a=hc(a,oe))),c?(St=n,Ct=a,[Et,Nt]=Ee.move(r,n,a)):(Tt=n,$t=a)}Object.defineProperty(r,"rect",{get:()=>(null==ln&&sn(!1),ln)});const dn={width:0,height:0,left:0,top:0};function hn(){qt(dn,!1)}let mn,pn,fn,vn;function gn(e,t,n,a,i,o,l){Ft=!0,Ht=Vt=jt._x=jt._y=!1,un(e,t,n,a,i,o,0,!0,!1),null!=e&&(te(ns,us,yn,!1),An(ts,r,Et,Nt,ie,oe,null));let{left:s,top:c,width:u,height:d}=Ut;mn=s,pn=c,fn=u,vn=d,hn()}function yn(e,t,n,a,i,o,l){Ft=jt._x=jt._y=!1,un(e,t,n,a,i,o,0,!1,!0);let{left:s,top:c,width:u,height:d}=Ut,h=u>0||d>0,m=mn!=s||pn!=c||fn!=u||vn!=d;if(h&&m&&qt(Ut),jt.setScale&&h&&m){let e=s,t=u,n=c,r=d;if(1==M.ori&&(e=c,t=d,n=s,r=u),Ht&&Yt(C,Jt(e,C),Jt(e+t,C)),Vt)for(let a in x){let e=x[a];a!=C&&null==e.from&&e.min!=tc&&Yt(a,Jt(n+r,a),Jt(n,a))}hn()}else Ee.lock&&(Ee._lock=!Ee._lock,on(null,!0,!1));null!=e&&(ne(ns,us),An(ns,r,Tt,$t,ie,oe,null))}function _n(e,t,n,a,i,o,l){Ee._lock||(Ae(e),it(),hn(),null!=e&&An(is,r,Tt,$t,ie,oe,null))}function bn(){k.forEach(zd),xe(r.width,r.height,!0)}As(ls,ds,bn);const wn={};wn.mousedown=gn,wn.mousemove=cn,wn.mouseup=yn,wn.dblclick=_n,wn.setSeries=(e,t,n,a)=>{-1!=(n=(0,Cn.match[2])(r,t,n))&&Wt(n,a,!0,!1)},Ee.show&&(te(ts,f,gn),te(es,f,cn),te(rs,f,(e=>{Ae(e),sn(!1)})),te(as,f,(function(e,t,n,r,a,i,o){if(Ee._lock)return;Ae(e);let l=Ft;if(Ft){let e,t,n=!0,r=!0,a=10;0==M.ori?(e=Ht,t=Vt):(e=Vt,t=Ht),e&&t&&(n=Tt<=a||Tt>=ie-a,r=$t<=a||$t>=oe-a),e&&n&&(Tt=Tt{e.call(null,r,t,n)}))}(e.plugins||[]).forEach((e=>{for(let t in e.hooks)kn[t]=(kn[t]||[]).concat(e.hooks[t])}));const Sn=(e,t,n)=>n,Cn=Tc({key:null,setSeries:!1,filters:{pub:sc,sub:sc},scales:[C,_[1]?_[1].scale:null],match:[cc,cc,Sn],values:[null,null]},Ee.sync);2==Cn.match.length&&Cn.match.push(Sn),Ee.sync=Cn;const En=Cn.key,Nn=Gu(En);function An(e,t,n,r,a,i,o){Cn.filters.pub(e,t,n,r,a,i,o)&&Nn.pub(e,t,n,r,a,i,o)}function Mn(){xn("init",e,t),at(t||e.data,!1),P[C]?zt(C,P[C]):it(),we=Ut.show&&(Ut.width>0||Ut.height>0),be=ke=!0,xe(e.width,e.height)}return Nn.sub(r),r.pub=function(e,t,n,r,a,i,o){Cn.filters.sub(e,t,n,r,a,i,o)&&wn[e](null,t,n,r,a,i,o)},r.destroy=function(){Nn.unsub(r),xd.delete(r),ee.clear(),Ms(ls,ds,bn),u.remove(),U?.remove(),xn("destroy")},_.forEach(De),k.forEach((function(e,t){if(e._show=e.show,e.show){let n=e.side%2,a=x[e.scale];null==a&&(e.scale=n?_[1].scale:C,a=x[e.scale]);let i=a.time;e.size=ac(e.size),e.space=ac(e.space),e.rotate=ac(e.rotate),kc(e.incrs)&&e.incrs.forEach((e=>{!vc.has(e)&&vc.set(e,gc(e))})),e.incrs=ac(e.incrs||(2==a.distr?Wc:i?1==y?ou:cu:Kc)),e.splits=ac(e.splits||(i&&1==a.distr?R:3==a.distr?Lu:4==a.distr?Pu:$u)),e.stroke=ac(e.stroke),e.grid.stroke=ac(e.grid.stroke),e.ticks.stroke=ac(e.ticks.stroke),e.border.stroke=ac(e.border.stroke);let o=e.values;e.values=kc(o)&&!kc(o[0])?ac(o):i?kc(o)?mu(I,hu(o,O)):Sc(o)?function(e,t){let n=Hc(t);return(t,r,a,i,o)=>r.map((t=>n(e(t))))}(I,o):o||D:o||Tu,e.filter=ac(e.filter||(a.distr>=3&&10==a.log?Fu:3==a.distr&&2==a.log?ju:oc)),e.font=Dd(e.font),e.labelFont=Dd(e.labelFont),e._size=e.size(r,null,t,0),e._space=e._rotate=e._incrs=e._found=e._splits=e._values=null,e._size>0&&(ze[t]=!0,e._el=_s("u-axis",m))}})),n?n instanceof HTMLElement?(n.appendChild(u),Mn()):n(r,Mn):Mn(),r}Fd.assign=Tc,Fd.fmtNum=Hs,Fd.rangeNum=Ds,Fd.rangeLog=Ls,Fd.rangeAsinh=Ps,Fd.orient=Ju,Fd.pxRatio=ms,Fd.join=function(e,t){if(function(e){let t=e[0][0],n=t.length;for(let r=1;r1&&void 0!==arguments[1]?arguments[1]:100;const n=e.length;if(n<=1)return!0;let r=0,a=n-1;for(;r<=a&&null==e[r];)r++;for(;a>=r&&null==e[a];)a--;if(a<=r)return!0;const i=Qs(1,qs((a-r+1)/t));for(let o=e[r],l=r+i;l<=a;l+=i){const t=e[l];if(null!=t){if(t<=o)return!1;o=t}}return!0}(t[0])||(t=function(e){let t=e[0],n=t.length,r=Array(n);for(let i=0;it[e]-t[n]));let a=[];for(let i=0;ie-t))],a=r[0].length,i=new Map;for(let o=0;oJu(e,i,((s,c,u,d,h,m,p,f,v,g,y)=>{let _=s.pxRound,{left:b,width:w}=e.bbox,k=e=>_(m(e,d,g,f)),x=e=>_(p(e,h,y,v)),S=0==d.ori?sd:cd;const C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},E=C.stroke,N=d.dir*(0==d.ori?1:-1);o=$s(u,o,l,1),l=$s(u,o,l,-1);let A=x(u[1==N?o:l]),M=k(c[1==N?o:l]),T=M,$=M;a&&-1==t&&($=b,S(E,$,A)),S(E,M,A);for(let e=1==N?o:l;e>=o&&e<=l;e+=N){let n=u[e];if(null==n)continue;let r=k(c[e]),a=x(n);1==t?S(E,r,A):S(E,T,a),S(E,r,a),A=a,T=r}let L=T;a&&1==t&&(L=b+w,S(E,L,A));let[P,I]=Xu(e,i);if(null!=s.fill||0!=P){let t=C.fill=new Path2D(E),n=x(s.fillTo(e,i,s.min,s.max,P));S(t,L,n),S(t,$,n)}if(!s.spanGaps){let a=[];a.push(...rd(c,u,o,l,N,k,r));let h=s.width*ms/2,m=n||1==t?h:-h,p=n||-1==t?-h:h;a.forEach((e=>{e[0]+=m,e[1]+=p})),C.gaps=a=s.gaps(e,i,o,l,a),C.clip=nd(a,d.ori,f,v,g,y)}return 0!=I&&(C.band=2==I?[td(e,i,o,l,E,-1),td(e,i,o,l,E,1)]:td(e,i,o,l,E,I)),C}))},e.bars=function(e){const t=zs((e=e||_c).size,[.6,tc,1]),n=e.align||0,r=e.gap||0;let a=e.radius;a=null==a?[0,0]:"number"==typeof a?[a,0]:a;const i=ac(a),o=1-t[0],l=zs(t[1],tc),s=zs(t[2],1),c=zs(e.disp,_c),u=zs(e.each,(e=>{})),{fill:d,stroke:h}=c;return(e,t,a,m)=>Ju(e,t,((p,f,v,g,y,_,b,w,k,x,S)=>{let C,E,N=p.pxRound,A=n,M=r*ms,T=l*ms,$=s*ms;0==g.ori?[C,E]=i(e,t):[E,C]=i(e,t);const L=g.dir*(0==g.ori?1:-1);let P,I,O,R=0==g.ori?ud:dd,D=0==g.ori?u:(e,t,n,r,a,i,o)=>{u(e,t,n,a,r,o,i)},z=zs(e.bands,bc).find((e=>e.series[0]==t)),F=null!=z?z.dir:0,j=p.fillTo(e,t,p.min,p.max,F),H=N(b(j,y,S,k)),V=x,U=N(p.width*ms),B=!1,q=null,Y=null,W=null,K=null;null==d||0!=U&&null==h||(B=!0,q=d.values(e,t,a,m),Y=new Map,new Set(q).forEach((e=>{null!=e&&Y.set(e,new Path2D)})),U>0&&(W=h.values(e,t,a,m),K=new Map,new Set(W).forEach((e=>{null!=e&&K.set(e,new Path2D)}))));let{x0:Q,size:Z}=c;if(null!=Q&&null!=Z){A=1,f=Q.values(e,t,a,m),2==Q.unit&&(f=f.map((t=>e.posToVal(w+t*x,g.key,!0))));let n=Z.values(e,t,a,m);I=2==Z.unit?n[0]*x:_(n[0],g,x,w)-_(0,g,x,w),V=wd(f,v,_,g,x,w,V),O=V-I+M}else V=wd(f,v,_,g,x,w,V),O=V*o+M,I=V-O;O<1&&(O=0),U>=I/2&&(U=0),O<5&&(N=ic);let G=O>0;I=N(rc(V-O-(G?U:0),$,T)),P=(0==A?I/2:A==L?0:I)-A*L*((0==A?M/2:0)+(G?U/2:0));const J={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},X=B?null:new Path2D;let ee=null;if(null!=z)ee=e.data[z.series[1]];else{let{y0:n,y1:r}=c;null!=n&&null!=r&&(v=r.values(e,t,a,m),ee=n.values(e,t,a,m))}let te=C*I,ne=E*I;for(let n=1==L?a:m;n>=a&&n<=m;n+=L){let r=v[n];if(null==r)continue;if(null!=ee){var re;let e=null!==(re=ee[n])&&void 0!==re?re:0;if(r-e==0)continue;H=b(e,y,S,k)}let a=_(2!=g.distr||null!=c?f[n]:n,g,x,w),i=b(zs(r,j),y,S,k),o=N(a-P),l=N(Qs(i,H)),s=N(Ks(i,H)),u=l-s;if(null!=r){let a=r<0?ne:te,i=r<0?te:ne;B?(U>0&&null!=W[n]&&R(K.get(W[n]),o,s+qs(U/2),I,Qs(0,u-U),a,i),null!=q[n]&&R(Y.get(q[n]),o,s+qs(U/2),I,Qs(0,u-U),a,i)):R(X,o,s+qs(U/2),I,Qs(0,u-U),a,i),D(e,t,n,o-U/2,s,I+U,u)}}if(U>0)J.stroke=B?K:X;else if(!B){var ae;J._fill=0==p.width?p._fill:null!==(ae=p._stroke)&&void 0!==ae?ae:p._fill,J.width=0}return J.fill=B?Y:X,J}))},e.spline=function(e){return function(e,t){const n=zs(t?.alignGaps,0);return(t,r,a,i)=>Ju(t,r,((o,l,s,c,u,d,h,m,p,f,v)=>{let g,y,_,b=o.pxRound,w=e=>b(d(e,c,f,m)),k=e=>b(h(e,u,v,p));0==c.ori?(g=od,_=sd,y=pd):(g=ld,_=cd,y=fd);const x=c.dir*(0==c.ori?1:-1);a=$s(s,a,i,1),i=$s(s,a,i,-1);let S=w(l[1==x?a:i]),C=S,E=[],N=[];for(let e=1==x?a:i;e>=a&&e<=i;e+=x)if(null!=s[e]){let t=w(l[e]);E.push(C=t),N.push(k(s[e]))}const A={stroke:e(E,N,g,_,y,b),fill:null,clip:null,band:null,gaps:null,flags:1},M=A.stroke;let[T,$]=Xu(t,r);if(null!=o.fill||0!=T){let e=A.fill=new Path2D(M),n=k(o.fillTo(t,r,o.min,o.max,T));_(e,C,n),_(e,S,n)}if(!o.spanGaps){let e=[];e.push(...rd(l,s,a,i,x,w,n)),A.gaps=e=o.gaps(t,r,a,i,e),A.clip=nd(e,c.ori,m,p,f,v)}return 0!=$&&(A.band=2==$?[td(t,r,a,i,M,-1),td(t,r,a,i,M,1)]:td(t,r,a,i,M,$)),A}))}(kd,e)}}const jd=e=>{let t=e.length,n=-1/0;for(;t--;){const r=e[t];Number.isFinite(r)&&r>n&&(n=r)}return Number.isFinite(n)?n:null},Hd=e=>{let t=e.length,n=1/0;for(;t--;){const r=e[t];Number.isFinite(r)&&r{let t=e.length;const n=[];for(;t--;){const r=e[t];Number.isFinite(r)&&n.push(r)}return n.sort(),n[n.length>>1]},Ud=e=>{let t=e.length;for(;t--;){const n=e[t];if(Number.isFinite(n))return n}},Bd=(e,t,n)=>{if(void 0===e||null===e)return"";n=n||0,t=t||0;const r=Math.abs(n-t);if(isNaN(r)||0==r)return Math.abs(e)>=1e3?e.toLocaleString("en-US"):e.toString();let a=3+Math.floor(1+Math.log10(Math.max(Math.abs(t),Math.abs(n)))-Math.log10(r));return(isNaN(a)||a>20)&&(a=20),e.toLocaleString("en-US",{minimumSignificantDigits:1,maximumSignificantDigits:a})},qd=e=>{const t=(null===e||void 0===e?void 0:e.metric)||{},n=Object.keys(t).filter((e=>"__name__"!=e)).map((e=>`${e}=${JSON.stringify(t[e])}`));let r=t.__name__||"";return n.length>0&&(r+="{"+n.join(",")+"}"),r},Yd=[[31536e3,"{YYYY}",null,null,null,null,null,null,1],[2419200,"{MMM}","\n{YYYY}",null,null,null,null,null,1],[86400,"{MM}-{DD}","\n{YYYY}",null,null,null,null,null,1],[3600,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[60,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[1,"{HH}:{mm}:{ss}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD} {HH}:{mm}",null,null,null,1],[.001,":{ss}.{fff}","\n{YYYY}-{MM}-{DD} {HH}:{mm}",null,"\n{MM}-{DD} {HH}:{mm}",null,"\n{HH}:{mm}",null,1]],Wd=(e,t)=>Array.from(new Set(e.map((e=>e.scale)))).map((e=>{const n="10px Arial",r=gt("color-text"),a={scale:e,show:!0,size:Qd,stroke:r,font:n,values:(e,n)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=t[0],a=t[t.length-1];return n?t.map((e=>`${Bd(e,r,a)} ${n}`)):t.map((e=>Bd(e,r,a)))}(e,n,t)};return e?Number(e)%2||"y"===e?a:{...a,side:1}:{space:80,values:Yd,stroke:r,font:n}})),Kd=(e,t)=>{if(null==e||null==t)return[-1,1];const n=.02*(Math.abs(t-e)||Math.abs(e)||1);return[e-n,t+n]},Qd=(e,t,n,r)=>{var a;const i=e.axes[n];if(r>1)return i._size||60;let o=6+((null===i||void 0===i||null===(a=i.ticks)||void 0===a?void 0:a.size)||0)+(i.gap||0);const l=(null!==t&&void 0!==t?t:[]).reduce(((e,t)=>(null===t||void 0===t?void 0:t.length)>e.length?t:e),"");return""!=l&&(o+=((e,t)=>{const n=document.createElement("span");n.innerText=e,n.style.cssText=`position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ${t}`,document.body.appendChild(n);const r=n.offsetWidth;return n.remove(),r})(l,"10px Arial")),Math.ceil(o)},Zd=["#e54040","#32a9dc","#2ee329","#7126a1","#e38f0f","#3d811a","#ffea00","#2d2d2d","#da42a6","#a44e0c"],Gd=e=>{if(7!=e.length)return"0, 0, 0";return`${parseInt(e.slice(1,3),16)}, ${parseInt(e.slice(3,5),16)}, ${parseInt(e.slice(5,7),16)}`},Jd={[ht.yhatUpper]:"#7126a1",[ht.yhatLower]:"#7126a1",[ht.yhat]:"#da42a6",[ht.anomaly]:"#da4242",[ht.anomalyScore]:"#7126a1",[ht.actual]:"#203ea9",[ht.training]:`rgba(${Gd("#203ea9")}, 0.2)`},Xd=e=>{const t=16777215;let n=1,r=0,a=1;if(e.length>0)for(let o=0;or&&(r=e[o].charCodeAt(0)),a=parseInt(String(t/r)),n=(n+e[o].charCodeAt(0)*a*49979693)%t;let i=(n*e.length%t).toString(16);return i=i.padEnd(6,i),`#${i}`},eh=((e,t,n)=>{const r=[];for(let a=0;aMath.round(e))).join(", "))}return r.map((e=>`rgb(${e})`))})([246,226,219],[127,39,4],16),th=()=>(e,t)=>{const n=Math.round(devicePixelRatio);Fd.orient(e,t,((r,a,i,o,l,s,c,u,d,h,m,p,f,v)=>{const[g,y,_]=e.data[t],b=g.length,w=((e,t)=>{const n=e.data[t][2],r=eh;let a=1/0,i=-1/0;for(let c=0;c0&&(a=Math.min(a,n[c]),i=Math.max(i,n[c]));const o=i-a,l=r.length,s=Array(n.length);for(let c=0;cnew Path2D)),S=b-y.lastIndexOf(y[0]),C=b/S,E=y[1]-y[0],N=g[S]-g[0],A=s(N,o,h,u)-s(0,o,h,u)-n,M=c(E,l,m,d)-c(0,l,m,d)+n,T=y.slice(0,S).map((e=>Math.round(c(e,l,m,d)-M/2))),$=Array.from({length:C},((e,t)=>Math.round(s(g[t*S],o,h,u)-A)));for(let e=0;e0&&g[e]>=(o.min||-1/0)&&g[e]<=(o.max||1/0)&&y[e]>=(l.min||-1/0)&&y[e]<=(l.max||1/0)){const t=$[~~(e/S)],n=T[e%S];v(x[w[e]],t,n,A,M)}e.ctx.save(),e.ctx.rect(e.bbox.left,e.bbox.top,e.bbox.width,e.bbox.height),e.ctx.clip(),x.forEach(((t,n)=>{e.ctx.fillStyle=k[n],e.ctx.fill(t)})),e.ctx.restore()}))},nh=e=>{const t=(e.metric.vmrange||e.metric.le||"").split("...");return Nl(t[t.length-1])},rh=(e,t)=>nh(e)-nh(t),ah=(e,t)=>{if(!t)return e;const n=(e=>{var t;if(!e.every((e=>e.metric.le)))return e;const n=e.sort(((e,t)=>parseFloat(e.metric.le)-parseFloat(t.metric.le))),r=(null===(t=e[0])||void 0===t?void 0:t.group)||1;let a={metric:{le:""},values:[],group:r};const i=[];for(const l of n){const e=[a.metric.le,l.metric.le].filter((e=>e)).join("..."),t=[];for(const[n,r]of l.values){var o;const e=+r-+((null===(o=a.values.find((e=>e[0]===n)))||void 0===o?void 0:o[1])||0);t.push([n,`${e}`])}i.push({metric:{vmrange:e},values:t,group:r}),a=l}return i})(e.sort(rh)),r={};n.forEach((e=>e.values.forEach((e=>{let[t,n]=e;r[t]=(r[t]||0)+ +n}))));return n.map((e=>{const t=e.values.map((e=>{let[t,n]=e;const a=r[t];return[t,`${Math.round(+n/a*100)}`]}));return{...e,values:t}})).filter((e=>!e.values.every((e=>"0"===e[1]))))},ih=e=>{const t=["__name__","for"];return Object.entries(e).filter((e=>{let[n]=e;return!t.includes(n)})).map((e=>{let[t,n]=e;return`${t}: ${n}`})).join(",")},oh=(e,t,n,r)=>{const a={},i=r?0:Math.min(e.length,Zd.length);for(let o=0;o{const l=r?(e=>{const t=(null===e||void 0===e?void 0:e.__name__)||"",n=new RegExp(`(${Object.values(ht).join("|")})$`),r=t.match(n),a=r&&r[0];return{value:/(?:^|[^a-zA-Z0-9_])y(?:$|[^a-zA-Z0-9_])/.test(t)?ht.actual:a,group:ih(e)}})(e[o].metric):null,s=r?(null===l||void 0===l?void 0:l.group)||"":El(i,n[i.group-1]);return{label:s,dash:dh(l),width:hh(l),stroke:ph({metricInfo:l,label:s,isAnomalyUI:r,colorState:a}),points:mh(l),spanGaps:!1,forecast:null===l||void 0===l?void 0:l.value,forecastGroup:null===l||void 0===l?void 0:l.group,freeFormFields:i.metric,show:!ch(s,t),scale:"1",...lh(i)}}},lh=e=>{const t=e.values.map((e=>Nl(e[1]))),{min:n,max:r,median:a,last:i}={min:Hd(t),max:jd(t),median:Vd(t),last:Ud(t)};return{median:a,statsFormatted:{min:Bd(n,n,r),max:Bd(r,n,r),median:Bd(a,n,r),last:Bd(i,n,r)}}},sh=(e,t)=>({group:t,label:e.label||"",color:e.stroke,checked:e.show||!1,freeFormFields:e.freeFormFields,statsFormatted:e.statsFormatted,median:e.median}),ch=(e,t)=>t.includes(`${e}`),uh=e=>{for(let t=e.series.length-1;t>=0;t--)t&&e.delSeries(t)},dh=e=>{const t=(null===e||void 0===e?void 0:e.value)===ht.yhatLower,n=(null===e||void 0===e?void 0:e.value)===ht.yhatUpper,r=(null===e||void 0===e?void 0:e.value)===ht.yhat;return t||n?[10,5]:r?[10,2]:[]},hh=e=>{const t=(null===e||void 0===e?void 0:e.value)===ht.yhatLower,n=(null===e||void 0===e?void 0:e.value)===ht.yhatUpper,r=(null===e||void 0===e?void 0:e.value)===ht.yhat,a=(null===e||void 0===e?void 0:e.value)===ht.anomaly;return n||t?.7:r?1:a?0:1.4},mh=e=>(null===e||void 0===e?void 0:e.value)===ht.anomaly?{size:8,width:4,space:0}:{size:4.2,width:1.4},ph=e=>{let{metricInfo:t,label:n,isAnomalyUI:r,colorState:a}=e;const i=a[n]||Xd(n),o=(null===t||void 0===t?void 0:t.value)===ht.anomaly;return r&&o?Jd[ht.anomaly]:!r||o||null!==t&&void 0!==t&&t.value?null!==t&&void 0!==t&&t.value?null!==t&&void 0!==t&&t.value?Jd[null===t||void 0===t?void 0:t.value]:i:a[n]||Xd(n):Jd[ht.actual]},fh=e=>{let{width:t=400,height:n=500}=e;return{width:t,height:n,series:[],tzDate:e=>i()(Xt(tn(e))).local().toDate(),legend:{show:!1},cursor:{drag:{x:!0,y:!1},focus:{prox:30},points:{size:5.6,width:1.4},bind:{click:()=>null,dblclick:()=>null}}}},vh=e=>{uh(e),(e=>{Object.keys(e.hooks).forEach((t=>{e.hooks[t]=[]}))})(e),e.setData([])},gh=e=>{let{min:t,max:n}=e;return[t,n]},yh=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;return a.limits.enable?a.limits.range[r]:Kd(t,n)},_h=(e,t)=>{const n={x:{range:()=>gh(t)}},r=Object.keys(e.limits.range);return(r.length?r:["1"]).forEach((t=>{n[t]={range:function(n){return yh(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,t,e)}}})),n},bh=e=>t=>{const n=t.posToVal(t.select.left,"x"),r=t.posToVal(t.select.left+t.select.width,"x");e({min:n,max:r})};function wh(e){return`rgba(${Gd(Jd[e])}, 0.05)`}const kh=e=>(e=>e instanceof MouseEvent)(e)?e.clientX:e.touches[0].clientX,xh=e=>{let{dragSpeed:t=.85,setPanning:n,setPlotScale:a}=e;const i=(0,r.useRef)({leftStart:0,xUnitsPerPx:0,scXMin:0,scXMax:0}),o=e=>{e.preventDefault();const n=kh(e),{leftStart:r,xUnitsPerPx:o,scXMin:l,scXMax:s}=i.current,c=o*((n-r)*t);a({min:l-c,max:s-c})},l=()=>{n(!1),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",l),document.removeEventListener("touchmove",o),document.removeEventListener("touchend",l)};return e=>{let{e:t,u:r}=e;t.preventDefault(),n(!0),i.current={leftStart:kh(t),xUnitsPerPx:r.posToVal(1,"x")-r.posToVal(0,"x"),scXMin:r.scales.x.min||0,scXMax:r.scales.x.max||0},document.addEventListener("mousemove",o),document.addEventListener("mouseup",l),document.addEventListener("touchmove",o),document.addEventListener("touchend",l)}},Sh=e=>{const[t,n]=(0,r.useState)(!1),a=xh({dragSpeed:.9,setPanning:n,setPlotScale:e});return{onReadyChart:t=>{const n=e=>{const n=e instanceof MouseEvent&&(e=>{const{ctrlKey:t,metaKey:n,button:r}=e;return 0===r&&(t||n)})(e),r=window.TouchEvent&&e instanceof TouchEvent&&e.touches.length>1;(n||r)&&a({u:t,e:e})};t.over.addEventListener("mousedown",n),t.over.addEventListener("touchstart",n),t.over.addEventListener("wheel",(n=>{if(!n.ctrlKey&&!n.metaKey)return;n.preventDefault();const{width:r}=t.over.getBoundingClientRect(),a=t.cursor.left&&t.cursor.left>0?t.cursor.left:0,i=t.posToVal(a,"x"),o=(t.scales.x.max||0)-(t.scales.x.min||0),l=n.deltaY<0?.9*o:o/.9,s=i-a/r*l,c=s+l;t.batch((()=>e({min:s,max:c})))}))},isPanning:t}},Ch=e=>{const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)},Eh=e=>{let{uPlotInst:t,xRange:n,setPlotScale:a}=e;const[i,o]=(0,r.useState)(0),l=(0,r.useCallback)((e=>{const{target:r,ctrlKey:i,metaKey:o,key:l}=e,s=r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement;if(!t||s)return;const c="+"===l||"="===l;if(("-"===l||c)&&!(i||o)){e.preventDefault();const t=(n.max-n.min)/10*(c?1:-1);a({min:n.min+t,max:n.max-t})}}),[t,n]),s=(0,r.useCallback)((e=>{if(!t||2!==e.touches.length)return;e.preventDefault();const r=Ch(e.touches),o=i-r,l=t.scales.x.max||n.max,s=t.scales.x.min||n.min,c=(l-s)/50*(o>0?-1:1);t.batch((()=>a({min:s+c,max:l-c})))}),[t,i,n]);return Mr("keydown",l),Mr("touchmove",s),Mr("touchstart",(e=>{2===e.touches.length&&(e.preventDefault(),o(Ch(e.touches)))})),null},Nh=e=>{let{period:t,setPeriod:n}=e;const[a,o]=(0,r.useState)({min:t.start,max:t.end});return(0,r.useEffect)((()=>{o({min:t.start,max:t.end})}),[t]),{xRange:a,setPlotScale:e=>{let{min:t,max:r}=e;const a=1e3*(r-t);ajt||n({from:i()(1e3*t).toDate(),to:i()(1e3*r).toDate()})}}},Ah=e=>{let{u:t,metrics:n,series:a,unit:o,isAnomalyView:l}=e;const[s,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)({seriesIdx:-1,dataIdx:-1}),[h,m]=(0,r.useState)([]),p=(0,r.useCallback)((()=>{const{seriesIdx:e,dataIdx:r}=u,s=n[e-1],c=a[e],d=new Set(n.map((e=>e.group))),h=(null===s||void 0===s?void 0:s.group)||0,m=ot()(t,["data",e,r],0),p=ot()(t,["scales","1","min"],0),f=ot()(t,["scales","1","max"],1),v=ot()(t,["data",0,r],0),g={top:t?t.valToPos(m||0,(null===c||void 0===c?void 0:c.scale)||"1"):0,left:t?t.valToPos(v,"x"):0};return{unit:o,point:g,u:t,id:`${e}_${r}`,title:d.size>1&&!l?`Query ${h}`:"",dates:[v?i()(1e3*v).tz().format(It):"-"],value:Bd(m,p,f),info:qd(s),statsFormatted:null===c||void 0===c?void 0:c.statsFormatted,marker:`${null===c||void 0===c?void 0:c.stroke}`}}),[t,u,n,a,o,l]),f=(0,r.useCallback)((()=>{if(!s)return;const e=p();h.find((t=>t.id===e.id))||m((t=>[...t,e]))}),[p,h,s]);return(0,r.useEffect)((()=>{c(-1!==u.dataIdx&&-1!==u.seriesIdx)}),[u]),Mr("click",f),{showTooltip:s,stickyTooltips:h,handleUnStick:e=>{m((t=>t.filter((t=>t.id!==e))))},getTooltipProps:p,seriesFocus:(e,t)=>{const n=null!==t&&void 0!==t?t:-1;d((e=>({...e,seriesIdx:n})))},setCursor:e=>{var t;const n=null!==(t=e.cursor.idx)&&void 0!==t?t:-1;d((e=>({...e,dataIdx:n})))},resetTooltips:()=>{m([]),d({seriesIdx:-1,dataIdx:-1})}}},Mh=e=>{let{u:t,id:n,title:a,dates:i,value:o,point:l,unit:s="",info:c,statsFormatted:u,isSticky:d,marker:h,onClose:m}=e;const p=(0,r.useRef)(null),[f,v]=(0,r.useState)({top:-999,left:-999}),[g,y]=(0,r.useState)(!1),[_,b]=(0,r.useState)(!1),w=(0,r.useCallback)((e=>{if(!g)return;const{clientX:t,clientY:n}=e;v({top:n,left:t})}),[g]);return(0,r.useEffect)((()=>{if(!p.current||!t)return;const{top:e,left:n}=l,r=parseFloat(t.over.style.left),a=parseFloat(t.over.style.top),{width:i,height:o}=t.over.getBoundingClientRect(),{width:s,height:c}=p.current.getBoundingClientRect(),u={top:e+a+10-(e+c>=o?c+20:0),left:n+r+10-(n+s>=i?s+20:0)};u.left<0&&(u.left=20),u.top<0&&(u.top=20),v(u)}),[t,o,l,p]),Mr("mousemove",w),Mr("mouseup",(()=>{y(!1)})),t?r.default.createPortal(Nt("div",{className:Er()({"vm-chart-tooltip":!0,"vm-chart-tooltip_sticky":d,"vm-chart-tooltip_moved":_}),ref:p,style:f,children:[Nt("div",{className:"vm-chart-tooltip-header",children:[a&&Nt("div",{className:"vm-chart-tooltip-header__title",children:a}),Nt("div",{className:"vm-chart-tooltip-header__date",children:i.map(((e,t)=>Nt("span",{children:e},t)))}),d&&Nt(Ct.FK,{children:[Nt(da,{className:"vm-chart-tooltip-header__drag",variant:"text",size:"small",startIcon:Nt(ar,{}),onMouseDown:e=>{b(!0),y(!0);const{clientX:t,clientY:n}=e;v({top:n,left:t})},ariaLabel:"drag the tooltip"}),Nt(da,{className:"vm-chart-tooltip-header__close",variant:"text",size:"small",startIcon:Nt(Ln,{}),onClick:()=>{m&&m(n)},ariaLabel:"close the tooltip"})]})]}),Nt("div",{className:"vm-chart-tooltip-data",children:[h&&Nt("span",{className:"vm-chart-tooltip-data__marker",style:{background:h}}),Nt("p",{className:"vm-chart-tooltip-data__value",children:[Nt("b",{children:o}),s]})]}),u&&Nt("table",{className:"vm-chart-tooltip-stats",children:ct.map(((e,t)=>Nt("div",{className:"vm-chart-tooltip-stats-row",children:[Nt("span",{className:"vm-chart-tooltip-stats-row__key",children:[e,":"]}),Nt("span",{className:"vm-chart-tooltip-stats-row__value",children:u[e]})]},t)))}),c&&Nt("p",{className:"vm-chart-tooltip__info",children:c})]}),t.root):null},Th=e=>{let{showTooltip:t,tooltipProps:n,stickyTooltips:a,handleUnStick:i}=e;return Nt(Ct.FK,{children:[t&&n&&Nt(Mh,{...n}),a.map((e=>(0,r.createElement)(Mh,{...e,isSticky:!0,key:e.id,onClose:i})))]})},$h=e=>{let{data:t,series:n,metrics:a=[],period:i,yaxis:o,unit:l,setPeriod:s,layoutSize:c,height:u,isAnomalyView:d,spanGaps:h=!1}=e;const{isDarkTheme:m}=Mt(),p=(0,r.useRef)(null),[f,v]=(0,r.useState)(),{xRange:g,setPlotScale:y}=Nh({period:i,setPeriod:s}),{onReadyChart:_,isPanning:b}=Sh(y);Eh({uPlotInst:f,xRange:g,setPlotScale:y});const{showTooltip:w,stickyTooltips:k,handleUnStick:x,getTooltipProps:S,seriesFocus:C,setCursor:E,resetTooltips:N}=Ah({u:f,metrics:a,series:n,unit:l,isAnomalyView:d}),A={...fh({width:c.width,height:u}),series:n,axes:Wd([{},{scale:"1"}],l),scales:_h(o,g),hooks:{ready:[_],setSeries:[C],setCursor:[E],setSelect:[bh(y)],destroy:[vh]},bands:[]};return(0,r.useEffect)((()=>{if(N(),!p.current)return;f&&f.destroy();const e=new Fd(A,t,p.current);return v(e),e.destroy}),[p,m]),(0,r.useEffect)((()=>{f&&(f.setData(t),f.redraw())}),[t]),(0,r.useEffect)((()=>{f&&(uh(f),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(((t,r)=>{t.label&&(t.spanGaps=n),r&&e.addSeries(t)}))}(f,n,h),((e,t)=>{if(e.delBand(),t.length<2)return;const n=t.map(((e,t)=>({...e,index:t}))),r=n.filter((e=>e.forecast===ht.yhatUpper)),a=n.filter((e=>e.forecast===ht.yhatLower)),i=r.map((e=>{const t=a.find((t=>t.forecastGroup===e.forecastGroup));return t?{series:[e.index,t.index],fill:wh(ht.yhatUpper)}:null})).filter((e=>null!==e));i.length&&i.forEach((t=>{e.addBand(t)}))})(f,n),f.redraw())}),[n,h]),(0,r.useEffect)((()=>{f&&(Object.keys(o.limits.range).forEach((e=>{f.scales[e]&&(f.scales[e].range=function(t){return yh(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,e,o)})})),f.redraw())}),[o]),(0,r.useEffect)((()=>{f&&(f.scales.x.range=()=>gh(g),f.redraw())}),[g]),(0,r.useEffect)((()=>{f&&(f.setSize({width:c.width||400,height:u||500}),f.redraw())}),[u,c]),Nt("div",{className:Er()({"vm-line-chart":!0,"vm-line-chart_panning":b}),style:{minWidth:`${c.width||400}px`,minHeight:`${u||500}px`},children:[Nt("div",{className:"vm-line-chart__u-plot",ref:p}),Nt(Th,{showTooltip:w,tooltipProps:S(),stickyTooltips:k,handleUnStick:x})]})},Lh=e=>{let{legend:t,onChange:n,isHeatmap:a,isAnomalyView:i}=e;const o=fl(),l=(0,r.useMemo)((()=>{const e=(e=>{const t=Object.keys(e.freeFormFields).filter((e=>"__name__"!==e));return t.map((t=>{const n=`${t}=${JSON.stringify(e.freeFormFields[t])}`;return{id:`${e.label}.${n}`,freeField:n,key:t}}))})(t);return a?e.filter((e=>"vmrange"!==e.key)):e}),[t,a]),s=t.statsFormatted,c=Object.values(s).some((e=>e)),u=e=>t=>{t.stopPropagation(),(async e=>{await o(e,`${e} has been copied`)})(e)};return Nt("div",{className:Er()({"vm-legend-item":!0,"vm-legend-row":!0,"vm-legend-item_hide":!t.checked&&!a,"vm-legend-item_static":a}),onClick:(e=>t=>{n&&n(e,t.ctrlKey||t.metaKey)})(t),children:[!i&&!a&&Nt("div",{className:"vm-legend-item__marker",style:{backgroundColor:t.color}}),Nt("div",{className:"vm-legend-item-info",children:Nt("span",{className:"vm-legend-item-info__label",children:[t.freeFormFields.__name__,!!l.length&&Nt(Ct.FK,{children:"{"}),l.map(((e,t)=>Nt("span",{className:"vm-legend-item-info__free-fields",onClick:u(e.freeField),title:"copy to clipboard",children:[e.freeField,t+1Nt("div",{className:"vm-legend-item-stats-row",children:[Nt("span",{className:"vm-legend-item-stats-row__key",children:[e,":"]}),Nt("span",{className:"vm-legend-item-stats-row__value",children:s[e]})]},t)))})]})},Ph=e=>{let{labels:t,query:n,isAnomalyView:a,onChange:i}=e;const o=(0,r.useMemo)((()=>Array.from(new Set(t.map((e=>e.group))))),[t]),l=o.length>1;return Nt(Ct.FK,{children:Nt("div",{className:"vm-legend",children:o.map((e=>Nt("div",{className:"vm-legend-group",children:Nt(ki,{defaultExpanded:!0,title:Nt("div",{className:"vm-legend-group-title",children:[l&&Nt("span",{className:"vm-legend-group-title__count",children:["Query ",e,": "]}),Nt("span",{className:"vm-legend-group-title__query",children:n[e-1]})]}),children:Nt("div",{children:t.filter((t=>t.group===e)).sort(((e,t)=>(t.median||0)-(e.median||0))).map((e=>Nt(Lh,{legend:e,isAnomalyView:a,onChange:i},e.label)))})})},e)))})})},Ih=e=>{var t;let{min:n,max:a,legendValue:i,series:o}=e;const[l,s]=(0,r.useState)(0),[c,u]=(0,r.useState)(""),[d,h]=(0,r.useState)(""),[m,p]=(0,r.useState)(""),f=(0,r.useMemo)((()=>parseFloat(String((null===i||void 0===i?void 0:i.value)||0).replace("%",""))),[i]);return(0,r.useEffect)((()=>{s(f?(f-n)/(a-n)*100:0),u(f?`${f}%`:""),h(`${n}%`),p(`${a}%`)}),[f,n,a]),Nt("div",{className:"vm-legend-heatmap__wrapper",children:[Nt("div",{className:"vm-legend-heatmap",children:[Nt("div",{className:"vm-legend-heatmap-gradient",style:{background:`linear-gradient(to right, ${eh.join(", ")})`},children:!!f&&Nt("div",{className:"vm-legend-heatmap-gradient__value",style:{left:`${l}%`},children:Nt("span",{children:c})})}),Nt("div",{className:"vm-legend-heatmap__value",children:d}),Nt("div",{className:"vm-legend-heatmap__value",children:m})]}),o[1]&&Nt(Lh,{legend:o[1],isHeatmap:!0},null===(t=o[1])||void 0===t?void 0:t.label)]})},Oh=e=>{let{u:t,metrics:n,unit:a}=e;const[o,l]=(0,r.useState)({left:0,top:0}),[s,c]=(0,r.useState)([]),u=(0,r.useCallback)((()=>{var e;const{left:r,top:l}=o,s=ot()(t,["data",1,0],[])||[],c=t?t.posToVal(r,"x"):0,u=t?t.posToVal(l,"y"):0,d=s.findIndex(((e,t)=>c>=e&&ce[0]===h))||[],v=s[d],g=i()(1e3*v).tz().format(It),y=i()(1e3*p).tz().format(It),_=(null===m||void 0===m||null===(e=m.metric)||void 0===e?void 0:e.vmrange)||"";return{unit:a,point:o,u:t,id:`${_}_${g}`,dates:[g,y],value:`${f}%`,info:_,show:+f>0}}),[t,o,n,a]),d=(0,r.useCallback)((()=>{const e=u();e.show&&(s.find((t=>t.id===e.id))||c((t=>[...t,e])))}),[u,s]);return Mr("click",d),{stickyTooltips:s,handleUnStick:e=>{c((t=>t.filter((t=>t.id!==e))))},getTooltipProps:u,setCursor:e=>{const t=e.cursor.left||0,n=e.cursor.top||0;l({left:t,top:n})},resetTooltips:()=>{c([]),l({left:0,top:0})}}},Rh=e=>{let{data:t,metrics:n=[],period:a,unit:i,setPeriod:o,layoutSize:l,height:s,onChangeLegend:c}=e;const{isDarkTheme:u}=Mt(),d=(0,r.useRef)(null),[h,m]=(0,r.useState)(),{xRange:p,setPlotScale:f}=Nh({period:a,setPeriod:o}),{onReadyChart:v,isPanning:g}=Sh(f);Eh({uPlotInst:h,xRange:p,setPlotScale:f});const{stickyTooltips:y,handleUnStick:_,getTooltipProps:b,setCursor:w,resetTooltips:k}=Oh({u:h,metrics:n,unit:i}),x=(0,r.useMemo)((()=>b()),[b]),S={...fh({width:l.width,height:s}),mode:2,series:[{},{paths:th(),facets:[{scale:"x",auto:!0,sorted:1},{scale:"y",auto:!0}]}],axes:(()=>{const e=Wd([{}],i);return[...e,{scale:"y",stroke:e[0].stroke,font:e[0].font,size:Qd,splits:n.map(((e,t)=>t)),values:n.map((e=>e.metric.vmrange))}]})(),scales:{x:{time:!0},y:{log:2,time:!1,range:(e,t,n)=>[t-1,n+1]}},hooks:{ready:[v],setCursor:[w],setSelect:[bh(f)],destroy:[vh]}};return(0,r.useEffect)((()=>{k();const e=null===t[0]&&Array.isArray(t[1]);if(!d.current||!e)return;const n=new Fd(S,t,d.current);return m(n),n.destroy}),[d,t,u]),(0,r.useEffect)((()=>{h&&(h.setSize({width:l.width||400,height:s||500}),h.redraw())}),[s,l]),(0,r.useEffect)((()=>{c(x)}),[x]),Nt("div",{className:Er()({"vm-line-chart":!0,"vm-line-chart_panning":g}),style:{minWidth:`${l.width||400}px`,minHeight:`${s||500}px`},children:[Nt("div",{className:"vm-line-chart__u-plot",ref:d}),Nt(Th,{showTooltip:!!x.show,tooltipProps:x,stickyTooltips:y,handleUnStick:_})]})},Dh=()=>{const[e,t]=(0,r.useState)(null),[n,a]=(0,r.useState)({width:0,height:0}),i=(0,r.useCallback)((()=>{a({width:(null===e||void 0===e?void 0:e.offsetWidth)||0,height:(null===e||void 0===e?void 0:e.offsetHeight)||0})}),[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]);return Mr("resize",i),(0,r.useEffect)(i,[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]),[t,n]},zh={[ht.yhat]:"yhat",[ht.yhatLower]:"yhat_upper - yhat_lower",[ht.yhatUpper]:"yhat_upper - yhat_lower",[ht.anomaly]:"anomalies",[ht.training]:"training data",[ht.actual]:"y"},Fh=e=>{let{series:t}=e;const n=(0,r.useMemo)((()=>{const e=t.reduce(((e,t)=>{const n=Object.prototype.hasOwnProperty.call(t,"forecast"),r=t.forecast!==ht.yhatUpper,a=!e.find((e=>e.forecast===t.forecast));return n&&a&&r&&e.push(t),e}),[]),n={...e[0],forecast:ht.training,color:Jd[ht.training]};return e.splice(1,0,n),e.map((e=>({...e,color:"string"===typeof e.stroke?e.stroke:Jd[e.forecast||ht.actual]})))}),[t]);return Nt(Ct.FK,{children:Nt("div",{className:"vm-legend-anomaly",children:n.filter((e=>e.forecast!==ht.training)).map(((e,t)=>{var n;return Nt("div",{className:"vm-legend-anomaly-item",children:[Nt("svg",{children:e.forecast===ht.anomaly?Nt("circle",{cx:"15",cy:"7",r:"4",fill:e.color,stroke:e.color,strokeWidth:"1.4"}):Nt("line",{x1:"0",y1:"7",x2:"30",y2:"7",stroke:e.color,strokeWidth:e.width||1,strokeDasharray:null===(n=e.dash)||void 0===n?void 0:n.join(",")})}),Nt("div",{className:"vm-legend-anomaly-item__title",children:zh[e.forecast||ht.actual]})]},`${t}_${e.forecast}`)}))})})},jh=e=>{let{data:t=[],period:n,customStep:a,query:i,yaxis:o,unit:l,showLegend:s=!0,setYaxisLimits:c,setPeriod:u,alias:d=[],fullWidth:h=!0,height:m,isHistogram:p,isAnomalyView:f,spanGaps:v}=e;const{isMobile:g}=ta(),{timezone:y}=fn(),_=(0,r.useMemo)((()=>a||n.step||"1s"),[n.step,a]),b=(0,r.useMemo)((()=>ah(t,p)),[p,t]),[w,k]=(0,r.useState)([[]]),[x,S]=(0,r.useState)([]),[C,E]=(0,r.useState)([]),[N,A]=(0,r.useState)([]),[M,T]=(0,r.useState)(null),$=(0,r.useMemo)((()=>oh(b,N,d,f)),[b,N,d,f]),L=e=>{const t=((e,t)=>{const n={},r=Object.values(e).flat(),a=Hd(r)||0,i=jd(r)||1;return n[1]=t?Kd(a,i):[a,i],n})(e,!p);c(t)},P=e=>{if(!f)return e;const t=function(e,t){const n=e.reduce(((e,n)=>{const r=t.map((e=>`${e}: ${n[e]||"-"}`)).join("|");return(e[r]=e[r]||[]).push(n),e}),{});return Object.entries(n).map((e=>{let[t,n]=e;return{keys:t.split("|"),values:n}}))}(e,["group","label"]);return t.map((e=>{const t=e.values[0];return{...t,freeFormFields:{...t.freeFormFields,__name__:""}}}))};(0,r.useEffect)((()=>{const e=[],t={},r=[],a=[{}];null===b||void 0===b||b.forEach(((n,i)=>{const o=$(n,i);a.push(o),r.push(sh(o,n.group));const l=t[n.group]||[];for(const t of n.values)e.push(t[0]),l.push(Nl(t[1]));t[n.group]=l}));const i=((e,t,n)=>{const r=Qt(t)||1,a=Array.from(new Set(e)).sort(((e,t)=>e-t));let i=n.start;const o=qt(n.end+r);let l=0;const s=[];for(;i<=o;){for(;l=a.length||a[l]>i)&&s.push(i)}for(;s.length<2;)s.push(i),i=qt(i+r);return s})(e,_,n),o=b.map((e=>{const t=[],n=e.values,r=n.length;let a=0;for(const u of i){for(;anull!==e)),l=Math.abs((e=>{let t=e[0],n=1;for(let r=1;r1e10*c&&!f?t.map((()=>l)):t}));o.unshift(i),L(t);const l=p?(e=>{const t=e.slice(1,e.length),n=[],r=[];t.forEach(((e,n)=>{e.forEach(((e,a)=>{const i=a*t.length+n;r[i]=e}))})),e[0].forEach((e=>{const r=new Array(t.length).fill(e);n.push(...r)}));const a=new Array(n.length).fill(0).map(((e,n)=>n%t.length));return[null,[n,a,r]]})(o):o;k(l),S(a);const s=P(r);E(s),f&&A(s.map((e=>e.label||"")).slice(1))}),[b,y,p]),(0,r.useEffect)((()=>{const e=[],t=[{}];null===b||void 0===b||b.forEach(((n,r)=>{const a=$(n,r);t.push(a),e.push(sh(a,n.group))})),S(t),E(P(e))}),[N]);const[I,O]=Dh();return Nt("div",{className:Er()({"vm-graph-view":!0,"vm-graph-view_full-width":h,"vm-graph-view_full-width_mobile":h&&g}),ref:I,children:[!p&&Nt($h,{data:w,series:x,metrics:b,period:n,yaxis:o,unit:l,setPeriod:u,layoutSize:O,height:m,isAnomalyView:f,spanGaps:v}),p&&Nt(Rh,{data:w,metrics:b,period:n,unit:l,setPeriod:u,layoutSize:O,height:m,onChangeLegend:T}),f&&s&&Nt(Fh,{series:x}),!p&&s&&Nt(Ph,{labels:C,query:i,isAnomalyView:f,onChange:(e,t)=>{A((e=>{let{hideSeries:t,legend:n,metaKey:r,series:a,isAnomalyView:i}=e;const{label:o}=n,l=ch(o,t),s=a.map((e=>e.label||""));return i?s.filter((e=>e!==o)):r?l?t.filter((e=>e!==o)):[...t,o]:t.length?l?[...s.filter((e=>e!==o))]:[]:[...s.filter((e=>e!==o))]})({hideSeries:N,legend:e,metaKey:t,series:x,isAnomalyView:f}))}}),p&&s&&Nt(Ih,{series:x,min:o.limits.range[1][0]||0,max:o.limits.range[1][1]||0,legendValue:M})]})},Hh=e=>{let{yaxis:t,setYaxisLimits:n,toggleEnableLimits:a}=e;const{isMobile:i}=ta(),o=(0,r.useMemo)((()=>Object.keys(t.limits.range)),[t.limits.range]),l=(0,r.useCallback)(qi()(((e,r,a)=>{const i=t.limits.range;i[r][a]=+e,i[r][0]===i[r][1]||i[r][0]>i[r][1]||n(i)}),500),[t.limits.range]),s=(e,t)=>n=>{l(n,e,t)};return Nt("div",{className:Er()({"vm-axes-limits":!0,"vm-axes-limits_mobile":i}),children:[Nt(Ti,{value:t.limits.enable,onChange:a,label:"Fix the limits for y-axis",fullWidth:i}),Nt("div",{className:"vm-axes-limits-list",children:o.map((e=>Nt("div",{className:"vm-axes-limits-list__inputs",children:[Nt(Ka,{label:`Min ${e}`,type:"number",disabled:!t.limits.enable,value:t.limits.range[e][0],onChange:s(e,0)}),Nt(Ka,{label:`Max ${e}`,type:"number",disabled:!t.limits.enable,value:t.limits.range[e][1],onChange:s(e,1)})]},e)))})]})},Vh=e=>{let{spanGaps:t,onChange:n}=e;const{isMobile:r}=ta();return Nt("div",{children:Nt(Ti,{value:t,onChange:n,label:"Connect null values",fullWidth:r})})},Uh="Graph settings",Bh=e=>{let{yaxis:t,setYaxisLimits:n,toggleEnableLimits:a,spanGaps:i}=e;const o=(0,r.useRef)(null),l=(0,r.useRef)(null),{value:s,toggle:c,setFalse:u}=ma(!1);return Nt("div",{className:"vm-graph-settings",children:[Nt(ba,{title:Uh,children:Nt("div",{ref:l,children:Nt(da,{variant:"text",startIcon:Nt($n,{}),onClick:c,ariaLabel:"settings"})})}),Nt(ha,{open:s,buttonRef:l,placement:"bottom-right",onClose:u,title:Uh,children:Nt("div",{className:"vm-graph-settings-popper",ref:o,children:Nt("div",{className:"vm-graph-settings-popper__body",children:[Nt(Hh,{yaxis:t,setYaxisLimits:n,toggleEnableLimits:a}),Nt(Vh,{spanGaps:i.value,onChange:i.onChange})]})})})]})},qh=e=>{let{isHistogram:t,graphData:n,controlsRef:a,isAnomalyView:i}=e;const{isMobile:o}=ta(),{customStep:l,yaxis:s,spanGaps:c}=Br(),{period:u}=fn(),{query:d}=Cn(),h=vn(),m=qr(),p=e=>{m({type:"SET_YAXIS_LIMITS",payload:e})},f=Nt("div",{className:"vm-custom-panel-body-header__graph-controls",children:[Nt(Ca,{}),Nt(Bh,{yaxis:s,setYaxisLimits:p,toggleEnableLimits:()=>{m({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})},spanGaps:{value:c,onChange:e=>{m({type:"SET_SPAN_GAPS",payload:e})}}})]});return Nt(Ct.FK,{children:[a.current&&(0,r.createPortal)(f,a.current),Nt(jh,{data:n,period:u,customStep:l,query:d,yaxis:s,setYaxisLimits:p,setPeriod:e=>{let{from:t,to:n}=e;h({type:"SET_PERIOD",payload:{from:t,to:n}})},height:o?.5*window.innerHeight:500,isHistogram:t,isAnomalyView:i,spanGaps:c})]})},Yh=e=>{let{data:t}=e;const n=fl(),a=(0,r.useMemo)((()=>`[\n${t.map((e=>1===Object.keys(e).length?JSON.stringify(e):JSON.stringify(e,null,2))).join(",\n").replace(/^/gm," ")}\n]`),[t]);return Nt("div",{className:"vm-json-view",children:[Nt("div",{className:"vm-json-view__copy",children:Nt(da,{variant:"outlined",onClick:async()=>{await n(a,"Formatted JSON has been copied")},children:"Copy JSON"})}),Nt("pre",{className:"vm-json-view__code",children:Nt("code",{children:a})})]})},Wh=e=>{const t={};return e.forEach((e=>Object.entries(e.metric).forEach((e=>t[e[0]]?t[e[0]].options.add(e[1]):t[e[0]]={options:new Set([e[1]])})))),Object.entries(t).map((e=>({key:e[0],variations:e[1].options.size}))).sort(((e,t)=>e.variations-t.variations))},Kh=(e,t)=>(0,r.useMemo)((()=>{if(!t)return[];return Wh(e).filter((e=>t.includes(e.key)))}),[e,t]),Qh=e=>{let{data:t,displayColumns:n}=e;const a=fl(),{isMobile:i}=ta(),{tableCompact:o}=Fr(),l=(0,r.useRef)(null),[s,c]=(0,r.useState)(""),[u,d]=(0,r.useState)("asc"),h=o?Kh([{group:0,metric:{Data:"Data"}}],["Data"]):Kh(t,n),m=e=>{const{__name__:t,...n}=e;return t||Object.keys(n).length?t?`${t} ${JSON.stringify(n)}`:`${JSON.stringify(n)}`:""},p=new Set(null===t||void 0===t?void 0:t.map((e=>e.group))).size>1,f=(0,r.useMemo)((()=>{const e=null===t||void 0===t?void 0:t.map((e=>({metadata:h.map((t=>o?El(e,"",p):e.metric[t.key]||"-")),value:e.value?e.value[1]:"-",values:e.values?e.values.map((e=>{let[t,n]=e;return`${n} @${t}`})):[],copyValue:m(e.metric)}))),n="Value"===s,r=h.findIndex((e=>e.key===s));return n||-1!==r?e.sort(((e,t)=>{const a=n?Number(e.value):e.metadata[r],i=n?Number(t.value):t.metadata[r];return("asc"===u?ai)?-1:1})):e}),[h,t,s,u,o]),v=(0,r.useMemo)((()=>f.some((e=>e.copyValue))),[f]),g=e=>()=>{(e=>{d((t=>"asc"===t&&s===e?"desc":"asc")),c(e)})(e)};return f.length?Nt("div",{className:Er()({"vm-table-view":!0,"vm-table-view_mobile":i}),children:Nt("table",{className:"vm-table",ref:l,children:[Nt("thead",{className:"vm-table-header",children:Nt("tr",{className:"vm-table__row vm-table__row_header",children:[h.map(((e,t)=>Nt("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:g(e.key),children:Nt("div",{className:"vm-table-cell__content",children:[e.key,Nt("div",{className:Er()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":s===e.key,"vm-table__sort-icon_desc":"desc"===u&&s===e.key}),children:Nt(jn,{})})]})},t))),Nt("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_right vm-table-cell_sort",onClick:g("Value"),children:Nt("div",{className:"vm-table-cell__content",children:[Nt("div",{className:Er()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":"Value"===s,"vm-table__sort-icon_desc":"desc"===u}),children:Nt(jn,{})}),"Value"]})}),v&&Nt("td",{className:"vm-table-cell vm-table-cell_header"})]})}),Nt("tbody",{className:"vm-table-body",children:f.map(((e,t)=>{return Nt("tr",{className:"vm-table__row",children:[e.metadata.map(((e,n)=>Nt("td",{className:Er()({"vm-table-cell vm-table-cell_no-wrap":!0,"vm-table-cell_gray":f[t-1]&&f[t-1].metadata[n]===e}),children:e},n))),Nt("td",{className:"vm-table-cell vm-table-cell_right vm-table-cell_no-wrap",children:e.values.length?e.values.map((e=>Nt("p",{children:e},e))):e.value}),v&&Nt("td",{className:"vm-table-cell vm-table-cell_right",children:e.copyValue&&Nt("div",{className:"vm-table-cell__content",children:Nt(ba,{title:"Copy row",children:Nt(da,{variant:"text",color:"gray",size:"small",startIcon:Nt(rr,{}),onClick:(n=e.copyValue,async()=>{await a(n,"Row has been copied")}),ariaLabel:"copy row"})})})})]},t);var n}))})]})}):Nt(ra,{variant:"warning",children:"No data to show"})},Zh=e=>{let{checked:t=!1,disabled:n=!1,label:r,color:a="secondary",onChange:i}=e;return Nt("div",{className:Er()({"vm-checkbox":!0,"vm-checkbox_disabled":n,"vm-checkbox_active":t,[`vm-checkbox_${a}_active`]:t,[`vm-checkbox_${a}`]:a}),onClick:()=>{n||i(!t)},children:[Nt("div",{className:"vm-checkbox-track",children:Nt("div",{className:"vm-checkbox-track__thumb",children:Nt(Xn,{})})}),r&&Nt("span",{className:"vm-checkbox__label",children:r})]})},Gh="Table settings",Jh=e=>{let{columns:t,selectedColumns:n=[],tableCompact:a,onChangeColumns:i,toggleTableCompact:o}=e;const l=(0,r.useRef)(null),{value:s,toggle:c,setFalse:u}=ma(!1),{value:d,toggle:h}=ma(Boolean(et("TABLE_COLUMNS"))),[m,p]=(0,r.useState)(""),[f,v]=(0,r.useState)(-1),g=(0,r.useMemo)((()=>n.filter((e=>!t.includes(e)))),[t,n]),y=(0,r.useMemo)((()=>{const e=g.concat(t);return m?e.filter((e=>e.includes(m))):e}),[t,g,m]),_=(0,r.useMemo)((()=>y.every((e=>n.includes(e)))),[n,y]),b=e=>{i(n.includes(e)?n.filter((t=>t!==e)):[...n,e])};return(0,r.useEffect)((()=>{pl(t,n)||d||i(t)}),[t]),(0,r.useEffect)((()=>{d?n.length&&Xe("TABLE_COLUMNS",n.join(",")):tt(["TABLE_COLUMNS"])}),[d,n]),(0,r.useEffect)((()=>{const e=et("TABLE_COLUMNS");e&&i(e.split(","))}),[]),Nt("div",{className:"vm-table-settings",children:[Nt(ba,{title:Gh,children:Nt("div",{ref:l,children:Nt(da,{variant:"text",startIcon:Nt($n,{}),onClick:c,ariaLabel:Gh})})}),s&&Nt(_a,{title:Gh,className:"vm-table-settings-modal",onClose:u,children:[Nt("div",{className:"vm-table-settings-modal-section",children:[Nt("div",{className:"vm-table-settings-modal-section__title",children:"Customize columns"}),Nt("div",{className:"vm-table-settings-modal-columns",children:[Nt("div",{className:"vm-table-settings-modal-columns__search",children:Nt(Ka,{placeholder:"Search columns",startIcon:Nt(xr,{}),value:m,onChange:p,onBlur:()=>{v(-1)},onKeyDown:e=>{const t="ArrowUp"===e.key,n="ArrowDown"===e.key,r="Enter"===e.key;(n||t||r)&&e.preventDefault(),n?v((e=>e+1>y.length-1?e:e+1)):t?v((e=>e-1<0?e:e-1)):r&&b(y[f])},type:"search"})}),Nt("div",{className:"vm-table-settings-modal-columns-list",children:[!!y.length&&Nt("div",{className:"vm-table-settings-modal-columns-list__item vm-table-settings-modal-columns-list__item_all",children:Nt(Zh,{checked:_,onChange:()=>{i(_?n.filter((e=>!y.includes(e))):y)},label:_?"Uncheck all":"Check all",disabled:a})}),!y.length&&Nt("div",{className:"vm-table-settings-modal-columns-no-found",children:Nt("p",{className:"vm-table-settings-modal-columns-no-found__info",children:"No columns found."})}),y.map(((e,t)=>{return Nt("div",{className:Er()({"vm-table-settings-modal-columns-list__item":!0,"vm-table-settings-modal-columns-list__item_focus":t===f,"vm-table-settings-modal-columns-list__item_custom":g.includes(e)}),children:Nt(Zh,{checked:n.includes(e),onChange:(r=e,()=>{b(r)}),label:e,disabled:a})},e);var r}))]}),Nt("div",{className:"vm-table-settings-modal-preserve",children:[Nt(Zh,{checked:d,onChange:h,label:"Preserve column settings",disabled:a,color:"primary"}),Nt("p",{className:"vm-table-settings-modal-preserve__info",children:"This label indicates that when the checkbox is activated, the current column configurations will not be reset."})]})]})]}),Nt("div",{className:"vm-table-settings-modal-section",children:[Nt("div",{className:"vm-table-settings-modal-section__title",children:"Table view"}),Nt("div",{className:"vm-table-settings-modal-columns-list__item",children:Nt(Ti,{label:"Compact view",value:a,onChange:o})})]})]})]})},Xh=e=>{let{liveData:t,controlsRef:n}=e;const{tableCompact:a}=Fr(),i=jr(),[o,l]=(0,r.useState)(),s=(0,r.useMemo)((()=>Wh(t||[]).map((e=>e.key))),[t]),c=Nt(Jh,{columns:s,selectedColumns:o,onChangeColumns:l,tableCompact:a,toggleTableCompact:()=>{i({type:"TOGGLE_TABLE_COMPACT"})}});return Nt(Ct.FK,{children:[n.current&&(0,r.createPortal)(c,n.current),Nt(Qh,{data:t,displayColumns:o})]})},em=e=>{let{graphData:t,liveData:n,isHistogram:r,displayType:a,controlsRef:i}=e;return a===mt.code&&n?Nt(Yh,{data:n}):a===mt.table&&n?Nt(Xh,{liveData:n,controlsRef:i}):a===mt.chart&&t?Nt(qh,{graphData:t,isHistogram:r,controlsRef:i}):null},tm=[Nt(Ct.FK,{children:[Nt("p",{children:"Filename - specify the name for your report file."}),Nt("p",{children:["Default format: ",Nt("code",{children:["vmui_report_$",Rt,".json"]}),"."]}),Nt("p",{children:"This name will be used when saving your report on your device."})]}),Nt(Ct.FK,{children:[Nt("p",{children:"Comment (optional) - add a comment to your report."}),Nt("p",{children:"This can be any additional information that will be useful when reviewing the report later."})]}),Nt(Ct.FK,{children:[Nt("p",{children:"Query trace - enable this option to include a query trace in your report."}),Nt("p",{children:"This will assist in analyzing and diagnosing the query processing."})]}),Nt(Ct.FK,{children:[Nt("p",{children:"Generate Report - click this button to generate and save your report. "}),Nt("p",{children:["After creation, the report can be downloaded and examined on the ",Nt(Oe,{to:We.queryAnalyzer,target:"_blank",rel:"noreferrer",className:"vm-link vm-link_underlined",children:Ye[We.queryAnalyzer].title})," page."]})]})],nm=()=>`vmui_report_${i()().utc().format(Rt)}`,rm=e=>{let{fetchUrl:t}=e;const{query:n}=Cn(),[a,i]=(0,r.useState)(nm()),[o,l]=(0,r.useState)(""),[s,c]=(0,r.useState)(!0),[u,d]=(0,r.useState)(),[h,m]=(0,r.useState)(!1),p=(0,r.useRef)(null),f=(0,r.useRef)(null),v=(0,r.useRef)(null),g=(0,r.useRef)(null),y=[p,f,v,g],[_,b]=(0,r.useState)(0),{value:w,toggle:k,setFalse:x}=ma(!1),{value:S,toggle:C,setFalse:E}=ma(!1),N=(0,r.useMemo)((()=>{if(t)return t.map(((e,t)=>{const n=new URL(e);return s?n.searchParams.set("trace","1"):n.searchParams.delete("trace"),{id:t,url:n}}))}),[t,s]),A=(0,r.useCallback)((e=>{const t=JSON.stringify(e,null,2),n=new Blob([t],{type:"application/json"}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=`${a||nm()}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r),x()}),[a]),M=(0,r.useCallback)((async()=>{if(N){d(""),m(!0);try{const e=[];for await(const{url:t,id:n}of N){const r=await fetch(t),a=await r.json();if(r.ok)a.vmui={id:n,comment:o,params:at().parse(new URL(t).search.replace(/^\?/,""))},e.push(a);else{const e=a.errorType?`${a.errorType}\r\n`:"";d(`${e}${(null===a||void 0===a?void 0:a.error)||(null===a||void 0===a?void 0:a.message)||"unknown error"}`)}}e.length&&A(e)}catch(zp){zp instanceof Error&&"AbortError"!==zp.name&&d(`${zp.name}: ${zp.message}`)}finally{m(!1)}}else d(pt.validQuery)}),[N,o,A,n]),T=e=>()=>{b((t=>t+e))};return(0,r.useEffect)((()=>{d(""),i(nm()),l("")}),[w]),(0,r.useEffect)((()=>{b(0)}),[S]),Nt(Ct.FK,{children:[Nt(ba,{title:"Export query",children:Nt(da,{variant:"text",startIcon:Nt(br,{}),onClick:k,ariaLabel:"export query"})}),w&&Nt(_a,{title:"Export query",onClose:x,isOpen:w,children:Nt("div",{className:"vm-download-report",children:[Nt("div",{className:"vm-download-report-settings",children:[Nt("div",{ref:p,children:Nt(Ka,{label:"Filename",value:a,onChange:i})}),Nt("div",{ref:f,children:Nt(Ka,{type:"textarea",label:"Comment",value:o,onChange:l})}),Nt("div",{ref:v,children:Nt(Zh,{checked:s,onChange:c,label:"Include query trace"})})]}),u&&Nt(ra,{variant:"error",children:u}),Nt("div",{className:"vm-download-report__buttons",children:[Nt(da,{variant:"text",onClick:C,children:"Help"}),Nt("div",{ref:g,children:Nt(da,{onClick:M,disabled:h,children:h?"Loading data...":"Generate Report"})})]}),Nt(ha,{open:S,buttonRef:y[_],placement:"top-left",variant:"dark",onClose:E,children:Nt("div",{className:"vm-download-report-helper",children:[Nt("div",{className:"vm-download-report-helper__description",children:tm[_]}),Nt("div",{className:"vm-download-report-helper__buttons",children:[0!==_&&Nt(da,{onClick:T(-1),size:"small",color:"white",children:"Prev"}),Nt(da,{onClick:_===y.length-1?E:T(1),size:"small",color:"white",variant:"text",children:_===y.length-1?"Close":"Next"})]})]})})]})})]})},am=()=>{Ll();const{isMobile:e}=ta(),{displayType:t}=Fr(),{query:n}=Cn(),{customStep:a}=Br(),i=qr(),[o,l]=(0,r.useState)([]),[s,c]=(0,r.useState)(!n[0]),[u,d]=(0,r.useState)(!1),h=(0,r.useRef)(null),{fetchUrl:m,isLoading:p,liveData:f,graphData:v,error:g,queryErrors:y,setQueryErrors:_,queryStats:b,warning:w,traces:k,isHistogram:x,abortFetch:S}=Tl({visible:!0,customStep:a,hideQuery:o,showAllSeries:u}),C=!(null!==f&&void 0!==f&&f.length)&&t!==mt.chart,E=!s&&g;return(0,r.useEffect)((()=>{i({type:"SET_IS_HISTOGRAM",payload:x})}),[v]),Nt("div",{className:Er()({"vm-custom-panel":!0,"vm-custom-panel_mobile":e}),children:[Nt(xl,{queryErrors:s?[]:y,setQueryErrors:_,setHideError:c,stats:b,isLoading:p,onHideQuery:e=>{l(e)},onRunQuery:()=>{c(!1)},abortFetch:S}),Nt(Vl,{traces:k,displayType:t}),E&&Nt(ra,{variant:"error",children:g}),C&&Nt(ra,{variant:"info",children:Nt(Rl,{})}),w&&Nt(Ul,{warning:w,query:n,onChange:d}),Nt("div",{className:Er()({"vm-custom-panel-body":!0,"vm-custom-panel-body_mobile":e,"vm-block":!0,"vm-block_mobile":e}),children:[p&&Nt($l,{}),Nt("div",{className:"vm-custom-panel-body-header",ref:h,children:[Nt("div",{className:"vm-custom-panel-body-header__tabs",children:Nt(Pr,{})}),(v||f)&&Nt(rm,{fetchUrl:m})]}),Nt(em,{graphData:v,liveData:f,isHistogram:x,displayType:t,controlsRef:h})]})]})},im=e=>{let{title:t,description:n,unit:a,expr:i,showLegend:o,filename:l,alias:s}=e;const{isMobile:c}=ta(),{period:u}=fn(),{customStep:d}=Br(),h=vn(),m=(0,r.useRef)(null),[p,f]=(0,r.useState)(!1),[v,g]=(0,r.useState)(!1),[y,_]=(0,r.useState)({limits:{enable:!1,range:{1:[0,0]}}}),b=(0,r.useMemo)((()=>Array.isArray(i)&&i.every((e=>e))),[i]),{isLoading:w,graphData:k,error:x,warning:S}=Tl({predefinedQuery:b?i:[],display:mt.chart,visible:p,customStep:d}),C=e=>{const t={...y};t.limits.range=e,_(t)};if((0,r.useEffect)((()=>{const e=new IntersectionObserver((e=>{e.forEach((e=>f(e.isIntersecting)))}),{threshold:.1});return m.current&&e.observe(m.current),()=>{m.current&&e.unobserve(m.current)}}),[m]),!b)return Nt(ra,{variant:"error",children:[Nt("code",{children:'"expr"'})," not found. Check the configuration file ",Nt("b",{children:l}),"."]});const E=()=>Nt("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&Nt(Ct.FK,{children:[Nt("div",{children:[Nt("span",{children:"Description:"}),Nt("div",{dangerouslySetInnerHTML:{__html:al(n)}})]}),Nt("hr",{})]}),Nt("div",{children:[Nt("span",{children:"Queries:"}),Nt("div",{children:i.map(((e,t)=>Nt("div",{children:e},`${t}_${e}`)))})]})]});return Nt("div",{className:"vm-predefined-panel",ref:m,children:[Nt("div",{className:"vm-predefined-panel-header",children:[Nt(ba,{title:Nt(E,{}),children:Nt("div",{className:"vm-predefined-panel-header__info",children:Nt(In,{})})}),Nt("h3",{className:"vm-predefined-panel-header__title",children:t||""}),Nt(Bh,{yaxis:y,setYaxisLimits:C,toggleEnableLimits:()=>{const e={...y};e.limits.enable=!e.limits.enable,_(e)},spanGaps:{value:v,onChange:g}})]}),Nt("div",{className:"vm-predefined-panel-body",children:[w&&Nt(wl,{}),x&&Nt(ra,{variant:"error",children:x}),S&&Nt(ra,{variant:"warning",children:S}),k&&Nt(jh,{data:k,period:u,customStep:d,query:i,yaxis:y,unit:a,alias:s,showLegend:o,setYaxisLimits:C,setPeriod:e=>{let{from:t,to:n}=e;h({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1,height:c?.5*window.innerHeight:500,spanGaps:v})]})]})},om=e=>{let{index:t,title:n,panels:a,filename:i}=e;const o=Tr(),l=(0,r.useMemo)((()=>o.width/12),[o]),[s,c]=(0,r.useState)(!t),[u,d]=(0,r.useState)([]);(0,r.useEffect)((()=>{d(a&&a.map((e=>e.width||12)))}),[a]);const[h,m]=(0,r.useState)({start:0,target:0,enable:!1}),p=(0,r.useCallback)((e=>{if(!h.enable)return;const{start:t}=h,n=Math.ceil((t-e.clientX)/l);if(Math.abs(n)>=12)return;const r=u.map(((e,t)=>e-(t===h.target?n:0)));d(r)}),[h,l]),f=(0,r.useCallback)((()=>{m({...h,enable:!1})}),[h]),v=e=>t=>{((e,t)=>{m({start:e.clientX,target:t,enable:!0})})(t,e)};Mr("mousemove",p),Mr("mouseup",f);return Nt("div",{className:"vm-predefined-dashboard",children:Nt(ki,{defaultExpanded:s,onChange:e=>c(e),title:Nt((()=>Nt("div",{className:Er()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":s}),children:[(n||i)&&Nt("span",{className:"vm-predefined-dashboard-header__title",children:n||`${t+1}. ${i}`}),a&&Nt("span",{className:"vm-predefined-dashboard-header__count",children:["(",a.length," panels)"]})]})),{}),children:Nt("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(a)&&a.length?a.map(((e,t)=>Nt("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:`span ${u[t]}`},children:[Nt(im,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:i,showLegend:e.showLegend}),Nt("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:v(t),"aria-label":"resize the panel"})]},t))):Nt("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:Nt(ra,{variant:"error",children:[Nt("code",{children:'"panels"'})," not found. Check the configuration file ",Nt("b",{children:i}),"."]})})})})})};function lm(e){return function(e,t){return Object.fromEntries(Object.entries(e).filter(t))}(e,(e=>!!e[1]||"number"===typeof e[1]))}const sm=()=>{(()=>{const{duration:e,relativeTime:t,period:{date:n}}=fn(),{customStep:a}=Br(),{setSearchParamsFromKeys:i}=hi(),o=()=>{const r=lm({"g0.range_input":e,"g0.end_input":n,"g0.step_input":a,"g0.relative_time":t});i(r)};(0,r.useEffect)(o,[e,t,n,a]),(0,r.useEffect)(o,[])})();const{isMobile:e}=ta(),{dashboardsSettings:t,dashboardsLoading:n,dashboardsError:a}=Qr(),[i,o]=(0,r.useState)(0),l=(0,r.useMemo)((()=>t.map(((e,t)=>({label:e.title||"",value:t})))),[t]),s=(0,r.useMemo)((()=>t[i]||{}),[t,i]),c=(0,r.useMemo)((()=>null===s||void 0===s?void 0:s.rows),[s]),u=(0,r.useMemo)((()=>s.title||s.filename||""),[s]),d=(0,r.useMemo)((()=>Array.isArray(c)&&!!c.length),[c]),h=e=>()=>{(e=>{o(e)})(e)};return Nt("div",{className:"vm-predefined-panels",children:[n&&Nt(wl,{}),!t.length&&a&&Nt(ra,{variant:"error",children:a}),!t.length&&Nt(ra,{variant:"info",children:"Dashboards not found"}),l.length>1&&Nt("div",{className:Er()({"vm-predefined-panels-tabs":!0,"vm-predefined-panels-tabs_mobile":e}),children:l.map((e=>Nt("div",{className:Er()({"vm-predefined-panels-tabs__tab":!0,"vm-predefined-panels-tabs__tab_active":e.value==i}),onClick:h(e.value),children:e.label},e.value)))}),Nt("div",{className:"vm-predefined-panels__dashboards",children:[d&&c.map(((e,t)=>Nt(om,{index:t,filename:u,title:e.title,panels:e.panels},`${i}_${t}`))),!!t.length&&!d&&Nt(ra,{variant:"error",children:[Nt("code",{children:'"rows"'})," not found. Check the configuration file ",Nt("b",{children:u}),"."]})]})]})},cm=(e,t)=>{const n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return`${e}/api/v1/status/tsdb?topN=${t.topN}&date=${t.date}${n}${r}`};class um{constructor(){this.tsdbStatus=void 0,this.tabsNames=void 0,this.isPrometheus=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"],this.isPrometheus=!1,this.getDefaultState=this.getDefaultState.bind(this)}set tsdbStatusData(e){this.isPrometheus=!(null===e||void 0===e||!e.headStats),this.tsdbStatus=e}get tsdbStatusData(){return this.tsdbStatus}get defaultTSDBStatus(){return{totalSeries:0,totalSeriesPrev:0,totalSeriesByAll:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}get isPrometheusData(){return this.isPrometheus}keys(e,t){const n=e&&/__name__=".+"/.test(e),r=e&&/{.+=".+"}/g.test(e),a=e&&/__name__=".+", .+!=""/g.test(e);let i=[];return i=t||a?i.concat("seriesCountByFocusLabelValue"):n?i.concat("labelValueCountByLabelName"):r?i.concat("seriesCountByMetricName","seriesCountByLabelName"):i.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),i}getDefaultState(e,t){return this.keys(e,t).reduce(((e,t)=>({...e,tabs:{...e.tabs,[t]:this.tabsNames},containerRefs:{...e.containerRefs,[t]:(0,r.useRef)(null)}})),{tabs:{},containerRefs:{}})}sectionsTitles(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:`Values for "${e}" label with the highest number of series`,seriesCountByLabelValuePair:"Label=value pairs with the highest number of series",labelValueCountByLabelName:"Labels with the highest number of unique values"}}get sectionsTips(){return{seriesCountByMetricName:"\n

    \n This table returns a list of metrics with the highest cardinality.\n The cardinality of a metric is the number of time series associated with that metric,\n where each time series is defined as a unique combination of key-value label pairs.\n

    \n

    \n When looking to reduce the number of active series in your data source,\n you can start by inspecting individual metrics with high cardinality\n (i.e. that have lots of active time series associated with them),\n since that single metric contributes a large fraction of the series that make up your total series count.\n

    ",seriesCountByLabelName:"\n

    \n This table returns a list of the labels with the highest number of series.\n

    \n

    \n Use this table to identify labels that are storing dimensions with high cardinality\n (many different label values).\n

    \n

    \n It is recommended to choose labels such that they have a finite set of values,\n since every unique combination of key-value label pairs creates a new time series\n and therefore can dramatically increase the number of time series in your system.\n

    ",seriesCountByFocusLabelValue:"\n

    \n This table returns a list of unique label values per selected label.\n

    \n

    \n Use this table to identify label values that are storing per each selected series.\n

    ",labelValueCountByLabelName:"\n

    \n This table returns a list of labels with the highest number of the unique values.\n

    \n ",seriesCountByLabelValuePair:"\n

    \n This table returns a list of the label values pairs with the highest number of series.\n

    \n

    \n Use this table to identify unique label values pairs. This helps to identify same labels \n is applied to count timeseries in your system, since every unique combination of key-value label pairs \n creates a new time series and therefore can dramatically increase the number of time series in your system\n

    "}}get tablesHeaders(){return{seriesCountByMetricName:dm,seriesCountByLabelName:hm,seriesCountByFocusLabelValue:mm,seriesCountByLabelValuePair:pm,labelValueCountByLabelName:fm}}totalSeries(e){return"labelValueCountByLabelName"===e?-1:arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this.tsdbStatus.totalSeriesPrev:this.tsdbStatus.totalSeries}}const dm=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Share in total",info:"Shows the share of a metric to the total number of series"},{id:"action",label:""}],hm=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Share in total",info:"Shows the share of the label to the total number of series"},{id:"action",label:""}],mm=[{id:"name",label:"Label value"},{id:"value",label:"Number of series"},{id:"percentage",label:"Share in total"},{disablePadding:!1,id:"action",label:"",numeric:!1}],pm=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Share in total",info:"Shows the share of the label value pair to the total number of series"},{id:"action",label:""}],fm=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:""}],vm=()=>{const e=new um,[t]=je(),n=t.get("match"),a=t.get("focusLabel"),o=+(t.get("topN")||10),l=t.get("date")||i()().tz().format(Lt),s=Za(l),c=(0,r.useRef)(),{serverUrl:u}=Mt(),[d,h]=(0,r.useState)(!1),[m,p]=(0,r.useState)(),[f,v]=(0,r.useState)(e.defaultTSDBStatus),[g,y]=(0,r.useState)(!1),_=async e=>{const t=await fetch(e);if(t.ok)return await t.json();throw new Error(`Request failed with status ${t.status}`)},b=async t=>{if(!u)return;p(""),h(!0),v(e.defaultTSDBStatus);const r={...t,date:t.date,topN:0,match:"",focusLabel:""},a={...t,date:i()(t.date).subtract(1,"day").format(Lt)},o=[cm(u,t),cm(u,a)];s!==l&&(t.match||t.focusLabel)&&o.push(cm(u,r));try{var d,m,g,y,b,w,k,x,S,C;const[e,t,r]=await Promise.all(o.map(_)),a={...t.data},{data:i}=r||c.current||e;c.current={data:i};const l={...e.data,totalSeries:(null===(d=e.data)||void 0===d?void 0:d.totalSeries)||(null===(m=e.data)||void 0===m||null===(g=m.headStats)||void 0===g?void 0:g.numSeries)||0,totalLabelValuePairs:(null===(y=e.data)||void 0===y?void 0:y.totalLabelValuePairs)||(null===(b=e.data)||void 0===b||null===(w=b.headStats)||void 0===w?void 0:w.numLabelValuePairs)||0,seriesCountByLabelName:(null===(k=e.data)||void 0===k?void 0:k.seriesCountByLabelName)||[],seriesCountByFocusLabelValue:(null===(x=e.data)||void 0===x?void 0:x.seriesCountByFocusLabelValue)||[],totalSeriesByAll:(null===i||void 0===i?void 0:i.totalSeries)||(null===i||void 0===i||null===(S=i.headStats)||void 0===S?void 0:S.numSeries)||f.totalSeriesByAll||0,totalSeriesPrev:(null===a||void 0===a?void 0:a.totalSeries)||(null===a||void 0===a||null===(C=a.headStats)||void 0===C?void 0:C.numSeries)||0},s=null===n||void 0===n?void 0:n.replace(/[{}"]/g,"");l.seriesCountByLabelValuePair=l.seriesCountByLabelValuePair.filter((e=>e.name!==s)),((e,t)=>{Object.keys(e).forEach((n=>{const r=n,a=e[r],i=t[r];Array.isArray(a)&&Array.isArray(i)&&a.forEach((e=>{var t;const n=null===(t=i.find((t=>t.name===e.name)))||void 0===t?void 0:t.value;e.diff=n?e.value-n:0,e.valuePrev=n||0}))}))})(l,a),v(l),h(!1)}catch(zp){h(!1),zp instanceof Error&&p(`${zp.name}: ${zp.message}`)}};return(0,r.useEffect)((()=>{b({topN:o,match:n,date:l,focusLabel:a})}),[u,n,a,o,l]),(0,r.useEffect)((()=>{m&&(v(e.defaultTSDBStatus),h(!1))}),[m]),(0,r.useEffect)((()=>{const e=Je(u);y(!!e)}),[u]),e.tsdbStatusData=f,{isLoading:d,appConfigurator:e,error:m,isCluster:g}},gm={seriesCountByMetricName:e=>{let{query:t}=e;return ym("__name__",t)},seriesCountByLabelName:e=>{let{query:t}=e;return`{${t}!=""}`},seriesCountByFocusLabelValue:e=>{let{query:t,focusLabel:n}=e;return ym(n,t)},seriesCountByLabelValuePair:e=>{let{query:t}=e;const n=t.split("="),r=n[0],a=n.slice(1).join("=");return ym(r,a)},labelValueCountByLabelName:e=>{let{query:t,match:n}=e;return""===n?`{${t}!=""}`:`${n.replace("}","")}, ${t}!=""}`}},ym=(e,t)=>e?"{"+e+"="+JSON.stringify(t)+"}":"",_m=e=>{var t;let{totalSeries:n=0,totalSeriesPrev:r=0,totalSeriesAll:a=0,seriesCountByMetricName:i=[],isPrometheus:o}=e;const{isMobile:l}=ta(),[s]=je(),c=s.get("match"),u=s.get("focusLabel"),d=/__name__/.test(c||""),h=(null===(t=i[0])||void 0===t?void 0:t.value)/a*100,m=n-r,p=Math.abs(m)/r*100,f=[{title:"Total series",value:n.toLocaleString("en-US"),dynamic:n&&r&&!o?`${p.toFixed(2)}%`:"",display:!u,info:'The total number of unique time series for a selected day.\n A time series is uniquely identified by its name plus a set of its labels. \n For example, temperature{city="NY",country="US"} and temperature{city="SF",country="US"} \n are two distinct series, since they differ by the "city" label.'},{title:"Percentage from total",value:isNaN(h)?"-":`${h.toFixed(2)}%`,display:d,info:"The share of these series in the total number of time series."}].filter((e=>e.display));return f.length?Nt("div",{className:Er()({"vm-cardinality-totals":!0,"vm-cardinality-totals_mobile":l}),children:f.map((e=>{let{title:t,value:n,info:a,dynamic:i}=e;return Nt("div",{className:"vm-cardinality-totals-card",children:[Nt("h4",{className:"vm-cardinality-totals-card__title",children:[t,a&&Nt(ba,{title:Nt("p",{className:"vm-cardinality-totals-card__tooltip",children:a}),children:Nt("div",{className:"vm-cardinality-totals-card__info-icon",children:Nt(In,{})})})]}),Nt("span",{className:"vm-cardinality-totals-card__value",children:n}),!!i&&Nt(ba,{title:`in relation to the previous day: ${r.toLocaleString("en-US")}`,children:Nt("span",{className:Er()({"vm-dynamic-number":!0,"vm-dynamic-number_positive vm-dynamic-number_down":m<0,"vm-dynamic-number_negative vm-dynamic-number_up":m>0}),children:i})})]},t)}))}):null},bm=(e,t)=>{const[n]=je(),a=n.get(t)?n.get(t):e,[i,o]=(0,r.useState)(a);return(0,r.useEffect)((()=>{a!==i&&o(a)}),[a]),[i,o]},wm=e=>{let{isPrometheus:t,isCluster:n,...a}=e;const{isMobile:i}=ta(),[o]=je(),{setSearchParamsFromKeys:l}=hi(),s=o.get("tips")||"",[c,u]=bm("","match"),[d,h]=bm("","focusLabel"),[m,p]=bm(10,"topN"),f=(0,r.useMemo)((()=>m<0?"Number must be bigger than zero":""),[m]),v=()=>{l({match:c,topN:m,focusLabel:d})};return(0,r.useEffect)((()=>{const e=o.get("match"),t=+(o.get("topN")||10),n=o.get("focusLabel");e!==c&&u(e||""),t!==m&&p(t),n!==d&&h(n||"")}),[o]),Nt("div",{className:Er()({"vm-cardinality-configurator":!0,"vm-cardinality-configurator_mobile":i,"vm-block":!0,"vm-block_mobile":i}),children:[Nt("div",{className:"vm-cardinality-configurator-controls",children:[Nt("div",{className:"vm-cardinality-configurator-controls__query",children:Nt(Ka,{label:"Time series selector",type:"string",value:c,onChange:u,onEnter:v})}),Nt("div",{className:"vm-cardinality-configurator-controls__item",children:Nt(Ka,{label:"Focus label",type:"text",value:d||"",onChange:h,onEnter:v,endIcon:Nt(ba,{title:Nt("div",{children:Nt("p",{children:"To identify values with the highest number of series for the selected label."})}),children:Nt(sr,{})})})}),Nt("div",{className:"vm-cardinality-configurator-controls__item vm-cardinality-configurator-controls__item_limit",children:Nt(Ka,{label:"Limit entries",type:"number",value:t?10:m,error:f,disabled:t,helperText:t?"not available for Prometheus":"",onChange:e=>{const t=+e;p(isNaN(t)?0:t)},onEnter:v})})]}),Nt("div",{className:"vm-cardinality-configurator-bottom",children:[Nt(_m,{isPrometheus:t,isCluster:n,...a}),n&&Nt("div",{className:"vm-cardinality-configurator-bottom-helpful",children:Nt(Pl,{href:"https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#cardinality-explorer-statistic-inaccuracy",withIcon:!0,children:[Nt(or,{}),"Statistic inaccuracy explanation"]})}),Nt("div",{className:"vm-cardinality-configurator-bottom-helpful",children:Nt(Pl,{href:"https://docs.victoriametrics.com/#cardinality-explorer",withIcon:!0,children:[Nt(or,{}),"Documentation"]})}),Nt("div",{className:"vm-cardinality-configurator-bottom__execute",children:[Nt(ba,{title:s?"Hide tips":"Show tips",children:Nt(da,{variant:"text",color:s?"warning":"gray",startIcon:Nt(hr,{}),onClick:()=>{const e=o.get("tips")||"";l({tips:e?"":"true"})},ariaLabel:"visibility tips"})}),Nt(da,{variant:"text",startIcon:Nt(Pn,{}),onClick:()=>{l({match:"",focusLabel:""})},children:"Reset"}),Nt(da,{startIcon:Nt(qn,{}),onClick:v,children:"Execute Query"})]})]})]})};function km(e){const{order:t,orderBy:n,onRequestSort:r,headerCells:a}=e;return Nt("thead",{className:"vm-table-header vm-cardinality-panel-table__header",children:Nt("tr",{className:"vm-table__row vm-table__row_header",children:a.map((e=>{return Nt("th",{className:Er()({"vm-table-cell vm-table-cell_header":!0,"vm-table-cell_sort":"action"!==e.id&&"percentage"!==e.id,"vm-table-cell_right":"action"===e.id}),onClick:(a=e.id,e=>{r(e,a)}),children:Nt("div",{className:"vm-table-cell__content",children:[e.info?Nt(ba,{title:e.info,children:[Nt("div",{className:"vm-metrics-content-header__tip-icon",children:Nt(In,{})}),e.label]}):Nt(Ct.FK,{children:e.label}),"action"!==e.id&&"percentage"!==e.id&&Nt("div",{className:Er()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:Nt(jn,{})})]})},e.id);var a}))})})}const xm=["date","timestamp","time"];function Sm(e,t,n){const r=e[n],a=t[n],o=xm.includes(`${n}`)?i()(`${r}`).unix():r,l=xm.includes(`${n}`)?i()(`${a}`).unix():a;return lo?1:0}function Cm(e,t){return"desc"===e?(e,n)=>Sm(e,n,t):(e,n)=>-Sm(e,n,t)}function Em(e,t){const n=e.map(((e,t)=>[e,t]));return n.sort(((e,n)=>{const r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((e=>e[0]))}const Nm=e=>{let{rows:t,headerCells:n,defaultSortColumn:a,tableCells:i}=e;const[o,l]=(0,r.useState)("desc"),[s,c]=(0,r.useState)(a),u=Em(t,Cm(o,s));return Nt("table",{className:"vm-table vm-cardinality-panel-table",children:[Nt(km,{order:o,orderBy:s,onRequestSort:(e,t)=>{l(s===t&&"asc"===o?"desc":"asc"),c(t)},rowCount:t.length,headerCells:n}),Nt("tbody",{className:"vm-table-header",children:u.map((e=>Nt("tr",{className:"vm-table__row",children:i(e)},e.name)))})]})},Am=e=>{let{row:t,totalSeries:n,totalSeriesPrev:r,onActionClick:a}=e;const i=n>0?t.value/n*100:-1,o=r>0?t.valuePrev/r*100:-1,l=[i,o].some((e=>-1===e)),s=i-o,c=l?"":`${s.toFixed(2)}%`,u=()=>{a(t.name)};return Nt(Ct.FK,{children:[Nt("td",{className:"vm-table-cell",children:Nt("span",{className:"vm-link vm-link_colored",onClick:u,children:t.name})},t.name),Nt("td",{className:"vm-table-cell",children:[t.value,!!t.diff&&Nt(ba,{title:`in relation to the previous day: ${t.valuePrev}`,children:Nt("span",{className:Er()({"vm-dynamic-number":!0,"vm-dynamic-number_positive":t.diff<0,"vm-dynamic-number_negative":t.diff>0}),children:["\xa0",t.diff>0?"+":"",t.diff]})})]},t.value),i>0&&Nt("td",{className:"vm-table-cell",children:Nt("div",{className:"vm-cardinality-panel-table__progress",children:[Nt(Dl,{value:i}),c&&Nt(ba,{title:"in relation to the previous day",children:Nt("span",{className:Er()({"vm-dynamic-number":!0,"vm-dynamic-number_positive vm-dynamic-number_down":s<0,"vm-dynamic-number_negative vm-dynamic-number_up":s>0}),children:c})})]})},t.progressValue),Nt("td",{className:"vm-table-cell vm-table-cell_right",children:Nt("div",{className:"vm-table-cell__content",children:Nt(ba,{title:`Filter by ${t.name}`,children:Nt(da,{variant:"text",size:"small",onClick:u,children:Nt(Yn,{})})})})},"action")]})},Mm=e=>{let{data:t}=e;const[n,a]=(0,r.useState)([]),[i,o]=(0,r.useState)([0,0]);return(0,r.useEffect)((()=>{const e=t.sort(((e,t)=>t.value-e.value)),n=(e=>{const t=e.map((e=>e.value)),n=Math.ceil(t[0]||1),r=n/9;return new Array(11).fill(n+r).map(((e,t)=>Math.round(e-r*t)))})(e);o(n),a(e.map((e=>({...e,percentage:e.value/n[0]*100}))))}),[t]),Nt("div",{className:"vm-simple-bar-chart",children:[Nt("div",{className:"vm-simple-bar-chart-y-axis",children:i.map((e=>Nt("div",{className:"vm-simple-bar-chart-y-axis__tick",children:e},e)))}),Nt("div",{className:"vm-simple-bar-chart-data",children:n.map((e=>{let{name:t,value:n,percentage:r}=e;return Nt(ba,{title:`${t}: ${n}`,placement:"top-center",children:Nt("div",{className:"vm-simple-bar-chart-data-item",style:{maxHeight:`${r||0}%`}})},`${t}_${n}`)}))})]})},Tm=e=>{let{rows:t,tabs:n=[],chartContainer:a,totalSeries:i,totalSeriesPrev:o,onActionClick:l,sectionTitle:s,tip:c,tableHeaderCells:u,isPrometheus:d}=e;const{isMobile:h}=ta(),[m,p]=(0,r.useState)("table"),f=d&&!t.length,v=(0,r.useMemo)((()=>n.map(((e,t)=>({value:e,label:e,icon:Nt(0===t?Kn:Wn,{})})))),[n]);return Nt("div",{className:Er()({"vm-metrics-content":!0,"vm-metrics-content_mobile":h,"vm-block":!0,"vm-block_mobile":h}),children:[Nt("div",{className:"vm-metrics-content-header vm-section-header",children:[Nt("h5",{className:Er()({"vm-metrics-content-header__title":!0,"vm-section-header__title":!0,"vm-section-header__title_mobile":h}),children:[!h&&c&&Nt(ba,{title:Nt("p",{dangerouslySetInnerHTML:{__html:c},className:"vm-metrics-content-header__tip"}),children:Nt("div",{className:"vm-metrics-content-header__tip-icon",children:Nt(In,{})})}),s]}),Nt("div",{className:"vm-section-header__tabs",children:Nt($r,{activeItem:m,items:v,onChange:p})})]}),f&&Nt("div",{className:"vm-metrics-content-prom-data",children:[Nt("div",{className:"vm-metrics-content-prom-data__icon",children:Nt(In,{})}),Nt("h3",{className:"vm-metrics-content-prom-data__title",children:"Prometheus Data Limitation"}),Nt("p",{className:"vm-metrics-content-prom-data__text",children:["Due to missing data from your Prometheus source, some tables may appear empty.",Nt("br",{}),"This does not indicate an issue with your system or our tool."]})]}),!f&&"table"===m&&Nt("div",{ref:a,className:Er()({"vm-metrics-content__table":!0,"vm-metrics-content__table_mobile":h}),children:Nt(Nm,{rows:t,headerCells:u,defaultSortColumn:"value",tableCells:e=>Nt(Am,{row:e,totalSeries:i,totalSeriesPrev:o,onActionClick:l})})}),!f&&"graph"===m&&Nt("div",{className:"vm-metrics-content__chart",children:Nt(Mm,{data:t.map((e=>{let{name:t,value:n}=e;return{name:t,value:n}}))})})]})},$m=e=>{let{title:t,children:n}=e;return Nt("div",{className:"vm-cardinality-tip",children:[Nt("div",{className:"vm-cardinality-tip-header",children:[Nt("div",{className:"vm-cardinality-tip-header__tip-icon",children:Nt(hr,{})}),Nt("h4",{className:"vm-cardinality-tip-header__title",children:t||"Tips"})]}),Nt("p",{className:"vm-cardinality-tip__description",children:n})]})},Lm=()=>Nt($m,{title:"Metrics with a high number of series",children:Nt("ul",{children:[Nt("li",{children:["Identify and eliminate labels with frequently changed values to reduce their\xa0",Nt(Pl,{href:"https://docs.victoriametrics.com/FAQ.html#what-is-high-cardinality",children:"cardinality"}),"\xa0and\xa0",Nt(Pl,{href:"https://docs.victoriametrics.com/FAQ.html#what-is-high-churn-rate",children:"high churn rate"})]}),Nt("li",{children:["Find unused time series and\xa0",Nt(Pl,{href:"https://docs.victoriametrics.com/relabeling.html",children:"drop entire metrics"})]}),Nt("li",{children:["Aggregate time series before they got ingested into the database via\xa0",Nt(Pl,{href:"https://docs.victoriametrics.com/stream-aggregation.html",children:"streaming aggregation"})]})]})}),Pm=()=>Nt($m,{title:"Labels with a high number of unique values",children:Nt("ul",{children:[Nt("li",{children:"Decrease the number of unique label values to reduce cardinality"}),Nt("li",{children:["Drop the label entirely via\xa0",Nt(Pl,{href:"https://docs.victoriametrics.com/relabeling.html",children:"relabeling"})]}),Nt("li",{children:"For volatile label values (such as URL path, user session, etc.) consider printing them to the log file instead of adding to time series"})]})}),Im=()=>Nt($m,{title:"Dashboard of a single metric",children:[Nt("p",{children:"This dashboard helps to understand the cardinality of a single metric."}),Nt("p",{children:"Each time series is a unique combination of key-value label pairs. Therefore a label key with many values can create a lot of time series for a particular metric. If you\u2019re trying to decrease the cardinality of a metric, start by looking at the labels with the highest number of values."}),Nt("p",{children:"Use the series selector at the top of the page to apply additional filters."})]}),Om=()=>Nt($m,{title:"Dashboard of a label",children:[Nt("p",{children:"This dashboard helps you understand the count of time series per label."}),Nt("p",{children:"Use the selector at the top of the page to pick a label name you\u2019d like to inspect. For the selected label name, you\u2019ll see the label values that have the highest number of series associated with them. So if you\u2019ve chosen `instance` as your label name, you may see that `657` time series have value \u201chost-1\u201d attached to them and `580` time series have value `host-2` attached to them."}),Nt("p",{children:"This can be helpful in allowing you to determine where the bulk of your time series are coming from. If the label \u201cinstance=host-1\u201d was applied to 657 series and the label \u201cinstance=host-2\u201d was only applied to 580 series, you\u2019d know, for example, that host-01 was responsible for sending the majority of the time series."})]}),Rm=()=>{const{isMobile:e}=ta(),[t]=je(),{setSearchParamsFromKeys:n}=hi(),r=t.get("tips")||"",a=t.get("match")||"",i=t.get("focusLabel")||"",{isLoading:o,appConfigurator:l,error:s,isCluster:c}=vm(),{tsdbStatusData:u,getDefaultState:d,tablesHeaders:h,sectionsTips:m}=l,p=d(a,i);return Nt("div",{className:Er()({"vm-cardinality-panel":!0,"vm-cardinality-panel_mobile":e}),children:[o&&Nt(wl,{message:"Please wait while cardinality stats is calculated. \n This may take some time if the db contains big number of time series."}),Nt(wm,{isPrometheus:l.isPrometheusData,totalSeries:u.totalSeries,totalSeriesPrev:u.totalSeriesPrev,totalSeriesAll:u.totalSeriesByAll,totalLabelValuePairs:u.totalLabelValuePairs,seriesCountByMetricName:u.seriesCountByMetricName,isCluster:c}),r&&Nt("div",{className:"vm-cardinality-panel-tips",children:[!a&&!i&&Nt(Lm,{}),a&&!i&&Nt(Im,{}),!a&&!i&&Nt(Pm,{}),i&&Nt(Om,{})]}),s&&Nt(ra,{variant:"error",children:s}),l.keys(a,i).map((e=>{return Nt(Tm,{sectionTitle:l.sectionsTitles(i)[e],tip:m[e],rows:u[e],onActionClick:(t=e,e=>{const r={match:gm[t]({query:e,focusLabel:i,match:a})};"labelValueCountByLabelName"!==t&&"seriesCountByLabelName"!=t||(r.focusLabel=e),"seriesCountByFocusLabelValue"==t&&(r.focusLabel=""),n(r)}),tabs:p.tabs[e],chartContainer:p.containerRefs[e],totalSeriesPrev:l.totalSeries(e,!0),totalSeries:l.totalSeries(e),tableHeaderCells:h[e],isPrometheus:l.isPrometheusData},e);var t}))]})},Dm=e=>(["topByAvgDuration","topByCount","topBySumDuration"].forEach((t=>{const n=e[t];Array.isArray(n)&&n.forEach((e=>{const t=en(1e3*e.timeRangeSeconds);e.url=((e,t)=>{var n;const{query:r,timeRangeSeconds:a}=e,i=[`g0.expr=${encodeURIComponent(r)}`],o=null===(n=rn.find((e=>e.duration===t)))||void 0===n?void 0:n.id;return o&&i.push(`g0.relative_time=${o}`),a&&i.push(`g0.range_input=${t}`),`${We.home}?${i.join("&")}`})(e,t),e.timeRange=t}))})),e),zm=e=>{let{topN:t,maxLifetime:n}=e;const{serverUrl:a}=Mt(),{setSearchParamsFromKeys:i}=hi(),[o,l]=(0,r.useState)(null),[s,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(),h=(0,r.useMemo)((()=>((e,t,n)=>`${e}/api/v1/status/top_queries?topN=${t||""}&maxLifetime=${n||""}`)(a,t,n)),[a,t,n]);return{data:o,error:u,loading:s,fetch:async()=>{c(!0),i({topN:t,maxLifetime:n});try{const e=await fetch(h),t=await e.json();l(e.ok?Dm(t):null),d(String(t.error||""))}catch(zp){zp instanceof Error&&"AbortError"!==zp.name&&d(`${zp.name}: ${zp.message}`)}c(!1)}}},Fm=e=>{let{rows:t,columns:n,defaultOrderBy:a}=e;const i=fl(),[o,l]=(0,r.useState)(a||"count"),[s,c]=(0,r.useState)("desc"),u=(0,r.useMemo)((()=>Em(t,Cm(s,o))),[t,o,s]),d=e=>()=>{var t;t=e,c((e=>"asc"===e&&o===t?"desc":"asc")),l(t)},h=e=>{let{query:t}=e;return async()=>{await i(t,"Query has been copied")}};return Nt("table",{className:"vm-table",children:[Nt("thead",{className:"vm-table-header",children:Nt("tr",{className:"vm-table__row vm-table__row_header",children:[n.map((e=>Nt("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:d(e.sortBy||e.key),children:Nt("div",{className:"vm-table-cell__content",children:[e.title||e.key,Nt("div",{className:Er()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":o===e.key,"vm-table__sort-icon_desc":"desc"===s&&o===e.key}),children:Nt(jn,{})})]})},e.key))),Nt("th",{className:"vm-table-cell vm-table-cell_header"})," "]})}),Nt("tbody",{className:"vm-table-body",children:u.map(((e,t)=>Nt("tr",{className:"vm-table__row",children:[n.map((t=>Nt("td",{className:"vm-table-cell",children:e[t.key]||"-"},t.key))),Nt("td",{className:"vm-table-cell vm-table-cell_no-padding",children:Nt("div",{className:"vm-top-queries-panels__table-actions",children:[e.url&&Nt(ba,{title:"Execute query",children:Nt(Oe,{to:e.url,target:"_blank",rel:"noreferrer","aria-disabled":!0,children:Nt(da,{variant:"text",size:"small",startIcon:Nt(Yn,{}),ariaLabel:"execute query"})})}),Nt(ba,{title:"Copy query",children:Nt(da,{variant:"text",size:"small",startIcon:Nt(rr,{}),onClick:h(e),ariaLabel:"copy query"})})]})})]},t)))})]})},jm=["table","JSON"].map(((e,t)=>({value:String(t),label:e,icon:Nt(0===t?Kn:Qn,{})}))),Hm=e=>{let{rows:t,title:n,columns:a,defaultOrderBy:i}=e;const{isMobile:o}=ta(),[l,s]=(0,r.useState)(0);return Nt("div",{className:Er()({"vm-top-queries-panel":!0,"vm-block":!0,"vm-block_mobile":o}),children:[Nt("div",{className:Er()({"vm-top-queries-panel-header":!0,"vm-section-header":!0,"vm-top-queries-panel-header_mobile":o}),children:[Nt("h5",{className:Er()({"vm-section-header__title":!0,"vm-section-header__title_mobile":o}),children:n}),Nt("div",{className:"vm-section-header__tabs",children:Nt($r,{activeItem:String(l),items:jm,onChange:e=>{s(+e)}})})]}),Nt("div",{className:Er()({"vm-top-queries-panel__table":!0,"vm-top-queries-panel__table_mobile":o}),children:[0===l&&Nt(Fm,{rows:t,columns:a,defaultOrderBy:i}),1===l&&Nt(Yh,{data:t})]})]})},Vm=()=>{const{isMobile:e}=ta(),[t,n]=bm(10,"topN"),[a,o]=bm("10m","maxLifetime"),{data:l,error:s,loading:c,fetch:u}=zm({topN:t,maxLifetime:a}),d=(0,r.useMemo)((()=>{const e=a.trim().split(" ").reduce(((e,t)=>{const n=Kt(t);return n?{...e,...n}:{...e}}),{});return!!i().duration(e).asMilliseconds()}),[a]),h=(0,r.useMemo)((()=>!!t&&t<1),[t]),m=(0,r.useMemo)((()=>h?"Number must be bigger than zero":""),[h]),p=(0,r.useMemo)((()=>d?"":"Invalid duration value"),[d]),f=e=>{if(!l)return e;const t=l[e];return"number"===typeof t?Bd(t,t,t):t||e},v=e=>{"Enter"===e.key&&u()};return(0,r.useEffect)((()=>{l&&(t||n(+l.topN),a||o(l.maxLifetime))}),[l]),(0,r.useEffect)((()=>(u(),window.addEventListener("popstate",u),()=>{window.removeEventListener("popstate",u)})),[]),Nt("div",{className:Er()({"vm-top-queries":!0,"vm-top-queries_mobile":e}),children:[c&&Nt(wl,{containerStyles:{height:"500px"}}),Nt("div",{className:Er()({"vm-top-queries-controls":!0,"vm-block":!0,"vm-block_mobile":e}),children:[Nt("div",{className:"vm-top-queries-controls-fields",children:[Nt("div",{className:"vm-top-queries-controls-fields__item",children:Nt(Ka,{label:"Max lifetime",value:a,error:p,helperText:"For example 30ms, 15s, 3d4h, 1y2w",onChange:e=>{o(e)},onKeyDown:v})}),Nt("div",{className:"vm-top-queries-controls-fields__item",children:Nt(Ka,{label:"Number of returned queries",type:"number",value:t||"",error:m,onChange:e=>{n(+e)},onKeyDown:v})})]}),Nt("div",{className:Er()({"vm-top-queries-controls-bottom":!0,"vm-top-queries-controls-bottom_mobile":e}),children:[Nt("div",{className:"vm-top-queries-controls-bottom__info",children:["VictoriaMetrics tracks the last\xa0",Nt(ba,{title:"search.queryStats.lastQueriesCount",children:Nt("b",{children:f("search.queryStats.lastQueriesCount")})}),"\xa0queries with durations at least\xa0",Nt(ba,{title:"search.queryStats.minQueryDuration",children:Nt("b",{children:f("search.queryStats.minQueryDuration")})})]}),Nt("div",{className:"vm-top-queries-controls-bottom__button",children:Nt(da,{startIcon:Nt(qn,{}),onClick:u,children:"Execute"})})]})]}),s&&Nt(ra,{variant:"error",children:s}),l&&Nt(Ct.FK,{children:Nt("div",{className:"vm-top-queries-panels",children:[Nt(Hm,{rows:l.topBySumDuration,title:"Queries with most summary time to execute",columns:[{key:"query"},{key:"sumDurationSeconds",title:"sum duration, sec"},{key:"timeRange",sortBy:"timeRangeSeconds",title:"query time interval"},{key:"count"}],defaultOrderBy:"sumDurationSeconds"}),Nt(Hm,{rows:l.topByAvgDuration,title:"Most heavy queries",columns:[{key:"query"},{key:"avgDurationSeconds",title:"avg duration, sec"},{key:"timeRange",sortBy:"timeRangeSeconds",title:"query time interval"},{key:"count"}],defaultOrderBy:"avgDurationSeconds"}),Nt(Hm,{rows:l.topByCount,title:"Most frequently executed queries",columns:[{key:"query"},{key:"timeRange",sortBy:"timeRangeSeconds",title:"query time interval"},{key:"count"}]})]})})]})},Um={"color-primary":"#589DF6","color-secondary":"#316eca","color-error":"#e5534b","color-warning":"#c69026","color-info":"#539bf5","color-success":"#57ab5a","color-background-body":"#22272e","color-background-block":"#2d333b","color-background-tooltip":"rgba(22, 22, 22, 0.8)","color-text":"#cdd9e5","color-text-secondary":"#768390","color-text-disabled":"#636e7b","box-shadow":"rgba(0, 0, 0, 0.16) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.2) 0px 2px 8px 0px","border-divider":"1px solid rgba(99, 110, 123, 0.5)","color-hover-black":"rgba(0, 0, 0, 0.12)","color-log-hits-bar-0":"rgba(255, 255, 255, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},Bm={"color-primary":"#3F51B5","color-secondary":"#E91E63","color-error":"#FD080E","color-warning":"#FF8308","color-info":"#03A9F4","color-success":"#4CAF50","color-background-body":"#FEFEFF","color-background-block":"#FFFFFF","color-background-tooltip":"rgba(80,80,80,0.9)","color-text":"#110f0f","color-text-secondary":"#706F6F","color-text-disabled":"#A09F9F","box-shadow":"rgba(0, 0, 0, 0.08) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.1) 0px 2px 8px 0px","border-divider":"1px solid rgba(0, 0, 0, 0.15)","color-hover-black":"rgba(0, 0, 0, 0.06)","color-log-hits-bar-0":"rgba(0, 0, 0, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},qm=()=>{const[e,t]=(0,r.useState)(_t()),n=e=>{t(e.matches)};return(0,r.useEffect)((()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");return e.addEventListener("change",n),()=>e.removeEventListener("change",n)}),[]),e},Ym=["primary","secondary","error","warning","info","success"],Wm=e=>{let{onLoaded:t}=e;const n=Qe(),{palette:a={}}=Ke(),{theme:i}=Mt(),o=qm(),l=Tt(),s=Tr(),[c,u]=(0,r.useState)({[ft.dark]:Um,[ft.light]:Bm,[ft.system]:_t()?Um:Bm}),d=()=>{const{innerWidth:e,innerHeight:t}=window,{clientWidth:n,clientHeight:r}=document.documentElement;yt("scrollbar-width",e-n+"px"),yt("scrollbar-height",t-r+"px"),yt("vh",.01*t+"px")},h=()=>{Ym.forEach(((e,n)=>{const r=(e=>{let t=e.replace("#","").trim();if(3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length)throw new Error("Invalid HEX color.");return(299*parseInt(t.slice(0,2),16)+587*parseInt(t.slice(2,4),16)+114*parseInt(t.slice(4,6),16))/1e3>=128?"#000000":"#FFFFFF"})(gt(`color-${e}`));yt(`${e}-text`,r),n===Ym.length-1&&(l({type:"SET_DARK_THEME"}),t(!0))}))},m=()=>{const e=et("THEME")||ft.system,t=c[e];Object.entries(t).forEach((e=>{let[t,n]=e;yt(t,n)})),h(),n&&(Ym.forEach((e=>{const t=a[e];t&&yt(`color-${e}`,t)})),h())};return(0,r.useEffect)((()=>{d(),m()}),[c]),(0,r.useEffect)(d,[s]),(0,r.useEffect)((()=>{const e=_t()?Um:Bm;c[ft.system]!==e?u((t=>({...t,[ft.system]:e}))):m()}),[i,o]),(0,r.useEffect)((()=>{n&&l({type:"SET_THEME",payload:ft.light})}),[]),null},Km=()=>{const[e,t]=(0,r.useState)([]),[n,a]=(0,r.useState)(!1),i=(0,r.useRef)(document.body),o=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?a(!0):"dragleave"===e.type&&a(!1)};return Mr("dragenter",o,i),Mr("dragleave",o,i),Mr("dragover",o,i),Mr("drop",(e=>{var n;e.preventDefault(),e.stopPropagation(),a(!1),null!==e&&void 0!==e&&null!==(n=e.dataTransfer)&&void 0!==n&&n.files&&e.dataTransfer.files[0]&&(e=>{const n=Array.from(e||[]);t(n)})(e.dataTransfer.files)}),i),Mr("paste",(e=>{var n;const r=null===(n=e.clipboardData)||void 0===n?void 0:n.items;if(!r)return;const a=Array.from(r).filter((e=>"application/json"===e.type)).map((e=>e.getAsFile())).filter((e=>null!==e));t(a)}),i),{files:e,dragging:n}},Qm=e=>{let{onOpenModal:t,onChange:n}=e;return Nt("div",{className:"vm-upload-json-buttons",children:[Nt(da,{variant:"outlined",onClick:t,children:"Paste JSON"}),Nt(da,{children:["Upload Files",Nt("input",{id:"json",type:"file",accept:"application/json",multiple:!0,title:" ",onChange:n})]})]})},Zm=()=>{const[e,t]=(0,r.useState)([]),[n,a]=(0,r.useState)([]),i=(0,r.useMemo)((()=>!!e.length),[e]),{value:o,setTrue:l,setFalse:s}=ma(!1),c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";a((n=>[{filename:t,text:`: ${e.message}`},...n]))},u=(e,n)=>{try{const r=JSON.parse(e),a=r.trace||r;if(!a.duration_msec)return void c(new Error(pt.traceNotFound),n);const i=new Cl(a,n);t((e=>[i,...e]))}catch(zp){zp instanceof Error&&c(zp,n)}},d=e=>{e.map((e=>{const t=new FileReader,n=(null===e||void 0===e?void 0:e.name)||"";t.onload=e=>{var t;const r=String(null===(t=e.target)||void 0===t?void 0:t.result);u(r,n)},t.readAsText(e)}))},h=e=>{a([]);const t=Array.from(e.target.files||[]);d(t),e.target.value=""},m=e=>()=>{(e=>{a((t=>t.filter(((t,n)=>n!==e))))})(e)},{files:p,dragging:f}=Km();return(0,r.useEffect)((()=>{d(p)}),[p]),Nt("div",{className:"vm-trace-page",children:[Nt("div",{className:"vm-trace-page-header",children:[Nt("div",{className:"vm-trace-page-header-errors",children:n.map(((e,t)=>Nt("div",{className:"vm-trace-page-header-errors-item",children:[Nt(ra,{variant:"error",children:[Nt("b",{className:"vm-trace-page-header-errors-item__filename",children:e.filename}),Nt("span",{children:e.text})]}),Nt(da,{className:"vm-trace-page-header-errors-item__close",startIcon:Nt(Ln,{}),variant:"text",color:"error",onClick:m(t)})]},`${e}_${t}`)))}),Nt("div",{children:i&&Nt(Qm,{onOpenModal:l,onChange:h})})]}),i&&Nt("div",{children:Nt(Hl,{jsonEditor:!0,traces:e,onDeleteClick:n=>{const r=e.filter((e=>e.idValue!==n.idValue));t([...r])}})}),!i&&Nt("div",{className:"vm-trace-page-preview",children:[Nt("p",{className:"vm-trace-page-preview__text",children:["Please, upload file with JSON response content.","\n","The file must contain tracing information in JSON format.","\n","In order to use tracing please refer to the doc:\xa0",Nt("a",{className:"vm-link vm-link_colored",href:"https://docs.victoriametrics.com/#query-tracing",target:"_blank",rel:"help noreferrer",children:"https://docs.victoriametrics.com/#query-tracing"}),"\n","Tracing graph will be displayed after file upload.","\n","Attach files by dragging & dropping, selecting or pasting them."]}),Nt(Qm,{onOpenModal:l,onChange:h})]}),o&&Nt(_a,{title:"Paste JSON",onClose:s,children:Nt(jl,{editable:!0,displayTitle:!0,defaultTile:`JSON ${e.length+1}`,onClose:s,onUpload:u})}),f&&Nt("div",{className:"vm-trace-page__dropzone"})]})},Gm=e=>{const{serverUrl:t}=Mt(),{period:n}=fn(),[a,i]=(0,r.useState)([]),[o,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)(),u=(0,r.useMemo)((()=>((e,t,n)=>{const r=`{job=${JSON.stringify(n)}}`;return`${e}/api/v1/label/instance/values?match[]=${encodeURIComponent(r)}&start=${t.start}&end=${t.end}`})(t,n,e)),[t,n,e]);return(0,r.useEffect)((()=>{if(!e)return;(async()=>{l(!0);try{const e=await fetch(u),t=await e.json(),n=t.data||[];i(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?c(void 0):c(`${t.errorType}\r\n${null===t||void 0===t?void 0:t.error}`)}catch(zp){zp instanceof Error&&c(`${zp.name}: ${zp.message}`)}l(!1)})().catch(console.error)}),[u]),{instances:a,isLoading:o,error:s}},Jm=(e,t)=>{const{serverUrl:n}=Mt(),{period:a}=fn(),[i,o]=(0,r.useState)([]),[l,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(),d=(0,r.useMemo)((()=>((e,t,n,r)=>{const a=Object.entries({job:n,instance:r}).filter((e=>e[1])).map((e=>{let[t,n]=e;return`${t}=${JSON.stringify(n)}`})).join(",");return`${e}/api/v1/label/__name__/values?match[]=${encodeURIComponent(`{${a}}`)}&start=${t.start}&end=${t.end}`})(n,a,e,t)),[n,a,e,t]);return(0,r.useEffect)((()=>{if(!e)return;(async()=>{s(!0);try{const e=await fetch(d),t=await e.json(),n=t.data||[];o(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?u(void 0):u(`${t.errorType}\r\n${null===t||void 0===t?void 0:t.error}`)}catch(zp){zp instanceof Error&&u(`${zp.name}: ${zp.message}`)}s(!1)})().catch(console.error)}),[d]),{names:i,isLoading:l,error:c}},Xm=e=>{let{name:t,job:n,instance:a,rateEnabled:i,isBucket:o,height:l}=e;const{isMobile:s}=ta(),{customStep:c,yaxis:u}=Br(),{period:d}=fn(),h=qr(),m=vn(),p=Zt(d.end-d.start),f=Qt(c),v=en(10*f*1e3),[g,y]=(0,r.useState)(!1),[_,b]=(0,r.useState)(!1),w=g&&c===p?v:c,k=(0,r.useMemo)((()=>{const e=Object.entries({job:n,instance:a}).filter((e=>e[1])).map((e=>{let[t,n]=e;return`${t}=${JSON.stringify(n)}`}));e.push(`__name__=${JSON.stringify(t)}`),"node_cpu_seconds_total"==t&&e.push('mode!="idle"');const r=`{${e.join(",")}}`;if(o)return`sum(rate(${r})) by (vmrange, le)`;return`\nwith (q = ${i?`rollup_rate(${r})`:`rollup(${r})`}) (\n alias(min(label_match(q, "rollup", "min")), "min"),\n alias(max(label_match(q, "rollup", "max")), "max"),\n alias(avg(label_match(q, "rollup", "avg")), "avg"),\n)`}),[t,n,a,i,o]),{isLoading:x,graphData:S,error:C,queryErrors:E,warning:N,isHistogram:A}=Tl({predefinedQuery:[k],visible:!0,customStep:w,showAllSeries:_});return(0,r.useEffect)((()=>{y(A)}),[A]),Nt("div",{className:Er()({"vm-explore-metrics-graph":!0,"vm-explore-metrics-graph_mobile":s}),children:[x&&Nt(wl,{}),C&&Nt(ra,{variant:"error",children:C}),E[0]&&Nt(ra,{variant:"error",children:E[0]}),N&&Nt(Ul,{warning:N,query:[k],onChange:b}),S&&d&&Nt(jh,{data:S,period:d,customStep:w,query:[k],yaxis:u,setYaxisLimits:e=>{h({type:"SET_YAXIS_LIMITS",payload:e})},setPeriod:e=>{let{from:t,to:n}=e;m({type:"SET_PERIOD",payload:{from:t,to:n}})},showLegend:!1,height:l,isHistogram:A})]})},ep=e=>{let{name:t,index:n,length:r,isBucket:a,rateEnabled:i,onChangeRate:o,onRemoveItem:l,onChangeOrder:s}=e;const{isMobile:c}=ta(),{value:u,setTrue:d,setFalse:h}=ma(!1),m=()=>{l(t)},p=()=>{s(t,n,n+1)},f=()=>{s(t,n,n-1)};return Nt("div",c?{className:"vm-explore-metrics-item-header vm-explore-metrics-item-header_mobile",children:[Nt("div",{className:"vm-explore-metrics-item-header__name",children:t}),Nt(da,{variant:"text",size:"small",startIcon:Nt(ur,{}),onClick:d,ariaLabel:"open panel settings"}),u&&Nt(_a,{title:t,onClose:h,children:Nt("div",{className:"vm-explore-metrics-item-header-modal",children:[Nt("div",{className:"vm-explore-metrics-item-header-modal-order",children:[Nt(da,{startIcon:Nt(Jn,{}),variant:"outlined",onClick:f,disabled:0===n,ariaLabel:"move graph up"}),Nt("p",{children:["position:",Nt("span",{className:"vm-explore-metrics-item-header-modal-order__index",children:["#",n+1]})]}),Nt(da,{endIcon:Nt(Gn,{}),variant:"outlined",onClick:p,disabled:n===r-1,ariaLabel:"move graph down"})]}),!a&&Nt("div",{className:"vm-explore-metrics-item-header-modal__rate",children:[Nt(Ti,{label:Nt("span",{children:["enable ",Nt("code",{children:"rate()"})]}),value:i,onChange:o,fullWidth:!0}),Nt("p",{children:"calculates the average per-second speed of metrics change"})]}),Nt(da,{startIcon:Nt(Ln,{}),color:"error",variant:"outlined",onClick:m,fullWidth:!0,children:"Remove graph"})]})})]}:{className:"vm-explore-metrics-item-header",children:[Nt("div",{className:"vm-explore-metrics-item-header-order",children:[Nt(ba,{title:"move graph up",children:Nt(da,{className:"vm-explore-metrics-item-header-order__up",startIcon:Nt(Fn,{}),variant:"text",color:"gray",size:"small",onClick:f,ariaLabel:"move graph up"})}),Nt("div",{className:"vm-explore-metrics-item-header__index",children:["#",n+1]}),Nt(ba,{title:"move graph down",children:Nt(da,{className:"vm-explore-metrics-item-header-order__down",startIcon:Nt(Fn,{}),variant:"text",color:"gray",size:"small",onClick:p,ariaLabel:"move graph down"})})]}),Nt("div",{className:"vm-explore-metrics-item-header__name",children:t}),!a&&Nt("div",{className:"vm-explore-metrics-item-header__rate",children:Nt(ba,{title:"calculates the average per-second speed of metric's change",children:Nt(Ti,{label:Nt("span",{children:["enable ",Nt("code",{children:"rate()"})]}),value:i,onChange:o})})}),Nt("div",{className:"vm-explore-metrics-item-header__close",children:Nt(ba,{title:"close graph",children:Nt(da,{startIcon:Nt(Ln,{}),variant:"text",color:"gray",size:"small",onClick:m,ariaLabel:"close graph"})})})]})},tp=e=>{let{name:t,job:n,instance:a,index:i,length:o,size:l,onRemoveItem:s,onChangeOrder:c}=e;const u=(0,r.useMemo)((()=>/_sum?|_total?|_count?/.test(t)),[t]),d=(0,r.useMemo)((()=>/_bucket?/.test(t)),[t]),[h,m]=(0,r.useState)(u),p=Tr(),f=(0,r.useMemo)(l.height,[l,p]);return(0,r.useEffect)((()=>{m(u)}),[n]),Nt("div",{className:"vm-explore-metrics-item vm-block vm-block_empty-padding",children:[Nt(ep,{name:t,index:i,length:o,isBucket:d,rateEnabled:h,size:l.id,onChangeRate:m,onRemoveItem:s,onChangeOrder:c}),Nt(Xm,{name:t,job:n,instance:a,rateEnabled:h,isBucket:d,height:f},`${t}_${n}_${a}_${h}`)]})},np=e=>{let{values:t,onRemoveItem:n}=e;const{isMobile:r}=ta();return r?Nt("span",{className:"vm-select-input-content__counter",children:["selected ",t.length]}):Nt(Ct.FK,{children:t.map((e=>{return Nt("div",{className:"vm-select-input-content__selected",children:[Nt("span",{children:e}),Nt("div",{onClick:(t=e,e=>{n(t),e.stopPropagation()}),children:Nt(Ln,{})})]},e);var t}))})},rp=e=>{let{value:t,list:n,label:a,placeholder:i,noOptionsText:o,clearable:l=!1,searchable:s=!1,autofocus:c,disabled:u,onChange:d}=e;const{isDarkTheme:h}=Mt(),{isMobile:m}=ta(),[p,f]=(0,r.useState)(""),v=(0,r.useRef)(null),[g,y]=(0,r.useState)(null),[_,b]=(0,r.useState)(!1),w=(0,r.useRef)(null),k=Array.isArray(t),x=Array.isArray(t)?t:void 0,S=m&&k&&!(null===x||void 0===x||!x.length),C=(0,r.useMemo)((()=>_?p:Array.isArray(t)?"":t),[t,p,_,k]),E=(0,r.useMemo)((()=>_?p||"(.+)":""),[p,_]),N=()=>{w.current&&w.current.blur()},A=()=>{b(!1),N()},M=e=>{f(""),d(e),k||A(),k&&w.current&&w.current.focus()};return(0,r.useEffect)((()=>{f(""),_&&w.current&&w.current.focus(),_||N()}),[_,w]),(0,r.useEffect)((()=>{c&&w.current&&!m&&w.current.focus()}),[c,w]),Mr("keyup",(e=>{w.current!==e.target&&b(!1)})),ua(v,A,g),Nt("div",{className:Er()({"vm-select":!0,"vm-select_dark":h,"vm-select_disabled":u}),children:[Nt("div",{className:"vm-select-input",onClick:e=>{e.target instanceof HTMLInputElement||u||b((e=>!e))},ref:v,children:[Nt("div",{className:"vm-select-input-content",children:[!(null===x||void 0===x||!x.length)&&Nt(np,{values:x,onRemoveItem:M}),!S&&Nt("input",{value:C,type:"text",placeholder:i,onInput:e=>{f(e.target.value)},onFocus:()=>{u||b(!0)},onBlur:()=>{n.includes(p)&&d(p)},ref:w,readOnly:m||!s})]}),a&&Nt("span",{className:"vm-text-field__label",children:a}),l&&t&&Nt("div",{className:"vm-select-input__icon",onClick:(e=>t=>{M(e),t.stopPropagation()})(""),children:Nt(Ln,{})}),Nt("div",{className:Er()({"vm-select-input__icon":!0,"vm-select-input__icon_open":_}),children:Nt(jn,{})})]}),Nt(Ui,{label:a,value:E,options:n.map((e=>({value:e}))),anchor:v,selected:x,minLength:1,fullWidth:!0,noOptionsText:o,onSelect:M,onOpenAutocomplete:b,onChangeWrapperRef:y})]})},ap=st.map((e=>e.id)),ip=e=>{let{jobs:t,instances:n,names:a,job:i,instance:o,size:l,selectedMetrics:s,onChangeJob:c,onChangeInstance:u,onToggleMetric:d,onChangeSize:h}=e;const m=(0,r.useMemo)((()=>i?"":"No instances. Please select job"),[i]),p=(0,r.useMemo)((()=>i?"":"No metric names. Please select job"),[i]),{isMobile:f}=ta(),{value:v,toggle:g,setFalse:y}=ma("false"!==et("EXPLORE_METRICS_TIPS"));return(0,r.useEffect)((()=>{Xe("EXPLORE_METRICS_TIPS",`${v}`)}),[v]),Nt(Ct.FK,{children:[Nt("div",{className:Er()({"vm-explore-metrics-header":!0,"vm-explore-metrics-header_mobile":f,"vm-block":!0,"vm-block_mobile":f}),children:[Nt("div",{className:"vm-explore-metrics-header__job",children:Nt(rp,{value:i,list:t,label:"Job",placeholder:"Please select job",onChange:c,autofocus:!i&&!!t.length&&!f,searchable:!0})}),Nt("div",{className:"vm-explore-metrics-header__instance",children:Nt(rp,{value:o,list:n,label:"Instance",placeholder:"Please select instance",onChange:u,noOptionsText:m,clearable:!0,searchable:!0})}),Nt("div",{className:"vm-explore-metrics-header__size",children:[Nt(rp,{label:"Size graphs",value:l,list:ap,onChange:h}),Nt(ba,{title:(v?"Hide":"Show")+" tip",children:Nt(da,{variant:"text",color:v?"warning":"gray",startIcon:Nt(hr,{}),onClick:g,ariaLabel:"visibility tips"})})]}),Nt("div",{className:"vm-explore-metrics-header-metrics",children:Nt(rp,{label:"Metrics",value:s,list:a,placeholder:"Search metric name",onChange:d,noOptionsText:p,clearable:!0,searchable:!0})})]}),v&&Nt(ra,{variant:"warning",children:Nt("div",{className:"vm-explore-metrics-header-description",children:[Nt("p",{children:["Please note: this page is solely designed for exploring Prometheus metrics. Prometheus metrics always contain ",Nt("code",{children:"job"})," and ",Nt("code",{children:"instance"})," labels (see ",Nt("a",{className:"vm-link vm-link_colored",href:"https://prometheus.io/docs/concepts/jobs_instances/",children:"these docs"}),"), and this page relies on them as filters. ",Nt("br",{}),"Please use this page for Prometheus metrics only, in accordance with their naming conventions."]}),Nt(da,{variant:"text",size:"small",startIcon:Nt(Ln,{}),onClick:y,ariaLabel:"close tips"})]})})]})},op=ut("job",""),lp=ut("instance",""),sp=ut("metrics",""),cp=ut("size",""),up=st.find((e=>cp?e.id===cp:e.isDefault))||st[0],dp=()=>{const[e,t]=(0,r.useState)(op),[n,a]=(0,r.useState)(lp),[i,o]=(0,r.useState)(sp?sp.split("&"):[]),[l,s]=(0,r.useState)(up);(e=>{let{job:t,instance:n,metrics:a,size:i}=e;const{duration:o,relativeTime:l,period:{date:s}}=fn(),{customStep:c}=Br(),{setSearchParamsFromKeys:u}=hi(),d=()=>{const e=lm({"g0.range_input":o,"g0.end_input":s,"g0.step_input":c,"g0.relative_time":l,size:i,job:t,instance:n,metrics:a});u(e)};(0,r.useEffect)(d,[o,l,s,c,t,n,a,i]),(0,r.useEffect)(d,[])})({job:e,instance:n,metrics:i.join("&"),size:l.id});const{jobs:c,isLoading:u,error:d}=(()=>{const{serverUrl:e}=Mt(),{period:t}=fn(),[n,a]=(0,r.useState)([]),[i,o]=(0,r.useState)(!1),[l,s]=(0,r.useState)(),c=(0,r.useMemo)((()=>((e,t)=>`${e}/api/v1/label/job/values?start=${t.start}&end=${t.end}`)(e,t)),[e,t]);return(0,r.useEffect)((()=>{(async()=>{o(!0);try{const e=await fetch(c),t=await e.json(),n=t.data||[];a(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?s(void 0):s(`${t.errorType}\r\n${null===t||void 0===t?void 0:t.error}`)}catch(zp){zp instanceof Error&&s(`${zp.name}: ${zp.message}`)}o(!1)})().catch(console.error)}),[c]),{jobs:n,isLoading:i,error:l}})(),{instances:h,isLoading:m,error:p}=Gm(e),{names:f,isLoading:v,error:g}=Jm(e,n),y=(0,r.useMemo)((()=>u||m||v),[u,m,v]),_=(0,r.useMemo)((()=>d||p||g),[d,p,g]),b=e=>{o(e?t=>t.includes(e)?t.filter((t=>t!==e)):[...t,e]:[])},w=(e,t,n)=>{const r=n>i.length-1;n<0||r||o((e=>{const r=[...e],[a]=r.splice(t,1);return r.splice(n,0,a),r}))};return(0,r.useEffect)((()=>{n&&h.length&&!h.includes(n)&&a("")}),[h,n]),Nt("div",{className:"vm-explore-metrics",children:[Nt(ip,{jobs:c,instances:h,names:f,job:e,size:l.id,instance:n,selectedMetrics:i,onChangeJob:t,onChangeSize:e=>{const t=st.find((t=>t.id===e));t&&s(t)},onChangeInstance:a,onToggleMetric:b}),y&&Nt(wl,{}),_&&Nt(ra,{variant:"error",children:_}),!e&&Nt(ra,{variant:"info",children:"Please select job to see list of metric names."}),e&&!i.length&&Nt(ra,{variant:"info",children:"Please select metric names to see the graphs."}),Nt("div",{className:"vm-explore-metrics-body",children:i.map(((t,r)=>Nt(tp,{name:t,job:e,instance:n,index:r,length:i.length,size:l,onRemoveItem:b,onChangeOrder:w},t)))})]})},hp=()=>{const t=fl();return Nt("div",{className:"vm-preview-icons",children:Object.entries(e).map((e=>{let[n,r]=e;return Nt("div",{className:"vm-preview-icons-item",onClick:(a=n,async()=>{await t(`<${a}/>`,`<${a}/> has been copied`)}),children:[Nt("div",{className:"vm-preview-icons-item__svg",children:r()}),Nt("div",{className:"vm-preview-icons-item__name",children:`<${n}/>`})]},n);var a}))})};var mp=function(e){return e.copy="Copy",e.copied="Copied",e}(mp||{});const pp=e=>{let{code:t}=e;const[n,a]=(0,r.useState)(mp.copy);return(0,r.useEffect)((()=>{let e=null;return n===mp.copied&&(e=setTimeout((()=>a(mp.copy)),1e3)),()=>{e&&clearTimeout(e)}}),[n]),Nt("code",{className:"vm-code-example",children:[t,Nt("div",{className:"vm-code-example__copy",children:Nt(ba,{title:n,children:Nt(da,{size:"small",variant:"text",onClick:()=>{navigator.clipboard.writeText(t),a(mp.copied)},startIcon:Nt(rr,{}),ariaLabel:"close"})})})]})},fp=()=>Nt("a",{className:"vm-link vm-link_colored",href:"https://docs.victoriametrics.com/MetricsQL.html",target:"_blank",rel:"help noreferrer",children:"MetricsQL"}),vp=()=>Nt("a",{className:"vm-link vm-link_colored",href:"https://grafana.com/grafana/dashboards/1860-node-exporter-full/",target:"_blank",rel:"help noreferrer",children:"Node Exporter Full"}),gp=()=>Nt("section",{className:"vm-with-template-tutorial",children:[Nt("h2",{className:"vm-with-template-tutorial__title",children:["Tutorial for WITH expressions in ",Nt(fp,{})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:["Let's look at the following real query from ",Nt(vp,{})," dashboard:"]}),Nt(pp,{code:'(\n (\n node_memory_MemTotal_bytes{instance=~"$node:$port", job=~"$job"}\n -\n node_memory_MemFree_bytes{instance=~"$node:$port", job=~"$job"}\n )\n /\n node_memory_MemTotal_bytes{instance=~"$node:$port", job=~"$job"}\n) * 100'}),Nt("p",{className:"vm-with-template-tutorial-section__text",children:"It is clear the query calculates the percentage of used memory for the given $node, $port and $job. Isn't it? :)"})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:"What's wrong with this query? Copy-pasted label filters for distinct timeseries which makes it easy to mistype these filters during modification. Let's simplify the query with WITH expressions:"}),Nt(pp,{code:'WITH (\n commonFilters = {instance=~"$node:$port",job=~"$job"}\n)\n(\n node_memory_MemTotal_bytes{commonFilters}\n -\n node_memory_MemFree_bytes{commonFilters}\n)\n /\nnode_memory_MemTotal_bytes{commonFilters} * 100'})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:["Now label filters are located in a single place instead of three distinct places. The query mentions node_memory_MemTotal_bytes metric twice and ","{commonFilters}"," three times. WITH expressions may improve this:"]}),Nt(pp,{code:'WITH (\n my_resource_utilization(free, limit, filters) = (limit{filters} - free{filters}) / limit{filters} * 100\n)\nmy_resource_utilization(\n node_memory_MemFree_bytes,\n node_memory_MemTotal_bytes,\n {instance=~"$node:$port",job=~"$job"},\n)'}),Nt("p",{className:"vm-with-template-tutorial-section__text",children:"Now the template function my_resource_utilization() may be used for monitoring arbitrary resources - memory, CPU, network, storage, you name it."})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:["Let's take another nice query from ",Nt(vp,{})," dashboard:"]}),Nt(pp,{code:'(\n (\n (\n count(\n count(node_cpu_seconds_total{instance=~"$node:$port",job=~"$job"}) by (cpu)\n )\n )\n -\n avg(\n sum by (mode) (rate(node_cpu_seconds_total{mode=\'idle\',instance=~"$node:$port",job=~"$job"}[5m]))\n )\n )\n *\n 100\n)\n /\ncount(\n count(node_cpu_seconds_total{instance=~"$node:$port",job=~"$job"}) by (cpu)\n)'}),Nt("p",{className:"vm-with-template-tutorial-section__text",children:"Do you understand what does this mess do? Is it manageable? :) WITH expressions are happy to help in a few iterations."})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:"1. Extract common filters used in multiple places into a commonFilters variable:"}),Nt(pp,{code:'WITH (\n commonFilters = {instance=~"$node:$port",job=~"$job"}\n)\n(\n (\n (\n count(\n count(node_cpu_seconds_total{commonFilters}) by (cpu)\n )\n )\n -\n avg(\n sum by (mode) (rate(node_cpu_seconds_total{mode=\'idle\',commonFilters}[5m]))\n )\n )\n *\n 100\n)\n /\ncount(\n count(node_cpu_seconds_total{commonFilters}) by (cpu)\n)'})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:'2. Extract "count(count(...) by (cpu))" into cpuCount variable:'}),Nt(pp,{code:'WITH (\n commonFilters = {instance=~"$node:$port",job=~"$job"},\n cpuCount = count(count(node_cpu_seconds_total{commonFilters}) by (cpu))\n)\n(\n (\n cpuCount\n -\n avg(\n sum by (mode) (rate(node_cpu_seconds_total{mode=\'idle\',commonFilters}[5m]))\n )\n )\n *\n 100\n) / cpuCount'})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:"3. Extract rate(...) part into cpuIdle variable, since it is clear now that this part calculates the number of idle CPUs:"}),Nt(pp,{code:'WITH (\n commonFilters = {instance=~"$node:$port",job=~"$job"},\n cpuCount = count(count(node_cpu_seconds_total{commonFilters}) by (cpu)),\n cpuIdle = sum(rate(node_cpu_seconds_total{mode=\'idle\',commonFilters}[5m]))\n)\n((cpuCount - cpuIdle) * 100) / cpuCount'})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:["4. Put node_cpu_seconds_total","{commonFilters}"," into its own varialbe with the name cpuSeconds:"]}),Nt(pp,{code:'WITH (\n cpuSeconds = node_cpu_seconds_total{instance=~"$node:$port",job=~"$job"},\n cpuCount = count(count(cpuSeconds) by (cpu)),\n cpuIdle = sum(rate(cpuSeconds{mode=\'idle\'}[5m]))\n)\n((cpuCount - cpuIdle) * 100) / cpuCount'}),Nt("p",{className:"vm-with-template-tutorial-section__text",children:"Now the query became more clear comparing to the initial query."})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:"WITH expressions may be nested and may be put anywhere. Try expanding the following query:"}),Nt(pp,{code:"WITH (\n f(a, b) = WITH (\n f1(x) = b-x,\n f2(x) = x+x\n ) f1(a)*f2(b)\n) f(foo, with(x=bar) x)"})]})]}),yp=()=>{const{serverUrl:e}=Mt(),[t,n]=je(),[a,i]=(0,r.useState)(""),[o,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)();return{data:a,error:s,loading:o,expand:async r=>{t.set("expr",r),n(t);const a=((e,t)=>`${e}/expand-with-exprs?query=${encodeURIComponent(t)}&format=json`)(e,r);l(!0);try{const e=await fetch(a),t=await e.json();i((null===t||void 0===t?void 0:t.expr)||""),c(String(t.error||""))}catch(zp){zp instanceof Error&&"AbortError"!==zp.name&&c(`${zp.name}: ${zp.message}`)}l(!1)}}},_p=()=>{const[e]=je(),{data:t,loading:n,error:a,expand:i}=yp(),[o,l]=(0,r.useState)(e.get("expr")||""),s=()=>{i(o)};return(0,r.useEffect)((()=>{o&&i(o)}),[]),Nt("section",{className:"vm-with-template",children:[n&&Nt(wl,{}),Nt("div",{className:"vm-with-template-body vm-block",children:[Nt("div",{className:"vm-with-template-body__expr",children:Nt(Ka,{type:"textarea",label:"MetricsQL query with optional WITH expressions",value:o,error:a,autofocus:!0,onEnter:s,onChange:e=>{l(e)}})}),Nt("div",{className:"vm-with-template-body__result",children:Nt(Ka,{type:"textarea",label:"MetricsQL query after expanding WITH expressions and applying other optimizations",value:t,disabled:!0})}),Nt("div",{className:"vm-with-template-body-top",children:Nt(da,{variant:"contained",onClick:s,startIcon:Nt(qn,{}),children:"Expand"})})]}),Nt("div",{className:"vm-block",children:Nt(gp,{})})]})},bp=()=>{const{serverUrl:e}=Mt(),[t,n]=(0,r.useState)(null),[a,i]=(0,r.useState)(!1),[o,l]=(0,r.useState)();return{data:t,error:o,loading:a,fetchData:async(t,r)=>{const a=((e,t,n)=>`${e}/metric-relabel-debug?${["format=json",`relabel_configs=${encodeURIComponent(t)}`,`metric=${encodeURIComponent(n)}`].join("&")}`)(e,t,r);i(!0);try{const e=await fetch(a),t=await e.json();n(t.error?null:t),l(String(t.error||""))}catch(zp){zp instanceof Error&&"AbortError"!==zp.name&&l(`${zp.name}: ${zp.message}`)}i(!1)}}},wp={config:'- if: \'{bar_label=~"b.*"}\'\n source_labels: [foo_label, bar_label]\n separator: "_"\n target_label: foobar\n- action: labeldrop\n regex: "foo_.*"\n- target_label: job\n replacement: "my-application-2"',labels:'{__name__="my_metric", bar_label="bar", foo_label="foo", job="my-application", instance="192.168.0.1"}'},kp=()=>{const[e,t]=je(),{data:n,loading:a,error:i,fetchData:o}=bp(),[l,s]=bm("","config"),[c,u]=bm("","labels"),d=(0,r.useCallback)((()=>{o(l,c),e.set("config",l),e.set("labels",c),t(e)}),[l,c]);return(0,r.useEffect)((()=>{const t=e.get("config")||"",n=e.get("labels")||"";(n||t)&&(o(t,n),s(t),u(n))}),[]),Nt("section",{className:"vm-relabeling",children:[a&&Nt(wl,{}),Nt("div",{className:"vm-relabeling-header vm-block",children:[Nt("div",{className:"vm-relabeling-header-configs",children:Nt(Ka,{type:"textarea",label:"Relabel configs",value:l,autofocus:!0,onChange:e=>{s(e||"")},onEnter:d})}),Nt("div",{className:"vm-relabeling-header__labels",children:Nt(Ka,{type:"textarea",label:"Labels",value:c,onChange:e=>{u(e||"")},onEnter:d})}),Nt("div",{className:"vm-relabeling-header-bottom",children:[Nt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/relabeling.html",rel:"help noreferrer",children:[Nt(In,{}),"Relabeling cookbook"]}),Nt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/vmagent.html#relabeling",rel:"help noreferrer",children:[Nt(or,{}),"Documentation"]}),Nt(da,{variant:"text",onClick:()=>{const{config:n,labels:r}=wp;s(n),u(r),o(n,r),e.set("config",n),e.set("labels",r),t(e)},children:"Try example"}),Nt(da,{variant:"contained",onClick:d,startIcon:Nt(qn,{}),children:"Submit"})]})]}),i&&Nt(ra,{variant:"error",children:i}),n&&Nt("div",{className:"vm-relabeling-steps vm-block",children:[n.originalLabels&&Nt("div",{className:"vm-relabeling-steps-item",children:Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Original labels:"}),Nt("code",{dangerouslySetInnerHTML:{__html:n.originalLabels}})]})}),n.steps.map(((e,t)=>Nt("div",{className:"vm-relabeling-steps-item",children:[Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Step:"}),t+1]}),Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Relabeling Rule:"}),Nt("code",{children:Nt("pre",{children:e.rule})})]}),Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Input Labels:"}),Nt("code",{children:Nt("pre",{dangerouslySetInnerHTML:{__html:e.inLabels}})})]}),Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Output labels:"}),Nt("code",{children:Nt("pre",{dangerouslySetInnerHTML:{__html:e.outLabels}})})]})]},t))),n.resultingLabels&&Nt("div",{className:"vm-relabeling-steps-item",children:Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Resulting labels:"}),Nt("code",{dangerouslySetInnerHTML:{__html:n.resultingLabels}})]})})]})]})},xp=e=>{let{rows:t,columns:n,defaultOrderBy:a,defaultOrderDir:i,copyToClipboard:o,paginationOffset:l}=e;const[s,c]=(0,r.useState)(a),[u,d]=(0,r.useState)(i||"desc"),[h,m]=(0,r.useState)(null),p=(0,r.useMemo)((()=>{const{startIndex:e,endIndex:n}=l;return Em(t,Cm(u,s)).slice(e,n)}),[t,s,u,l]),f=(e,t)=>async()=>{if(h!==t)try{await navigator.clipboard.writeText(String(e)),m(t)}catch(zp){console.error(zp)}};return(0,r.useEffect)((()=>{if(null===h)return;const e=setTimeout((()=>m(null)),2e3);return()=>clearTimeout(e)}),[h]),Nt("table",{className:"vm-table",children:[Nt("thead",{className:"vm-table-header",children:Nt("tr",{className:"vm-table__row vm-table__row_header",children:[n.map((e=>{return Nt("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:(t=e.key,()=>{d((e=>"asc"===e&&s===t?"desc":"asc")),c(t)}),children:Nt("div",{className:"vm-table-cell__content",children:[Nt("div",{children:String(e.title||e.key)}),Nt("div",{className:Er()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":s===e.key,"vm-table__sort-icon_desc":"desc"===u&&s===e.key}),children:Nt(jn,{})})]})},String(e.key));var t})),o&&Nt("th",{className:"vm-table-cell vm-table-cell_header"})]})}),Nt("tbody",{className:"vm-table-body",children:p.map(((e,t)=>Nt("tr",{className:"vm-table__row",children:[n.map((t=>Nt("td",{className:Er()({"vm-table-cell":!0,[`${t.className}`]:t.className}),children:e[t.key]||"-"},String(t.key)))),o&&Nt("td",{className:"vm-table-cell vm-table-cell_right",children:e[o]&&Nt("div",{className:"vm-table-cell__content",children:Nt(ba,{title:h===t?"Copied":"Copy row",children:Nt(da,{variant:"text",color:h===t?"success":"gray",size:"small",startIcon:Nt(h===t?Xn:rr,{}),onClick:f(e[o],t),ariaLabel:"copy row"})})})})]},t)))})]})},Sp=()=>{const{isMobile:e}=ta(),{timezone:t}=fn(),{data:n,lastUpdated:a,isLoading:o,error:l,fetchData:s}=(()=>{const{serverUrl:e}=Mt(),[t,n]=(0,r.useState)([]),[a,o]=(0,r.useState)(i()().format(It)),[l,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(),d=(0,r.useMemo)((()=>`${e}/api/v1/status/active_queries`),[e]),h=async()=>{s(!0);try{const e=await fetch(d),t=await e.json();n(t.data),o(i()().format("HH:mm:ss:SSS")),e.ok?u(void 0):u(`${t.errorType}\r\n${null===t||void 0===t?void 0:t.error}`)}catch(zp){zp instanceof Error&&u(`${zp.name}: ${zp.message}`)}s(!1)};return(0,r.useEffect)((()=>{h().catch(console.error)}),[d]),{data:t,lastUpdated:a,isLoading:l,error:c,fetchData:h}})(),c=(0,r.useMemo)((()=>n.map((e=>{const t=i()(e.start).tz().format(Pt),n=i()(e.end).tz().format(Pt);return{duration:e.duration,remote_addr:e.remote_addr,query:e.query,args:`${t} to ${n}, step=${Wt(e.step)}`,data:JSON.stringify(e,null,2)}}))),[n,t]),u=(0,r.useMemo)((()=>{if(null===c||void 0===c||!c.length)return[];const e=Object.keys(c[0]),t={remote_addr:"client address"},n=["data"];return e.filter((e=>!n.includes(e))).map((e=>({key:e,title:t[e]||e})))}),[c]);return Nt("div",{className:"vm-active-queries",children:[o&&Nt(wl,{}),Nt("div",{className:"vm-active-queries-header",children:[!c.length&&!l&&Nt(ra,{variant:"info",children:"There are currently no active queries running"}),l&&Nt(ra,{variant:"error",children:l}),Nt("div",{className:"vm-active-queries-header-controls",children:[Nt(da,{variant:"contained",onClick:async()=>{s().catch(console.error)},startIcon:Nt(zn,{}),children:"Update"}),Nt("div",{className:"vm-active-queries-header__update-msg",children:["Last updated: ",a]})]})]}),!!c.length&&Nt("div",{className:Er()({"vm-block":!0,"vm-block_mobile":e}),children:Nt(xp,{rows:c,columns:u,defaultOrderBy:"duration",copyToClipboard:"data",paginationOffset:{startIndex:0,endIndex:1/0}})})]})},Cp=e=>{let{onClose:t,onUpload:n}=e;const{isMobile:a}=ta(),[i,o]=(0,r.useState)(""),[l,s]=(0,r.useState)(""),c=(0,r.useMemo)((()=>{try{return JSON.parse(i),""}catch(zp){return zp instanceof Error?zp.message:"Unknown error"}}),[i]),u=()=>{s(c),c||(n(i),t())};return Nt("div",{className:Er()({"vm-json-form vm-json-form_one-field":!0,"vm-json-form_mobile vm-json-form_one-field_mobile":a}),children:[Nt(Ka,{value:i,label:"JSON",type:"textarea",error:l,autofocus:!0,onChange:e=>{s(""),o(e)},onEnter:u}),Nt("div",{className:"vm-json-form-footer",children:Nt("div",{className:"vm-json-form-footer__controls vm-json-form-footer__controls_right",children:[Nt(da,{variant:"outlined",color:"error",onClick:t,children:"Cancel"}),Nt(da,{variant:"contained",onClick:u,children:"apply"})]})})]})},Ep=e=>{let{data:t,period:n}=e;const{isMobile:a}=ta(),{tableCompact:i}=Fr(),o=jr(),[l,s]=(0,r.useState)([]),[c,u]=(0,r.useState)(),[d,h]=(0,r.useState)(),[m,p]=(0,r.useState)(!1),[f,v]=(0,r.useState)([]),[g,y]=(0,r.useState)(),_=(0,r.useMemo)((()=>Wh(d||[]).map((e=>e.key))),[d]),b=(0,r.useMemo)((()=>{const e=t.some((e=>"matrix"===e.data.resultType));return t.some((e=>"vector"===e.data.resultType))&&e?Lr:e?Lr.filter((e=>"chart"===e.value)):Lr.filter((e=>"chart"!==e.value))}),[t]),[w,k]=(0,r.useState)(b[0].value),{yaxis:x,spanGaps:S}=Br(),C=qr(),E=e=>{C({type:"SET_YAXIS_LIMITS",payload:e})};return(0,r.useEffect)((()=>{const e="chart"===w?"matrix":"vector",n=t.filter((t=>t.data.resultType===e&&t.trace)).map((e=>{var t,n;return e.trace?new Cl(e.trace,(null===e||void 0===e||null===(t=e.vmui)||void 0===t||null===(n=t.params)||void 0===n?void 0:n.query)||"Query"):null}));s(n.filter(Boolean))}),[t,w]),(0,r.useEffect)((()=>{const e=[],n=[],r=[];t.forEach(((t,a)=>{const i=t.data.result.map((e=>{var n,r,i;return{...e,group:Number(null!==(n=null===(r=t.vmui)||void 0===r||null===(i=r.params)||void 0===i?void 0:i.id)&&void 0!==n?n:a)+1}}));var o,l;"matrix"===t.data.resultType?(n.push(...i),e.push((null===(o=t.vmui)||void 0===o||null===(l=o.params)||void 0===l?void 0:l.query)||"Query")):r.push(...i)})),v(e),u(n),h(r)}),[t]),(0,r.useEffect)((()=>{p(!!c&&Al(c))}),[c]),Nt("div",{className:Er()({"vm-query-analyzer-view":!0,"vm-query-analyzer-view_mobile":a}),children:[!!l.length&&Nt(Hl,{traces:l,onDeleteClick:e=>{s((t=>t.filter((t=>t.idValue!==e.idValue))))}}),Nt("div",{className:Er()({"vm-block":!0,"vm-block_mobile":a}),children:[Nt("div",{className:"vm-custom-panel-body-header",children:[Nt("div",{className:"vm-custom-panel-body-header__tabs",children:Nt($r,{activeItem:w,items:b,onChange:e=>{k(e)}})}),Nt("div",{className:"vm-custom-panel-body-header__graph-controls",children:["chart"===w&&Nt(Ca,{}),"chart"===w&&Nt(Bh,{yaxis:x,setYaxisLimits:E,toggleEnableLimits:()=>{C({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})},spanGaps:{value:S,onChange:e=>{C({type:"SET_SPAN_GAPS",payload:e})}}}),"table"===w&&Nt(Jh,{columns:_,selectedColumns:g,onChangeColumns:y,tableCompact:i,toggleTableCompact:()=>{o({type:"TOGGLE_TABLE_COMPACT"})}})]})]}),c&&n&&"chart"===w&&Nt(jh,{data:c,period:n,customStep:n.step||"1s",query:f,yaxis:x,setYaxisLimits:E,setPeriod:()=>null,height:a?.5*window.innerHeight:500,isHistogram:m,spanGaps:S}),d&&"code"===w&&Nt(Yh,{data:d}),d&&"table"===w&&Nt(Qh,{data:d,displayColumns:g})]})]})},Np=e=>{var t,n;let{data:a,period:o}=e;const l=(0,r.useMemo)((()=>a.filter((e=>e.stats&&"matrix"===e.data.resultType))),[a]),s=(0,r.useMemo)((()=>{var e,t;return null===(e=a.find((e=>{var t;return null===e||void 0===e||null===(t=e.vmui)||void 0===t?void 0:t.comment})))||void 0===e||null===(t=e.vmui)||void 0===t?void 0:t.comment}),[a]),c=(0,r.useMemo)((()=>{if(!o)return"";return`${i()(1e3*o.start).tz().format(Pt)} - ${i()(1e3*o.end).tz().format(Pt)}`}),[o]),{value:u,setTrue:d,setFalse:h}=ma(!1);return Nt(Ct.FK,{children:[Nt("div",{className:"vm-query-analyzer-info-header",children:[Nt(da,{startIcon:Nt(In,{}),variant:"outlined",color:"warning",onClick:d,children:"Show report info"}),o&&Nt(Ct.FK,{children:[Nt("div",{className:"vm-query-analyzer-info-header__period",children:[Nt(ir,{})," step: ",o.step]}),Nt("div",{className:"vm-query-analyzer-info-header__period",children:[Nt(Hn,{})," ",c]})]})]}),u&&Nt(_a,{title:"Report info",onClose:h,children:Nt("div",{className:"vm-query-analyzer-info",children:[s&&Nt("div",{className:"vm-query-analyzer-info-item vm-query-analyzer-info-item_comment",children:[Nt("div",{className:"vm-query-analyzer-info-item__title",children:"Comment:"}),Nt("div",{className:"vm-query-analyzer-info-item__text",children:s})]}),l.map(((e,t)=>{var n;return Nt("div",{className:"vm-query-analyzer-info-item",children:[Nt("div",{className:"vm-query-analyzer-info-item__title",children:l.length>1?`Query ${t+1}:`:"Stats:"}),Nt("div",{className:"vm-query-analyzer-info-item__text",children:[Object.entries(e.stats||{}).map((e=>{let[t,n]=e;return Nt("div",{children:[t,": ",null!==n&&void 0!==n?n:"-"]},t)})),"isPartial: ",String(null!==(n=e.isPartial)&&void 0!==n?n:"-")]})]},t)})),Nt("div",{className:"vm-query-analyzer-info-type",children:null!==(t=l[0])&&void 0!==t&&null!==(n=t.vmui)&&void 0!==n&&n.params?"The report was created using vmui":"The report was created manually"})]})})]})},Ap=()=>{const[e,t]=(0,r.useState)([]),[n,a]=(0,r.useState)(""),i=(0,r.useMemo)((()=>!!e.length),[e]),{value:o,setTrue:l,setFalse:s}=ma(!1),c=(0,r.useMemo)((()=>{var t,n;if(!e)return;const r=null===(t=e[0])||void 0===t||null===(n=t.vmui)||void 0===n?void 0:n.params,a={start:+((null===r||void 0===r?void 0:r.start)||0),end:+((null===r||void 0===r?void 0:r.end)||0),step:null===r||void 0===r?void 0:r.step,date:""};if(!r){const t=e.filter((e=>"matrix"===e.data.resultType)).map((e=>e.data.result)).flat().map((e=>{var t;return e.values?null===(t=e.values)||void 0===t?void 0:t.map((e=>e[0])):[0]})).flat(),n=Array.from(new Set(t.filter(Boolean))).sort(((e,t)=>e-t));a.start=n[0],a.end=n[n.length-1],a.step=Yt((e=>{const t=e.slice(1).map(((t,n)=>t-e[n])),n={};t.forEach((e=>{const t=e.toString();n[t]=(n[t]||0)+1}));let r=0,a=0;for(const i in n)n[i]>a&&(a=n[i],r=Number(i));return r})(n))}return a.date=Jt(tn(a.end)),a}),[e]),u=e=>{try{const n=JSON.parse(e),r=Array.isArray(n)?n:[n];(e=>e.every((e=>{if("object"===typeof e&&null!==e){const t=e.data;if("object"===typeof t&&null!==t){const e=t.result,n=t.resultType;return Array.isArray(e)&&"string"===typeof n}}return!1})))(r)?t(r):a("Invalid structure - JSON does not match the expected format")}catch(zp){zp instanceof Error&&a(`${zp.name}: ${zp.message}`)}},d=e=>{e.map((e=>{const t=new FileReader;t.onload=e=>{var t;const n=String(null===(t=e.target)||void 0===t?void 0:t.result);u(n)},t.readAsText(e)}))},h=e=>{a("");const t=Array.from(e.target.files||[]);d(t),e.target.value=""},{files:m,dragging:p}=Km();return(0,r.useEffect)((()=>{d(m)}),[m]),Nt("div",{className:"vm-trace-page",children:[i&&Nt("div",{className:"vm-trace-page-header",children:[Nt("div",{className:"vm-trace-page-header-errors",children:Nt(Np,{data:e,period:c})}),Nt("div",{children:Nt(Qm,{onOpenModal:l,onChange:h})})]}),n&&Nt("div",{className:"vm-trace-page-header-errors-item vm-trace-page-header-errors-item_margin-bottom",children:[Nt(ra,{variant:"error",children:n}),Nt(da,{className:"vm-trace-page-header-errors-item__close",startIcon:Nt(Ln,{}),variant:"text",color:"error",onClick:()=>{a("")}})]}),i&&Nt(Ep,{data:e,period:c}),!i&&Nt("div",{className:"vm-trace-page-preview",children:[Nt("p",{className:"vm-trace-page-preview__text",children:["Please, upload file with JSON response content.","\n","The file must contain query information in JSON format.","\n","Graph will be displayed after file upload.","\n","Attach files by dragging & dropping, selecting or pasting them."]}),Nt(Qm,{onOpenModal:l,onChange:h})]}),o&&Nt(_a,{title:"Paste JSON",onClose:s,children:Nt(Cp,{onClose:s,onUpload:u})}),p&&Nt("div",{className:"vm-trace-page__dropzone"})]})},Mp=()=>{const{serverUrl:e}=Mt(),[t,n]=je(),[a,i]=(0,r.useState)(new Map),[o,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)(),[u,d]=(0,r.useState)(),[h,m]=(0,r.useState)();return{data:a,error:h,metricsError:s,flagsError:u,loading:o,applyFilters:(0,r.useCallback)((async(r,a)=>{if(c(a?"":"metrics are required"),d(r?"":"flags are required"),!a||!r)return;t.set("flags",r),t.set("metrics",a),n(t);const o=((e,t,n)=>`${e}/downsampling-filters-debug?${[`flags=${encodeURIComponent(t)}`,`metrics=${encodeURIComponent(n)}`].join("&")}`)(e,r,a);l(!0);try{var s,u;const e=await fetch(o),t=await e.json();i(new Map(Object.entries(t.result||{}))),c((null===(s=t.error)||void 0===s?void 0:s.metrics)||""),d((null===(u=t.error)||void 0===u?void 0:u.flags)||""),m("")}catch(zp){zp instanceof Error&&"AbortError"!==zp.name&&m(`${zp.name}: ${zp.message}`)}l(!1)}),[e])}},Tp={flags:'-downsampling.period={env="dev"}:7d:5m,{env="dev"}:30d:30m\n-downsampling.period=30d:1m\n-downsampling.period=60d:5m\n',metrics:'up\nup{env="dev"}\nup{env="prod"}'},$p=()=>{const[e]=je(),{data:t,loading:n,error:a,metricsError:i,flagsError:o,applyFilters:l}=Mp(),[s,c]=(0,r.useState)(e.get("metrics")||""),[u,d]=(0,r.useState)(e.get("flags")||""),h=(0,r.useCallback)((e=>{c(e)}),[c]),m=(0,r.useCallback)((e=>{d(e)}),[d]),p=(0,r.useCallback)((()=>{l(u,s)}),[l,u,s]),f=(0,r.useCallback)((()=>{const{flags:t,metrics:n}=Tp;d(t),c(n),l(t,n),e.set("flags",t),e.set("metrics",n)}),[Tp,d,c,e]);(0,r.useEffect)((()=>{u&&s&&p()}),[]);const v=[];for(const[r,g]of t)v.push(Nt("tr",{className:"vm-table__row",children:[Nt("td",{className:"vm-table-cell",children:r}),Nt("td",{className:"vm-table-cell",children:g.join(" ")})]}));return Nt("section",{className:"vm-downsampling-filters",children:[n&&Nt(wl,{}),Nt("div",{className:"vm-downsampling-filters-body vm-block",children:[Nt("div",{className:"vm-downsampling-filters-body__expr",children:[Nt("div",{className:"vm-retention-filters-body__title",children:Nt("p",{children:["Provide a list of flags for downsampling configuration. Note that only ",Nt("code",{children:"-downsampling.period"})," and ",Nt("code",{children:"-dedup.minScrapeInterval"})," flags are supported"]})}),Nt(Ka,{type:"textarea",label:"Flags",value:u,error:a||o,autofocus:!0,onEnter:p,onChange:m,placeholder:"-downsampling.period=30d:1m -downsampling.period=7d:5m -dedup.minScrapeInterval=30s"})]}),Nt("div",{className:"vm-downsampling-filters-body__expr",children:[Nt("div",{className:"vm-retention-filters-body__title",children:Nt("p",{children:"Provide a list of metrics to check downsampling configuration."})}),Nt(Ka,{type:"textarea",label:"Metrics",value:s,error:a||i,onEnter:p,onChange:h,placeholder:'up{env="dev"}\nup{env="prod"}\n'})]}),Nt("div",{className:"vm-downsampling-filters-body__result",children:Nt("table",{className:"vm-table",children:[Nt("thead",{className:"vm-table-header",children:Nt("tr",{children:[Nt("th",{className:"vm-table-cell vm-table-cell_header",children:"Metric"}),Nt("th",{className:"vm-table-cell vm-table-cell_header",children:"Applied downsampling rules"})]})}),Nt("tbody",{className:"vm-table-body",children:v})]})}),Nt("div",{className:"vm-downsampling-filters-body-top",children:[Nt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/#downsampling",rel:"help noreferrer",children:[Nt(or,{}),"Documentation"]}),Nt(da,{variant:"text",onClick:f,children:"Try example"}),Nt(da,{variant:"contained",onClick:p,startIcon:Nt(qn,{}),children:"Apply"})]})]})]})},Lp=()=>{const{serverUrl:e}=Mt(),[t,n]=je(),[a,i]=(0,r.useState)(new Map),[o,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)(),[u,d]=(0,r.useState)(),[h,m]=(0,r.useState)();return{data:a,error:h,metricsError:s,flagsError:u,loading:o,applyFilters:(0,r.useCallback)((async(r,a)=>{if(c(a?"":"metrics are required"),d(r?"":"flags are required"),!a||!r)return;t.set("flags",r),t.set("metrics",a),n(t);const o=((e,t,n)=>`${e}/retention-filters-debug?${[`flags=${encodeURIComponent(t)}`,`metrics=${encodeURIComponent(n)}`].join("&")}`)(e,r,a);l(!0);try{var s,u;const e=await fetch(o),t=await e.json();i(new Map(Object.entries(t.result||{}))),c((null===(s=t.error)||void 0===s?void 0:s.metrics)||""),d((null===(u=t.error)||void 0===u?void 0:u.flags)||""),m("")}catch(zp){zp instanceof Error&&"AbortError"!==zp.name&&m(`${zp.name}: ${zp.message}`)}l(!1)}),[e])}},Pp={flags:'-retentionPeriod=1y\n-retentionFilters={env!="prod"}:2w\n',metrics:'up\nup{env="dev"}\nup{env="prod"}'},Ip=()=>{const[e]=je(),{data:t,loading:n,error:a,metricsError:i,flagsError:o,applyFilters:l}=Lp(),[s,c]=(0,r.useState)(e.get("metrics")||""),[u,d]=(0,r.useState)(e.get("flags")||""),h=(0,r.useCallback)((e=>{c(e)}),[c]),m=(0,r.useCallback)((e=>{d(e)}),[d]),p=(0,r.useCallback)((()=>{l(u,s)}),[l,u,s]),f=(0,r.useCallback)((()=>{const{flags:t,metrics:n}=Pp;d(t),c(n),l(t,n),e.set("flags",t),e.set("metrics",n)}),[Pp,d,c,e]);(0,r.useEffect)((()=>{u&&s&&p()}),[]);const v=[];for(const[r,g]of t)v.push(Nt("tr",{className:"vm-table__row",children:[Nt("td",{className:"vm-table-cell",children:r}),Nt("td",{className:"vm-table-cell",children:g})]}));return Nt("section",{className:"vm-retention-filters",children:[n&&Nt(wl,{}),Nt("div",{className:"vm-retention-filters-body vm-block",children:[Nt("div",{className:"vm-retention-filters-body__expr",children:[Nt("div",{className:"vm-retention-filters-body__title",children:Nt("p",{children:["Provide a list of flags for retention configuration. Note that only ",Nt("code",{children:"-retentionPeriod"})," and ",Nt("code",{children:"-retentionFilters"})," flags are supported."]})}),Nt(Ka,{type:"textarea",label:"Flags",value:u,error:a||o,autofocus:!0,onEnter:p,onChange:m,placeholder:'-retentionPeriod=4w -retentionFilters=up{env="dev"}:2w'})]}),Nt("div",{className:"vm-retention-filters-body__expr",children:[Nt("div",{className:"vm-retention-filters-body__title",children:Nt("p",{children:"Provide a list of metrics to check retention configuration."})}),Nt(Ka,{type:"textarea",label:"Metrics",value:s,error:a||i,onEnter:p,onChange:h,placeholder:'up{env="dev"}\nup{env="prod"}\n'})]}),Nt("div",{className:"vm-retention-filters-body__result",children:Nt("table",{className:"vm-table",children:[Nt("thead",{className:"vm-table-header",children:Nt("tr",{children:[Nt("th",{className:"vm-table-cell vm-table-cell_header",children:"Metric"}),Nt("th",{className:"vm-table-cell vm-table-cell_header",children:"Applied retention"})]})}),Nt("tbody",{className:"vm-table-body",children:v})]})}),Nt("div",{className:"vm-retention-filters-body-top",children:[Nt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/#retention-filters",rel:"help noreferrer",children:[Nt(or,{}),"Documentation"]}),Nt(da,{variant:"text",onClick:f,children:"Try example"}),Nt(da,{variant:"contained",onClick:p,startIcon:Nt(qn,{}),children:"Apply"})]})]})]})},Op=()=>{const[e,t]=(0,r.useState)(!1);return Nt(Ct.FK,{children:Nt(Le,{children:Nt(ia,{children:Nt(Ct.FK,{children:[Nt(Wm,{onLoaded:t}),e&&Nt(xe,{children:Nt(we,{path:"/",element:Nt(Hi,{}),children:[Nt(we,{path:We.home,element:Nt(am,{})}),Nt(we,{path:We.metrics,element:Nt(dp,{})}),Nt(we,{path:We.cardinality,element:Nt(Rm,{})}),Nt(we,{path:We.topQueries,element:Nt(Vm,{})}),Nt(we,{path:We.trace,element:Nt(Zm,{})}),Nt(we,{path:We.queryAnalyzer,element:Nt(Ap,{})}),Nt(we,{path:We.dashboards,element:Nt(sm,{})}),Nt(we,{path:We.withTemplate,element:Nt(_p,{})}),Nt(we,{path:We.relabel,element:Nt(kp,{})}),Nt(we,{path:We.activeQueries,element:Nt(Sp,{})}),Nt(we,{path:We.icons,element:Nt(hp,{})}),Nt(we,{path:We.downsamplingDebug,element:Nt($p,{})}),Nt(we,{path:We.retentionDebug,element:Nt(Ip,{})})]})})]})})})})},Rp=e=>{e&&n.e(685).then(n.bind(n,685)).then((t=>{let{onCLS:n,onINP:r,onFCP:a,onLCP:i,onTTFB:o}=t;n(e),r(e),a(e),i(e),o(e)}))},Dp=document.getElementById("root");Dp&&(0,r.render)(Nt(Op,{}),Dp),Rp()})()})(); \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.7ec4e6eb.js b/app/vmselect/vmui/static/js/main.7ec4e6eb.js new file mode 100644 index 000000000..342fcc85e --- /dev/null +++ b/app/vmselect/vmui/static/js/main.7ec4e6eb.js @@ -0,0 +1,2 @@ +/*! For license information please see main.7ec4e6eb.js.LICENSE.txt */ +(()=>{var e={61:(e,t,n)=>{"use strict";var r=n(375),a=n(629),i=a(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&i(e,".prototype.")>-1?a(n):n}},629:(e,t,n)=>{"use strict";var r=n(989),a=n(375),i=n(259),o=n(277),l=a("%Function.prototype.apply%"),s=a("%Function.prototype.call%"),c=a("%Reflect.apply%",!0)||r.call(s,l),u=n(709),d=a("%Math.max%");e.exports=function(e){if("function"!==typeof e)throw new o("a function is required");var t=c(r,s,arguments);return i(t,1+d(0,e.length-(arguments.length-1)),!0)};var h=function(){return c(r,l,arguments)};u?u(e.exports,"apply",{value:h}):e.exports.apply=h},159:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",a="second",i="minute",o="hour",l="day",s="week",c="month",u="quarter",d="year",h="date",m="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),a=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(a,2,"0")},m:function e(t,n){if(t.date()1)return e(o[0])}else{var l=t.name;b[l]=t,a=l}return!r&&a&&(_=a),a||!r&&_},S=function(e,t){if(k(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new E(n)},C=y;C.l=x,C.i=k,C.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function v(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=v.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(C.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(p);if(r){var a=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return C},g.isValid=function(){return!(this.$d.toString()===m)},g.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return S(e)=0&&(i[d]=parseInt(u,10))}var h=i[3],m=24===h?0:h,p=i[0]+"-"+i[1]+"-"+i[2]+" "+m+":"+i[4]+":"+i[5]+":000",f=+t;return(a.utc(p).valueOf()-(f-=f%1e3))/6e4},s=r.prototype;s.tz=function(e,t){void 0===e&&(e=i);var n,r=this.utcOffset(),o=this.toDate(),l=o.toLocaleString("en-US",{timeZone:e}),s=Math.round((o-new Date(l))/1e3/60),c=15*-Math.round(o.getTimezoneOffset()/15)-s;if(Number(c)){if(n=a(l,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var u=n.utcOffset();n=n.add(r-u,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},s.offsetName=function(e){var t=this.$x.$timezone||a.tz.guess(),n=o(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return n&&n.value};var c=s.startOf;s.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(n,e,t).tz(this.$x.$timezone,!0)},a.tz=function(e,t,n){var r=n&&t,o=n||t||i,s=l(+a(),o);if("string"!=typeof e)return a(e).tz(o);var c=function(e,t,n){var r=e-60*t*1e3,a=l(r,n);if(t===a)return[r,t];var i=l(r-=60*(a-t)*1e3,n);return a===i?[r,a]:[e-60*Math.min(a,i)*1e3,Math.max(a,i)]}(a.utc(e,r).valueOf(),s,o),u=c[0],d=c[1],h=a(u).utcOffset(d);return h.$x.$timezone=o,h},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(e){i=e}}}()},220:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,a,i){var o=a.prototype;i.utc=function(e){return new a({date:e,utc:!0,args:arguments})},o.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},o.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var l=o.parse;o.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),l.call(this,e)};var s=o.init;o.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else s.call(this)};var c=o.utcOffset;o.utcOffset=function(r,a){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var a=(""+r[0]).match(n)||["-",0,0],i=a[0],o=60*+a[1]+ +a[2];return 0===o?0:"+"===i?o:-o}(r),null===r))return this;var o=Math.abs(r)<=16?60*r:r,l=this;if(a)return l.$offset=o,l.$u=0===r,l;if(0!==r){var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(l=this.local().add(o+s,e)).$offset=o,l.$x.$localOffset=s}else l=this.utc();return l};var u=o.format;o.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},o.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var d=o.toDate;o.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=o.diff;o.diff=function(e,t,n){if(e&&this.$u===e.$u)return h.call(this,e,t,n);var r=this.local(),a=i(e).local();return h.call(r,a,t,n)}}}()},411:(e,t,n)=>{"use strict";var r=n(709),a=n(430),i=n(277),o=n(553);e.exports=function(e,t,n){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new i("`obj` must be an object or a function`");if("string"!==typeof t&&"symbol"!==typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!o&&o(e,t);if(r)r(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===l&&d?d.enumerable:!l,value:n,writable:null===s&&d?d.writable:!s});else{if(!u&&(l||s||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},709:(e,t,n)=>{"use strict";var r=n(375)("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(a){r=!1}e.exports=r},123:e=>{"use strict";e.exports=EvalError},953:e=>{"use strict";e.exports=Error},780:e=>{"use strict";e.exports=RangeError},768:e=>{"use strict";e.exports=ReferenceError},430:e=>{"use strict";e.exports=SyntaxError},277:e=>{"use strict";e.exports=TypeError},619:e=>{"use strict";e.exports=URIError},307:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r{"use strict";var r=n(307);e.exports=Function.prototype.bind||r},375:(e,t,n)=>{"use strict";var r,a=n(953),i=n(123),o=n(780),l=n(768),s=n(430),c=n(277),u=n(619),d=Function,h=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(t){}},m=Object.getOwnPropertyDescriptor;if(m)try{m({},"")}catch(O){m=null}var p=function(){throw new c},f=m?function(){try{return p}catch(e){try{return m(arguments,"callee").get}catch(t){return p}}}():p,v=n(757)(),g=n(442)(),y=Object.getPrototypeOf||(g?function(e){return e.__proto__}:null),_={},b="undefined"!==typeof Uint8Array&&y?y(Uint8Array):r,w={__proto__:null,"%AggregateError%":"undefined"===typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":v&&y?y([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":_,"%AsyncGenerator%":_,"%AsyncGeneratorFunction%":_,"%AsyncIteratorPrototype%":_,"%Atomics%":"undefined"===typeof Atomics?r:Atomics,"%BigInt%":"undefined"===typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":a,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"===typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":_,"%Int8Array%":"undefined"===typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":v&&y?y(y([][Symbol.iterator]())):r,"%JSON%":"object"===typeof JSON?JSON:r,"%Map%":"undefined"===typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&v&&y?y((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?r:Promise,"%Proxy%":"undefined"===typeof Proxy?r:Proxy,"%RangeError%":o,"%ReferenceError%":l,"%Reflect%":"undefined"===typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&v&&y?y((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":v&&y?y(""[Symbol.iterator]()):r,"%Symbol%":v?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":f,"%TypedArray%":b,"%TypeError%":c,"%Uint8Array%":"undefined"===typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"===typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?r:WeakSet};if(y)try{null.error}catch(O){var k=y(y(O));w["%Error.prototype%"]=k}var x=function e(t){var n;if("%AsyncFunction%"===t)n=h("async function () {}");else if("%GeneratorFunction%"===t)n=h("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=h("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var a=e("%AsyncGenerator%");a&&y&&(n=y(a.prototype))}return w[t]=n,n},S={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(989),E=n(155),N=C.call(Function.call,Array.prototype.concat),A=C.call(Function.apply,Array.prototype.splice),M=C.call(Function.call,String.prototype.replace),T=C.call(Function.call,String.prototype.slice),$=C.call(Function.call,RegExp.prototype.exec),L=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,P=/\\(\\)?/g,I=function(e,t){var n,r=e;if(E(S,r)&&(r="%"+(n=S[r])[0]+"%"),E(w,r)){var a=w[r];if(a===_&&(a=x(r)),"undefined"===typeof a&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:a}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===$(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=T(e,0,1),n=T(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return M(e,L,(function(e,t,n,a){r[r.length]=n?M(a,P,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",a=I("%"+r+"%",t),i=a.name,o=a.value,l=!1,u=a.alias;u&&(r=u[0],A(n,N([0,1],u)));for(var d=1,h=!0;d=n.length){var g=m(o,p);o=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:o[p]}else h=E(o,p),o=o[p];h&&!l&&(w[i]=o)}}return o}},553:(e,t,n)=>{"use strict";var r=n(375)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(a){r=null}e.exports=r},734:(e,t,n)=>{"use strict";var r=n(709),a=function(){return!!r};a.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=a},442:e=>{"use strict";var t={__proto__:null,foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof n)}},757:(e,t,n)=>{"use strict";var r="undefined"!==typeof Symbol&&Symbol,a=n(175);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&a())))}},175:e=>{"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}},155:(e,t,n)=>{"use strict";var r=Function.prototype.call,a=Object.prototype.hasOwnProperty,i=n(989);e.exports=i.call(r,a)},267:(e,t,n)=>{var r=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),d=Object.prototype.toString,h=Math.max,m=Math.min,p=function(){return u.Date.now()};function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(f(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=f(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=i.test(e);return n||o.test(e)?l(e.slice(2),n?2:8):a.test(e)?NaN:+e}e.exports=function(e,t,n){var r,a,i,o,l,s,c=0,u=!1,d=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,i=a;return r=a=void 0,c=t,o=e.apply(i,n)}function _(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-c>=i}function b(){var e=p();if(_(e))return w(e);l=setTimeout(b,function(e){var n=t-(e-s);return d?m(n,i-(e-c)):n}(e))}function w(e){return l=void 0,g&&r?y(e):(r=a=void 0,o)}function k(){var e=p(),n=_(e);if(r=arguments,a=this,s=e,n){if(void 0===l)return function(e){return c=e,l=setTimeout(b,t),u?y(e):o}(s);if(d)return l=setTimeout(b,t),y(s)}return void 0===l&&(l=setTimeout(b,t)),o}return t=v(t)||0,f(n)&&(u=!!n.leading,i=(d="maxWait"in n)?h(v(n.maxWait)||0,t):i,g="trailing"in n?!!n.trailing:g),k.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=s=a=l=void 0},k.flush=function(){return void 0===l?o:w(p())},k}},424:(e,t,n)=>{var r="__lodash_hash_undefined__",a="[object Function]",i="[object GeneratorFunction]",o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,s=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,d=/^\[object .+?Constructor\]$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,m="object"==typeof self&&self&&self.Object===Object&&self,p=h||m||Function("return this")();var f=Array.prototype,v=Function.prototype,g=Object.prototype,y=p["__core-js_shared__"],_=function(){var e=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=v.toString,w=g.hasOwnProperty,k=g.toString,x=RegExp("^"+b.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=p.Symbol,C=f.splice,E=D(p,"Map"),N=D(Object,"create"),A=S?S.prototype:void 0,M=A?A.toString:void 0;function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},$.prototype.set=function(e,t){var n=this.__data__,r=P(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new T,map:new(E||$),string:new T}},L.prototype.delete=function(e){return R(this,e).delete(e)},L.prototype.get=function(e){return R(this,e).get(e)},L.prototype.has=function(e){return R(this,e).has(e)},L.prototype.set=function(e,t){return R(this,e).set(e,t),this};var z=j((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(U(e))return M?M.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return s.test(e)&&n.push(""),e.replace(c,(function(e,t,r,a){n.push(r?a.replace(u,"$1"):t||e)})),n}));function F(e){if("string"==typeof e||U(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function j(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=e.apply(this,r);return n.cache=i.set(a,o),o};return n.cache=new(j.Cache||L),n}j.Cache=L;var H=Array.isArray;function V(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function U(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==k.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:I(e,t);return void 0===r?n:r}},141:(e,t,n)=>{var r="function"===typeof Map&&Map.prototype,a=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&a&&"function"===typeof a.get?a.get:null,o=r&&Map.prototype.forEach,l="function"===typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&l?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=l&&s&&"function"===typeof s.get?s.get:null,u=l&&Set.prototype.forEach,d="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,m="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,f=Object.prototype.toString,v=Function.prototype.toString,g=String.prototype.match,y=String.prototype.slice,_=String.prototype.replace,b=String.prototype.toUpperCase,w=String.prototype.toLowerCase,k=RegExp.prototype.test,x=Array.prototype.concat,S=Array.prototype.join,C=Array.prototype.slice,E=Math.floor,N="function"===typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,M="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"===typeof Symbol&&"object"===typeof Symbol.iterator,$="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T||"symbol")?Symbol.toStringTag:null,L=Object.prototype.propertyIsEnumerable,P=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function I(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||k.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var r=e<0?-E(-e):E(e);if(r!==e){var a=String(r),i=y.call(t,a.length+1);return _.call(a,n,"$&_")+"."+_.call(_.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(t,n,"$&_")}var O=n(634),R=O.custom,D=V(R)?R:null;function z(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function F(e){return _.call(String(e),/"/g,""")}function j(e){return"[object Array]"===q(e)&&(!$||!("object"===typeof e&&$ in e))}function H(e){return"[object RegExp]"===q(e)&&(!$||!("object"===typeof e&&$ in e))}function V(e){if(T)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!M)return!1;try{return M.call(e),!0}catch(t){}return!1}e.exports=function e(t,r,a,l){var s=r||{};if(B(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(B(s,"maxStringLength")&&("number"===typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var f=!B(s,"customInspect")||s.customInspect;if("boolean"!==typeof f&&"symbol"!==f)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(B(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(B(s,"numericSeparator")&&"boolean"!==typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var b=s.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return W(t,s);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var k=String(t);return b?I(t,k):k}if("bigint"===typeof t){var E=String(t)+"n";return b?I(t,E):E}var A="undefined"===typeof s.depth?5:s.depth;if("undefined"===typeof a&&(a=0),a>=A&&A>0&&"object"===typeof t)return j(t)?"[Array]":"[Object]";var R=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=S.call(Array(e.indent+1)," ")}return{base:n,prev:S.call(Array(t+1),n)}}(s,a);if("undefined"===typeof l)l=[];else if(Y(l,t)>=0)return"[Circular]";function U(t,n,r){if(n&&(l=C.call(l)).push(n),r){var i={depth:s.depth};return B(s,"quoteStyle")&&(i.quoteStyle=s.quoteStyle),e(t,i,a+1,l)}return e(t,s,a+1,l)}if("function"===typeof t&&!H(t)){var K=function(e){if(e.name)return e.name;var t=g.call(v.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=X(t,U);return"[Function"+(K?": "+K:" (anonymous)")+"]"+(ee.length>0?" { "+S.call(ee,", ")+" }":"")}if(V(t)){var te=T?_.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):M.call(t);return"object"!==typeof t||T?te:Q(te)}if(function(e){if(!e||"object"!==typeof e)return!1;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"===typeof e.nodeName&&"function"===typeof e.getAttribute}(t)){for(var ne="<"+w.call(String(t.nodeName)),re=t.attributes||[],ae=0;ae"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,U);return R&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+J(ie,R)+"]":"[ "+S.call(ie,", ")+" ]"}if(function(e){return"[object Error]"===q(e)&&(!$||!("object"===typeof e&&$ in e))}(t)){var oe=X(t,U);return"cause"in Error.prototype||!("cause"in t)||L.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(oe,", ")+" }":"{ ["+String(t)+"] "+S.call(x.call("[cause]: "+U(t.cause),oe),", ")+" }"}if("object"===typeof t&&f){if(D&&"function"===typeof t[D]&&O)return O(t,{depth:A-a});if("symbol"!==f&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!==typeof e)return!1;try{i.call(e);try{c.call(e)}catch(ne){return!0}return e instanceof Map}catch(t){}return!1}(t)){var le=[];return o&&o.call(t,(function(e,n){le.push(U(n,t,!0)+" => "+U(e,t))})),G("Map",i.call(t),le,R)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{i.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(U(e,t))})),G("Set",c.call(t),se,R)}if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(ne){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return Z("WeakMap");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(ne){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return Z("WeakSet");if(function(e){if(!m||!e||"object"!==typeof e)return!1;try{return m.call(e),!0}catch(t){}return!1}(t))return Z("WeakRef");if(function(e){return"[object Number]"===q(e)&&(!$||!("object"===typeof e&&$ in e))}(t))return Q(U(Number(t)));if(function(e){if(!e||"object"!==typeof e||!N)return!1;try{return N.call(e),!0}catch(t){}return!1}(t))return Q(U(N.call(t)));if(function(e){return"[object Boolean]"===q(e)&&(!$||!("object"===typeof e&&$ in e))}(t))return Q(p.call(t));if(function(e){return"[object String]"===q(e)&&(!$||!("object"===typeof e&&$ in e))}(t))return Q(U(String(t)));if("undefined"!==typeof window&&t===window)return"{ [object Window] }";if("undefined"!==typeof globalThis&&t===globalThis||"undefined"!==typeof n.g&&t===n.g)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===q(e)&&(!$||!("object"===typeof e&&$ in e))}(t)&&!H(t)){var ce=X(t,U),ue=P?P(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",he=!ue&&$&&Object(t)===t&&$ in t?y.call(q(t),8,-1):de?"Object":"",me=(ue||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(he||de?"["+S.call(x.call([],he||[],de||[]),": ")+"] ":"");return 0===ce.length?me+"{}":R?me+"{"+J(ce,R)+"}":me+"{ "+S.call(ce,", ")+" }"}return String(t)};var U=Object.prototype.hasOwnProperty||function(e){return e in this};function B(e,t){return U.call(e,t)}function q(e){return f.call(e)}function Y(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return W(y.call(e,0,t.maxStringLength),t)+r}return z(_.call(_.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",t)}function K(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+b.call(t.toString(16))}function Q(e){return"Object("+e+")"}function Z(e){return e+" { ? }"}function G(e,t,n,r){return e+" ("+t+") {"+(r?J(n,r):S.call(n,", "))+"}"}function J(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+S.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var a=0;a{"use strict";n.r(t),n.d(t,{Children:()=>B,Component:()=>l.uA,Fragment:()=>l.FK,PureComponent:()=>z,StrictMode:()=>$e,Suspense:()=>Q,SuspenseList:()=>J,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>be,cloneElement:()=>Ee,createContext:()=>l.q6,createElement:()=>l.n,createFactory:()=>ke,createPortal:()=>ne,createRef:()=>l._3,default:()=>Fe,findDOMNode:()=>Ae,flushSync:()=>Te,forwardRef:()=>V,hydrate:()=>ue,isElement:()=>Re,isFragment:()=>Se,isMemo:()=>Ce,isValidElement:()=>xe,lazy:()=>G,memo:()=>F,render:()=>ce,startTransition:()=>Le,unmountComponentAtNode:()=>Ne,unstable_batchedUpdates:()=>Me,useCallback:()=>C,useContext:()=>E,useDebugValue:()=>N,useDeferredValue:()=>Pe,useEffect:()=>b,useErrorBoundary:()=>A,useId:()=>M,useImperativeHandle:()=>x,useInsertionEffect:()=>Oe,useLayoutEffect:()=>w,useMemo:()=>S,useReducer:()=>_,useRef:()=>k,useState:()=>y,useSyncExternalStore:()=>De,useTransition:()=>Ie,version:()=>we});var r,a,i,o,l=n(746),s=0,c=[],u=l.fF,d=u.__b,h=u.__r,m=u.diffed,p=u.__c,f=u.unmount,v=u.__;function g(e,t){u.__h&&u.__h(a,e,s||t),s=0;var n=a.__H||(a.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function y(e){return s=1,_(R,e)}function _(e,t,n){var i=g(r++,2);if(i.t=e,!i.__c&&(i.__=[n?n(t):R(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=a,!a.u)){var o=function(e,t,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!l||l.call(this,e,t,n);var a=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&i.__c.props===e)&&(!l||l.call(this,e,t,n))};a.u=!0;var l=a.shouldComponentUpdate,s=a.componentWillUpdate;a.componentWillUpdate=function(e,t,n){if(this.__e){var r=l;l=void 0,o(e,t,n),l=r}s&&s.call(this,e,t,n)},a.shouldComponentUpdate=o}return i.__N||i.__}function b(e,t){var n=g(r++,3);!u.__s&&O(n.__H,t)&&(n.__=e,n.i=t,a.__H.__h.push(n))}function w(e,t){var n=g(r++,4);!u.__s&&O(n.__H,t)&&(n.__=e,n.i=t,a.__h.push(n))}function k(e){return s=5,S((function(){return{current:e}}),[])}function x(e,t,n){s=6,w((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function S(e,t){var n=g(r++,7);return O(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function C(e,t){return s=8,S((function(){return e}),t)}function E(e){var t=a.context[e.__c],n=g(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(a)),t.props.value):e.__}function N(e,t){u.useDebugValue&&u.useDebugValue(t?t(e):e)}function A(e){var t=g(r++,10),n=y();return t.__=e,a.componentDidCatch||(a.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function M(){var e=g(r++,11);if(!e.__){for(var t=a.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function T(){for(var e;e=c.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(P),e.__H.__h.forEach(I),e.__H.__h=[]}catch(r){e.__H.__h=[],u.__e(r,e.__v)}}u.__b=function(e){a=null,d&&d(e)},u.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),v&&v(e,t)},u.__r=function(e){h&&h(e),r=0;var t=(a=e.__c).__H;t&&(i===a?(t.__h=[],a.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(P),t.__h.forEach(I),t.__h=[],r=0)),i=a},u.diffed=function(e){m&&m(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==c.push(t)&&o===u.requestAnimationFrame||((o=u.requestAnimationFrame)||L)(T)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),i=a=null},u.__c=function(e,t){t.some((function(e){try{e.__h.forEach(P),e.__h=e.__h.filter((function(e){return!e.__||I(e)}))}catch(a){t.some((function(e){e.__h&&(e.__h=[])})),t=[],u.__e(a,e.__v)}})),p&&p(e,t)},u.unmount=function(e){f&&f(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{P(e)}catch(e){t=e}})),n.__H=void 0,t&&u.__e(t,n.__v))};var $="function"==typeof requestAnimationFrame;function L(e){var t,n=function(){clearTimeout(r),$&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);$&&(t=requestAnimationFrame(n))}function P(e){var t=a,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),a=t}function I(e){var t=a;e.__c=e.__(),a=t}function O(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function R(e,t){return"function"==typeof t?t(e):t}function D(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function z(e,t){this.props=e,this.context=t}function F(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:D(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,l.n)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(z.prototype=new l.uA).isPureReactComponent=!0,z.prototype.shouldComponentUpdate=function(e,t){return D(this.props,e)||D(this.state,t)};var j=l.fF.__b;l.fF.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),j&&j(e)};var H="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function V(e){function t(t){if(!("ref"in t))return e(t,null);var n=t.ref;delete t.ref;var r=e(t,n);return t.ref=n,r}return t.$$typeof=H,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var U=function(e,t){return null==e?null:(0,l.v2)((0,l.v2)(e).map(t))},B={map:U,forEach:U,count:function(e){return e?(0,l.v2)(e).length:0},only:function(e){var t=(0,l.v2)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:l.v2},q=l.fF.__e;l.fF.__e=function(e,t,n,r){if(e.then)for(var a,i=t;i=i.__;)if((a=i.__c)&&a.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),a.__c(e,t);q(e,t,n,r)};var Y=l.fF.unmount;function W(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return W(e,t,n)}))),e}function K(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return K(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Q(){this.__u=0,this.t=null,this.__b=null}function Z(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function G(e){var t,n,r;function a(a){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,l.n)(n,a)}return a.displayName="Lazy",a.__f=!0,a}function J(){this.u=null,this.o=null}l.fF.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Y&&Y(e)},(Q.prototype=new l.uA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var a=Z(r.__v),i=!1,o=function(){i||(i=!0,n.__R=null,a?a(l):l())};n.__R=o;var l=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=K(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},Q.prototype.componentWillUnmount=function(){this.t=[]},Q.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=W(this.__b,n,r.__O=r.__P)}this.__b=null}var a=t.__a&&(0,l.n)(l.FK,null,e.fallback);return a&&(a.__u&=-33),[(0,l.n)(l.FK,null,t.__a?null:e.children),a]};var X=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),(0,l.XX)((0,l.n)(ee,{context:t.context},e.__v),t.l)}function ne(e,t){var n=(0,l.n)(te,{__v:e,i:t});return n.containerInfo=t,n}(J.prototype=new l.uA).__a=function(e){var t=this,n=Z(t.__v),r=t.o.get(e);return r[0]++,function(a){var i=function(){t.props.revealOrder?(r.push(a),X(t,e,r)):a()};n?n(i):i()}},J.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,l.v2)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},J.prototype.componentDidUpdate=J.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){X(e,n,t)}))};var re="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ae=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ie=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,oe=/[A-Z0-9]/g,le="undefined"!=typeof document,se=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function ce(e,t,n){return null==t.__k&&(t.textContent=""),(0,l.XX)(e,t),"function"==typeof n&&n(),e?e.__c:null}function ue(e,t,n){return(0,l.Qv)(e,t),"function"==typeof n&&n(),e?e.__c:null}l.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(l.uA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var de=l.fF.event;function he(){}function me(){return this.cancelBubble}function pe(){return this.defaultPrevented}l.fF.event=function(e){return de&&(e=de(e)),e.persist=he,e.isPropagationStopped=me,e.isDefaultPrevented=pe,e.nativeEvent=e};var fe,ve={enumerable:!1,configurable:!0,get:function(){return this.class}},ge=l.fF.vnode;l.fF.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},a=-1===n.indexOf("-");for(var i in t){var o=t[i];if(!("value"===i&&"defaultValue"in t&&null==o||le&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var s=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===o?o="":"translate"===s&&"no"===o?o=!1:"o"===s[0]&&"n"===s[1]?"ondoubleclick"===s?i="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||se(t.type)?"onfocus"===s?i="onfocusin":"onblur"===s?i="onfocusout":ie.test(i)&&(i=s):s=i="oninput":a&&ae.test(i)?i=i.replace(oe,"-$&").toLowerCase():null===o&&(o=void 0),"oninput"===s&&r[i=s]&&(i="oninputCapture"),r[i]=o}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",ve)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=re,ge&&ge(e)};var ye=l.fF.__r;l.fF.__r=function(e){ye&&ye(e),fe=e.__c};var _e=l.fF.diffed;l.fF.diffed=function(e){_e&&_e(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),fe=null};var be={ReactCurrentDispatcher:{current:{readContext:function(e){return fe.__n[e.__c].props.value},useCallback:C,useContext:E,useDebugValue:N,useDeferredValue:Pe,useEffect:b,useId:M,useImperativeHandle:x,useInsertionEffect:Oe,useLayoutEffect:w,useMemo:S,useReducer:_,useRef:k,useState:y,useSyncExternalStore:De,useTransition:Ie}}},we="18.3.1";function ke(e){return l.n.bind(null,e)}function xe(e){return!!e&&e.$$typeof===re}function Se(e){return xe(e)&&e.type===l.FK}function Ce(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ee(e){return xe(e)?l.Ob.apply(null,arguments):e}function Ne(e){return!!e.__k&&((0,l.XX)(null,e),!0)}function Ae(e){return e&&(e.base||1===e.nodeType&&e)||null}var Me=function(e,t){return e(t)},Te=function(e,t){return e(t)},$e=l.FK;function Le(e){e()}function Pe(e){return e}function Ie(){return[!1,Le]}var Oe=w,Re=xe;function De(e,t){var n=t(),r=y({h:{__:n,v:t}}),a=r[0].h,i=r[1];return w((function(){a.__=n,a.v=t,ze(a)&&i({h:a})}),[e,n,t]),b((function(){return ze(a)&&i({h:a}),e((function(){ze(a)&&i({h:a})}))}),[e]),n}function ze(e){var t,n,r=e.v,a=e.__;try{var i=r();return!((t=a)===(n=i)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}var Fe={useState:y,useId:M,useReducer:_,useEffect:b,useLayoutEffect:w,useInsertionEffect:Oe,useTransition:Ie,useDeferredValue:Pe,useSyncExternalStore:De,startTransition:Le,useRef:k,useImperativeHandle:x,useMemo:S,useCallback:C,useContext:E,useDebugValue:N,version:"18.3.1",Children:B,render:ce,hydrate:ue,unmountComponentAtNode:Ne,createPortal:ne,createElement:l.n,createContext:l.q6,createFactory:ke,cloneElement:Ee,createRef:l._3,Fragment:l.FK,isValidElement:xe,isElement:Re,isFragment:Se,isMemo:Ce,findDOMNode:Ae,Component:l.uA,PureComponent:z,memo:F,forwardRef:V,flushSync:Te,unstable_batchedUpdates:Me,StrictMode:$e,Suspense:Q,SuspenseList:J,lazy:G,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:be}},746:(e,t,n)=>{"use strict";n.d(t,{FK:()=>x,Ob:()=>q,Qv:()=>B,XX:()=>U,_3:()=>k,fF:()=>a,n:()=>b,q6:()=>Y,uA:()=>S,v2:()=>L});var r,a,i,o,l,s,c,u,d,h,m,p={},f=[],v=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function y(e,t){for(var n in t)e[n]=t[n];return e}function _(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function b(e,t,n){var a,i,o,l={};for(o in t)"key"==o?a=t[o]:"ref"==o?i=t[o]:l[o]=t[o];if(arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===l[o]&&(l[o]=e.defaultProps[o]);return w(e,l,a,i,null)}function w(e,t,n,r,o){var l={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==o?++i:o,__i:-1,__u:0};return null==o&&null!=a.vnode&&a.vnode(l),l}function k(){return{current:null}}function x(e){return e.children}function S(e,t){this.props=e,this.context=t}function C(e,t){if(null==t)return e.__?C(e.__,e.__i+1):null;for(var n;tt&&o.sort(c));A.__r=0}function M(e,t,n,r,a,i,o,l,s,c,u){var d,h,m,v,g,y=r&&r.__k||f,_=t.length;for(n.__d=s,T(n,t,y),s=n.__d,d=0;d<_;d++)null!=(m=n.__k[d])&&(h=-1===m.__i?p:y[m.__i]||p,m.__i=d,D(e,m,h,a,i,o,l,s,c,u),v=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&j(h.ref,null,m),u.push(m.ref,m.__c||v,m)),null==g&&null!=v&&(g=v),65536&m.__u||h.__k===m.__k?s=$(m,s,e):"function"==typeof m.type&&void 0!==m.__d?s=m.__d:v&&(s=v.nextSibling),m.__d=void 0,m.__u&=-196609);n.__d=s,n.__e=g}function T(e,t,n){var r,a,i,o,l,s=t.length,c=n.length,u=c,d=0;for(e.__k=[],r=0;r0?w(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,i=null,-1!==(l=a.__i=P(a,n,o,u))&&(u--,(i=n[l])&&(i.__u|=131072)),null==i||null===i.__v?(-1==l&&d--,"function"!=typeof a.type&&(a.__u|=65536)):l!==o&&(l==o-1?d--:l==o+1?d++:(l>o?d--:d++,a.__u|=65536))):a=e.__k[r]=null;if(u)for(r=0;r(null!=s&&0==(131072&s.__u)?1:0))for(;o>=0||l=0){if((s=t[o])&&0==(131072&s.__u)&&a==s.key&&i===s.type)return o;o--}if(l2&&(s.children=arguments.length>3?r.call(arguments,2):n),w(e.type,s,a||e.key,i||e.ref,null)}function Y(e,t){var n={__c:t="__cC"+m++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,N(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=f.slice,a={__e:function(e,t,n,r){for(var a,i,o;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&null!=i.getDerivedStateFromError&&(a.setState(i.getDerivedStateFromError(e)),o=a.__d),null!=a.componentDidCatch&&(a.componentDidCatch(e,r||{}),o=a.__d),o)return a.__E=a}catch(t){e=t}throw e}},i=0,S.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=y({},this.state),"function"==typeof e&&(e=e(y({},n),this.props)),e&&y(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),N(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),N(this))},S.prototype.render=x,o=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},A.__r=0,u=0,d=R(!1),h=R(!0),m=0},640:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:a}},215:(e,t,n)=>{"use strict";var r=n(518),a=n(968),i=n(640);e.exports={formats:i,parse:a,stringify:r}},968:(e,t,n)=>{"use strict";var r=n(570),a=Object.prototype.hasOwnProperty,i=Array.isArray,o={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},l=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,l=n.depth>0&&/(\[[^[\]]*])/.exec(i),c=l?i.slice(0,l.index):i,u=[];if(c){if(!n.plainObjects&&a.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var d=0;n.depth>0&&null!==(l=o.exec(i))&&d=0;--i){var o,l=e[i];if("[]"===l&&n.parseArrays)o=n.allowEmptyArrays&&(""===a||n.strictNullHandling&&null===a)?[]:[].concat(a);else{o=n.plainObjects?Object.create(null):{};var c="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,u=n.decodeDotInKeys?c.replace(/%2E/g,"."):c,d=parseInt(u,10);n.parseArrays||""!==u?!isNaN(d)&&l!==u&&String(d)===u&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(o=[])[d]=a:"__proto__"!==u&&(o[u]=a):o={0:a}}a=o}return a}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return o;if("undefined"!==typeof e.allowEmptyArrays&&"boolean"!==typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if("undefined"!==typeof e.decodeDotInKeys&&"boolean"!==typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&"undefined"!==typeof e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?o.charset:e.charset,n="undefined"===typeof e.duplicates?o.duplicates:e.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:"undefined"===typeof e.allowDots?!0===e.decodeDotInKeys||o.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"===typeof e.allowEmptyArrays?!!e.allowEmptyArrays:o.allowEmptyArrays,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:o.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:o.comma,decodeDotInKeys:"boolean"===typeof e.decodeDotInKeys?e.decodeDotInKeys:o.decodeDotInKeys,decoder:"function"===typeof e.decoder?e.decoder:o.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:o.depth,duplicates:n,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:o.plainObjects,strictDepth:"boolean"===typeof e.strictDepth?!!e.strictDepth:o.strictDepth,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var u="string"===typeof e?function(e,t){var n={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=c.split(t.delimiter,d),m=-1,p=t.charset;if(t.charsetSentinel)for(u=0;u-1&&(v=i(v)?[v]:v);var b=a.call(n,f);b&&"combine"===t.duplicates?n[f]=r.combine(n[f],v):b&&"last"!==t.duplicates||(n[f]=v)}return n}(e,n):e,d=n.plainObjects?Object.create(null):{},h=Object.keys(u),m=0;m{"use strict";var r=n(670),a=n(570),i=n(640),o=Object.prototype.hasOwnProperty,l={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,s(t)?t:[t])},d=Date.prototype.toISOString,h=i.default,m={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:a.encode,encodeValuesOnly:!1,format:h,formatter:i.formatters[h],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},p={},f=function e(t,n,i,o,l,c,d,h,f,v,g,y,_,b,w,k,x,S){for(var C,E=t,N=S,A=0,M=!1;void 0!==(N=N.get(p))&&!M;){var T=N.get(t);if(A+=1,"undefined"!==typeof T){if(T===A)throw new RangeError("Cyclic object value");M=!0}"undefined"===typeof N.get(p)&&(A=0)}if("function"===typeof v?E=v(n,E):E instanceof Date?E=_(E):"comma"===i&&s(E)&&(E=a.maybeMap(E,(function(e){return e instanceof Date?_(e):e}))),null===E){if(c)return f&&!k?f(n,m.encoder,x,"key",b):n;E=""}if("string"===typeof(C=E)||"number"===typeof C||"boolean"===typeof C||"symbol"===typeof C||"bigint"===typeof C||a.isBuffer(E))return f?[w(k?n:f(n,m.encoder,x,"key",b))+"="+w(f(E,m.encoder,x,"value",b))]:[w(n)+"="+w(String(E))];var $,L=[];if("undefined"===typeof E)return L;if("comma"===i&&s(E))k&&f&&(E=a.maybeMap(E,f)),$=[{value:E.length>0?E.join(",")||null:void 0}];else if(s(v))$=v;else{var P=Object.keys(E);$=g?P.sort(g):P}var I=h?n.replace(/\./g,"%2E"):n,O=o&&s(E)&&1===E.length?I+"[]":I;if(l&&s(E)&&0===E.length)return O+"[]";for(var R=0;R<$.length;++R){var D=$[R],z="object"===typeof D&&"undefined"!==typeof D.value?D.value:E[D];if(!d||null!==z){var F=y&&h?D.replace(/\./g,"%2E"):D,j=s(E)?"function"===typeof i?i(O,F):O:O+(y?"."+F:"["+F+"]");S.set(t,A);var H=r();H.set(p,S),u(L,e(z,j,i,o,l,c,d,h,"comma"===i&&k&&s(E)?null:f,v,g,y,_,b,w,k,x,H))}}return L};e.exports=function(e,t){var n,a=e,c=function(e){if(!e)return m;if("undefined"!==typeof e.allowEmptyArrays&&"boolean"!==typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if("undefined"!==typeof e.encodeDotInKeys&&"boolean"!==typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&"undefined"!==typeof e.encoder&&"function"!==typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||m.charset;if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=i.default;if("undefined"!==typeof e.format){if(!o.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r,a=i.formatters[n],c=m.filter;if(("function"===typeof e.filter||s(e.filter))&&(c=e.filter),r=e.arrayFormat in l?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":m.arrayFormat,"commaRoundTrip"in e&&"boolean"!==typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u="undefined"===typeof e.allowDots?!0===e.encodeDotInKeys||m.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"===typeof e.addQueryPrefix?e.addQueryPrefix:m.addQueryPrefix,allowDots:u,allowEmptyArrays:"boolean"===typeof e.allowEmptyArrays?!!e.allowEmptyArrays:m.allowEmptyArrays,arrayFormat:r,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:m.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:"undefined"===typeof e.delimiter?m.delimiter:e.delimiter,encode:"boolean"===typeof e.encode?e.encode:m.encode,encodeDotInKeys:"boolean"===typeof e.encodeDotInKeys?e.encodeDotInKeys:m.encodeDotInKeys,encoder:"function"===typeof e.encoder?e.encoder:m.encoder,encodeValuesOnly:"boolean"===typeof e.encodeValuesOnly?e.encodeValuesOnly:m.encodeValuesOnly,filter:c,format:n,formatter:a,serializeDate:"function"===typeof e.serializeDate?e.serializeDate:m.serializeDate,skipNulls:"boolean"===typeof e.skipNulls?e.skipNulls:m.skipNulls,sort:"function"===typeof e.sort?e.sort:null,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:m.strictNullHandling}}(t);"function"===typeof c.filter?a=(0,c.filter)("",a):s(c.filter)&&(n=c.filter);var d=[];if("object"!==typeof a||null===a)return"";var h=l[c.arrayFormat],p="comma"===h&&c.commaRoundTrip;n||(n=Object.keys(a)),c.sort&&n.sort(c.sort);for(var v=r(),g=0;g0?b+_:""}},570:(e,t,n)=>{"use strict";var r=n(640),a=Object.prototype.hasOwnProperty,i=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),l=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],a=0;a=s?l.slice(u,u+s):l,h=[],m=0;m=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||i===r.RFC1738&&(40===p||41===p)?h[h.length]=d.charAt(m):p<128?h[h.length]=o[p]:p<2048?h[h.length]=o[192|p>>6]+o[128|63&p]:p<55296||p>=57344?h[h.length]=o[224|p>>12]+o[128|p>>6&63]+o[128|63&p]:(m+=1,p=65536+((1023&p)<<10|1023&d.charCodeAt(m)),h[h.length]=o[240|p>>18]+o[128|p>>12&63]+o[128|p>>6&63]+o[128|63&p])}c+=h.join("")}return c},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;r{e.exports=n(204)},204:(e,t,n)=>{"use strict";var r=function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(n(609)),a=n(609);function i(){return(i=Object.assign||function(e){for(var t=1;tr.length&&h(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var a=r.length,i=t.length;i>=r.length;i--){var o=t[i];if(!h(e,i)&&m(e,i,o)){a=i+1;break}}return a}function v(e,t){return f(e,t)===e.mask.length}function g(e,t){var n=e.maskChar,r=e.mask,a=e.prefix;if(!n){for((t=y(e,"",t,0)).lengtht.length&&(t+=a.slice(t.length,r)),l.every((function(n){for(;u=n,h(e,c=r)&&u!==a[c];){if(r>=t.length&&(t+=a[r]),l=n,i&&h(e,r)&&l===i)return!0;if(++r>=a.length)return!1}var l,c,u;return!m(e,r,n)&&n!==i||(ra.start?d=(u=function(e,t,n,r){var a=e.mask,i=e.maskChar,o=n.split(""),l=r;return o.every((function(t){for(;o=t,h(e,n=r)&&o!==a[n];)if(++r>=a.length)return!1;var n,o;return(m(e,r,t)||t===i)&&r++,r=i.length?p=i.length:p=o.length&&p{"use strict";var r=n(375),a=n(411),i=n(734)(),o=n(553),l=n(277),s=r("%Math.floor%");e.exports=function(e,t){if("function"!==typeof e)throw new l("`fn` is not a function");if("number"!==typeof t||t<0||t>4294967295||s(t)!==t)throw new l("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&o){var u=o(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(i?a(e,"length",t,!0,!0):a(e,"length",t)),e}},670:(e,t,n)=>{"use strict";var r=n(375),a=n(61),i=n(141),o=n(277),l=r("%WeakMap%",!0),s=r("%Map%",!0),c=a("WeakMap.prototype.get",!0),u=a("WeakMap.prototype.set",!0),d=a("WeakMap.prototype.has",!0),h=a("Map.prototype.get",!0),m=a("Map.prototype.set",!0),p=a("Map.prototype.has",!0),f=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new o("Side channel does not contain "+i(e))},get:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return c(e,r)}else if(s){if(t)return h(t,r)}else if(n)return function(e,t){var n=f(e,t);return n&&n.value}(n,r)},has:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return d(e,r)}else if(s){if(t)return p(t,r)}else if(n)return function(e,t){return!!f(e,t)}(n,r);return!1},set:function(r,a){l&&r&&("object"===typeof r||"function"===typeof r)?(e||(e=new l),u(e,r,a)):s?(t||(t=new s),m(t,r,a)):(n||(n={key:{},next:null}),function(e,t,n){var r=f(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,a))}};return r}},634:()=>{},738:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+e+".f772060c.chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="vmui:";n.l=(r,a,i,o)=>{if(e[r])e[r].push(a);else{var l,s;if(void 0!==i)for(var c=document.getElementsByTagName("script"),u=0;u{l.onerror=l.onload=null,clearTimeout(m);var a=e[r];if(delete e[r],l.parentNode&&l.parentNode.removeChild(l),a&&a.forEach((e=>e(n))),t)return t(n)},m=setTimeout(h.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=h.bind(null,l.onerror),l.onload=h.bind(null,l.onload),s&&document.head.appendChild(l)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="./",(()=>{var e={792:0};n.f.j=(t,r)=>{var a=n.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else{var i=new Promise(((n,r)=>a=e[t]=[n,r]));r.push(a[2]=i);var o=n.p+n.u(t),l=new Error;n.l(o,(r=>{if(n.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var i=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",l.name="ChunkLoadError",l.type=i,l.request=o,a[1](l)}}),"chunk-"+t,t)}};var t=(t,r)=>{var a,i,o=r[0],l=r[1],s=r[2],c=0;if(o.some((t=>0!==e[t]))){for(a in l)n.o(l,a)&&(n.m[a]=l[a]);if(s)s(n)}for(t&&t(r);c{"use strict";var e={};n.r(e),n.d(e,{AlarmIcon:()=>Un,ArrowDownIcon:()=>Fn,ArrowDropDownIcon:()=>jn,CalendarIcon:()=>Vn,ChartIcon:()=>Wn,ClockIcon:()=>Hn,CloseIcon:()=>Ln,CodeIcon:()=>Qn,CollapseIcon:()=>kr,CopyIcon:()=>rr,DeleteIcon:()=>Zn,DoneIcon:()=>Xn,DownloadIcon:()=>br,DragIcon:()=>ar,ErrorIcon:()=>Rn,ExpandIcon:()=>wr,FunctionIcon:()=>gr,InfoIcon:()=>In,IssueIcon:()=>lr,KeyboardIcon:()=>Bn,LabelIcon:()=>yr,ListIcon:()=>mr,LogoAnomalyIcon:()=>Mn,LogoIcon:()=>Nn,LogoLogsIcon:()=>An,LogoShortIcon:()=>Tn,MetricIcon:()=>vr,MinusIcon:()=>Jn,MoreIcon:()=>ur,PlayCircleOutlineIcon:()=>Yn,PlayIcon:()=>qn,PlusIcon:()=>Gn,Prettify:()=>nr,QuestionIcon:()=>sr,RefreshIcon:()=>zn,RestartIcon:()=>Pn,SearchIcon:()=>xr,SettingsIcon:()=>$n,SpinnerIcon:()=>Sr,StarBorderIcon:()=>pr,StarIcon:()=>fr,StorageIcon:()=>cr,SuccessIcon:()=>Dn,TableIcon:()=>Kn,TimelineIcon:()=>ir,TipIcon:()=>hr,TuneIcon:()=>dr,ValueIcon:()=>_r,VisibilityIcon:()=>er,VisibilityOffIcon:()=>tr,WarningIcon:()=>On,WikiIcon:()=>or});var t,r=n(609),a=n(159),i=n.n(a),o=n(7),l=n.n(o),s=n(648),c=n.n(s),u=n(220),d=n.n(u);function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function b(e,n,r,a){void 0===a&&(a={});let{window:i=document.defaultView,v5Compat:o=!1}=a,l=i.history,s=t.Pop,c=null,u=d();function d(){return(l.state||{idx:null}).idx}function f(){s=t.Pop;let e=d(),n=null==e?null:e-u;u=e,c&&c({action:s,location:b.location,delta:n})}function _(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"===typeof e?e:y(e);return n=n.replace(/ $/,"%20"),p(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==u&&(u=0,l.replaceState(h({},l.state,{idx:u}),""));let b={get action(){return s},get location(){return e(i,l)},listen(e){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(m,f),c=e,()=>{i.removeEventListener(m,f),c=null}},createHref:e=>n(i,e),createURL:_,encodeLocation(e){let t=_(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,n){s=t.Push;let a=g(b.location,e,n);r&&r(a,e),u=d()+1;let h=v(a,u),m=b.createHref(a);try{l.pushState(h,"",m)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;i.location.assign(m)}o&&c&&c({action:s,location:b.location,delta:1})},replace:function(e,n){s=t.Replace;let a=g(b.location,e,n);r&&r(a,e),u=d();let i=v(a,u),h=b.createHref(a);l.replaceState(i,"",h),o&&c&&c({action:s,location:b.location,delta:0})},go:e=>l.go(e)};return b}var w;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(w||(w={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function k(e,t,n){return void 0===n&&(n="/"),x(e,t,n,!1)}function x(e,t,n,r){let a=D(("string"===typeof t?_(t):t).pathname||"/",n);if(null==a)return null;let i=S(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let o=null;for(let l=0;null==o&&l{let o={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};o.relativePath.startsWith("/")&&(p(o.relativePath.startsWith(r),'Absolute route path "'+o.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(r.length));let l=V([r,o.relativePath]),s=n.concat(o);e.children&&e.children.length>0&&(p(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),S(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:P(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of C(e.path))a(e,t,r);else a(e,t)})),t}function C(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return a?[i,""]:[i];let o=C(r.join("/")),l=[];return l.push(...o.map((e=>""===e?i:[i,e].join("/")))),a&&l.push(...o),l.map((t=>e.startsWith("/")&&""===t?"/":t))}const E=/^:[\w-]+$/,N=3,A=2,M=1,T=10,$=-2,L=e=>"*"===e;function P(e,t){let n=e.split("/"),r=n.length;return n.some(L)&&(r+=$),t&&(r+=A),n.filter((e=>!L(e))).reduce(((e,t)=>e+(E.test(t)?N:""===t?M:T)),r)}function I(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,a={},i="/",o=[];for(let l=0;l(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))");let i=new RegExp(a,t?void 0:"i");return[i,r]}(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],o=i.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:a}=t;if("*"===r){let e=l[n]||"";o=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const s=l[n];return e[r]=a&&!s?void 0:(s||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:o,pattern:e}}function R(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return f(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function D(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function z(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function F(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function j(e,t){let n=F(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function H(e,t,n,r){let a;void 0===r&&(r=!1),"string"===typeof e?a=_(e):(a=h({},e),p(!a.pathname||!a.pathname.includes("?"),z("?","pathname","search",a)),p(!a.pathname||!a.pathname.includes("#"),z("#","pathname","hash",a)),p(!a.search||!a.search.includes("#"),z("#","search","hash",a)));let i,o=""===e||""===a.pathname,l=o?"/":a.pathname;if(null==l)i=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}i=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:a=""}="string"===typeof e?_(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:B(r),hash:q(a)}}(a,i),c=l&&"/"!==l&&l.endsWith("/"),u=(o||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!c&&!u||(s.pathname+="/"),s}const V=e=>e.join("/").replace(/\/\/+/g,"/"),U=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",q=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function Y(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const W=["post","put","patch","delete"],K=(new Set(W),["get",...W]);new Set(K),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.current=!0}));let a=r.useCallback((function(r,a){void 0===a&&(a={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,Q({fromRouteId:t},a)))}),[e,t]);return a}():function(){ne()||p(!1);let e=r.useContext(Z),{basename:t,future:n,navigator:a}=r.useContext(J),{matches:i}=r.useContext(ee),{pathname:o}=re(),l=JSON.stringify(j(i,n.v7_relativeSplatPath)),s=r.useRef(!1);ae((()=>{s.current=!0}));let c=r.useCallback((function(n,r){if(void 0===r&&(r={}),!s.current)return;if("number"===typeof n)return void a.go(n);let i=H(n,JSON.parse(l),o,"path"===r.relative);null==e&&"/"!==t&&(i.pathname="/"===i.pathname?t:V([t,i.pathname])),(r.replace?a.replace:a.push)(i,r.state,r)}),[t,a,l,o,e]);return c}()}const oe=r.createContext(null);function le(e,t){let{relative:n}=void 0===t?{}:t,{future:a}=r.useContext(J),{matches:i}=r.useContext(ee),{pathname:o}=re(),l=JSON.stringify(j(i,a.v7_relativeSplatPath));return r.useMemo((()=>H(e,JSON.parse(l),o,"path"===n)),[e,l,o,n])}function se(e,n,a,i){ne()||p(!1);let{navigator:o}=r.useContext(J),{matches:l}=r.useContext(ee),s=l[l.length-1],c=s?s.params:{},u=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let d,h=re();if(n){var m;let e="string"===typeof n?_(n):n;"/"===u||(null==(m=e.pathname)?void 0:m.startsWith(u))||p(!1),d=e}else d=h;let f=d.pathname||"/",v=f;if("/"!==u){let e=u.replace(/^\//,"").split("/");v="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=k(e,{pathname:v});let y=me(g&&g.map((e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:V([u,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:V([u,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,a,i);return n&&y?r.createElement(X.Provider,{value:{location:Q({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:t.Pop}},y):y}function ce(){let e=function(){var e;let t=r.useContext(te),n=ge(fe.UseRouteError),a=ye(fe.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[a]}(),t=Y(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:a};return r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:i},n):null,null)}const ue=r.createElement(ce,null);class de extends r.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?r.createElement(ee.Provider,{value:this.props.routeContext},r.createElement(te.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function he(e){let{routeContext:t,match:n,children:a}=e,i=r.useContext(Z);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(ee.Provider,{value:t},a)}function me(e,t,n,a){var i;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===a&&(a=null),null==e){var o;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(o=a)&&o.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let l=e,s=null==(i=n)?void 0:i.errors;if(null!=s){let e=l.findIndex((e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id])));e>=0||p(!1),l=l.slice(0,Math.min(l.length,e+1))}let c=!1,u=-1;if(n&&a&&a.v7_partialHydration)for(let r=0;r=0?l.slice(0,u+1):[l[0]];break}}}return l.reduceRight(((e,a,i)=>{let o,d=!1,h=null,m=null;var p;n&&(o=s&&a.route.id?s[a.route.id]:void 0,h=a.route.errorElement||ue,c&&(u<0&&0===i?(p="route-fallback",!1||_e[p]||(_e[p]=!0),d=!0,m=null):u===i&&(d=!0,m=a.route.hydrateFallbackElement||null)));let f=t.concat(l.slice(0,i+1)),v=()=>{let t;return t=o?h:d?m:a.route.Component?r.createElement(a.route.Component,null):a.route.element?a.route.element:e,r.createElement(he,{match:a,routeContext:{outlet:e,matches:f,isDataRoute:null!=n},children:t})};return n&&(a.route.ErrorBoundary||a.route.errorElement||0===i)?r.createElement(de,{location:n.location,revalidation:n.revalidation,component:h,error:o,children:v(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):v()}),null)}var pe=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(pe||{}),fe=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(fe||{});function ve(e){let t=r.useContext(Z);return t||p(!1),t}function ge(e){let t=r.useContext(G);return t||p(!1),t}function ye(e){let t=function(){let e=r.useContext(ee);return e||p(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||p(!1),n.route.id}const _e={};r.startTransition;function be(e){return function(e){let t=r.useContext(ee).outlet;return t?r.createElement(oe.Provider,{value:e},t):t}(e.context)}function we(e){p(!1)}function ke(e){let{basename:n="/",children:a=null,location:i,navigationType:o=t.Pop,navigator:l,static:s=!1,future:c}=e;ne()&&p(!1);let u=n.replace(/^\/*/,"/"),d=r.useMemo((()=>({basename:u,navigator:l,static:s,future:Q({v7_relativeSplatPath:!1},c)})),[u,c,l,s]);"string"===typeof i&&(i=_(i));let{pathname:h="/",search:m="",hash:f="",state:v=null,key:g="default"}=i,y=r.useMemo((()=>{let e=D(h,u);return null==e?null:{location:{pathname:e,search:m,hash:f,state:v,key:g},navigationType:o}}),[u,h,m,f,v,g,o]);return null==y?null:r.createElement(J.Provider,{value:d},r.createElement(X.Provider,{children:a,value:y}))}function xe(e){let{children:t,location:n}=e;return se(Se(t),n)}new Promise((()=>{}));r.Component;function Se(e,t){void 0===t&&(t=[]);let n=[];return r.Children.forEach(e,((e,a)=>{if(!r.isValidElement(e))return;let i=[...t,a];if(e.type===r.Fragment)return void n.push.apply(n,Se(e.props.children,i));e.type!==we&&p(!1),e.props.index&&e.props.children&&p(!1);let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=Se(e.props.children,i)),n.push(o)})),n}function Ce(){return Ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}function Ne(e){return void 0===e&&(e=""),new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Ae=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Me=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(zp){}const Te=r.createContext({isTransitioning:!1});new Map;const $e=r.startTransition;r.flushSync,r.useId;function Le(e){let{basename:t,children:n,future:a,window:i}=e,o=r.useRef();null==o.current&&(o.current=function(e){return void 0===e&&(e={}),b((function(e,t){let{pathname:n="/",search:r="",hash:a=""}=_(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),g("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"===typeof t?t:y(t))}),(function(e,t){f("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:i,v5Compat:!0}));let l=o.current,[s,c]=r.useState({action:l.action,location:l.location}),{v7_startTransition:u}=a||{},d=r.useCallback((e=>{u&&$e?$e((()=>c(e))):c(e)}),[c,u]);return r.useLayoutEffect((()=>l.listen(d)),[l,d]),r.createElement(ke,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:l,future:a})}const Pe="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,Ie=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Oe=r.forwardRef((function(e,t){let n,{onClick:a,relative:i,reloadDocument:o,replace:l,state:s,target:c,to:u,preventScrollReset:d,unstable_viewTransition:h}=e,m=Ee(e,Ae),{basename:f}=r.useContext(J),v=!1;if("string"===typeof u&&Ie.test(u)&&(n=u,Pe))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=D(t.pathname,f);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:v=!0}catch(zp){}let g=function(e,t){let{relative:n}=void 0===t?{}:t;ne()||p(!1);let{basename:a,navigator:i}=r.useContext(J),{hash:o,pathname:l,search:s}=le(e,{relative:n}),c=l;return"/"!==a&&(c="/"===l?a:V([a,l])),i.createHref({pathname:c,search:s,hash:o})}(u,{relative:i}),_=function(e,t){let{target:n,replace:a,state:i,preventScrollReset:o,relative:l,unstable_viewTransition:s}=void 0===t?{}:t,c=ie(),u=re(),d=le(e,{relative:l});return r.useCallback((t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,n)){t.preventDefault();let n=void 0!==a?a:y(u)===y(d);c(e,{replace:n,state:i,preventScrollReset:o,relative:l,unstable_viewTransition:s})}}),[u,c,d,a,i,n,e,o,l,s])}(u,{replace:l,state:s,target:c,preventScrollReset:d,relative:i,unstable_viewTransition:h});return r.createElement("a",Ce({},m,{href:n||g,onClick:v||o?a:function(e){a&&a(e),e.defaultPrevented||_(e)},ref:t,target:c}))}));const Re=r.forwardRef((function(e,t){let{"aria-current":n="page",caseSensitive:a=!1,className:i="",end:o=!1,style:l,to:s,unstable_viewTransition:c,children:u}=e,d=Ee(e,Me),h=le(s,{relative:d.relative}),m=re(),f=r.useContext(G),{navigator:v,basename:g}=r.useContext(J),y=null!=f&&function(e,t){void 0===t&&(t={});let n=r.useContext(Te);null==n&&p(!1);let{basename:a}=Fe(De.useViewTransitionState),i=le(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=D(n.currentLocation.pathname,a)||n.currentLocation.pathname,l=D(n.nextLocation.pathname,a)||n.nextLocation.pathname;return null!=O(i.pathname,l)||null!=O(i.pathname,o)}(h)&&!0===c,_=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,b=m.pathname,w=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;a||(b=b.toLowerCase(),w=w?w.toLowerCase():null,_=_.toLowerCase()),w&&g&&(w=D(w,g)||w);const k="/"!==_&&_.endsWith("/")?_.length-1:_.length;let x,S=b===_||!o&&b.startsWith(_)&&"/"===b.charAt(k),C=null!=w&&(w===_||!o&&w.startsWith(_)&&"/"===w.charAt(_.length)),E={isActive:S,isPending:C,isTransitioning:y},N=S?n:void 0;x="function"===typeof i?i(E):[i,S?"active":null,C?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let A="function"===typeof l?l(E):l;return r.createElement(Oe,Ce({},d,{"aria-current":N,className:x,ref:t,style:A,to:s,unstable_viewTransition:c}),"function"===typeof u?u(E):u)}));var De,ze;function Fe(e){let t=r.useContext(Z);return t||p(!1),t}function je(e){let t=r.useRef(Ne(e)),n=r.useRef(!1),a=re(),i=r.useMemo((()=>function(e,t){let n=Ne(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(a.search,n.current?null:t.current)),[a.search]),o=ie(),l=r.useCallback(((e,t)=>{const r=Ne("function"===typeof e?e(i):e);n.current=!0,o("?"+r,t)}),[o,i]);return[i,l]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(De||(De={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(ze||(ze={}));let He=function(e){return e.logs="logs",e.anomaly="anomaly",e}({});const Ve={home:"/",metrics:"/metrics",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries",trace:"/trace",withTemplate:"/expand-with-exprs",relabel:"/relabeling",logs:"/logs",activeQueries:"/active-queries",queryAnalyzer:"/query-analyzer",icons:"/icons",anomaly:"/anomaly",query:"/query",downsamplingDebug:"/downsampling-filters-debug",retentionDebug:"/retention-filters-debug"},{REACT_APP_TYPE:Ue}={},Be=Ue===He.logs,qe={header:{tenant:!0,stepControl:!Be,timeSelector:!Be,executionControls:!Be}},Ye={[Ve.home]:{title:"Query",...qe},[Ve.metrics]:{title:"Explore Prometheus metrics",header:{tenant:!0,stepControl:!0,timeSelector:!0}},[Ve.cardinality]:{title:"Explore cardinality",header:{tenant:!0,cardinalityDatePicker:!0}},[Ve.topQueries]:{title:"Top queries",header:{tenant:!0}},[Ve.trace]:{title:"Trace analyzer",header:{}},[Ve.queryAnalyzer]:{title:"Query analyzer",header:{}},[Ve.dashboards]:{title:"Dashboards",...qe},[Ve.withTemplate]:{title:"WITH templates",header:{}},[Ve.relabel]:{title:"Metric relabel debug",header:{}},[Ve.logs]:{title:"Logs Explorer",header:{}},[Ve.activeQueries]:{title:"Active Queries",header:{}},[Ve.icons]:{title:"Icons",header:{}},[Ve.anomaly]:{title:"Anomaly exploration",...qe},[Ve.query]:{title:"Query",...qe},[Ve.downsamplingDebug]:{title:"Downsampling filters debug",header:{}},[Ve.retentionDebug]:{title:"Retention filters debug",header:{}}},We=Ve,Ke=()=>{var e;const t=(null===(e=document.getElementById("root"))||void 0===e?void 0:e.dataset.params)||"{}";try{return JSON.parse(t)}catch(zp){return console.error(zp),{}}},Qe=()=>!!Object.keys(Ke()).length,Ze=/(\/select\/)(\d+|\d.+)(\/)(.+)/,Ge=(e,t)=>e.replace(Ze,`$1${t}/$4`),Je=e=>{var t;return(null===(t=e.match(Ze))||void 0===t?void 0:t[2])||""},Xe=(e,t)=>{t?window.localStorage.setItem(e,JSON.stringify({value:t})):tt([e]),window.dispatchEvent(new Event("storage"))},et=e=>{const t=window.localStorage.getItem(e);if(null!==t)try{var n;return null===(n=JSON.parse(t))||void 0===n?void 0:n.value}catch(zp){return t}},tt=e=>e.forEach((e=>window.localStorage.removeItem(e))),{REACT_APP_TYPE:nt}={};var rt=n(215),at=n.n(rt),it=n(424),ot=n.n(it);const lt={table:100,chart:20,code:1e3},st=[{id:"small",isDefault:!0,height:()=>.2*window.innerHeight},{id:"medium",height:()=>.4*window.innerHeight},{id:"large",height:()=>.8*window.innerHeight}],ct=["min","median","max"],ut=(e,t)=>{const n=window.location.hash.split("?")[1],r=at().parse(n,{ignoreQueryPrefix:!0});return ot()(r,e,t||"")},dt=()=>{var e;const t=(null===(e=(window.location.hash.split("?")[1]||"").match(/g\d+\.expr/g))||void 0===e?void 0:e.length)||1;return new Array(t>10?10:t).fill(1).map(((e,t)=>ut(`g${t}.expr`,"")))};let ht=function(e){return e.yhat="yhat",e.yhatUpper="yhat_upper",e.yhatLower="yhat_lower",e.anomaly="vmui_anomalies_points",e.training="vmui_training_data",e.actual="actual",e.anomalyScore="anomaly_score",e}({}),mt=function(e){return e.table="table",e.chart="chart",e.code="code",e}({}),pt=function(e){return e.emptyServer="Please enter Server URL",e.validServer="Please provide a valid Server URL",e.validQuery="Please enter a valid Query and execute it",e.traceNotFound="Not found the tracing information",e.emptyTitle="Please enter title",e.positiveNumber="Please enter positive number",e.validStep="Please enter a valid step",e.unknownType="Unknown server response format: must have 'errorType'",e}({}),ft=function(e){return e.system="system",e.light="light",e.dark="dark",e}({}),vt=function(e){return e.empty="empty",e.metricsql="metricsql",e.label="label",e.labelValue="labelValue",e}({});const gt=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),yt=(e,t)=>{document.documentElement.style.setProperty(`--${e}`,t)},_t=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,bt=e=>{let t;try{t=new URL(e)}catch(n){return!1}return"http:"===t.protocol||"https:"===t.protocol},wt=e=>e.replace(/\/$/,""),kt=ut("g0.tenantID",""),xt={serverUrl:wt((e=>{const{serverURL:t}=Ke(),n=et("SERVER_URL"),r=window.location.href.replace(/\/(select\/)?(vmui)\/.*/,""),a=`${window.location.origin}${window.location.pathname.replace(/^\/vmui/,"")}`,i=window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),o=t||n||i;switch(nt){case He.logs:return r;case He.anomaly:return n||a;default:return e?Ge(o,e):o}})(kt)),tenantId:kt,theme:et("THEME")||ft.system,isDarkTheme:null,flags:{},appConfig:{}};function St(e,t){switch(t.type){case"SET_SERVER":return{...e,serverUrl:wt(t.payload)};case"SET_TENANT_ID":return{...e,tenantId:t.payload};case"SET_THEME":return Xe("THEME",t.payload),{...e,theme:t.payload};case"SET_DARK_THEME":return{...e,isDarkTheme:(n=e.theme,n===ft.system&&_t()||n===ft.dark)};case"SET_FLAGS":return{...e,flags:t.payload};case"SET_APP_CONFIG":return{...e,appConfig:t.payload};default:throw new Error}var n}var Ct=n(746);var Et=0;Array.isArray;function Nt(e,t,n,r,a,i){t||(t={});var o,l,s=t;"ref"in t&&(o=t.ref,delete t.ref);var c={type:e,props:s,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Et,__i:-1,__u:0,__source:a,__self:i};if("function"==typeof e&&(o=e.defaultProps))for(l in o)void 0===s[l]&&(s[l]=o[l]);return Ct.fF.vnode&&Ct.fF.vnode(c),c}const At=(0,r.createContext)({}),Mt=()=>(0,r.useContext)(At).state,Tt=()=>(0,r.useContext)(At).dispatch,$t=Object.entries(xt).reduce(((e,t)=>{let[n,r]=t;return{...e,[n]:ut(n)||r}}),{}),Lt="YYYY-MM-DD",Pt="YYYY-MM-DD HH:mm:ss",It="YYYY-MM-DD HH:mm:ss:SSS (Z)",Ot="YYYY-MM-DD[T]HH:mm:ss",Rt="YYYY-MM-DD_HHmmss",Dt=window.innerWidth/4,zt=window.innerWidth/40,Ft=1,jt=1578e8,Ht=Intl.supportedValuesOf,Vt=Ht?Ht("timeZone"):["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Katmandu","Asia/Khandyga","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis"],Ut=[{long:"years",short:"y",possible:"year"},{long:"weeks",short:"w",possible:"week"},{long:"days",short:"d",possible:"day"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}],Bt=Ut.map((e=>e.short)),qt=e=>Math.round(1e3*e)/1e3,Yt=e=>en(i().duration(e,"seconds").asMilliseconds()),Wt=e=>{let t=qt(e);const n=Math.round(e);e>=100&&(t=n-n%10),e<100&&e>=10&&(t=n-n%5),e<10&&e>=1&&(t=n),e<1&&e>.01&&(t=Math.round(40*e)/40);return Yt(t||.001).replace(/\s/g,"")},Kt=e=>{const t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Bt.includes(n[0]))return{[n[0]]:t[0]}},Qt=e=>{const t=Ut.map((e=>e.short)).join("|"),n=new RegExp(`\\d+(\\.\\d+)?[${t}]+`,"g"),r=(e.match(n)||[]).reduce(((e,t)=>{const n=Kt(t);return n?{...e,...n}:{...e}}),{});return i().duration(r).asSeconds()},Zt=(e,t)=>Wt(e/(t?zt:Dt)),Gt=(e,t)=>{const n=(t||i()().toDate()).valueOf()/1e3,r=Qt(e);return{start:n-r,end:n,step:Zt(r),date:Jt(t||i()().toDate())}},Jt=e=>i().tz(e).utc().format(Ot),Xt=e=>i().tz(e).format(Ot),en=e=>{const t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),a=Math.floor(e/1e3/3600%24),i=Math.floor(e/864e5),o=["d","h","m","s","ms"],l=[i,a,r,n,t].map(((e,t)=>e?`${e}${o[t]}`:""));return l.filter((e=>e)).join("")},tn=e=>{const t=i()(1e3*e);return t.isValid()?t.toDate():new Date},nn={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_TYPE===He.logs,rn=[{title:"Last 5 minutes",duration:"5m",isDefault:nn},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!nn},{title:"Last 1 hour",duration:"1h"},{title:"Last 3 hours",duration:"3h"},{title:"Last 6 hours",duration:"6h"},{title:"Last 12 hours",duration:"12h"},{title:"Last 24 hours",duration:"24h"},{title:"Last 2 days",duration:"2d"},{title:"Last 7 days",duration:"7d"},{title:"Last 30 days",duration:"30d"},{title:"Last 90 days",duration:"90d"},{title:"Last 180 days",duration:"180d"},{title:"Last 1 year",duration:"1y"},{title:"Yesterday",duration:"1d",until:()=>i()().tz().subtract(1,"day").endOf("day").toDate()},{title:"Today",duration:"1d",until:()=>i()().tz().endOf("day").toDate()}].map((e=>({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:()=>i()().tz().toDate(),...e}))),an=e=>{var t;let{relativeTimeId:n,defaultDuration:r,defaultEndInput:a}=e;const i=null===(t=rn.find((e=>e.isDefault)))||void 0===t?void 0:t.id,o=n||ut("g0.relative_time",i),l=rn.find((e=>e.id===o));return{relativeTimeId:l?o:"none",duration:l?l.duration:r,endInput:l?l.until():a}},on=e=>`UTC${i()().tz(e).format("Z")}`,ln=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=new RegExp(e,"i");return Vt.reduce(((n,r)=>{const a=(r.match(/^(.*?)\//)||[])[1]||"unknown",i=on(r),o=i.replace(/UTC|0/,""),l=r.replace(/[/_]/g," "),s={region:r,utc:i,search:`${r} ${i} ${l} ${o}`},c=!e||e&&t.test(s.search);return c&&n[a]?n[a].push(s):c&&(n[a]=[s]),n}),{})},sn=e=>{i().tz.setDefault(e)},cn=()=>{const e=i().tz.guess(),t=(e=>{try{return i()().tz(e),!0}catch(zp){return!1}})(e);return{isValid:t,title:t?`Browser Time (${e})`:"Browser timezone (UTC)",region:t?e:"UTC"}},un=et("TIMEZONE")||cn().region;sn(un);const dn=()=>{const e=ut("g0.range_input"),{duration:t,endInput:n,relativeTimeId:r}=an({defaultDuration:e||"1h",defaultEndInput:(a=ut("g0.end_input",i()().utc().format(Ot)),i()(a).utcOffset(0,!0).toDate()),relativeTimeId:e?ut("g0.relative_time","none"):void 0});var a;return{duration:t,period:Gt(t,n),relativeTime:r}},hn={...dn(),timezone:un};function mn(e,t){switch(t.type){case"SET_TIME_STATE":return{...e,...t.payload};case"SET_DURATION":return{...e,duration:t.payload,period:Gt(t.payload,tn(e.period.end)),relativeTime:"none"};case"SET_RELATIVE_TIME":return{...e,duration:t.payload.duration,period:Gt(t.payload.duration,t.payload.until),relativeTime:t.payload.id};case"SET_PERIOD":const n=(e=>{const t=e.to.valueOf()-e.from.valueOf();return en(t)})(t.payload);return{...e,duration:n,period:Gt(n,t.payload.to),relativeTime:"none"};case"RUN_QUERY":const{duration:r,endInput:a}=an({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:tn(e.period.end)});return{...e,period:Gt(r,a)};case"RUN_QUERY_TO_NOW":return{...e,period:Gt(e.duration)};case"SET_TIMEZONE":return sn(t.payload),Xe("TIMEZONE",t.payload),e.defaultTimezone&&Xe("DISABLED_DEFAULT_TIMEZONE",t.payload!==e.defaultTimezone),{...e,timezone:t.payload};case"SET_DEFAULT_TIMEZONE":return{...e,defaultTimezone:t.payload};default:throw new Error}}const pn=(0,r.createContext)({}),fn=()=>(0,r.useContext)(pn).state,vn=()=>(0,r.useContext)(pn).dispatch,gn=e=>{const t=et(e);return t?JSON.parse(t):[]},yn=50,_n=1e3,bn=1e3;const wn=dt(),kn={query:wn,queryHistory:wn.map((e=>({index:0,values:[e]}))),autocomplete:et("AUTOCOMPLETE")||!1,autocompleteQuick:!1,autocompleteCache:new class{constructor(){this.maxSize=void 0,this.map=void 0,this.maxSize=bn,this.map=new Map}get(e){for(const[t,n]of this.map){const r=JSON.parse(t),a=r.start===e.start&&r.end===e.end,i=r.type===e.type,o=e.value&&r.value&&e.value.includes(r.value),l=r.match===e.match||o,s=n.length<_n;if(l&&a&&i&&s)return n}return this.map.get(JSON.stringify(e))}put(e,t){if(this.map.size>=this.maxSize){const e=this.map.keys().next().value;this.map.delete(e)}this.map.set(JSON.stringify(e),t)}},metricsQLFunctions:[]};function xn(e,t){switch(t.type){case"SET_QUERY":return{...e,query:t.payload.map((e=>e))};case"SET_QUERY_HISTORY":return(e=>{const t=e.map((e=>e.values[e.index])),n=gn("QUERY_HISTORY");n[0]||(n[0]=[]);const r=n[0];t.forEach((e=>{!r.includes(e)&&e&&r.unshift(e),r.length>250&&r.shift()})),Xe("QUERY_HISTORY",JSON.stringify(n))})(t.payload),{...e,queryHistory:t.payload};case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),{...e,queryHistory:e.queryHistory};case"TOGGLE_AUTOCOMPLETE":return Xe("AUTOCOMPLETE",!e.autocomplete),{...e,autocomplete:!e.autocomplete};case"SET_AUTOCOMPLETE_QUICK":return{...e,autocompleteQuick:t.payload};case"SET_AUTOCOMPLETE_CACHE":return e.autocompleteCache.put(t.payload.key,t.payload.value),{...e};case"SET_METRICSQL_FUNCTIONS":return{...e,metricsQLFunctions:t.payload};default:throw new Error}}const Sn=(0,r.createContext)({}),Cn=()=>(0,r.useContext)(Sn).state,En=()=>(0,r.useContext)(Sn).dispatch,Nn=()=>Nt("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:Nt("path",{d:"M6.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29C15.73 4.1 12.46 3.01 7.43 3h-.06C2.33 3-.93 4.1.24 5.18c0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a454.94 454.94 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44a454.4 454.4 0 0 0 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM35 5l-5.84 14.46h-2.43L20.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H35Zm17.18 0v14.46H49.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L38.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H36.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15Z"})}),An=()=>Nt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:[Nt("path",{d:"M11.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29 1.17-1.09-2.1-2.17-7.13-2.18h-.06c-5.04 0-8.3 1.1-7.13 2.18 0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a455.13 455.13 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44 2.05-1.82 4.09-3.65 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM40 5l-5.84 14.46h-2.43L25.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H40Zm17.18 0v14.46H54.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L43.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H41.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15ZM1.73 36v-5.17l-.67-.07a.6.6 0 0 1-.21-.1.23.23 0 0 1-.08-.18v-.44h.96v-.59c0-.34.05-.65.14-.92a1.79 1.79 0 0 1 1.08-1.11 2.45 2.45 0 0 1 1.62-.02l-.03.53c0 .1-.06.15-.16.16H4c-.18 0-.35.03-.5.08a.95.95 0 0 0-.39.23c-.1.11-.19.25-.25.43-.05.18-.08.4-.08.65v.56h1.75v.78H2.8V36H1.73Zm6.17-6.17c.45 0 .85.07 1.2.22a2.57 2.57 0 0 1 1.5 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.86-.07-1.22-.21a2.57 2.57 0 0 1-1.5-1.62c-.12-.38-.19-.81-.19-1.3 0-.47.07-.9.2-1.28a2.57 2.57 0 0 1 1.5-1.62c.35-.15.76-.22 1.2-.22Zm0 5.42c.6 0 1.05-.2 1.35-.6.3-.4.44-.97.44-1.69s-.15-1.28-.44-1.69c-.3-.4-.75-.6-1.35-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.33.73-.08.28-.11.6-.11.96 0 .72.15 1.29.44 1.69.3.4.76.6 1.36.6Zm5.26-4.11c.2-.42.43-.74.71-.97.28-.24.62-.36 1.03-.36.13 0 .25.02.36.05.12.02.23.07.32.13l-.08.8c-.02.1-.08.15-.18.15l-.24-.04a1.7 1.7 0 0 0-.88.05c-.15.05-.29.14-.4.25-.12.1-.23.24-.32.4-.1.17-.18.35-.26.56V36h-1.07v-6.08h.61c.12 0 .2.02.24.07.05.04.08.12.1.23l.06.92Zm13.73-3.82L23.39 36h-1.46l-3.5-8.68h1.29a.54.54 0 0 1 .54.37l2.04 5.3a11.31 11.31 0 0 1 .37 1.21 11.65 11.65 0 0 1 .35-1.22l2.03-5.29c.03-.1.1-.18.19-.25.1-.08.21-.12.35-.12h1.3Zm2.2 2.52V36H27.6v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.08.36a1 1 0 0 1-.51.5.96.96 0 0 1-.73 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .37.08c.12.05.22.11.3.2a.94.94 0 0 1 .3.67Zm5.72 3.1a.68.68 0 0 1-.13.13c-.04.03-.1.05-.18.05a.42.42 0 0 1-.22-.07 3.95 3.95 0 0 0-.62-.31c-.14-.05-.3-.07-.51-.07-.26 0-.5.04-.69.14-.2.1-.36.23-.49.4-.13.18-.22.4-.29.64-.06.25-.1.53-.1.85 0 .33.04.62.1.88.08.25.18.47.32.64.13.18.29.3.48.4.18.09.4.13.63.13a1.6 1.6 0 0 0 .94-.27l.26-.2a.4.4 0 0 1 .25-.09.3.3 0 0 1 .27.14l.43.54a2.76 2.76 0 0 1-1.77.96c-.22.03-.43.05-.65.05a2.57 2.57 0 0 1-1.96-.83c-.25-.28-.45-.6-.6-1-.14-.4-.21-.85-.21-1.35 0-.45.06-.87.2-1.25a2.61 2.61 0 0 1 1.51-1.67c.37-.16.8-.24 1.28-.24.46 0 .86.07 1.2.22.35.15.66.36.94.64l-.4.54Zm3.43 4.95c-.54 0-.95-.15-1.24-.45-.28-.3-.42-.73-.42-1.26v-3.44h-.63a.29.29 0 0 1-.2-.07c-.06-.06-.09-.13-.09-.24v-.59l.99-.16.31-1.68a.33.33 0 0 1 .12-.18.34.34 0 0 1 .21-.07h.77v1.94h1.64v1.05h-1.64v3.34c0 .2.05.34.14.45.1.1.22.16.39.16a.73.73 0 0 0 .39-.1l.12-.07a.2.2 0 0 1 .11-.03c.05 0 .08.01.11.03l.09.1.44.72c-.21.18-.46.32-.74.4-.28.1-.57.15-.87.15Zm5.09-6.35c.46 0 .87.07 1.24.22a2.7 2.7 0 0 1 1.58 1.63c.14.39.22.83.22 1.31 0 .49-.08.93-.22 1.32-.14.4-.35.73-.62 1-.26.28-.58.49-.96.64-.37.15-.78.22-1.24.22a3.4 3.4 0 0 1-1.25-.22 2.71 2.71 0 0 1-1.59-1.64 3.8 3.8 0 0 1-.21-1.32c0-.48.07-.92.21-1.31a2.75 2.75 0 0 1 1.58-1.63c.38-.15.8-.22 1.26-.22Zm0 5.2c.51 0 .89-.17 1.13-.52.25-.34.38-.84.38-1.5a2.6 2.6 0 0 0-.38-1.53c-.24-.34-.62-.52-1.13-.52-.52 0-.9.18-1.16.53-.25.35-.37.85-.37 1.51s.12 1.17.37 1.51c.25.35.64.52 1.16.52Zm5.56-4.04c.2-.37.42-.65.69-.86.26-.21.57-.32.94-.32.28 0 .5.06.68.19l-.1 1.1a.3.3 0 0 1-.09.16.24.24 0 0 1-.15.04 1.8 1.8 0 0 1-.27-.03 2.01 2.01 0 0 0-.34-.03c-.16 0-.3.03-.44.08a1.1 1.1 0 0 0-.34.2c-.1.1-.2.2-.27.33-.08.13-.15.27-.22.44V36H47.7v-6.16h.87c.15 0 .26.03.31.09.06.05.1.15.13.29l.09.7Zm4.62-1.07V36h-1.49v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.07.36a1 1 0 0 1-.51.5.96.96 0 0 1-.74 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .38.08c.11.05.21.11.3.2a.94.94 0 0 1 .28.67Zm4.56 5.32a7.8 7.8 0 0 0-1.08.12c-.29.05-.52.12-.7.2a.92.92 0 0 0-.38.3.64.64 0 0 0-.11.36c0 .26.07.45.23.56.15.11.35.17.6.17.3 0 .57-.06.79-.17.22-.1.44-.28.65-.5v-1.04Zm-3.4-2.67c.71-.65 1.57-.97 2.56-.97.36 0 .68.06.97.18a1.99 1.99 0 0 1 1.16 1.24c.1.3.16.61.16.96V36h-.67a.7.7 0 0 1-.33-.06c-.07-.04-.13-.13-.18-.26l-.13-.44c-.16.14-.3.26-.46.37a2.8 2.8 0 0 1-.97.43 2.77 2.77 0 0 1-1.32-.05 1.62 1.62 0 0 1-.57-.31 1.41 1.41 0 0 1-.38-.53 1.85 1.85 0 0 1-.05-1.18c.05-.16.14-.3.25-.45.12-.14.28-.27.46-.4a3 3 0 0 1 .7-.32 9.19 9.19 0 0 1 2.2-.33v-.36c0-.41-.09-.71-.26-.91-.18-.2-.43-.3-.76-.3a1.84 1.84 0 0 0-1.02.28l-.33.18c-.1.06-.2.09-.32.09-.1 0-.2-.03-.27-.08a.72.72 0 0 1-.17-.2l-.26-.47Zm11.49 4.32V36h-4.88v-8.6h1.16v7.62h3.72Zm3.16-5.2c.44 0 .84.08 1.2.23a2.57 2.57 0 0 1 1.49 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.85-.07-1.21-.21a2.57 2.57 0 0 1-1.5-1.62c-.13-.38-.2-.81-.2-1.3 0-.47.07-.9.2-1.28.14-.39.33-.72.59-1 .25-.26.55-.47.9-.62.37-.15.77-.22 1.22-.22Zm0 5.43c.6 0 1.05-.2 1.34-.6.3-.4.45-.97.45-1.69s-.15-1.28-.45-1.69c-.3-.4-.74-.6-1.34-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.34.73-.07.28-.1.6-.1.96 0 .72.14 1.29.44 1.69.3.4.75.6 1.36.6Zm6.33-2.22c.22 0 .4-.03.57-.09.16-.06.3-.14.41-.25.12-.11.2-.24.26-.39.05-.15.08-.31.08-.5 0-.37-.11-.66-.34-.88-.23-.22-.55-.33-.98-.33-.43 0-.76.1-.99.33-.22.22-.34.51-.34.89 0 .18.03.34.09.5a1.1 1.1 0 0 0 .67.63c.16.06.35.09.57.09Zm1.93 3.3a.51.51 0 0 0-.13-.36.84.84 0 0 0-.34-.22 8.57 8.57 0 0 0-1.73-.2 7.5 7.5 0 0 1-.62-.05c-.23.1-.41.23-.56.4a.8.8 0 0 0-.1.92c.07.12.18.22.32.3.14.1.32.16.54.21a3.5 3.5 0 0 0 1.55 0c.23-.05.42-.12.57-.22.16-.1.29-.21.37-.34a.8.8 0 0 0 .13-.44Zm1.08-6.17v.4c0 .13-.08.21-.25.25l-.69.09c.14.26.2.56.2.88a1.86 1.86 0 0 1-1.36 1.82 3.07 3.07 0 0 1-1.72.04c-.12.08-.22.16-.29.25a.44.44 0 0 0-.1.27c0 .15.06.26.17.33.12.08.28.13.47.16a5 5 0 0 0 .66.06 16.56 16.56 0 0 1 1.5.13c.26.05.48.12.67.22.19.1.34.24.46.41.12.18.18.4.18.69 0 .26-.07.5-.2.75s-.31.46-.56.65c-.24.2-.54.34-.9.46a4.57 4.57 0 0 1-2.36.04c-.33-.09-.6-.2-.82-.36a1.56 1.56 0 0 1-.5-.51c-.1-.2-.16-.4-.16-.6 0-.3.1-.56.28-.77.19-.2.45-.37.77-.5a1.15 1.15 0 0 1-.43-.32.88.88 0 0 1-.15-.54c0-.09.01-.18.04-.27.04-.1.08-.2.15-.28a1.55 1.55 0 0 1 .58-.5c-.3-.16-.53-.39-.7-.66-.17-.28-.25-.6-.25-.97 0-.3.05-.57.16-.8.12-.25.28-.46.48-.63.2-.17.45-.3.73-.4a3 3 0 0 1 2.3.21h1.64Zm4.65.76a.24.24 0 0 1-.23.14.42.42 0 0 1-.2-.07 3.59 3.59 0 0 0-.67-.3 1.8 1.8 0 0 0-1.03 0c-.14.05-.27.11-.37.2a.87.87 0 0 0-.23.27.75.75 0 0 0-.08.35c0 .15.04.28.13.39.1.1.21.19.36.27.15.07.32.14.5.2a13.63 13.63 0 0 1 1.16.4c.2.08.36.18.5.3a1.33 1.33 0 0 1 .5 1.07 2 2 0 0 1-.15.78c-.1.24-.25.44-.45.62-.2.17-.43.3-.72.4a3.1 3.1 0 0 1-2.14-.05 2.97 2.97 0 0 1-.87-.53l.25-.41c.04-.05.07-.1.12-.12a.3.3 0 0 1 .17-.04.4.4 0 0 1 .22.08l.3.19a1.91 1.91 0 0 0 1.03.27c.2 0 .38-.03.54-.08.16-.06.29-.13.4-.22a.96.96 0 0 0 .3-.7c0-.17-.05-.31-.14-.42-.09-.11-.2-.2-.36-.28a2.6 2.6 0 0 0-.5-.2l-.59-.19c-.2-.06-.39-.14-.58-.22a2.14 2.14 0 0 1-.5-.3 1.45 1.45 0 0 1-.36-.46c-.1-.19-.14-.41-.14-.67a1.6 1.6 0 0 1 .57-1.23c.18-.16.4-.3.68-.39.26-.1.57-.14.91-.14a2.84 2.84 0 0 1 1.9.7l-.23.4Z"}),Nt("defs",{children:Nt("path",{d:"M0 0h85v38H0z"})})]}),Mn=()=>Nt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:Nt("path",{d:"M11.118 10.476c.36.28.801.433 1.257.436h.052c.48-.007.961-.192 1.25-.444 1.509-1.279 5.88-5.287 5.88-5.287 1.168-1.087-2.093-2.174-7.13-2.181h-.06c-5.036.007-8.298 1.094-7.13 2.181 0 0 4.372 4.008 5.88 5.295zm2.559 2.166c-.359.283-.801.439-1.258.444h-.044a2.071 2.071 0 0 1-1.257-.444C10.082 11.755 6.384 8.42 5 7.148v1.93c0 .215.081.496.222.629l.07.064c1.045.955 4.546 4.154 5.825 5.245.358.283.8.438 1.257.444h.044c.489-.015.962-.2 1.258-.444 1.309-1.11 4.948-4.444 5.887-5.31.148-.132.222-.413.222-.628v-1.93a455.127 455.127 0 0 1-6.11 5.494zm-1.258 4.984a2.071 2.071 0 0 0 1.258-.436c2.053-1.815 4.09-3.65 6.11-5.502v1.938c0 .207-.075.488-.223.621-.94.873-4.578 4.2-5.887 5.31-.296.25-.77.436-1.258.443h-.044a2.071 2.071 0 0 1-1.257-.436c-1.204-1.027-4.376-3.928-5.616-5.062l-.28-.255c-.14-.133-.221-.414-.221-.621v-1.938c1.383 1.265 5.081 4.607 6.117 5.495.358.282.8.438 1.257.443h.044zM40 5l-5.84 14.46h-2.43L25.89 5h2.16c.233 0 .423.057.57.17.146.113.256.26.33.44l3.41 8.82c.113.287.22.603.32.95.106.34.206.697.3 1.07.08-.373.166-.73.26-1.07a8.84 8.84 0 0 1 .31-.95l3.39-8.82a.959.959 0 0 1 .31-.42.906.906 0 0 1 .58-.19H40zm17.176 0v14.46h-2.37v-9.34c0-.373.02-.777.06-1.21l-4.37 8.21c-.206.393-.523.59-.95.59h-.38c-.426 0-.743-.197-.95-.59l-4.42-8.24c.02.22.037.437.05.65.014.213.02.41.02.59v9.34h-2.37V5h2.03c.12 0 .224.003.31.01a.778.778 0 0 1 .23.05c.074.027.137.07.19.13.06.06.117.14.17.24l4.33 8.03c.114.213.217.433.31.66.1.227.197.46.29.7.094-.247.19-.483.29-.71.1-.233.207-.457.32-.67l4.27-8.01c.054-.1.11-.18.17-.24a.57.57 0 0 1 .19-.13.903.903 0 0 1 .24-.05c.087-.007.19-.01.31-.01h2.03zm8.887 13.73c.68 0 1.286-.117 1.82-.35.54-.24.996-.57 1.37-.99a4.28 4.28 0 0 0 .85-1.48c.2-.573.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.124 1.51-.37 2.19a5.248 5.248 0 0 1-1.07 1.77c-.46.5-1.024.893-1.69 1.18-.66.287-1.404.43-2.23.43-.827 0-1.574-.143-2.24-.43a5.012 5.012 0 0 1-1.69-1.18 5.33 5.33 0 0 1-1.06-1.77 6.373 6.373 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.096 1.277.29 1.85.2.567.483 1.06.85 1.48.373.42.826.75 1.36.99.54.24 1.15.36 1.83.36zm10.38.73h-1.03V5.31h1.03v14.15zM4.242 35v-5.166l-.672-.078a.595.595 0 0 1-.21-.09.23.23 0 0 1-.078-.186v-.438h.96v-.588c0-.348.048-.656.144-.924.1-.272.24-.5.42-.684a1.79 1.79 0 0 1 .66-.426c.256-.096.544-.144.864-.144.272 0 .522.04.75.12l-.024.534c-.008.096-.062.148-.162.156a4.947 4.947 0 0 1-.39.012c-.184 0-.352.024-.504.072a.949.949 0 0 0-.384.234c-.108.108-.192.25-.252.426a2.184 2.184 0 0 0-.084.654v.558h1.752v.774H5.316V35H4.242zM10.416 28.826a3.1 3.1 0 0 1 1.2.222c.356.148.66.358.912.63s.444.602.576.99c.136.384.204.814.204 1.29 0 .48-.068.912-.204 1.296a2.735 2.735 0 0 1-.576.984 2.572 2.572 0 0 1-.912.63 3.175 3.175 0 0 1-1.2.216c-.448 0-.852-.072-1.212-.216a2.572 2.572 0 0 1-.912-.63 2.805 2.805 0 0 1-.582-.984 3.972 3.972 0 0 1-.198-1.296c0-.476.066-.906.198-1.29.136-.388.33-.718.582-.99.252-.272.556-.482.912-.63.36-.148.764-.222 1.212-.222zm0 5.424c.6 0 1.048-.2 1.344-.6.296-.404.444-.966.444-1.686 0-.724-.148-1.288-.444-1.692-.296-.404-.744-.606-1.344-.606-.304 0-.57.052-.798.156a1.507 1.507 0 0 0-.564.45c-.148.196-.26.438-.336.726a3.941 3.941 0 0 0-.108.966c0 .72.148 1.282.444 1.686.3.4.754.6 1.362.6zM15.677 30.14c.192-.416.428-.74.708-.972.28-.236.622-.354 1.026-.354.128 0 .25.014.366.042.12.028.226.072.318.132l-.078.798c-.024.1-.084.15-.18.15-.056 0-.138-.012-.246-.036a1.694 1.694 0 0 0-.366-.036c-.192 0-.364.028-.516.084-.148.056-.282.14-.402.252a1.782 1.782 0 0 0-.318.408c-.092.16-.176.344-.252.552V35h-1.074v-6.078h.612c.116 0 .196.022.24.066.044.044.074.12.09.228l.072.924zM26.761 28.922 24.283 35h-.96l-2.478-6.078h.87a.33.33 0 0 1 .33.222l1.542 3.912c.048.148.09.292.126.432.036.14.07.28.102.42.032-.14.066-.28.102-.42.036-.14.08-.284.132-.432l1.56-3.912a.33.33 0 0 1 .12-.156.311.311 0 0 1 .198-.066h.834zM27.74 35v-6.078h.643c.152 0 .246.074.282.222l.078.624c.224-.276.476-.502.756-.678.28-.176.604-.264.972-.264.408 0 .738.114.99.342.256.228.44.536.552.924.088-.22.2-.41.336-.57a1.987 1.987 0 0 1 1.014-.624c.196-.048.394-.072.594-.072.32 0 .604.052.852.156.252.1.464.248.636.444.176.196.31.438.402.726.092.284.138.61.138.978V35H34.91v-3.87c0-.476-.104-.836-.312-1.08-.208-.248-.508-.372-.9-.372-.176 0-.344.032-.504.096-.156.06-.294.15-.414.27-.12.12-.216.272-.288.456-.068.18-.102.39-.102.63V35h-1.074v-3.87c0-.488-.098-.852-.294-1.092-.196-.24-.482-.36-.858-.36-.264 0-.508.072-.732.216a2.38 2.38 0 0 0-.618.576V35H27.74zM40.746 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM44.974 29.6c.124-.124.254-.238.39-.342a2.395 2.395 0 0 1 .936-.444c.176-.044.368-.066.576-.066.336 0 .634.058.894.174.26.112.476.272.648.48.176.204.308.45.396.738.092.284.138.598.138.942V35H47.47v-3.918c0-.376-.086-.666-.258-.87-.172-.208-.434-.312-.786-.312-.256 0-.496.058-.72.174a2.58 2.58 0 0 0-.636.474V35h-1.482v-6.156h.906c.192 0 .318.09.378.27l.102.486zM53.085 28.748c.456 0 .87.074 1.242.222a2.692 2.692 0 0 1 1.578 1.626c.144.392.216.83.216 1.314 0 .488-.072.928-.216 1.32-.144.392-.35.726-.618 1.002a2.653 2.653 0 0 1-.96.636 3.333 3.333 0 0 1-1.242.222c-.46 0-.878-.074-1.254-.222a2.712 2.712 0 0 1-.966-.636 2.922 2.922 0 0 1-.618-1.002 3.807 3.807 0 0 1-.216-1.32c0-.484.072-.922.216-1.314.148-.392.354-.724.618-.996.268-.272.59-.482.966-.63a3.397 3.397 0 0 1 1.254-.222zm0 5.202c.512 0 .89-.172 1.134-.516.248-.344.372-.848.372-1.512s-.124-1.17-.372-1.518c-.244-.348-.622-.522-1.134-.522-.52 0-.906.176-1.158.528-.248.348-.372.852-.372 1.512s.124 1.164.372 1.512c.252.344.638.516 1.158.516zM57.252 35v-6.156h.906c.192 0 .318.09.378.27l.096.456c.108-.12.22-.23.336-.33a2.017 2.017 0 0 1 1.32-.492c.388 0 .706.106.954.318.252.208.44.486.564.834a1.93 1.93 0 0 1 .834-.882c.172-.092.354-.16.546-.204.196-.044.392-.066.588-.066.34 0 .642.052.906.156.264.104.486.256.666.456.18.2.316.444.408.732.096.288.144.618.144.99V35h-1.482v-3.918c0-.392-.086-.686-.258-.882-.172-.2-.424-.3-.756-.3-.152 0-.294.026-.426.078a1.026 1.026 0 0 0-.342.228 1.019 1.019 0 0 0-.228.366 1.435 1.435 0 0 0-.084.51V35h-1.488v-3.918c0-.412-.084-.712-.252-.9-.164-.188-.406-.282-.726-.282-.216 0-.418.054-.606.162a1.979 1.979 0 0 0-.516.432V35h-1.482zM70.558 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM74.9 26.084V35h-1.482v-8.916H74.9zM81.969 28.844l-3.354 7.848a.538.538 0 0 1-.174.234c-.068.056-.174.084-.318.084h-1.104l1.152-2.472-2.49-5.694h1.302c.116 0 .206.028.27.084.068.056.118.12.15.192l1.308 3.192c.044.108.08.216.108.324.032.108.062.218.09.33a32.3 32.3 0 0 1 .108-.33c.036-.112.076-.222.12-.33l1.236-3.186a.437.437 0 0 1 .408-.276h1.188z"})}),Tn=()=>Nt("svg",{viewBox:"0 0 15 17",fill:"currentColor",children:Nt("path",{d:"M6.11767 7.47586C6.47736 7.75563 6.91931 7.90898 7.37503 7.91213H7.42681C7.90756 7.90474 8.38832 7.71987 8.67677 7.46846C10.1856 6.18921 14.5568 2.18138 14.5568 2.18138C15.7254 1.09438 12.4637 0.00739 7.42681 0H7.36764C2.3308 0.00739 -0.930935 1.09438 0.237669 2.18138C0.237669 2.18138 4.60884 6.18921 6.11767 7.47586ZM8.67677 9.64243C8.31803 9.92483 7.87599 10.0808 7.41941 10.0861H7.37503C6.91845 10.0808 6.47641 9.92483 6.11767 9.64243C5.0822 8.75513 1.38409 5.42018 0.000989555 4.14832V6.07829C0.000989555 6.29273 0.0823481 6.57372 0.222877 6.70682L0.293316 6.7712L0.293344 6.77122C1.33784 7.72579 4.83903 10.9255 6.11767 12.0161C6.47641 12.2985 6.91845 12.4545 7.37503 12.4597H7.41941C7.90756 12.4449 8.38092 12.2601 8.67677 12.0161C9.9859 10.9069 13.6249 7.57198 14.5642 6.70682C14.7121 6.57372 14.7861 6.29273 14.7861 6.07829V4.14832C12.7662 5.99804 10.7297 7.82949 8.67677 9.64243ZM7.41941 14.6263C7.87513 14.6232 8.31708 14.4698 8.67677 14.19C10.7298 12.3746 12.7663 10.5407 14.7861 8.68853V10.6259C14.7861 10.8329 14.7121 11.1139 14.5642 11.247C13.6249 12.1196 9.9859 15.4471 8.67677 16.5563C8.38092 16.8077 7.90756 16.9926 7.41941 17H7.37503C6.91931 16.9968 6.47736 16.8435 6.11767 16.5637C4.91427 15.5373 1.74219 12.6364 0.502294 11.5025C0.393358 11.4029 0.299337 11.3169 0.222877 11.247C0.0823481 11.1139 0.000989555 10.8329 0.000989555 10.6259V8.68853C1.38409 9.95303 5.0822 13.2953 6.11767 14.1827C6.47641 14.4651 6.91845 14.6211 7.37503 14.6263H7.41941Z"})}),$n=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"})}),Ln=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),Pn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zm-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z"})}),In=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})}),On=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),Rn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),Dn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),zn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"})}),Fn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),jn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m7 10 5 5 5-5z"})}),Hn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[Nt("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),Nt("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),Vn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"})}),Un=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"})}),Bn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"})}),qn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M8 5v14l11-7z"})}),Yn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m10 16.5 6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"})}),Wn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"})}),Kn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10H3v9z"})}),Qn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"})}),Zn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})}),Gn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})}),Jn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 13H5v-2h14v2z"})}),Xn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M8.9999 14.7854L18.8928 4.8925C19.0803 4.70497 19.3347 4.59961 19.5999 4.59961C19.8651 4.59961 20.1195 4.70497 20.307 4.8925L21.707 6.2925C22.0975 6.68303 22.0975 7.31619 21.707 7.70672L9.70701 19.7067C9.31648 20.0972 8.68332 20.0972 8.2928 19.7067L2.6928 14.1067C2.50526 13.9192 2.3999 13.6648 2.3999 13.3996C2.3999 13.1344 2.50526 12.88 2.6928 12.6925L4.0928 11.2925C4.48332 10.902 5.11648 10.902 5.50701 11.2925L8.9999 14.7854Z"})}),er=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})}),tr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"})}),nr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 9l1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25L19 15z"})}),rr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),ar=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})}),ir=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2z"})}),or=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 5C19.89 4.65 18.67 4.5 17.5 4.5C15.55 4.5 13.45 4.9 12 6C10.55 4.9 8.45 4.5 6.5 4.5C5.33 4.5 4.11 4.65 3 5C2.25 5.25 1.6 5.55 1 6V20.6C1 20.85 1.25 21.1 1.5 21.1C1.6 21.1 1.65 21.1 1.75 21.05C3.15 20.3 4.85 20 6.5 20C8.2 20 10.65 20.65 12 21.5C13.35 20.65 15.8 20 17.5 20C19.15 20 20.85 20.3 22.25 21.05C22.35 21.1 22.4 21.1 22.5 21.1C22.75 21.1 23 20.85 23 20.6V6C22.4 5.55 21.75 5.25 21 5ZM21 18.5C19.9 18.15 18.7 18 17.5 18C15.8 18 13.35 18.65 12 19.5C10.65 18.65 8.2 18 6.5 18C5.3 18 4.1 18.15 3 18.5V7C4.1 6.65 5.3 6.5 6.5 6.5C8.2 6.5 10.65 7.15 12 8C13.35 7.15 15.8 6.5 17.5 6.5C18.7 6.5 19.9 6.65 21 7V18.5Z"}),Nt("path",{d:"M17.5 10.5C18.38 10.5 19.23 10.59 20 10.76V9.24C19.21 9.09 18.36 9 17.5 9C15.8 9 14.26 9.29 13 9.83V11.49C14.13 10.85 15.7 10.5 17.5 10.5ZM13 12.49V14.15C14.13 13.51 15.7 13.16 17.5 13.16C18.38 13.16 19.23 13.25 20 13.42V11.9C19.21 11.75 18.36 11.66 17.5 11.66C15.8 11.66 14.26 11.96 13 12.49ZM17.5 14.33C15.8 14.33 14.26 14.62 13 15.16V16.82C14.13 16.18 15.7 15.83 17.5 15.83C18.38 15.83 19.23 15.92 20 16.09V14.57C19.21 14.41 18.36 14.33 17.5 14.33Z"}),Nt("path",{d:"M6.5 10.5C5.62 10.5 4.77 10.59 4 10.76V9.24C4.79 9.09 5.64 9 6.5 9C8.2 9 9.74 9.29 11 9.83V11.49C9.87 10.85 8.3 10.5 6.5 10.5ZM11 12.49V14.15C9.87 13.51 8.3 13.16 6.5 13.16C5.62 13.16 4.77 13.25 4 13.42V11.9C4.79 11.75 5.64 11.66 6.5 11.66C8.2 11.66 9.74 11.96 11 12.49ZM6.5 14.33C8.2 14.33 9.74 14.62 11 15.16V16.82C9.87 16.18 8.3 15.83 6.5 15.83C5.62 15.83 4.77 15.92 4 16.09V14.57C4.79 14.41 5.64 14.33 6.5 14.33Z"})]}),lr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z"})}),sr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 6C9.79 6 8 7.79 8 10H10C10 8.9 10.9 8 12 8C13.1 8 14 8.9 14 10C14 10.8792 13.4202 11.3236 12.7704 11.8217C11.9421 12.4566 11 13.1787 11 15H13C13 13.9046 13.711 13.2833 14.4408 12.6455C15.21 11.9733 16 11.2829 16 10C16 7.79 14.21 6 12 6ZM13 16V18H11V16H13Z"})}),cr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2zm4 1H4V5h2v2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2z"})}),ur=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),dr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"})}),hr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M7 20h4c0 1.1-.9 2-2 2s-2-.9-2-2zm-2-1h8v-2H5v2zm11.5-9.5c0 3.82-2.66 5.86-3.77 6.5H5.27c-1.11-.64-3.77-2.68-3.77-6.5C1.5 5.36 4.86 2 9 2s7.5 3.36 7.5 7.5zm4.87-2.13L20 8l1.37.63L22 10l.63-1.37L24 8l-1.37-.63L22 6l-.63 1.37zM19 6l.94-2.06L22 3l-2.06-.94L19 0l-.94 2.06L16 3l2.06.94L19 6z"})}),mr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M3 14h4v-4H3v4zm0 5h4v-4H3v4zM3 9h4V5H3v4zm5 5h13v-4H8v4zm0 5h13v-4H8v4zM8 5v4h13V5H8z"})}),pr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"})}),fr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})}),vr=()=>Nt("svg",{viewBox:"0 0 16 16",fill:gt("color-error"),children:Nt("path",{d:"M13.5095 4L8.50952 1H7.50952L2.50952 4L2.01953 4.85999V10.86L2.50952 11.71L7.50952 14.71H8.50952L13.5095 11.71L13.9995 10.86V4.85999L13.5095 4ZM7.50952 13.5601L3.00952 10.86V5.69995L7.50952 8.15002V13.5601ZM3.26953 4.69995L8.00952 1.85999L12.7495 4.69995L8.00952 7.29004L3.26953 4.69995ZM13.0095 10.86L8.50952 13.5601V8.15002L13.0095 5.69995V10.86Z"})}),gr=()=>Nt("svg",{viewBox:"0 0 16 16",fill:gt("color-primary"),children:Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 5H4V4H1.5L1 4.5V12.5L1.5 13H4V12H2V5ZM14.5 4H12V5H14V12H12V13H14.5L15 12.5V4.5L14.5 4ZM11.76 6.56995L12 7V9.51001L11.7 9.95996L7.19995 11.96H6.73999L4.23999 10.46L4 10.03V7.53003L4.30005 7.06995L8.80005 5.06995H9.26001L11.76 6.56995ZM5 9.70996L6.5 10.61V9.28003L5 8.38V9.70996ZM5.57996 7.56006L7.03003 8.43005L10.42 6.93005L8.96997 6.06006L5.57996 7.56006ZM7.53003 10.73L11.03 9.17004V7.77002L7.53003 9.31995V10.73Z"})}),yr=()=>Nt("svg",{viewBox:"0 0 16 16",fill:gt("color-warning"),children:Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 2H8L7 3V6H8V3H14V8H10V9H14L15 8V3L14 2ZM9 6H13V7H9.41L9 6.59V6ZM7 7H2L1 8V13L2 14H8L9 13V8L8 7H7ZM8 13H2V8H8V9V13ZM3 9H7V10H3V9ZM3 11H7V12H3V11ZM9 4H13V5H9V4Z"})}),_r=()=>Nt("svg",{viewBox:"0 0 16 16",fill:gt("color-primary"),children:Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 3L8 2H14L15 3V8L14 9H10V8H14V3H8V6H7V3ZM9 9V8L8 7H7H2L1 8V13L2 14H8L9 13V9ZM8 8V9V13H2V8H7H8ZM9.41421 7L9 6.58579V6H13V7H9.41421ZM9 4H13V5H9V4ZM7 10H3V11H7V10Z"})}),br=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})}),wr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"})}),kr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z"})}),xr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"})}),Sr=()=>Nt("svg",{viewBox:"0 0 24 24",children:Nt("path",{fill:"currentColor",d:"M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z",children:Nt("animateTransform",{attributeName:"transform",dur:"0.75s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})})});var Cr=n(738),Er=n.n(Cr);const Nr=e=>{let{to:t,isNavLink:n,children:r,...a}=e;return n?Nt(Re,{to:t,...a,children:r}):Nt("div",{...a,children:r})},Ar=e=>{let{activeItem:t,item:n,color:r=gt("color-primary"),activeNavRef:a,onChange:i,isNavLink:o}=e;return Nt(Nr,{className:Er()({"vm-tabs-item":!0,"vm-tabs-item_active":t===n.value,[n.className||""]:n.className}),isNavLink:o,to:n.value,style:{color:r},onClick:(l=n.value,()=>{i&&i(l)}),ref:t===n.value?a:void 0,children:[n.icon&&Nt("div",{className:Er()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!n.label}),children:n.icon}),n.label]});var l};const Mr=function(e,t,n,a){const i=(0,r.useRef)(t);(0,r.useEffect)((()=>{i.current=t}),[t]),(0,r.useEffect)((()=>{var t;const r=null!==(t=null===n||void 0===n?void 0:n.current)&&void 0!==t?t:window;if(!r||!r.addEventListener)return;const o=e=>i.current(e);return r.addEventListener(e,o,a),()=>{r.removeEventListener(e,o,a)}}),[e,n,a])},Tr=()=>{const[e,t]=(0,r.useState)({width:0,height:0}),n=()=>{t({width:window.innerWidth,height:window.innerHeight})};return Mr("resize",n),(0,r.useEffect)(n,[]),e},$r=e=>{let{activeItem:t,items:n,color:a=gt("color-primary"),onChange:i,indicatorPlacement:o="bottom",isNavLink:l}=e;const s=Tr(),c=(0,r.useRef)(null),[u,d]=(0,r.useState)({left:0,width:0,bottom:0});return(0,r.useEffect)((()=>{var e;if((null===(e=c.current)||void 0===e?void 0:e.base)instanceof HTMLElement){const{offsetLeft:e,offsetWidth:t,offsetHeight:n}=c.current.base;d({left:e,width:t,bottom:"top"===o?n-2:0})}}),[s,t,c,n]),Nt("div",{className:"vm-tabs",children:[n.map((e=>Nt(Ar,{activeItem:t,item:e,onChange:i,color:a,activeNavRef:c,isNavLink:l},e.value))),Nt("div",{className:"vm-tabs__indicator",style:{...u,borderColor:a}})]})},Lr=[{value:mt.chart,icon:Nt(Wn,{}),label:"Graph",prometheusCode:0},{value:mt.code,icon:Nt(Qn,{}),label:"JSON",prometheusCode:3},{value:mt.table,icon:Nt(Kn,{}),label:"Table",prometheusCode:1}],Pr=()=>{const{displayType:e}=Fr(),t=jr();return Nt($r,{activeItem:e,items:Lr,onChange:n=>{var r;t({type:"SET_DISPLAY_TYPE",payload:null!==(r=n)&&void 0!==r?r:e})}})},Ir=()=>{const e=ut("g0.tab",0),t=Lr.find((t=>t.prometheusCode===+e||t.value===e));return(null===t||void 0===t?void 0:t.value)||mt.chart},Or=et("SERIES_LIMITS"),Rr={displayType:Ir(),nocache:!1,isTracingEnabled:!1,seriesLimits:Or?JSON.parse(Or):lt,tableCompact:et("TABLE_COMPACT")||!1};function Dr(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return{...e,displayType:t.payload};case"SET_SERIES_LIMITS":return Xe("SERIES_LIMITS",JSON.stringify(t.payload)),{...e,seriesLimits:t.payload};case"TOGGLE_QUERY_TRACING":return{...e,isTracingEnabled:!e.isTracingEnabled};case"TOGGLE_NO_CACHE":return{...e,nocache:!e.nocache};case"TOGGLE_TABLE_COMPACT":return Xe("TABLE_COMPACT",!e.tableCompact),{...e,tableCompact:!e.tableCompact};default:throw new Error}}const zr=(0,r.createContext)({}),Fr=()=>(0,r.useContext)(zr).state,jr=()=>(0,r.useContext)(zr).dispatch,Hr={customStep:ut("g0.step_input",""),yaxis:{limits:{enable:!1,range:{1:[0,0]}}},isHistogram:!1,spanGaps:!1};function Vr(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,enable:!e.yaxis.limits.enable}}};case"SET_CUSTOM_STEP":return{...e,customStep:t.payload};case"SET_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,range:t.payload}}};case"SET_IS_HISTOGRAM":return{...e,isHistogram:t.payload};case"SET_SPAN_GAPS":return{...e,spanGaps:t.payload};default:throw new Error}}const Ur=(0,r.createContext)({}),Br=()=>(0,r.useContext)(Ur).state,qr=()=>(0,r.useContext)(Ur).dispatch,Yr={dashboardsSettings:[],dashboardsLoading:!1,dashboardsError:""};function Wr(e,t){switch(t.type){case"SET_DASHBOARDS_SETTINGS":return{...e,dashboardsSettings:t.payload};case"SET_DASHBOARDS_LOADING":return{...e,dashboardsLoading:t.payload};case"SET_DASHBOARDS_ERROR":return{...e,dashboardsError:t.payload};default:throw new Error}}const Kr=(0,r.createContext)({}),Qr=()=>(0,r.useContext)(Kr).state,Zr={markdownParsing:"true"===et("LOGS_MARKDOWN")};function Gr(e,t){if("SET_MARKDOWN_PARSING"===t.type)return Xe("LOGS_MARKDOWN",`${t.payload}`),{...e,markdownParsing:t.payload};throw new Error}const Jr=(0,r.createContext)({}),Xr={windows:"Windows",mac:"Mac OS",linux:"Linux"},ea=()=>(Object.values(Xr).find((e=>navigator.userAgent.indexOf(e)>=0))||"unknown")===Xr.mac;function ta(){const e=Tr(),t=()=>{const e=["Android","webOS","iPhone","iPad","iPod","BlackBerry","Windows Phone"].map((e=>navigator.userAgent.match(new RegExp(e,"i")))).some((e=>e)),t=window.innerWidth<500;return e||t},[n,a]=(0,r.useState)(t());return(0,r.useEffect)((()=>{a(t())}),[e]),{isMobile:n}}const na={success:Nt(Dn,{}),error:Nt(Rn,{}),warning:Nt(On,{}),info:Nt(In,{})},ra=e=>{let{variant:t,children:n}=e;const{isDarkTheme:r}=Mt(),{isMobile:a}=ta();return Nt("div",{className:Er()({"vm-alert":!0,[`vm-alert_${t}`]:t,"vm-alert_dark":r,"vm-alert_mobile":a}),children:[Nt("div",{className:"vm-alert__icon",children:na[t||"info"]}),Nt("div",{className:"vm-alert__content",children:n})]})},aa=(0,r.createContext)({showInfoMessage:()=>{}}),ia=function(){for(var e=arguments.length,t=new Array(e),n=0;nn=>{let{children:r}=n;return Nt(e,{children:Nt(t,{children:r})})}),(e=>{let{children:t}=e;return Nt(Ct.FK,{children:t})}))}(...[e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(St,$t),i=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(At.Provider,{value:i,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(mn,hn),i=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(pn.Provider,{value:i,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(xn,kn),i=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(Sn.Provider,{value:i,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(Dr,Rr),i=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(zr.Provider,{value:i,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(Vr,Hr),i=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(Ur.Provider,{value:i,children:t})},e=>{let{children:t}=e;const{isMobile:n}=ta(),[a,i]=(0,r.useState)({}),[o,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)(void 0);(0,r.useEffect)((()=>{if(!s)return;i({message:s.text,variant:s.type,key:Date.now()}),l(!0);const e=setTimeout(u,4e3);return()=>clearTimeout(e)}),[s]);const u=()=>{c(void 0),l(!1)};return Nt(aa.Provider,{value:{showInfoMessage:c},children:[o&&Nt("div",{className:Er()({"vm-snackbar":!0,"vm-snackbar_mobile":n}),children:Nt(ra,{variant:a.variant,children:Nt("div",{className:"vm-snackbar-content",children:[Nt("span",{children:a.message}),Nt("div",{className:"vm-snackbar-content__close",onClick:u,children:Nt(Ln,{})})]})})}),t]})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(Wr,Yr),i=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(Kr.Provider,{value:i,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(Gr,Zr),i=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(Jr.Provider,{value:i,children:t})}]);let oa=function(e){return e[e.internalLink=0]="internalLink",e[e.externalLink=1]="externalLink",e}({});const la=(e,t)=>({label:"Alerts",value:!!Je(e)?`${e}/vmalert`:e.replace(/\/prometheus$/,"/vmalert"),type:oa.externalLink,hide:!t}),sa=e=>[{value:We.trace},{value:We.queryAnalyzer},{value:We.withTemplate},{value:We.relabel},{value:We.downsamplingDebug,hide:!e},{value:We.retentionDebug,hide:!e}],ca=e=>{let{activeMenu:t,label:n,value:r,type:a,color:i}=e;return a===oa.externalLink?Nt("a",{className:Er()({"vm-header-nav-item":!0,"vm-header-nav-item_active":t===r}),style:{color:i},href:r,target:"_blank",rel:"noreferrer",children:n}):Nt(Re,{className:Er()({"vm-header-nav-item":!0,"vm-header-nav-item_active":t===r}),style:{color:i},to:r,children:n})},ua=(e,t,n)=>{const a=(0,r.useCallback)((r=>{const a=null===e||void 0===e?void 0:e.current,i=r.target,o=(null===n||void 0===n?void 0:n.current)&&n.current.contains(i);!a||a.contains((null===r||void 0===r?void 0:r.target)||null)||o||t(r)}),[e,t]);Mr("mousedown",a),Mr("touchstart",a)},da=e=>{let{variant:t="contained",color:n="primary",size:r="medium",ariaLabel:a,children:i,endIcon:o,startIcon:l,fullWidth:s=!1,className:c,disabled:u,onClick:d,onMouseDown:h}=e;return Nt("button",{className:Er()({"vm-button":!0,[`vm-button_${t}_${n}`]:!0,[`vm-button_${r}`]:r,"vm-button_icon":(l||o)&&!i,"vm-button_full-width":s,"vm-button_with-icon":l||o,"vm-button_disabled":u,[c||""]:c}),disabled:u,"aria-label":a,onClick:d,onMouseDown:h,children:Nt(Ct.FK,{children:[l&&Nt("span",{className:"vm-button__start-icon",children:l}),i&&Nt("span",{children:i}),o&&Nt("span",{className:"vm-button__end-icon",children:o})]})})},ha=e=>{let{children:t,buttonRef:n,placement:a="bottom-left",open:i=!1,onClose:o,offset:l={top:6,left:0},clickOutside:s=!0,fullWidth:c,title:u,disabledFullScreen:d,variant:h}=e;const{isMobile:m}=ta(),p=ie(),f=re(),[v,g]=(0,r.useState)({width:0,height:0}),[y,_]=(0,r.useState)(!1),b=(0,r.useRef)(null);(0,r.useEffect)((()=>(_(i),!i&&o&&o(),i&&m&&!d&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="auto"})),[i]),(0,r.useEffect)((()=>{var e,t;g({width:(null===b||void 0===b||null===(e=b.current)||void 0===e?void 0:e.clientWidth)||0,height:(null===b||void 0===b||null===(t=b.current)||void 0===t?void 0:t.clientHeight)||0}),_(!1)}),[b]);const w=(0,r.useMemo)((()=>{const e=n.current;if(!e||!y)return{};const t=e.getBoundingClientRect(),r={top:0,left:0,width:"auto"},i="bottom-right"===a||"top-right"===a,o=null===a||void 0===a?void 0:a.includes("top"),s=(null===l||void 0===l?void 0:l.top)||0,u=(null===l||void 0===l?void 0:l.left)||0;r.left=r.left=t.left+u,r.top=t.height+t.top+s,i&&(r.left=t.right-v.width),o&&(r.top=t.top-v.height-s);const{innerWidth:d,innerHeight:h}=window,m=r.top+v.height+20>h,p=r.top-20<0,f=r.left+v.width+20>d,g=r.left-20<0;return m&&(r.top=t.top-v.height-s),p&&(r.top=t.height+t.top+s),f&&(r.left=t.right-v.width-u),g&&(r.left=t.left+u),c&&(r.width=`${t.width}px`),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[n,a,y,t,c]),k=()=>{_(!1),o()};(0,r.useEffect)((()=>{if(!b.current||!y||m&&!d)return;const{right:e,width:t}=b.current.getBoundingClientRect();if(e>window.innerWidth){const e=window.innerWidth-20-t;b.current.style.left=e{y&&m&&!d&&(p(f,{replace:!0}),o())}),[y,m,d,f,o]);return Mr("scroll",k),Mr("popstate",x),ua(b,(()=>{s&&k()}),n),Nt(Ct.FK,{children:(y||!v.width)&&r.default.createPortal(Nt("div",{className:Er()({"vm-popper":!0,[`vm-popper_${h}`]:h,"vm-popper_mobile":m&&!d,"vm-popper_open":(m||Object.keys(w).length)&&y}),ref:b,style:m&&!d?{}:w,children:[(u||m&&!d)&&Nt("div",{className:"vm-popper-header",children:[Nt("p",{className:"vm-popper-header__title",children:u}),Nt(da,{variant:"text",color:"dark"===h?"white":"primary",size:"small",onClick:e=>{e.stopPropagation(),o()},ariaLabel:"close",children:Nt(Ln,{})})]}),t]}),document.body)})},ma=e=>{const[t,n]=(0,r.useState)(!!e),a=(0,r.useCallback)((()=>n(!0)),[]),i=(0,r.useCallback)((()=>n(!1)),[]),o=(0,r.useCallback)((()=>n((e=>!e))),[]);return{value:t,setValue:n,setTrue:a,setFalse:i,toggle:o}},pa=e=>{let{activeMenu:t,label:n,color:a,background:i,submenu:o,direction:l}=e;const{pathname:s}=re(),[c,u]=(0,r.useState)(null),d=(0,r.useRef)(null),{value:h,setFalse:m,setTrue:p}=ma(!1),f=()=>{c&&clearTimeout(c);const e=setTimeout(m,300);u(e)};return(0,r.useEffect)((()=>{m()}),[s]),"column"===l?Nt(Ct.FK,{children:o.map((e=>Nt(ca,{activeMenu:t,value:e.value||"",label:e.label||"",type:e.type||oa.internalLink},e.value)))}):Nt("div",{className:Er()({"vm-header-nav-item":!0,"vm-header-nav-item_sub":!0,"vm-header-nav-item_open":h,"vm-header-nav-item_active":o.find((e=>e.value===t))}),style:{color:a},onMouseEnter:()=>{p(),c&&clearTimeout(c)},onMouseLeave:f,ref:d,children:[n,Nt(jn,{}),Nt(ha,{open:h,placement:"bottom-left",offset:{top:12,left:0},onClose:m,buttonRef:d,children:Nt("div",{className:"vm-header-nav-item-submenu",style:{background:i},onMouseLeave:f,onMouseEnter:()=>{c&&clearTimeout(c)},children:o.map((e=>Nt(ca,{activeMenu:t,value:e.value||"",label:e.label||"",color:a,type:e.type||oa.internalLink},e.value)))})})]})},fa=e=>e.filter((e=>!e.hide)).map((e=>{const t={...e};var n;t.value&&!t.label&&(t.label=(null===(n=Ye[t.value])||void 0===n?void 0:n.title)||(e=>{try{return e.replace(/^\/+/,"").replace(/-/g," ").trim().replace(/^\w/,(e=>e.toUpperCase()))}catch(zp){return e}})(t.value));return t.submenu&&t.submenu.length>0&&(t.submenu=fa(t.submenu)),t})),va={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_TYPE,ga=()=>{var e;const t=Qe(),{dashboardsSettings:n}=Qr(),{serverUrl:a,flags:i,appConfig:o}=Mt(),l="enterprise"===(null===(e=o.license)||void 0===e?void 0:e.type),s=Boolean(i["vmalert.proxyURL"]),c=Boolean(!t&&n.length),u=(0,r.useMemo)((()=>({serverUrl:a,isEnterpriseLicense:l,showAlertLink:s,showPredefinedDashboards:c})),[a,l,s,c]),d=(0,r.useMemo)((()=>{switch(va){case He.logs:return[{label:Ye[We.logs].title,value:We.home}];case He.anomaly:return[{label:Ye[We.anomaly].title,value:We.home}];default:return(e=>{let{serverUrl:t,isEnterpriseLicense:n,showPredefinedDashboards:r,showAlertLink:a}=e;return[{value:We.home},{label:"Explore",submenu:[{value:We.metrics},{value:We.cardinality},{value:We.topQueries},{value:We.activeQueries}]},{label:"Tools",submenu:sa(n)},{value:We.dashboards,hide:!r},la(t,a)]})(u)}}),[u]);return fa(d)},ya=e=>{let{color:t,background:n,direction:a}=e;const{pathname:i}=re(),[o,l]=(0,r.useState)(i),s=ga();return(0,r.useEffect)((()=>{l(i)}),[i]),Nt("nav",{className:Er()({"vm-header-nav":!0,[`vm-header-nav_${a}`]:a}),children:s.map((e=>e.submenu?Nt(pa,{activeMenu:o,label:e.label||"",submenu:e.submenu,color:t,background:n,direction:a},e.label):Nt(ca,{activeMenu:o,value:e.value||"",label:e.label||"",color:t,type:e.type||oa.internalLink},e.value)))})},_a=e=>{let{title:t,children:n,onClose:a,className:i,isOpen:o=!0}=e;const{isMobile:l}=ta(),s=ie(),c=re(),u=(0,r.useCallback)((e=>{o&&"Escape"===e.key&&a()}),[o]),d=e=>{e.stopPropagation()},h=(0,r.useCallback)((()=>{o&&(s(c,{replace:!0}),a())}),[o,c,a]);return(0,r.useEffect)((()=>{if(o)return document.body.style.overflow="hidden",()=>{document.body.style.overflow="auto"}}),[o]),Mr("popstate",h),Mr("keyup",u),r.default.createPortal(Nt("div",{className:Er()({"vm-modal":!0,"vm-modal_mobile":l,[`${i}`]:i}),onMouseDown:a,children:Nt("div",{className:"vm-modal-content",children:[Nt("div",{className:"vm-modal-content-header",onMouseDown:d,children:[t&&Nt("div",{className:"vm-modal-content-header__title",children:t}),Nt("div",{className:"vm-modal-header__close",children:Nt(da,{variant:"text",size:"small",onClick:a,ariaLabel:"close",children:Nt(Ln,{})})})]}),Nt("div",{className:"vm-modal-content-body",onMouseDown:d,tabIndex:0,children:n})]})}),document.body)},ba=e=>{let{children:t,title:n,open:a,placement:i="bottom-center",offset:o={top:6,left:0}}=e;const{isMobile:l}=ta(),[s,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)({width:0,height:0}),h=(0,r.useRef)(null),m=(0,r.useRef)(null),p=()=>c(!1);(0,r.useEffect)((()=>{if(m.current&&s)return d({width:m.current.clientWidth,height:m.current.clientHeight}),window.addEventListener("scroll",p),()=>{window.removeEventListener("scroll",p)}}),[s,n]);const f=(0,r.useMemo)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(!t||!s)return{};const n=t.getBoundingClientRect(),r={top:0,left:0},a="bottom-right"===i||"top-right"===i,l="bottom-left"===i||"top-left"===i,c=null===i||void 0===i?void 0:i.includes("top"),d=(null===o||void 0===o?void 0:o.top)||0,m=(null===o||void 0===o?void 0:o.left)||0;r.left=n.left-(u.width-n.width)/2+m,r.top=n.height+n.top+d,a&&(r.left=n.right-u.width),l&&(r.left=n.left+m),c&&(r.top=n.top-u.height-d);const{innerWidth:p,innerHeight:f}=window,v=r.top+u.height+20>f,g=r.top-20<0,y=r.left+u.width+20>p,_=r.left-20<0;return v&&(r.top=n.top-u.height-d),g&&(r.top=n.height+n.top+d),y&&(r.left=n.right-u.width-m),_&&(r.left=n.left+m),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[h,i,s,u]),v=()=>{"boolean"!==typeof a&&c(!0)},g=()=>{c(!1)};return(0,r.useEffect)((()=>{"boolean"===typeof a&&c(a)}),[a]),(0,r.useEffect)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",v),t.addEventListener("mouseleave",g),()=>{t.removeEventListener("mouseenter",v),t.removeEventListener("mouseleave",g)}}),[h]),Nt(Ct.FK,{children:[Nt(r.Fragment,{ref:h,children:t}),!l&&s&&r.default.createPortal(Nt("div",{className:"vm-tooltip",ref:m,style:f,children:n}),document.body)]})},wa=Nt("code",{children:ea()?"Cmd":"Ctrl"}),ka=[{title:"Zoom in",description:Nt(Ct.FK,{children:["To zoom in, hold down the ",wa," + ",Nt("code",{children:"scroll up"}),", or press the ",Nt("code",{children:"+"}),". Also, you can zoom in on a range on the graph by holding down your mouse button and selecting the range."]})},{title:"Zoom out",description:Nt(Ct.FK,{children:["To zoom out, hold down the ",wa," + ",Nt("code",{children:"scroll down"}),", or press the ",Nt("code",{children:"-"}),"."]})},{title:"Move horizontal axis",description:Nt(Ct.FK,{children:["To move the graph, hold down the ",wa," + ",Nt("code",{children:"drag"})," the graph to the right or left."]})},{title:"Fixing a tooltip",description:Nt(Ct.FK,{children:["To fix the tooltip, ",Nt("code",{children:"click"})," mouse when it's open. Then, you can drag the fixed tooltip by ",Nt("code",{children:"clicking"})," and ",Nt("code",{children:"dragging"})," on the ",Nt(ar,{})," icon."]})},{title:"Set a custom range for the vertical axis",description:Nt(Ct.FK,{children:["To set a custom range for the vertical axis, click on the ",Nt($n,{})," icon located in the upper right corner of the graph, activate the toggle, and set the values."]})}],xa=[{title:"Show/hide a legend item",description:Nt(Ct.FK,{children:[Nt("code",{children:"click"})," on a legend item to isolate it on the graph.",wa," + ",Nt("code",{children:"click"})," on a legend item to remove it from the graph. To revert to the previous state, click again."]})},{title:"Copy label key-value pairs",description:Nt(Ct.FK,{children:[Nt("code",{children:"click"})," on a label key-value pair to save it to the clipboard."]})},{title:"Collapse/Expand the legend group",description:Nt(Ct.FK,{children:[Nt("code",{children:"click"})," on the group name (e.g. ",Nt("b",{children:'Query 1: {__name__!=""}'}),") to collapse or expand the legend."]})}],Sa=ka.concat(xa),Ca=()=>{const{value:e,setFalse:t,setTrue:n}=ma(!1);return Nt(Ct.FK,{children:[Nt(ba,{title:"Show tips on working with the graph",children:Nt(da,{variant:"text",color:"gray",startIcon:Nt(hr,{}),onClick:n,ariaLabel:"open the tips"})}),e&&Nt(_a,{title:"Tips on working with the graph and the legend",onClose:t,children:Nt("div",{className:"fc-graph-tips",children:Sa.map((e=>{let{title:t,description:n}=e;return Nt("div",{className:"fc-graph-tips-item",children:[Nt("h4",{className:"fc-graph-tips-item__action",children:t}),Nt("p",{className:"fc-graph-tips-item__description",children:n})]},t)}))})})]})},Ea=Nt("code",{children:ea()?"Cmd":"Ctrl"}),Na=Nt(Ct.FK,{children:[Nt("code",{children:ea()?"Option":"Ctrl"})," + ",Nt("code",{children:"Space"})]}),Aa=[{title:"Query",list:[{keys:Nt("code",{children:"Enter"}),description:"Run"},{keys:Nt(Ct.FK,{children:[Nt("code",{children:"Shift"})," + ",Nt("code",{children:"Enter"})]}),description:"Multi-line queries"},{keys:Nt(Ct.FK,{children:[Ea," + ",Nt("code",{children:"Arrow Up"})]}),description:"Previous command from the Query history"},{keys:Nt(Ct.FK,{children:[Ea," + ",Nt("code",{children:"Arrow Down"})]}),description:"Next command from the Query history"},{keys:Nt(Ct.FK,{children:[Ea," + ",Nt("code",{children:"click"})," by ",Nt(er,{})]}),description:"Toggle multiple queries"},{keys:Na,description:"Show quick autocomplete tips"}]},{title:"Graph",readMore:Nt(Ca,{}),list:[{keys:Nt(Ct.FK,{children:[Ea," + ",Nt("code",{children:"scroll Up"})," or ",Nt("code",{children:"+"})]}),description:"Zoom in"},{keys:Nt(Ct.FK,{children:[Ea," + ",Nt("code",{children:"scroll Down"})," or ",Nt("code",{children:"-"})]}),description:"Zoom out"},{keys:Nt(Ct.FK,{children:[Ea," + ",Nt("code",{children:"drag"})]}),description:"Move the graph left/right"},{keys:Nt(Ct.FK,{children:Nt("code",{children:"click"})}),description:"Select the series in the legend"},{keys:Nt(Ct.FK,{children:[Ea," + ",Nt("code",{children:"click"})]}),description:"Toggle multiple series in the legend"}]}],Ma="Shortcut keys",Ta=ea(),$a=Ta?"Cmd + /":"F1",La=e=>{let{showTitle:t}=e;const n=Qe(),{value:a,setTrue:i,setFalse:o}=ma(!1),l=(0,r.useCallback)((e=>{const t=Ta&&"/"===e.key&&e.metaKey,n=!Ta&&"F1"===e.key&&!e.metaKey;(t||n)&&i()}),[i]);return Mr("keydown",l),Nt(Ct.FK,{children:[Nt(ba,{open:!0!==t&&void 0,title:`${Ma} (${$a})`,placement:"bottom-center",children:Nt(da,{className:n?"":"vm-header-button",variant:"contained",color:"primary",startIcon:Nt(Bn,{}),onClick:i,ariaLabel:Ma,children:t&&Ma})}),a&&Nt(_a,{title:"Shortcut keys",onClose:o,children:Nt("div",{className:"vm-shortcuts",children:Aa.map((e=>Nt("div",{className:"vm-shortcuts-section",children:[e.readMore&&Nt("div",{className:"vm-shortcuts-section__read-more",children:e.readMore}),Nt("h3",{className:"vm-shortcuts-section__title",children:e.title}),Nt("div",{className:"vm-shortcuts-section-list",children:e.list.map(((t,n)=>Nt("div",{className:"vm-shortcuts-section-list-item",children:[Nt("div",{className:"vm-shortcuts-section-list-item__key",children:t.keys}),Nt("p",{className:"vm-shortcuts-section-list-item__description",children:t.description})]},`${e.title}_${n}`)))})]},e.title)))})})]})},Pa=e=>{let{open:t}=e;return Nt("button",{className:Er()({"vm-menu-burger":!0,"vm-menu-burger_opened":t}),"aria-label":"menu",children:Nt("span",{})})},{REACT_APP_TYPE:Ia}={},Oa=Ia===He.logs,Ra=e=>{let{background:t,color:n}=e;const{pathname:a}=re(),{isMobile:i}=ta(),o=(0,r.useRef)(null),{value:l,toggle:s,setFalse:c}=ma(!1);return(0,r.useEffect)(c,[a]),ua(o,c),Nt("div",{className:"vm-header-sidebar",ref:o,children:[Nt("div",{className:Er()({"vm-header-sidebar-button":!0,"vm-header-sidebar-button_open":l}),onClick:s,children:Nt(Pa,{open:l})}),Nt("div",{className:Er()({"vm-header-sidebar-menu":!0,"vm-header-sidebar-menu_open":l}),children:[Nt("div",{children:Nt(ya,{color:n,background:t,direction:"column"})}),Nt("div",{className:"vm-header-sidebar-menu-settings",children:!i&&!Oa&&Nt(La,{showTitle:!0})})]})]})},Da=e=>{let{controlsComponent:t,isMobile:n,...a}=e;const i=Qe(),{pathname:o}=re(),{accountIds:l}=(()=>{const{useTenantID:e}=Ke(),t=Qe(),{serverUrl:n}=Mt(),[a,i]=(0,r.useState)(!1),[o,l]=(0,r.useState)(),[s,c]=(0,r.useState)([]),u=(0,r.useMemo)((()=>`${n.replace(/^(.+)(\/select.+)/,"$1")}/admin/tenants`),[n]),d=(0,r.useMemo)((()=>!!Je(n)),[n]),h=t?!e:!d;return(0,r.useEffect)((()=>{h||(async()=>{i(!0);try{const e=await fetch(u),t=await e.json(),n=t.data||[];c(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?l(void 0):l(`${t.errorType}\r\n${null===t||void 0===t?void 0:t.error}`)}catch(zp){zp instanceof Error&&l(`${zp.name}: ${zp.message}`)}i(!1)})().catch(console.error)}),[u]),{accountIds:s,isLoading:a,error:o}})(),{value:s,toggle:c,setFalse:u}=ma(!1),d=Nt(t,{...a,isMobile:n,accountIds:l,headerSetup:(0,r.useMemo)((()=>(Ye[o]||{}).header||{}),[o])});return n?Nt(Ct.FK,{children:[Nt("div",{children:Nt(da,{className:Er()({"vm-header-button":!i}),startIcon:Nt(ur,{}),onClick:c,ariaLabel:"controls"})}),Nt(_a,{title:"Controls",onClose:u,isOpen:s,className:Er()({"vm-header-controls-modal":!0,"vm-header-controls-modal_open":s}),children:d})]}):d},{REACT_APP_TYPE:za}={},Fa=za===He.logs||za===He.anomaly,ja=()=>{switch(za){case He.logs:return Nt(An,{});case He.anomaly:return Nt(Mn,{});default:return Nt(Nn,{})}},Ha=e=>{let{controlsComponent:t}=e;const{isMobile:n}=ta(),a=Tr(),i=(0,r.useMemo)((()=>window.innerWidth<1e3),[a]),{isDarkTheme:o}=Mt(),l=Qe(),s=(0,r.useMemo)((()=>gt(o?"color-background-block":"color-primary")),[o]),{background:c,color:u}=(0,r.useMemo)((()=>{const{headerStyles:{background:e=(l?"#FFF":s),color:t=(l?s:"#FFF")}={}}=Ke();return{background:e,color:t}}),[s]),d=ie(),h=()=>{d({pathname:We.home}),window.location.reload()};return Nt("header",{className:Er()({"vm-header":!0,"vm-header_app":l,"vm-header_dark":o,"vm-header_sidebar":i,"vm-header_mobile":n}),style:{background:c,color:u},children:[i?Nt(Ra,{background:c,color:u}):Nt(Ct.FK,{children:[!l&&Nt("div",{className:Er()({"vm-header-logo":!0,"vm-header-logo_logs":Fa}),onClick:h,style:{color:u},children:Nt(ja,{})}),Nt(ya,{color:u,background:c})]}),i&&Nt("div",{className:Er()({"vm-header-logo":!0,"vm-header-logo_mobile":!0,"vm-header-logo_logs":Fa}),onClick:h,style:{color:u},children:Nt(ja,{})}),Nt(Da,{controlsComponent:t,displaySidebar:i,isMobile:n})]})},Va={href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new/choose",Icon:lr,title:"Create an issue"},Ua=[{href:"https://docs.victoriametrics.com/MetricsQL.html",Icon:Qn,title:"MetricsQL"},{href:"https://docs.victoriametrics.com/#vmui",Icon:or,title:"Documentation"},Va],Ba=(0,r.memo)((e=>{let{links:t=Ua}=e;const n=`2019-${(new Date).getFullYear()}`;return Nt("footer",{className:"vm-footer",children:[Nt("a",{className:"vm-link vm-footer__website",target:"_blank",href:"https://victoriametrics.com/",rel:"me noreferrer",children:[Nt(Tn,{}),"victoriametrics.com"]}),t.map((e=>{let{href:t,Icon:n,title:r}=e;return Nt("a",{className:"vm-link vm-footer__link",target:"_blank",href:t,rel:"help noreferrer",children:[Nt(n,{}),r]},`${t}-${r}`)})),Nt("div",{className:"vm-footer__copyright",children:["\xa9 ",n," VictoriaMetrics"]})]})})),qa=Ba,Ya=()=>{const e=Qe(),{serverUrl:t}=Mt(),n=(0,r.useContext)(Kr).dispatch,[a,i]=(0,r.useState)(!1),[o,l]=(0,r.useState)(""),[s,c]=(0,r.useState)([]),u=async()=>{try{const e=window.__VMUI_PREDEFINED_DASHBOARDS__;if(null===e||void 0===e||!e.length)return[];const t=await Promise.all(e.map((async e=>(async e=>{const t=await fetch(`./dashboards/${e}`);return await t.json()})(e))));c((e=>[...t,...e]))}catch(zp){zp instanceof Error&&l(`${zp.name}: ${zp.message}`)}};return(0,r.useEffect)((()=>{e||(c([]),(async()=>{if(t&&!{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_TYPE){l(""),i(!0);try{const e=await fetch(`${t}/vmui/custom-dashboards`),n=await e.json();if(e.ok){const{dashboardsSettings:e}=n;e&&e.length>0?c((t=>[...t,...e])):await u(),i(!1)}else await u(),l(n.error),i(!1)}catch(zp){i(!1),zp instanceof Error&&l(`${zp.name}: ${zp.message}`),await u()}}})())}),[t]),(0,r.useEffect)((()=>{n({type:"SET_DASHBOARDS_SETTINGS",payload:s})}),[s]),(0,r.useEffect)((()=>{n({type:"SET_DASHBOARDS_LOADING",payload:a})}),[a]),(0,r.useEffect)((()=>{n({type:"SET_DASHBOARDS_ERROR",payload:o})}),[o]),{dashboardsSettings:s,isLoading:a,error:o}},Wa=e=>{let{error:t,warning:n,info:a}=e;const i=(0,r.useRef)(null),[o,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)(!1),u=`${(0,r.useMemo)((()=>t?"ERROR: ":n?"WARNING: ":""),[t,n])}${t||n||a}`,d=()=>{const e=i.current;if(e){const{offsetWidth:t,scrollWidth:n,offsetHeight:r,scrollHeight:a}=e;l(t+1{c(!1),d()}),[i,u]),Mr("resize",d),t||n||a?Nt("span",{className:Er()({"vm-text-field__error":!0,"vm-text-field__warning":n&&!t,"vm-text-field__helper-text":!n&&!t,"vm-text-field__error_overflowed":o,"vm-text-field__error_full":s}),"data-show":!!u,ref:i,onClick:()=>{o&&(c(!0),l(!1))},children:u}):null},Ka=e=>{let{label:t,value:n,type:a="text",error:i="",warning:o="",helperText:l="",placeholder:s,endIcon:c,startIcon:u,disabled:d=!1,autofocus:h=!1,inputmode:m="text",caretPosition:p,onChange:f,onEnter:v,onKeyDown:g,onFocus:y,onBlur:_,onChangeCaret:b}=e;const{isDarkTheme:w}=Mt(),{isMobile:k}=ta(),x=(0,r.useRef)(null),S=(0,r.useRef)(null),C=(0,r.useMemo)((()=>"textarea"===a?S:x),[a]),[E,N]=(0,r.useState)([0,0]),A=Er()({"vm-text-field__input":!0,"vm-text-field__input_error":i,"vm-text-field__input_warning":!i&&o,"vm-text-field__input_icon-start":u,"vm-text-field__input_disabled":d,"vm-text-field__input_textarea":"textarea"===a}),M=e=>{const{selectionStart:t,selectionEnd:n}=e;N([t||0,n||0])},T=e=>{M(e.currentTarget)},$=e=>{g&&g(e);const{key:t,ctrlKey:n,metaKey:r}=e,i="Enter"===t;("textarea"!==a?i:i&&(r||n))&&v&&(e.preventDefault(),v())},L=e=>{M(e.currentTarget)},P=e=>{d||(f&&f(e.currentTarget.value),M(e.currentTarget))},I=()=>{y&&y()},O=()=>{_&&_()},R=e=>{try{C.current&&C.current.setSelectionRange(e[0],e[1])}catch(zp){return zp}};return(0,r.useEffect)((()=>{var e;h&&!k&&(null===C||void 0===C||null===(e=C.current)||void 0===e?void 0:e.focus)&&C.current.focus()}),[C,h]),(0,r.useEffect)((()=>{b&&b(E)}),[E]),(0,r.useEffect)((()=>{R(E)}),[n]),(0,r.useEffect)((()=>{p&&R(p)}),[p]),Nt("label",{className:Er()({"vm-text-field":!0,"vm-text-field_textarea":"textarea"===a,"vm-text-field_dark":w}),"data-replicated-value":n,children:[u&&Nt("div",{className:"vm-text-field__icon-start",children:u}),c&&Nt("div",{className:"vm-text-field__icon-end",children:c}),"textarea"===a?Nt("textarea",{className:A,disabled:d,ref:S,value:n,rows:1,inputMode:m,placeholder:s,autoCapitalize:"none",onInput:P,onKeyDown:$,onKeyUp:L,onFocus:I,onBlur:O,onMouseUp:T}):Nt("input",{className:A,disabled:d,ref:x,value:n,type:a,placeholder:s,inputMode:m,autoCapitalize:"none",onInput:P,onKeyDown:$,onKeyUp:L,onFocus:I,onBlur:O,onMouseUp:T}),t&&Nt("span",{className:"vm-text-field__label",children:t}),Nt(Wa,{error:i,warning:o,info:l})]})},Qa=e=>{let{accountIds:t}=e;const n=Qe(),{isMobile:a}=ta(),{tenantId:i,serverUrl:o}=Mt(),l=Tt(),s=vn(),[c,u]=(0,r.useState)(""),d=(0,r.useRef)(null),{value:h,toggle:m,setFalse:p}=ma(!1),f=(0,r.useMemo)((()=>{if(!c)return t;try{const e=new RegExp(c,"i");return t.filter((t=>e.test(t))).sort(((t,n)=>{var r,a;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(a=n.match(e))||void 0===a?void 0:a.index)||0)}))}catch(zp){return[]}}),[c,t]),v=(0,r.useMemo)((()=>t.length>1),[t]),g=e=>()=>{const t=e;if(l({type:"SET_TENANT_ID",payload:t}),o){const e=Ge(o,t);if(e===o)return;l({type:"SET_SERVER",payload:e}),s({type:"RUN_QUERY"})}p()};return(0,r.useEffect)((()=>{const e=Je(o);i&&i!==e?g(i)():g(e)()}),[o]),v?Nt("div",{className:"vm-tenant-input",children:[Nt(ba,{title:"Define Tenant ID if you need request to another storage",children:Nt("div",{ref:d,children:a?Nt("div",{className:"vm-mobile-option",onClick:m,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(cr,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Tenant ID"}),Nt("span",{className:"vm-mobile-option-text__value",children:i})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(Fn,{})})]}):Nt(da,{className:n?"":"vm-header-button",variant:"contained",color:"primary",fullWidth:!0,startIcon:Nt(cr,{}),endIcon:Nt("div",{className:Er()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":h}),children:Nt(Fn,{})}),onClick:m,children:i})})}),Nt(ha,{open:h,placement:"bottom-right",onClose:p,buttonRef:d,title:a?"Define Tenant ID":void 0,children:Nt("div",{className:Er()({"vm-list vm-tenant-input-list":!0,"vm-list vm-tenant-input-list_mobile":a}),children:[Nt("div",{className:"vm-tenant-input-list__search",children:Nt(Ka,{autofocus:!0,label:"Search",value:c,onChange:u,type:"search"})}),f.map((e=>Nt("div",{className:Er()({"vm-list-item":!0,"vm-list-item_mobile":a,"vm-list-item_active":e===i}),onClick:g(e),children:e},e)))]})})]}):null};const Za=function(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current},Ga=()=>{const e=Qe(),{isMobile:t}=ta(),{customStep:n,isHistogram:a}=Br(),{period:{step:i,end:o,start:l}}=fn(),s=qr(),c=Za(o-l),u=(0,r.useMemo)((()=>Zt(o-l,a)),[i,a]),[d,h]=(0,r.useState)(n||u),[m,p]=(0,r.useState)(""),{value:f,toggle:v,setFalse:g}=ma(!1),y=(0,r.useRef)(null),_=e=>{const t=e||d||u||"1s",n=(t.match(/[a-zA-Z]+/g)||[]).length?t:`${t}s`;s({type:"SET_CUSTOM_STEP",payload:n}),h(n),p("")},b=()=>{_(),g()},w=e=>{const t=e.match(/[-+]?([0-9]*\.[0-9]+|[0-9]+)/g)||[],n=e.match(/[a-zA-Z]+/g)||[],r=t.length&&t.every((e=>parseFloat(e)>0)),a=n.every((e=>Ut.find((t=>t.short===e)))),i=r&&a;h(e),p(i?"":pt.validStep)};return(0,r.useEffect)((()=>{n&&_(n)}),[n]),(0,r.useEffect)((()=>{!n&&u&&_(u)}),[u]),(0,r.useEffect)((()=>{o-l!==c&&c&&u&&_(u)}),[o,l,c,u]),(0,r.useEffect)((()=>{i!==n&&i!==u||_(u)}),[a]),Nt("div",{className:"vm-step-control",ref:y,children:[t?Nt("div",{className:"vm-mobile-option",onClick:v,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(ir,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Step"}),Nt("span",{className:"vm-mobile-option-text__value",children:d})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(Fn,{})})]}):Nt(ba,{title:"Query resolution step width",children:Nt(da,{className:e?"":"vm-header-button",variant:"contained",color:"primary",startIcon:Nt(ir,{}),onClick:v,children:Nt("p",{children:["STEP",Nt("p",{className:"vm-step-control__value",children:d})]})})}),Nt(ha,{open:f,placement:"bottom-right",onClose:b,buttonRef:y,title:t?"Query resolution step width":void 0,children:Nt("div",{className:Er()({"vm-step-control-popper":!0,"vm-step-control-popper_mobile":t}),children:[Nt(Ka,{autofocus:!0,label:"Step value",value:d,error:m,onChange:w,onEnter:()=>{_(),b()},onFocus:()=>{document.activeElement instanceof HTMLInputElement&&document.activeElement.select()},onBlur:_,endIcon:Nt(ba,{title:`Set default step value: ${u}`,children:Nt(da,{size:"small",variant:"text",color:"primary",startIcon:Nt(Pn,{}),onClick:()=>{const e=u||"1s";w(e),_(e)},ariaLabel:"reset step"})})}),Nt("div",{className:"vm-step-control-popper-info",children:[Nt("code",{children:"step"})," - the ",Nt("a",{className:"vm-link vm-link_colored",href:"https://prometheus.io/docs/prometheus/latest/querying/basics/#time-durations",target:"_blank",rel:"noreferrer",children:"interval"}),"between datapoints, which must be returned from the range query. The ",Nt("code",{children:"query"})," is executed at",Nt("code",{children:"start"}),", ",Nt("code",{children:"start+step"}),", ",Nt("code",{children:"start+2*step"}),", \u2026, ",Nt("code",{children:"end"})," timestamps.",Nt("a",{className:"vm-link vm-link_colored",href:"https://docs.victoriametrics.com/keyConcepts.html#range-query",target:"_blank",rel:"help noreferrer",children:"Read more about Range query"})]})]})})]})},Ja=e=>{let{relativeTime:t,setDuration:n}=e;const{isMobile:r}=ta();return Nt("div",{className:Er()({"vm-time-duration":!0,"vm-time-duration_mobile":r}),children:rn.map((e=>{let{id:a,duration:i,until:o,title:l}=e;return Nt("div",{className:Er()({"vm-list-item":!0,"vm-list-item_mobile":r,"vm-list-item_active":a===t}),onClick:(s={duration:i,until:o(),id:a},()=>{n(s)}),children:l||i},a);var s}))})},Xa=e=>{let{viewDate:t,showArrowNav:n,onChangeViewDate:r,toggleDisplayYears:a}=e;return Nt("div",{className:"vm-calendar-header",children:[Nt("div",{className:"vm-calendar-header-left",onClick:a,children:[Nt("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),Nt("div",{className:"vm-calendar-header-left__select-year",children:Nt(jn,{})})]}),n&&Nt("div",{className:"vm-calendar-header-right",children:[Nt("div",{className:"vm-calendar-header-right__prev",onClick:()=>{r(t.subtract(1,"month"))},children:Nt(Fn,{})}),Nt("div",{className:"vm-calendar-header-right__next",onClick:()=>{r(t.add(1,"month"))},children:Nt(Fn,{})})]})]})},ei=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ti=e=>{let{viewDate:t,selectDate:n,onChangeSelectDate:a}=e;const o="YYYY-MM-DD",l=i().tz(),s=i()(t.format(o)),c=(0,r.useMemo)((()=>{const e=new Array(42).fill(null),t=s.startOf("month"),n=s.endOf("month").diff(t,"day")+1,r=new Array(n).fill(t).map(((e,t)=>e.add(t,"day"))),a=t.day();return e.splice(a,n,...r),e}),[s]),u=e=>()=>{e&&a(e)};return Nt("div",{className:"vm-calendar-body",children:[ei.map((e=>Nt(ba,{title:e,children:Nt("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]})},e))),c.map(((e,t)=>Nt("div",{className:Er()({"vm-calendar-body-cell":!0,"vm-calendar-body-cell_day":!0,"vm-calendar-body-cell_day_empty":!e,"vm-calendar-body-cell_day_active":(e&&e.format(o))===n.format(o),"vm-calendar-body-cell_day_today":(e&&e.format(o))===l.format(o)}),onClick:u(e),children:e&&e.format("D")},e?e.format(o):t)))]})},ni=e=>{let{viewDate:t,onChangeViewDate:n}=e;const a=i()().format("YYYY"),o=(0,r.useMemo)((()=>t.format("YYYY")),[t]),l=(0,r.useMemo)((()=>{const e=i()().subtract(9,"year");return new Array(18).fill(e).map(((e,t)=>e.add(t,"year")))}),[t]);(0,r.useEffect)((()=>{const e=document.getElementById(`vm-calendar-year-${o}`);e&&e.scrollIntoView({block:"center"})}),[]);return Nt("div",{className:"vm-calendar-years",children:l.map((e=>{return Nt("div",{className:Er()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===o,"vm-calendar-years__year_today":e.format("YYYY")===a}),id:`vm-calendar-year-${e.format("YYYY")}`,onClick:(t=e,()=>{n(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})},ri=e=>{let{viewDate:t,selectDate:n,onChangeViewDate:a}=e;const o=i()().format("MM"),l=(0,r.useMemo)((()=>n.format("MM")),[n]),s=(0,r.useMemo)((()=>new Array(12).fill("").map(((e,n)=>i()(t).month(n)))),[t]);(0,r.useEffect)((()=>{const e=document.getElementById(`vm-calendar-year-${l}`);e&&e.scrollIntoView({block:"center"})}),[]);return Nt("div",{className:"vm-calendar-years",children:s.map((e=>{return Nt("div",{className:Er()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("MM")===l,"vm-calendar-years__year_today":e.format("MM")===o}),id:`vm-calendar-year-${e.format("MM")}`,onClick:(t=e,()=>{a(t)}),children:e.format("MMMM")},e.format("MM"));var t}))})};var ai=function(e){return e[e.days=0]="days",e[e.months=1]="months",e[e.years=2]="years",e}(ai||{});const ii=e=>{let{date:t,format:n=Pt,onChange:a}=e;const[o,l]=(0,r.useState)(ai.days),[s,c]=(0,r.useState)(i().tz(t)),[u,d]=(0,r.useState)(i().tz(t)),h=i().tz(),m=h.format(Lt)===s.format(Lt),{isMobile:p}=ta(),f=e=>{c(e),l((e=>e===ai.years?ai.months:ai.days))};return(0,r.useEffect)((()=>{u.format()!==i().tz(t).format()&&a(u.format(n))}),[u]),(0,r.useEffect)((()=>{const e=i().tz(t);c(e),d(e)}),[t]),Nt("div",{className:Er()({"vm-calendar":!0,"vm-calendar_mobile":p}),children:[Nt(Xa,{viewDate:s,onChangeViewDate:f,toggleDisplayYears:()=>{l((e=>e===ai.years?ai.days:ai.years))},showArrowNav:o===ai.days}),o===ai.days&&Nt(ti,{viewDate:s,selectDate:u,onChangeSelectDate:e=>{d(e)}}),o===ai.years&&Nt(ni,{viewDate:s,onChangeViewDate:f}),o===ai.months&&Nt(ri,{selectDate:u,viewDate:s,onChangeViewDate:f}),!m&&o===ai.days&&Nt("div",{className:"vm-calendar-footer",children:Nt(da,{variant:"text",size:"small",onClick:()=>{c(h)},children:"show today"})})]})},oi=(0,r.forwardRef)(((e,t)=>{let{date:n,targetRef:a,format:o=Pt,onChange:l,label:s}=e;const c=(0,r.useMemo)((()=>i()(n).isValid()?i().tz(n):i()().tz()),[n]),{isMobile:u}=ta(),{value:d,toggle:h,setFalse:m}=ma(!1);return Mr("click",h,a),Mr("keyup",(e=>{"Escape"!==e.key&&"Enter"!==e.key||m()})),Nt(Ct.FK,{children:Nt(ha,{open:d,buttonRef:a,placement:"bottom-right",onClose:m,title:u?s:void 0,children:Nt("div",{ref:t,children:Nt(ii,{date:c,format:o,onChange:e=>{l(e),m()}})})})})}));var li=n(494),si=n.n(li);const ci=e=>i()(e).isValid()?i().tz(e).format(Pt):e,ui=e=>{let{value:t="",label:n,pickerLabel:a,pickerRef:o,onChange:l,onEnter:s}=e;const c=(0,r.useRef)(null),[u,d]=(0,r.useState)(null),[h,m]=(0,r.useState)(ci(t)),[p,f]=(0,r.useState)(!1),[v,g]=(0,r.useState)(!1),y=i()(h).isValid()?"":"Invalid date format";return(0,r.useEffect)((()=>{const e=ci(t);e!==h&&m(e),v&&(s(),g(!1))}),[t]),(0,r.useEffect)((()=>{p&&u&&(u.focus(),u.setSelectionRange(11,11),f(!1))}),[p]),Nt("div",{className:Er()({"vm-date-time-input":!0,"vm-date-time-input_error":y}),children:[Nt("label",{children:n}),Nt(si(),{tabIndex:1,inputRef:d,mask:"9999-99-99 99:99:99",placeholder:"YYYY-MM-DD HH:mm:ss",value:h,autoCapitalize:"none",inputMode:"numeric",maskChar:null,onChange:e=>{m(e.currentTarget.value)},onBlur:()=>{l(h)},onKeyUp:e=>{"Enter"===e.key&&(l(h),g(!0))}}),y&&Nt("span",{className:"vm-date-time-input__error-text",children:y}),Nt("div",{className:"vm-date-time-input__icon",ref:c,children:Nt(da,{variant:"text",color:"gray",size:"small",startIcon:Nt(Vn,{}),ariaLabel:"calendar"})}),Nt(oi,{label:a,ref:o,date:h,onChange:e=>{m(e),f(!0)},targetRef:c})]})},di=()=>{const{isMobile:e}=ta(),{isDarkTheme:t}=Mt(),n=(0,r.useRef)(null),a=Tr(),o=(0,r.useMemo)((()=>a.width>1120),[a]),[l,s]=(0,r.useState)(),[c,u]=(0,r.useState)(),{period:{end:d,start:h},relativeTime:m,timezone:p,duration:f}=fn(),v=vn(),g=Qe(),y=Za(p),{value:_,toggle:b,setFalse:w}=ma(!1),k=(0,r.useMemo)((()=>({region:p,utc:on(p)})),[p]);(0,r.useEffect)((()=>{s(Xt(tn(d)))}),[p,d]),(0,r.useEffect)((()=>{u(Xt(tn(h)))}),[p,h]);const x=e=>{let{duration:t,until:n,id:r}=e;v({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),w()},S=(0,r.useMemo)((()=>({start:i().tz(tn(h)).format(Pt),end:i().tz(tn(d)).format(Pt)})),[h,d,p]),C=(0,r.useMemo)((()=>m&&"none"!==m?m.replace(/_/g," "):`${S.start} - ${S.end}`),[m,S]),E=(0,r.useRef)(null),N=(0,r.useRef)(null),A=(0,r.useRef)(null),M=()=>{c&&l&&v({type:"SET_PERIOD",payload:{from:i().tz(c).toDate(),to:i().tz(l).toDate()}}),w()};return(0,r.useEffect)((()=>{const e=an({relativeTimeId:m,defaultDuration:f,defaultEndInput:tn(d)});y&&p!==y&&x({id:e.relativeTimeId,duration:e.duration,until:e.endInput})}),[p,y]),ua(n,(t=>{var n,r;if(e)return;const a=t.target,i=(null===E||void 0===E?void 0:E.current)&&(null===E||void 0===E||null===(n=E.current)||void 0===n?void 0:n.contains(a)),o=(null===N||void 0===N?void 0:N.current)&&(null===N||void 0===N||null===(r=N.current)||void 0===r?void 0:r.contains(a));i||o||w()})),Nt(Ct.FK,{children:[Nt("div",{ref:A,children:e?Nt("div",{className:"vm-mobile-option",onClick:b,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(Hn,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Time range"}),Nt("span",{className:"vm-mobile-option-text__value",children:C})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(Fn,{})})]}):Nt(ba,{title:o?"Time range controls":C,children:Nt(da,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:Nt(Hn,{}),onClick:b,ariaLabel:"time range controls",children:o&&Nt("span",{children:C})})})}),Nt(ha,{open:_,buttonRef:A,placement:"bottom-right",onClose:w,clickOutside:!1,title:e?"Time range controls":"",children:Nt("div",{className:Er()({"vm-time-selector":!0,"vm-time-selector_mobile":e}),ref:n,children:[Nt("div",{className:"vm-time-selector-left",children:[Nt("div",{className:Er()({"vm-time-selector-left-inputs":!0,"vm-time-selector-left-inputs_dark":t}),children:[Nt(ui,{value:c,label:"From:",pickerLabel:"Date From",pickerRef:E,onChange:u,onEnter:M}),Nt(ui,{value:l,label:"To:",pickerLabel:"Date To",pickerRef:N,onChange:s,onEnter:M})]}),Nt("div",{className:"vm-time-selector-left-timezone",children:[Nt("div",{className:"vm-time-selector-left-timezone__title",children:k.region}),Nt("div",{className:"vm-time-selector-left-timezone__utc",children:k.utc})]}),Nt(da,{variant:"text",startIcon:Nt(Un,{}),onClick:()=>v({type:"RUN_QUERY_TO_NOW"}),children:"switch to now"}),Nt("div",{className:"vm-time-selector-left__controls",children:[Nt(da,{color:"error",variant:"outlined",onClick:()=>{s(Xt(tn(d))),u(Xt(tn(h))),w()},children:"Cancel"}),Nt(da,{color:"primary",onClick:M,children:"Apply"})]})]}),Nt(Ja,{relativeTime:m||"",setDuration:x})]})})]})},hi=()=>{const e=ie(),[t,n]=je();return{setSearchParamsFromKeys:(0,r.useCallback)((r=>{const a=!!Array.from(t.values()).length;let i=!1;Object.entries(r).forEach((e=>{let[n,r]=e;t.get(n)!==`${r}`&&(t.set(n,`${r}`),i=!0)})),i&&(a?n(t):e(`?${t.toString()}`,{replace:!0}))}),[t,e])}},mi=()=>{const{isMobile:e}=ta(),t=Qe(),n=(0,r.useRef)(null),[a]=je(),{setSearchParamsFromKeys:o}=hi(),l=a.get("date")||i()().tz().format(Lt),s=(0,r.useMemo)((()=>i().tz(l).format(Lt)),[l]),c=e=>{o({date:e})};return(0,r.useEffect)((()=>{c(l)}),[]),Nt("div",{children:[Nt("div",{ref:n,children:e?Nt("div",{className:"vm-mobile-option",children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(Vn,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Date control"}),Nt("span",{className:"vm-mobile-option-text__value",children:s})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(Fn,{})})]}):Nt(ba,{title:"Date control",children:Nt(da,{className:t?"":"vm-header-button",variant:"contained",color:"primary",startIcon:Nt(Vn,{}),children:s})})}),Nt(oi,{label:"Date control",date:l||"",format:Lt,onChange:c,targetRef:n})]})},pi=[{seconds:0,title:"Off"},{seconds:1,title:"1s"},{seconds:2,title:"2s"},{seconds:5,title:"5s"},{seconds:10,title:"10s"},{seconds:30,title:"30s"},{seconds:60,title:"1m"},{seconds:300,title:"5m"},{seconds:900,title:"15m"},{seconds:1800,title:"30m"},{seconds:3600,title:"1h"},{seconds:7200,title:"2h"}],fi=()=>{const{isMobile:e}=ta(),t=vn(),n=Qe(),[a,i]=(0,r.useState)(!1),[o,l]=(0,r.useState)(pi[0]),{value:s,toggle:c,setFalse:u}=ma(!1),d=(0,r.useRef)(null);(0,r.useEffect)((()=>{const e=o.seconds;let n;return a?n=setInterval((()=>{t({type:"RUN_QUERY"})}),1e3*e):l(pi[0]),()=>{n&&clearInterval(n)}}),[o,a]);const h=e=>()=>{(e=>{(a&&!e.seconds||!a&&e.seconds)&&i((e=>!e)),l(e),u()})(e)};return Nt(Ct.FK,{children:[Nt("div",{className:"vm-execution-controls",children:Nt("div",{className:Er()({"vm-execution-controls-buttons":!0,"vm-execution-controls-buttons_mobile":e,"vm-header-button":!n}),children:[!e&&Nt(ba,{title:"Refresh dashboard",children:Nt(da,{variant:"contained",color:"primary",onClick:()=>{t({type:"RUN_QUERY"})},startIcon:Nt(zn,{}),ariaLabel:"refresh dashboard"})}),e?Nt("div",{className:"vm-mobile-option",onClick:c,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(Pn,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Auto-refresh"}),Nt("span",{className:"vm-mobile-option-text__value",children:o.title})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(Fn,{})})]}):Nt(ba,{title:"Auto-refresh control",children:Nt("div",{ref:d,children:Nt(da,{variant:"contained",color:"primary",fullWidth:!0,endIcon:Nt("div",{className:Er()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":s}),children:Nt(Fn,{})}),onClick:c,children:o.title})})})]})}),Nt(ha,{open:s,placement:"bottom-right",onClose:u,buttonRef:d,title:e?"Auto-refresh duration":void 0,children:Nt("div",{className:Er()({"vm-execution-controls-list":!0,"vm-execution-controls-list_mobile":e}),children:pi.map((t=>Nt("div",{className:Er()({"vm-list-item":!0,"vm-list-item_mobile":e,"vm-list-item_active":t.seconds===o.seconds}),onClick:h(t),children:t.title},t.seconds)))})})]})},vi="Enable to save the modified server URL to local storage, preventing reset upon page refresh.",gi="Disable to stop saving the server URL to local storage, reverting to the default URL on page refresh.",yi=(0,r.forwardRef)(((e,t)=>{let{onClose:n}=e;const{serverUrl:a}=Mt(),i=Tt(),{value:o,toggle:l}=ma(!!et("SERVER_URL")),[s,c]=(0,r.useState)(a),[u,d]=(0,r.useState)(""),h=(0,r.useCallback)((()=>{const e=Je(s);""!==e&&i({type:"SET_TENANT_ID",payload:e}),i({type:"SET_SERVER",payload:s}),n()}),[s]);return(0,r.useEffect)((()=>{a||d(pt.emptyServer),bt(a)||d(pt.validServer)}),[a]),(0,r.useEffect)((()=>{o?Xe("SERVER_URL",s):tt(["SERVER_URL"])}),[o]),(0,r.useEffect)((()=>{o&&Xe("SERVER_URL",s)}),[s]),(0,r.useEffect)((()=>{a!==s&&c(a)}),[a]),(0,r.useImperativeHandle)(t,(()=>({handleApply:h})),[h]),Nt("div",{children:[Nt("div",{className:"vm-server-configurator__title",children:"Server URL"}),Nt("div",{className:"vm-server-configurator-url",children:[Nt(Ka,{autofocus:!0,value:s,error:u,onChange:e=>{c(e||""),d("")},onEnter:h,inputmode:"url"}),Nt(ba,{title:o?gi:vi,children:Nt(da,{className:"vm-server-configurator-url__button",variant:"text",color:o?"primary":"gray",onClick:l,startIcon:Nt(cr,{})})})]})]})})),_i=[{label:"Graph",type:mt.chart},{label:"JSON",type:mt.code},{label:"Table",type:mt.table}],bi=(0,r.forwardRef)(((e,t)=>{let{onClose:n}=e;const{isMobile:a}=ta(),{seriesLimits:i}=Fr(),o=jr(),[l,s]=(0,r.useState)(i),[c,u]=(0,r.useState)({table:"",chart:"",code:""}),d=(0,r.useCallback)((()=>{o({type:"SET_SERIES_LIMITS",payload:l}),n()}),[l]);return(0,r.useImperativeHandle)(t,(()=>({handleApply:d})),[d]),Nt("div",{className:"vm-limits-configurator",children:[Nt("div",{className:"vm-server-configurator__title",children:["Series limits by tabs",Nt(ba,{title:"Set to 0 to disable the limit",children:Nt(da,{variant:"text",color:"primary",size:"small",startIcon:Nt(In,{})})}),Nt("div",{className:"vm-limits-configurator-title__reset",children:Nt(da,{variant:"text",color:"primary",size:"small",startIcon:Nt(Pn,{}),onClick:()=>{s(lt)},children:"Reset limits"})})]}),Nt("div",{className:Er()({"vm-limits-configurator__inputs":!0,"vm-limits-configurator__inputs_mobile":a}),children:_i.map((e=>{return Nt("div",{children:Nt(Ka,{label:e.label,value:l[e.type],error:c[e.type],onChange:(t=e.type,e=>{const n=e||"";u((e=>({...e,[t]:+n<0?pt.positiveNumber:""}))),s({...l,[t]:n||1/0})}),onEnter:d,type:"number"})},e.type);var t}))})]})})),wi=bi,ki=e=>{let{defaultExpanded:t=!1,onChange:n,title:a,children:i}=e;const[o,l]=(0,r.useState)(t);return(0,r.useEffect)((()=>{n&&n(o)}),[o]),Nt(Ct.FK,{children:[Nt("header",{className:`vm-accordion-header ${o&&"vm-accordion-header_open"}`,onClick:()=>{l((e=>!e))},children:[a,Nt("div",{className:`vm-accordion-header__arrow ${o&&"vm-accordion-header__arrow_open"}`,children:Nt(Fn,{})})]}),o&&Nt("section",{className:"vm-accordion-section",children:i},"content")]})},xi=()=>Nt(ba,{title:"Browser timezone is not recognized, supported, or could not be determined.",children:Nt(On,{})}),Si=cn(),Ci=(0,r.forwardRef)(((e,t)=>{const{isMobile:n}=ta(),a=ln(),{timezone:i,defaultTimezone:o}=fn(),l=vn(),[s,c]=(0,r.useState)(i),[u,d]=(0,r.useState)(""),h=(0,r.useRef)(null),{value:m,toggle:p,setFalse:f}=ma(!1),v=(0,r.useMemo)((()=>[{title:`Default time (${o})`,region:o,utc:o?on(o):"UTC"},{title:Si.title,region:Si.region,utc:on(Si.region),isInvalid:!Si.isValid},{title:"UTC (Coordinated Universal Time)",region:"UTC",utc:"UTC"}].filter((e=>e.region))),[o]),g=(0,r.useMemo)((()=>{if(!u)return a;try{return ln(u)}catch(zp){return{}}}),[u,a]),y=(0,r.useMemo)((()=>Object.keys(g)),[g]),_=(0,r.useMemo)((()=>({region:s,utc:on(s)})),[s]),b=e=>()=>{(e=>{c(e.region),d(""),f()})(e)};return(0,r.useEffect)((()=>{c(i)}),[i]),(0,r.useImperativeHandle)(t,(()=>({handleApply:()=>{l({type:"SET_TIMEZONE",payload:s})}})),[s]),Nt("div",{className:"vm-timezones",children:[Nt("div",{className:"vm-server-configurator__title",children:"Time zone"}),Nt("div",{className:"vm-timezones-item vm-timezones-item_selected",onClick:p,ref:h,children:[Nt("div",{className:"vm-timezones-item__title",children:_.region}),Nt("div",{className:"vm-timezones-item__utc",children:_.utc}),Nt("div",{className:Er()({"vm-timezones-item__icon":!0,"vm-timezones-item__icon_open":m}),children:Nt(jn,{})})]}),Nt(ha,{open:m,buttonRef:h,placement:"bottom-left",onClose:f,fullWidth:!0,title:n?"Time zone":void 0,children:Nt("div",{className:Er()({"vm-timezones-list":!0,"vm-timezones-list_mobile":n}),children:[Nt("div",{className:"vm-timezones-list-header",children:[Nt("div",{className:"vm-timezones-list-header__search",children:Nt(Ka,{autofocus:!0,label:"Search",value:u,onChange:e=>{d(e)}})}),v.map(((e,t)=>e&&Nt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[Nt("div",{className:"vm-timezones-item__title",children:[e.title,e.isInvalid&&Nt(xi,{})]}),Nt("div",{className:"vm-timezones-item__utc",children:e.utc})]},`${t}_${e.region}`)))]}),y.map((e=>Nt("div",{className:"vm-timezones-list-group",children:Nt(ki,{defaultExpanded:!0,title:Nt("div",{className:"vm-timezones-list-group__title",children:e}),children:Nt("div",{className:"vm-timezones-list-group-options",children:g[e]&&g[e].map((e=>Nt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[Nt("div",{className:"vm-timezones-item__title",children:e.region}),Nt("div",{className:"vm-timezones-item__utc",children:e.utc})]},e.search)))})})},e)))]})})]})})),Ei=Ci,Ni=e=>{let{options:t,value:n,label:a,onChange:i}=e;const o=(0,r.useRef)(null),[l,s]=(0,r.useState)({width:"0px",left:"0px",borderRadius:"0px"}),c=e=>()=>{i(e)};return(0,r.useEffect)((()=>{if(!o.current)return void s({width:"0px",left:"0px",borderRadius:"0px"});const e=t.findIndex((e=>e.value===n)),{width:r}=o.current.getBoundingClientRect();let a=r,i=e*a,l="0";0===e&&(l="16px 0 0 16px"),e===t.length-1&&(l="10px",i-=1,l="0 16px 16px 0"),0!==e&&e!==t.length-1&&(a+=1,i-=1),s({width:`${a}px`,left:`${i}px`,borderRadius:l})}),[o,n,t]),Nt("div",{className:"vm-toggles",children:[a&&Nt("label",{className:"vm-toggles__label",children:a}),Nt("div",{className:"vm-toggles-group",style:{gridTemplateColumns:`repeat(${t.length}, 1fr)`},children:[l.borderRadius&&Nt("div",{className:"vm-toggles-group__highlight",style:l}),t.map(((e,t)=>Nt("div",{className:Er()({"vm-toggles-group-item":!0,"vm-toggles-group-item_first":0===t,"vm-toggles-group-item_active":e.value===n,"vm-toggles-group-item_icon":e.icon&&e.title}),onClick:c(e.value),ref:e.value===n?o:null,children:[e.icon,e.title]},e.value)))]})]})},Ai=Object.values(ft).map((e=>({title:e,value:e}))),Mi=()=>{const{isMobile:e}=ta(),t=Tt(),{theme:n}=Mt();return Nt("div",{className:Er()({"vm-theme-control":!0,"vm-theme-control_mobile":e}),children:[Nt("div",{className:"vm-server-configurator__title",children:"Theme preferences"}),Nt("div",{className:"vm-theme-control__toggle",children:Nt(Ni,{options:Ai,value:n,onChange:e=>{t({type:"SET_THEME",payload:e})}})},`${e}`)]})},Ti=e=>{let{value:t=!1,disabled:n=!1,label:r,color:a="secondary",fullWidth:i,onChange:o}=e;return Nt("div",{className:Er()({"vm-switch":!0,"vm-switch_full-width":i,"vm-switch_disabled":n,"vm-switch_active":t,[`vm-switch_${a}_active`]:t,[`vm-switch_${a}`]:a}),onClick:()=>{n||o(!t)},children:[Nt("div",{className:"vm-switch-track",children:Nt("div",{className:"vm-switch-track__thumb"})}),r&&Nt("span",{className:"vm-switch__label",children:r})]})},$i=()=>{const{isMobile:e}=ta(),{markdownParsing:t}=(0,r.useContext)(Jr).state,n=(0,r.useContext)(Jr).dispatch;return Nt("div",{children:[Nt("div",{className:"vm-server-configurator__title",children:"Markdown Parsing for Logs"}),Nt(Ti,{label:t?"Disable markdown parsing":"Enable markdown parsing",value:t,onChange:e=>{n({type:"SET_MARKDOWN_PARSING",payload:e})},fullWidth:e}),Nt("div",{className:"vm-server-configurator__info",children:"Toggle this switch to enable or disable the Markdown formatting for log entries. Enabling this will parse log texts to Markdown."})]})},Li="Settings",{REACT_APP_TYPE:Pi}={},Ii=Pi===He.logs,Oi=()=>{const{isMobile:e}=ta(),t=Qe(),n=(0,r.useRef)(null),a=(0,r.useRef)(null),i=(0,r.useRef)(null),{value:o,setTrue:l,setFalse:s}=ma(!1),c=[{show:!t&&!Ii,component:Nt(yi,{ref:n,onClose:s})},{show:!Ii,component:Nt(wi,{ref:a,onClose:s})},{show:Ii,component:Nt($i,{})},{show:!0,component:Nt(Ei,{ref:i})},{show:!t,component:Nt(Mi,{})}].filter((e=>e.show));return Nt(Ct.FK,{children:[e?Nt("div",{className:"vm-mobile-option",onClick:l,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt($n,{})}),Nt("div",{className:"vm-mobile-option-text",children:Nt("span",{className:"vm-mobile-option-text__label",children:Li})}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(Fn,{})})]}):Nt(ba,{title:Li,children:Nt(da,{className:Er()({"vm-header-button":!t}),variant:"contained",color:"primary",startIcon:Nt($n,{}),onClick:l,ariaLabel:"settings"})}),o&&Nt(_a,{title:Li,onClose:s,children:Nt("div",{className:Er()({"vm-server-configurator":!0,"vm-server-configurator_mobile":e}),children:[c.map(((e,t)=>Nt("div",{className:"vm-server-configurator__input",children:e.component},t))),Nt("div",{className:"vm-server-configurator-footer",children:[Nt(da,{color:"error",variant:"outlined",onClick:s,children:"Cancel"}),Nt(da,{color:"primary",variant:"contained",onClick:()=>{n.current&&n.current.handleApply(),a.current&&a.current.handleApply(),i.current&&i.current.handleApply(),s()},children:"Apply"})]})]})})]})},Ri=e=>{let{displaySidebar:t,isMobile:n,headerSetup:r,accountIds:a}=e;return Nt("div",{className:Er()({"vm-header-controls":!0,"vm-header-controls_mobile":n}),children:[(null===r||void 0===r?void 0:r.tenant)&&Nt(Qa,{accountIds:a||[]}),(null===r||void 0===r?void 0:r.stepControl)&&Nt(Ga,{}),(null===r||void 0===r?void 0:r.timeSelector)&&Nt(di,{}),(null===r||void 0===r?void 0:r.cardinalityDatePicker)&&Nt(mi,{}),(null===r||void 0===r?void 0:r.executionControls)&&Nt(fi,{}),Nt(Oi,{}),!t&&Nt(La,{})]})},Di=Boolean(et("DISABLED_DEFAULT_TIMEZONE")),zi=()=>{const{serverUrl:e}=Mt(),t=vn(),[n,a]=(0,r.useState)(!1),[o,l]=(0,r.useState)(""),s=async()=>{if(e&&!{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_TYPE){l(""),a(!0);try{const n=await fetch(`${e}/vmui/timezone`),r=await n.json();n.ok?((e=>{const n="local"===e.toLowerCase()?cn().region:e;try{if(i()().tz(n).isValid(),t({type:"SET_DEFAULT_TIMEZONE",payload:n}),Di)return;t({type:"SET_TIMEZONE",payload:n})}catch(zp){zp instanceof Error&&l(`${zp.name}: ${zp.message}`)}})(r.timezone),a(!1)):(l(r.error),a(!1))}catch(zp){a(!1),zp instanceof Error&&l(`${zp.name}: ${zp.message}`)}}};return(0,r.useEffect)((()=>{s()}),[e]),{isLoading:n,error:o}},Fi=()=>{const{serverUrl:e}=Mt(),t=Tt(),[n,a]=(0,r.useState)(!1),[i,o]=(0,r.useState)("");return(0,r.useEffect)((()=>{(async()=>{if(e&&!{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_TYPE){o(""),a(!0);try{const n=new URL(e).origin,r=await fetch(`${n}/flags`),a=(await r.text()).split("\n").filter((e=>""!==e.trim())).reduce(((e,t)=>{const[n,r]=t.split("=");return e[n.trim().replace(/^-/,"").trim()]=r?r.trim().replace(/^"(.*)"$/,"$1"):null,e}),{});t({type:"SET_FLAGS",payload:a})}catch(zp){a(!1),zp instanceof Error&&o(`${zp.name}: ${zp.message}`)}}})()}),[e]),{isLoading:n,error:i}},ji=()=>{const e=Tt(),[t,n]=(0,r.useState)(!1),[a,i]=(0,r.useState)("");return(0,r.useEffect)((()=>{(async()=>{if(!{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_TYPE){i(""),n(!0);try{const t=await fetch("./config.json"),n=await t.json();e({type:"SET_APP_CONFIG",payload:n||{}})}catch(zp){n(!1),zp instanceof Error&&i(`${zp.name}: ${zp.message}`)}}})()}),[]),{isLoading:t,error:a}},Hi=()=>{const e=Qe(),{isMobile:t}=ta(),{pathname:n}=re(),[a,i]=je();Ya(),zi(),ji(),Fi();return(0,r.useEffect)((()=>{var e;const t="vmui",r=null===(e=Ye[n])||void 0===e?void 0:e.title;document.title=r?`${r} - ${t}`:t}),[n]),(0,r.useEffect)((()=>{const{search:e,href:t}=window.location;if(e){const t=at().parse(e,{ignoreQueryPrefix:!0});Object.entries(t).forEach((e=>{let[t,n]=e;return a.set(t,n)})),i(a),window.location.search=""}const n=t.replace(/\/\?#\//,"/#/");n!==t&&window.location.replace(n)}),[]),Nt("section",{className:"vm-container",children:[Nt(Ha,{controlsComponent:Ri}),Nt("div",{className:Er()({"vm-container-body":!0,"vm-container-body_mobile":t,"vm-container-body_app":e}),children:Nt(be,{})}),!e&&Nt(qa,{})]})};var Vi=function(e){return e[e.mouse=0]="mouse",e[e.keyboard=1]="keyboard",e}(Vi||{});const Ui=e=>{var t;let{value:n,options:a,anchor:i,disabled:o,minLength:l=2,fullWidth:s,selected:c,noOptionsText:u,label:d,disabledFullScreen:h,offset:m,maxDisplayResults:p,loading:f,onSelect:v,onOpenAutocomplete:g,onFoundOptions:y,onChangeWrapperRef:_}=e;const{isMobile:b}=ta(),w=(0,r.useRef)(null),[k,x]=(0,r.useState)({index:-1}),[S,C]=(0,r.useState)(""),[E,N]=(0,r.useState)(0),{value:A,setValue:M,setFalse:T}=ma(!1),$=(0,r.useMemo)((()=>{if(!A)return[];try{const e=new RegExp(String(n.trim()),"i"),t=a.filter((t=>e.test(t.value))).sort(((t,r)=>{var a,i;return t.value.toLowerCase()===n.trim().toLowerCase()?-1:r.value.toLowerCase()===n.trim().toLowerCase()?1:((null===(a=t.value.match(e))||void 0===a?void 0:a.index)||0)-((null===(i=r.value.match(e))||void 0===i?void 0:i.index)||0)}));return N(t.length),C(t.length>Number(null===p||void 0===p?void 0:p.limit)&&(null===p||void 0===p?void 0:p.message)||""),null!==p&&void 0!==p&&p.limit?t.slice(0,p.limit):t}catch(zp){return[]}}),[A,a,n]),L=(0,r.useMemo)((()=>{var e;return 1===$.length&&(null===(e=$[0])||void 0===e?void 0:e.value)===n}),[$]),P=(0,r.useMemo)((()=>u&&!$.length),[u,$]),I=()=>{x({index:-1})},O=(0,r.useCallback)((e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:a}=e,i=n||r||a,o=$.length&&!L;if("ArrowUp"===t&&!i&&o&&(e.preventDefault(),x((e=>{let{index:t}=e;return{index:t<=0?0:t-1,type:Vi.keyboard}}))),"ArrowDown"===t&&!i&&o){e.preventDefault();const t=$.length-1;x((e=>{let{index:n}=e;return{index:n>=t?t:n+1,type:Vi.keyboard}}))}if("Enter"===t){const e=$[k.index];e&&v(e.value),c||T()}"Escape"===t&&T()}),[k,$,L,T,v,c]);return(0,r.useEffect)((()=>{M(n.length>=l)}),[n,a]),Mr("keydown",O),(0,r.useEffect)((()=>{if(!w.current||k.type===Vi.mouse)return;const e=w.current.childNodes[k.index];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}),[k,$]),(0,r.useEffect)((()=>{x({index:-1})}),[$]),(0,r.useEffect)((()=>{g&&g(A)}),[A]),(0,r.useEffect)((()=>{y&&y(L?[]:$)}),[$,L]),(0,r.useEffect)((()=>{_&&_(w)}),[w]),Nt(ha,{open:A,buttonRef:i,placement:"bottom-left",onClose:T,fullWidth:s,title:b?d:void 0,disabledFullScreen:h,offset:m,children:[Nt("div",{className:Er()({"vm-autocomplete":!0,"vm-autocomplete_mobile":b&&!h}),ref:w,children:[f&&Nt("div",{className:"vm-autocomplete__loader",children:[Nt(zn,{}),Nt("span",{children:"Loading..."})]}),P&&Nt("div",{className:"vm-autocomplete__no-options",children:u}),!L&&$.map(((e,t)=>{return Nt("div",{className:Er()({"vm-list-item":!0,"vm-list-item_mobile":b,"vm-list-item_active":t===k.index,"vm-list-item_multiselect":c,"vm-list-item_multiselect_selected":null===c||void 0===c?void 0:c.includes(e.value),"vm-list-item_with-icon":e.icon}),id:`$autocomplete$${e.value}`,onClick:(r=e.value,()=>{o||(v(r),c||T())}),onMouseEnter:(n=t,()=>{x({index:n,type:Vi.mouse})}),onMouseLeave:I,children:[(null===c||void 0===c?void 0:c.includes(e.value))&&Nt(Xn,{}),Nt(Ct.FK,{children:e.icon}),Nt("span",{children:e.value})]},`${t}${e.value}`);var n,r}))]}),S&&Nt("div",{className:"vm-autocomplete-message",children:["Shown ",null===p||void 0===p?void 0:p.limit," results out of ",E,". ",S]}),(null===(t=$[k.index])||void 0===t?void 0:t.description)&&Nt("div",{className:"vm-autocomplete-info",children:[Nt("div",{className:"vm-autocomplete-info__type",children:$[k.index].type}),Nt("div",{className:"vm-autocomplete-info__description",dangerouslySetInnerHTML:{__html:$[k.index].description||""}})]})]})};var Bi=n(267),qi=n.n(Bi);const Yi=e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&"),Wi=e=>JSON.stringify(e).slice(1,-1),Ki=e=>{const t=e.match(/["`']/g);return!!t&&t.length%2!==0};var Qi=function(e){return e.metric="metric",e.label="label",e.labelValue="labelValue",e}(Qi||{});const Zi={[Qi.metric]:Nt(vr,{}),[Qi.label]:Nt(yr,{}),[Qi.labelValue]:Nt(_r,{})};function Gi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Ji={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Xi(e){Ji=e}const eo=/[&<>"']/,to=new RegExp(eo.source,"g"),no=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ro=new RegExp(no.source,"g"),ao={"&":"&","<":"<",">":">",'"':""","'":"'"},io=e=>ao[e];function oo(e,t){if(t){if(eo.test(e))return e.replace(to,io)}else if(no.test(e))return e.replace(ro,io);return e}const lo=/(^|[^\[])\^/g;function so(e,t){let n="string"===typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let a="string"===typeof t?t:t.source;return a=a.replace(lo,"$1"),n=n.replace(e,a),r},getRegex:()=>new RegExp(n,t)};return r}function co(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const uo={exec:()=>null};function ho(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,a=t;for(;--a>=0&&"\\"===n[a];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:mo(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=mo(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:mo(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=mo(t[0],"\n").split("\n"),n="",r="";const a=[];for(;e.length>0;){let t=!1;const i=[];let o;for(o=0;o/.test(e[o]))i.push(e[o]),t=!0;else{if(t)break;i.push(e[o])}e=e.slice(o);const l=i.join("\n"),s=l.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");n=n?`${n}\n${l}`:l,r=r?`${r}\n${s}`:s;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(s,a,!0),this.lexer.state.top=c,0===e.length)break;const u=a[a.length-1];if("code"===u?.type)break;if("blockquote"===u?.type){const t=u,i=t.raw+"\n"+e.join("\n"),o=this.blockquote(i);a[a.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}if("list"!==u?.type);else{const t=u,i=t.raw+"\n"+e.join("\n"),o=this.list(i);a[a.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=i.substring(a[a.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:a,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,a={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const i=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let o=!1;for(;e;){let n=!1,r="",l="";if(!(t=i.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let s=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],u=!s.trim(),d=0;if(this.options.pedantic?(d=2,l=s.trimStart()):u?d=t[1].length+1:(d=t[2].search(/[^ ]/),d=d>4?1:d,l=s.slice(d),d+=t[1].length),u&&/^[ \t]*$/.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,d-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),a=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:\`\`\`|~~~)`),i=new RegExp(`^ {0,${Math.min(3,d-1)}}#`),o=new RegExp(`^ {0,${Math.min(3,d-1)}}<[a-z].*>`,"i");for(;e;){const h=e.split("\n",1)[0];let m;if(c=h,this.options.pedantic?(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),m=c):m=c.replace(/\t/g," "),a.test(c))break;if(i.test(c))break;if(o.test(c))break;if(t.test(c))break;if(n.test(c))break;if(m.search(/[^ ]/)>=d||!c.trim())l+="\n"+m.slice(d);else{if(u)break;if(s.replace(/\t/g," ").search(/[^ ]/)>=4)break;if(a.test(s))break;if(i.test(s))break;if(n.test(s))break;l+="\n"+c}u||c.trim()||(u=!0),r+=h+"\n",e=e.substring(h.length+1),s=m.slice(d)}}a.loose||(o?a.loose=!0:/\n[ \t]*\n[ \t]*$/.test(r)&&(o=!0));let h,m=null;this.options.gfm&&(m=/^\[[ xX]\] /.exec(l),m&&(h="[ ] "!==m[0],l=l.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:r,task:!!m,checked:h,loose:!1,text:l,tokens:[]}),a.raw+=r}a.items[a.items.length-1].raw=a.items[a.items.length-1].raw.trimEnd(),a.items[a.items.length-1].text=a.items[a.items.length-1].text.trimEnd(),a.raw=a.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));a.loose=n}if(a.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=ho(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),a=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?i.align.push("right"):/^ *:-+: *$/.test(e)?i.align.push("center"):/^ *:-+ *$/.test(e)?i.align.push("left"):i.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]}))));return i}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:oo(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^
    /i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=mo(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),po(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return po(n,e,n[0],this.lexer)}}emStrong(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let a,i,o=n,l=0;const s="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=s.exec(t));){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(i=[...a].length,r[3]||r[4]){o+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){l+=i;continue}if(o-=i,o>0)continue;i=Math.min(i,i+o+l);const t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+i);if(Math.min(n,i)%2){const e=s.slice(1,-1);return{type:"em",raw:s,text:e,tokens:this.lexer.inlineTokens(e)}}const c=s.slice(2,-2);return{type:"strong",raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=oo(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=oo(t[1]),n="mailto:"+e):(e=oo(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])e=oo(t[0]),r="mailto:"+e;else{let a;do{var n;a=t[0],t[0]=null!==(n=this.rules.inline._backpedal.exec(t[0])?.[0])&&void 0!==n?n:""}while(a!==t[0]);e=oo(t[0]),r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:oo(t[0]),{type:"text",raw:t[0],text:e}}}}const vo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,go=/(?:[*+-]|\d{1,9}[.)])/,yo=so(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,go).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),_o=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,bo=/(?!\s*\])(?:\\.|[^\[\]\\])+/,wo=so(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",bo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ko=so(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,go).getRegex(),xo="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",So=/|$))/,Co=so("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",So).replace("tag",xo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Eo=so(_o).replace("hr",vo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",xo).getRegex(),No={blockquote:so(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Eo).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:wo,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:vo,html:Co,lheading:yo,list:ko,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Eo,table:uo,text:/^[^\n]+/},Ao=so("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",vo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",xo).getRegex(),Mo={...No,table:Ao,paragraph:so(_o).replace("hr",vo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ao).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",xo).getRegex()},To={...No,html:so("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",So).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:uo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:so(_o).replace("hr",vo).replace("heading"," *#{1,6} *[^\n]").replace("lheading",yo).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},$o=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Lo=/^( {2,}|\\)\n(?!\s*$)/,Po="\\p{P}\\p{S}",Io=so(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Po).getRegex(),Oo=so(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Po).getRegex(),Ro=so("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Po).getRegex(),Do=so("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Po).getRegex(),zo=so(/\\([punct])/,"gu").replace(/punct/g,Po).getRegex(),Fo=so(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),jo=so(So).replace("(?:--\x3e|$)","--\x3e").getRegex(),Ho=so("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",jo).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Vo=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Uo=so(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Vo).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Bo=so(/^!?\[(label)\]\[(ref)\]/).replace("label",Vo).replace("ref",bo).getRegex(),qo=so(/^!?\[(ref)\](?:\[\])?/).replace("ref",bo).getRegex(),Yo={_backpedal:uo,anyPunctuation:zo,autolink:Fo,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:Lo,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:uo,emStrongLDelim:Oo,emStrongRDelimAst:Ro,emStrongRDelimUnd:Do,escape:$o,link:Uo,nolink:qo,punctuation:Io,reflink:Bo,reflinkSearch:so("reflink|nolink(?!\\()","g").replace("reflink",Bo).replace("nolink",qo).getRegex(),tag:Ho,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(/\t/g," ").replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(t=n.call({lexer:this},e,a))&&(e=e.substring(t.raw.length),a.push(t),!0)))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&a.length>0?a[a.length-1].raw+="\n":a.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),n=a[a.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?a.push(t):(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),n=a[a.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(n.raw+="\n"+t.raw,n.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),a.push(t);else{if(r=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let a;this.options.extensions.startBlock.forEach((e=>{a=e.call({lexer:this},n),"number"===typeof a&&a>=0&&(t=Math.min(t,a))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(r)))n=a[a.length-1],i&&"paragraph"===n?.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):a.push(t),i=r.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),n=a[a.length-1],n&&"text"===n.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):a.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,a}inline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){let t,n,r,a,i,o,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(s));)e.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.anyPunctuation.exec(s));)s=s.slice(0,a.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(i||(o=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(t=n.call({lexer:this},e,l))&&(e=e.substring(t.raw.length),l.push(t),!0)))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,s,o))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.autolink(e))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e))){if(r=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let a;this.options.extensions.startInline.forEach((e=>{a=e.call({lexer:this},n),"number"===typeof a&&a>=0&&(t=Math.min(t,a))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(t=this.tokenizer.inlineText(r))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(o=t.raw.slice(-1)),i=!0,n=l[l.length-1],n&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(t.raw.length),l.push(t);return l}}class Xo{options;parser;constructor(e){this.options=e||Ji}space(e){return""}code(e){let{text:t,lang:n,escaped:r}=e;const a=(n||"").match(/^\S*/)?.[0],i=t.replace(/\n$/,"")+"\n";return a?'
    '+(r?i:oo(i,!0))+"
    \n":"
    "+(r?i:oo(i,!0))+"
    \n"}blockquote(e){let{tokens:t}=e;return`
    \n${this.parser.parse(t)}
    \n`}html(e){let{text:t}=e;return t}heading(e){let{tokens:t,depth:n}=e;return`${this.parser.parseInline(t)}\n`}hr(e){return"
    \n"}list(e){const t=e.ordered,n=e.start;let r="";for(let i=0;i\n"+r+"\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox(e){let{checked:t}=e;return"'}paragraph(e){let{tokens:t}=e;return`

    ${this.parser.parseInline(t)}

    \n`}table(e){let t="",n="";for(let a=0;a${r}`),"\n\n"+t+"\n"+r+"
    \n"}tablerow(e){let{text:t}=e;return`\n${t}\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}em(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}codespan(e){let{text:t}=e;return`${t}`}br(e){return"
    "}del(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}link(e){let{href:t,title:n,tokens:r}=e;const a=this.parser.parseInline(r),i=co(t);if(null===i)return a;t=i;let o='
    ",o}image(e){let{href:t,title:n,text:r}=e;const a=co(t);if(null===a)return r;t=a;let i=`${r}1&&void 0!==arguments[1])||arguments[1],n="";for(let r=0;rnew Set(["preprocess","postprocess","processAllTokens"]))();preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Jo.lex:Jo.lexInline}provideParser(){return this.block?tl.parse:tl.parseInline}}const rl=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=(()=>tl)();Renderer=(()=>Xo)();TextRenderer=(()=>el)();Lexer=(()=>Jo)();Tokenizer=(()=>fo)();Hooks=(()=>nl)();constructor(){this.use(...arguments)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const a=e[r].flat(1/0);n=n.concat(this.walkTokens(a,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(){const e=this.defaults.extensions||{renderers:{},childTokens:{}};for(var t=arguments.length,n=new Array(t),r=0;r{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const n=e.renderers[t.name];e.renderers[t.name]=n?function(){for(var e=arguments.length,r=new Array(e),a=0;a{if(this.defaults.async)return Promise.resolve(a.call(e,t)).then((t=>i.call(e,t)));const n=a.call(e,t);return i.call(e,n)}:e[r]=function(){for(var t=arguments.length,n=new Array(t),r=0;r{const r={...n},a={...this.defaults,...r},i=this.onError(!!a.silent,!!a.async);if(!0===this.defaults.async&&!1===r.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("undefined"===typeof t||null===t)return i(new Error("marked(): input parameter is undefined or null"));if("string"!==typeof t)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);const o=a.hooks?a.hooks.provideLexer():e?Jo.lex:Jo.lexInline,l=a.hooks?a.hooks.provideParser():e?tl.parse:tl.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(t):t).then((e=>o(e,a))).then((e=>a.hooks?a.hooks.processAllTokens(e):e)).then((e=>a.walkTokens?Promise.all(this.walkTokens(e,a.walkTokens)).then((()=>e)):e)).then((e=>l(e,a))).then((e=>a.hooks?a.hooks.postprocess(e):e)).catch(i);try{a.hooks&&(t=a.hooks.preprocess(t));let e=o(t,a);a.hooks&&(e=a.hooks.processAllTokens(e)),a.walkTokens&&this.walkTokens(e,a.walkTokens);let n=l(e,a);return a.hooks&&(n=a.hooks.postprocess(n)),n}catch(zp){return i(zp)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+oo(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function al(e,t){return rl.parse(e,t)}al.options=al.setOptions=function(e){return rl.setOptions(e),al.defaults=rl.defaults,Xi(al.defaults),al},al.getDefaults=Gi,al.defaults=Ji,al.use=function(){return rl.use(...arguments),al.defaults=rl.defaults,Xi(al.defaults),al},al.walkTokens=function(e,t){return rl.walkTokens(e,t)},al.parseInline=rl.parseInline,al.Parser=tl,al.parser=tl.parse,al.Renderer=Xo,al.TextRenderer=el,al.Lexer=Jo,al.lexer=Jo.lex,al.Tokenizer=fo,al.Hooks=nl,al.parse=al;al.options,al.setOptions,al.use,al.walkTokens,al.parseInline,tl.parse,Jo.lex;const il=n.p+"static/media/MetricsQL.a00044c91d9781cf8557.md",ol=e=>{let t="";return Array.from(e).map((e=>{var n;const r="h3"===e.tagName.toLowerCase();return t=r?null!==(n=e.textContent)&&void 0!==n?n:"":t,r?null:((e,t)=>{var n;const r=null!==(n=t.textContent)&&void 0!==n?n:"",a=(e=>{const t=[];let n=e.nextElementSibling;for(;n&&"p"===n.tagName.toLowerCase();)n&&t.push(n),n=n.nextElementSibling;return t})(t).map((e=>{var t;return null!==(t=e.outerHTML)&&void 0!==t?t:""})).join("\n");return{type:e,value:r,description:(i=a,i.replace(/({const{metricsQLFunctions:e}=Cn(),t=En();return(0,r.useEffect)((()=>{e.length||(async()=>{try{const e=await fetch(il),n=(e=>{const t=document.createElement("div");t.innerHTML=al(e);const n=t.querySelectorAll("h3, h4");return ol(n)})(await e.text());t({type:"SET_METRICSQL_FUNCTIONS",payload:n})}catch(zp){console.error("Error fetching or processing the MetricsQL.md file:",zp)}})()}),[]),e},sl=e=>{let{value:t,anchorEl:n,caretPosition:a,hasHelperText:o,onSelect:l,onFoundOptions:s}=e;const[c,u]=(0,r.useState)({top:0,left:0}),d=ll(),h=(0,r.useMemo)((()=>{if(a[0]!==a[1])return{beforeCursor:t,afterCursor:""};return{beforeCursor:t.substring(0,a[0]),afterCursor:t.substring(a[1])}}),[t,a]),m=(0,r.useMemo)((()=>{const e=h.beforeCursor.split(/\s(or|and|unless|default|ifnot|if|group_left|group_right)\s|}|\+|\|-|\*|\/|\^/i);return e[e.length-1]}),[h]),p=(0,r.useMemo)((()=>{const e=[...m.matchAll(/\w+\((?[^)]+)\)\s+(by|without|on|ignoring)\s*\(\w*/gi)];if(e.length>0&&e[0].groups&&e[0].groups.metricName)return e[0].groups.metricName;const t=[...m.matchAll(/^\s*\b(?[^{}(),\s]+)(?={|$)/g)];return t.length>0&&t[0].groups&&t[0].groups.metricName?t[0].groups.metricName:""}),[m]),f=(0,r.useMemo)((()=>{const e=m.match(/[a-z_:-][\w\-.:/]*\b(?=\s*(=|!=|=~|!~))/g);return e?e[e.length-1]:""}),[m]),v=(0,r.useMemo)((()=>{const e=h.beforeCursor.trim(),t=["}",")"].some((t=>e.endsWith(t))),n=!Ki(e)&&["`","'",'"'].some((t=>e.endsWith(t)));if(!h.beforeCursor||t||n||(e=>{const t=e.split(/\s+/),n=t.length,r=t[n-1],a=t[n-2],i=!r&&Ki(e),o=(!r||t.length>1)&&!/([{(),+\-*/^]|\b(?:or|and|unless|default|ifnot|if|group_left|group_right|by|without|on|ignoring)\b)/i.test(a);return i||o})(h.beforeCursor))return vt.empty;const r=/(?:by|without|on|ignoring)\s*\(\s*[^)]*$|\{[^}]*$/i,a=`(${Yi(p)})?{?.+${Yi(f)}(=|!=|=~|!~)"?([^"]*)$`;switch(!0){case new RegExp(a,"g").test(h.beforeCursor):return vt.labelValue;case r.test(h.beforeCursor):return vt.label;default:return vt.metricsql}}),[h,p,f]),g=(0,r.useMemo)((()=>{const e=h.beforeCursor.match(/([\w_.:]+(?![},]))$/);return e?e[0]:""}),[h.beforeCursor]),{metrics:y,labels:_,labelValues:b,loading:w}=(e=>{let{valueByContext:t,metric:n,label:a,context:o}=e;const{serverUrl:l}=Mt(),{period:{start:s,end:c}}=fn(),{autocompleteCache:u}=Cn(),d=En(),[h,m]=(0,r.useState)(!1),[p,f]=(0,r.useState)(t),v=qi()(f,500);(0,r.useEffect)((()=>(v(t),v.cancel)),[t,v]);const[g,y]=(0,r.useState)([]),[_,b]=(0,r.useState)([]),[w,k]=(0,r.useState)([]),x=(0,r.useRef)(new AbortController),S=(0,r.useCallback)((e=>{const t=i()(1e3*s).startOf("day").valueOf()/1e3,n=i()(1e3*c).endOf("day").valueOf()/1e3;return new URLSearchParams({...e||{},limit:`${_n}`,start:`${t}`,end:`${n}`})}),[s,c]),C=(e,t)=>e.map((e=>({value:e,type:`${t}`,icon:Zi[t]}))),E=async e=>{let{value:t,urlSuffix:n,setter:r,type:a,params:i}=e;if(!t&&a===Qi.metric)return;x.current.abort(),x.current=new AbortController;const{signal:o}=x.current,s={type:a,value:t,start:(null===i||void 0===i?void 0:i.get("start"))||"",end:(null===i||void 0===i?void 0:i.get("end"))||"",match:(null===i||void 0===i?void 0:i.get("match[]"))||""};m(!0);try{const e=u.get(s);if(e)return r(C(e,a)),void m(!1);const t=await fetch(`${l}/api/v1/${n}?${i}`,{signal:o});if(t.ok){const{data:e}=await t.json();r(C(e,a)),d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:e}})}m(!1)}catch(zp){zp instanceof Error&&"AbortError"!==zp.name&&(d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:[]}}),m(!1),console.error(zp))}};return(0,r.useEffect)((()=>{const e=o!==vt.metricsql&&o!==vt.empty;if(!l||!n||e)return;y([]);const t=Wi(Yi(n));return E({value:p,urlSuffix:"label/__name__/values",setter:y,type:Qi.metric,params:S({"match[]":`{__name__=~".*${t}.*"}`})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,p,o,n]),(0,r.useEffect)((()=>{if(!l||o!==vt.label)return;b([]);const e=Wi(n);return E({value:p,urlSuffix:"labels",setter:b,type:Qi.label,params:S(n?{"match[]":`{__name__="${e}"}`}:void 0)}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,p,o,n]),(0,r.useEffect)((()=>{if(!l||!a||o!==vt.labelValue)return;k([]);const e=Wi(n),t=Wi(Yi(p)),r=[n?`__name__="${e}"`:"",`${a}=~".*${t}.*"`].filter(Boolean).join(",");return E({value:p,urlSuffix:`label/${a}/values`,setter:k,type:Qi.labelValue,params:S({"match[]":`{${r}}`})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,p,o,n,a]),{metrics:g,labels:_,labelValues:w,loading:h}})({valueByContext:g,metric:p,label:f,context:v}),k=(0,r.useMemo)((()=>{switch(v){case vt.metricsql:return[...y,...d];case vt.label:return _;case vt.labelValue:return b;default:return[]}}),[v,y,_,b]),x=(0,r.useCallback)((e=>{const t=h.beforeCursor;let n=h.afterCursor;const r=t.lastIndexOf(g,a[0]),i=r+g.length,o=t.substring(0,r),s=t.substring(i);if(v===vt.labelValue){const t='"';n=n.replace(/^[^\s"|},]*/,"");e=`${/(?:=|!=|=~|!~)$/.test(o)?t:""}${e}${'"'!==n.trim()[0]?t:""}`}v===vt.label&&(n=n.replace(/^[^\s=!,{}()"|+\-/*^]*/,"")),v===vt.metricsql&&(n=n.replace(/^[^\s[\]{}()"|+\-/*^]*/,""));l(`${o}${e}${s}${n}`,o.length+e.length)}),[h]);return(0,r.useEffect)((()=>{if(!n.current)return void u({top:0,left:0});const e=n.current.querySelector("textarea")||n.current,t=window.getComputedStyle(e),r=`${t.getPropertyValue("font-size")}`,a=`${t.getPropertyValue("font-family")}`,i=parseInt(`${t.getPropertyValue("line-height")}`),l=document.createElement("div");l.style.font=`${r} ${a}`,l.style.padding=t.getPropertyValue("padding"),l.style.lineHeight=`${i}px`,l.style.width=`${e.offsetWidth}px`,l.style.maxWidth=`${e.offsetWidth}px`,l.style.whiteSpace=t.getPropertyValue("white-space"),l.style.overflowWrap=t.getPropertyValue("overflow-wrap");const s=document.createElement("span");l.appendChild(document.createTextNode(h.beforeCursor)),l.appendChild(s),l.appendChild(document.createTextNode(h.afterCursor)),document.body.appendChild(l);const c=l.getBoundingClientRect(),d=s.getBoundingClientRect(),m=d.left-c.left,p=d.bottom-c.bottom-(o?i:0);u({top:p,left:m}),l.remove(),s.remove()}),[n,a,o]),Nt(Ct.FK,{children:Nt(Ui,{loading:w,disabledFullScreen:!0,value:g,options:k,anchor:n,minLength:0,offset:c,onSelect:x,onFoundOptions:s,maxDisplayResults:{limit:yn,message:"Please, specify the query more precisely."}})})},cl="No match! \nThis query hasn't selected any time series from database.\nEither the requested metrics are missing in the database,\nor there is a typo in series selector.",ul="The shown results are marked as PARTIAL.\nThe result is marked as partial if one or more vmstorage nodes failed to respond to the query.",dl=e=>{let{value:t,onChange:n,onEnter:a,onArrowUp:i,onArrowDown:o,autocomplete:l,error:s,stats:c,label:u,disabled:d=!1}=e;const{autocompleteQuick:h}=Cn(),{isMobile:m}=ta(),[p,f]=(0,r.useState)(!1),[v,g]=(0,r.useState)([0,0]),y=(0,r.useRef)(null),[_,b]=(0,r.useState)(l),w=(0,r.useRef)(qi()(b,500)).current,k=[{show:"0"===(null===c||void 0===c?void 0:c.seriesFetched)&&!c.resultLength,text:cl},{show:null===c||void 0===c?void 0:c.isPartial,text:ul}].filter((e=>e.show)).map((e=>e.text)).join("");c&&(u=`${u} (${c.executionTimeMsec||0}ms)`);return(0,r.useEffect)((()=>{f(l)}),[h]),(0,r.useEffect)((()=>{b(!1),w(!0)}),[v]),Nt("div",{className:"vm-query-editor",ref:y,children:[Nt(Ka,{value:t,label:u,type:"textarea",autofocus:!m,error:s,warning:k,onKeyDown:e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:l}=e,s=(e.target.value||"").split("\n").length>1,c=n||r,u="ArrowDown"===t,d="Enter"===t;"ArrowUp"===t&&c&&(e.preventDefault(),i()),u&&c&&(e.preventDefault(),o()),d&&p&&e.preventDefault(),!d||l||s&&!c||p||(e.preventDefault(),a())},onChange:n,onChangeCaret:e=>{g((t=>t[0]===e[0]&&t[1]===e[1]?t:e))},disabled:d,inputmode:"search",caretPosition:v}),_&&l&&Nt(sl,{value:t,anchorEl:y,caretPosition:v,hasHelperText:Boolean(k||s),onSelect:(e,t)=>{n(e),g([t,t])},onFoundOptions:e=>{f(!!e.length)}})]})},hl=e=>{let{isMobile:t,hideButtons:n}=e;const{autocomplete:r}=Cn(),a=En(),{nocache:i,isTracingEnabled:o}=Fr(),l=jr();return Mr("keydown",(e=>{const{code:t,ctrlKey:n,altKey:r}=e;"Space"===t&&(n||r)&&(e.preventDefault(),a({type:"SET_AUTOCOMPLETE_QUICK",payload:!0}))})),Nt("div",{className:Er()({"vm-additional-settings":!0,"vm-additional-settings_mobile":t}),children:[!(null!==n&&void 0!==n&&n.autocomplete)&&Nt(ba,{title:Nt(Ct.FK,{children:["Quick tip: ",Na]}),children:Nt(Ti,{label:"Autocomplete",value:r,onChange:()=>{a({type:"TOGGLE_AUTOCOMPLETE"})},fullWidth:t})}),Nt(Ti,{label:"Disable cache",value:i,onChange:()=>{l({type:"TOGGLE_NO_CACHE"})},fullWidth:t}),!(null!==n&&void 0!==n&&n.traceQuery)&&Nt(Ti,{label:"Trace query",value:o,onChange:()=>{l({type:"TOGGLE_QUERY_TRACING"})},fullWidth:t})]})},ml=e=>{const{isMobile:t}=ta(),n=(0,r.useRef)(null),{value:a,toggle:i,setFalse:o}=ma(!1);return t?Nt(Ct.FK,{children:[Nt("div",{ref:n,children:Nt(da,{variant:"outlined",startIcon:Nt(dr,{}),onClick:i,ariaLabel:"additional the query settings"})}),Nt(ha,{open:a,buttonRef:n,placement:"bottom-left",onClose:o,title:"Query settings",children:Nt(hl,{isMobile:t,...e})})]}):Nt(hl,{...e})},pl=(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n]));const fl=()=>{const{showInfoMessage:e}=(0,r.useContext)(aa);return async(t,n)=>{var r;if(null===(r=navigator)||void 0===r||!r.clipboard)return e({text:"Clipboard not supported",type:"error"}),console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(t),n&&e({text:n,type:"success"}),!0}catch(a){return a instanceof Error&&e({text:`${a.name}: ${a.message}`,type:"error"}),console.warn("Copy failed",a),!1}}},vl=e=>{let{query:t,favorites:n,onRun:a,onToggleFavorite:i}=e;const o=fl(),l=(0,r.useMemo)((()=>n.includes(t)),[t,n]);return Nt("div",{className:"vm-query-history-item",children:[Nt("span",{className:"vm-query-history-item__value",children:t}),Nt("div",{className:"vm-query-history-item__buttons",children:[Nt(ba,{title:"Execute query",children:Nt(da,{size:"small",variant:"text",onClick:()=>{a(t)},startIcon:Nt(Yn,{})})}),Nt(ba,{title:"Copy query",children:Nt(da,{size:"small",variant:"text",onClick:async()=>{await o(t,"Query has been copied")},startIcon:Nt(rr,{})})}),Nt(ba,{title:l?"Remove Favorite":"Add to Favorites",children:Nt(da,{size:"small",variant:"text",color:l?"warning":"primary",onClick:()=>{i(t,l)},startIcon:Nt(l?fr:pr,{})})})]})]})},gl="saved",yl="favorite",_l=[{label:"Session history",value:"session"},{label:"Saved history",value:gl},{label:"Favorite queries",value:yl}],bl=e=>{let{handleSelectQuery:t}=e;const{queryHistory:n}=Cn(),{isMobile:a}=ta(),{value:i,setTrue:o,setFalse:l}=ma(!1),[s,c]=(0,r.useState)(_l[0].value),[u,d]=(0,r.useState)(gn("QUERY_HISTORY")),[h,m]=(0,r.useState)(gn("QUERY_FAVORITES")),p=(0,r.useMemo)((()=>n.map((e=>e.values.filter((e=>e)).reverse()))),[n]),f=(0,r.useMemo)((()=>{switch(s){case yl:return h;case gl:return u;default:return p}}),[s,h,u,p]),v=null===f||void 0===f?void 0:f.every((e=>!e.length)),g=(0,r.useMemo)((()=>s===yl?"Favorites queries are empty.\nTo see your favorites, mark a query as a favorite.":"Query history is empty.\nTo see the history, please make a query."),[s]),y=e=>n=>{t(n,e),l()},_=(e,t)=>{m((n=>{const r=n[0]||[];return t?[r.filter((t=>t!==e))]:t||r.includes(e)?n:[[...r,e]]}))};return(0,r.useEffect)((()=>{const e=h[0]||[],t=gn("QUERY_FAVORITES")[0]||[];pl(e,t)||Xe("QUERY_FAVORITES",JSON.stringify(h))}),[h]),Mr("storage",(()=>{d(gn("QUERY_HISTORY")),m(gn("QUERY_FAVORITES"))})),Nt(Ct.FK,{children:[Nt(ba,{title:"Show history",children:Nt(da,{color:"primary",variant:"text",onClick:o,startIcon:Nt(Hn,{}),ariaLabel:"Show history"})}),i&&Nt(_a,{title:"Query history",onClose:l,children:Nt("div",{className:Er()({"vm-query-history":!0,"vm-query-history_mobile":a}),children:[Nt("div",{className:Er()({"vm-query-history__tabs":!0,"vm-section-header__tabs":!0,"vm-query-history__tabs_mobile":a}),children:Nt($r,{activeItem:s,items:_l,onChange:c})}),Nt("div",{className:"vm-query-history-list",children:[v&&Nt("div",{className:"vm-query-history-list__no-data",children:g}),f.map(((e,t)=>Nt("div",{children:[f.length>1&&Nt("div",{className:Er()({"vm-query-history-list__group-title":!0,"vm-query-history-list__group-title_first":0===t}),children:["Query ",t+1]}),e.map(((e,n)=>Nt(vl,{query:e,favorites:h.flat(),onRun:y(t),onToggleFavorite:_},n)))]},t))),s===gl&&!v&&Nt("div",{className:"vm-query-history-footer",children:Nt(da,{color:"error",variant:"outlined",size:"small",startIcon:Nt(Zn,{}),onClick:()=>{Xe("QUERY_HISTORY","")},children:"clear history"})})]})]})})]})},wl=e=>{let{containerStyles:t,message:n}=e;const{isDarkTheme:r}=Mt();return Nt("div",{className:Er()({"vm-spinner":!0,"vm-spinner_dark":r}),style:t,children:[Nt("div",{className:"half-circle-spinner",children:[Nt("div",{className:"circle circle-1"}),Nt("div",{className:"circle circle-2"})]}),n&&Nt("div",{className:"vm-spinner__message",children:n})]})},kl=()=>{const{serverUrl:e}=Mt(),{isMobile:t}=ta(),{value:n,setTrue:a,setFalse:i}=ma(!1),{query:o}=Cn(),{period:l}=fn(),[s,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(""),[h,m]=(0,r.useState)(""),[p,f]=(0,r.useState)("");return Nt(Ct.FK,{children:[Nt(da,{color:"secondary",variant:"outlined",onClick:()=>(a(),f(""),URL.revokeObjectURL(h),d(""),m(""),(async()=>{c(!0);try{const t=encodeURIComponent(o[0]||""),n=encodeURIComponent(l.step||Zt(l.end-l.start,!1)),r=`${e}/api/vmanomaly/config.yaml?query=${t}&step=${n}`,a=await fetch(r),i=a.headers.get("Content-Type");if(a.ok)if("application/yaml"==i){const e=await a.blob(),t=await e.text();d(t),m(URL.createObjectURL(e))}else f("Response Content-Type is not YAML, does `Server URL` point to VMAnomaly server?");else{const e=await a.text();f(` ${a.status} ${a.statusText}: ${e}`)}}catch(p){console.error(p),f(String(p))}c(!1)})()),children:"Open Config"}),n&&Nt(_a,{title:"Download config",onClose:i,children:Nt("div",{className:Er()({"vm-anomaly-config":!0,"vm-anomaly-config_mobile":t}),children:[s&&Nt(wl,{containerStyles:{position:"relative"},message:"Loading config..."}),!s&&p&&Nt("div",{className:"vm-anomaly-config-error",children:[Nt("div",{className:"vm-anomaly-config-error__icon",children:Nt(Rn,{})}),Nt("h3",{className:"vm-anomaly-config-error__title",children:"Cannot download config"}),Nt("p",{className:"vm-anomaly-config-error__text",children:p})]}),!s&&u&&Nt(Ka,{value:u,label:"config.yaml",type:"textarea",disabled:!0}),Nt("div",{className:"vm-anomaly-config-footer",children:h&&Nt("a",{href:h,download:"config.yaml",children:Nt(da,{variant:"contained",startIcon:Nt(br,{}),children:"download"})})})]})})]})},xl=e=>{let{queryErrors:t,setQueryErrors:n,setHideError:a,stats:i,isLoading:o,onHideQuery:l,onRunQuery:s,abortFetch:c,hideButtons:u}=e;const{isMobile:d}=ta(),{query:h,queryHistory:m,autocomplete:p,autocompleteQuick:f}=Cn(),v=En(),g=vn(),[y,_]=(0,r.useState)(h||[]),[b,w]=(0,r.useState)([]),[k,x]=(0,r.useState)(!1),S=Za(y),C=(()=>{const{serverUrl:e}=Mt();return async t=>{try{const n=encodeURIComponent(t),r=`${e}/prettify-query?query=${n}`,a=await fetch(r);if(200!=a.status)return{query:t,error:"Error requesting /prettify-query, status: "+a.status};const i=await a.json();return"success"!=i.status?{query:t,error:String(i.msg)}:{query:String(i.query),error:""}}catch(zp){return console.error(zp),zp instanceof Error&&"AbortError"!==zp.name?{query:t,error:`${zp.name}: ${zp.message}`}:{query:t,error:String(zp)}}}})(),E=()=>{o?c&&c():(v({type:"SET_QUERY_HISTORY",payload:y.map(((e,t)=>{const n=m[t]||{values:[]},r=e===n.values[n.values.length-1],a=!r&&e?[...n.values,e]:n.values;return a.length>25&&a.shift(),{index:n.values.length-Number(r),values:a}}))}),v({type:"SET_QUERY",payload:y}),g({type:"RUN_QUERY"}),s())},N=(e,t)=>{_((n=>n.map(((n,r)=>r===t?e:n))))},A=(e,t)=>()=>{((e,t)=>{const{index:n,values:r}=m[t],a=n+e;a<0||a>=r.length||(N(r[a]||"",t),v({type:"SET_QUERY_HISTORY_BY_INDEX",payload:{value:{values:r,index:a},queryNumber:t}}))})(e,t)},M=e=>t=>{N(t,e),v({type:"SET_AUTOCOMPLETE_QUICK",payload:!1})},T=e=>()=>{var t;t=e,_((e=>e.filter(((e,n)=>n!==t)))),w((t=>t.includes(e)?t.filter((t=>t!==e)):t.map((t=>t>e?t-1:t))))},$=e=>t=>{((e,t)=>{const{ctrlKey:n,metaKey:r}=e;if(n||r){const e=y.map(((e,t)=>t)).filter((e=>e!==t));w((t=>pl(e,t)?[]:e))}else w((e=>e.includes(t)?e.filter((e=>e!==t)):[...e,t]))})(t,e)};return(0,r.useEffect)((()=>{S&&y.length{l&&l(b)}),[b]),(0,r.useEffect)((()=>{k&&(E(),x(!1))}),[y,k]),(0,r.useEffect)((()=>{_(h||[])}),[h]),Nt("div",{className:Er()({"vm-query-configurator":!0,"vm-block":!0,"vm-block_mobile":d}),children:[Nt("div",{className:"vm-query-configurator-list",children:y.map(((e,r)=>Nt("div",{className:Er()({"vm-query-configurator-list-row":!0,"vm-query-configurator-list-row_disabled":b.includes(r),"vm-query-configurator-list-row_mobile":d}),children:[Nt(dl,{value:y[r],autocomplete:!(null!==u&&void 0!==u&&u.autocomplete)&&(p||f),error:t[r],stats:i[r],onArrowUp:A(-1,r),onArrowDown:A(1,r),onEnter:E,onChange:M(r),label:`Query ${y.length>1?r+1:""}`,disabled:b.includes(r)}),l&&Nt(ba,{title:b.includes(r)?"Enable query":"Disable query",children:Nt("div",{className:"vm-query-configurator-list-row__button",children:Nt(da,{variant:"text",color:"gray",startIcon:b.includes(r)?Nt(tr,{}):Nt(er,{}),onClick:$(r),ariaLabel:"visibility query"})})}),!(null!==u&&void 0!==u&&u.prettify)&&Nt(ba,{title:"Prettify query",children:Nt("div",{className:"vm-query-configurator-list-row__button",children:Nt(da,{variant:"text",color:"gray",startIcon:Nt(nr,{}),onClick:async()=>await(async e=>{const t=await C(y[e]);a(!1),N(t.query,e),n((n=>(n[e]=t.error,[...n])))})(r),className:"prettify",ariaLabel:"prettify the query"})})}),y.length>1&&Nt(ba,{title:"Remove Query",children:Nt("div",{className:"vm-query-configurator-list-row__button",children:Nt(da,{variant:"text",color:"error",startIcon:Nt(Zn,{}),onClick:T(r),ariaLabel:"remove query"})})})]},r)))}),Nt("div",{className:"vm-query-configurator-settings",children:[Nt(ml,{hideButtons:u}),Nt("div",{className:"vm-query-configurator-settings__buttons",children:[Nt(bl,{handleSelectQuery:(e,t)=>{N(e,t),x(!0)}}),(null===u||void 0===u?void 0:u.anomalyConfig)&&Nt(kl,{}),!(null!==u&&void 0!==u&&u.addQuery)&&y.length<10&&Nt(da,{variant:"outlined",onClick:()=>{_((e=>[...e,""]))},startIcon:Nt(Gn,{}),children:"Add Query"}),Nt(da,{variant:"contained",onClick:E,startIcon:Nt(o?Sr:qn,{}),children:`${o?"Cancel":"Execute"} ${d?"":"Query"}`})]})]})]})};let Sl=0;class Cl{constructor(e,t){this.tracing=void 0,this.query=void 0,this.tracingChildren=void 0,this.originalTracing=void 0,this.id=void 0,this.tracing=e,this.originalTracing=JSON.parse(JSON.stringify(e)),this.query=t,this.id=Sl++;const n=e.children||[];this.tracingChildren=n.map((e=>new Cl(e,t)))}get queryValue(){return this.query}get idValue(){return this.id}get children(){return this.tracingChildren}get message(){return this.tracing.message}get duration(){return this.tracing.duration_msec}get JSON(){return JSON.stringify(this.tracing,null,2)}get originalJSON(){return JSON.stringify(this.originalTracing,null,2)}setTracing(e){this.tracing=e;const t=e.children||[];this.tracingChildren=t.map((e=>new Cl(e,this.query)))}setQuery(e){this.query=e}resetTracing(){this.tracing=this.originalTracing}}const El=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const{__name__:r,...a}=e.metric,i=t||`${n?`[Query ${e.group}] `:""}${r||""}`;return 0==Object.keys(a).length?i||"value":`${i}{${Object.entries(a).map((e=>`${e[0]}=${JSON.stringify(e[1])}`)).join(", ")}}`},Nl=e=>{switch(e){case"NaN":return NaN;case"Inf":case"+Inf":return 1/0;case"-Inf":return-1/0;default:return parseFloat(e)}},Al=e=>{if(e.length<2)return!1;const t=["le","vmrange"],n=Object.keys(e[0].metric).filter((e=>!t.includes(e))),r=e.every((r=>{const a=Object.keys(r.metric).filter((e=>!t.includes(e)));return n.length===a.length&&a.every((t=>r.metric[t]===e[0].metric[t]))}));return r&&e.every((e=>t.some((t=>t in e.metric))))},Ml=He.anomaly==={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_TYPE,Tl=e=>{let{predefinedQuery:t,visible:n,display:a,customStep:i,hideQuery:o,showAllSeries:l}=e;const{query:s}=Cn(),{period:c}=fn(),{displayType:u,nocache:d,isTracingEnabled:h,seriesLimits:m}=Fr(),{serverUrl:p}=Mt(),{isHistogram:f}=Br(),[v,g]=(0,r.useState)(!1),[y,_]=(0,r.useState)(),[b,w]=(0,r.useState)(),[k,x]=(0,r.useState)(),[S,C]=(0,r.useState)(),[E,N]=(0,r.useState)([]),[A,M]=(0,r.useState)([]),[T,$]=(0,r.useState)(),[L,P]=(0,r.useState)([]),[I,O]=(0,r.useState)(!1),R=(0,r.useMemo)((()=>{const{end:e,start:t}=c;return Zt(e-t,f)}),[c,f]),D=(0,r.useCallback)(qi()((async e=>{let{fetchUrl:t,fetchQueue:n,displayType:r,query:a,stateSeriesLimits:i,showAllSeries:o,hideQuery:l}=e;const s=new AbortController;P([...n,s]);try{const e=r===mt.chart,n=o?1/0:+i[r]||1/0;let c=n;const u=[],d=[];let h=1,m=0,p=!1;for await(const r of t){if(null===l||void 0===l?void 0:l.includes(h-1)){N((e=>[...e,""])),M((e=>[...e,{}])),h++;continue}const t=new URL(r),i=await fetch(`${t.origin}${t.pathname}`,{signal:s.signal,method:"POST",body:t.searchParams}),o=await i.json();if(i.ok){if(M((e=>[...e,{...null===o||void 0===o?void 0:o.stats,isPartial:null===o||void 0===o?void 0:o.isPartial,resultLength:o.data.result.length}])),N((e=>[...e,""])),o.trace){const e=new Cl(o.trace,a[h-1]);d.push(e)}p=!Ml&&e&&Al(o.data.result),c=p?1/0:n;const t=c-u.length;o.data.result.slice(0,t).forEach((e=>{e.group=h,u.push(e)})),m+=o.data.result.length}else{u.push({metric:{},values:[],group:h});const e=o.errorType||pt.unknownType,t=[e,(null===o||void 0===o?void 0:o.error)||(null===o||void 0===o?void 0:o.message)||"see console for more details"].join(",\r\n");N((e=>[...e,`${t}`])),console.error(`Fetch query error: ${e}`,o)}h++}const f=`Showing ${u.length} series out of ${m} series due to performance reasons. Please narrow down the query, so it returns less series`;$(m>c?f:""),e?_(u):w(u),x(d),O((e=>m?p:e))}catch(zp){const t=zp;if("AbortError"===t.name)return void g(!1);const n="Please check your serverURL settings and confirm server availability.";let r=`Error executing query: ${t.message}. ${n}`;"Unexpected end of JSON input"===t.message&&(r+="\nAdditionally, this error can occur if the server response is too large to process. Apply more specific filters to reduce the data volume."),C(r)}g(!1)}),300),[]),z=(0,r.useMemo)((()=>{C(""),N([]),M([]);const e=null!==t&&void 0!==t?t:s,n=(a||u)===mt.chart;if(c)if(p)if(e.every((e=>!e.trim())))N(e.map((()=>pt.validQuery)));else{if(bt(p)){const t={...c};return t.step=i,e.map((e=>n?((e,t,n,r,a)=>`${e}/api/v1/query_range?query=${encodeURIComponent(t)}&start=${n.start}&end=${n.end}&step=${n.step}${r?"&nocache=1":""}${a?"&trace=1":""}`)(p,e,t,d,h):((e,t,n,r,a)=>`${e}/api/v1/query?query=${encodeURIComponent(t)}&time=${n.end}&step=${n.step}${r?"&nocache=1":""}${a?"&trace=1":""}`)(p,e,t,d,h)))}C(pt.validServer)}else C(pt.emptyServer)}),[p,c,u,i,o]),F=(0,r.useCallback)((()=>{L.map((e=>e.abort())),P([]),_([]),w([])}),[L]),[j,H]=(0,r.useState)([]);return(0,r.useEffect)((()=>{const e=z===j&&!!t;if(!n||null===z||void 0===z||!z.length||e)return;g(!0);D({fetchUrl:z,fetchQueue:L,displayType:a||u,query:null!==t&&void 0!==t?t:s,stateSeriesLimits:m,showAllSeries:l,hideQuery:o}),H(z)}),[z,n,m,l]),(0,r.useEffect)((()=>{const e=L.slice(0,-1);e.length&&(e.map((e=>e.abort())),P(L.filter((e=>!e.signal.aborted))))}),[L]),(0,r.useEffect)((()=>{R===i&&_([])}),[I]),{fetchUrl:z,isLoading:v,graphData:y,liveData:b,error:S,queryErrors:E,setQueryErrors:N,queryStats:A,warning:T,traces:k,isHistogram:I,abortFetch:F}},$l=()=>Nt("div",{className:"vm-line-loader",children:[Nt("div",{className:"vm-line-loader__background"}),Nt("div",{className:"vm-line-loader__line"})]}),Ll=()=>{const{tenantId:e}=Mt(),{displayType:t}=Fr(),{query:n}=Cn(),{duration:a,relativeTime:i,period:{date:o,step:l}}=fn(),{customStep:s}=Br(),[c,u]=je(),d=Tt(),h=vn(),m=qr(),p=En(),f=jr(),[v,g]=(0,r.useState)(!1),y=(0,r.useCallback)((()=>{if(v)return void g(!1);const r=new URLSearchParams(c);n.forEach(((n,u)=>{var d;const h=`g${u}`;c.get(`${h}.expr`)!==n&&n&&r.set(`${h}.expr`,n),c.get(`${h}.range_input`)!==a&&r.set(`${h}.range_input`,a),c.get(`${h}.end_input`)!==o&&r.set(`${h}.end_input`,o),c.get(`${h}.relative_time`)!==i&&r.set(`${h}.relative_time`,i||"none");const m=c.get(`${h}.step_input`)||l;m&&m!==s&&r.set(`${h}.step_input`,s);const p=`${(null===(d=Lr.find((e=>e.value===t)))||void 0===d?void 0:d.prometheusCode)||0}`;c.get(`${h}.tab`)!==p&&r.set(`${h}.tab`,`${p}`),c.get(`${h}.tenantID`)!==e&&e&&r.set(`${h}.tenantID`,e)})),!((e,t)=>{if(Array.from(e.entries()).length!==Array.from(t.entries()).length)return!1;for(const[n,r]of e)if(t.get(n)!==r)return!1;return!0})(r,c)&&r.size&&u(r)}),[e,t,n,a,i,o,l,s]);(0,r.useEffect)((()=>{const e=setTimeout(y,200);return()=>clearTimeout(e)}),[y]),(0,r.useEffect)((()=>{if(!v)return;const r=dn(),u=r.duration!==a,g=r.relativeTime!==i,y="none"===r.relativeTime&&r.period.date!==o;(u||g||y)&&h({type:"SET_TIME_STATE",payload:r});const _=Ir();_!==t&&f({type:"SET_DISPLAY_TYPE",payload:_});const b=c.get("g0.tenantID")||"";b!==e&&d({type:"SET_TENANT_ID",payload:b});const w=dt();pl(w,n)||(p({type:"SET_QUERY",payload:w}),h({type:"RUN_QUERY"}));const k=setTimeout((()=>{const e=c.get("g0.step_input")||l;e&&e!==s&&m({type:"SET_CUSTOM_STEP",payload:e})}),50);return()=>clearTimeout(k)}),[c,v]),Mr("popstate",(()=>{g(!0)}))},Pl=e=>{let{text:t,href:n,children:r,colored:a=!0,underlined:i=!1,withIcon:o=!1}=e;return Nt("a",{href:n,className:Er()({"vm-link":!0,"vm-link_colored":a,"vm-link_underlined":i,"vm-link_with-icon":o}),target:"_blank",rel:"noreferrer",children:t||r})},Il=Nt(Pl,{text:"last_over_time",href:"https://docs.victoriametrics.com/MetricsQL.html#last_over_time",underlined:!0}),Ol=Nt(Pl,{text:"instant query",href:"https://docs.victoriametrics.com/keyConcepts.html#instant-query",underlined:!0}),Rl=()=>Nt("div",{children:[Nt("p",{children:["This tab shows ",Ol," results for the last 5 minutes ending at the selected time range."]}),Nt("p",{children:["Please wrap the query into ",Il," if you need results over arbitrary lookbehind interval."]})]}),Dl=e=>{let{value:t}=e;return Nt("div",{className:"vm-line-progress",children:[Nt("div",{className:"vm-line-progress-track",children:Nt("div",{className:"vm-line-progress-track__thumb",style:{width:`${t}%`}})}),Nt("span",{children:[t.toFixed(2),"%"]})]})},zl=e=>{let{isRoot:t,trace:n,totalMsec:a,isExpandedAll:i}=e;const{isDarkTheme:o}=Mt(),{isMobile:l}=ta(),[s,c]=(0,r.useState)({}),u=(0,r.useRef)(null),[d,h]=(0,r.useState)(!1),[m,p]=(0,r.useState)(!1),f=Yt(n.duration/1e3)||`${n.duration}ms`;(0,r.useEffect)((()=>{if(!u.current)return;const e=u.current,t=u.current.children[0],{height:n}=t.getBoundingClientRect();h(n>e.clientHeight)}),[n]);const v=n.children&&!!n.children.length,g=n.duration/a*100,y=e=>{var t;const n=[e.idValue];return null===e||void 0===e||null===(t=e.children)||void 0===t||t.forEach((e=>{n.push(...y(e))})),n};return(0,r.useEffect)((()=>{if(!i)return void c([]);const e=y(n),t={};e.forEach((e=>{t[e]=!0})),c(t)}),[i]),Nt("div",{className:Er()({"vm-nested-nav":!0,"vm-nested-nav_root":t,"vm-nested-nav_dark":o,"vm-nested-nav_mobile":l}),children:[Nt("div",{className:Er()({"vm-nested-nav-header":!0,"vm-nested-nav-header_open":s[n.idValue]}),onClick:(_=n.idValue,()=>{v&&c((e=>({...e,[_]:!e[_]})))}),children:[v&&Nt("div",{className:Er()({"vm-nested-nav-header__icon":!0,"vm-nested-nav-header__icon_open":s[n.idValue]}),children:Nt(Fn,{})}),Nt("div",{className:"vm-nested-nav-header__progress",children:Nt(Dl,{value:g})}),Nt("div",{className:Er()({"vm-nested-nav-header__message":!0,"vm-nested-nav-header__message_show-full":m}),ref:u,children:[Nt("span",{className:"vm-nested-nav-header__message_duration",children:f}),":\xa0",Nt("span",{children:n.message})]}),Nt("div",{className:"vm-nested-nav-header-bottom",children:(d||m)&&Nt(da,{variant:"text",size:"small",onClick:e=>{e.stopPropagation(),p((e=>!e))},children:m?"Hide":"Show full query"})})]}),s[n.idValue]&&Nt("div",{className:"vm-nested-nav__childrens",children:v&&n.children.map((e=>Nt(zl,{trace:e,totalMsec:a,isExpandedAll:i},e.duration)))})]});var _},Fl=zl,jl=e=>{let{editable:t=!1,defaultTile:n="JSON",displayTitle:a=!0,defaultJson:i="",resetValue:o="",onClose:l,onUpload:s}=e;const c=fl(),{isMobile:u}=ta(),[d,h]=(0,r.useState)(i),[m,p]=(0,r.useState)(n),[f,v]=(0,r.useState)(""),[g,y]=(0,r.useState)(""),_=(0,r.useMemo)((()=>{try{const e=JSON.parse(d),t=e.trace||e;return t.duration_msec?(new Cl(t,""),""):pt.traceNotFound}catch(zp){return zp instanceof Error?zp.message:"Unknown error"}}),[d]),b=()=>{y(_);m.trim()||v(pt.emptyTitle),_||f||(s(d,m),l())};return Nt("div",{className:Er()({"vm-json-form":!0,"vm-json-form_one-field":!a,"vm-json-form_one-field_mobile":!a&&u,"vm-json-form_mobile":u}),children:[a&&Nt(Ka,{value:m,label:"Title",error:f,onEnter:b,onChange:e=>{p(e)}}),Nt(Ka,{value:d,label:"JSON",type:"textarea",error:g,autofocus:!0,onChange:e=>{y(""),h(e)},onEnter:b,disabled:!t}),Nt("div",{className:"vm-json-form-footer",children:[Nt("div",{className:"vm-json-form-footer__controls",children:[Nt(da,{variant:"outlined",startIcon:Nt(rr,{}),onClick:async()=>{await c(d,"Formatted JSON has been copied")},children:"Copy JSON"}),o&&Nt(da,{variant:"text",startIcon:Nt(Pn,{}),onClick:()=>{h(o)},children:"Reset JSON"})]}),Nt("div",{className:"vm-json-form-footer__controls vm-json-form-footer__controls_right",children:[Nt(da,{variant:"outlined",color:"error",onClick:l,children:"Cancel"}),Nt(da,{variant:"contained",onClick:b,children:"apply"})]})]})]})},Hl=e=>{let{traces:t,jsonEditor:n=!1,onDeleteClick:a}=e;const{isMobile:i}=ta(),[o,l]=(0,r.useState)(null),[s,c]=(0,r.useState)([]),u=()=>{l(null)};if(!t.length)return Nt(ra,{variant:"info",children:"Please re-run the query to see results of the tracing"});const d=e=>()=>{a(e)},h=e=>()=>{l(e)},m=e=>()=>{const t=new Blob([e.originalJSON],{type:"application/json"}),n=URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download=`vmui_trace_${e.queryValue}.json`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)};return Nt(Ct.FK,{children:[Nt("div",{className:"vm-tracings-view",children:t.map((e=>{return Nt("div",{className:"vm-tracings-view-trace vm-block vm-block_empty-padding",children:[Nt("div",{className:"vm-tracings-view-trace-header",children:[Nt("h3",{className:"vm-tracings-view-trace-header-title",children:["Trace for ",Nt("b",{className:"vm-tracings-view-trace-header-title__query",children:e.queryValue})]}),Nt(ba,{title:s.includes(e.idValue)?"Collapse All":"Expand All",children:Nt(da,{variant:"text",startIcon:s.includes(e.idValue)?Nt(kr,{}):Nt(wr,{}),onClick:(t=e,()=>{c((e=>e.includes(t.idValue)?e.filter((e=>e!==t.idValue)):[...e,t.idValue]))}),ariaLabel:s.includes(e.idValue)?"Collapse All":"Expand All"})}),Nt(ba,{title:"Save Trace to JSON",children:Nt(da,{variant:"text",startIcon:Nt(br,{}),onClick:m(e),ariaLabel:"Save trace to JSON"})}),Nt(ba,{title:"Open JSON",children:Nt(da,{variant:"text",startIcon:Nt(Qn,{}),onClick:h(e),ariaLabel:"open JSON"})}),Nt(ba,{title:"Remove trace",children:Nt(da,{variant:"text",color:"error",startIcon:Nt(Zn,{}),onClick:d(e),ariaLabel:"remove trace"})})]}),Nt("nav",{className:Er()({"vm-tracings-view-trace__nav":!0,"vm-tracings-view-trace__nav_mobile":i}),children:Nt(Fl,{isRoot:!0,trace:e,totalMsec:e.duration,isExpandedAll:s.includes(e.idValue)})})]},e.idValue);var t}))}),o&&Nt(_a,{title:o.queryValue,onClose:u,children:Nt(jl,{editable:n,displayTitle:n,defaultTile:o.queryValue,defaultJson:o.JSON,resetValue:o.originalJSON,onClose:u,onUpload:(e,t)=>{if(n&&o)try{o.setTracing(JSON.parse(e)),o.setQuery(t),l(null)}catch(zp){console.error(zp)}}})})]})},Vl=e=>{let{traces:t,displayType:n}=e;const{isTracingEnabled:a}=Fr(),[i,o]=(0,r.useState)([]);return(0,r.useEffect)((()=>{t&&o([...i,...t])}),[t]),(0,r.useEffect)((()=>{o([])}),[n]),Nt(Ct.FK,{children:a&&Nt("div",{className:"vm-custom-panel__trace",children:Nt(Hl,{traces:i,onDeleteClick:e=>{const t=i.filter((t=>t.idValue!==e.idValue));o([...t])}})})})},Ul=e=>{let{warning:t,query:n,onChange:a}=e;const{isMobile:i}=ta(),{value:o,setTrue:l,setFalse:s}=ma(!1);return(0,r.useEffect)(s,[n]),(0,r.useEffect)((()=>{a(o)}),[o]),Nt(ra,{variant:"warning",children:Nt("div",{className:Er()({"vm-custom-panel__warning":!0,"vm-custom-panel__warning_mobile":i}),children:[Nt("p",{children:t}),Nt(da,{color:"warning",variant:"outlined",onClick:l,children:"Show all"})]})})},Bl="u-off",ql="u-label",Yl="width",Wl="height",Kl="top",Ql="bottom",Zl="left",Gl="right",Jl="#000",Xl=Jl+"0",es="mousemove",ts="mousedown",ns="mouseup",rs="mouseenter",as="mouseleave",is="dblclick",os="change",ls="dppxchange",ss="--",cs="undefined"!=typeof window,us=cs?document:null,ds=cs?window:null,hs=cs?navigator:null;let ms,ps;function fs(e,t){if(null!=t){let n=e.classList;!n.contains(t)&&n.add(t)}}function vs(e,t){let n=e.classList;n.contains(t)&&n.remove(t)}function gs(e,t,n){e.style[t]=n+"px"}function ys(e,t,n,r){let a=us.createElement(e);return null!=t&&fs(a,t),null!=n&&n.insertBefore(a,r),a}function _s(e,t){return ys("div",e,t)}const bs=new WeakMap;function ws(e,t,n,r,a){let i="translate("+t+"px,"+n+"px)";i!=bs.get(e)&&(e.style.transform=i,bs.set(e,i),t<0||n<0||t>r||n>a?fs(e,Bl):vs(e,Bl))}const ks=new WeakMap;function xs(e,t,n){let r=t+n;r!=ks.get(e)&&(ks.set(e,r),e.style.background=t,e.style.borderColor=n)}const Ss=new WeakMap;function Cs(e,t,n,r){let a=t+""+n;a!=Ss.get(e)&&(Ss.set(e,a),e.style.height=n+"px",e.style.width=t+"px",e.style.marginLeft=r?-t/2+"px":0,e.style.marginTop=r?-n/2+"px":0)}const Es={passive:!0},Ns={...Es,capture:!0};function As(e,t,n,r){t.addEventListener(e,n,r?Ns:Es)}function Ms(e,t,n,r){t.removeEventListener(e,n,Es)}function Ts(e,t,n,r){let a;n=n||0;let i=(r=r||t.length-1)<=2147483647;for(;r-n>1;)a=i?n+r>>1:qs((n+r)/2),t[a]=t&&a<=n;a+=r)if(null!=e[a])return a;return-1}function Ls(e,t,n,r){let a=Gs(e),i=Gs(t);e==t&&(-1==a?(e*=n,t/=n):(e/=n,t*=n));let o=10==n?Js:Xs,l=1==i?Ws:qs,s=(1==a?qs:Ws)(o(Bs(e))),c=l(o(Bs(t))),u=Zs(n,s),d=Zs(n,c);return 10==n&&(s<0&&(u=fc(u,-s)),c<0&&(d=fc(d,-c))),r||2==n?(e=u*a,t=d*i):(e=pc(e,u),t=mc(t,d)),[e,t]}function Ps(e,t,n,r){let a=Ls(e,t,n,r);return 0==e&&(a[0]=0),0==t&&(a[1]=0),a}cs&&function e(){let t=devicePixelRatio;ms!=t&&(ms=t,ps&&Ms(os,ps,e),ps=matchMedia(`(min-resolution: ${ms-.001}dppx) and (max-resolution: ${ms+.001}dppx)`),As(os,ps,e),ds.dispatchEvent(new CustomEvent(ls)))}();const Is={mode:3,pad:.1},Os={pad:0,soft:null,mode:0},Rs={min:Os,max:Os};function Ds(e,t,n,r){return Cc(n)?Fs(e,t,n):(Os.pad=n,Os.soft=r?0:null,Os.mode=r?3:0,Fs(e,t,Rs))}function zs(e,t){return null==e?t:e}function Fs(e,t,n){let r=n.min,a=n.max,i=zs(r.pad,0),o=zs(a.pad,0),l=zs(r.hard,-tc),s=zs(a.hard,tc),c=zs(r.soft,tc),u=zs(a.soft,-tc),d=zs(r.mode,0),h=zs(a.mode,0),m=t-e,p=Js(m),f=Qs(Bs(e),Bs(t)),v=Js(f),g=Bs(v-p);(m<1e-24||g>10)&&(m=0,0!=e&&0!=t||(m=1e-24,2==d&&c!=tc&&(i=0),2==h&&u!=-tc&&(o=0)));let y=m||f||1e3,_=Js(y),b=Zs(10,qs(_)),w=fc(pc(e-y*(0==m?0==e?.1:1:i),b/10),24),k=e>=c&&(1==d||3==d&&w<=c||2==d&&w>=c)?c:tc,x=Qs(l,w=k?k:Ks(k,w)),S=fc(mc(t+y*(0==m?0==t?.1:1:o),b/10),24),C=t<=u&&(1==h||3==h&&S>=u||2==h&&S<=u)?u:-tc,E=Ks(s,S>C&&t<=C?C:Qs(C,S));return x==E&&0==x&&(E=100),[x,E]}const js=new Intl.NumberFormat(cs?hs.language:"en-US"),Hs=e=>js.format(e),Vs=Math,Us=Vs.PI,Bs=Vs.abs,qs=Vs.floor,Ys=Vs.round,Ws=Vs.ceil,Ks=Vs.min,Qs=Vs.max,Zs=Vs.pow,Gs=Vs.sign,Js=Vs.log10,Xs=Vs.log2,ec=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Vs.asinh(e/t)},tc=1/0;function nc(e){return 1+(0|Js((e^e>>31)-(e>>31)))}function rc(e,t,n){return Ks(Qs(e,t),n)}function ac(e){return"function"==typeof e?e:()=>e}const ic=e=>e,oc=(e,t)=>t,lc=e=>null,sc=e=>!0,cc=(e,t)=>e==t,uc=/\.\d*?(?=9{6,}|0{6,})/gm,dc=e=>{if(xc(e)||vc.has(e))return e;const t=`${e}`,n=t.match(uc);if(null==n)return e;let r=n[0].length-1;if(-1!=t.indexOf("e-")){let[e,n]=t.split("e");return+`${dc(e)}e${n}`}return fc(e,r)};function hc(e,t){return dc(fc(dc(e/t))*t)}function mc(e,t){return dc(Ws(dc(e/t))*t)}function pc(e,t){return dc(qs(dc(e/t))*t)}function fc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(xc(e))return e;let n=10**t,r=e*n*(1+Number.EPSILON);return Ys(r)/n}const vc=new Map;function gc(e){return((""+e).split(".")[1]||"").length}function yc(e,t,n,r){let a=[],i=r.map(gc);for(let o=t;o=0?0:t)+(o>=i[l]?0:i[l]),u=10==e?s:fc(s,c);a.push(u),vc.set(u,c)}}return a}const _c={},bc=[],wc=[null,null],kc=Array.isArray,xc=Number.isInteger;function Sc(e){return"string"==typeof e}function Cc(e){let t=!1;if(null!=e){let n=e.constructor;t=null==n||n==Object}return t}function Ec(e){return null!=e&&"object"==typeof e}const Nc=Object.getPrototypeOf(Uint8Array),Ac="__proto__";function Mc(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Cc;if(kc(e)){let r=e.find((e=>null!=e));if(kc(r)||n(r)){t=Array(e.length);for(let r=0;ri){for(r=o-1;r>=0&&null==e[r];)e[r--]=null;for(r=o+1;rPromise.resolve().then(e):queueMicrotask;const Pc=["January","February","March","April","May","June","July","August","September","October","November","December"],Ic=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Oc(e){return e.slice(0,3)}const Rc=Ic.map(Oc),Dc=Pc.map(Oc),zc={MMMM:Pc,MMM:Dc,WWWW:Ic,WWW:Rc};function Fc(e){return(e<10?"0":"")+e}const jc={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,t)=>t.MMMM[e.getMonth()],MMM:(e,t)=>t.MMM[e.getMonth()],MM:e=>Fc(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>Fc(e.getDate()),D:e=>e.getDate(),WWWW:(e,t)=>t.WWWW[e.getDay()],WWW:(e,t)=>t.WWW[e.getDay()],HH:e=>Fc(e.getHours()),H:e=>e.getHours(),h:e=>{let t=e.getHours();return 0==t?12:t>12?t-12:t},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>Fc(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>Fc(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>{return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Hc(e,t){t=t||zc;let n,r=[],a=/\{([a-z]+)\}|[^{]+/gi;for(;n=a.exec(e);)r.push("{"==n[0][0]?jc[n[1]]:n[0]);return e=>{let n="";for(let a=0;ae%1==0,Bc=[1,2,2.5,5],qc=yc(10,-32,0,Bc),Yc=yc(10,0,32,Bc),Wc=Yc.filter(Uc),Kc=qc.concat(Yc),Qc="{YYYY}",Zc="\n"+Qc,Gc="{M}/{D}",Jc="\n"+Gc,Xc=Jc+"/{YY}",eu="{aa}",tu="{h}:{mm}"+eu,nu="\n"+tu,ru=":{ss}",au=null;function iu(e){let t=1e3*e,n=60*t,r=60*n,a=24*r,i=30*a,o=365*a;return[(1==e?yc(10,0,3,Bc).filter(Uc):yc(10,-3,0,Bc)).concat([t,5*t,10*t,15*t,30*t,n,5*n,10*n,15*n,30*n,r,2*r,3*r,4*r,6*r,8*r,12*r,a,2*a,3*a,4*a,5*a,6*a,7*a,8*a,9*a,10*a,15*a,i,2*i,3*i,4*i,6*i,o,2*o,5*o,10*o,25*o,50*o,100*o]),[[o,Qc,au,au,au,au,au,au,1],[28*a,"{MMM}",Zc,au,au,au,au,au,1],[a,Gc,Zc,au,au,au,au,au,1],[r,"{h}"+eu,Xc,au,Jc,au,au,au,1],[n,tu,Xc,au,Jc,au,au,au,1],[t,ru,Xc+" "+tu,au,Jc+" "+tu,au,nu,au,1],[e,ru+".{fff}",Xc+" "+tu,au,Jc+" "+tu,au,nu,au,1]],function(t){return(l,s,c,u,d,h)=>{let m=[],p=d>=o,f=d>=i&&d=a?a:d,o=_+(qs(c)-qs(g))+mc(g-_,i);m.push(o);let p=t(o),f=p.getHours()+p.getMinutes()/n+p.getSeconds()/r,v=d/r,y=h/l.axes[s]._space;for(;o=fc(o+d,1==e?0:3),!(o>u);)if(v>1){let e=qs(fc(f+v,6))%24,n=t(o).getHours()-e;n>1&&(n=-1),o-=n*r,f=(f+v)%24,fc((o-m[m.length-1])/d,3)*y>=.7&&m.push(o)}else m.push(o)}return m}}]}const[ou,lu,su]=iu(1),[cu,uu,du]=iu(.001);function hu(e,t){return e.map((e=>e.map(((n,r)=>0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)))))}function mu(e,t){return(n,r,a,i,o)=>{let l,s,c,u,d,h,m=t.find((e=>o>=e[0]))||t[t.length-1];return r.map((t=>{let n=e(t),r=n.getFullYear(),a=n.getMonth(),i=n.getDate(),o=n.getHours(),p=n.getMinutes(),f=n.getSeconds(),v=r!=l&&m[2]||a!=s&&m[3]||i!=c&&m[4]||o!=u&&m[5]||p!=d&&m[6]||f!=h&&m[7]||m[1];return l=r,s=a,c=i,u=o,d=p,h=f,v(n)}))}}function pu(e,t,n){return new Date(e,t,n)}function fu(e,t){return t(e)}yc(2,-53,53,[1]);function vu(e,t){return(n,r,a,i)=>null==i?ss:t(e(r))}const gu={show:!0,live:!0,isolate:!1,mount:()=>{},markers:{show:!0,width:2,stroke:function(e,t){let n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null},fill:function(e,t){return e.series[t].fill(e,t)},dash:"solid"},idx:null,idxs:null,values:[]};const yu=[0,0];function _u(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{0==e.button&&(!r||e.target==t)&&n(e)}}function bu(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{(!r||e.target==t)&&n(e)}}const wu={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return yu[0]=t,yu[1]=n,yu},points:{one:!1,show:function(e,t){let n=e.cursor.points,r=_s(),a=n.size(e,t);gs(r,Yl,a),gs(r,Wl,a);let i=a/-2;gs(r,"marginLeft",i),gs(r,"marginTop",i);let o=n.width(e,t,a);return o&&gs(r,"borderWidth",o),r},size:function(e,t){return e.series[t].points.size},width:0,stroke:function(e,t){let n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){let n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:_u,mouseup:_u,click:_u,dblclick:_u,mousemove:bu,mouseleave:bu,mouseenter:bu},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,t,n,r,a)=>r-a,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},ku={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},xu=Tc({},ku,{filter:oc}),Su=Tc({},xu,{size:10}),Cu=Tc({},ku,{show:!1}),Eu='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Nu="bold "+Eu,Au={show:!0,scale:"x",stroke:Jl,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Nu,side:2,grid:xu,ticks:Su,border:Cu,font:Eu,lineGap:1.5,rotate:0},Mu={show:!0,scale:"x",auto:!1,sorted:1,min:tc,max:-tc,idxs:[]};function Tu(e,t,n,r,a){return t.map((e=>null==e?"":Hs(e)))}function $u(e,t,n,r,a,i,o){let l=[],s=vc.get(a)||0;for(let c=n=o?n:fc(mc(n,a),s);c<=r;c=fc(c+a,s))l.push(Object.is(c,-0)?0:c);return l}function Lu(e,t,n,r,a,i,o){const l=[],s=e.scales[e.axes[t].scale].log,c=qs((10==s?Js:Xs)(n));a=Zs(s,c),10==s&&(a=Kc[Ts(a,Kc)]);let u=n,d=a*s;10==s&&(d=Kc[Ts(d,Kc)]);do{l.push(u),u+=a,10!=s||vc.has(u)||(u=fc(u,vc.get(a))),u>=d&&(d=(a=u)*s,10==s&&(d=Kc[Ts(d,Kc)]))}while(u<=r);return l}function Pu(e,t,n,r,a,i,o){let l=e.scales[e.axes[t].scale].asinh,s=r>l?Lu(e,t,Qs(l,n),r,a):[l],c=r>=0&&n<=0?[0]:[];return(n<-l?Lu(e,t,Qs(l,-r),-n,a):[l]).reverse().map((e=>-e)).concat(c,s)}const Iu=/./,Ou=/[12357]/,Ru=/[125]/,Du=/1/,zu=(e,t,n,r)=>e.map(((e,a)=>4==t&&0==e||a%r==0&&n.test(e.toExponential()[e<0?1:0])?e:null));function Fu(e,t,n,r,a){let i=e.axes[n],o=i.scale,l=e.scales[o],s=e.valToPos,c=i._space,u=s(10,o),d=s(9,o)-u>=c?Iu:s(7,o)-u>=c?Ou:s(5,o)-u>=c?Ru:Du;if(d==Du){let e=Bs(s(1,o)-u);if(ea,qu={show:!0,auto:!0,sorted:0,gaps:Bu,alpha:1,facets:[Tc({},Uu,{scale:"x"}),Tc({},Uu,{scale:"y"})]},Yu={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Bu,alpha:1,points:{show:function(e,t){let{scale:n,idxs:r}=e.series[0],a=e._data[0],i=e.valToPos(a[r[0]],n,!0),o=e.valToPos(a[r[1]],n,!0),l=Bs(o-i)/(e.series[t].points.space*ms);return r[1]-r[0]<=l},filter:null},values:null,min:tc,max:-tc,idxs:[],path:null,clip:null};function Wu(e,t,n,r,a){return n/10}const Ku={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Qu=Tc({},Ku,{time:!1,ori:1}),Zu={};function Gu(e,t){let n=Zu[e];return n||(n={key:e,plots:[],sub(e){n.plots.push(e)},unsub(e){n.plots=n.plots.filter((t=>t!=e))},pub(e,t,r,a,i,o,l){for(let s=0;s{let f=e.pxRound;const v=l.dir*(0==l.ori?1:-1),g=0==l.ori?sd:cd;let y,_;1==v?(y=n,_=r):(y=r,_=n);let b=f(c(t[y],l,m,d)),w=f(u(o[y],s,p,h)),k=f(c(t[_],l,m,d)),x=f(u(1==i?s.max:s.min,s,p,h)),S=new Path2D(a);return g(S,k,x),g(S,b,x),g(S,b,w),S}))}function nd(e,t,n,r,a,i){let o=null;if(e.length>0){o=new Path2D;const l=0==t?ud:dd;let s=n;for(let t=0;tn[0]){let e=n[0]-s;e>0&&l(o,s,r,e,r+i),s=n[1]}}let c=n+a-s,u=10;c>0&&l(o,s,r-u/2,c,r+i+u)}return o}function rd(e,t,n,r,a,i,o){let l=[],s=e.length;for(let c=1==a?n:r;c>=n&&c<=r;c+=a){if(null===t[c]){let u=c,d=c;if(1==a)for(;++c<=r&&null===t[c];)d=c;else for(;--c>=n&&null===t[c];)d=c;let h=i(e[u]),m=d==u?h:i(e[d]),p=u-a;h=o<=0&&p>=0&&p=0&&f>=0&&f=h&&l.push([h,m])}}return l}function ad(e){return 0==e?ic:1==e?Ys:t=>hc(t,e)}function id(e){let t=0==e?od:ld,n=0==e?(e,t,n,r,a,i)=>{e.arcTo(t,n,r,a,i)}:(e,t,n,r,a,i)=>{e.arcTo(n,t,a,r,i)},r=0==e?(e,t,n,r,a)=>{e.rect(t,n,r,a)}:(e,t,n,r,a)=>{e.rect(n,t,a,r)};return function(e,a,i,o,l){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;0==s&&0==c?r(e,a,i,o,l):(s=Ks(s,o/2,l/2),c=Ks(c,o/2,l/2),t(e,a+s,i),n(e,a+o,i,a+o,i+l,s),n(e,a+o,i+l,a,i+l,c),n(e,a,i+l,a,i,c),n(e,a,i,a+o,i,s),e.closePath())}}const od=(e,t,n)=>{e.moveTo(t,n)},ld=(e,t,n)=>{e.moveTo(n,t)},sd=(e,t,n)=>{e.lineTo(t,n)},cd=(e,t,n)=>{e.lineTo(n,t)},ud=id(0),dd=id(1),hd=(e,t,n,r,a,i)=>{e.arc(t,n,r,a,i)},md=(e,t,n,r,a,i)=>{e.arc(n,t,r,a,i)},pd=(e,t,n,r,a,i,o)=>{e.bezierCurveTo(t,n,r,a,i,o)},fd=(e,t,n,r,a,i,o)=>{e.bezierCurveTo(n,t,a,r,o,i)};function vd(e){return(e,t,n,r,a)=>Ju(e,t,((t,i,o,l,s,c,u,d,h,m,p)=>{let f,v,{pxRound:g,points:y}=t;0==l.ori?(f=od,v=hd):(f=ld,v=md);const _=fc(y.width*ms,3);let b=(y.size-y.width)/2*ms,w=fc(2*b,3),k=new Path2D,x=new Path2D,{left:S,top:C,width:E,height:N}=e.bbox;ud(x,S-w,C-w,E+2*w,N+2*w);const A=e=>{if(null!=o[e]){let t=g(c(i[e],l,m,d)),n=g(u(o[e],s,p,h));f(k,t+b,n),v(k,t,n,b,0,2*Us)}};if(a)a.forEach(A);else for(let e=n;e<=r;e++)A(e);return{stroke:_>0?k:null,fill:k,clip:x,flags:3}}))}function gd(e){return(t,n,r,a,i,o)=>{r!=a&&(i!=r&&o!=r&&e(t,n,r),i!=a&&o!=a&&e(t,n,a),e(t,n,o))}}const yd=gd(sd),_d=gd(cd);function bd(e){const t=zs(e?.alignGaps,0);return(e,n,r,a)=>Ju(e,n,((i,o,l,s,c,u,d,h,m,p,f)=>{let v,g,y=i.pxRound,_=e=>y(u(e,s,p,h)),b=e=>y(d(e,c,f,m));0==s.ori?(v=sd,g=yd):(v=cd,g=_d);const w=s.dir*(0==s.ori?1:-1),k={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},x=k.stroke;let S,C,E,N=tc,A=-tc,M=_(o[1==w?r:a]),T=$s(l,r,a,1*w),$=$s(l,r,a,-1*w),L=_(o[T]),P=_(o[$]),I=!1;for(let e=1==w?r:a;e>=r&&e<=a;e+=w){let t=_(o[e]),n=l[e];t==M?null!=n?(C=b(n),N==tc&&(v(x,t,C),S=C),N=Ks(C,N),A=Qs(C,A)):null===n&&(I=!0):(N!=tc&&(g(x,M,N,A,S,C),E=M),null!=n?(C=b(n),v(x,t,C),N=A=S=C):(N=tc,A=-tc,null===n&&(I=!0)),M=t)}N!=tc&&N!=A&&E!=M&&g(x,M,N,A,S,C);let[O,R]=Xu(e,n);if(null!=i.fill||0!=O){let t=k.fill=new Path2D(x),r=b(i.fillTo(e,n,i.min,i.max,O));v(t,P,r),v(t,L,r)}if(!i.spanGaps){let c=[];I&&c.push(...rd(o,l,r,a,w,_,t)),k.gaps=c=i.gaps(e,n,r,a,c),k.clip=nd(c,s.ori,h,m,p,f)}return 0!=R&&(k.band=2==R?[td(e,n,r,a,x,-1),td(e,n,r,a,x,1)]:td(e,n,r,a,x,R)),k}))}function wd(e,t,n,r,a,i){let o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:tc;if(e.length>1){let l=null;for(let s=0,c=1/0;s0!==r[e]>0?n[e]=0:(n[e]=3*(s[e-1]+s[e])/((2*s[e]+s[e-1])/r[e-1]+(s[e]+2*s[e-1])/r[e]),isFinite(n[e])||(n[e]=0));n[o-1]=r[o-2];for(let c=0;c{Fd.pxRatio=ms})));const Cd=bd(),Ed=vd();function Nd(e,t,n,r){return(r?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map(((e,r)=>Ad(e,r,t,n)))}function Ad(e,t,n,r){return Tc({},0==t?n:r,e)}function Md(e,t,n){return null==t?wc:[t,n]}const Td=Md;function $d(e,t,n){return null==t?wc:Ds(t,n,.1,!0)}function Ld(e,t,n,r){return null==t?wc:Ls(t,n,e.scales[r].log,!1)}const Pd=Ld;function Id(e,t,n,r){return null==t?wc:Ps(t,n,e.scales[r].log,!1)}const Od=Id;function Rd(e,t,n,r,a){let i=Qs(nc(e),nc(t)),o=t-e,l=Ts(a/r*o,n);do{let e=n[l],t=r*e/o;if(t>=a&&i+(e<5?vc.get(e):0)<=17)return[e,t]}while(++l(t=Ys((n=+r)*ms))+"px")),t,n]}function zd(e){e.show&&[e.font,e.labelFont].forEach((e=>{let t=fc(e[2]*ms,1);e[0]=e[0].replace(/[0-9.]+px/,t+"px"),e[1]=t}))}function Fd(e,t,n){const r={mode:zs(e.mode,1)},a=r.mode;function i(e,t){return((3==t.distr?Js(e>0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?ec(e,t.asinh):100==t.distr?t.fwd(e):e)-t._min)/(t._max-t._min)}function o(e,t,n,r){let a=i(e,t);return r+n*(-1==t.dir?1-a:a)}function l(e,t,n,r){let a=i(e,t);return r+n*(-1==t.dir?a:1-a)}function s(e,t,n,r){return 0==t.ori?o(e,t,n,r):l(e,t,n,r)}r.valToPosH=o,r.valToPosV=l;let c=!1;r.status=0;const u=r.root=_s("uplot");if(null!=e.id&&(u.id=e.id),fs(u,e.class),e.title){_s("u-title",u).textContent=e.title}const d=ys("canvas"),h=r.ctx=d.getContext("2d"),m=_s("u-wrap",u);As("click",m,(e=>{if(e.target===f){(Tt!=Et||$t!=Nt)&&jt.click(r,e)}}),!0);const p=r.under=_s("u-under",m);m.appendChild(d);const f=r.over=_s("u-over",m),v=+zs((e=Mc(e)).pxAlign,1),g=ad(v);(e.plugins||[]).forEach((t=>{t.opts&&(e=t.opts(r,e)||e)}));const y=e.ms||.001,_=r.series=1==a?Nd(e.series||[],Mu,Yu,!1):(b=e.series||[null],w=qu,b.map(((e,t)=>0==t?{}:Tc({},w,e))));var b,w;const k=r.axes=Nd(e.axes||[],Au,Vu,!0),x=r.scales={},S=r.bands=e.bands||[];S.forEach((e=>{e.fill=ac(e.fill||null),e.dir=zs(e.dir,-1)}));const C=2==a?_[1].facets[0].scale:_[0].scale,E={axes:function(){for(let e=0;ent[e])):y,b=2==m.distr?nt[y[1]]-nt[y[0]]:u,w=t.ticks,S=t.border,C=w.show?Ys(w.size*ms):0,E=t._rotate*-Us/180,N=g(t._pos*ms),A=N+(C+v)*c;a=0==o?A:0,n=1==o?A:0,lt(t.font[0],l,1==t.align?Zl:2==t.align?Gl:E>0?Zl:E<0?Gl:0==o?"center":3==i?Gl:Zl,E||1==o?"middle":2==i?Kl:Ql);let M=t.font[1]*t.lineGap,T=y.map((e=>g(s(e,m,p,f)))),$=t._values;for(let e=0;e<$.length;e++){let t=$[e];if(null!=t){0==o?n=T[e]:a=T[e],t=""+t;let r=-1==t.indexOf("\n")?[t]:t.split(/\n/gm);for(let e=0;e0&&(_.forEach(((e,n)=>{if(n>0&&e.show&&(ut(n,!1),ut(n,!0),null==e._paths)){tt!=e.alpha&&(h.globalAlpha=tt=e.alpha);let i=2==a?[0,t[n][0].length-1]:function(e){let t=rc(Ue-1,0,Ve-1),n=rc(Be+1,0,Ve-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n{if(t>0&&e.show){tt!=e.alpha&&(h.globalAlpha=tt=e.alpha),null!=e._paths&&dt(t,!1);{let n=null!=e._paths?e._paths.gaps:null,a=e.points.show(r,t,Ue,Be,n),i=e.points.filter(r,t,a,n);(a||i)&&(e.points._paths=e.points.paths(r,t,Ue,Be,i),dt(t,!0))}1!=tt&&(h.globalAlpha=tt=1),xn("drawSeries",t)}})))}},N=(e.drawOrder||["axes","series"]).map((e=>E[e]));function A(t){let n=x[t];if(null==n){let r=(e.scales||_c)[t]||_c;if(null!=r.from)A(r.from),x[t]=Tc({},x[r.from],r,{key:t});else{n=x[t]=Tc({},t==C?Ku:Qu,r),n.key=t;let e=n.time,i=n.range,o=kc(i);if((t!=C||2==a&&!e)&&(!o||null!=i[0]&&null!=i[1]||(i={min:null==i[0]?Is:{mode:1,hard:i[0],soft:i[0]},max:null==i[1]?Is:{mode:1,hard:i[1],soft:i[1]}},o=!1),!o&&Cc(i))){let e=i;i=(t,n,r)=>null==n?wc:Ds(n,r,e)}n.range=ac(i||(e?Td:t==C?3==n.distr?Pd:4==n.distr?Od:Md:3==n.distr?Ld:4==n.distr?Id:$d)),n.auto=ac(!o&&n.auto),n.clamp=ac(n.clamp||Wu),n._min=n._max=null}}}A("x"),A("y"),1==a&&_.forEach((e=>{A(e.scale)})),k.forEach((e=>{A(e.scale)}));for(let Tn in e.scales)A(Tn);const M=x[C],T=M.distr;let $,L;0==M.ori?(fs(u,"u-hz"),$=o,L=l):(fs(u,"u-vt"),$=l,L=o);const P={};for(let Tn in x){let e=x[Tn];null==e.min&&null==e.max||(P[Tn]={min:e.min,max:e.max},e.min=e.max=null)}const I=e.tzDate||(e=>new Date(Ys(e/y))),O=e.fmtDate||Hc,R=1==y?su(I):du(I),D=mu(I,hu(1==y?lu:uu,O)),z=vu(I,fu("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",O)),F=[],j=r.legend=Tc({},gu,e.legend),H=j.show,V=j.markers;let U,B,q;j.idxs=F,V.width=ac(V.width),V.dash=ac(V.dash),V.stroke=ac(V.stroke),V.fill=ac(V.fill);let Y,W=[],K=[],Q=!1,Z={};if(j.live){const e=_[1]?_[1].values:null;Q=null!=e,Y=Q?e(r,1,0):{_:0};for(let t in Y)Z[t]=ss}if(H)if(U=ys("table","u-legend",u),q=ys("tbody",null,U),j.mount(r,U),Q){B=ys("thead",null,U,q);let e=ys("tr",null,B);for(var G in ys("th",null,e),Y)ys("th",ql,e).textContent=G}else fs(U,"u-inline"),j.live&&fs(U,"u-live");const J={show:!0},X={show:!1};const ee=new Map;function te(e,t,n){let a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const i=ee.get(t)||{},o=Ee.bind[e](r,t,n,a);o&&(As(e,t,i[e]=o),ee.set(t,i))}function ne(e,t,n){const r=ee.get(t)||{};for(let a in r)null!=e&&a!=e||(Ms(a,t,r[a]),delete r[a]);null==e&&ee.delete(t)}let re=0,ae=0,ie=0,oe=0,le=0,se=0,ce=le,ue=se,de=ie,he=oe,me=0,pe=0,fe=0,ve=0;r.bbox={};let ge=!1,ye=!1,_e=!1,be=!1,we=!1,ke=!1;function xe(e,t,n){(n||e!=r.width||t!=r.height)&&Se(e,t),_t(!1),_e=!0,ye=!0,Rt()}function Se(e,t){r.width=re=ie=e,r.height=ae=oe=t,le=se=0,function(){let e=!1,t=!1,n=!1,r=!1;k.forEach(((a,i)=>{if(a.show&&a._show){let{side:i,_size:o}=a,l=i%2,s=o+(null!=a.label?a.labelSize:0);s>0&&(l?(ie-=s,3==i?(le+=s,r=!0):n=!0):(oe-=s,0==i?(se+=s,e=!0):t=!0))}})),ze[0]=e,ze[1]=n,ze[2]=t,ze[3]=r,ie-=He[1]+He[3],le+=He[3],oe-=He[2]+He[0],se+=He[0]}(),function(){let e=le+ie,t=se+oe,n=le,r=se;function a(a,i){switch(a){case 1:return e+=i,e-i;case 2:return t+=i,t-i;case 3:return n-=i,n+i;case 0:return r-=i,r+i}}k.forEach(((e,t)=>{if(e.show&&e._show){let t=e.side;e._pos=a(t,e._size),null!=e.label&&(e._lpos=a(t,e.labelSize))}}))}();let n=r.bbox;me=n.left=hc(le*ms,.5),pe=n.top=hc(se*ms,.5),fe=n.width=hc(ie*ms,.5),ve=n.height=hc(oe*ms,.5)}const Ce=3;r.setSize=function(e){let{width:t,height:n}=e;xe(t,n)};const Ee=r.cursor=Tc({},wu,{drag:{y:2==a}},e.cursor);if(null==Ee.dataIdx){var Ne;let e=Ee.hover,n=e.skip=new Set(null!==(Ne=e.skip)&&void 0!==Ne?Ne:[]);n.add(void 0);let r=e.prox=ac(e.prox),a=e.bias??=0;Ee.dataIdx=(e,i,o,l)=>{var s;if(0==i)return o;let c=o,u=null!==(s=r(e,i,o,l))&&void 0!==s?s:tc,d=u>=0&&u0;)n.has(f[e])||(t=e);if(0==a||1==a)for(e=o;null==r&&e++u&&(c=null)}return c}}const Ae=e=>{Ee.event=e};Ee.idxs=F,Ee._lock=!1;let Me=Ee.points;Me.show=ac(Me.show),Me.size=ac(Me.size),Me.stroke=ac(Me.stroke),Me.width=ac(Me.width),Me.fill=ac(Me.fill);const Te=r.focus=Tc({},e.focus||{alpha:.3},Ee.focus),$e=Te.prox>=0,Le=$e&&Me.one;let Pe=[],Ie=[],Oe=[];function Re(e,t){let n=Me.show(r,t);if(n)return fs(n,"u-cursor-pt"),fs(n,e.class),ws(n,-10,-10,ie,oe),f.insertBefore(n,Pe[t]),n}function De(e,t){if(1==a||t>0){let t=1==a&&x[e.scale].time,n=e.value;e.value=t?Sc(n)?vu(I,fu(n,O)):n||z:n||Hu,e.label=e.label||(t?"Time":"Value")}if(Le||t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||Cd||lc,e.fillTo=ac(e.fillTo||ed),e.pxAlign=+zs(e.pxAlign,v),e.pxRound=ad(e.pxAlign),e.stroke=ac(e.stroke||null),e.fill=ac(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;let t=fc((3+2*(Qs(1,e.width)||1))*1,3),n=e.points=Tc({},{size:t,width:Qs(1,.2*t),stroke:e.stroke,space:2*t,paths:Ed,_stroke:null,_fill:null},e.points);n.show=ac(n.show),n.filter=ac(n.filter),n.fill=ac(n.fill),n.stroke=ac(n.stroke),n.paths=ac(n.paths),n.pxAlign=e.pxAlign}if(H){let n=function(e,t){if(0==t&&(Q||!j.live||2==a))return wc;let n=[],i=ys("tr","u-series",q,q.childNodes[t]);fs(i,e.class),e.show||fs(i,Bl);let o=ys("th",null,i);if(V.show){let e=_s("u-marker",o);if(t>0){let n=V.width(r,t);n&&(e.style.border=n+"px "+V.dash(r,t)+" "+V.stroke(r,t)),e.style.background=V.fill(r,t)}}let l=_s(ql,o);for(var s in l.textContent=e.label,t>0&&(V.show||(l.style.color=e.width>0?V.stroke(r,t):V.fill(r,t)),te("click",o,(t=>{if(Ee._lock)return;Ae(t);let n=_.indexOf(e);if((t.ctrlKey||t.metaKey)!=j.isolate){let e=_.some(((e,t)=>t>0&&t!=n&&e.show));_.forEach(((t,r)=>{r>0&&Wt(r,e?r==n?J:X:J,!0,Cn.setSeries)}))}else Wt(n,{show:!e.show},!0,Cn.setSeries)}),!1),$e&&te(rs,o,(t=>{Ee._lock||(Ae(t),Wt(_.indexOf(e),Gt,!0,Cn.setSeries))}),!1)),Y){let e=ys("td","u-value",i);e.textContent="--",n.push(e)}return[i,n]}(e,t);W.splice(t,0,n[0]),K.splice(t,0,n[1]),j.values.push(null)}if(Ee.show){F.splice(t,0,null);let n=null;Le?0==t&&(n=Re(e,t)):t>0&&(n=Re(e,t)),Pe.splice(t,0,n),Ie.splice(t,0,0),Oe.splice(t,0,0)}xn("addSeries",t)}r.addSeries=function(e,t){t=null==t?_.length:t,e=1==a?Ad(e,t,Mu,Yu):Ad(e,t,{},qu),_.splice(t,0,e),De(_[t],t)},r.delSeries=function(e){if(_.splice(e,1),H){j.values.splice(e,1),K.splice(e,1);let t=W.splice(e,1)[0];ne(null,t.firstChild),t.remove()}Ee.show&&(F.splice(e,1),Pe.splice(e,1)[0].remove(),Ie.splice(e,1),Oe.splice(e,1)),xn("delSeries",e)};const ze=[!1,!1,!1,!1];function Fe(e,t,n,r){let[a,i,o,l]=n,s=t%2,c=0;return 0==s&&(l||i)&&(c=0==t&&!a||2==t&&!o?Ys(Au.size/3):0),1==s&&(a||o)&&(c=1==t&&!i||3==t&&!l?Ys(Vu.size/2):0),c}const je=r.padding=(e.padding||[Fe,Fe,Fe,Fe]).map((e=>ac(zs(e,Fe)))),He=r._padding=je.map(((e,t)=>e(r,t,ze,0)));let Ve,Ue=null,Be=null;const qe=1==a?_[0].idxs:null;let Ye,We,Ke,Qe,Ze,Ge,Je,Xe,et,tt,nt=null,rt=!1;function at(e,n){if(t=null==e?[]:e,r.data=r._data=t,2==a){Ve=0;for(let e=1;e<_.length;e++)Ve+=t[e][0].length}else{0==t.length&&(r.data=r._data=t=[[]]),nt=t[0],Ve=nt.length;let e=t;if(2==T){e=t.slice();let n=e[0]=Array(Ve);for(let e=0;e=0,ke=!0,Rt()}}function it(){let e,n;rt=!0,1==a&&(Ve>0?(Ue=qe[0]=0,Be=qe[1]=Ve-1,e=t[0][Ue],n=t[0][Be],2==T?(e=Ue,n=Be):e==n&&(3==T?[e,n]=Ls(e,e,M.log,!1):4==T?[e,n]=Ps(e,e,M.log,!1):M.time?n=e+Ys(86400/y):[e,n]=Ds(e,n,.1,!0))):(Ue=qe[0]=e=null,Be=qe[1]=n=null)),Yt(C,e,n)}function ot(e,t,n,r,a,i){e??=Xl,n??=bc,r??="butt",a??=Xl,i??="round",e!=Ye&&(h.strokeStyle=Ye=e),a!=We&&(h.fillStyle=We=a),t!=Ke&&(h.lineWidth=Ke=t),i!=Ze&&(h.lineJoin=Ze=i),r!=Ge&&(h.lineCap=Ge=r),n!=Qe&&h.setLineDash(Qe=n)}function lt(e,t,n,r){t!=We&&(h.fillStyle=We=t),e!=Je&&(h.font=Je=e),n!=Xe&&(h.textAlign=Xe=n),r!=et&&(h.textBaseline=et=r)}function st(e,t,n,a){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(a.length>0&&e.auto(r,rt)&&(null==t||null==t.min)){let t=zs(Ue,0),r=zs(Be,a.length-1),o=null==n.min?3==e.distr?function(e,t,n){let r=tc,a=-tc;for(let i=t;i<=n;i++){let t=e[i];null!=t&&t>0&&(ta&&(a=t))}return[r,a]}(a,t,r):function(e,t,n,r){let a=tc,i=-tc;if(1==r)a=e[t],i=e[n];else if(-1==r)a=e[n],i=e[t];else for(let o=t;o<=n;o++){let t=e[o];null!=t&&(ti&&(i=t))}return[a,i]}(a,t,r,i):[n.min,n.max];e.min=Ks(e.min,n.min=o[0]),e.max=Qs(e.max,n.max=o[1])}}r.setData=at;const ct={min:null,max:null};function ut(e,t){let n=t?_[e].points:_[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function dt(e,n){let a=n?_[e].points:_[e],{stroke:i,fill:o,clip:l,flags:s,_stroke:c=a._stroke,_fill:u=a._fill,_width:d=a.width}=a._paths;d=fc(d*ms,3);let m=null,p=d%2/2;n&&null==u&&(u=d>0?"#fff":c);let f=1==a.pxAlign&&p>0;if(f&&h.translate(p,p),!n){let e=me-d/2,t=pe-d/2,n=fe+d,r=ve+d;m=new Path2D,m.rect(e,t,n,r)}n?mt(c,d,a.dash,a.cap,u,i,o,s,l):function(e,n,a,i,o,l,s,c,u,d,h){let m=!1;0!=u&&S.forEach(((p,f)=>{if(p.series[0]==e){let e,v=_[p.series[1]],g=t[p.series[1]],y=(v._paths||_c).band;kc(y)&&(y=1==p.dir?y[0]:y[1]);let b=null;v.show&&y&&function(e,t,n){for(t=zs(t,0),n=zs(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,Ue,Be)?(b=p.fill(r,f)||l,e=v._paths.clip):y=null,mt(n,a,i,o,b,s,c,u,d,h,e,y),m=!0}})),m||mt(n,a,i,o,l,s,c,u,d,h)}(e,c,d,a.dash,a.cap,u,i,o,s,m,l),f&&h.translate(-p,-p)}const ht=3;function mt(e,t,n,r,a,i,o,l,s,c,u,d){ot(e,t,n,r,a),(s||c||d)&&(h.save(),s&&h.clip(s),c&&h.clip(c)),d?(l&ht)==ht?(h.clip(d),u&&h.clip(u),ft(a,o),pt(e,i,t)):2&l?(ft(a,o),h.clip(d),pt(e,i,t)):1&l&&(h.save(),h.clip(d),u&&h.clip(u),ft(a,o),h.restore(),pt(e,i,t)):(ft(a,o),pt(e,i,t)),(s||c||d)&&h.restore()}function pt(e,t,n){n>0&&(t instanceof Map?t.forEach(((e,t)=>{h.strokeStyle=Ye=t,h.stroke(e)})):null!=t&&e&&h.stroke(t))}function ft(e,t){t instanceof Map?t.forEach(((e,t)=>{h.fillStyle=We=t,h.fill(e)})):null!=t&&e&&h.fill(t)}function vt(e,t,n,r,a,i,o,l,s,c){let u=o%2/2;1==v&&h.translate(u,u),ot(l,o,s,c,l),h.beginPath();let d,m,p,f,g=a+(0==r||3==r?-i:i);0==n?(m=a,f=g):(d=a,p=g);for(let v=0;v{if(!n.show)return;let i=x[n.scale];if(null==i.min)return void(n._show&&(t=!1,n._show=!1,_t(!1)));n._show||(t=!1,n._show=!0,_t(!1));let o=n.side,l=o%2,{min:s,max:c}=i,[u,d]=function(e,t,n,a){let i,o=k[e];if(a<=0)i=[0,0];else{let l=o._space=o.space(r,e,t,n,a);i=Rd(t,n,o._incrs=o.incrs(r,e,t,n,a,l),a,l)}return o._found=i}(a,s,c,0==l?ie:oe);if(0==d)return;let h=2==i.distr,m=n._splits=n.splits(r,a,s,c,u,d,h),p=2==i.distr?m.map((e=>nt[e])):m,f=2==i.distr?nt[m[1]]-nt[m[0]]:u,v=n._values=n.values(r,n.filter(r,p,a,d,f),a,d,f);n._rotate=2==o?n.rotate(r,v,a,d):0;let g=n._size;n._size=Ws(n.size(r,v,a,e)),null!=g&&n._size!=g&&(t=!1)})),t}function yt(e){let t=!0;return je.forEach(((n,a)=>{let i=n(r,a,ze,e);i!=He[a]&&(t=!1),He[a]=i})),t}function _t(e){_.forEach(((t,n)=>{n>0&&(t._paths=null,e&&(1==a?(t.min=null,t.max=null):t.facets.forEach((e=>{e.min=null,e.max=null}))))}))}let bt,wt,kt,xt,St,Ct,Et,Nt,At,Mt,Tt,$t,Lt=!1,Pt=!1,It=[];function Ot(){Pt=!1;for(let e=0;e0){_.forEach(((n,i)=>{if(1==a){let a=n.scale,o=P[a];if(null==o)return;let l=e[a];if(0==i){let e=l.range(r,l.min,l.max,a);l.min=e[0],l.max=e[1],Ue=Ts(l.min,t[0]),Be=Ts(l.max,t[0]),Be-Ue>1&&(t[0][Ue]l.max&&Be--),n.min=nt[Ue],n.max=nt[Be]}else n.show&&n.auto&&st(l,o,n,t[i],n.sorted);n.idxs[0]=Ue,n.idxs[1]=Be}else if(i>0&&n.show&&n.auto){let[r,a]=n.facets,o=r.scale,l=a.scale,[s,c]=t[i],u=e[o],d=e[l];null!=u&&st(u,P[o],r,s,r.sorted),null!=d&&st(d,P[l],a,c,a.sorted),n.min=a.min,n.max=a.max}}));for(let t in e){let n=e[t],a=P[t];if(null==n.from&&(null==a||null==a.min)){let e=n.range(r,n.min==tc?null:n.min,n.max==-tc?null:n.max,t);n.min=e[0],n.max=e[1]}}}for(let t in e){let n=e[t];if(null!=n.from){let a=e[n.from];if(null==a.min)n.min=n.max=null;else{let e=n.range(r,a.min,a.max,t);n.min=e[0],n.max=e[1]}}}let n={},i=!1;for(let t in e){let r=e[t],a=x[t];if(a.min!=r.min||a.max!=r.max){a.min=r.min,a.max=r.max;let e=a.distr;a._min=3==e?Js(a.min):4==e?ec(a.min,a.asinh):100==e?a.fwd(a.min):a.min,a._max=3==e?Js(a.max):4==e?ec(a.max,a.asinh):100==e?a.fwd(a.max):a.max,n[t]=i=!0}}if(i){_.forEach(((e,t)=>{2==a?t>0&&n.y&&(e._paths=null):n[e.scale]&&(e._paths=null)}));for(let e in n)_e=!0,xn("setScale",e);Ee.show&&Ee.left>=0&&(be=ke=!0)}for(let t in P)P[t]=null}(),ge=!1),_e&&(!function(){let e=!1,t=0;for(;!e;){t++;let n=gt(t),a=yt(t);e=t==Ce||n&&a,e||(Se(r.width,r.height),ye=!0)}}(),_e=!1),ye){if(gs(p,Zl,le),gs(p,Kl,se),gs(p,Yl,ie),gs(p,Wl,oe),gs(f,Zl,le),gs(f,Kl,se),gs(f,Yl,ie),gs(f,Wl,oe),gs(m,Yl,re),gs(m,Wl,ae),d.width=Ys(re*ms),d.height=Ys(ae*ms),k.forEach((e=>{let{_el:t,_show:n,_size:r,_pos:a,side:i}=e;if(null!=t)if(n){let e=i%2==1;gs(t,e?"left":"top",a-(3===i||0===i?r:0)),gs(t,e?"width":"height",r),gs(t,e?"top":"left",e?se:le),gs(t,e?"height":"width",e?oe:ie),vs(t,Bl)}else fs(t,Bl)})),Ye=We=Ke=Ze=Ge=Je=Xe=et=Qe=null,tt=1,sn(!0),le!=ce||se!=ue||ie!=de||oe!=he){_t(!1);let e=ie/de,t=oe/he;if(Ee.show&&!be&&Ee.left>=0){Ee.left*=e,Ee.top*=t,kt&&ws(kt,Ys(Ee.left),0,ie,oe),xt&&ws(xt,0,Ys(Ee.top),ie,oe);for(let n=0;n=0&&Ut.width>0){Ut.left*=e,Ut.width*=e,Ut.top*=t,Ut.height*=t;for(let e in dn)gs(Bt,e,Ut[e])}ce=le,ue=se,de=ie,he=oe}xn("setSize"),ye=!1}re>0&&ae>0&&(h.clearRect(0,0,d.width,d.height),xn("drawClear"),N.forEach((e=>e())),xn("draw")),Ut.show&&we&&(qt(Ut),we=!1),Ee.show&&be&&(on(null,!0,!1),be=!1),j.show&&j.live&&ke&&(rn(),ke=!1),c||(c=!0,r.status=1,xn("ready")),rt=!1,Lt=!1}function zt(e,n){let a=x[e];if(null==a.from){if(0==Ve){let t=a.range(r,n.min,n.max,e);n.min=t[0],n.max=t[1]}if(n.min>n.max){let e=n.min;n.min=n.max,n.max=e}if(Ve>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==C&&2==a.distr&&Ve>0&&(n.min=Ts(n.min,t[0]),n.max=Ts(n.max,t[0]),n.min==n.max&&n.max++),P[e]=n,ge=!0,Rt()}}r.batch=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Lt=!0,Pt=t,e(r),Dt(),t&&It.length>0&&queueMicrotask(Ot)},r.redraw=(e,t)=>{_e=t||!1,!1!==e?Yt(C,M.min,M.max):Rt()},r.setScale=zt;let Ft=!1;const jt=Ee.drag;let Ht=jt.x,Vt=jt.y;Ee.show&&(Ee.x&&(bt=_s("u-cursor-x",f)),Ee.y&&(wt=_s("u-cursor-y",f)),0==M.ori?(kt=bt,xt=wt):(kt=wt,xt=bt),Tt=Ee.left,$t=Ee.top);const Ut=r.select=Tc({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Bt=Ut.show?_s("u-select",Ut.over?f:p):null;function qt(e,t){if(Ut.show){for(let t in e)Ut[t]=e[t],t in dn&&gs(Bt,t,e[t]);!1!==t&&xn("setSelect")}}function Yt(e,t,n){zt(e,{min:t,max:n})}function Wt(e,t,n,i){null!=t.focus&&function(e){if(e!=Zt){let t=null==e,n=1!=Te.alpha;_.forEach(((r,i)=>{if(1==a||i>0){let a=t||0==i||i==e;r._focus=t?null:a,n&&function(e,t){_[e].alpha=t,Ee.show&&Pe[e]&&(Pe[e].style.opacity=t);H&&W[e]&&(W[e].style.opacity=t)}(i,a?1:Te.alpha)}})),Zt=e,n&&Rt()}}(e),null!=t.show&&_.forEach(((n,r)=>{r>0&&(e==r||null==e)&&(n.show=t.show,function(e){let t=_[e],n=H?W[e]:null;t.show?n&&vs(n,Bl):(n&&fs(n,Bl),ws(Le?Pe[0]:Pe[e],-10,-10,ie,oe))}(r,t.show),2==a?(Yt(n.facets[0].scale,null,null),Yt(n.facets[1].scale,null,null)):Yt(n.scale,null,null),Rt())})),!1!==n&&xn("setSeries",e,t),i&&An("setSeries",r,e,t)}let Kt,Qt,Zt;r.setSelect=qt,r.setSeries=Wt,r.addBand=function(e,t){e.fill=ac(e.fill||null),e.dir=zs(e.dir,-1),t=null==t?S.length:t,S.splice(t,0,e)},r.setBand=function(e,t){Tc(S[e],t)},r.delBand=function(e){null==e?S.length=0:S.splice(e,1)};const Gt={focus:!0};function Jt(e,t,n){let r=x[t];n&&(e=e/ms-(1==r.ori?se:le));let a=ie;1==r.ori&&(a=oe,e=a-e),-1==r.dir&&(e=a-e);let i=r._min,o=i+(r._max-i)*(e/a),l=r.distr;return 3==l?Zs(10,o):4==l?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Vs.sinh(e)*t}(o,r.asinh):100==l?r.bwd(o):o}function Xt(e,t){gs(Bt,Zl,Ut.left=e),gs(Bt,Yl,Ut.width=t)}function en(e,t){gs(Bt,Kl,Ut.top=e),gs(Bt,Wl,Ut.height=t)}H&&$e&&te(as,U,(e=>{Ee._lock||(Ae(e),null!=Zt&&Wt(null,Gt,!0,Cn.setSeries))})),r.valToIdx=e=>Ts(e,t[0]),r.posToIdx=function(e,n){return Ts(Jt(e,C,n),t[0],Ue,Be)},r.posToVal=Jt,r.valToPos=(e,t,n)=>0==x[t].ori?o(e,x[t],n?fe:ie,n?me:0):l(e,x[t],n?ve:oe,n?pe:0),r.setCursor=(e,t,n)=>{Tt=e.left,$t=e.top,on(null,t,n)};let tn=0==M.ori?Xt:en,nn=1==M.ori?Xt:en;function rn(e,t){if(null!=e&&(e.idxs?e.idxs.forEach(((e,t)=>{F[t]=e})):void 0!==e.idx&&F.fill(e.idx),j.idx=F[0]),H&&j.live){for(let e=0;e<_.length;e++)(e>0||1==a&&!Q)&&an(e,F[e]);!function(){if(H&&j.live)for(let e=2==a?1:0;e<_.length;e++){if(0==e&&Q)continue;let t=j.values[e],n=0;for(let r in t)K[e][n++].firstChild.nodeValue=t[r]}}()}ke=!1,!1!==t&&xn("setLegend")}function an(e,n){var a;let i,o=_[e],l=0==e&&2==T?nt:t[e];Q?i=null!==(a=o.values(r,e,n))&&void 0!==a?a:Z:(i=o.value(r,null==n?null:l[n],e,n),i=null==i?Z:{_:i}),j.values[e]=i}function on(e,n,i){let o;At=Tt,Mt=$t,[Tt,$t]=Ee.move(r,Tt,$t),Ee.left=Tt,Ee.top=$t,Ee.show&&(kt&&ws(kt,Ys(Tt),0,ie,oe),xt&&ws(xt,0,Ys($t),ie,oe));let l=Ue>Be;Kt=tc,Qt=null;let s=0==M.ori?ie:oe,c=1==M.ori?ie:oe;if(Tt<0||0==Ve||l){o=Ee.idx=null;for(let e=0;e<_.length;e++){let t=Pe[e];null!=t&&ws(t,-10,-10,ie,oe)}$e&&Wt(null,Gt,!0,null==e&&Cn.setSeries),j.live&&(F.fill(o),ke=!0)}else{let e,n,i;1==a&&(e=0==M.ori?Tt:$t,n=Jt(e,C),o=Ee.idx=Ts(n,t[0],Ue,Be),i=$(t[0][o],M,s,0));let l=-10,u=-10,d=0,h=0,m=!0,p="",f="";for(let v=2==a?1:0;v<_.length;v++){let e=_[v],g=F[v],y=null==g?null:1==a?t[v][g]:t[v][1][g],b=Ee.dataIdx(r,v,o,n),w=null==b?null:1==a?t[v][b]:t[v][1][b];ke=ke||w!=y||b!=g,F[v]=b;let k=b==o?i:$(1==a?t[0][b]:t[v][0][b],M,s,0);if(v>0&&e.show){let t=null==w?-10:L(w,1==a?x[e.scale]:x[e.facets[1].scale],c,0);if($e&&null!=w){let n=1==M.ori?Tt:$t,a=Bs(Te.dist(r,v,b,t,n));if(a=0?1:-1;i==(w>=0?1:-1)&&(1==i?1==t?w>=r:w<=r:1==t?w<=r:w>=r)&&(Kt=a,Qt=v)}else Kt=a,Qt=v}}if(ke||Le){let e,n;0==M.ori?(e=k,n=t):(e=t,n=k);let a,i,o,s,c,g,y=!0,_=Me.bbox;if(null!=_){y=!1;let e=_(r,v);o=e.left,s=e.top,a=e.width,i=e.height}else o=e,s=n,a=i=Me.size(r,v);if(g=Me.fill(r,v),c=Me.stroke(r,v),Le)v==Qt&&Kt<=Te.prox&&(l=o,u=s,d=a,h=i,m=y,p=g,f=c);else{let e=Pe[v];null!=e&&(Ie[v]=o,Oe[v]=s,Cs(e,a,i,y),xs(e,g,c),ws(e,Ws(o),Ws(s),ie,oe))}}}}if(Le){let e=Te.prox;if(ke||(null==Zt?Kt<=e:Kt>e||Qt!=Zt)){let e=Pe[0];Ie[0]=l,Oe[0]=u,Cs(e,d,h,m),xs(e,p,f),ws(e,Ws(l),Ws(u),ie,oe)}}}if(Ut.show&&Ft)if(null!=e){let[t,n]=Cn.scales,[r,a]=Cn.match,[i,o]=e.cursor.sync.scales,l=e.cursor.drag;if(Ht=l._x,Vt=l._y,Ht||Vt){let l,u,d,h,m,{left:p,top:f,width:v,height:g}=e.select,y=e.scales[i].ori,_=e.posToVal,b=null!=t&&r(t,i),w=null!=n&&a(n,o);b&&Ht?(0==y?(l=p,u=v):(l=f,u=g),d=x[t],h=$(_(l,i),d,s,0),m=$(_(l+u,i),d,s,0),tn(Ks(h,m),Bs(m-h))):tn(0,s),w&&Vt?(1==y?(l=p,u=v):(l=f,u=g),d=x[n],h=L(_(l,o),d,c,0),m=L(_(l+u,o),d,c,0),nn(Ks(h,m),Bs(m-h))):nn(0,c)}else hn()}else{let e=Bs(At-St),t=Bs(Mt-Ct);if(1==M.ori){let n=e;e=t,t=n}Ht=jt.x&&e>=jt.dist,Vt=jt.y&&t>=jt.dist;let n,r,a=jt.uni;null!=a?Ht&&Vt&&(Ht=e>=a,Vt=t>=a,Ht||Vt||(t>e?Vt=!0:Ht=!0)):jt.x&&jt.y&&(Ht||Vt)&&(Ht=Vt=!0),Ht&&(0==M.ori?(n=Et,r=Tt):(n=Nt,r=$t),tn(Ks(n,r),Bs(r-n)),Vt||nn(0,c)),Vt&&(1==M.ori?(n=Et,r=Tt):(n=Nt,r=$t),nn(Ks(n,r),Bs(r-n)),Ht||tn(0,s)),Ht||Vt||(tn(0,0),nn(0,0))}if(jt._x=Ht,jt._y=Vt,null==e){if(i){if(null!=En){let[e,t]=Cn.scales;Cn.values[0]=null!=e?Jt(0==M.ori?Tt:$t,e):null,Cn.values[1]=null!=t?Jt(1==M.ori?Tt:$t,t):null}An(es,r,Tt,$t,ie,oe,o)}if($e){let e=i&&Cn.setSeries,t=Te.prox;null==Zt?Kt<=t&&Wt(Qt,Gt,!0,e):Kt>t?Wt(null,Gt,!0,e):Qt!=Zt&&Wt(Qt,Gt,!0,e)}}ke&&(j.idx=o,rn()),!1!==n&&xn("setCursor")}r.setLegend=rn;let ln=null;function sn(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?ln=null:(ln=f.getBoundingClientRect(),xn("syncRect",ln))}function cn(e,t,n,r,a,i,o){Ee._lock||Ft&&null!=e&&0==e.movementX&&0==e.movementY||(un(e,t,n,r,a,i,o,!1,null!=e),null!=e?on(null,!0,!0):on(t,!0,!1))}function un(e,t,n,a,i,o,l,c,u){if(null==ln&&sn(!1),Ae(e),null!=e)n=e.clientX-ln.left,a=e.clientY-ln.top;else{if(n<0||a<0)return Tt=-10,void($t=-10);let[e,r]=Cn.scales,l=t.cursor.sync,[c,u]=l.values,[d,h]=l.scales,[m,p]=Cn.match,f=t.axes[0].side%2==1,v=0==M.ori?ie:oe,g=1==M.ori?ie:oe,y=f?o:i,_=f?i:o,b=f?a:n,w=f?n:a;if(n=null!=d?m(e,d)?s(c,x[e],v,0):-10:v*(b/y),a=null!=h?p(r,h)?s(u,x[r],g,0):-10:g*(w/_),1==M.ori){let e=n;n=a,a=e}}u&&((n<=1||n>=ie-1)&&(n=hc(n,ie)),(a<=1||a>=oe-1)&&(a=hc(a,oe))),c?(St=n,Ct=a,[Et,Nt]=Ee.move(r,n,a)):(Tt=n,$t=a)}Object.defineProperty(r,"rect",{get:()=>(null==ln&&sn(!1),ln)});const dn={width:0,height:0,left:0,top:0};function hn(){qt(dn,!1)}let mn,pn,fn,vn;function gn(e,t,n,a,i,o,l){Ft=!0,Ht=Vt=jt._x=jt._y=!1,un(e,t,n,a,i,o,0,!0,!1),null!=e&&(te(ns,us,yn,!1),An(ts,r,Et,Nt,ie,oe,null));let{left:s,top:c,width:u,height:d}=Ut;mn=s,pn=c,fn=u,vn=d,hn()}function yn(e,t,n,a,i,o,l){Ft=jt._x=jt._y=!1,un(e,t,n,a,i,o,0,!1,!0);let{left:s,top:c,width:u,height:d}=Ut,h=u>0||d>0,m=mn!=s||pn!=c||fn!=u||vn!=d;if(h&&m&&qt(Ut),jt.setScale&&h&&m){let e=s,t=u,n=c,r=d;if(1==M.ori&&(e=c,t=d,n=s,r=u),Ht&&Yt(C,Jt(e,C),Jt(e+t,C)),Vt)for(let a in x){let e=x[a];a!=C&&null==e.from&&e.min!=tc&&Yt(a,Jt(n+r,a),Jt(n,a))}hn()}else Ee.lock&&(Ee._lock=!Ee._lock,on(null,!0,!1));null!=e&&(ne(ns,us),An(ns,r,Tt,$t,ie,oe,null))}function _n(e,t,n,a,i,o,l){Ee._lock||(Ae(e),it(),hn(),null!=e&&An(is,r,Tt,$t,ie,oe,null))}function bn(){k.forEach(zd),xe(r.width,r.height,!0)}As(ls,ds,bn);const wn={};wn.mousedown=gn,wn.mousemove=cn,wn.mouseup=yn,wn.dblclick=_n,wn.setSeries=(e,t,n,a)=>{-1!=(n=(0,Cn.match[2])(r,t,n))&&Wt(n,a,!0,!1)},Ee.show&&(te(ts,f,gn),te(es,f,cn),te(rs,f,(e=>{Ae(e),sn(!1)})),te(as,f,(function(e,t,n,r,a,i,o){if(Ee._lock)return;Ae(e);let l=Ft;if(Ft){let e,t,n=!0,r=!0,a=10;0==M.ori?(e=Ht,t=Vt):(e=Vt,t=Ht),e&&t&&(n=Tt<=a||Tt>=ie-a,r=$t<=a||$t>=oe-a),e&&n&&(Tt=Tt{e.call(null,r,t,n)}))}(e.plugins||[]).forEach((e=>{for(let t in e.hooks)kn[t]=(kn[t]||[]).concat(e.hooks[t])}));const Sn=(e,t,n)=>n,Cn=Tc({key:null,setSeries:!1,filters:{pub:sc,sub:sc},scales:[C,_[1]?_[1].scale:null],match:[cc,cc,Sn],values:[null,null]},Ee.sync);2==Cn.match.length&&Cn.match.push(Sn),Ee.sync=Cn;const En=Cn.key,Nn=Gu(En);function An(e,t,n,r,a,i,o){Cn.filters.pub(e,t,n,r,a,i,o)&&Nn.pub(e,t,n,r,a,i,o)}function Mn(){xn("init",e,t),at(t||e.data,!1),P[C]?zt(C,P[C]):it(),we=Ut.show&&(Ut.width>0||Ut.height>0),be=ke=!0,xe(e.width,e.height)}return Nn.sub(r),r.pub=function(e,t,n,r,a,i,o){Cn.filters.sub(e,t,n,r,a,i,o)&&wn[e](null,t,n,r,a,i,o)},r.destroy=function(){Nn.unsub(r),xd.delete(r),ee.clear(),Ms(ls,ds,bn),u.remove(),U?.remove(),xn("destroy")},_.forEach(De),k.forEach((function(e,t){if(e._show=e.show,e.show){let n=e.side%2,a=x[e.scale];null==a&&(e.scale=n?_[1].scale:C,a=x[e.scale]);let i=a.time;e.size=ac(e.size),e.space=ac(e.space),e.rotate=ac(e.rotate),kc(e.incrs)&&e.incrs.forEach((e=>{!vc.has(e)&&vc.set(e,gc(e))})),e.incrs=ac(e.incrs||(2==a.distr?Wc:i?1==y?ou:cu:Kc)),e.splits=ac(e.splits||(i&&1==a.distr?R:3==a.distr?Lu:4==a.distr?Pu:$u)),e.stroke=ac(e.stroke),e.grid.stroke=ac(e.grid.stroke),e.ticks.stroke=ac(e.ticks.stroke),e.border.stroke=ac(e.border.stroke);let o=e.values;e.values=kc(o)&&!kc(o[0])?ac(o):i?kc(o)?mu(I,hu(o,O)):Sc(o)?function(e,t){let n=Hc(t);return(t,r,a,i,o)=>r.map((t=>n(e(t))))}(I,o):o||D:o||Tu,e.filter=ac(e.filter||(a.distr>=3&&10==a.log?Fu:3==a.distr&&2==a.log?ju:oc)),e.font=Dd(e.font),e.labelFont=Dd(e.labelFont),e._size=e.size(r,null,t,0),e._space=e._rotate=e._incrs=e._found=e._splits=e._values=null,e._size>0&&(ze[t]=!0,e._el=_s("u-axis",m))}})),n?n instanceof HTMLElement?(n.appendChild(u),Mn()):n(r,Mn):Mn(),r}Fd.assign=Tc,Fd.fmtNum=Hs,Fd.rangeNum=Ds,Fd.rangeLog=Ls,Fd.rangeAsinh=Ps,Fd.orient=Ju,Fd.pxRatio=ms,Fd.join=function(e,t){if(function(e){let t=e[0][0],n=t.length;for(let r=1;r1&&void 0!==arguments[1]?arguments[1]:100;const n=e.length;if(n<=1)return!0;let r=0,a=n-1;for(;r<=a&&null==e[r];)r++;for(;a>=r&&null==e[a];)a--;if(a<=r)return!0;const i=Qs(1,qs((a-r+1)/t));for(let o=e[r],l=r+i;l<=a;l+=i){const t=e[l];if(null!=t){if(t<=o)return!1;o=t}}return!0}(t[0])||(t=function(e){let t=e[0],n=t.length,r=Array(n);for(let i=0;it[e]-t[n]));let a=[];for(let i=0;ie-t))],a=r[0].length,i=new Map;for(let o=0;oJu(e,i,((s,c,u,d,h,m,p,f,v,g,y)=>{let _=s.pxRound,{left:b,width:w}=e.bbox,k=e=>_(m(e,d,g,f)),x=e=>_(p(e,h,y,v)),S=0==d.ori?sd:cd;const C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},E=C.stroke,N=d.dir*(0==d.ori?1:-1);o=$s(u,o,l,1),l=$s(u,o,l,-1);let A=x(u[1==N?o:l]),M=k(c[1==N?o:l]),T=M,$=M;a&&-1==t&&($=b,S(E,$,A)),S(E,M,A);for(let e=1==N?o:l;e>=o&&e<=l;e+=N){let n=u[e];if(null==n)continue;let r=k(c[e]),a=x(n);1==t?S(E,r,A):S(E,T,a),S(E,r,a),A=a,T=r}let L=T;a&&1==t&&(L=b+w,S(E,L,A));let[P,I]=Xu(e,i);if(null!=s.fill||0!=P){let t=C.fill=new Path2D(E),n=x(s.fillTo(e,i,s.min,s.max,P));S(t,L,n),S(t,$,n)}if(!s.spanGaps){let a=[];a.push(...rd(c,u,o,l,N,k,r));let h=s.width*ms/2,m=n||1==t?h:-h,p=n||-1==t?-h:h;a.forEach((e=>{e[0]+=m,e[1]+=p})),C.gaps=a=s.gaps(e,i,o,l,a),C.clip=nd(a,d.ori,f,v,g,y)}return 0!=I&&(C.band=2==I?[td(e,i,o,l,E,-1),td(e,i,o,l,E,1)]:td(e,i,o,l,E,I)),C}))},e.bars=function(e){const t=zs((e=e||_c).size,[.6,tc,1]),n=e.align||0,r=e.gap||0;let a=e.radius;a=null==a?[0,0]:"number"==typeof a?[a,0]:a;const i=ac(a),o=1-t[0],l=zs(t[1],tc),s=zs(t[2],1),c=zs(e.disp,_c),u=zs(e.each,(e=>{})),{fill:d,stroke:h}=c;return(e,t,a,m)=>Ju(e,t,((p,f,v,g,y,_,b,w,k,x,S)=>{let C,E,N=p.pxRound,A=n,M=r*ms,T=l*ms,$=s*ms;0==g.ori?[C,E]=i(e,t):[E,C]=i(e,t);const L=g.dir*(0==g.ori?1:-1);let P,I,O,R=0==g.ori?ud:dd,D=0==g.ori?u:(e,t,n,r,a,i,o)=>{u(e,t,n,a,r,o,i)},z=zs(e.bands,bc).find((e=>e.series[0]==t)),F=null!=z?z.dir:0,j=p.fillTo(e,t,p.min,p.max,F),H=N(b(j,y,S,k)),V=x,U=N(p.width*ms),B=!1,q=null,Y=null,W=null,K=null;null==d||0!=U&&null==h||(B=!0,q=d.values(e,t,a,m),Y=new Map,new Set(q).forEach((e=>{null!=e&&Y.set(e,new Path2D)})),U>0&&(W=h.values(e,t,a,m),K=new Map,new Set(W).forEach((e=>{null!=e&&K.set(e,new Path2D)}))));let{x0:Q,size:Z}=c;if(null!=Q&&null!=Z){A=1,f=Q.values(e,t,a,m),2==Q.unit&&(f=f.map((t=>e.posToVal(w+t*x,g.key,!0))));let n=Z.values(e,t,a,m);I=2==Z.unit?n[0]*x:_(n[0],g,x,w)-_(0,g,x,w),V=wd(f,v,_,g,x,w,V),O=V-I+M}else V=wd(f,v,_,g,x,w,V),O=V*o+M,I=V-O;O<1&&(O=0),U>=I/2&&(U=0),O<5&&(N=ic);let G=O>0;I=N(rc(V-O-(G?U:0),$,T)),P=(0==A?I/2:A==L?0:I)-A*L*((0==A?M/2:0)+(G?U/2:0));const J={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},X=B?null:new Path2D;let ee=null;if(null!=z)ee=e.data[z.series[1]];else{let{y0:n,y1:r}=c;null!=n&&null!=r&&(v=r.values(e,t,a,m),ee=n.values(e,t,a,m))}let te=C*I,ne=E*I;for(let n=1==L?a:m;n>=a&&n<=m;n+=L){let r=v[n];if(null==r)continue;if(null!=ee){var re;let e=null!==(re=ee[n])&&void 0!==re?re:0;if(r-e==0)continue;H=b(e,y,S,k)}let a=_(2!=g.distr||null!=c?f[n]:n,g,x,w),i=b(zs(r,j),y,S,k),o=N(a-P),l=N(Qs(i,H)),s=N(Ks(i,H)),u=l-s;if(null!=r){let a=r<0?ne:te,i=r<0?te:ne;B?(U>0&&null!=W[n]&&R(K.get(W[n]),o,s+qs(U/2),I,Qs(0,u-U),a,i),null!=q[n]&&R(Y.get(q[n]),o,s+qs(U/2),I,Qs(0,u-U),a,i)):R(X,o,s+qs(U/2),I,Qs(0,u-U),a,i),D(e,t,n,o-U/2,s,I+U,u)}}if(U>0)J.stroke=B?K:X;else if(!B){var ae;J._fill=0==p.width?p._fill:null!==(ae=p._stroke)&&void 0!==ae?ae:p._fill,J.width=0}return J.fill=B?Y:X,J}))},e.spline=function(e){return function(e,t){const n=zs(t?.alignGaps,0);return(t,r,a,i)=>Ju(t,r,((o,l,s,c,u,d,h,m,p,f,v)=>{let g,y,_,b=o.pxRound,w=e=>b(d(e,c,f,m)),k=e=>b(h(e,u,v,p));0==c.ori?(g=od,_=sd,y=pd):(g=ld,_=cd,y=fd);const x=c.dir*(0==c.ori?1:-1);a=$s(s,a,i,1),i=$s(s,a,i,-1);let S=w(l[1==x?a:i]),C=S,E=[],N=[];for(let e=1==x?a:i;e>=a&&e<=i;e+=x)if(null!=s[e]){let t=w(l[e]);E.push(C=t),N.push(k(s[e]))}const A={stroke:e(E,N,g,_,y,b),fill:null,clip:null,band:null,gaps:null,flags:1},M=A.stroke;let[T,$]=Xu(t,r);if(null!=o.fill||0!=T){let e=A.fill=new Path2D(M),n=k(o.fillTo(t,r,o.min,o.max,T));_(e,C,n),_(e,S,n)}if(!o.spanGaps){let e=[];e.push(...rd(l,s,a,i,x,w,n)),A.gaps=e=o.gaps(t,r,a,i,e),A.clip=nd(e,c.ori,m,p,f,v)}return 0!=$&&(A.band=2==$?[td(t,r,a,i,M,-1),td(t,r,a,i,M,1)]:td(t,r,a,i,M,$)),A}))}(kd,e)}}const jd=e=>{let t=e.length,n=-1/0;for(;t--;){const r=e[t];Number.isFinite(r)&&r>n&&(n=r)}return Number.isFinite(n)?n:null},Hd=e=>{let t=e.length,n=1/0;for(;t--;){const r=e[t];Number.isFinite(r)&&r{let t=e.length;const n=[];for(;t--;){const r=e[t];Number.isFinite(r)&&n.push(r)}return n.sort(),n[n.length>>1]},Ud=e=>{let t=e.length;for(;t--;){const n=e[t];if(Number.isFinite(n))return n}},Bd=(e,t,n)=>{if(void 0===e||null===e)return"";n=n||0,t=t||0;const r=Math.abs(n-t);if(isNaN(r)||0==r)return Math.abs(e)>=1e3?e.toLocaleString("en-US"):e.toString();let a=3+Math.floor(1+Math.log10(Math.max(Math.abs(t),Math.abs(n)))-Math.log10(r));return(isNaN(a)||a>20)&&(a=20),e.toLocaleString("en-US",{minimumSignificantDigits:1,maximumSignificantDigits:a})},qd=e=>{const t=(null===e||void 0===e?void 0:e.metric)||{},n=Object.keys(t).filter((e=>"__name__"!=e)).map((e=>`${e}=${JSON.stringify(t[e])}`));let r=t.__name__||"";return n.length>0&&(r+="{"+n.join(",")+"}"),r},Yd=[[31536e3,"{YYYY}",null,null,null,null,null,null,1],[2419200,"{MMM}","\n{YYYY}",null,null,null,null,null,1],[86400,"{MM}-{DD}","\n{YYYY}",null,null,null,null,null,1],[3600,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[60,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[1,"{HH}:{mm}:{ss}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD} {HH}:{mm}",null,null,null,1],[.001,":{ss}.{fff}","\n{YYYY}-{MM}-{DD} {HH}:{mm}",null,"\n{MM}-{DD} {HH}:{mm}",null,"\n{HH}:{mm}",null,1]],Wd=(e,t)=>Array.from(new Set(e.map((e=>e.scale)))).map((e=>{const n="10px Arial",r=gt("color-text"),a={scale:e,show:!0,size:Qd,stroke:r,font:n,values:(e,n)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=t[0],a=t[t.length-1];return n?t.map((e=>`${Bd(e,r,a)} ${n}`)):t.map((e=>Bd(e,r,a)))}(e,n,t)};return e?Number(e)%2||"y"===e?a:{...a,side:1}:{space:80,values:Yd,stroke:r,font:n}})),Kd=(e,t)=>{if(null==e||null==t)return[-1,1];const n=.02*(Math.abs(t-e)||Math.abs(e)||1);return[e-n,t+n]},Qd=(e,t,n,r)=>{var a;const i=e.axes[n];if(r>1)return i._size||60;let o=6+((null===i||void 0===i||null===(a=i.ticks)||void 0===a?void 0:a.size)||0)+(i.gap||0);const l=(null!==t&&void 0!==t?t:[]).reduce(((e,t)=>(null===t||void 0===t?void 0:t.length)>e.length?t:e),"");return""!=l&&(o+=((e,t)=>{const n=document.createElement("span");n.innerText=e,n.style.cssText=`position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ${t}`,document.body.appendChild(n);const r=n.offsetWidth;return n.remove(),r})(l,"10px Arial")),Math.ceil(o)},Zd=["#e54040","#32a9dc","#2ee329","#7126a1","#e38f0f","#3d811a","#ffea00","#2d2d2d","#da42a6","#a44e0c"],Gd=e=>{if(7!=e.length)return"0, 0, 0";return`${parseInt(e.slice(1,3),16)}, ${parseInt(e.slice(3,5),16)}, ${parseInt(e.slice(5,7),16)}`},Jd={[ht.yhatUpper]:"#7126a1",[ht.yhatLower]:"#7126a1",[ht.yhat]:"#da42a6",[ht.anomaly]:"#da4242",[ht.anomalyScore]:"#7126a1",[ht.actual]:"#203ea9",[ht.training]:`rgba(${Gd("#203ea9")}, 0.2)`},Xd=e=>{const t=16777215;let n=1,r=0,a=1;if(e.length>0)for(let o=0;or&&(r=e[o].charCodeAt(0)),a=parseInt(String(t/r)),n=(n+e[o].charCodeAt(0)*a*49979693)%t;let i=(n*e.length%t).toString(16);return i=i.padEnd(6,i),`#${i}`},eh=((e,t,n)=>{const r=[];for(let a=0;aMath.round(e))).join(", "))}return r.map((e=>`rgb(${e})`))})([246,226,219],[127,39,4],16),th=()=>(e,t)=>{const n=Math.round(devicePixelRatio);Fd.orient(e,t,((r,a,i,o,l,s,c,u,d,h,m,p,f,v)=>{const[g,y,_]=e.data[t],b=g.length,w=((e,t)=>{const n=e.data[t][2],r=eh;let a=1/0,i=-1/0;for(let c=0;c0&&(a=Math.min(a,n[c]),i=Math.max(i,n[c]));const o=i-a,l=r.length,s=Array(n.length);for(let c=0;cnew Path2D)),S=b-y.lastIndexOf(y[0]),C=b/S,E=y[1]-y[0],N=g[S]-g[0],A=s(N,o,h,u)-s(0,o,h,u)-n,M=c(E,l,m,d)-c(0,l,m,d)+n,T=y.slice(0,S).map((e=>Math.round(c(e,l,m,d)-M/2))),$=Array.from({length:C},((e,t)=>Math.round(s(g[t*S],o,h,u)-A)));for(let e=0;e0&&g[e]>=(o.min||-1/0)&&g[e]<=(o.max||1/0)&&y[e]>=(l.min||-1/0)&&y[e]<=(l.max||1/0)){const t=$[~~(e/S)],n=T[e%S];v(x[w[e]],t,n,A,M)}e.ctx.save(),e.ctx.rect(e.bbox.left,e.bbox.top,e.bbox.width,e.bbox.height),e.ctx.clip(),x.forEach(((t,n)=>{e.ctx.fillStyle=k[n],e.ctx.fill(t)})),e.ctx.restore()}))},nh=e=>{const t=(e.metric.vmrange||e.metric.le||"").split("...");return Nl(t[t.length-1])},rh=(e,t)=>nh(e)-nh(t),ah=(e,t)=>{if(!t)return e;const n=(e=>{var t;if(!e.every((e=>e.metric.le)))return e;const n=e.sort(((e,t)=>parseFloat(e.metric.le)-parseFloat(t.metric.le))),r=(null===(t=e[0])||void 0===t?void 0:t.group)||1;let a={metric:{le:""},values:[],group:r};const i=[];for(const l of n){const e=[a.metric.le,l.metric.le].filter((e=>e)).join("..."),t=[];for(const[n,r]of l.values){var o;const e=+r-+((null===(o=a.values.find((e=>e[0]===n)))||void 0===o?void 0:o[1])||0);t.push([n,`${e}`])}i.push({metric:{vmrange:e},values:t,group:r}),a=l}return i})(e.sort(rh)),r={};n.forEach((e=>e.values.forEach((e=>{let[t,n]=e;r[t]=(r[t]||0)+ +n}))));return n.map((e=>{const t=e.values.map((e=>{let[t,n]=e;const a=r[t];return[t,`${Math.round(+n/a*100)}`]}));return{...e,values:t}})).filter((e=>!e.values.every((e=>"0"===e[1]))))},ih=e=>{const t=["__name__","for"];return Object.entries(e).filter((e=>{let[n]=e;return!t.includes(n)})).map((e=>{let[t,n]=e;return`${t}: ${n}`})).join(",")},oh=(e,t,n,r)=>{const a={},i=r?0:Math.min(e.length,Zd.length);for(let o=0;o{const l=r?(e=>{const t=(null===e||void 0===e?void 0:e.__name__)||"",n=new RegExp(`(${Object.values(ht).join("|")})$`),r=t.match(n),a=r&&r[0];return{value:/(?:^|[^a-zA-Z0-9_])y(?:$|[^a-zA-Z0-9_])/.test(t)?ht.actual:a,group:ih(e)}})(e[o].metric):null,s=r?(null===l||void 0===l?void 0:l.group)||"":El(i,n[i.group-1]);return{label:s,dash:dh(l),width:hh(l),stroke:ph({metricInfo:l,label:s,isAnomalyUI:r,colorState:a}),points:mh(l),spanGaps:!1,forecast:null===l||void 0===l?void 0:l.value,forecastGroup:null===l||void 0===l?void 0:l.group,freeFormFields:i.metric,show:!ch(s,t),scale:"1",...lh(i)}}},lh=e=>{const t=e.values.map((e=>Nl(e[1]))),{min:n,max:r,median:a,last:i}={min:Hd(t),max:jd(t),median:Vd(t),last:Ud(t)};return{median:a,statsFormatted:{min:Bd(n,n,r),max:Bd(r,n,r),median:Bd(a,n,r),last:Bd(i,n,r)}}},sh=(e,t)=>({group:t,label:e.label||"",color:e.stroke,checked:e.show||!1,freeFormFields:e.freeFormFields,statsFormatted:e.statsFormatted,median:e.median}),ch=(e,t)=>t.includes(`${e}`),uh=e=>{for(let t=e.series.length-1;t>=0;t--)t&&e.delSeries(t)},dh=e=>{const t=(null===e||void 0===e?void 0:e.value)===ht.yhatLower,n=(null===e||void 0===e?void 0:e.value)===ht.yhatUpper,r=(null===e||void 0===e?void 0:e.value)===ht.yhat;return t||n?[10,5]:r?[10,2]:[]},hh=e=>{const t=(null===e||void 0===e?void 0:e.value)===ht.yhatLower,n=(null===e||void 0===e?void 0:e.value)===ht.yhatUpper,r=(null===e||void 0===e?void 0:e.value)===ht.yhat,a=(null===e||void 0===e?void 0:e.value)===ht.anomaly;return n||t?.7:r?1:a?0:1.4},mh=e=>(null===e||void 0===e?void 0:e.value)===ht.anomaly?{size:8,width:4,space:0}:{size:4.2,width:1.4},ph=e=>{let{metricInfo:t,label:n,isAnomalyUI:r,colorState:a}=e;const i=a[n]||Xd(n),o=(null===t||void 0===t?void 0:t.value)===ht.anomaly;return r&&o?Jd[ht.anomaly]:!r||o||null!==t&&void 0!==t&&t.value?null!==t&&void 0!==t&&t.value?null!==t&&void 0!==t&&t.value?Jd[null===t||void 0===t?void 0:t.value]:i:a[n]||Xd(n):Jd[ht.actual]},fh=e=>{let{width:t=400,height:n=500}=e;return{width:t,height:n,series:[],tzDate:e=>i()(Xt(tn(e))).local().toDate(),legend:{show:!1},cursor:{drag:{x:!0,y:!1},focus:{prox:30},points:{size:5.6,width:1.4},bind:{click:()=>null,dblclick:()=>null}}}},vh=e=>{uh(e),(e=>{Object.keys(e.hooks).forEach((t=>{e.hooks[t]=[]}))})(e),e.setData([])},gh=e=>{let{min:t,max:n}=e;return[t,n]},yh=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;return a.limits.enable?a.limits.range[r]:Kd(t,n)},_h=(e,t)=>{const n={x:{range:()=>gh(t)}},r=Object.keys(e.limits.range);return(r.length?r:["1"]).forEach((t=>{n[t]={range:function(n){return yh(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,t,e)}}})),n},bh=e=>t=>{const n=t.posToVal(t.select.left,"x"),r=t.posToVal(t.select.left+t.select.width,"x");e({min:n,max:r})};function wh(e){return`rgba(${Gd(Jd[e])}, 0.05)`}const kh=e=>(e=>e instanceof MouseEvent)(e)?e.clientX:e.touches[0].clientX,xh=e=>{let{dragSpeed:t=.85,setPanning:n,setPlotScale:a}=e;const i=(0,r.useRef)({leftStart:0,xUnitsPerPx:0,scXMin:0,scXMax:0}),o=e=>{e.preventDefault();const n=kh(e),{leftStart:r,xUnitsPerPx:o,scXMin:l,scXMax:s}=i.current,c=o*((n-r)*t);a({min:l-c,max:s-c})},l=()=>{n(!1),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",l),document.removeEventListener("touchmove",o),document.removeEventListener("touchend",l)};return e=>{let{e:t,u:r}=e;t.preventDefault(),n(!0),i.current={leftStart:kh(t),xUnitsPerPx:r.posToVal(1,"x")-r.posToVal(0,"x"),scXMin:r.scales.x.min||0,scXMax:r.scales.x.max||0},document.addEventListener("mousemove",o),document.addEventListener("mouseup",l),document.addEventListener("touchmove",o),document.addEventListener("touchend",l)}},Sh=e=>{const[t,n]=(0,r.useState)(!1),a=xh({dragSpeed:.9,setPanning:n,setPlotScale:e});return{onReadyChart:t=>{const n=e=>{const n=e instanceof MouseEvent&&(e=>{const{ctrlKey:t,metaKey:n,button:r}=e;return 0===r&&(t||n)})(e),r=window.TouchEvent&&e instanceof TouchEvent&&e.touches.length>1;(n||r)&&a({u:t,e:e})};t.over.addEventListener("mousedown",n),t.over.addEventListener("touchstart",n),t.over.addEventListener("wheel",(n=>{if(!n.ctrlKey&&!n.metaKey)return;n.preventDefault();const{width:r}=t.over.getBoundingClientRect(),a=t.cursor.left&&t.cursor.left>0?t.cursor.left:0,i=t.posToVal(a,"x"),o=(t.scales.x.max||0)-(t.scales.x.min||0),l=n.deltaY<0?.9*o:o/.9,s=i-a/r*l,c=s+l;t.batch((()=>e({min:s,max:c})))}))},isPanning:t}},Ch=e=>{const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)},Eh=e=>{let{uPlotInst:t,xRange:n,setPlotScale:a}=e;const[i,o]=(0,r.useState)(0),l=(0,r.useCallback)((e=>{const{target:r,ctrlKey:i,metaKey:o,key:l}=e,s=r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement;if(!t||s)return;const c="+"===l||"="===l;if(("-"===l||c)&&!(i||o)){e.preventDefault();const t=(n.max-n.min)/10*(c?1:-1);a({min:n.min+t,max:n.max-t})}}),[t,n]),s=(0,r.useCallback)((e=>{if(!t||2!==e.touches.length)return;e.preventDefault();const r=Ch(e.touches),o=i-r,l=t.scales.x.max||n.max,s=t.scales.x.min||n.min,c=(l-s)/50*(o>0?-1:1);t.batch((()=>a({min:s+c,max:l-c})))}),[t,i,n]);return Mr("keydown",l),Mr("touchmove",s),Mr("touchstart",(e=>{2===e.touches.length&&(e.preventDefault(),o(Ch(e.touches)))})),null},Nh=e=>{let{period:t,setPeriod:n}=e;const[a,o]=(0,r.useState)({min:t.start,max:t.end});return(0,r.useEffect)((()=>{o({min:t.start,max:t.end})}),[t]),{xRange:a,setPlotScale:e=>{let{min:t,max:r}=e;const a=1e3*(r-t);ajt||n({from:i()(1e3*t).toDate(),to:i()(1e3*r).toDate()})}}},Ah=e=>{let{u:t,metrics:n,series:a,unit:o,isAnomalyView:l}=e;const[s,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)({seriesIdx:-1,dataIdx:-1}),[h,m]=(0,r.useState)([]),p=(0,r.useCallback)((()=>{const{seriesIdx:e,dataIdx:r}=u,s=n[e-1],c=a[e],d=new Set(n.map((e=>e.group))),h=(null===s||void 0===s?void 0:s.group)||0,m=ot()(t,["data",e,r],0),p=ot()(t,["scales","1","min"],0),f=ot()(t,["scales","1","max"],1),v=ot()(t,["data",0,r],0),g={top:t?t.valToPos(m||0,(null===c||void 0===c?void 0:c.scale)||"1"):0,left:t?t.valToPos(v,"x"):0};return{unit:o,point:g,u:t,id:`${e}_${r}`,title:d.size>1&&!l?`Query ${h}`:"",dates:[v?i()(1e3*v).tz().format(It):"-"],value:Bd(m,p,f),info:qd(s),statsFormatted:null===c||void 0===c?void 0:c.statsFormatted,marker:`${null===c||void 0===c?void 0:c.stroke}`}}),[t,u,n,a,o,l]),f=(0,r.useCallback)((()=>{if(!s)return;const e=p();h.find((t=>t.id===e.id))||m((t=>[...t,e]))}),[p,h,s]);return(0,r.useEffect)((()=>{c(-1!==u.dataIdx&&-1!==u.seriesIdx)}),[u]),Mr("click",f),{showTooltip:s,stickyTooltips:h,handleUnStick:e=>{m((t=>t.filter((t=>t.id!==e))))},getTooltipProps:p,seriesFocus:(e,t)=>{const n=null!==t&&void 0!==t?t:-1;d((e=>({...e,seriesIdx:n})))},setCursor:e=>{var t;const n=null!==(t=e.cursor.idx)&&void 0!==t?t:-1;d((e=>({...e,dataIdx:n})))},resetTooltips:()=>{m([]),d({seriesIdx:-1,dataIdx:-1})}}},Mh=e=>{let{u:t,id:n,title:a,dates:i,value:o,point:l,unit:s="",info:c,statsFormatted:u,isSticky:d,marker:h,onClose:m}=e;const p=(0,r.useRef)(null),[f,v]=(0,r.useState)({top:-999,left:-999}),[g,y]=(0,r.useState)(!1),[_,b]=(0,r.useState)(!1),w=(0,r.useCallback)((e=>{if(!g)return;const{clientX:t,clientY:n}=e;v({top:n,left:t})}),[g]);return(0,r.useEffect)((()=>{if(!p.current||!t)return;const{top:e,left:n}=l,r=parseFloat(t.over.style.left),a=parseFloat(t.over.style.top),{width:i,height:o}=t.over.getBoundingClientRect(),{width:s,height:c}=p.current.getBoundingClientRect(),u={top:e+a+10-(e+c>=o?c+20:0),left:n+r+10-(n+s>=i?s+20:0)};u.left<0&&(u.left=20),u.top<0&&(u.top=20),v(u)}),[t,o,l,p]),Mr("mousemove",w),Mr("mouseup",(()=>{y(!1)})),t?r.default.createPortal(Nt("div",{className:Er()({"vm-chart-tooltip":!0,"vm-chart-tooltip_sticky":d,"vm-chart-tooltip_moved":_}),ref:p,style:f,children:[Nt("div",{className:"vm-chart-tooltip-header",children:[a&&Nt("div",{className:"vm-chart-tooltip-header__title",children:a}),Nt("div",{className:"vm-chart-tooltip-header__date",children:i.map(((e,t)=>Nt("span",{children:e},t)))}),d&&Nt(Ct.FK,{children:[Nt(da,{className:"vm-chart-tooltip-header__drag",variant:"text",size:"small",startIcon:Nt(ar,{}),onMouseDown:e=>{b(!0),y(!0);const{clientX:t,clientY:n}=e;v({top:n,left:t})},ariaLabel:"drag the tooltip"}),Nt(da,{className:"vm-chart-tooltip-header__close",variant:"text",size:"small",startIcon:Nt(Ln,{}),onClick:()=>{m&&m(n)},ariaLabel:"close the tooltip"})]})]}),Nt("div",{className:"vm-chart-tooltip-data",children:[h&&Nt("span",{className:"vm-chart-tooltip-data__marker",style:{background:h}}),Nt("p",{className:"vm-chart-tooltip-data__value",children:[Nt("b",{children:o}),s]})]}),u&&Nt("table",{className:"vm-chart-tooltip-stats",children:ct.map(((e,t)=>Nt("div",{className:"vm-chart-tooltip-stats-row",children:[Nt("span",{className:"vm-chart-tooltip-stats-row__key",children:[e,":"]}),Nt("span",{className:"vm-chart-tooltip-stats-row__value",children:u[e]})]},t)))}),c&&Nt("p",{className:"vm-chart-tooltip__info",children:c})]}),t.root):null},Th=e=>{let{showTooltip:t,tooltipProps:n,stickyTooltips:a,handleUnStick:i}=e;return Nt(Ct.FK,{children:[t&&n&&Nt(Mh,{...n}),a.map((e=>(0,r.createElement)(Mh,{...e,isSticky:!0,key:e.id,onClose:i})))]})},$h=e=>{let{data:t,series:n,metrics:a=[],period:i,yaxis:o,unit:l,setPeriod:s,layoutSize:c,height:u,isAnomalyView:d,spanGaps:h=!1}=e;const{isDarkTheme:m}=Mt(),p=(0,r.useRef)(null),[f,v]=(0,r.useState)(),{xRange:g,setPlotScale:y}=Nh({period:i,setPeriod:s}),{onReadyChart:_,isPanning:b}=Sh(y);Eh({uPlotInst:f,xRange:g,setPlotScale:y});const{showTooltip:w,stickyTooltips:k,handleUnStick:x,getTooltipProps:S,seriesFocus:C,setCursor:E,resetTooltips:N}=Ah({u:f,metrics:a,series:n,unit:l,isAnomalyView:d}),A={...fh({width:c.width,height:u}),series:n,axes:Wd([{},{scale:"1"}],l),scales:_h(o,g),hooks:{ready:[_],setSeries:[C],setCursor:[E],setSelect:[bh(y)],destroy:[vh]},bands:[]};return(0,r.useEffect)((()=>{if(N(),!p.current)return;f&&f.destroy();const e=new Fd(A,t,p.current);return v(e),e.destroy}),[p,m]),(0,r.useEffect)((()=>{f&&(f.setData(t),f.redraw())}),[t]),(0,r.useEffect)((()=>{f&&(uh(f),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(((t,r)=>{t.label&&(t.spanGaps=n),r&&e.addSeries(t)}))}(f,n,h),((e,t)=>{if(e.delBand(),t.length<2)return;const n=t.map(((e,t)=>({...e,index:t}))),r=n.filter((e=>e.forecast===ht.yhatUpper)),a=n.filter((e=>e.forecast===ht.yhatLower)),i=r.map((e=>{const t=a.find((t=>t.forecastGroup===e.forecastGroup));return t?{series:[e.index,t.index],fill:wh(ht.yhatUpper)}:null})).filter((e=>null!==e));i.length&&i.forEach((t=>{e.addBand(t)}))})(f,n),f.redraw())}),[n,h]),(0,r.useEffect)((()=>{f&&(Object.keys(o.limits.range).forEach((e=>{f.scales[e]&&(f.scales[e].range=function(t){return yh(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,e,o)})})),f.redraw())}),[o]),(0,r.useEffect)((()=>{f&&(f.scales.x.range=()=>gh(g),f.redraw())}),[g]),(0,r.useEffect)((()=>{f&&(f.setSize({width:c.width||400,height:u||500}),f.redraw())}),[u,c]),Nt("div",{className:Er()({"vm-line-chart":!0,"vm-line-chart_panning":b}),style:{minWidth:`${c.width||400}px`,minHeight:`${u||500}px`},children:[Nt("div",{className:"vm-line-chart__u-plot",ref:p}),Nt(Th,{showTooltip:w,tooltipProps:S(),stickyTooltips:k,handleUnStick:x})]})},Lh=e=>{let{legend:t,onChange:n,isHeatmap:a,isAnomalyView:i}=e;const o=fl(),l=(0,r.useMemo)((()=>{const e=(e=>{const t=Object.keys(e.freeFormFields).filter((e=>"__name__"!==e));return t.map((t=>{const n=`${t}=${JSON.stringify(e.freeFormFields[t])}`;return{id:`${e.label}.${n}`,freeField:n,key:t}}))})(t);return a?e.filter((e=>"vmrange"!==e.key)):e}),[t,a]),s=t.statsFormatted,c=Object.values(s).some((e=>e)),u=e=>t=>{t.stopPropagation(),(async e=>{await o(e,`${e} has been copied`)})(e)};return Nt("div",{className:Er()({"vm-legend-item":!0,"vm-legend-row":!0,"vm-legend-item_hide":!t.checked&&!a,"vm-legend-item_static":a}),onClick:(e=>t=>{n&&n(e,t.ctrlKey||t.metaKey)})(t),children:[!i&&!a&&Nt("div",{className:"vm-legend-item__marker",style:{backgroundColor:t.color}}),Nt("div",{className:"vm-legend-item-info",children:Nt("span",{className:"vm-legend-item-info__label",children:[t.freeFormFields.__name__,!!l.length&&Nt(Ct.FK,{children:"{"}),l.map(((e,t)=>Nt("span",{className:"vm-legend-item-info__free-fields",onClick:u(e.freeField),title:"copy to clipboard",children:[e.freeField,t+1Nt("div",{className:"vm-legend-item-stats-row",children:[Nt("span",{className:"vm-legend-item-stats-row__key",children:[e,":"]}),Nt("span",{className:"vm-legend-item-stats-row__value",children:s[e]})]},t)))})]})},Ph=e=>{let{labels:t,query:n,isAnomalyView:a,onChange:i}=e;const o=(0,r.useMemo)((()=>Array.from(new Set(t.map((e=>e.group))))),[t]),l=o.length>1;return Nt(Ct.FK,{children:Nt("div",{className:"vm-legend",children:o.map((e=>Nt("div",{className:"vm-legend-group",children:Nt(ki,{defaultExpanded:!0,title:Nt("div",{className:"vm-legend-group-title",children:[l&&Nt("span",{className:"vm-legend-group-title__count",children:["Query ",e,": "]}),Nt("span",{className:"vm-legend-group-title__query",children:n[e-1]})]}),children:Nt("div",{children:t.filter((t=>t.group===e)).sort(((e,t)=>(t.median||0)-(e.median||0))).map((e=>Nt(Lh,{legend:e,isAnomalyView:a,onChange:i},e.label)))})})},e)))})})},Ih=e=>{var t;let{min:n,max:a,legendValue:i,series:o}=e;const[l,s]=(0,r.useState)(0),[c,u]=(0,r.useState)(""),[d,h]=(0,r.useState)(""),[m,p]=(0,r.useState)(""),f=(0,r.useMemo)((()=>parseFloat(String((null===i||void 0===i?void 0:i.value)||0).replace("%",""))),[i]);return(0,r.useEffect)((()=>{s(f?(f-n)/(a-n)*100:0),u(f?`${f}%`:""),h(`${n}%`),p(`${a}%`)}),[f,n,a]),Nt("div",{className:"vm-legend-heatmap__wrapper",children:[Nt("div",{className:"vm-legend-heatmap",children:[Nt("div",{className:"vm-legend-heatmap-gradient",style:{background:`linear-gradient(to right, ${eh.join(", ")})`},children:!!f&&Nt("div",{className:"vm-legend-heatmap-gradient__value",style:{left:`${l}%`},children:Nt("span",{children:c})})}),Nt("div",{className:"vm-legend-heatmap__value",children:d}),Nt("div",{className:"vm-legend-heatmap__value",children:m})]}),o[1]&&Nt(Lh,{legend:o[1],isHeatmap:!0},null===(t=o[1])||void 0===t?void 0:t.label)]})},Oh=e=>{let{u:t,metrics:n,unit:a}=e;const[o,l]=(0,r.useState)({left:0,top:0}),[s,c]=(0,r.useState)([]),u=(0,r.useCallback)((()=>{var e;const{left:r,top:l}=o,s=ot()(t,["data",1,0],[])||[],c=t?t.posToVal(r,"x"):0,u=t?t.posToVal(l,"y"):0,d=s.findIndex(((e,t)=>c>=e&&ce[0]===h))||[],v=s[d],g=i()(1e3*v).tz().format(It),y=i()(1e3*p).tz().format(It),_=(null===m||void 0===m||null===(e=m.metric)||void 0===e?void 0:e.vmrange)||"";return{unit:a,point:o,u:t,id:`${_}_${g}`,dates:[g,y],value:`${f}%`,info:_,show:+f>0}}),[t,o,n,a]),d=(0,r.useCallback)((()=>{const e=u();e.show&&(s.find((t=>t.id===e.id))||c((t=>[...t,e])))}),[u,s]);return Mr("click",d),{stickyTooltips:s,handleUnStick:e=>{c((t=>t.filter((t=>t.id!==e))))},getTooltipProps:u,setCursor:e=>{const t=e.cursor.left||0,n=e.cursor.top||0;l({left:t,top:n})},resetTooltips:()=>{c([]),l({left:0,top:0})}}},Rh=e=>{let{data:t,metrics:n=[],period:a,unit:i,setPeriod:o,layoutSize:l,height:s,onChangeLegend:c}=e;const{isDarkTheme:u}=Mt(),d=(0,r.useRef)(null),[h,m]=(0,r.useState)(),{xRange:p,setPlotScale:f}=Nh({period:a,setPeriod:o}),{onReadyChart:v,isPanning:g}=Sh(f);Eh({uPlotInst:h,xRange:p,setPlotScale:f});const{stickyTooltips:y,handleUnStick:_,getTooltipProps:b,setCursor:w,resetTooltips:k}=Oh({u:h,metrics:n,unit:i}),x=(0,r.useMemo)((()=>b()),[b]),S={...fh({width:l.width,height:s}),mode:2,series:[{},{paths:th(),facets:[{scale:"x",auto:!0,sorted:1},{scale:"y",auto:!0}]}],axes:(()=>{const e=Wd([{}],i);return[...e,{scale:"y",stroke:e[0].stroke,font:e[0].font,size:Qd,splits:n.map(((e,t)=>t)),values:n.map((e=>e.metric.vmrange))}]})(),scales:{x:{time:!0},y:{log:2,time:!1,range:(e,t,n)=>[t-1,n+1]}},hooks:{ready:[v],setCursor:[w],setSelect:[bh(f)],destroy:[vh]}};return(0,r.useEffect)((()=>{k();const e=null===t[0]&&Array.isArray(t[1]);if(!d.current||!e)return;const n=new Fd(S,t,d.current);return m(n),n.destroy}),[d,t,u]),(0,r.useEffect)((()=>{h&&(h.setSize({width:l.width||400,height:s||500}),h.redraw())}),[s,l]),(0,r.useEffect)((()=>{c(x)}),[x]),Nt("div",{className:Er()({"vm-line-chart":!0,"vm-line-chart_panning":g}),style:{minWidth:`${l.width||400}px`,minHeight:`${s||500}px`},children:[Nt("div",{className:"vm-line-chart__u-plot",ref:d}),Nt(Th,{showTooltip:!!x.show,tooltipProps:x,stickyTooltips:y,handleUnStick:_})]})},Dh=()=>{const[e,t]=(0,r.useState)(null),[n,a]=(0,r.useState)({width:0,height:0}),i=(0,r.useCallback)((()=>{a({width:(null===e||void 0===e?void 0:e.offsetWidth)||0,height:(null===e||void 0===e?void 0:e.offsetHeight)||0})}),[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]);return Mr("resize",i),(0,r.useEffect)(i,[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]),[t,n]},zh={[ht.yhat]:"yhat",[ht.yhatLower]:"yhat_upper - yhat_lower",[ht.yhatUpper]:"yhat_upper - yhat_lower",[ht.anomaly]:"anomalies",[ht.training]:"training data",[ht.actual]:"y"},Fh=e=>{let{series:t}=e;const n=(0,r.useMemo)((()=>{const e=t.reduce(((e,t)=>{const n=Object.prototype.hasOwnProperty.call(t,"forecast"),r=t.forecast!==ht.yhatUpper,a=!e.find((e=>e.forecast===t.forecast));return n&&a&&r&&e.push(t),e}),[]),n={...e[0],forecast:ht.training,color:Jd[ht.training]};return e.splice(1,0,n),e.map((e=>({...e,color:"string"===typeof e.stroke?e.stroke:Jd[e.forecast||ht.actual]})))}),[t]);return Nt(Ct.FK,{children:Nt("div",{className:"vm-legend-anomaly",children:n.filter((e=>e.forecast!==ht.training)).map(((e,t)=>{var n;return Nt("div",{className:"vm-legend-anomaly-item",children:[Nt("svg",{children:e.forecast===ht.anomaly?Nt("circle",{cx:"15",cy:"7",r:"4",fill:e.color,stroke:e.color,strokeWidth:"1.4"}):Nt("line",{x1:"0",y1:"7",x2:"30",y2:"7",stroke:e.color,strokeWidth:e.width||1,strokeDasharray:null===(n=e.dash)||void 0===n?void 0:n.join(",")})}),Nt("div",{className:"vm-legend-anomaly-item__title",children:zh[e.forecast||ht.actual]})]},`${t}_${e.forecast}`)}))})})},jh=e=>{let{data:t=[],period:n,customStep:a,query:i,yaxis:o,unit:l,showLegend:s=!0,setYaxisLimits:c,setPeriod:u,alias:d=[],fullWidth:h=!0,height:m,isHistogram:p,isAnomalyView:f,spanGaps:v}=e;const{isMobile:g}=ta(),{timezone:y}=fn(),_=(0,r.useMemo)((()=>a||n.step||"1s"),[n.step,a]),b=(0,r.useMemo)((()=>ah(t,p)),[p,t]),[w,k]=(0,r.useState)([[]]),[x,S]=(0,r.useState)([]),[C,E]=(0,r.useState)([]),[N,A]=(0,r.useState)([]),[M,T]=(0,r.useState)(null),$=(0,r.useMemo)((()=>oh(b,N,d,f)),[b,N,d,f]),L=e=>{const t=((e,t)=>{const n={},r=Object.values(e).flat(),a=Hd(r)||0,i=jd(r)||1;return n[1]=t?Kd(a,i):[a,i],n})(e,!p);c(t)},P=e=>{if(!f)return e;const t=function(e,t){const n=e.reduce(((e,n)=>{const r=t.map((e=>`${e}: ${n[e]||"-"}`)).join("|");return(e[r]=e[r]||[]).push(n),e}),{});return Object.entries(n).map((e=>{let[t,n]=e;return{keys:t.split("|"),values:n}}))}(e,["group","label"]);return t.map((e=>{const t=e.values[0];return{...t,freeFormFields:{...t.freeFormFields,__name__:""}}}))};(0,r.useEffect)((()=>{const e=[],t={},r=[],a=[{}];null===b||void 0===b||b.forEach(((n,i)=>{const o=$(n,i);a.push(o),r.push(sh(o,n.group));const l=t[n.group]||[];for(const t of n.values)e.push(t[0]),l.push(Nl(t[1]));t[n.group]=l}));const i=((e,t,n)=>{const r=Qt(t)||1,a=Array.from(new Set(e)).sort(((e,t)=>e-t));let i=n.start;const o=qt(n.end+r);let l=0;const s=[];for(;i<=o;){for(;l=a.length||a[l]>i)&&s.push(i)}for(;s.length<2;)s.push(i),i=qt(i+r);return s})(e,_,n),o=b.map((e=>{const t=[],n=e.values,r=n.length;let a=0;for(const u of i){for(;anull!==e)),l=Math.abs((e=>{let t=e[0],n=1;for(let r=1;r1e10*c&&!f?t.map((()=>l)):t}));o.unshift(i),L(t);const l=p?(e=>{const t=e.slice(1,e.length),n=[],r=[];t.forEach(((e,n)=>{e.forEach(((e,a)=>{const i=a*t.length+n;r[i]=e}))})),e[0].forEach((e=>{const r=new Array(t.length).fill(e);n.push(...r)}));const a=new Array(n.length).fill(0).map(((e,n)=>n%t.length));return[null,[n,a,r]]})(o):o;k(l),S(a);const s=P(r);E(s),f&&A(s.map((e=>e.label||"")).slice(1))}),[b,y,p]),(0,r.useEffect)((()=>{const e=[],t=[{}];null===b||void 0===b||b.forEach(((n,r)=>{const a=$(n,r);t.push(a),e.push(sh(a,n.group))})),S(t),E(P(e))}),[N]);const[I,O]=Dh();return Nt("div",{className:Er()({"vm-graph-view":!0,"vm-graph-view_full-width":h,"vm-graph-view_full-width_mobile":h&&g}),ref:I,children:[!p&&Nt($h,{data:w,series:x,metrics:b,period:n,yaxis:o,unit:l,setPeriod:u,layoutSize:O,height:m,isAnomalyView:f,spanGaps:v}),p&&Nt(Rh,{data:w,metrics:b,period:n,unit:l,setPeriod:u,layoutSize:O,height:m,onChangeLegend:T}),f&&s&&Nt(Fh,{series:x}),!p&&s&&Nt(Ph,{labels:C,query:i,isAnomalyView:f,onChange:(e,t)=>{A((e=>{let{hideSeries:t,legend:n,metaKey:r,series:a,isAnomalyView:i}=e;const{label:o}=n,l=ch(o,t),s=a.map((e=>e.label||""));return i?s.filter((e=>e!==o)):r?l?t.filter((e=>e!==o)):[...t,o]:t.length?l?[...s.filter((e=>e!==o))]:[]:[...s.filter((e=>e!==o))]})({hideSeries:N,legend:e,metaKey:t,series:x,isAnomalyView:f}))}}),p&&s&&Nt(Ih,{series:x,min:o.limits.range[1][0]||0,max:o.limits.range[1][1]||0,legendValue:M})]})},Hh=e=>{let{yaxis:t,setYaxisLimits:n,toggleEnableLimits:a}=e;const{isMobile:i}=ta(),o=(0,r.useMemo)((()=>Object.keys(t.limits.range)),[t.limits.range]),l=(0,r.useCallback)(qi()(((e,r,a)=>{const i=t.limits.range;i[r][a]=+e,i[r][0]===i[r][1]||i[r][0]>i[r][1]||n(i)}),500),[t.limits.range]),s=(e,t)=>n=>{l(n,e,t)};return Nt("div",{className:Er()({"vm-axes-limits":!0,"vm-axes-limits_mobile":i}),children:[Nt(Ti,{value:t.limits.enable,onChange:a,label:"Fix the limits for y-axis",fullWidth:i}),Nt("div",{className:"vm-axes-limits-list",children:o.map((e=>Nt("div",{className:"vm-axes-limits-list__inputs",children:[Nt(Ka,{label:`Min ${e}`,type:"number",disabled:!t.limits.enable,value:t.limits.range[e][0],onChange:s(e,0)}),Nt(Ka,{label:`Max ${e}`,type:"number",disabled:!t.limits.enable,value:t.limits.range[e][1],onChange:s(e,1)})]},e)))})]})},Vh=e=>{let{spanGaps:t,onChange:n}=e;const{isMobile:r}=ta();return Nt("div",{children:Nt(Ti,{value:t,onChange:n,label:"Connect null values",fullWidth:r})})},Uh="Graph settings",Bh=e=>{let{yaxis:t,setYaxisLimits:n,toggleEnableLimits:a,spanGaps:i}=e;const o=(0,r.useRef)(null),l=(0,r.useRef)(null),{value:s,toggle:c,setFalse:u}=ma(!1);return Nt("div",{className:"vm-graph-settings",children:[Nt(ba,{title:Uh,children:Nt("div",{ref:l,children:Nt(da,{variant:"text",startIcon:Nt($n,{}),onClick:c,ariaLabel:"settings"})})}),Nt(ha,{open:s,buttonRef:l,placement:"bottom-right",onClose:u,title:Uh,children:Nt("div",{className:"vm-graph-settings-popper",ref:o,children:Nt("div",{className:"vm-graph-settings-popper__body",children:[Nt(Hh,{yaxis:t,setYaxisLimits:n,toggleEnableLimits:a}),Nt(Vh,{spanGaps:i.value,onChange:i.onChange})]})})})]})},qh=e=>{let{isHistogram:t,graphData:n,controlsRef:a,isAnomalyView:i}=e;const{isMobile:o}=ta(),{customStep:l,yaxis:s,spanGaps:c}=Br(),{period:u}=fn(),{query:d}=Cn(),h=vn(),m=qr(),p=e=>{m({type:"SET_YAXIS_LIMITS",payload:e})},f=Nt("div",{className:"vm-custom-panel-body-header__graph-controls",children:[Nt(Ca,{}),Nt(Bh,{yaxis:s,setYaxisLimits:p,toggleEnableLimits:()=>{m({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})},spanGaps:{value:c,onChange:e=>{m({type:"SET_SPAN_GAPS",payload:e})}}})]});return Nt(Ct.FK,{children:[a.current&&(0,r.createPortal)(f,a.current),Nt(jh,{data:n,period:u,customStep:l,query:d,yaxis:s,setYaxisLimits:p,setPeriod:e=>{let{from:t,to:n}=e;h({type:"SET_PERIOD",payload:{from:t,to:n}})},height:o?.5*window.innerHeight:500,isHistogram:t,isAnomalyView:i,spanGaps:c})]})},Yh=e=>{let{data:t}=e;const n=fl(),a=(0,r.useMemo)((()=>`[\n${t.map((e=>1===Object.keys(e).length?JSON.stringify(e):JSON.stringify(e,null,2))).join(",\n").replace(/^/gm," ")}\n]`),[t]);return Nt("div",{className:"vm-json-view",children:[Nt("div",{className:"vm-json-view__copy",children:Nt(da,{variant:"outlined",onClick:async()=>{await n(a,"Formatted JSON has been copied")},children:"Copy JSON"})}),Nt("pre",{className:"vm-json-view__code",children:Nt("code",{children:a})})]})},Wh=e=>{const t={};return e.forEach((e=>Object.entries(e.metric).forEach((e=>t[e[0]]?t[e[0]].options.add(e[1]):t[e[0]]={options:new Set([e[1]])})))),Object.entries(t).map((e=>({key:e[0],variations:e[1].options.size}))).sort(((e,t)=>e.variations-t.variations))},Kh=(e,t)=>(0,r.useMemo)((()=>{if(!t)return[];return Wh(e).filter((e=>t.includes(e.key)))}),[e,t]),Qh=e=>{let{data:t,displayColumns:n}=e;const a=fl(),{isMobile:i}=ta(),{tableCompact:o}=Fr(),l=(0,r.useRef)(null),[s,c]=(0,r.useState)(""),[u,d]=(0,r.useState)("asc"),h=o?Kh([{group:0,metric:{Data:"Data"}}],["Data"]):Kh(t,n),m=e=>{const{__name__:t,...n}=e;return t||Object.keys(n).length?t?`${t} ${JSON.stringify(n)}`:`${JSON.stringify(n)}`:""},p=new Set(null===t||void 0===t?void 0:t.map((e=>e.group))).size>1,f=(0,r.useMemo)((()=>{const e=null===t||void 0===t?void 0:t.map((e=>({metadata:h.map((t=>o?El(e,"",p):e.metric[t.key]||"-")),value:e.value?e.value[1]:"-",values:e.values?e.values.map((e=>{let[t,n]=e;return`${n} @${t}`})):[],copyValue:m(e.metric)}))),n="Value"===s,r=h.findIndex((e=>e.key===s));return n||-1!==r?e.sort(((e,t)=>{const a=n?Number(e.value):e.metadata[r],i=n?Number(t.value):t.metadata[r];return("asc"===u?ai)?-1:1})):e}),[h,t,s,u,o]),v=(0,r.useMemo)((()=>f.some((e=>e.copyValue))),[f]),g=e=>()=>{(e=>{d((t=>"asc"===t&&s===e?"desc":"asc")),c(e)})(e)};return f.length?Nt("div",{className:Er()({"vm-table-view":!0,"vm-table-view_mobile":i}),children:Nt("table",{className:"vm-table",ref:l,children:[Nt("thead",{className:"vm-table-header",children:Nt("tr",{className:"vm-table__row vm-table__row_header",children:[h.map(((e,t)=>Nt("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:g(e.key),children:Nt("div",{className:"vm-table-cell__content",children:[e.key,Nt("div",{className:Er()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":s===e.key,"vm-table__sort-icon_desc":"desc"===u&&s===e.key}),children:Nt(jn,{})})]})},t))),Nt("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_right vm-table-cell_sort",onClick:g("Value"),children:Nt("div",{className:"vm-table-cell__content",children:[Nt("div",{className:Er()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":"Value"===s,"vm-table__sort-icon_desc":"desc"===u}),children:Nt(jn,{})}),"Value"]})}),v&&Nt("td",{className:"vm-table-cell vm-table-cell_header"})]})}),Nt("tbody",{className:"vm-table-body",children:f.map(((e,t)=>{return Nt("tr",{className:"vm-table__row",children:[e.metadata.map(((e,n)=>Nt("td",{className:Er()({"vm-table-cell vm-table-cell_no-wrap":!0,"vm-table-cell_gray":f[t-1]&&f[t-1].metadata[n]===e}),children:e},n))),Nt("td",{className:"vm-table-cell vm-table-cell_right vm-table-cell_no-wrap",children:e.values.length?e.values.map((e=>Nt("p",{children:e},e))):e.value}),v&&Nt("td",{className:"vm-table-cell vm-table-cell_right",children:e.copyValue&&Nt("div",{className:"vm-table-cell__content",children:Nt(ba,{title:"Copy row",children:Nt(da,{variant:"text",color:"gray",size:"small",startIcon:Nt(rr,{}),onClick:(n=e.copyValue,async()=>{await a(n,"Row has been copied")}),ariaLabel:"copy row"})})})})]},t);var n}))})]})}):Nt(ra,{variant:"warning",children:"No data to show"})},Zh=e=>{let{checked:t=!1,disabled:n=!1,label:r,color:a="secondary",onChange:i}=e;return Nt("div",{className:Er()({"vm-checkbox":!0,"vm-checkbox_disabled":n,"vm-checkbox_active":t,[`vm-checkbox_${a}_active`]:t,[`vm-checkbox_${a}`]:a}),onClick:()=>{n||i(!t)},children:[Nt("div",{className:"vm-checkbox-track",children:Nt("div",{className:"vm-checkbox-track__thumb",children:Nt(Xn,{})})}),r&&Nt("span",{className:"vm-checkbox__label",children:r})]})},Gh="Table settings",Jh=e=>{let{columns:t,selectedColumns:n=[],tableCompact:a,onChangeColumns:i,toggleTableCompact:o}=e;const l=(0,r.useRef)(null),{value:s,toggle:c,setFalse:u}=ma(!1),{value:d,toggle:h}=ma(Boolean(et("TABLE_COLUMNS"))),[m,p]=(0,r.useState)(""),[f,v]=(0,r.useState)(-1),g=(0,r.useMemo)((()=>n.filter((e=>!t.includes(e)))),[t,n]),y=(0,r.useMemo)((()=>{const e=g.concat(t);return m?e.filter((e=>e.includes(m))):e}),[t,g,m]),_=(0,r.useMemo)((()=>y.every((e=>n.includes(e)))),[n,y]),b=e=>{i(n.includes(e)?n.filter((t=>t!==e)):[...n,e])};return(0,r.useEffect)((()=>{pl(t,n)||d||i(t)}),[t]),(0,r.useEffect)((()=>{d?n.length&&Xe("TABLE_COLUMNS",n.join(",")):tt(["TABLE_COLUMNS"])}),[d,n]),(0,r.useEffect)((()=>{const e=et("TABLE_COLUMNS");e&&i(e.split(","))}),[]),Nt("div",{className:"vm-table-settings",children:[Nt(ba,{title:Gh,children:Nt("div",{ref:l,children:Nt(da,{variant:"text",startIcon:Nt($n,{}),onClick:c,ariaLabel:Gh})})}),s&&Nt(_a,{title:Gh,className:"vm-table-settings-modal",onClose:u,children:[Nt("div",{className:"vm-table-settings-modal-section",children:[Nt("div",{className:"vm-table-settings-modal-section__title",children:"Customize columns"}),Nt("div",{className:"vm-table-settings-modal-columns",children:[Nt("div",{className:"vm-table-settings-modal-columns__search",children:Nt(Ka,{placeholder:"Search columns",startIcon:Nt(xr,{}),value:m,onChange:p,onBlur:()=>{v(-1)},onKeyDown:e=>{const t="ArrowUp"===e.key,n="ArrowDown"===e.key,r="Enter"===e.key;(n||t||r)&&e.preventDefault(),n?v((e=>e+1>y.length-1?e:e+1)):t?v((e=>e-1<0?e:e-1)):r&&b(y[f])},type:"search"})}),Nt("div",{className:"vm-table-settings-modal-columns-list",children:[!!y.length&&Nt("div",{className:"vm-table-settings-modal-columns-list__item vm-table-settings-modal-columns-list__item_all",children:Nt(Zh,{checked:_,onChange:()=>{i(_?n.filter((e=>!y.includes(e))):y)},label:_?"Uncheck all":"Check all",disabled:a})}),!y.length&&Nt("div",{className:"vm-table-settings-modal-columns-no-found",children:Nt("p",{className:"vm-table-settings-modal-columns-no-found__info",children:"No columns found."})}),y.map(((e,t)=>{return Nt("div",{className:Er()({"vm-table-settings-modal-columns-list__item":!0,"vm-table-settings-modal-columns-list__item_focus":t===f,"vm-table-settings-modal-columns-list__item_custom":g.includes(e)}),children:Nt(Zh,{checked:n.includes(e),onChange:(r=e,()=>{b(r)}),label:e,disabled:a})},e);var r}))]}),Nt("div",{className:"vm-table-settings-modal-preserve",children:[Nt(Zh,{checked:d,onChange:h,label:"Preserve column settings",disabled:a,color:"primary"}),Nt("p",{className:"vm-table-settings-modal-preserve__info",children:"This label indicates that when the checkbox is activated, the current column configurations will not be reset."})]})]})]}),Nt("div",{className:"vm-table-settings-modal-section",children:[Nt("div",{className:"vm-table-settings-modal-section__title",children:"Table view"}),Nt("div",{className:"vm-table-settings-modal-columns-list__item",children:Nt(Ti,{label:"Compact view",value:a,onChange:o})})]})]})]})},Xh=e=>{let{liveData:t,controlsRef:n}=e;const{tableCompact:a}=Fr(),i=jr(),[o,l]=(0,r.useState)(),s=(0,r.useMemo)((()=>Wh(t||[]).map((e=>e.key))),[t]),c=Nt(Jh,{columns:s,selectedColumns:o,onChangeColumns:l,tableCompact:a,toggleTableCompact:()=>{i({type:"TOGGLE_TABLE_COMPACT"})}});return Nt(Ct.FK,{children:[n.current&&(0,r.createPortal)(c,n.current),Nt(Qh,{data:t,displayColumns:o})]})},em=e=>{let{graphData:t,liveData:n,isHistogram:r,displayType:a,controlsRef:i}=e;return a===mt.code&&n?Nt(Yh,{data:n}):a===mt.table&&n?Nt(Xh,{liveData:n,controlsRef:i}):a===mt.chart&&t?Nt(qh,{graphData:t,isHistogram:r,controlsRef:i}):null},tm=[Nt(Ct.FK,{children:[Nt("p",{children:"Filename - specify the name for your report file."}),Nt("p",{children:["Default format: ",Nt("code",{children:["vmui_report_$",Rt,".json"]}),"."]}),Nt("p",{children:"This name will be used when saving your report on your device."})]}),Nt(Ct.FK,{children:[Nt("p",{children:"Comment (optional) - add a comment to your report."}),Nt("p",{children:"This can be any additional information that will be useful when reviewing the report later."})]}),Nt(Ct.FK,{children:[Nt("p",{children:"Query trace - enable this option to include a query trace in your report."}),Nt("p",{children:"This will assist in analyzing and diagnosing the query processing."})]}),Nt(Ct.FK,{children:[Nt("p",{children:"Generate Report - click this button to generate and save your report. "}),Nt("p",{children:["After creation, the report can be downloaded and examined on the ",Nt(Oe,{to:We.queryAnalyzer,target:"_blank",rel:"noreferrer",className:"vm-link vm-link_underlined",children:Ye[We.queryAnalyzer].title})," page."]})]})],nm=()=>`vmui_report_${i()().utc().format(Rt)}`,rm=e=>{let{fetchUrl:t}=e;const{query:n}=Cn(),[a,i]=(0,r.useState)(nm()),[o,l]=(0,r.useState)(""),[s,c]=(0,r.useState)(!0),[u,d]=(0,r.useState)(),[h,m]=(0,r.useState)(!1),p=(0,r.useRef)(null),f=(0,r.useRef)(null),v=(0,r.useRef)(null),g=(0,r.useRef)(null),y=[p,f,v,g],[_,b]=(0,r.useState)(0),{value:w,toggle:k,setFalse:x}=ma(!1),{value:S,toggle:C,setFalse:E}=ma(!1),N=(0,r.useMemo)((()=>{if(t)return t.map(((e,t)=>{const n=new URL(e);return s?n.searchParams.set("trace","1"):n.searchParams.delete("trace"),{id:t,url:n}}))}),[t,s]),A=(0,r.useCallback)((e=>{const t=JSON.stringify(e,null,2),n=new Blob([t],{type:"application/json"}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=`${a||nm()}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r),x()}),[a]),M=(0,r.useCallback)((async()=>{if(N){d(""),m(!0);try{const e=[];for await(const{url:t,id:n}of N){const r=await fetch(t),a=await r.json();if(r.ok)a.vmui={id:n,comment:o,params:at().parse(new URL(t).search.replace(/^\?/,""))},e.push(a);else{const e=a.errorType?`${a.errorType}\r\n`:"";d(`${e}${(null===a||void 0===a?void 0:a.error)||(null===a||void 0===a?void 0:a.message)||"unknown error"}`)}}e.length&&A(e)}catch(zp){zp instanceof Error&&"AbortError"!==zp.name&&d(`${zp.name}: ${zp.message}`)}finally{m(!1)}}else d(pt.validQuery)}),[N,o,A,n]),T=e=>()=>{b((t=>t+e))};return(0,r.useEffect)((()=>{d(""),i(nm()),l("")}),[w]),(0,r.useEffect)((()=>{b(0)}),[S]),Nt(Ct.FK,{children:[Nt(ba,{title:"Export query",children:Nt(da,{variant:"text",startIcon:Nt(br,{}),onClick:k,ariaLabel:"export query"})}),w&&Nt(_a,{title:"Export query",onClose:x,isOpen:w,children:Nt("div",{className:"vm-download-report",children:[Nt("div",{className:"vm-download-report-settings",children:[Nt("div",{ref:p,children:Nt(Ka,{label:"Filename",value:a,onChange:i})}),Nt("div",{ref:f,children:Nt(Ka,{type:"textarea",label:"Comment",value:o,onChange:l})}),Nt("div",{ref:v,children:Nt(Zh,{checked:s,onChange:c,label:"Include query trace"})})]}),u&&Nt(ra,{variant:"error",children:u}),Nt("div",{className:"vm-download-report__buttons",children:[Nt(da,{variant:"text",onClick:C,children:"Help"}),Nt("div",{ref:g,children:Nt(da,{onClick:M,disabled:h,children:h?"Loading data...":"Generate Report"})})]}),Nt(ha,{open:S,buttonRef:y[_],placement:"top-left",variant:"dark",onClose:E,children:Nt("div",{className:"vm-download-report-helper",children:[Nt("div",{className:"vm-download-report-helper__description",children:tm[_]}),Nt("div",{className:"vm-download-report-helper__buttons",children:[0!==_&&Nt(da,{onClick:T(-1),size:"small",color:"white",children:"Prev"}),Nt(da,{onClick:_===y.length-1?E:T(1),size:"small",color:"white",variant:"text",children:_===y.length-1?"Close":"Next"})]})]})})]})})]})},am=()=>{Ll();const{isMobile:e}=ta(),{displayType:t}=Fr(),{query:n}=Cn(),{customStep:a}=Br(),i=qr(),[o,l]=(0,r.useState)([]),[s,c]=(0,r.useState)(!n[0]),[u,d]=(0,r.useState)(!1),h=(0,r.useRef)(null),{fetchUrl:m,isLoading:p,liveData:f,graphData:v,error:g,queryErrors:y,setQueryErrors:_,queryStats:b,warning:w,traces:k,isHistogram:x,abortFetch:S}=Tl({visible:!0,customStep:a,hideQuery:o,showAllSeries:u}),C=!(null!==f&&void 0!==f&&f.length)&&t!==mt.chart,E=!s&&g;return(0,r.useEffect)((()=>{i({type:"SET_IS_HISTOGRAM",payload:x})}),[v]),Nt("div",{className:Er()({"vm-custom-panel":!0,"vm-custom-panel_mobile":e}),children:[Nt(xl,{queryErrors:s?[]:y,setQueryErrors:_,setHideError:c,stats:b,isLoading:p,onHideQuery:e=>{l(e)},onRunQuery:()=>{c(!1)},abortFetch:S}),Nt(Vl,{traces:k,displayType:t}),E&&Nt(ra,{variant:"error",children:g}),C&&Nt(ra,{variant:"info",children:Nt(Rl,{})}),w&&Nt(Ul,{warning:w,query:n,onChange:d}),Nt("div",{className:Er()({"vm-custom-panel-body":!0,"vm-custom-panel-body_mobile":e,"vm-block":!0,"vm-block_mobile":e}),children:[p&&Nt($l,{}),Nt("div",{className:"vm-custom-panel-body-header",ref:h,children:[Nt("div",{className:"vm-custom-panel-body-header__tabs",children:Nt(Pr,{})}),(v||f)&&Nt(rm,{fetchUrl:m})]}),Nt(em,{graphData:v,liveData:f,isHistogram:x,displayType:t,controlsRef:h})]})]})},im=e=>{let{title:t,description:n,unit:a,expr:i,showLegend:o,filename:l,alias:s}=e;const{isMobile:c}=ta(),{period:u}=fn(),{customStep:d}=Br(),h=vn(),m=(0,r.useRef)(null),[p,f]=(0,r.useState)(!1),[v,g]=(0,r.useState)(!1),[y,_]=(0,r.useState)({limits:{enable:!1,range:{1:[0,0]}}}),b=(0,r.useMemo)((()=>Array.isArray(i)&&i.every((e=>e))),[i]),{isLoading:w,graphData:k,error:x,warning:S}=Tl({predefinedQuery:b?i:[],display:mt.chart,visible:p,customStep:d}),C=e=>{const t={...y};t.limits.range=e,_(t)};if((0,r.useEffect)((()=>{const e=new IntersectionObserver((e=>{e.forEach((e=>f(e.isIntersecting)))}),{threshold:.1});return m.current&&e.observe(m.current),()=>{m.current&&e.unobserve(m.current)}}),[m]),!b)return Nt(ra,{variant:"error",children:[Nt("code",{children:'"expr"'})," not found. Check the configuration file ",Nt("b",{children:l}),"."]});const E=()=>Nt("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&Nt(Ct.FK,{children:[Nt("div",{children:[Nt("span",{children:"Description:"}),Nt("div",{dangerouslySetInnerHTML:{__html:al(n)}})]}),Nt("hr",{})]}),Nt("div",{children:[Nt("span",{children:"Queries:"}),Nt("div",{children:i.map(((e,t)=>Nt("div",{children:e},`${t}_${e}`)))})]})]});return Nt("div",{className:"vm-predefined-panel",ref:m,children:[Nt("div",{className:"vm-predefined-panel-header",children:[Nt(ba,{title:Nt(E,{}),children:Nt("div",{className:"vm-predefined-panel-header__info",children:Nt(In,{})})}),Nt("h3",{className:"vm-predefined-panel-header__title",children:t||""}),Nt(Bh,{yaxis:y,setYaxisLimits:C,toggleEnableLimits:()=>{const e={...y};e.limits.enable=!e.limits.enable,_(e)},spanGaps:{value:v,onChange:g}})]}),Nt("div",{className:"vm-predefined-panel-body",children:[w&&Nt(wl,{}),x&&Nt(ra,{variant:"error",children:x}),S&&Nt(ra,{variant:"warning",children:S}),k&&Nt(jh,{data:k,period:u,customStep:d,query:i,yaxis:y,unit:a,alias:s,showLegend:o,setYaxisLimits:C,setPeriod:e=>{let{from:t,to:n}=e;h({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1,height:c?.5*window.innerHeight:500,spanGaps:v})]})]})},om=e=>{let{index:t,title:n,panels:a,filename:i}=e;const o=Tr(),l=(0,r.useMemo)((()=>o.width/12),[o]),[s,c]=(0,r.useState)(!t),[u,d]=(0,r.useState)([]);(0,r.useEffect)((()=>{d(a&&a.map((e=>e.width||12)))}),[a]);const[h,m]=(0,r.useState)({start:0,target:0,enable:!1}),p=(0,r.useCallback)((e=>{if(!h.enable)return;const{start:t}=h,n=Math.ceil((t-e.clientX)/l);if(Math.abs(n)>=12)return;const r=u.map(((e,t)=>e-(t===h.target?n:0)));d(r)}),[h,l]),f=(0,r.useCallback)((()=>{m({...h,enable:!1})}),[h]),v=e=>t=>{((e,t)=>{m({start:e.clientX,target:t,enable:!0})})(t,e)};Mr("mousemove",p),Mr("mouseup",f);return Nt("div",{className:"vm-predefined-dashboard",children:Nt(ki,{defaultExpanded:s,onChange:e=>c(e),title:Nt((()=>Nt("div",{className:Er()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":s}),children:[(n||i)&&Nt("span",{className:"vm-predefined-dashboard-header__title",children:n||`${t+1}. ${i}`}),a&&Nt("span",{className:"vm-predefined-dashboard-header__count",children:["(",a.length," panels)"]})]})),{}),children:Nt("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(a)&&a.length?a.map(((e,t)=>Nt("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:`span ${u[t]}`},children:[Nt(im,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:i,showLegend:e.showLegend}),Nt("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:v(t),"aria-label":"resize the panel"})]},t))):Nt("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:Nt(ra,{variant:"error",children:[Nt("code",{children:'"panels"'})," not found. Check the configuration file ",Nt("b",{children:i}),"."]})})})})})};function lm(e){return function(e,t){return Object.fromEntries(Object.entries(e).filter(t))}(e,(e=>!!e[1]||"number"===typeof e[1]))}const sm=()=>{(()=>{const{duration:e,relativeTime:t,period:{date:n}}=fn(),{customStep:a}=Br(),{setSearchParamsFromKeys:i}=hi(),o=()=>{const r=lm({"g0.range_input":e,"g0.end_input":n,"g0.step_input":a,"g0.relative_time":t});i(r)};(0,r.useEffect)(o,[e,t,n,a]),(0,r.useEffect)(o,[])})();const{isMobile:e}=ta(),{dashboardsSettings:t,dashboardsLoading:n,dashboardsError:a}=Qr(),[i,o]=(0,r.useState)(0),l=(0,r.useMemo)((()=>t.map(((e,t)=>({label:e.title||"",value:t})))),[t]),s=(0,r.useMemo)((()=>t[i]||{}),[t,i]),c=(0,r.useMemo)((()=>null===s||void 0===s?void 0:s.rows),[s]),u=(0,r.useMemo)((()=>s.title||s.filename||""),[s]),d=(0,r.useMemo)((()=>Array.isArray(c)&&!!c.length),[c]),h=e=>()=>{(e=>{o(e)})(e)};return Nt("div",{className:"vm-predefined-panels",children:[n&&Nt(wl,{}),!t.length&&a&&Nt(ra,{variant:"error",children:a}),!t.length&&Nt(ra,{variant:"info",children:"Dashboards not found"}),l.length>1&&Nt("div",{className:Er()({"vm-predefined-panels-tabs":!0,"vm-predefined-panels-tabs_mobile":e}),children:l.map((e=>Nt("div",{className:Er()({"vm-predefined-panels-tabs__tab":!0,"vm-predefined-panels-tabs__tab_active":e.value==i}),onClick:h(e.value),children:e.label},e.value)))}),Nt("div",{className:"vm-predefined-panels__dashboards",children:[d&&c.map(((e,t)=>Nt(om,{index:t,filename:u,title:e.title,panels:e.panels},`${i}_${t}`))),!!t.length&&!d&&Nt(ra,{variant:"error",children:[Nt("code",{children:'"rows"'})," not found. Check the configuration file ",Nt("b",{children:u}),"."]})]})]})},cm=(e,t)=>{const n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return`${e}/api/v1/status/tsdb?topN=${t.topN}&date=${t.date}${n}${r}`};class um{constructor(){this.tsdbStatus=void 0,this.tabsNames=void 0,this.isPrometheus=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"],this.isPrometheus=!1,this.getDefaultState=this.getDefaultState.bind(this)}set tsdbStatusData(e){this.isPrometheus=!(null===e||void 0===e||!e.headStats),this.tsdbStatus=e}get tsdbStatusData(){return this.tsdbStatus}get defaultTSDBStatus(){return{totalSeries:0,totalSeriesPrev:0,totalSeriesByAll:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}get isPrometheusData(){return this.isPrometheus}keys(e,t){const n=e&&/__name__=".+"/.test(e),r=e&&/{.+=".+"}/g.test(e),a=e&&/__name__=".+", .+!=""/g.test(e);let i=[];return i=t||a?i.concat("seriesCountByFocusLabelValue"):n?i.concat("labelValueCountByLabelName"):r?i.concat("seriesCountByMetricName","seriesCountByLabelName"):i.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),i}getDefaultState(e,t){return this.keys(e,t).reduce(((e,t)=>({...e,tabs:{...e.tabs,[t]:this.tabsNames},containerRefs:{...e.containerRefs,[t]:(0,r.useRef)(null)}})),{tabs:{},containerRefs:{}})}sectionsTitles(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:`Values for "${e}" label with the highest number of series`,seriesCountByLabelValuePair:"Label=value pairs with the highest number of series",labelValueCountByLabelName:"Labels with the highest number of unique values"}}get sectionsTips(){return{seriesCountByMetricName:"\n

    \n This table returns a list of metrics with the highest cardinality.\n The cardinality of a metric is the number of time series associated with that metric,\n where each time series is defined as a unique combination of key-value label pairs.\n

    \n

    \n When looking to reduce the number of active series in your data source,\n you can start by inspecting individual metrics with high cardinality\n (i.e. that have lots of active time series associated with them),\n since that single metric contributes a large fraction of the series that make up your total series count.\n

    ",seriesCountByLabelName:"\n

    \n This table returns a list of the labels with the highest number of series.\n

    \n

    \n Use this table to identify labels that are storing dimensions with high cardinality\n (many different label values).\n

    \n

    \n It is recommended to choose labels such that they have a finite set of values,\n since every unique combination of key-value label pairs creates a new time series\n and therefore can dramatically increase the number of time series in your system.\n

    ",seriesCountByFocusLabelValue:"\n

    \n This table returns a list of unique label values per selected label.\n

    \n

    \n Use this table to identify label values that are storing per each selected series.\n

    ",labelValueCountByLabelName:"\n

    \n This table returns a list of labels with the highest number of the unique values.\n

    \n ",seriesCountByLabelValuePair:"\n

    \n This table returns a list of the label values pairs with the highest number of series.\n

    \n

    \n Use this table to identify unique label values pairs. This helps to identify same labels \n is applied to count timeseries in your system, since every unique combination of key-value label pairs \n creates a new time series and therefore can dramatically increase the number of time series in your system\n

    "}}get tablesHeaders(){return{seriesCountByMetricName:dm,seriesCountByLabelName:hm,seriesCountByFocusLabelValue:mm,seriesCountByLabelValuePair:pm,labelValueCountByLabelName:fm}}totalSeries(e){return"labelValueCountByLabelName"===e?-1:arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this.tsdbStatus.totalSeriesPrev:this.tsdbStatus.totalSeries}}const dm=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Share in total",info:"Shows the share of a metric to the total number of series"},{id:"action",label:""}],hm=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Share in total",info:"Shows the share of the label to the total number of series"},{id:"action",label:""}],mm=[{id:"name",label:"Label value"},{id:"value",label:"Number of series"},{id:"percentage",label:"Share in total"},{disablePadding:!1,id:"action",label:"",numeric:!1}],pm=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Share in total",info:"Shows the share of the label value pair to the total number of series"},{id:"action",label:""}],fm=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:""}],vm=()=>{const e=new um,[t]=je(),n=t.get("match"),a=t.get("focusLabel"),o=+(t.get("topN")||10),l=t.get("date")||i()().tz().format(Lt),s=Za(l),c=(0,r.useRef)(),{serverUrl:u}=Mt(),[d,h]=(0,r.useState)(!1),[m,p]=(0,r.useState)(),[f,v]=(0,r.useState)(e.defaultTSDBStatus),[g,y]=(0,r.useState)(!1),_=async e=>{const t=await fetch(e);if(t.ok)return await t.json();throw new Error(`Request failed with status ${t.status}`)},b=async t=>{if(!u)return;p(""),h(!0),v(e.defaultTSDBStatus);const r={...t,date:t.date,topN:0,match:"",focusLabel:""},a={...t,date:i()(t.date).subtract(1,"day").format(Lt)},o=[cm(u,t),cm(u,a)];s!==l&&(t.match||t.focusLabel)&&o.push(cm(u,r));try{var d,m,g,y,b,w,k,x,S,C;const[e,t,r]=await Promise.all(o.map(_)),a={...t.data},{data:i}=r||c.current||e;c.current={data:i};const l={...e.data,totalSeries:(null===(d=e.data)||void 0===d?void 0:d.totalSeries)||(null===(m=e.data)||void 0===m||null===(g=m.headStats)||void 0===g?void 0:g.numSeries)||0,totalLabelValuePairs:(null===(y=e.data)||void 0===y?void 0:y.totalLabelValuePairs)||(null===(b=e.data)||void 0===b||null===(w=b.headStats)||void 0===w?void 0:w.numLabelValuePairs)||0,seriesCountByLabelName:(null===(k=e.data)||void 0===k?void 0:k.seriesCountByLabelName)||[],seriesCountByFocusLabelValue:(null===(x=e.data)||void 0===x?void 0:x.seriesCountByFocusLabelValue)||[],totalSeriesByAll:(null===i||void 0===i?void 0:i.totalSeries)||(null===i||void 0===i||null===(S=i.headStats)||void 0===S?void 0:S.numSeries)||f.totalSeriesByAll||0,totalSeriesPrev:(null===a||void 0===a?void 0:a.totalSeries)||(null===a||void 0===a||null===(C=a.headStats)||void 0===C?void 0:C.numSeries)||0},s=null===n||void 0===n?void 0:n.replace(/[{}"]/g,"");l.seriesCountByLabelValuePair=l.seriesCountByLabelValuePair.filter((e=>e.name!==s)),((e,t)=>{Object.keys(e).forEach((n=>{const r=n,a=e[r],i=t[r];Array.isArray(a)&&Array.isArray(i)&&a.forEach((e=>{var t;const n=null===(t=i.find((t=>t.name===e.name)))||void 0===t?void 0:t.value;e.diff=n?e.value-n:0,e.valuePrev=n||0}))}))})(l,a),v(l),h(!1)}catch(zp){h(!1),zp instanceof Error&&p(`${zp.name}: ${zp.message}`)}};return(0,r.useEffect)((()=>{b({topN:o,match:n,date:l,focusLabel:a})}),[u,n,a,o,l]),(0,r.useEffect)((()=>{m&&(v(e.defaultTSDBStatus),h(!1))}),[m]),(0,r.useEffect)((()=>{const e=Je(u);y(!!e)}),[u]),e.tsdbStatusData=f,{isLoading:d,appConfigurator:e,error:m,isCluster:g}},gm={seriesCountByMetricName:e=>{let{query:t}=e;return ym("__name__",t)},seriesCountByLabelName:e=>{let{query:t}=e;return`{${t}!=""}`},seriesCountByFocusLabelValue:e=>{let{query:t,focusLabel:n}=e;return ym(n,t)},seriesCountByLabelValuePair:e=>{let{query:t}=e;const n=t.split("="),r=n[0],a=n.slice(1).join("=");return ym(r,a)},labelValueCountByLabelName:e=>{let{query:t,match:n}=e;return""===n?`{${t}!=""}`:`${n.replace("}","")}, ${t}!=""}`}},ym=(e,t)=>e?"{"+e+"="+JSON.stringify(t)+"}":"",_m=e=>{var t;let{totalSeries:n=0,totalSeriesPrev:r=0,totalSeriesAll:a=0,seriesCountByMetricName:i=[],isPrometheus:o}=e;const{isMobile:l}=ta(),[s]=je(),c=s.get("match"),u=s.get("focusLabel"),d=/__name__/.test(c||""),h=(null===(t=i[0])||void 0===t?void 0:t.value)/a*100,m=n-r,p=Math.abs(m)/r*100,f=[{title:"Total series",value:n.toLocaleString("en-US"),dynamic:n&&r&&!o?`${p.toFixed(2)}%`:"",display:!u,info:'The total number of unique time series for a selected day.\n A time series is uniquely identified by its name plus a set of its labels. \n For example, temperature{city="NY",country="US"} and temperature{city="SF",country="US"} \n are two distinct series, since they differ by the "city" label.'},{title:"Percentage from total",value:isNaN(h)?"-":`${h.toFixed(2)}%`,display:d,info:"The share of these series in the total number of time series."}].filter((e=>e.display));return f.length?Nt("div",{className:Er()({"vm-cardinality-totals":!0,"vm-cardinality-totals_mobile":l}),children:f.map((e=>{let{title:t,value:n,info:a,dynamic:i}=e;return Nt("div",{className:"vm-cardinality-totals-card",children:[Nt("h4",{className:"vm-cardinality-totals-card__title",children:[t,a&&Nt(ba,{title:Nt("p",{className:"vm-cardinality-totals-card__tooltip",children:a}),children:Nt("div",{className:"vm-cardinality-totals-card__info-icon",children:Nt(In,{})})})]}),Nt("span",{className:"vm-cardinality-totals-card__value",children:n}),!!i&&Nt(ba,{title:`in relation to the previous day: ${r.toLocaleString("en-US")}`,children:Nt("span",{className:Er()({"vm-dynamic-number":!0,"vm-dynamic-number_positive vm-dynamic-number_down":m<0,"vm-dynamic-number_negative vm-dynamic-number_up":m>0}),children:i})})]},t)}))}):null},bm=(e,t)=>{const[n]=je(),a=n.get(t)?n.get(t):e,[i,o]=(0,r.useState)(a);return(0,r.useEffect)((()=>{a!==i&&o(a)}),[a]),[i,o]},wm=e=>{let{isPrometheus:t,isCluster:n,...a}=e;const{isMobile:i}=ta(),[o]=je(),{setSearchParamsFromKeys:l}=hi(),s=o.get("tips")||"",[c,u]=bm("","match"),[d,h]=bm("","focusLabel"),[m,p]=bm(10,"topN"),f=(0,r.useMemo)((()=>m<0?"Number must be bigger than zero":""),[m]),v=()=>{l({match:c,topN:m,focusLabel:d})};return(0,r.useEffect)((()=>{const e=o.get("match"),t=+(o.get("topN")||10),n=o.get("focusLabel");e!==c&&u(e||""),t!==m&&p(t),n!==d&&h(n||"")}),[o]),Nt("div",{className:Er()({"vm-cardinality-configurator":!0,"vm-cardinality-configurator_mobile":i,"vm-block":!0,"vm-block_mobile":i}),children:[Nt("div",{className:"vm-cardinality-configurator-controls",children:[Nt("div",{className:"vm-cardinality-configurator-controls__query",children:Nt(Ka,{label:"Time series selector",type:"string",value:c,onChange:u,onEnter:v})}),Nt("div",{className:"vm-cardinality-configurator-controls__item",children:Nt(Ka,{label:"Focus label",type:"text",value:d||"",onChange:h,onEnter:v,endIcon:Nt(ba,{title:Nt("div",{children:Nt("p",{children:"To identify values with the highest number of series for the selected label."})}),children:Nt(sr,{})})})}),Nt("div",{className:"vm-cardinality-configurator-controls__item vm-cardinality-configurator-controls__item_limit",children:Nt(Ka,{label:"Limit entries",type:"number",value:t?10:m,error:f,disabled:t,helperText:t?"not available for Prometheus":"",onChange:e=>{const t=+e;p(isNaN(t)?0:t)},onEnter:v})})]}),Nt("div",{className:"vm-cardinality-configurator-bottom",children:[Nt(_m,{isPrometheus:t,isCluster:n,...a}),n&&Nt("div",{className:"vm-cardinality-configurator-bottom-helpful",children:Nt(Pl,{href:"https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#cardinality-explorer-statistic-inaccuracy",withIcon:!0,children:[Nt(or,{}),"Statistic inaccuracy explanation"]})}),Nt("div",{className:"vm-cardinality-configurator-bottom-helpful",children:Nt(Pl,{href:"https://docs.victoriametrics.com/#cardinality-explorer",withIcon:!0,children:[Nt(or,{}),"Documentation"]})}),Nt("div",{className:"vm-cardinality-configurator-bottom__execute",children:[Nt(ba,{title:s?"Hide tips":"Show tips",children:Nt(da,{variant:"text",color:s?"warning":"gray",startIcon:Nt(hr,{}),onClick:()=>{const e=o.get("tips")||"";l({tips:e?"":"true"})},ariaLabel:"visibility tips"})}),Nt(da,{variant:"text",startIcon:Nt(Pn,{}),onClick:()=>{l({match:"",focusLabel:""})},children:"Reset"}),Nt(da,{startIcon:Nt(qn,{}),onClick:v,children:"Execute Query"})]})]})]})};function km(e){const{order:t,orderBy:n,onRequestSort:r,headerCells:a}=e;return Nt("thead",{className:"vm-table-header vm-cardinality-panel-table__header",children:Nt("tr",{className:"vm-table__row vm-table__row_header",children:a.map((e=>{return Nt("th",{className:Er()({"vm-table-cell vm-table-cell_header":!0,"vm-table-cell_sort":"action"!==e.id&&"percentage"!==e.id,"vm-table-cell_right":"action"===e.id}),onClick:(a=e.id,e=>{r(e,a)}),children:Nt("div",{className:"vm-table-cell__content",children:[e.info?Nt(ba,{title:e.info,children:[Nt("div",{className:"vm-metrics-content-header__tip-icon",children:Nt(In,{})}),e.label]}):Nt(Ct.FK,{children:e.label}),"action"!==e.id&&"percentage"!==e.id&&Nt("div",{className:Er()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:Nt(jn,{})})]})},e.id);var a}))})})}const xm=["date","timestamp","time"];function Sm(e,t,n){const r=e[n],a=t[n],o=xm.includes(`${n}`)?i()(`${r}`).unix():r,l=xm.includes(`${n}`)?i()(`${a}`).unix():a;return lo?1:0}function Cm(e,t){return"desc"===e?(e,n)=>Sm(e,n,t):(e,n)=>-Sm(e,n,t)}function Em(e,t){const n=e.map(((e,t)=>[e,t]));return n.sort(((e,n)=>{const r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((e=>e[0]))}const Nm=e=>{let{rows:t,headerCells:n,defaultSortColumn:a,tableCells:i}=e;const[o,l]=(0,r.useState)("desc"),[s,c]=(0,r.useState)(a),u=Em(t,Cm(o,s));return Nt("table",{className:"vm-table vm-cardinality-panel-table",children:[Nt(km,{order:o,orderBy:s,onRequestSort:(e,t)=>{l(s===t&&"asc"===o?"desc":"asc"),c(t)},rowCount:t.length,headerCells:n}),Nt("tbody",{className:"vm-table-header",children:u.map((e=>Nt("tr",{className:"vm-table__row",children:i(e)},e.name)))})]})},Am=e=>{let{row:t,totalSeries:n,totalSeriesPrev:r,onActionClick:a}=e;const i=n>0?t.value/n*100:-1,o=r>0?t.valuePrev/r*100:-1,l=[i,o].some((e=>-1===e)),s=i-o,c=l?"":`${s.toFixed(2)}%`,u=()=>{a(t.name)};return Nt(Ct.FK,{children:[Nt("td",{className:"vm-table-cell",children:Nt("span",{className:"vm-link vm-link_colored",onClick:u,children:t.name})},t.name),Nt("td",{className:"vm-table-cell",children:[t.value,!!t.diff&&Nt(ba,{title:`in relation to the previous day: ${t.valuePrev}`,children:Nt("span",{className:Er()({"vm-dynamic-number":!0,"vm-dynamic-number_positive":t.diff<0,"vm-dynamic-number_negative":t.diff>0}),children:["\xa0",t.diff>0?"+":"",t.diff]})})]},t.value),i>0&&Nt("td",{className:"vm-table-cell",children:Nt("div",{className:"vm-cardinality-panel-table__progress",children:[Nt(Dl,{value:i}),c&&Nt(ba,{title:"in relation to the previous day",children:Nt("span",{className:Er()({"vm-dynamic-number":!0,"vm-dynamic-number_positive vm-dynamic-number_down":s<0,"vm-dynamic-number_negative vm-dynamic-number_up":s>0}),children:c})})]})},t.progressValue),Nt("td",{className:"vm-table-cell vm-table-cell_right",children:Nt("div",{className:"vm-table-cell__content",children:Nt(ba,{title:`Filter by ${t.name}`,children:Nt(da,{variant:"text",size:"small",onClick:u,children:Nt(Yn,{})})})})},"action")]})},Mm=e=>{let{data:t}=e;const[n,a]=(0,r.useState)([]),[i,o]=(0,r.useState)([0,0]);return(0,r.useEffect)((()=>{const e=t.sort(((e,t)=>t.value-e.value)),n=(e=>{const t=e.map((e=>e.value)),n=Math.ceil(t[0]||1),r=n/9;return new Array(11).fill(n+r).map(((e,t)=>Math.round(e-r*t)))})(e);o(n),a(e.map((e=>({...e,percentage:e.value/n[0]*100}))))}),[t]),Nt("div",{className:"vm-simple-bar-chart",children:[Nt("div",{className:"vm-simple-bar-chart-y-axis",children:i.map((e=>Nt("div",{className:"vm-simple-bar-chart-y-axis__tick",children:e},e)))}),Nt("div",{className:"vm-simple-bar-chart-data",children:n.map((e=>{let{name:t,value:n,percentage:r}=e;return Nt(ba,{title:`${t}: ${n}`,placement:"top-center",children:Nt("div",{className:"vm-simple-bar-chart-data-item",style:{maxHeight:`${r||0}%`}})},`${t}_${n}`)}))})]})},Tm=e=>{let{rows:t,tabs:n=[],chartContainer:a,totalSeries:i,totalSeriesPrev:o,onActionClick:l,sectionTitle:s,tip:c,tableHeaderCells:u,isPrometheus:d}=e;const{isMobile:h}=ta(),[m,p]=(0,r.useState)("table"),f=d&&!t.length,v=(0,r.useMemo)((()=>n.map(((e,t)=>({value:e,label:e,icon:Nt(0===t?Kn:Wn,{})})))),[n]);return Nt("div",{className:Er()({"vm-metrics-content":!0,"vm-metrics-content_mobile":h,"vm-block":!0,"vm-block_mobile":h}),children:[Nt("div",{className:"vm-metrics-content-header vm-section-header",children:[Nt("h5",{className:Er()({"vm-metrics-content-header__title":!0,"vm-section-header__title":!0,"vm-section-header__title_mobile":h}),children:[!h&&c&&Nt(ba,{title:Nt("p",{dangerouslySetInnerHTML:{__html:c},className:"vm-metrics-content-header__tip"}),children:Nt("div",{className:"vm-metrics-content-header__tip-icon",children:Nt(In,{})})}),s]}),Nt("div",{className:"vm-section-header__tabs",children:Nt($r,{activeItem:m,items:v,onChange:p})})]}),f&&Nt("div",{className:"vm-metrics-content-prom-data",children:[Nt("div",{className:"vm-metrics-content-prom-data__icon",children:Nt(In,{})}),Nt("h3",{className:"vm-metrics-content-prom-data__title",children:"Prometheus Data Limitation"}),Nt("p",{className:"vm-metrics-content-prom-data__text",children:["Due to missing data from your Prometheus source, some tables may appear empty.",Nt("br",{}),"This does not indicate an issue with your system or our tool."]})]}),!f&&"table"===m&&Nt("div",{ref:a,className:Er()({"vm-metrics-content__table":!0,"vm-metrics-content__table_mobile":h}),children:Nt(Nm,{rows:t,headerCells:u,defaultSortColumn:"value",tableCells:e=>Nt(Am,{row:e,totalSeries:i,totalSeriesPrev:o,onActionClick:l})})}),!f&&"graph"===m&&Nt("div",{className:"vm-metrics-content__chart",children:Nt(Mm,{data:t.map((e=>{let{name:t,value:n}=e;return{name:t,value:n}}))})})]})},$m=e=>{let{title:t,children:n}=e;return Nt("div",{className:"vm-cardinality-tip",children:[Nt("div",{className:"vm-cardinality-tip-header",children:[Nt("div",{className:"vm-cardinality-tip-header__tip-icon",children:Nt(hr,{})}),Nt("h4",{className:"vm-cardinality-tip-header__title",children:t||"Tips"})]}),Nt("p",{className:"vm-cardinality-tip__description",children:n})]})},Lm=()=>Nt($m,{title:"Metrics with a high number of series",children:Nt("ul",{children:[Nt("li",{children:["Identify and eliminate labels with frequently changed values to reduce their\xa0",Nt(Pl,{href:"https://docs.victoriametrics.com/FAQ.html#what-is-high-cardinality",children:"cardinality"}),"\xa0and\xa0",Nt(Pl,{href:"https://docs.victoriametrics.com/FAQ.html#what-is-high-churn-rate",children:"high churn rate"})]}),Nt("li",{children:["Find unused time series and\xa0",Nt(Pl,{href:"https://docs.victoriametrics.com/relabeling.html",children:"drop entire metrics"})]}),Nt("li",{children:["Aggregate time series before they got ingested into the database via\xa0",Nt(Pl,{href:"https://docs.victoriametrics.com/stream-aggregation.html",children:"streaming aggregation"})]})]})}),Pm=()=>Nt($m,{title:"Labels with a high number of unique values",children:Nt("ul",{children:[Nt("li",{children:"Decrease the number of unique label values to reduce cardinality"}),Nt("li",{children:["Drop the label entirely via\xa0",Nt(Pl,{href:"https://docs.victoriametrics.com/relabeling.html",children:"relabeling"})]}),Nt("li",{children:"For volatile label values (such as URL path, user session, etc.) consider printing them to the log file instead of adding to time series"})]})}),Im=()=>Nt($m,{title:"Dashboard of a single metric",children:[Nt("p",{children:"This dashboard helps to understand the cardinality of a single metric."}),Nt("p",{children:"Each time series is a unique combination of key-value label pairs. Therefore a label key with many values can create a lot of time series for a particular metric. If you\u2019re trying to decrease the cardinality of a metric, start by looking at the labels with the highest number of values."}),Nt("p",{children:"Use the series selector at the top of the page to apply additional filters."})]}),Om=()=>Nt($m,{title:"Dashboard of a label",children:[Nt("p",{children:"This dashboard helps you understand the count of time series per label."}),Nt("p",{children:"Use the selector at the top of the page to pick a label name you\u2019d like to inspect. For the selected label name, you\u2019ll see the label values that have the highest number of series associated with them. So if you\u2019ve chosen `instance` as your label name, you may see that `657` time series have value \u201chost-1\u201d attached to them and `580` time series have value `host-2` attached to them."}),Nt("p",{children:"This can be helpful in allowing you to determine where the bulk of your time series are coming from. If the label \u201cinstance=host-1\u201d was applied to 657 series and the label \u201cinstance=host-2\u201d was only applied to 580 series, you\u2019d know, for example, that host-01 was responsible for sending the majority of the time series."})]}),Rm=()=>{const{isMobile:e}=ta(),[t]=je(),{setSearchParamsFromKeys:n}=hi(),r=t.get("tips")||"",a=t.get("match")||"",i=t.get("focusLabel")||"",{isLoading:o,appConfigurator:l,error:s,isCluster:c}=vm(),{tsdbStatusData:u,getDefaultState:d,tablesHeaders:h,sectionsTips:m}=l,p=d(a,i);return Nt("div",{className:Er()({"vm-cardinality-panel":!0,"vm-cardinality-panel_mobile":e}),children:[o&&Nt(wl,{message:"Please wait while cardinality stats is calculated. \n This may take some time if the db contains big number of time series."}),Nt(wm,{isPrometheus:l.isPrometheusData,totalSeries:u.totalSeries,totalSeriesPrev:u.totalSeriesPrev,totalSeriesAll:u.totalSeriesByAll,totalLabelValuePairs:u.totalLabelValuePairs,seriesCountByMetricName:u.seriesCountByMetricName,isCluster:c}),r&&Nt("div",{className:"vm-cardinality-panel-tips",children:[!a&&!i&&Nt(Lm,{}),a&&!i&&Nt(Im,{}),!a&&!i&&Nt(Pm,{}),i&&Nt(Om,{})]}),s&&Nt(ra,{variant:"error",children:s}),l.keys(a,i).map((e=>{return Nt(Tm,{sectionTitle:l.sectionsTitles(i)[e],tip:m[e],rows:u[e],onActionClick:(t=e,e=>{const r={match:gm[t]({query:e,focusLabel:i,match:a})};"labelValueCountByLabelName"!==t&&"seriesCountByLabelName"!=t||(r.focusLabel=e),"seriesCountByFocusLabelValue"==t&&(r.focusLabel=""),n(r)}),tabs:p.tabs[e],chartContainer:p.containerRefs[e],totalSeriesPrev:l.totalSeries(e,!0),totalSeries:l.totalSeries(e),tableHeaderCells:h[e],isPrometheus:l.isPrometheusData},e);var t}))]})},Dm=e=>(["topByAvgDuration","topByCount","topBySumDuration"].forEach((t=>{const n=e[t];Array.isArray(n)&&n.forEach((e=>{const t=en(1e3*e.timeRangeSeconds);e.url=((e,t)=>{var n;const{query:r,timeRangeSeconds:a}=e,i=[`g0.expr=${encodeURIComponent(r)}`],o=null===(n=rn.find((e=>e.duration===t)))||void 0===n?void 0:n.id;return o&&i.push(`g0.relative_time=${o}`),a&&i.push(`g0.range_input=${t}`),`${We.home}?${i.join("&")}`})(e,t),e.timeRange=t}))})),e),zm=e=>{let{topN:t,maxLifetime:n}=e;const{serverUrl:a}=Mt(),{setSearchParamsFromKeys:i}=hi(),[o,l]=(0,r.useState)(null),[s,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(),h=(0,r.useMemo)((()=>((e,t,n)=>`${e}/api/v1/status/top_queries?topN=${t||""}&maxLifetime=${n||""}`)(a,t,n)),[a,t,n]);return{data:o,error:u,loading:s,fetch:async()=>{c(!0),i({topN:t,maxLifetime:n});try{const e=await fetch(h),t=await e.json();l(e.ok?Dm(t):null),d(String(t.error||""))}catch(zp){zp instanceof Error&&"AbortError"!==zp.name&&d(`${zp.name}: ${zp.message}`)}c(!1)}}},Fm=e=>{let{rows:t,columns:n,defaultOrderBy:a}=e;const i=fl(),[o,l]=(0,r.useState)(a||"count"),[s,c]=(0,r.useState)("desc"),u=(0,r.useMemo)((()=>Em(t,Cm(s,o))),[t,o,s]),d=e=>()=>{var t;t=e,c((e=>"asc"===e&&o===t?"desc":"asc")),l(t)},h=e=>{let{query:t}=e;return async()=>{await i(t,"Query has been copied")}};return Nt("table",{className:"vm-table",children:[Nt("thead",{className:"vm-table-header",children:Nt("tr",{className:"vm-table__row vm-table__row_header",children:[n.map((e=>Nt("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:d(e.sortBy||e.key),children:Nt("div",{className:"vm-table-cell__content",children:[e.title||e.key,Nt("div",{className:Er()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":o===e.key,"vm-table__sort-icon_desc":"desc"===s&&o===e.key}),children:Nt(jn,{})})]})},e.key))),Nt("th",{className:"vm-table-cell vm-table-cell_header"})," "]})}),Nt("tbody",{className:"vm-table-body",children:u.map(((e,t)=>Nt("tr",{className:"vm-table__row",children:[n.map((t=>Nt("td",{className:"vm-table-cell",children:e[t.key]||"-"},t.key))),Nt("td",{className:"vm-table-cell vm-table-cell_no-padding",children:Nt("div",{className:"vm-top-queries-panels__table-actions",children:[e.url&&Nt(ba,{title:"Execute query",children:Nt(Oe,{to:e.url,target:"_blank",rel:"noreferrer","aria-disabled":!0,children:Nt(da,{variant:"text",size:"small",startIcon:Nt(Yn,{}),ariaLabel:"execute query"})})}),Nt(ba,{title:"Copy query",children:Nt(da,{variant:"text",size:"small",startIcon:Nt(rr,{}),onClick:h(e),ariaLabel:"copy query"})})]})})]},t)))})]})},jm=["table","JSON"].map(((e,t)=>({value:String(t),label:e,icon:Nt(0===t?Kn:Qn,{})}))),Hm=e=>{let{rows:t,title:n,columns:a,defaultOrderBy:i}=e;const{isMobile:o}=ta(),[l,s]=(0,r.useState)(0);return Nt("div",{className:Er()({"vm-top-queries-panel":!0,"vm-block":!0,"vm-block_mobile":o}),children:[Nt("div",{className:Er()({"vm-top-queries-panel-header":!0,"vm-section-header":!0,"vm-top-queries-panel-header_mobile":o}),children:[Nt("h5",{className:Er()({"vm-section-header__title":!0,"vm-section-header__title_mobile":o}),children:n}),Nt("div",{className:"vm-section-header__tabs",children:Nt($r,{activeItem:String(l),items:jm,onChange:e=>{s(+e)}})})]}),Nt("div",{className:Er()({"vm-top-queries-panel__table":!0,"vm-top-queries-panel__table_mobile":o}),children:[0===l&&Nt(Fm,{rows:t,columns:a,defaultOrderBy:i}),1===l&&Nt(Yh,{data:t})]})]})},Vm=()=>{const{isMobile:e}=ta(),[t,n]=bm(10,"topN"),[a,o]=bm("10m","maxLifetime"),{data:l,error:s,loading:c,fetch:u}=zm({topN:t,maxLifetime:a}),d=(0,r.useMemo)((()=>{const e=a.trim().split(" ").reduce(((e,t)=>{const n=Kt(t);return n?{...e,...n}:{...e}}),{});return!!i().duration(e).asMilliseconds()}),[a]),h=(0,r.useMemo)((()=>!!t&&t<1),[t]),m=(0,r.useMemo)((()=>h?"Number must be bigger than zero":""),[h]),p=(0,r.useMemo)((()=>d?"":"Invalid duration value"),[d]),f=e=>{if(!l)return e;const t=l[e];return"number"===typeof t?Bd(t,t,t):t||e},v=e=>{"Enter"===e.key&&u()};return(0,r.useEffect)((()=>{l&&(t||n(+l.topN),a||o(l.maxLifetime))}),[l]),(0,r.useEffect)((()=>(u(),window.addEventListener("popstate",u),()=>{window.removeEventListener("popstate",u)})),[]),Nt("div",{className:Er()({"vm-top-queries":!0,"vm-top-queries_mobile":e}),children:[c&&Nt(wl,{containerStyles:{height:"500px"}}),Nt("div",{className:Er()({"vm-top-queries-controls":!0,"vm-block":!0,"vm-block_mobile":e}),children:[Nt("div",{className:"vm-top-queries-controls-fields",children:[Nt("div",{className:"vm-top-queries-controls-fields__item",children:Nt(Ka,{label:"Max lifetime",value:a,error:p,helperText:"For example 30ms, 15s, 3d4h, 1y2w",onChange:e=>{o(e)},onKeyDown:v})}),Nt("div",{className:"vm-top-queries-controls-fields__item",children:Nt(Ka,{label:"Number of returned queries",type:"number",value:t||"",error:m,onChange:e=>{n(+e)},onKeyDown:v})})]}),Nt("div",{className:Er()({"vm-top-queries-controls-bottom":!0,"vm-top-queries-controls-bottom_mobile":e}),children:[Nt("div",{className:"vm-top-queries-controls-bottom__info",children:["VictoriaMetrics tracks the last\xa0",Nt(ba,{title:"search.queryStats.lastQueriesCount",children:Nt("b",{children:f("search.queryStats.lastQueriesCount")})}),"\xa0queries with durations at least\xa0",Nt(ba,{title:"search.queryStats.minQueryDuration",children:Nt("b",{children:f("search.queryStats.minQueryDuration")})})]}),Nt("div",{className:"vm-top-queries-controls-bottom__button",children:Nt(da,{startIcon:Nt(qn,{}),onClick:u,children:"Execute"})})]})]}),s&&Nt(ra,{variant:"error",children:s}),l&&Nt(Ct.FK,{children:Nt("div",{className:"vm-top-queries-panels",children:[Nt(Hm,{rows:l.topBySumDuration,title:"Queries with most summary time to execute",columns:[{key:"query"},{key:"sumDurationSeconds",title:"sum duration, sec"},{key:"timeRange",sortBy:"timeRangeSeconds",title:"query time interval"},{key:"count"}],defaultOrderBy:"sumDurationSeconds"}),Nt(Hm,{rows:l.topByAvgDuration,title:"Most heavy queries",columns:[{key:"query"},{key:"avgDurationSeconds",title:"avg duration, sec"},{key:"timeRange",sortBy:"timeRangeSeconds",title:"query time interval"},{key:"count"}],defaultOrderBy:"avgDurationSeconds"}),Nt(Hm,{rows:l.topByCount,title:"Most frequently executed queries",columns:[{key:"query"},{key:"timeRange",sortBy:"timeRangeSeconds",title:"query time interval"},{key:"count"}]})]})})]})},Um={"color-primary":"#589DF6","color-secondary":"#316eca","color-error":"#e5534b","color-warning":"#c69026","color-info":"#539bf5","color-success":"#57ab5a","color-background-body":"#22272e","color-background-block":"#2d333b","color-background-tooltip":"rgba(22, 22, 22, 0.8)","color-text":"#cdd9e5","color-text-secondary":"#768390","color-text-disabled":"#636e7b","box-shadow":"rgba(0, 0, 0, 0.16) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.2) 0px 2px 8px 0px","border-divider":"1px solid rgba(99, 110, 123, 0.5)","color-hover-black":"rgba(0, 0, 0, 0.12)","color-log-hits-bar-0":"rgba(255, 255, 255, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},Bm={"color-primary":"#3F51B5","color-secondary":"#E91E63","color-error":"#FD080E","color-warning":"#FF8308","color-info":"#03A9F4","color-success":"#4CAF50","color-background-body":"#FEFEFF","color-background-block":"#FFFFFF","color-background-tooltip":"rgba(80,80,80,0.9)","color-text":"#110f0f","color-text-secondary":"#706F6F","color-text-disabled":"#A09F9F","box-shadow":"rgba(0, 0, 0, 0.08) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.1) 0px 2px 8px 0px","border-divider":"1px solid rgba(0, 0, 0, 0.15)","color-hover-black":"rgba(0, 0, 0, 0.06)","color-log-hits-bar-0":"rgba(0, 0, 0, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},qm=()=>{const[e,t]=(0,r.useState)(_t()),n=e=>{t(e.matches)};return(0,r.useEffect)((()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");return e.addEventListener("change",n),()=>e.removeEventListener("change",n)}),[]),e},Ym=["primary","secondary","error","warning","info","success"],Wm=e=>{let{onLoaded:t}=e;const n=Qe(),{palette:a={}}=Ke(),{theme:i}=Mt(),o=qm(),l=Tt(),s=Tr(),[c,u]=(0,r.useState)({[ft.dark]:Um,[ft.light]:Bm,[ft.system]:_t()?Um:Bm}),d=()=>{const{innerWidth:e,innerHeight:t}=window,{clientWidth:n,clientHeight:r}=document.documentElement;yt("scrollbar-width",e-n+"px"),yt("scrollbar-height",t-r+"px"),yt("vh",.01*t+"px")},h=()=>{Ym.forEach(((e,n)=>{const r=(e=>{let t=e.replace("#","").trim();if(3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length)throw new Error("Invalid HEX color.");return(299*parseInt(t.slice(0,2),16)+587*parseInt(t.slice(2,4),16)+114*parseInt(t.slice(4,6),16))/1e3>=128?"#000000":"#FFFFFF"})(gt(`color-${e}`));yt(`${e}-text`,r),n===Ym.length-1&&(l({type:"SET_DARK_THEME"}),t(!0))}))},m=()=>{const e=et("THEME")||ft.system,t=c[e];Object.entries(t).forEach((e=>{let[t,n]=e;yt(t,n)})),h(),n&&(Ym.forEach((e=>{const t=a[e];t&&yt(`color-${e}`,t)})),h())};return(0,r.useEffect)((()=>{d(),m()}),[c]),(0,r.useEffect)(d,[s]),(0,r.useEffect)((()=>{const e=_t()?Um:Bm;c[ft.system]!==e?u((t=>({...t,[ft.system]:e}))):m()}),[i,o]),(0,r.useEffect)((()=>{n&&l({type:"SET_THEME",payload:ft.light})}),[]),null},Km=()=>{const[e,t]=(0,r.useState)([]),[n,a]=(0,r.useState)(!1),i=(0,r.useRef)(document.body),o=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?a(!0):"dragleave"===e.type&&a(!1)};return Mr("dragenter",o,i),Mr("dragleave",o,i),Mr("dragover",o,i),Mr("drop",(e=>{var n;e.preventDefault(),e.stopPropagation(),a(!1),null!==e&&void 0!==e&&null!==(n=e.dataTransfer)&&void 0!==n&&n.files&&e.dataTransfer.files[0]&&(e=>{const n=Array.from(e||[]);t(n)})(e.dataTransfer.files)}),i),Mr("paste",(e=>{var n;const r=null===(n=e.clipboardData)||void 0===n?void 0:n.items;if(!r)return;const a=Array.from(r).filter((e=>"application/json"===e.type)).map((e=>e.getAsFile())).filter((e=>null!==e));t(a)}),i),{files:e,dragging:n}},Qm=e=>{let{onOpenModal:t,onChange:n}=e;return Nt("div",{className:"vm-upload-json-buttons",children:[Nt(da,{variant:"outlined",onClick:t,children:"Paste JSON"}),Nt(da,{children:["Upload Files",Nt("input",{id:"json",type:"file",accept:"application/json",multiple:!0,title:" ",onChange:n})]})]})},Zm=()=>{const[e,t]=(0,r.useState)([]),[n,a]=(0,r.useState)([]),i=(0,r.useMemo)((()=>!!e.length),[e]),{value:o,setTrue:l,setFalse:s}=ma(!1),c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";a((n=>[{filename:t,text:`: ${e.message}`},...n]))},u=(e,n)=>{try{const r=JSON.parse(e),a=r.trace||r;if(!a.duration_msec)return void c(new Error(pt.traceNotFound),n);const i=new Cl(a,n);t((e=>[i,...e]))}catch(zp){zp instanceof Error&&c(zp,n)}},d=e=>{e.map((e=>{const t=new FileReader,n=(null===e||void 0===e?void 0:e.name)||"";t.onload=e=>{var t;const r=String(null===(t=e.target)||void 0===t?void 0:t.result);u(r,n)},t.readAsText(e)}))},h=e=>{a([]);const t=Array.from(e.target.files||[]);d(t),e.target.value=""},m=e=>()=>{(e=>{a((t=>t.filter(((t,n)=>n!==e))))})(e)},{files:p,dragging:f}=Km();return(0,r.useEffect)((()=>{d(p)}),[p]),Nt("div",{className:"vm-trace-page",children:[Nt("div",{className:"vm-trace-page-header",children:[Nt("div",{className:"vm-trace-page-header-errors",children:n.map(((e,t)=>Nt("div",{className:"vm-trace-page-header-errors-item",children:[Nt(ra,{variant:"error",children:[Nt("b",{className:"vm-trace-page-header-errors-item__filename",children:e.filename}),Nt("span",{children:e.text})]}),Nt(da,{className:"vm-trace-page-header-errors-item__close",startIcon:Nt(Ln,{}),variant:"text",color:"error",onClick:m(t)})]},`${e}_${t}`)))}),Nt("div",{children:i&&Nt(Qm,{onOpenModal:l,onChange:h})})]}),i&&Nt("div",{children:Nt(Hl,{jsonEditor:!0,traces:e,onDeleteClick:n=>{const r=e.filter((e=>e.idValue!==n.idValue));t([...r])}})}),!i&&Nt("div",{className:"vm-trace-page-preview",children:[Nt("p",{className:"vm-trace-page-preview__text",children:["Please, upload file with JSON response content.","\n","The file must contain tracing information in JSON format.","\n","In order to use tracing please refer to the doc:\xa0",Nt("a",{className:"vm-link vm-link_colored",href:"https://docs.victoriametrics.com/#query-tracing",target:"_blank",rel:"help noreferrer",children:"https://docs.victoriametrics.com/#query-tracing"}),"\n","Tracing graph will be displayed after file upload.","\n","Attach files by dragging & dropping, selecting or pasting them."]}),Nt(Qm,{onOpenModal:l,onChange:h})]}),o&&Nt(_a,{title:"Paste JSON",onClose:s,children:Nt(jl,{editable:!0,displayTitle:!0,defaultTile:`JSON ${e.length+1}`,onClose:s,onUpload:u})}),f&&Nt("div",{className:"vm-trace-page__dropzone"})]})},Gm=e=>{const{serverUrl:t}=Mt(),{period:n}=fn(),[a,i]=(0,r.useState)([]),[o,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)(),u=(0,r.useMemo)((()=>((e,t,n)=>{const r=`{job=${JSON.stringify(n)}}`;return`${e}/api/v1/label/instance/values?match[]=${encodeURIComponent(r)}&start=${t.start}&end=${t.end}`})(t,n,e)),[t,n,e]);return(0,r.useEffect)((()=>{if(!e)return;(async()=>{l(!0);try{const e=await fetch(u),t=await e.json(),n=t.data||[];i(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?c(void 0):c(`${t.errorType}\r\n${null===t||void 0===t?void 0:t.error}`)}catch(zp){zp instanceof Error&&c(`${zp.name}: ${zp.message}`)}l(!1)})().catch(console.error)}),[u]),{instances:a,isLoading:o,error:s}},Jm=(e,t)=>{const{serverUrl:n}=Mt(),{period:a}=fn(),[i,o]=(0,r.useState)([]),[l,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(),d=(0,r.useMemo)((()=>((e,t,n,r)=>{const a=Object.entries({job:n,instance:r}).filter((e=>e[1])).map((e=>{let[t,n]=e;return`${t}=${JSON.stringify(n)}`})).join(",");return`${e}/api/v1/label/__name__/values?match[]=${encodeURIComponent(`{${a}}`)}&start=${t.start}&end=${t.end}`})(n,a,e,t)),[n,a,e,t]);return(0,r.useEffect)((()=>{if(!e)return;(async()=>{s(!0);try{const e=await fetch(d),t=await e.json(),n=t.data||[];o(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?u(void 0):u(`${t.errorType}\r\n${null===t||void 0===t?void 0:t.error}`)}catch(zp){zp instanceof Error&&u(`${zp.name}: ${zp.message}`)}s(!1)})().catch(console.error)}),[d]),{names:i,isLoading:l,error:c}},Xm=e=>{let{name:t,job:n,instance:a,rateEnabled:i,isBucket:o,height:l}=e;const{isMobile:s}=ta(),{customStep:c,yaxis:u}=Br(),{period:d}=fn(),h=qr(),m=vn(),p=Zt(d.end-d.start),f=Qt(c),v=en(10*f*1e3),[g,y]=(0,r.useState)(!1),[_,b]=(0,r.useState)(!1),w=g&&c===p?v:c,k=(0,r.useMemo)((()=>{const e=Object.entries({job:n,instance:a}).filter((e=>e[1])).map((e=>{let[t,n]=e;return`${t}=${JSON.stringify(n)}`}));e.push(`__name__=${JSON.stringify(t)}`),"node_cpu_seconds_total"==t&&e.push('mode!="idle"');const r=`{${e.join(",")}}`;if(o)return`sum(rate(${r})) by (vmrange, le)`;return`\nwith (q = ${i?`rollup_rate(${r})`:`rollup(${r})`}) (\n alias(min(label_match(q, "rollup", "min")), "min"),\n alias(max(label_match(q, "rollup", "max")), "max"),\n alias(avg(label_match(q, "rollup", "avg")), "avg"),\n)`}),[t,n,a,i,o]),{isLoading:x,graphData:S,error:C,queryErrors:E,warning:N,isHistogram:A}=Tl({predefinedQuery:[k],visible:!0,customStep:w,showAllSeries:_});return(0,r.useEffect)((()=>{y(A)}),[A]),Nt("div",{className:Er()({"vm-explore-metrics-graph":!0,"vm-explore-metrics-graph_mobile":s}),children:[x&&Nt(wl,{}),C&&Nt(ra,{variant:"error",children:C}),E[0]&&Nt(ra,{variant:"error",children:E[0]}),N&&Nt(Ul,{warning:N,query:[k],onChange:b}),S&&d&&Nt(jh,{data:S,period:d,customStep:w,query:[k],yaxis:u,setYaxisLimits:e=>{h({type:"SET_YAXIS_LIMITS",payload:e})},setPeriod:e=>{let{from:t,to:n}=e;m({type:"SET_PERIOD",payload:{from:t,to:n}})},showLegend:!1,height:l,isHistogram:A})]})},ep=e=>{let{name:t,index:n,length:r,isBucket:a,rateEnabled:i,onChangeRate:o,onRemoveItem:l,onChangeOrder:s}=e;const{isMobile:c}=ta(),{value:u,setTrue:d,setFalse:h}=ma(!1),m=()=>{l(t)},p=()=>{s(t,n,n+1)},f=()=>{s(t,n,n-1)};return Nt("div",c?{className:"vm-explore-metrics-item-header vm-explore-metrics-item-header_mobile",children:[Nt("div",{className:"vm-explore-metrics-item-header__name",children:t}),Nt(da,{variant:"text",size:"small",startIcon:Nt(ur,{}),onClick:d,ariaLabel:"open panel settings"}),u&&Nt(_a,{title:t,onClose:h,children:Nt("div",{className:"vm-explore-metrics-item-header-modal",children:[Nt("div",{className:"vm-explore-metrics-item-header-modal-order",children:[Nt(da,{startIcon:Nt(Jn,{}),variant:"outlined",onClick:f,disabled:0===n,ariaLabel:"move graph up"}),Nt("p",{children:["position:",Nt("span",{className:"vm-explore-metrics-item-header-modal-order__index",children:["#",n+1]})]}),Nt(da,{endIcon:Nt(Gn,{}),variant:"outlined",onClick:p,disabled:n===r-1,ariaLabel:"move graph down"})]}),!a&&Nt("div",{className:"vm-explore-metrics-item-header-modal__rate",children:[Nt(Ti,{label:Nt("span",{children:["enable ",Nt("code",{children:"rate()"})]}),value:i,onChange:o,fullWidth:!0}),Nt("p",{children:"calculates the average per-second speed of metrics change"})]}),Nt(da,{startIcon:Nt(Ln,{}),color:"error",variant:"outlined",onClick:m,fullWidth:!0,children:"Remove graph"})]})})]}:{className:"vm-explore-metrics-item-header",children:[Nt("div",{className:"vm-explore-metrics-item-header-order",children:[Nt(ba,{title:"move graph up",children:Nt(da,{className:"vm-explore-metrics-item-header-order__up",startIcon:Nt(Fn,{}),variant:"text",color:"gray",size:"small",onClick:f,ariaLabel:"move graph up"})}),Nt("div",{className:"vm-explore-metrics-item-header__index",children:["#",n+1]}),Nt(ba,{title:"move graph down",children:Nt(da,{className:"vm-explore-metrics-item-header-order__down",startIcon:Nt(Fn,{}),variant:"text",color:"gray",size:"small",onClick:p,ariaLabel:"move graph down"})})]}),Nt("div",{className:"vm-explore-metrics-item-header__name",children:t}),!a&&Nt("div",{className:"vm-explore-metrics-item-header__rate",children:Nt(ba,{title:"calculates the average per-second speed of metric's change",children:Nt(Ti,{label:Nt("span",{children:["enable ",Nt("code",{children:"rate()"})]}),value:i,onChange:o})})}),Nt("div",{className:"vm-explore-metrics-item-header__close",children:Nt(ba,{title:"close graph",children:Nt(da,{startIcon:Nt(Ln,{}),variant:"text",color:"gray",size:"small",onClick:m,ariaLabel:"close graph"})})})]})},tp=e=>{let{name:t,job:n,instance:a,index:i,length:o,size:l,onRemoveItem:s,onChangeOrder:c}=e;const u=(0,r.useMemo)((()=>/_sum?|_total?|_count?/.test(t)),[t]),d=(0,r.useMemo)((()=>/_bucket?/.test(t)),[t]),[h,m]=(0,r.useState)(u),p=Tr(),f=(0,r.useMemo)(l.height,[l,p]);return(0,r.useEffect)((()=>{m(u)}),[n]),Nt("div",{className:"vm-explore-metrics-item vm-block vm-block_empty-padding",children:[Nt(ep,{name:t,index:i,length:o,isBucket:d,rateEnabled:h,size:l.id,onChangeRate:m,onRemoveItem:s,onChangeOrder:c}),Nt(Xm,{name:t,job:n,instance:a,rateEnabled:h,isBucket:d,height:f},`${t}_${n}_${a}_${h}`)]})},np=e=>{let{values:t,onRemoveItem:n}=e;const{isMobile:r}=ta();return r?Nt("span",{className:"vm-select-input-content__counter",children:["selected ",t.length]}):Nt(Ct.FK,{children:t.map((e=>{return Nt("div",{className:"vm-select-input-content__selected",children:[Nt("span",{children:e}),Nt("div",{onClick:(t=e,e=>{n(t),e.stopPropagation()}),children:Nt(Ln,{})})]},e);var t}))})},rp=e=>{let{value:t,list:n,label:a,placeholder:i,noOptionsText:o,clearable:l=!1,searchable:s=!1,autofocus:c,disabled:u,onChange:d}=e;const{isDarkTheme:h}=Mt(),{isMobile:m}=ta(),[p,f]=(0,r.useState)(""),v=(0,r.useRef)(null),[g,y]=(0,r.useState)(null),[_,b]=(0,r.useState)(!1),w=(0,r.useRef)(null),k=Array.isArray(t),x=Array.isArray(t)?t:void 0,S=m&&k&&!(null===x||void 0===x||!x.length),C=(0,r.useMemo)((()=>_?p:Array.isArray(t)?"":t),[t,p,_,k]),E=(0,r.useMemo)((()=>_?p||"(.+)":""),[p,_]),N=()=>{w.current&&w.current.blur()},A=()=>{b(!1),N()},M=e=>{f(""),d(e),k||A(),k&&w.current&&w.current.focus()};return(0,r.useEffect)((()=>{f(""),_&&w.current&&w.current.focus(),_||N()}),[_,w]),(0,r.useEffect)((()=>{c&&w.current&&!m&&w.current.focus()}),[c,w]),Mr("keyup",(e=>{w.current!==e.target&&b(!1)})),ua(v,A,g),Nt("div",{className:Er()({"vm-select":!0,"vm-select_dark":h,"vm-select_disabled":u}),children:[Nt("div",{className:"vm-select-input",onClick:e=>{e.target instanceof HTMLInputElement||u||b((e=>!e))},ref:v,children:[Nt("div",{className:"vm-select-input-content",children:[!(null===x||void 0===x||!x.length)&&Nt(np,{values:x,onRemoveItem:M}),!S&&Nt("input",{value:C,type:"text",placeholder:i,onInput:e=>{f(e.target.value)},onFocus:()=>{u||b(!0)},onBlur:()=>{n.includes(p)&&d(p)},ref:w,readOnly:m||!s})]}),a&&Nt("span",{className:"vm-text-field__label",children:a}),l&&t&&Nt("div",{className:"vm-select-input__icon",onClick:(e=>t=>{M(e),t.stopPropagation()})(""),children:Nt(Ln,{})}),Nt("div",{className:Er()({"vm-select-input__icon":!0,"vm-select-input__icon_open":_}),children:Nt(jn,{})})]}),Nt(Ui,{label:a,value:E,options:n.map((e=>({value:e}))),anchor:v,selected:x,minLength:1,fullWidth:!0,noOptionsText:o,onSelect:M,onOpenAutocomplete:b,onChangeWrapperRef:y})]})},ap=st.map((e=>e.id)),ip=e=>{let{jobs:t,instances:n,names:a,job:i,instance:o,size:l,selectedMetrics:s,onChangeJob:c,onChangeInstance:u,onToggleMetric:d,onChangeSize:h}=e;const m=(0,r.useMemo)((()=>i?"":"No instances. Please select job"),[i]),p=(0,r.useMemo)((()=>i?"":"No metric names. Please select job"),[i]),{isMobile:f}=ta(),{value:v,toggle:g,setFalse:y}=ma("false"!==et("EXPLORE_METRICS_TIPS"));return(0,r.useEffect)((()=>{Xe("EXPLORE_METRICS_TIPS",`${v}`)}),[v]),Nt(Ct.FK,{children:[Nt("div",{className:Er()({"vm-explore-metrics-header":!0,"vm-explore-metrics-header_mobile":f,"vm-block":!0,"vm-block_mobile":f}),children:[Nt("div",{className:"vm-explore-metrics-header__job",children:Nt(rp,{value:i,list:t,label:"Job",placeholder:"Please select job",onChange:c,autofocus:!i&&!!t.length&&!f,searchable:!0})}),Nt("div",{className:"vm-explore-metrics-header__instance",children:Nt(rp,{value:o,list:n,label:"Instance",placeholder:"Please select instance",onChange:u,noOptionsText:m,clearable:!0,searchable:!0})}),Nt("div",{className:"vm-explore-metrics-header__size",children:[Nt(rp,{label:"Size graphs",value:l,list:ap,onChange:h}),Nt(ba,{title:(v?"Hide":"Show")+" tip",children:Nt(da,{variant:"text",color:v?"warning":"gray",startIcon:Nt(hr,{}),onClick:g,ariaLabel:"visibility tips"})})]}),Nt("div",{className:"vm-explore-metrics-header-metrics",children:Nt(rp,{label:"Metrics",value:s,list:a,placeholder:"Search metric name",onChange:d,noOptionsText:p,clearable:!0,searchable:!0})})]}),v&&Nt(ra,{variant:"warning",children:Nt("div",{className:"vm-explore-metrics-header-description",children:[Nt("p",{children:["Please note: this page is solely designed for exploring Prometheus metrics. Prometheus metrics always contain ",Nt("code",{children:"job"})," and ",Nt("code",{children:"instance"})," labels (see ",Nt("a",{className:"vm-link vm-link_colored",href:"https://prometheus.io/docs/concepts/jobs_instances/",children:"these docs"}),"), and this page relies on them as filters. ",Nt("br",{}),"Please use this page for Prometheus metrics only, in accordance with their naming conventions."]}),Nt(da,{variant:"text",size:"small",startIcon:Nt(Ln,{}),onClick:y,ariaLabel:"close tips"})]})})]})},op=ut("job",""),lp=ut("instance",""),sp=ut("metrics",""),cp=ut("size",""),up=st.find((e=>cp?e.id===cp:e.isDefault))||st[0],dp=()=>{const[e,t]=(0,r.useState)(op),[n,a]=(0,r.useState)(lp),[i,o]=(0,r.useState)(sp?sp.split("&"):[]),[l,s]=(0,r.useState)(up);(e=>{let{job:t,instance:n,metrics:a,size:i}=e;const{duration:o,relativeTime:l,period:{date:s}}=fn(),{customStep:c}=Br(),{setSearchParamsFromKeys:u}=hi(),d=()=>{const e=lm({"g0.range_input":o,"g0.end_input":s,"g0.step_input":c,"g0.relative_time":l,size:i,job:t,instance:n,metrics:a});u(e)};(0,r.useEffect)(d,[o,l,s,c,t,n,a,i]),(0,r.useEffect)(d,[])})({job:e,instance:n,metrics:i.join("&"),size:l.id});const{jobs:c,isLoading:u,error:d}=(()=>{const{serverUrl:e}=Mt(),{period:t}=fn(),[n,a]=(0,r.useState)([]),[i,o]=(0,r.useState)(!1),[l,s]=(0,r.useState)(),c=(0,r.useMemo)((()=>((e,t)=>`${e}/api/v1/label/job/values?start=${t.start}&end=${t.end}`)(e,t)),[e,t]);return(0,r.useEffect)((()=>{(async()=>{o(!0);try{const e=await fetch(c),t=await e.json(),n=t.data||[];a(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?s(void 0):s(`${t.errorType}\r\n${null===t||void 0===t?void 0:t.error}`)}catch(zp){zp instanceof Error&&s(`${zp.name}: ${zp.message}`)}o(!1)})().catch(console.error)}),[c]),{jobs:n,isLoading:i,error:l}})(),{instances:h,isLoading:m,error:p}=Gm(e),{names:f,isLoading:v,error:g}=Jm(e,n),y=(0,r.useMemo)((()=>u||m||v),[u,m,v]),_=(0,r.useMemo)((()=>d||p||g),[d,p,g]),b=e=>{o(e?t=>t.includes(e)?t.filter((t=>t!==e)):[...t,e]:[])},w=(e,t,n)=>{const r=n>i.length-1;n<0||r||o((e=>{const r=[...e],[a]=r.splice(t,1);return r.splice(n,0,a),r}))};return(0,r.useEffect)((()=>{n&&h.length&&!h.includes(n)&&a("")}),[h,n]),Nt("div",{className:"vm-explore-metrics",children:[Nt(ip,{jobs:c,instances:h,names:f,job:e,size:l.id,instance:n,selectedMetrics:i,onChangeJob:t,onChangeSize:e=>{const t=st.find((t=>t.id===e));t&&s(t)},onChangeInstance:a,onToggleMetric:b}),y&&Nt(wl,{}),_&&Nt(ra,{variant:"error",children:_}),!e&&Nt(ra,{variant:"info",children:"Please select job to see list of metric names."}),e&&!i.length&&Nt(ra,{variant:"info",children:"Please select metric names to see the graphs."}),Nt("div",{className:"vm-explore-metrics-body",children:i.map(((t,r)=>Nt(tp,{name:t,job:e,instance:n,index:r,length:i.length,size:l,onRemoveItem:b,onChangeOrder:w},t)))})]})},hp=()=>{const t=fl();return Nt("div",{className:"vm-preview-icons",children:Object.entries(e).map((e=>{let[n,r]=e;return Nt("div",{className:"vm-preview-icons-item",onClick:(a=n,async()=>{await t(`<${a}/>`,`<${a}/> has been copied`)}),children:[Nt("div",{className:"vm-preview-icons-item__svg",children:r()}),Nt("div",{className:"vm-preview-icons-item__name",children:`<${n}/>`})]},n);var a}))})};var mp=function(e){return e.copy="Copy",e.copied="Copied",e}(mp||{});const pp=e=>{let{code:t}=e;const[n,a]=(0,r.useState)(mp.copy);return(0,r.useEffect)((()=>{let e=null;return n===mp.copied&&(e=setTimeout((()=>a(mp.copy)),1e3)),()=>{e&&clearTimeout(e)}}),[n]),Nt("code",{className:"vm-code-example",children:[t,Nt("div",{className:"vm-code-example__copy",children:Nt(ba,{title:n,children:Nt(da,{size:"small",variant:"text",onClick:()=>{navigator.clipboard.writeText(t),a(mp.copied)},startIcon:Nt(rr,{}),ariaLabel:"close"})})})]})},fp=()=>Nt("a",{className:"vm-link vm-link_colored",href:"https://docs.victoriametrics.com/MetricsQL.html",target:"_blank",rel:"help noreferrer",children:"MetricsQL"}),vp=()=>Nt("a",{className:"vm-link vm-link_colored",href:"https://grafana.com/grafana/dashboards/1860-node-exporter-full/",target:"_blank",rel:"help noreferrer",children:"Node Exporter Full"}),gp=()=>Nt("section",{className:"vm-with-template-tutorial",children:[Nt("h2",{className:"vm-with-template-tutorial__title",children:["Tutorial for WITH expressions in ",Nt(fp,{})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:["Let's look at the following real query from ",Nt(vp,{})," dashboard:"]}),Nt(pp,{code:'(\n (\n node_memory_MemTotal_bytes{instance=~"$node:$port", job=~"$job"}\n -\n node_memory_MemFree_bytes{instance=~"$node:$port", job=~"$job"}\n )\n /\n node_memory_MemTotal_bytes{instance=~"$node:$port", job=~"$job"}\n) * 100'}),Nt("p",{className:"vm-with-template-tutorial-section__text",children:"It is clear the query calculates the percentage of used memory for the given $node, $port and $job. Isn't it? :)"})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:"What's wrong with this query? Copy-pasted label filters for distinct timeseries which makes it easy to mistype these filters during modification. Let's simplify the query with WITH expressions:"}),Nt(pp,{code:'WITH (\n commonFilters = {instance=~"$node:$port",job=~"$job"}\n)\n(\n node_memory_MemTotal_bytes{commonFilters}\n -\n node_memory_MemFree_bytes{commonFilters}\n)\n /\nnode_memory_MemTotal_bytes{commonFilters} * 100'})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:["Now label filters are located in a single place instead of three distinct places. The query mentions node_memory_MemTotal_bytes metric twice and ","{commonFilters}"," three times. WITH expressions may improve this:"]}),Nt(pp,{code:'WITH (\n my_resource_utilization(free, limit, filters) = (limit{filters} - free{filters}) / limit{filters} * 100\n)\nmy_resource_utilization(\n node_memory_MemFree_bytes,\n node_memory_MemTotal_bytes,\n {instance=~"$node:$port",job=~"$job"},\n)'}),Nt("p",{className:"vm-with-template-tutorial-section__text",children:"Now the template function my_resource_utilization() may be used for monitoring arbitrary resources - memory, CPU, network, storage, you name it."})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:["Let's take another nice query from ",Nt(vp,{})," dashboard:"]}),Nt(pp,{code:'(\n (\n (\n count(\n count(node_cpu_seconds_total{instance=~"$node:$port",job=~"$job"}) by (cpu)\n )\n )\n -\n avg(\n sum by (mode) (rate(node_cpu_seconds_total{mode=\'idle\',instance=~"$node:$port",job=~"$job"}[5m]))\n )\n )\n *\n 100\n)\n /\ncount(\n count(node_cpu_seconds_total{instance=~"$node:$port",job=~"$job"}) by (cpu)\n)'}),Nt("p",{className:"vm-with-template-tutorial-section__text",children:"Do you understand what does this mess do? Is it manageable? :) WITH expressions are happy to help in a few iterations."})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:"1. Extract common filters used in multiple places into a commonFilters variable:"}),Nt(pp,{code:'WITH (\n commonFilters = {instance=~"$node:$port",job=~"$job"}\n)\n(\n (\n (\n count(\n count(node_cpu_seconds_total{commonFilters}) by (cpu)\n )\n )\n -\n avg(\n sum by (mode) (rate(node_cpu_seconds_total{mode=\'idle\',commonFilters}[5m]))\n )\n )\n *\n 100\n)\n /\ncount(\n count(node_cpu_seconds_total{commonFilters}) by (cpu)\n)'})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:'2. Extract "count(count(...) by (cpu))" into cpuCount variable:'}),Nt(pp,{code:'WITH (\n commonFilters = {instance=~"$node:$port",job=~"$job"},\n cpuCount = count(count(node_cpu_seconds_total{commonFilters}) by (cpu))\n)\n(\n (\n cpuCount\n -\n avg(\n sum by (mode) (rate(node_cpu_seconds_total{mode=\'idle\',commonFilters}[5m]))\n )\n )\n *\n 100\n) / cpuCount'})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:"3. Extract rate(...) part into cpuIdle variable, since it is clear now that this part calculates the number of idle CPUs:"}),Nt(pp,{code:'WITH (\n commonFilters = {instance=~"$node:$port",job=~"$job"},\n cpuCount = count(count(node_cpu_seconds_total{commonFilters}) by (cpu)),\n cpuIdle = sum(rate(node_cpu_seconds_total{mode=\'idle\',commonFilters}[5m]))\n)\n((cpuCount - cpuIdle) * 100) / cpuCount'})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:["4. Put node_cpu_seconds_total","{commonFilters}"," into its own varialbe with the name cpuSeconds:"]}),Nt(pp,{code:'WITH (\n cpuSeconds = node_cpu_seconds_total{instance=~"$node:$port",job=~"$job"},\n cpuCount = count(count(cpuSeconds) by (cpu)),\n cpuIdle = sum(rate(cpuSeconds{mode=\'idle\'}[5m]))\n)\n((cpuCount - cpuIdle) * 100) / cpuCount'}),Nt("p",{className:"vm-with-template-tutorial-section__text",children:"Now the query became more clear comparing to the initial query."})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:"WITH expressions may be nested and may be put anywhere. Try expanding the following query:"}),Nt(pp,{code:"WITH (\n f(a, b) = WITH (\n f1(x) = b-x,\n f2(x) = x+x\n ) f1(a)*f2(b)\n) f(foo, with(x=bar) x)"})]})]}),yp=()=>{const{serverUrl:e}=Mt(),[t,n]=je(),[a,i]=(0,r.useState)(""),[o,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)();return{data:a,error:s,loading:o,expand:async r=>{t.set("expr",r),n(t);const a=((e,t)=>`${e}/expand-with-exprs?query=${encodeURIComponent(t)}&format=json`)(e,r);l(!0);try{const e=await fetch(a),t=await e.json();i((null===t||void 0===t?void 0:t.expr)||""),c(String(t.error||""))}catch(zp){zp instanceof Error&&"AbortError"!==zp.name&&c(`${zp.name}: ${zp.message}`)}l(!1)}}},_p=()=>{const[e]=je(),{data:t,loading:n,error:a,expand:i}=yp(),[o,l]=(0,r.useState)(e.get("expr")||""),s=()=>{i(o)};return(0,r.useEffect)((()=>{o&&i(o)}),[]),Nt("section",{className:"vm-with-template",children:[n&&Nt(wl,{}),Nt("div",{className:"vm-with-template-body vm-block",children:[Nt("div",{className:"vm-with-template-body__expr",children:Nt(Ka,{type:"textarea",label:"MetricsQL query with optional WITH expressions",value:o,error:a,autofocus:!0,onEnter:s,onChange:e=>{l(e)}})}),Nt("div",{className:"vm-with-template-body__result",children:Nt(Ka,{type:"textarea",label:"MetricsQL query after expanding WITH expressions and applying other optimizations",value:t,disabled:!0})}),Nt("div",{className:"vm-with-template-body-top",children:Nt(da,{variant:"contained",onClick:s,startIcon:Nt(qn,{}),children:"Expand"})})]}),Nt("div",{className:"vm-block",children:Nt(gp,{})})]})},bp=()=>{const{serverUrl:e}=Mt(),[t,n]=(0,r.useState)(null),[a,i]=(0,r.useState)(!1),[o,l]=(0,r.useState)();return{data:t,error:o,loading:a,fetchData:async(t,r)=>{const a=((e,t,n)=>`${e}/metric-relabel-debug?${["format=json",`relabel_configs=${encodeURIComponent(t)}`,`metric=${encodeURIComponent(n)}`].join("&")}`)(e,t,r);i(!0);try{const e=await fetch(a),t=await e.json();n(t.error?null:t),l(String(t.error||""))}catch(zp){zp instanceof Error&&"AbortError"!==zp.name&&l(`${zp.name}: ${zp.message}`)}i(!1)}}},wp={config:'- if: \'{bar_label=~"b.*"}\'\n source_labels: [foo_label, bar_label]\n separator: "_"\n target_label: foobar\n- action: labeldrop\n regex: "foo_.*"\n- target_label: job\n replacement: "my-application-2"',labels:'{__name__="my_metric", bar_label="bar", foo_label="foo", job="my-application", instance="192.168.0.1"}'},kp=()=>{const[e,t]=je(),{data:n,loading:a,error:i,fetchData:o}=bp(),[l,s]=bm("","config"),[c,u]=bm("","labels"),d=(0,r.useCallback)((()=>{o(l,c),e.set("config",l),e.set("labels",c),t(e)}),[l,c]);return(0,r.useEffect)((()=>{const t=e.get("config")||"",n=e.get("labels")||"";(n||t)&&(o(t,n),s(t),u(n))}),[]),Nt("section",{className:"vm-relabeling",children:[a&&Nt(wl,{}),Nt("div",{className:"vm-relabeling-header vm-block",children:[Nt("div",{className:"vm-relabeling-header-configs",children:Nt(Ka,{type:"textarea",label:"Relabel configs",value:l,autofocus:!0,onChange:e=>{s(e||"")},onEnter:d})}),Nt("div",{className:"vm-relabeling-header__labels",children:Nt(Ka,{type:"textarea",label:"Labels",value:c,onChange:e=>{u(e||"")},onEnter:d})}),Nt("div",{className:"vm-relabeling-header-bottom",children:[Nt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/relabeling.html",rel:"help noreferrer",children:[Nt(In,{}),"Relabeling cookbook"]}),Nt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/vmagent.html#relabeling",rel:"help noreferrer",children:[Nt(or,{}),"Documentation"]}),Nt(da,{variant:"text",onClick:()=>{const{config:n,labels:r}=wp;s(n),u(r),o(n,r),e.set("config",n),e.set("labels",r),t(e)},children:"Try example"}),Nt(da,{variant:"contained",onClick:d,startIcon:Nt(qn,{}),children:"Submit"})]})]}),i&&Nt(ra,{variant:"error",children:i}),n&&Nt("div",{className:"vm-relabeling-steps vm-block",children:[n.originalLabels&&Nt("div",{className:"vm-relabeling-steps-item",children:Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Original labels:"}),Nt("code",{dangerouslySetInnerHTML:{__html:n.originalLabels}})]})}),n.steps.map(((e,t)=>Nt("div",{className:"vm-relabeling-steps-item",children:[Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Step:"}),t+1]}),Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Relabeling Rule:"}),Nt("code",{children:Nt("pre",{children:e.rule})})]}),Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Input Labels:"}),Nt("code",{children:Nt("pre",{dangerouslySetInnerHTML:{__html:e.inLabels}})})]}),Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Output labels:"}),Nt("code",{children:Nt("pre",{dangerouslySetInnerHTML:{__html:e.outLabels}})})]})]},t))),n.resultingLabels&&Nt("div",{className:"vm-relabeling-steps-item",children:Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Resulting labels:"}),Nt("code",{dangerouslySetInnerHTML:{__html:n.resultingLabels}})]})})]})]})},xp=e=>{let{rows:t,columns:n,defaultOrderBy:a,defaultOrderDir:i,copyToClipboard:o,paginationOffset:l}=e;const[s,c]=(0,r.useState)(a),[u,d]=(0,r.useState)(i||"desc"),[h,m]=(0,r.useState)(null),p=(0,r.useMemo)((()=>{const{startIndex:e,endIndex:n}=l;return Em(t,Cm(u,s)).slice(e,n)}),[t,s,u,l]),f=(e,t)=>async()=>{if(h!==t)try{await navigator.clipboard.writeText(String(e)),m(t)}catch(zp){console.error(zp)}};return(0,r.useEffect)((()=>{if(null===h)return;const e=setTimeout((()=>m(null)),2e3);return()=>clearTimeout(e)}),[h]),Nt("table",{className:"vm-table",children:[Nt("thead",{className:"vm-table-header",children:Nt("tr",{className:"vm-table__row vm-table__row_header",children:[n.map((e=>{return Nt("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:(t=e.key,()=>{d((e=>"asc"===e&&s===t?"desc":"asc")),c(t)}),children:Nt("div",{className:"vm-table-cell__content",children:[Nt("div",{children:String(e.title||e.key)}),Nt("div",{className:Er()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":s===e.key,"vm-table__sort-icon_desc":"desc"===u&&s===e.key}),children:Nt(jn,{})})]})},String(e.key));var t})),o&&Nt("th",{className:"vm-table-cell vm-table-cell_header"})]})}),Nt("tbody",{className:"vm-table-body",children:p.map(((e,t)=>Nt("tr",{className:"vm-table__row",children:[n.map((t=>Nt("td",{className:Er()({"vm-table-cell":!0,[`${t.className}`]:t.className}),children:e[t.key]||"-"},String(t.key)))),o&&Nt("td",{className:"vm-table-cell vm-table-cell_right",children:e[o]&&Nt("div",{className:"vm-table-cell__content",children:Nt(ba,{title:h===t?"Copied":"Copy row",children:Nt(da,{variant:"text",color:h===t?"success":"gray",size:"small",startIcon:Nt(h===t?Xn:rr,{}),onClick:f(e[o],t),ariaLabel:"copy row"})})})})]},t)))})]})},Sp=()=>{const{isMobile:e}=ta(),{timezone:t}=fn(),{data:n,lastUpdated:a,isLoading:o,error:l,fetchData:s}=(()=>{const{serverUrl:e}=Mt(),[t,n]=(0,r.useState)([]),[a,o]=(0,r.useState)(i()().format(It)),[l,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(),d=(0,r.useMemo)((()=>`${e}/api/v1/status/active_queries`),[e]),h=async()=>{s(!0);try{const e=await fetch(d),t=await e.json();n(t.data),o(i()().format("HH:mm:ss:SSS")),e.ok?u(void 0):u(`${t.errorType}\r\n${null===t||void 0===t?void 0:t.error}`)}catch(zp){zp instanceof Error&&u(`${zp.name}: ${zp.message}`)}s(!1)};return(0,r.useEffect)((()=>{h().catch(console.error)}),[d]),{data:t,lastUpdated:a,isLoading:l,error:c,fetchData:h}})(),c=(0,r.useMemo)((()=>n.map((e=>{const t=i()(e.start).tz().format(Pt),n=i()(e.end).tz().format(Pt);return{duration:e.duration,remote_addr:e.remote_addr,query:e.query,args:`${t} to ${n}, step=${Wt(e.step)}`,data:JSON.stringify(e,null,2)}}))),[n,t]),u=(0,r.useMemo)((()=>{if(null===c||void 0===c||!c.length)return[];const e=Object.keys(c[0]),t={remote_addr:"client address"},n=["data"];return e.filter((e=>!n.includes(e))).map((e=>({key:e,title:t[e]||e})))}),[c]);return Nt("div",{className:"vm-active-queries",children:[o&&Nt(wl,{}),Nt("div",{className:"vm-active-queries-header",children:[!c.length&&!l&&Nt(ra,{variant:"info",children:"There are currently no active queries running"}),l&&Nt(ra,{variant:"error",children:l}),Nt("div",{className:"vm-active-queries-header-controls",children:[Nt(da,{variant:"contained",onClick:async()=>{s().catch(console.error)},startIcon:Nt(zn,{}),children:"Update"}),Nt("div",{className:"vm-active-queries-header__update-msg",children:["Last updated: ",a]})]})]}),!!c.length&&Nt("div",{className:Er()({"vm-block":!0,"vm-block_mobile":e}),children:Nt(xp,{rows:c,columns:u,defaultOrderBy:"duration",copyToClipboard:"data",paginationOffset:{startIndex:0,endIndex:1/0}})})]})},Cp=e=>{let{onClose:t,onUpload:n}=e;const{isMobile:a}=ta(),[i,o]=(0,r.useState)(""),[l,s]=(0,r.useState)(""),c=(0,r.useMemo)((()=>{try{return JSON.parse(i),""}catch(zp){return zp instanceof Error?zp.message:"Unknown error"}}),[i]),u=()=>{s(c),c||(n(i),t())};return Nt("div",{className:Er()({"vm-json-form vm-json-form_one-field":!0,"vm-json-form_mobile vm-json-form_one-field_mobile":a}),children:[Nt(Ka,{value:i,label:"JSON",type:"textarea",error:l,autofocus:!0,onChange:e=>{s(""),o(e)},onEnter:u}),Nt("div",{className:"vm-json-form-footer",children:Nt("div",{className:"vm-json-form-footer__controls vm-json-form-footer__controls_right",children:[Nt(da,{variant:"outlined",color:"error",onClick:t,children:"Cancel"}),Nt(da,{variant:"contained",onClick:u,children:"apply"})]})})]})},Ep=e=>{let{data:t,period:n}=e;const{isMobile:a}=ta(),{tableCompact:i}=Fr(),o=jr(),[l,s]=(0,r.useState)([]),[c,u]=(0,r.useState)(),[d,h]=(0,r.useState)(),[m,p]=(0,r.useState)(!1),[f,v]=(0,r.useState)([]),[g,y]=(0,r.useState)(),_=(0,r.useMemo)((()=>Wh(d||[]).map((e=>e.key))),[d]),b=(0,r.useMemo)((()=>{const e=t.some((e=>"matrix"===e.data.resultType));return t.some((e=>"vector"===e.data.resultType))&&e?Lr:e?Lr.filter((e=>"chart"===e.value)):Lr.filter((e=>"chart"!==e.value))}),[t]),[w,k]=(0,r.useState)(b[0].value),{yaxis:x,spanGaps:S}=Br(),C=qr(),E=e=>{C({type:"SET_YAXIS_LIMITS",payload:e})};return(0,r.useEffect)((()=>{const e="chart"===w?"matrix":"vector",n=t.filter((t=>t.data.resultType===e&&t.trace)).map((e=>{var t,n;return e.trace?new Cl(e.trace,(null===e||void 0===e||null===(t=e.vmui)||void 0===t||null===(n=t.params)||void 0===n?void 0:n.query)||"Query"):null}));s(n.filter(Boolean))}),[t,w]),(0,r.useEffect)((()=>{const e=[],n=[],r=[];t.forEach(((t,a)=>{const i=t.data.result.map((e=>{var n,r,i;return{...e,group:Number(null!==(n=null===(r=t.vmui)||void 0===r||null===(i=r.params)||void 0===i?void 0:i.id)&&void 0!==n?n:a)+1}}));var o,l;"matrix"===t.data.resultType?(n.push(...i),e.push((null===(o=t.vmui)||void 0===o||null===(l=o.params)||void 0===l?void 0:l.query)||"Query")):r.push(...i)})),v(e),u(n),h(r)}),[t]),(0,r.useEffect)((()=>{p(!!c&&Al(c))}),[c]),Nt("div",{className:Er()({"vm-query-analyzer-view":!0,"vm-query-analyzer-view_mobile":a}),children:[!!l.length&&Nt(Hl,{traces:l,onDeleteClick:e=>{s((t=>t.filter((t=>t.idValue!==e.idValue))))}}),Nt("div",{className:Er()({"vm-block":!0,"vm-block_mobile":a}),children:[Nt("div",{className:"vm-custom-panel-body-header",children:[Nt("div",{className:"vm-custom-panel-body-header__tabs",children:Nt($r,{activeItem:w,items:b,onChange:e=>{k(e)}})}),Nt("div",{className:"vm-custom-panel-body-header__graph-controls",children:["chart"===w&&Nt(Ca,{}),"chart"===w&&Nt(Bh,{yaxis:x,setYaxisLimits:E,toggleEnableLimits:()=>{C({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})},spanGaps:{value:S,onChange:e=>{C({type:"SET_SPAN_GAPS",payload:e})}}}),"table"===w&&Nt(Jh,{columns:_,selectedColumns:g,onChangeColumns:y,tableCompact:i,toggleTableCompact:()=>{o({type:"TOGGLE_TABLE_COMPACT"})}})]})]}),c&&n&&"chart"===w&&Nt(jh,{data:c,period:n,customStep:n.step||"1s",query:f,yaxis:x,setYaxisLimits:E,setPeriod:()=>null,height:a?.5*window.innerHeight:500,isHistogram:m,spanGaps:S}),d&&"code"===w&&Nt(Yh,{data:d}),d&&"table"===w&&Nt(Qh,{data:d,displayColumns:g})]})]})},Np=e=>{var t,n;let{data:a,period:o}=e;const l=(0,r.useMemo)((()=>a.filter((e=>e.stats&&"matrix"===e.data.resultType))),[a]),s=(0,r.useMemo)((()=>{var e,t;return null===(e=a.find((e=>{var t;return null===e||void 0===e||null===(t=e.vmui)||void 0===t?void 0:t.comment})))||void 0===e||null===(t=e.vmui)||void 0===t?void 0:t.comment}),[a]),c=(0,r.useMemo)((()=>{if(!o)return"";return`${i()(1e3*o.start).tz().format(Pt)} - ${i()(1e3*o.end).tz().format(Pt)}`}),[o]),{value:u,setTrue:d,setFalse:h}=ma(!1);return Nt(Ct.FK,{children:[Nt("div",{className:"vm-query-analyzer-info-header",children:[Nt(da,{startIcon:Nt(In,{}),variant:"outlined",color:"warning",onClick:d,children:"Show report info"}),o&&Nt(Ct.FK,{children:[Nt("div",{className:"vm-query-analyzer-info-header__period",children:[Nt(ir,{})," step: ",o.step]}),Nt("div",{className:"vm-query-analyzer-info-header__period",children:[Nt(Hn,{})," ",c]})]})]}),u&&Nt(_a,{title:"Report info",onClose:h,children:Nt("div",{className:"vm-query-analyzer-info",children:[s&&Nt("div",{className:"vm-query-analyzer-info-item vm-query-analyzer-info-item_comment",children:[Nt("div",{className:"vm-query-analyzer-info-item__title",children:"Comment:"}),Nt("div",{className:"vm-query-analyzer-info-item__text",children:s})]}),l.map(((e,t)=>{var n;return Nt("div",{className:"vm-query-analyzer-info-item",children:[Nt("div",{className:"vm-query-analyzer-info-item__title",children:l.length>1?`Query ${t+1}:`:"Stats:"}),Nt("div",{className:"vm-query-analyzer-info-item__text",children:[Object.entries(e.stats||{}).map((e=>{let[t,n]=e;return Nt("div",{children:[t,": ",null!==n&&void 0!==n?n:"-"]},t)})),"isPartial: ",String(null!==(n=e.isPartial)&&void 0!==n?n:"-")]})]},t)})),Nt("div",{className:"vm-query-analyzer-info-type",children:null!==(t=l[0])&&void 0!==t&&null!==(n=t.vmui)&&void 0!==n&&n.params?"The report was created using vmui":"The report was created manually"})]})})]})},Ap=()=>{const[e,t]=(0,r.useState)([]),[n,a]=(0,r.useState)(""),i=(0,r.useMemo)((()=>!!e.length),[e]),{value:o,setTrue:l,setFalse:s}=ma(!1),c=(0,r.useMemo)((()=>{var t,n;if(!e)return;const r=null===(t=e[0])||void 0===t||null===(n=t.vmui)||void 0===n?void 0:n.params,a={start:+((null===r||void 0===r?void 0:r.start)||0),end:+((null===r||void 0===r?void 0:r.end)||0),step:null===r||void 0===r?void 0:r.step,date:""};if(!r){const t=e.filter((e=>"matrix"===e.data.resultType)).map((e=>e.data.result)).flat().map((e=>{var t;return e.values?null===(t=e.values)||void 0===t?void 0:t.map((e=>e[0])):[0]})).flat(),n=Array.from(new Set(t.filter(Boolean))).sort(((e,t)=>e-t));a.start=n[0],a.end=n[n.length-1],a.step=Yt((e=>{const t=e.slice(1).map(((t,n)=>t-e[n])),n={};t.forEach((e=>{const t=e.toString();n[t]=(n[t]||0)+1}));let r=0,a=0;for(const i in n)n[i]>a&&(a=n[i],r=Number(i));return r})(n))}return a.date=Jt(tn(a.end)),a}),[e]),u=e=>{try{const n=JSON.parse(e),r=Array.isArray(n)?n:[n];(e=>e.every((e=>{if("object"===typeof e&&null!==e){const t=e.data;if("object"===typeof t&&null!==t){const e=t.result,n=t.resultType;return Array.isArray(e)&&"string"===typeof n}}return!1})))(r)?t(r):a("Invalid structure - JSON does not match the expected format")}catch(zp){zp instanceof Error&&a(`${zp.name}: ${zp.message}`)}},d=e=>{e.map((e=>{const t=new FileReader;t.onload=e=>{var t;const n=String(null===(t=e.target)||void 0===t?void 0:t.result);u(n)},t.readAsText(e)}))},h=e=>{a("");const t=Array.from(e.target.files||[]);d(t),e.target.value=""},{files:m,dragging:p}=Km();return(0,r.useEffect)((()=>{d(m)}),[m]),Nt("div",{className:"vm-trace-page",children:[i&&Nt("div",{className:"vm-trace-page-header",children:[Nt("div",{className:"vm-trace-page-header-errors",children:Nt(Np,{data:e,period:c})}),Nt("div",{children:Nt(Qm,{onOpenModal:l,onChange:h})})]}),n&&Nt("div",{className:"vm-trace-page-header-errors-item vm-trace-page-header-errors-item_margin-bottom",children:[Nt(ra,{variant:"error",children:n}),Nt(da,{className:"vm-trace-page-header-errors-item__close",startIcon:Nt(Ln,{}),variant:"text",color:"error",onClick:()=>{a("")}})]}),i&&Nt(Ep,{data:e,period:c}),!i&&Nt("div",{className:"vm-trace-page-preview",children:[Nt("p",{className:"vm-trace-page-preview__text",children:["Please, upload file with JSON response content.","\n","The file must contain query information in JSON format.","\n","Graph will be displayed after file upload.","\n","Attach files by dragging & dropping, selecting or pasting them."]}),Nt(Qm,{onOpenModal:l,onChange:h})]}),o&&Nt(_a,{title:"Paste JSON",onClose:s,children:Nt(Cp,{onClose:s,onUpload:u})}),p&&Nt("div",{className:"vm-trace-page__dropzone"})]})},Mp=()=>{const{serverUrl:e}=Mt(),[t,n]=je(),[a,i]=(0,r.useState)(new Map),[o,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)(),[u,d]=(0,r.useState)(),[h,m]=(0,r.useState)();return{data:a,error:h,metricsError:s,flagsError:u,loading:o,applyFilters:(0,r.useCallback)((async(r,a)=>{if(c(a?"":"metrics are required"),d(r?"":"flags are required"),!a||!r)return;t.set("flags",r),t.set("metrics",a),n(t);const o=((e,t,n)=>`${e}/downsampling-filters-debug?${[`flags=${encodeURIComponent(t)}`,`metrics=${encodeURIComponent(n)}`].join("&")}`)(e,r,a);l(!0);try{var s,u;const e=await fetch(o),t=await e.json();i(new Map(Object.entries(t.result||{}))),c((null===(s=t.error)||void 0===s?void 0:s.metrics)||""),d((null===(u=t.error)||void 0===u?void 0:u.flags)||""),m("")}catch(zp){zp instanceof Error&&"AbortError"!==zp.name&&m(`${zp.name}: ${zp.message}`)}l(!1)}),[e])}},Tp={flags:'-downsampling.period={env="dev"}:7d:5m,{env="dev"}:30d:30m\n-downsampling.period=30d:1m\n-downsampling.period=60d:5m\n',metrics:'up\nup{env="dev"}\nup{env="prod"}'},$p=()=>{const[e]=je(),{data:t,loading:n,error:a,metricsError:i,flagsError:o,applyFilters:l}=Mp(),[s,c]=(0,r.useState)(e.get("metrics")||""),[u,d]=(0,r.useState)(e.get("flags")||""),h=(0,r.useCallback)((e=>{c(e)}),[c]),m=(0,r.useCallback)((e=>{d(e)}),[d]),p=(0,r.useCallback)((()=>{l(u,s)}),[l,u,s]),f=(0,r.useCallback)((()=>{const{flags:t,metrics:n}=Tp;d(t),c(n),l(t,n),e.set("flags",t),e.set("metrics",n)}),[Tp,d,c,e]);(0,r.useEffect)((()=>{u&&s&&p()}),[]);const v=[];for(const[r,g]of t)v.push(Nt("tr",{className:"vm-table__row",children:[Nt("td",{className:"vm-table-cell",children:r}),Nt("td",{className:"vm-table-cell",children:g.join(" ")})]}));return Nt("section",{className:"vm-downsampling-filters",children:[n&&Nt(wl,{}),Nt("div",{className:"vm-downsampling-filters-body vm-block",children:[Nt("div",{className:"vm-downsampling-filters-body__expr",children:[Nt("div",{className:"vm-retention-filters-body__title",children:Nt("p",{children:["Provide a list of flags for downsampling configuration. Note that only ",Nt("code",{children:"-downsampling.period"})," and ",Nt("code",{children:"-dedup.minScrapeInterval"})," flags are supported"]})}),Nt(Ka,{type:"textarea",label:"Flags",value:u,error:a||o,autofocus:!0,onEnter:p,onChange:m,placeholder:"-downsampling.period=30d:1m -downsampling.period=7d:5m -dedup.minScrapeInterval=30s"})]}),Nt("div",{className:"vm-downsampling-filters-body__expr",children:[Nt("div",{className:"vm-retention-filters-body__title",children:Nt("p",{children:"Provide a list of metrics to check downsampling configuration."})}),Nt(Ka,{type:"textarea",label:"Metrics",value:s,error:a||i,onEnter:p,onChange:h,placeholder:'up{env="dev"}\nup{env="prod"}\n'})]}),Nt("div",{className:"vm-downsampling-filters-body__result",children:Nt("table",{className:"vm-table",children:[Nt("thead",{className:"vm-table-header",children:Nt("tr",{children:[Nt("th",{className:"vm-table-cell vm-table-cell_header",children:"Metric"}),Nt("th",{className:"vm-table-cell vm-table-cell_header",children:"Applied downsampling rules"})]})}),Nt("tbody",{className:"vm-table-body",children:v})]})}),Nt("div",{className:"vm-downsampling-filters-body-top",children:[Nt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/#downsampling",rel:"help noreferrer",children:[Nt(or,{}),"Documentation"]}),Nt(da,{variant:"text",onClick:f,children:"Try example"}),Nt(da,{variant:"contained",onClick:p,startIcon:Nt(qn,{}),children:"Apply"})]})]})]})},Lp=()=>{const{serverUrl:e}=Mt(),[t,n]=je(),[a,i]=(0,r.useState)(new Map),[o,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)(),[u,d]=(0,r.useState)(),[h,m]=(0,r.useState)();return{data:a,error:h,metricsError:s,flagsError:u,loading:o,applyFilters:(0,r.useCallback)((async(r,a)=>{if(c(a?"":"metrics are required"),d(r?"":"flags are required"),!a||!r)return;t.set("flags",r),t.set("metrics",a),n(t);const o=((e,t,n)=>`${e}/retention-filters-debug?${[`flags=${encodeURIComponent(t)}`,`metrics=${encodeURIComponent(n)}`].join("&")}`)(e,r,a);l(!0);try{var s,u;const e=await fetch(o),t=await e.json();i(new Map(Object.entries(t.result||{}))),c((null===(s=t.error)||void 0===s?void 0:s.metrics)||""),d((null===(u=t.error)||void 0===u?void 0:u.flags)||""),m("")}catch(zp){zp instanceof Error&&"AbortError"!==zp.name&&m(`${zp.name}: ${zp.message}`)}l(!1)}),[e])}},Pp={flags:'-retentionPeriod=1y\n-retentionFilters={env!="prod"}:2w\n',metrics:'up\nup{env="dev"}\nup{env="prod"}'},Ip=()=>{const[e]=je(),{data:t,loading:n,error:a,metricsError:i,flagsError:o,applyFilters:l}=Lp(),[s,c]=(0,r.useState)(e.get("metrics")||""),[u,d]=(0,r.useState)(e.get("flags")||""),h=(0,r.useCallback)((e=>{c(e)}),[c]),m=(0,r.useCallback)((e=>{d(e)}),[d]),p=(0,r.useCallback)((()=>{l(u,s)}),[l,u,s]),f=(0,r.useCallback)((()=>{const{flags:t,metrics:n}=Pp;d(t),c(n),l(t,n),e.set("flags",t),e.set("metrics",n)}),[Pp,d,c,e]);(0,r.useEffect)((()=>{u&&s&&p()}),[]);const v=[];for(const[r,g]of t)v.push(Nt("tr",{className:"vm-table__row",children:[Nt("td",{className:"vm-table-cell",children:r}),Nt("td",{className:"vm-table-cell",children:g})]}));return Nt("section",{className:"vm-retention-filters",children:[n&&Nt(wl,{}),Nt("div",{className:"vm-retention-filters-body vm-block",children:[Nt("div",{className:"vm-retention-filters-body__expr",children:[Nt("div",{className:"vm-retention-filters-body__title",children:Nt("p",{children:["Provide a list of flags for retention configuration. Note that only ",Nt("code",{children:"-retentionPeriod"})," and ",Nt("code",{children:"-retentionFilters"})," flags are supported."]})}),Nt(Ka,{type:"textarea",label:"Flags",value:u,error:a||o,autofocus:!0,onEnter:p,onChange:m,placeholder:'-retentionPeriod=4w -retentionFilters=up{env="dev"}:2w'})]}),Nt("div",{className:"vm-retention-filters-body__expr",children:[Nt("div",{className:"vm-retention-filters-body__title",children:Nt("p",{children:"Provide a list of metrics to check retention configuration."})}),Nt(Ka,{type:"textarea",label:"Metrics",value:s,error:a||i,onEnter:p,onChange:h,placeholder:'up{env="dev"}\nup{env="prod"}\n'})]}),Nt("div",{className:"vm-retention-filters-body__result",children:Nt("table",{className:"vm-table",children:[Nt("thead",{className:"vm-table-header",children:Nt("tr",{children:[Nt("th",{className:"vm-table-cell vm-table-cell_header",children:"Metric"}),Nt("th",{className:"vm-table-cell vm-table-cell_header",children:"Applied retention"})]})}),Nt("tbody",{className:"vm-table-body",children:v})]})}),Nt("div",{className:"vm-retention-filters-body-top",children:[Nt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/#retention-filters",rel:"help noreferrer",children:[Nt(or,{}),"Documentation"]}),Nt(da,{variant:"text",onClick:f,children:"Try example"}),Nt(da,{variant:"contained",onClick:p,startIcon:Nt(qn,{}),children:"Apply"})]})]})]})},Op=()=>{const[e,t]=(0,r.useState)(!1);return Nt(Ct.FK,{children:Nt(Le,{children:Nt(ia,{children:Nt(Ct.FK,{children:[Nt(Wm,{onLoaded:t}),e&&Nt(xe,{children:Nt(we,{path:"/",element:Nt(Hi,{}),children:[Nt(we,{path:We.home,element:Nt(am,{})}),Nt(we,{path:We.metrics,element:Nt(dp,{})}),Nt(we,{path:We.cardinality,element:Nt(Rm,{})}),Nt(we,{path:We.topQueries,element:Nt(Vm,{})}),Nt(we,{path:We.trace,element:Nt(Zm,{})}),Nt(we,{path:We.queryAnalyzer,element:Nt(Ap,{})}),Nt(we,{path:We.dashboards,element:Nt(sm,{})}),Nt(we,{path:We.withTemplate,element:Nt(_p,{})}),Nt(we,{path:We.relabel,element:Nt(kp,{})}),Nt(we,{path:We.activeQueries,element:Nt(Sp,{})}),Nt(we,{path:We.icons,element:Nt(hp,{})}),Nt(we,{path:We.downsamplingDebug,element:Nt($p,{})}),Nt(we,{path:We.retentionDebug,element:Nt(Ip,{})})]})})]})})})})},Rp=e=>{e&&n.e(685).then(n.bind(n,685)).then((t=>{let{onCLS:n,onINP:r,onFCP:a,onLCP:i,onTTFB:o}=t;n(e),r(e),a(e),i(e),o(e)}))},Dp=document.getElementById("root");Dp&&(0,r.render)(Nt(Op,{}),Dp),Rp()})()})(); \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.68e2aae8.js.LICENSE.txt b/app/vmselect/vmui/static/js/main.7ec4e6eb.js.LICENSE.txt similarity index 100% rename from app/vmselect/vmui/static/js/main.68e2aae8.js.LICENSE.txt rename to app/vmselect/vmui/static/js/main.7ec4e6eb.js.LICENSE.txt From 371e193279f900ad45bba588be41d73663d963f3 Mon Sep 17 00:00:00 2001 From: Zakhar Bessarab Date: Mon, 4 Nov 2024 11:13:39 -0300 Subject: [PATCH 90/90] docs/CHANGELOG.md: cut v1.106.0 Signed-off-by: Zakhar Bessarab --- docs/VictoriaLogs/vmalert.md | 4 ++-- docs/changelog/CHANGELOG.md | 4 ++++ docs/sd_configs.md | 2 +- docs/vmagent.md | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/VictoriaLogs/vmalert.md b/docs/VictoriaLogs/vmalert.md index 837bba2f8..97ea68da0 100644 --- a/docs/VictoriaLogs/vmalert.md +++ b/docs/VictoriaLogs/vmalert.md @@ -10,7 +10,7 @@ aliases: - /VictoriaLogs/vmalert.html --- -_Available from [next](https://docs.victoriametrics.com/changelog/#tip) vmalert version and [v0.36.0](https://docs.victoriametrics.com/victorialogs/changelog/#v0360) VictoriaLogs version._ +_Available from [v1.106.0](https://docs.victoriametrics.com/changelog/#v11060) vmalert version and [v0.36.0](https://docs.victoriametrics.com/victorialogs/changelog/#v0360) VictoriaLogs version._ [vmalert](https://docs.victoriametrics.com/vmalert/) integrates with VictoriaLogs via stats APIs [`/select/logsql/stats_query`](https://docs.victoriametrics.com/victorialogs/querying/#querying-log-stats) and [`/select/logsql/stats_query_range`](https://docs.victoriametrics.com/victorialogs/querying/#querying-log-range-stats). @@ -236,4 +236,4 @@ For additional tips on writing LogsQL, refer to this [doc](https://docs.victoria - "/select/logsql/.*" url_prefix: "http://victorialogs:9428" ``` - Now, vmalert needs to be configured with `--datasource.url=http://vmauth:8427/` to send queries to vmauth, and vmauth will route them to the specified destinations as in configuration example above. \ No newline at end of file + Now, vmalert needs to be configured with `--datasource.url=http://vmauth:8427/` to send queries to vmauth, and vmauth will route them to the specified destinations as in configuration example above. diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 50d39167a..8aa914eb8 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -18,6 +18,10 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). ## tip +## [v1.106.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.106.0) + +Released at 2024-11-04 + * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert/): support [VictoriaLogs](https://docs.victoriametrics.com/victorialogs/) as a datasource. See [this doc](https://docs.victoriametrics.com/victorialogs/vmalert/) for details. * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert/): `-rule` cmd-line flag now supports multi-document YAML files. This could be useful when rules are retrieved via HTTP URL where multiple rule files were merged together in one response. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6753). Thanks to @Irene-123 for [the pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6995). * FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent/): support scraping from Kubernetes Native Sidecars. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7287). diff --git a/docs/sd_configs.md b/docs/sd_configs.md index 127173ae7..90ac6550d 100644 --- a/docs/sd_configs.md +++ b/docs/sd_configs.md @@ -1549,7 +1549,7 @@ The list of discovered OVH Cloud targets is refreshed at the interval, which can ## puppetdb_sd_configs -_Available from [next](https://docs.victoriametrics.com/changelog/#tip) version._ +_Available from [v1.106.0](https://docs.victoriametrics.com/changelog/#v11060) version._ PuppetDB SD configuration allows retrieving scrape targets from [PuppetDB](https://www.puppet.com/docs/puppetdb/8/overview.html) resources. diff --git a/docs/vmagent.md b/docs/vmagent.md index 596bf2d1c..6b7ea8ada 100644 --- a/docs/vmagent.md +++ b/docs/vmagent.md @@ -579,13 +579,13 @@ with [additional enhancements](#relabeling-enhancements). The relabeling can be This relabeling is used for modifying labels in discovered targets and for dropping unneeded targets. Configuration from global section will be prepended to the `relabel_config` of targets from `scrape_config` section. See [relabeling cookbook](https://docs.victoriametrics.com/relabeling/) for details. -_Available from [next](https://docs.victoriametrics.com/changelog/#tip) version._ +_Available from [v1.106.0](https://docs.victoriametrics.com/changelog/#v11060) version._ * At the `global -> metric_relabel_configs` section in `-promscrape.config` file. This relabeling is used for modifying labels in scraped metrics and for dropping unneeded metrics. Configuration from global section will be prepended to the `metric_relabel_config` of targets from `scrape_config` section. See [relabeling cookbook](https://docs.victoriametrics.com/relabeling/) for details. -_Available from [next](https://docs.victoriametrics.com/changelog/#tip) version._ +_Available from [v1.106.0](https://docs.victoriametrics.com/changelog/#v11060) version._ * At the `scrape_config -> relabel_configs` section in `-promscrape.config` file. This relabeling is used for modifying labels in discovered targets and for dropping unneeded targets.